Friday, October 24, 2008

C++ source code: for creating a simple CALCULATOR

#include
#include"math.h"
#include"stdlib.h"
#include"string.h"
#include"ctype.h"
#define rad 0.017453292
struct stack1
{
char item;
stack1 *next;
};


stack1 *push1(stack1 *hd,char m)
{
stack1 *ptr;
if(!(ptr=(stack1*)malloc(sizeof(stack1))))
{
cout<<"OVERFLOW";
exit(0);
}
else
{
ptr->item=m;
ptr->next=hd;
hd=ptr;
}
return hd;
}


stack1 *pop1(stack1* hd,char* v)
{
stack1 *ptr;
if(hd==NULL)
{
cout<<"\n\nEXPRESSION ERROR\n";
exit(0);
}
else
{
*v=hd->item;
ptr=hd;
hd=hd->next;
free(ptr);
}
return hd;
}

// **STACK2** [ used for evaluating the postfix expression ]

struct stack2
{
double item;
stack2 *next;
};
stack2 *push2(stack2 *hd,double m)
{
stack2 *ptr;
if(!(ptr=(stack2*)malloc(sizeof(stack2))))
{
cout<<"OVERFLOW";
exit(0);
}
else
{
ptr->item=m;
ptr->next=hd;
hd=ptr;
}
return hd;
}


stack2 *pop2(stack2* hd,double* v)
{
stack2 *ptr;
if(hd==NULL)
{
cout<<"\n\nEXPRESSION ERROR\n";
exit(0);
}

else
{
*v=hd->item;
ptr=hd;
hd=hd->next;
free(ptr);
}
return hd;
}

/* **MAKE_OPERAND** [ function used for converting the
operands from string to double ] */
double make_operand(char acore[] )
{
double sum=0;
int n=0;
for(int i=0;acore[i]!='\0';i++)
{
if(acore[i]=='.')
{
n=i+1;
continue;
}
sum=sum*10+acore[i]-48;
}
if(n>0)
sum=sum/pow(10,i-n);
return sum;
}

/* **CLASS CAL**[ contains the input equation(eqn),postfix equation
(pol),result(result) and functions for postfixing
(polish),and evaluating(evaluate) the equation . ] */
class cal
{
char eqn[100],pol[100][100];
double result;
public:
void geteqn(char*);
void polish();
void evaluate();
void pr_pole();
};
void cal::geteqn(char c[])
{
strcpy(eqn,c);
}

// **POLISH**[function used for postfixing the equation.]

void cal::polish()
{
stack1 *head=NULL;
int m,v=0,error_check=0;
head=push1(head,'(');
m=strlen(eqn);
eqn[m]=')';
eqn[m+1]='\0';
for(int i=0;eqn[i]!='\0';i++)
{
if(isdigit(eqn[i])||eqn[i]=='.')
{
for(int j=0;;j++)
{
if(isdigit(eqn[i])||eqn[i]=='.')
{
pol[v][j]=eqn[i];
i++;
}
else
{
i--;
pol[v][j]='\0';
v++;
break;
}
}
}
if(isalpha(eqn[i]))
{
int n=0;
for(int j=0;;j++)
{
if(eqn[i]=='(')
n++;
if(isdigit(eqn[i])||isalpha(eqn[i])||eqn[i]=='.'||n!=0)
{
pol[v][j]=eqn[i];
if(eqn[i]==')')
n--;
i++;
}
else
{
i--;
pol[v][j]='\0';
v++;
break;
}
}
}
else if(eqn[i]=='(')
{
head=push1(head,'(');
error_check++;
}
else if(eqn[i]=='+'||eqn[i]=='-'||eqn[i]=='*'||eqn[i]=='/'||eqn[i]=='%'||eqn[i]=='^')
{
if(eqn[i]=='+'||eqn[i]=='-')
{
while(head->item!='(')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=push1(head,eqn[i]);
}
else if(eqn[i]=='*')
{
while(head->item!='('&&head->item!='+'&&head->item!='-')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=push1(head,eqn[i]);
}
else if(eqn[i]=='/')
{
while(head->item!='('&&head->item!='+'&&head->item!='-'&&head->item!='*')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=push1(head,eqn[i]);
}
else if(eqn[i]=='%')
{
while(head->item!='('&&head->item!='+'&&head->item!='-'&&head->item!='*'&&head->item!='/')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=push1(head,eqn[i]);
}
else if(eqn[i]=='^')
{
while(head->item!='('&&head->item!='+'&&head->item!='-'&&head->item!='*'&&head->item!='/'&&head->item!='%')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=push1(head,eqn[i]);
}
}
else if(eqn[i]==')')
{
error_check--;
char c;
while(head->item!='(')
{
head=pop1(head,&pol[v][0]);
pol[v][1]='\0';
v++;
}
head=pop1(head,&c);
}
}
if(error_check!=-1)
{
cout<<"\n\nEXPRESSION ERRORs\n";
exit(0);
}
pol[v][0]='\0';
}

