## Basics of Sub-netting

Posted by Tushar Bedekar

### What is Subnetting?

Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network.
To subnet a network is to create logical divisions of the network. Subnetting, therefore, involves dividing the network into smaller portions called subnets. Subnetting applies to IP addresses because this is done by borrowing bits from the host portion of the IP address. In a sense, the IP address then has three components - the network part, the subnet part and, finally, the host part.
For Example:
11111111.11111111.11111111.11110000 will be equal to 255.255.255.240 in decimal.
Where, 11111111 = 255
And, 11110000 = 240
In 11111111 the total bits in network field are 8. So, 2^8=255   and,

For 11110000, Notice that the fourth byte in the network mask has four bits set to ‘1’. If you look at the chart below, its value is 240 (128+64+32+16).
There are so many reasons why we subnet:
a. It helps in the preservation of address space in other not to waste addresses.
b. It used for security.

c. It helps to control network traffic due to collisions of packets transmitted by other node (host) on the same segment.

In order to subnet a network address, The  subnet mask has to be extended, using some of the bits from the host ID portion of the address to create a sub network ID.

### How to Subnet:

This mean, borrow some bits from the host part to add to the network part. This allows us to have more networks than using the default subnet mask. For example, we can borrow some bits in the next octet to make the address belong to a different network.
For example:
Now you can clearly see that the subnet mask will decide which is the network part, which is the Host part. By borrowing 8 bits, our subnet mask will be like this:
After changing the second octet of the subnet mask from all “0″ to all “1″, the Network part is now extended. Now we can create new networks by changing number in the first or second octet. This greatly increases the number of networks we can create.
So, in conclusion we “subnet” by borrowing bit “0″ in the Host portion and converting them to bit “1″. The number of borrowed bits is depended on how many networks we need.
For Example:
Calculating Host: 11111111.11111111.11111111.11110000 will be equal 14 hosts
Notice the last four bits of the network mass has set to 0,
Formula = 2^4=16, and out of 16 we have only 14 valid hosts.
16-2=14 hosts, we have subtracted 2 because it is used for broadcast and network ID in the network.
Below is a quick reminder of the two major rules governing the number of subnet valid host addresses available given the particular network mas length.
1. Number of Available Subnet Cheat Sheet
Where “S” = Number of Subnet bits
2. Number of Available Valid Host Addresses Cheat Sheet
Where “h” = Number of host bits
3. Binary/Decimal/Subnet Cheat Sheet.

## Common CSS Mistakes To Avoid When Customizing Your WordPress Theme

Posted by Tushar Bedekar
Irrespective of how well-designed your WordPress theme may be, you may want to change its layout to match the changing web trends or users' needs. In order to make modifications to every WordPress theme layout, you'll have to make changes to your theme's CSS file (or style.css).

What's more? The CSS file gives you the ability to format your theme's elements, in order to improve the visual aesthetics of layout. In essence, you can make any changes to your WordPress theme's as you want using the CSS stylesheet. For instance, you can change the position of sidebar, size of the header and footer in theme's web pages and so on.

When writing a CSS for the WP powered site, you can easily make changes to your theme layout with a few clicks, but you can even mess up your layout while making tweaks to your CSS. In case, you encounter any issue with the website theme layout, you'll most likely visit a WordPress forum or community to find what just went wrong. Indubitably, there are a number of willing volunteers ready to help you, but wouldn't it be better if you could resolve the problem on your own following some simple steps.

So to help you, I've compiled a list of some common CSS mistakes that WordPress users (especially beginners) occasionally make during theme customization.

### Missed Spelling Errors

Perhaps the most common CSS mistake that a novice often makes when customizing a WP theme is missed spelling errors. But, the irony is that even professionals make missed spelling errors! Theme customization is not a simple task and requires to pay attention to several aspects, and thus it's easy to overlook spelling errors. For instance, it's easy to write "left" as "leftt", or you may assign "11ps" for a margin instead of "11px". Wondering how you can deal with this problem? Don't worry, as CSS validator help catches missed spelling mistakes for us.

### Forgetting Little Details Regarding CSS Selectors