// **EVALUATE**[function used for evaluating the equation.]

void cal::evaluate()
{
stack2 *head=NULL;
for(int i=0;pol[i][0]!='\0';i++)
{
if(isdigit(pol[i][0])||pol[i][0]=='.')
head=push2(head,make_operand(pol[i]));
else if(isalpha(pol[i][0]))
{
char trigo[4],rest[100];
double para;
for(int j=0;isalpha(pol[i][j]);j++)
trigo[j]=pol[i][j];
trigo[j]='\0';
for(int k=0;pol[i][j]!='\0';j++,k++)
rest[k]=pol[i][j];
rest[k]='\0';
if(rest[0]=='(')
{
cal Y;
Y.geteqn(rest);
Y.polish();
Y.evaluate();
para=Y.result;
}
else
para=make_operand(rest);
if(!strcmp("tan",trigo))
{
if((int)para%180!=90)
{
cout<<"\n\nMATH ERROR\n";
exit(0);
}
else if((int)para%180!=0)
head=push2(head,tan(para*rad));
else
head=push2(head,0.0);
}
else if(!strcmp("sin",trigo))
{
if((int)para%180!=0)
head=push2(head,sin(para*rad));
else
head=push2(head,0.0);

}
else if(!strcmp("cos",trigo))
{
if((int)para%180!=90)
head=push2(head,cos(para*rad));
else
head=push2(head,0.0);
}
else if(!strcmp("log",trigo))
head=push2(head,log10(para));
else if(!strcmp("ln",trigo))
head=push2(head,log(para));
}
else
{
double opp1,opp2;
head=pop2(head,&opp1);
head=pop2(head,&opp2);
if(pol[i][0]=='+')
head=push2(head,opp2+opp1);
else if(pol[i][0]=='-')
head=push2(head,opp2-opp1);
else if(pol[i][0]=='*')
head=push2(head,opp2*opp1);
else if(pol[i][0]=='/')
{
if(opp1==0)
{
cout<<"\n\nMATH ERROR\n";
exit(0);
}
else
head=push2(head,opp2/opp1);
}
else if(pol[i][0]=='%')
{
if(opp1==0)
{
cout<<"\n\nMATH ERROR\n";
exit(0);
}
head=push2(head,(int)opp2%(int)opp1);
}
else if(pol[i][0]=='^')
head=push2(head,pow(opp2,opp1));
}
}
head=pop2(head,&result);
}

void cal:: pr_pole()
{
cout<<"\n\nRESULT:"<}

//MAIN FENCTION

void main()
{
cal X;
char c[100];
cout<<"\n\n*** you can do the operation of +,-,*,/,%,^,sin,cos,tan,log and ln ***"
<<"\n\ngive the equation:\n";
cin>>c;
X.geteqn(c);
X.polish();
X.evaluate();
X.pr_pole();
}

How the web works