Regardless of how creative you may be in writing CSS, there are some guidelines you need to follow. Each CSS selector is segregated into 3 different classes, such as:

·         ID
·         Class
·         HTML tags

It is important for you to ensure that the selector needs to be identified either as an ID or a class except when it is an HTML tag. Also, make sure that the selector is defined in the right format as shown below:

{ property: value; property: value; }

As you can see in the above line of code, each selector contains some properties (along with values), curly brackets, colons and semi-colons. In case, you miss any of these little details, your CSS selectors won't work. Fortunately, CSS validator make you learn about the such little forgotten details.

Even though, you have created an excellent website design, adding it in #content when the design was actually meant to be added in the #content-text selector won't make any changes to your theme layout. There's nothing to worry, as you can immediately see the mistake you've made when viewing the page. All you need to do is cut and paste your design contents in the right tag, and once it's completed make sure to delete your design from #content. Worried what happens if you lost the code? You can refer to your backup file.

Note: Make sure to create a backup for your CSS stylesheet, so that you can get your lost data as and when required.

### Placing Content in Wrong Template Module

There's no denying that WordPress new modular templates are very useful, however, one problem with using such templates is that users often do mistakenly make modifications to the wrong module file. That's because, the files have similar names. For instance, you may make changes within comments.php rather than comments-popup.php. In case such an accident happens, a backup of your file can prove very useful for you.

### Multiple Choices May Cause Problems

In many cases, developers often create two references to the same CSS selectors. If you're having several selectors with conflicting information, CSS can't recognize which reference it must use. You will most likely come across this issue when you bring up your existing CSS stylesheet over a new one. For example, in case you're having a fight with a selector for, let's say, h2 heading and nothing happens then make sure to search throughout your stylesheet to see if it contains a second reference to that selector or not.

### Conclusion

If you made some changes to your CSS file to customize your WordPress theme, and found the theme broken or cannot see any changes, it is recommended that you should go through all of the aforementioned key points. This will help you learn about the common mistakes you might have made when writing CSS.

Author Bio:

### Publisher's Last Words:

This is a guest post by Jack Calder, Thanks to Jack Calder for this awesome and useful information.if you want to post your article on http://www.allaboutcomputing.net you can contact me. For more about Computer programming and for many more about Computer or web designing stay connected with http://www.allaboutcomputing.net .
```
I hope you have got answers of some Questions by this small post and I know you have lot of questions, So please feel free to ask in comment section or you can mail me my    e mail id is : tushar.bedekar11@gmail.com

```

## Header File In C Programming language

Posted by Tushar Bedekar
As We all know that in the C programming language we use to include the header files before staring the programming further. so lets view today what these header files mean to us.

As in the old programming IDE`s such as turbo c etc. we use to write as below
#include<stdio.h>
#include<conio.h>
These two are the basic header files that we usually include.There can be also different types of the header files such as<math.h>,<string.h>,<graphic.h>,<string.h>,user defined header files and many more depending on the type of the requirement in the program me written.now before moving further lets us first know what s header file.

A header file is a file with extension .h which contains C function declarations
and macro definitions and to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that come with your compiler.

You request the use of a header file in your program by including it, with the C pre-processing directive #include like you have seen inclusion of stdio.h header file, which comes along with your compiler.

Including a header file is equal to copying the content of the header file but we do not do it because it will be very much error-prone and it is not a good idea to copy the content of header file in the source files, specially if we have multiple source file comprising our program.

### Include Syntax:-

Both user and system header files are included using the preprocessing directive #include. It has following two forms:
`#include <file>`
This form is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to this list with the -I option while compiling your source code.
`#include "file"`
This form is used for header files of your own program. It searches for a file named file in the directory containing the current file. You can prepend directories to this list with the -I option while compiling your source code.

### Include Operation:-