Every computer that is connected to the Internet is given a unique address made up of a series of four
numbers between 0 and 256 separated by periods—for example, 192.168.0.123 or 197.122.135.127. Thesenumbers are known as IP addresses. IP (or Internet Protocol) is the standard for how data is passed
between machines on the Internet.
When you connect to the Internet using an ISP you will be allocated an IP address, and you will often be
allocated a new IP address each time you connect.
EveryWeb site, meanwhile, sits on a computer known as a Web server (often you will see this shortened to
server).When you register aWeb address, also known as a domain name, such as wrox.com you have to
specify the IP address of the computer that will host the site.
When you visit aWeb site, you are actually requesting pages from a machine at an IP address, but rather
than having to learn that computer’s 12-digit IP address, you use the site’s domain name, such as
google.com or wrox.com.When you enter something like http://www.google.com, the request
goes to one of many special computers on the Internet known as domain name servers (or name servers, for
short). These servers keep tables of machine names and their IP addresses, so when you type in
http://www.google.com, it gets translated into a number, which identi?es the computers that serve
the GoogleWeb site to you.
When you want to view any page on theWeb, you must initiate the activity by requesting a pagea defaultWeb page). The browser asks a domain name server to translate the domain name you
requested into an IP address. The browser then sends a request to that server for the page you want,
using a standard called Hypertext Transfer Protocol or HTTP (hence the http:// you see at the start of
manyWeb addresses).
The server should constantly be connected to the Internet—ready to serve pages to visitors.When it
receives a request, it looks for the requested document and returns it.When a request is made, the server
usually logs the client’s IP address, the document requested, and the date and time it was requested.
An averageWeb page actually requires theWeb browser to request more than one ?le from the
Web server—not just the XHTML page, but also any images, style sheets, and other resources in the
page. Each of these ?les, including the main page, needs a URL (a uniform resource locator)t o
identify it. A URL is a unique address on theWeb where that page, picture, or other resource can be
found and is made up of the domain name (for example, wrox.com), the name of the folder or
folders on theWeb server that the ?le lives in (also known as directories on a server), and the name
of the ?le itself. For example, theWrox logo on the home page of theWroxWeb site has the unique
address wrox.com/images/mainLogo.gif and the main page is wrox.com/default.html. After
the browser acquires the ?les it then inserts the images and other resources in the appropriate place to
display the page.using your browser (if you do not specify a speci?c page, theWeb server will usually send a defaultWeb page). The browser asks a domain name server to translate the domain name you
requested into an IP address. The browser then sends a request to that server for the page you want,
using a standard called Hypertext Transfer Protocol or HTTP (hence the http:// you see at the start of
manyWeb addresses).
The server should constantly be connected to the Internet—ready to serve pages to visitors.When it
receives a request, it looks for the requested document and returns it.When a request is made, the server
usually logs the client’s IP address, the document requested, and the date and time it was requested.
An averageWeb page actually requires theWeb browser to request more than one ?le from the
Web server—not just the XHTML page, but also any images, style sheets, and other resources in the
page. Each of these ?les, including the main page, needs a URL (a uniform resource locator)t o
identify it. A URL is a unique address on theWeb where that page, picture, or other resource can be
found and is made up of the domain name (for example, wrox.com), the name of the folder or
folders on theWeb server that the ?le lives in (also known as directories on a server), and the name
of the ?le itself. For example, theWrox logo on the home page of theWroxWeb site has the unique
address wrox.com/images/mainLogo.gif and the main page is wrox.com/default.html. After
the browser acquires the ?les it then inserts the images and other resources in the appropriate place to
display the page.

How to install joomla

In order to set up Joomla! for this website, you first need to have a server installed on
which Joomla! can run. The easiest way to set up a server on your own computer is to use
XAMPP. If you are installing Joomla! on a web host, please check out the “Official Joomla
1.5 Installation Guide” at http://help.joomla.org. Do not install the sample content and skip
ahead to the “Sections, Categories, and Articles” chapter after your installation is complete.
Note: The following instructions are based on a Windows install. Other operating
systems will be similar but slightly different. Please refer to the XAMPP installation
manual for your operating system.
1. Download the XAMPP installer for your version of Windows from the XAMPP
website: http://www.apachefriends.org/en/xampp.html.
2. After downloading XAMPP, run the setup and follow the given instructions. Installing
Apache and MySQL as services is recommended:
Now that you are done setting up the server, it is time to download and unzip Joomla!.
1. First, we need to make a folder for Joomla!. Open the folder that you installed
XAMPP into – usually C:\XAMPP or C:\Program Files\XAMPP on Windows.
2. Open up the folder “htdocs:”
3. Create a new folder in “htdocs” titled “joomla15.”
4. Now we need to download the latest copy of Joomla! 1.5 from the net. Go to http://
www.joomla.org and scroll down the left hand side to find “Download Latest” and
click on “1.5” to open the download page:
Installing Joomla! is a simple thing.
1. First, go to http://localhost/joomla15.
2. Select your language on step 1 and press “Next” at the top.
3. Make sure that there are no red items on step 2 (if you set up with XAMPP, you
should already be fine) and press “Next” to proceed.
4. Read over the license in step 3 and press “Next.”
5. On the “Database 6. Skip over step 5 and press “Next” to proceed to step 6.
7. Enter the site name “Landscape Smart!”, then the e-mail address and admin
password of your choice. NOTE: DO NOT PRESS “Install Sample Data!”
8. Press “Next” to complete the installation.” page, enter the following details, then press “Next:”
9. IMPORTANT: Open up the location where you unzipped Joomla! (usually
C:\XAMPP\htdocs\joomla15 or C:\Program Files\XAMPP\htdocs\joomla15) and
delete the “installation” directory:

Thursday, October 23, 2008

Hard Disk : How the OS Assigns Drive Letters

These OSs assign drive letters in a fixed sequence which cannot be changed. This
sequence is as follows:
• The OS begins by assigning a drive letter to the first primary partition that it
recognizes on the first system hard disk. The OS then assigns drive letters to the first
primary partition recognized on each successive hard disk. For example, imagine you
have three hard disks in your system. When you boot your OS, it assigns drive letter
C: to the active primary partition on the first hard disk. Drive letter D: is assigned to
the first primary partition that the OS recognizes on the second hard disk, and drive
letter E: is likewise assigned to the first primary partition on the third disk.
If you have multiple visible primary partitions on a single hard disk, the OS assigns
the drive letter to the active partition. If none of the partitions are active, the drive
letter is assigned to the first visible primary partition recognized by the OS.
• Next, all logical partitions recognized by the OS are assigned drive letters, starting
with the logical partitions on the first hard disk and proceeding in order. For example,
suppose you have two hard disks in your system, each with one primary and two
logical partitions. The OS first assigns C: and D: to the two primary partitions, then
assigns drive letters E: and F: to the first and second logical partitions on the first hard
disk. Drive letters G: and H: are assigned to the two logical partitions on the second
disk.The OS then assigns drive letters to any remaining visible primary partitions, starting
with those on the first hard disk. The OS proceeds to any visible primary partitions on
the second disk, then the third disk, and so on.
• Finally, CD-ROM drives and other types of removable media are assigned a drive
letter.
Because the OS always follows this sequence to assign drive letters, adding or removing a
second hard disk can cause changes to your drive letter assignments. Likewise, drive
letters can change if you add, remove, or copy a disk partition; reformat a partition with a
different file system; or boot a different OS.

Hard Disk : Making Efficient Use of Disk Space

If you have a large hard disk and want to use the FAT file system on all or most of the
disk, you can prevent wasted space by using several small FAT partitions.
All data on a FAT partition are stored in allocation units called clusters. Each cluster is
made up of a fixed number of disk sectors.
The FAT file system supports disk or partition sizes up to 2 GB, but only allows a
maximum of 65,525 clusters. Therefore, whatever the size of the hard disk or partition,
the number of sectors in one cluster must be large enough so that all available space can
be included within 65,525 clusters. The larger the available space, the larger the cluster
size must be.
However, using a large cluster size wastes disk space. Even if a data file (or the last
portion of a data file) is much smaller than the cluster size, the computer must still use a
complete cluster to store the data. The rest of the cluster space goes unused

Hard Disk : Operating System–Specific Boot Information

Most operating systems, including DOS, and Windows 3.x/95/98/Me/NT/2000 rely on the
active primary partition when they boot from a hard disk. However, different operating
systems rely on the active primary partition in different ways.
• DOS, Windows 3.x, and Windows 95/98 must boot from an active primary partition
on the first hard disk drive.
• Windows NT/2000 can boot from a logical partition, but the Windows NT/2000 boot
program must be in the active primary partition on the first hard disk.
• OS/2 can be booted from a logical partition; however, the extended partition
containing the logical partition must be contained within the first 2 GB of the hard
disk. Additionally, the Boot Manager utility provided with OS/2 must be present on
the hard disk in order to install OS/2.

Hard Disk : Understanding How a Computer Boots

The Basic Boot Process
When you turn on the power to your computer, the CPU (central processing unit)1 takes
control. The CPU immediately executes the instructions built into the computer’s ROM
BIOS, a program that contains the startup procedures. The last part of the BIOS
instructions contains the boot routine. This routine is programmed to read the master boot
record from the first sector of the first physical hard disk.
The MBR (master boot record) contains a master boot program and a partition table that
describes all of the hard disk’s partitions. The BIOS boot routine executes the master boot
program, which then continues the boot process. The master boot program looks at the
partition table to see which primary partition is active. If there is only one primary
partition, that partition’s OS is loaded and booted into operation.
If the hard disk has more than one primary partition, each bootable partition (that is,
containing an OS) has its own boot record stored in its first sector. This boot record holds
a boot program designed specifically to start that partition’s installed OS. This
OS-specific boot record is usually written to the partition when the partition is logically
formatted, but can also be added later with an OS-specific utility (for example, the DOS
SYS utility).
After identifying the active partition, the master boot program starts that partition’s boot
program. In turn, the boot program loads the necessary OS files and starts the OS.

Hard Disk : Partition Types

There are three kinds of partitions: primary, extended, and logical. Primary and extended
partitions are the main disk divisions; one hard disk may contain up to four primary
partitions, or three primary partitions and one extended partition. The extended partition
can then be further divided into any number of logical partitions.

Primary Partitions

A primary partition may contain an operating system along with any number of data files
(for example, program files or user files). Before an OS is installed, the primary partition
must be logically formatted with a file system compatible to the OS.
If you have multiple primary partitions on your hard disk, only one primary partition may
be visible and active at a time. The active partition is the partition from which an OS is
booted at computer startup. Primary partitions other than the active partition are hidden,
preventing their data from being accessed. Thus, the data in a primary partition can be
accessed (for all practical purposes) only by the OS installed on that partition.
If you plan to install more than one operating system on your hard disk, you probably
need to create multiple primary partitions; most operating systems can be booted only
from a primary partition.

Extended Partitions

The extended partition was invented as a way of getting around the arbitrary four-partition
limit. An extended partition is essentially a container in which you can further physically
divide your disk space by creating an unlimited number of logical partitions.
An extended partition does not directly hold data. You must create logical partitions
within the extended partition in order to store data. Once created, logical partitions must
be logically formatted, but each can use a different file system

Logical Partitions

Logical partitions can exist only within an extended partition and are meant to contain
only data files and OSs that can be booted from a logical partition (OS/2, Linux, and
Windows NT).
The illustration below shows a hard disk that contains four main partitions: three primary
partitions and one extended partition. The extended partition has been further divided into
two logical partitions.
Each primary partition has been formatted to use a different file system (FAT, NTFS, and
HPFS). The two logical partitions have both been formatted to use the FAT file system.

Hard Disk : Understanding Partitions

After a disk has been physically formatted, it can be divided into separate physical
sections or partitions. Each partition functions as an individual unit, and can be logically
formatted with any desired file system. Once a disk partition has been logically formatted,
it is referred to as a volume.
As part of the formatting operation, you are asked to give the partition a name, called the
“volume label.” This name helps you easily identify the volume.

Why Use Multiple Partitions?
Many hard disks are formatted as one large partition. This setup, however, doesn’t always
provide the best possible use of your disk space or resources. The alternative is to separate
your hard disk into partitions. Using multiple partitions, you can:
• Install more than one OS on your hard disk;
• Make the most efficient use of your available disk space;
• Make your files as secure as possible;
• Physically separate data so that it is easy to find files and back up data.
The following sections discuss partitions in greater detail, helping you create and use
partitions to get the most out of your hard disk.

Hard Disk : File Systems

All file systems consist of structures necessary for storing and managing data. These
structures typically include an operating system boot record, directories, and files. A file
system also performs three main functions: 1) tracking allocated and free space, 2)
maintaining directories and file names, and 3) tracking where each file is physically stored
on the disk.
Different file systems are used by different operating systems. Some OSs can recognize
only one file system, while other OSs can recognize several. Some of the most common
file systems are the following:
• FAT (File Allocation Table)
• FAT32 (File Allocation Table 32)
• NTFS (New Technology File System)
• HPFS (High Performance File System)
• NetWare File System
• Linux Ext2 and Linux Swap

Basic components of hard disk

A hard disk is comprised of four basic parts: platters, a spindle, read/write heads, and integrated electronics.