The #include directive works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current source file. The output from the preprocessor contains the output already generated, followed by the output resulting from the included file, followed by the output that comes from the text after the #include directive. For example, if you have a header file header.h as follows:
`char *test (void);`
and a main program called program.c that uses the header file, like this:
```int x;

int main (void)
{
puts (test ());
}```
the compiler will see the same token stream as it would if program.c read
```int x;
char *test (void);

int main (void)
{
puts (test ());
}```
The Next Discussion Will Be on Introduction to a various types of header files in brief. so stay connected with us.Readers One Important note for you (if any one wants to share there articles with us on any topic please click the link belowWrite for Us

## The Bulid Process

Posted by Tushar Bedekar
Before Going more with this topic let us first understand what it is? Basically it is a process which takes place in order to build the .exe (executable file) from the code written in the editor or any integrated development environment.

### C Source Code:-

The code that you have written in the editor is referred to as a source code.In "C Programming" language this source code is stored with an .c extension and in that if the C++ programming language it is being stored with the .cpp extension.

This source code includes many user

• User defined functions
• Many library functions
• Macros Definition
•  And native codes

### Pre-compilation:-

Now this is the  first step in build process.During this step the C source code is get expanded on the basis of pre processor directives included in the sources code. These pre processor directives may include
• #include
• #define
• #ifdef and #pragma etc.
During this pre compilation process the source code that is being stored in the .c format is get converted into the .I extension which is referred as the expanded source code.for example the stored in the form of tushar.c format is get converted into the form of tushar.I format. that means we can say the during the pre compilation only the extension or the format of the code changes in the first step if the build process.

## How to use USB flash drive as ram in windows 8, 7 and XP (pendrive)

Posted by Tushar Bedekar
Many of the programs in the system uses lots of memory during operations. The processing speed of a system depends on RAM.  So to solve this problem use your pendrive or USB as a RAM.
Using pendrive as a RAM increases the system performance. It is not a difficult process you can easily do this with the help of the following simple steps.
First insert your pendrive (minimum 2GB recommended).

Steps for Windows XP
• Right click on “My Computer” and go to “properties”.
• Now click on ‘Advance tab’.
• Click on the ‘settings’ of performance.
• Now the performance options appear. Go to ‘Advance tab’.
• Click on ‘change’ option of virtual memory.
• Click on ‘custom size’ which is a radio button. It displays the initial and maximum size of the pen drive.
• Click on ‘set’ button.
• Click ‘OK’ to complete the setup.
Steps for Windows 8 and 7
• Plug in your Pen drive.
• Format it.
• Right click on the pen drive icon.
• Select ‘properties’.
• Click “use this device”.
• Now select the maximum space that  RAM can give to the computer.
• Click ‘ok’ and ‘apply’.

MORE
There is a software called Eboostr which uses the hidden RAM in your computer. You can configure more than 4 pen drives with this software.

## Can we write any thing inside the main function in c?

Posted by Tushar Bedekar
yes we can write inside the main function.That is we can pass formal arguments inside the main function in c.we can declare any variable inside the main function which is same as declaring the variable inside the block of the main function. lets have a look on the program given below:

### Program:-

#include <stdio.h>
#include <stdlib.h>

int main(int a,int b)
{
int c;
printf("\"enter the two numbers\"");
scanf("%d%d",&a,&b);
c=a+b;
printf("the sum of %d and %d is %d",a,b,c);
getchar();
return 0;
}

### Have A Try:-

Can we Store Something in the void Data Type.If no then what is the purpose of using void as a modifier or a data type in "C Programming" languages.put your answer in the form of the comment.

## Write a C program for Generating a pattern as given bellow

Posted by Tushar Bedekar
A B C D E F G F E D C B A
A B C D E F     F E D C B A
A B C D E            E D C B A
A B C D                   D C B A
A B C                           C B A
A B                                   B A
A                                          A

### C Program me:-

#include <stdio.h>
#include <stdlib.h>

int main()
{
int l=6;
int i,k,p=6,m=1;
char ch,kp='F',tu;
printf("ABCDEFGFEDCBA \n");
for(i=0;i<=6;i++)
{
tu=kp;
ch=('A'-1);
for(k=0;k<l;k++)
{
ch=ch+1;
printf("%c",ch);
}

for(k=0;k<m;k++)
printf(" ");

for(k=0;k<p;k++)
{
printf("%c",tu);
tu=tu-1;
}
kp=kp-1;
printf("\n");
l=l-1;
m=m+2;
p=p-1;
}

return 0;
}