Platters are rigid disks made of metal or plastic. Both sides of each platter are
covered with a thin layer of iron oxide or other magnetizable material.
• The platters are mounted on a central axle or spindle, which rotates all the platters at
the same speed.
• Read/write heads are mounted on arms that extend over both top and bottom
surfaces of each disk. There is at least one read/write head for each side of each
platter. The arms jointly move back and forth between the platters’ centers and
outside edges; this movement, along with the platters’ rotation, allow the read/write
heads to access all areas of the platters.
• The integrated electronics translate commands from the computer and move the
read/write heads to specific areas of the platters, thus reading and/or writing the
needed data.

What is a hard disk?

A hard disk or drive is the part of your computer responsible for long-term storage of
information. Unlike volatile memory (often referred to as RAM) which loses its stored
information once its power supply is shut off, a hard disk stores information permanently,
allowing you to save programs, files, and other data. Hard disks also have much greater
storage capacities than RAM; in fact, current hard disks may contain over 19 GB of
storage space.

Wi-Fi: Blessing of modern technology

IT STANDS as perhaps the signal success of the computer industry in the last few
years, a rare bright spot in a bubble-battered market: Wi-Fi, the short-range
wireless broadband technology. Among geeks, it has inspired a mania unseen since
the days of the internet boom. Tens of millions of Wi-Fi devices will be sold this year,
including the majority of laptop computers. Analysts predict that 100m people will be
using Wi-Fi by 2006. Homes, offices, colleges and schools around the world have
installed Wi-Fi equipment to blanket their premises with wireless access to the
internet. Wi-Fi access is available in a growing number of coffee-shops, airports and
hotels too. Yet merely five years ago wireless networking was a niche technology.
How did Wi-Fi get started, and become so successful, in the depths of a downturn?
Wi-Fi seems even more remarkable when you look at its provenance: it was, in
effect, spawned by an American government agency from an area of radio spectrum
widely referred to as “the garbage bands”. Technology entrepreneurs generally
prefer governments to stay out of their way: funding basic research, perhaps, and
then buying finished products when they emerge on the market. But in the case of
Wi-Fi, the government seems actively to have guided innovation. “Wi-Fi is a creature
of regulation, created more by lawyers than by engineers,” asserts Mitchell Lazarus,
an expert in telecoms regulation at Fletcher, Heald & Hildreth, a law firm based in
Arlington, Virginia. As a lawyer, Mr Lazarus might be expected to say that. But he was also educated as an electrical engineer—and besides, the facts seem to bear him
out.

Types of server

There are various tApplication server, a server dedicated to running certain software applications
Communications server, carrier-grade computing platform for communications networks
Database server, see file AB2
Fax server, provides fax services for clients
File server, provides file services
Game server, a server that video game clients connect to in order to play online together
Home server, a server for the home
Print server, provides printer services
Proxy server, provides database IT server in services
Sound server, provides multimedia broadcasting / streaming.
Standalone server, an emulator for client-server (web-based) programs
Web server, a server that HTTP clients connect to in order to send commands and receive responses along with data contents
Web Feed Server, a server that distributes, manages, and tracks internal and external RSS feeds in an enterprise
Client-server, a software architecture that separates "server" functions from "client" functions
The X Server, part of the X Window System
Peer-to-peer, a network of computers running as both clients and servers
Catalog server, a central search point for information across a distributed network
ypes of server:

What is a server?

A server is a a software program, or the computer on which that program runs, that provides a specific kind of service to client software running on the same computer or other computers on a network.

The client-server model is an architecture (i.e., a system design) that divides processing between clients and servers that can run on the same machine or on different machines on the same network. It is a major element of modern operating system and network design.

The client provides the user interface, such as a GUI (graphical user interface), and performs some or all of the processing on requests it makes from the server, which maintains the data and processes the requests.

An example is a web server, which stores files related to web sites and serves (i.e., sends) them across the Internet to clients (i.e., web browsers) when requested by a user. By far the most popular web server program is Apache, which is claimed to host more than 68 percent of all web sites on the Internet.

As is the case with other server software, Apache can run on computers which are used for multiple purposes, such as ordinary desktop computers, as well as on dedicated hardware.

A file server is software, or hardware plus software, that is dedicated to storing files and making them accessible for reading and writing to clients (i.e., users) across a network. A print server is software or hardware that manages one or more printers. A network server manages network traffic. A name server maps user and computer names to machine addresses. A database server allows clients to interact with a database. An application server runs applications for clients.

A single computer can have multiple server software applications running on it. Also, it is possible for a computer to be both a client and a server simultaneously; this is accomplished by connecting to itself in the same way that a separate computer would.

Many large enterprises employ numerous dedicated server machines. A collection of servers in one location is commonly referred to as a server farm. If very heavy traffic is expected, load balancing is usually employed to distribute the requests among the various servers so that no single machine is overwhelmed.

Due to the continual demand for ever more powerful servers in ever decreasing spaces, higher density configurations have been developed. In particular, blade server incorporate a number of sets of server hardware, sometimes as many as nine, each housed inside a high-density module known as a blade, within the space typically occupied by a single computer.

Confusion often arises with regard to the use of the term server in the context of the X Window System, an extensively used and free client-server system for managing GUIs (but not for creating the GUI itself) on single computers and on networks of computers. The X server resides on each local computer (i.e., those used directly by users) instead of on a remote computer, where it provides access to computer input and output devices (e.g., monitors, keyboards and mice) and performs basic graphics functions. The X clients are the application programs, and they can run on either some other computer on the network and serve many machines containing X servers or they can run on the same machines as the X servers.

Virtual Private Network:Categorization by user administrative relationships

The Internet Engineering Task Force (IETF) categorized a variety of VPNs, some of which, such as Virtual LANs (VLAN) are the standardization responsibility of other organizations, such as the Institute of Electrical and Electronics Engineers (IEEE) Project 802, Workgroup 802.1 (architecture). Originally, network nodes within a single enterprise were interconnected with Wide Area Network (WAN) links from a telecommunications service provider. With the advent of LANs, enterprises could interconnect their nodes with links that they owned. While the original WANs used dedicated lines and layer 2 multiplexed services such as Frame Relay, IP-based layer 3 networks, such as the ARPANET, Internet, military IP networks (NIPRNET,SIPRNET,JWICS, etc.), became common interconnection media. VPNs began to be defined over IP networks [1]. The military networks may themselves be implemented as VPNs on common transmission equipment, but with separate encryption and perhaps routers.

It became useful first to distinguish among different kinds of IP VPN based on the administrative relationships, not the technology, interconnecting the nodes. Once the relationships were defined, different technologies could be used, depending on requirements such as security and quality of service.

When an enterprise interconnected a set of nodes, all under its administrative control, through an LAN network, that was termed an Intranet [2]. When the interconnected nodes were under multiple administrative authorities, but were hidden from the public Internet, the resulting set of nodes was called an extranet. Both intranets and extranets could be managed by a user organization, or the service could be obtained as a contracted offering, usually customized, from an IP service provider. In the latter case, the user organization contracted for layer 3 services much as it had contracted for layer 1 services such as dedicated lines, or multiplexed layer 2 services such as frame relay.

The IETF distinguishes between provider-provisioned and customer-provisioned VPNs [3]. Much as conventional WAN services can be provided by an interconnected set of providers, provider-provisioned VPNs (PPVPNs) can be provided by a single service provider that presents a common point of contact to the user organization.

Virtual Private Network

A virtual private network (VPN) is a computer network in which some of the links between nodes are carried by open connections or virtual circuits in some larger network (e.g., the Internet) instead of by physical wires. The link-layer protocols of the virtual network are said to be tunneled through the larger network when this is the case. One common application is secure communications through the public Internet, but a VPN need not have explicit security features, such as authentication or content encryption. VPNs, for example, can be used to separate the traffic of different user communities over an underlying network with strong security features.A VPN may have best-effort performance, or may have a defined service level agreement (SLA) between the VPN customer and the VPN service provider. Generally, a VPN has a topology more complex than point-to-point.

Tuesday, October 21, 2008

an introduction to Ajax

AJAX stands for Asynchronous JavaScript And XML.AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).AJAX is not a new programming language, but a new way to use existing standards.

JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object

With an HTTP request, a web page can make a request to, and get a response from a web server - without reloading the page
When you start typing in Google's search box, a JavaScript sends the letters off to a server and the server returns a list of suggestions.
The XMLHttpRequest object is supported in Internet Explorer 5.0+, Safari 1.2, Mozilla 1.0 / Firefox, Opera 8+, and Netscape 7
The keystone of AJAX is the XMLHttpRequest object