RUPAK SEARCH ENGINE

Custom Search

About the Group Policy Editor- How it works

About the Group Policy Editor- How it works
Although the Group Policy Editor console (gpedit.msc) is mostly used by administrators of networks and domains, it also has uses for a stand-alone home computer. One application is to allow convenient and easy editing of the Registry so that a variety of tweaks or changes to the system can be made. These settings are known as policies and are stored in a special hidden folder %SystemRoot%\System32\GroupPolicy\ (For most home systems the environment variable %SystemRoot% is C:\Windows.) Policies that apply to the machine are stored in a sub-folder "Machine" and policies that apply to a user are stored in a sub-folder "User". In each case the settings are in a file named "Registry.pol". Thus the settings for the machine are in %SystemRoot%\System32\GroupPolicy\Machine\Registry.pol and in similar fashion user settings are in User\Registry.pol. Policies are used to write to a special key of the Registry and override any settings elsewhere in the Registry. Since only the administrator account can access the policy settings, limited account users can be prevented from making unwanted system changes.
Another useful application of the Group Policy Editor (GPE) is to provide for the automatic running of scripts or programs whenever the computer is started up or shut down or when a user logs on or off. This may be the application of most practical use to a typical home PC user.

example of destructor in derived class

example of destructor in derived class
#include
using namespace std;
#include
class baseone
{
public:
baseone()
{
cout<<"\nI am from base one constructor";
}
~baseone()
{cout<<"I am from base one destructor";}
};
class basetwo
{
public:
basetwo()
{
cout<<"I am from base two constructor";
}
~basetwo()
{cout<<"I am from base two destructor";}
};
class derived:public basetwo,public baseone
{
public:
derived()
{
cout<<"I am derived class constructor";
cout<<"\nEnd of constructor invocation"$$endl;
//place less than sign in place of $$
}
~derived()
{cout<<"I am from derived class destructor";}
};
int main()
{
derived d;
system("pause");
return 0;
}

constructor in base & derived class without default constructor

constructor in base & derived class without default constructor

# include
# include
using namespace std;

class base
{
public:
base (int data)
{
cout<<"\nI am from one argument base class constructor";
}
};

class derived:public base
{
public:
derived(int data):base(data)
{
cout<<"\nI am one constructor derived class constructor";
}
};

int main()
{
derived d(5);
getch();
return 0;
}

constructor in base & derived class without default constructor

constructor in base & derived class without default constructor

# include
# include
using namespace std;

class base
{
public:
base (int data)
{
cout<<"\nI am from one argument base class constructor";
}
};

class derived:public base
{
public:
derived(int data):base(data)
{
cout<<"\nI am one constructor derived class constructor";
}
};

int main()
{
derived d(5);
getch();
return 0;
}

constructor in base & derived class without default constructor

constructor in base & derived class without default constructor

# include
# include
using namespace std;

class base
{
public:
base (int data)
{
cout<<"\nI am from one argument base class constructor";
}
};

class derived:public base
{
public:
derived(int data):base(data)
{
cout<<"\nI am one constructor derived class constructor";
}
};

int main()
{
derived d(5);
getch();
return 0;
}

example of constructor in derived class

example of constructor in derived class

# include
# include
using namespace std;

class base
{
//body
};

class derived:public base
{
//body of derived class
public:
derived()
{
cout<<"\nI am no argument derived class constructor";
}
};

int main()
{
derived d;
getch();
return 0;
}

example of constructor in base class

example of constructor in base class

# include
# include
using namespace std;

class base
{
public:
base()
{
cout<<"\nI am no argument base class constructor";
}
};

class derived:public base
{
//body of derived class
};

int main()
{
derived d;
getch();
// system("pause");
return 0;
}

example of no constructor in base & derived class

example of no constructor in base & derived class

# include
# include
using namespace std;

class base
{
//body
//no constructor
};

class derived:public base
{
//body
//no constructor

public:
void message()
{
cout<<"\nNo constructor in base & derived class";
}
};

int main()
{
derived d;
d.message();
getch();
// system("pause");
return 0;

}

constructor in base class

constructor in base class

# include
# include
using namespace std;

class base
{
public:
base()
{
cout<<"\nI am no argument base class constructor";
}
};

class derived:public base
{
//body of derived class
};

int main()
{
derived d;
getch();
// system("pause");
return 0;
}

example of over-riding member function and implementation of stack

eg of over-riding member function and implementation of stack

#include
using namespace std;
#include
#define MAX 5
class stack
{
protected:
int s[MAX],top;
public:
stack(){top=-1;}
void push(int x)
{s[++top]=x;}
int pop(){return s[top--];}
};
class stack1:public stack
{
public:
void push(int x)
{
if(top==MAX-1)
{
cout<<"stack full";
exit(1);
}
stack::push(x);
}
int pop()
{
if(top==-1)
{
cout<<"\nstack empty";
exit(1);
}
return stack::pop();
}
};
int main()
{
stack1 s;
s.push(11);
s.push(22);
s.push(33);
s.push(44);
s.push(55);
s.push(66);
cout<<"\nThe no. of pop is:"$$s.pop();//put less than sign in place of $$
system("pause");
return 0;
}

draw using mouse in visual studio 6

//save it as mouse.cpp in win32 c++
#include
#include "Mouse.h"

CMyApp myApp;

/////////////////////////////////////////////////////////////////////////
// CMyApp member functions

BOOL CMyApp::InitInstance ()
{
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow (m_nCmdShow);
m_pMainWnd->UpdateWindow ();
return TRUE;
}

/////////////////////////////////////////////////////////////////////////
// CMainWindow message map and member functions

BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)

ON_WM_LBUTTONDOWN()
ON_WM_MOUSEMOVE()
ON_WM_LBUTTONUP()

END_MESSAGE_MAP ()

CMainWindow::CMainWindow ()
{
Create (NULL, _T ("Testing Programs"));
}

void CMainWindow::OnLButtonDown(UINT flag,CPoint pt)
{
endpoint=startpoint=pt;
}

void CMainWindow::OnLButtonUp(UINT flag,CPoint pt)
{
CClientDC dc (this);
dc.SetROP2(R2_COPYPEN);
dc.MoveTo(startpoint);
dc.LineTo(endpoint);
}

void CMainWindow::OnMouseMove(UINT flag,CPoint pt)
{
CClientDC dc(this);
if(flag==MK_LBUTTON)
{
dc.SetROP2(R2_NOTXORPEN);
//erase line
dc.MoveTo(startpoint);
dc.LineTo(endpoint);

//draw line
dc.MoveTo(startpoint);
dc.LineTo(pt);
endpoint=pt;
}
}

//save it from as mouse.h in source filein visual studio 6
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};

class CMainWindow : public CFrameWnd
{

private:
CPoint startpoint,endpoint;
public:
CMainWindow ();

protected:

afx_msg void OnLButtonDown (UINT,CPoint);
afx_msg void OnMouseMove(UINT,CPoint);
afx_msg void OnLButtonUp(UINT,CPoint);
DECLARE_MESSAGE_MAP ()
};

button program in visual studio 6

//control.h
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance ();
};

class CMainWindow : public CFrameWnd
{
public:
CMainWindow ();

private:
CButton b[2];

protected:


afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void ok();
afx_msg void cancel();
DECLARE_MESSAGE_MAP ()
};


//resource.h

#define ID_BUTTON_OK 40001
#define ID_BUTTON_CANCEL 40002


//control.cpp
#include
#include "control.h"
#include "resource.h"

CMyApp myApp;
// CMyApp member functions

BOOL CMyApp::InitInstance ()
{
m_pMainWnd = new CMainWindow;


m_pMainWnd->ShowWindow (m_nCmdShow);
m_pMainWnd->UpdateWindow ();
return TRUE;
}

/////////////////////////////////////////////////////////////////////////
// CMainWindow message map and member functions

BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
ON_WM_CREATE()
ON_COMMAND(ID_BUTTON_OK,ok)
ON_COMMAND(ID_BUTTON_CANCEL,cancel)

END_MESSAGE_MAP ()

CMainWindow::CMainWindow ()
{
Create (NULL, _T ("Testing Controls"));
}

int CMainWindow::OnCreate (LPCREATESTRUCT lpCreateStruct)
{
b[0].Create("OK",BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE,CRect(250,100,310,150),this,ID_BUTTON_OK);
b[1].Create("Cancel",BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE,CRect(350,100,410,150),this,ID_BUTTON_CANCEL);

b[0].SetFocus();
return 0;
}
void CMainWindow::ok()
{
MessageBox("You clicked OK button","ok");
b[1].SetFocus ();
}


void CMainWindow::cancel()
{
MessageBox("You clicked Cancel button","cancel");
b[0].SetFocus ();
}

example of structure and nested structure

main()
{
int i;
struct exam /* 1st structure */
{
int prg;
int math;
} ;
struct exam subject;

struct info /* 2nd structure */
{
char sname[20];
int phone;
};
struct info names;
struct details /* 3rd structure */
{
int roll;
struct exam subject; /* 1st nested */
struct info names; /* 2nd nested */
};
struct details students[4]; /* Array of Structure */
clrscr();
for(i=0;i<4;i++)
{
printf("Roll:-%d\n",i+1);
students[i].roll=i+1;
printf("Name:-");
scanf("%s", students[i].names.sname);
printf("Phone:-");
scanf("%d", students[i].names.phone);
printf("Programming:-");
scanf("%d", students[i].subject.prg);
printf("Maths:-");
scanf("%d", students[i].subject.math);
}
clrscr();
printf("Which roll to print? ");
scanf("%d",&i);
i=i-1;
clrscr();
printf("Roll:-%d", students[i].roll);
printf("\nName:-%s", students[i].names.sname);
printf("\nPhone:-%d", students[i].names.phone);
printf("\programming-%d", students[i].subject.prg);
printf("\nMaths:-%d", students[i].subject.math);

getch();
}
/*example of nested structure */
#include
main()
{
int i;
struct exam
{
int prg;
int math;
};
struct exam subjcect;

struct info
{
char sname[20];
int phone;
};
struct info names;

struct details
{
int roll;
struct exam subject;
struct info names;
};
struct details students[4];
clrscr();
for(i=0;i<4;i++)
{
printf("Roll:-%d\n",i+1);
students[i].roll=i+1;
printf("Name:-");
scanf("%s", students[i].names.sname);
printf("Phone:-");
scanf("%d", students[i].names.phone);
printf("Programming:-");
scanf("%d", students[i].subject.prg);
printf("Maths:-");
scanf("%d", students[i].subject.math);
}
clrscr();
printf("Which roll to print? ");
scanf("%d",&i);
i=i-1;
clrscr();
printf("Roll:-%d", students[i].roll);
printf("\nName:-%s", students[i].names.sname);
printf("\nPhone:-%d", students[i].names.phone);
printf("\nProgramming:-%d", students[i].subject.prg);
printf("\nMaths:-%d", students[i].subject.math);
getch();
}

Examples of files in turbq C

Examples
#include
main()
{
FILE *buffer;
char text[20];
clrscr();
printf("Enter you name to store in data file: ");
scanf("%s",text);
buffer=fopen("txt.dat","w");
fprintf(buffer,text);
fclose(buffer);
/*see the text from dos */
}
/*---------------------------------------------------------------------------*/
#include
struct record
{
char name[20];
char address[20];
} student[5];

main()
{
FILE *buffer;
char fname[20];
int num,i;
clrscr();
printf("Enter the file name: ");
scanf("%s",fname);
buffer=fopen(fname,"a");
printf("How many students? ");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
printf("Name: ");
scanf("%s",student[i].name);
printf("Address: ");
scanf("%s",student[i].address);
fprintf(buffer,student[i].name);
fprintf(buffer,student[i].address);
fprintf(buffer,"\n");
}
fclose(buffer);
}


Examples
#include
main()
{
FILE *buffer;
char text[20];
clrscr();
printf("Enter you name to store in data file: ");
scanf("%s",text);
buffer=fopen("txt.dat","w");
fprintf(buffer,text);
fclose(buffer);
/*see the text from dos */
}
/*---------------------------------------------------------------------------*/
#include
struct record
{
char name[20];
char address[20];
} student[5];

main()
{
FILE *buffer;
char fname[20];
int num,i;
clrscr();
printf("Enter the file name: ");
scanf("%s",fname);
buffer=fopen(fname,"a");
printf("How many students? ");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
printf("Name: ");
scanf("%s",student[i].name);
printf("Address: ");
scanf("%s",student[i].address);
fprintf(buffer,student[i].name);
fprintf(buffer,student[i].address);
fprintf(buffer,"\n");
}
fclose(buffer);
}



#include
#define finished 0
main()
{
FILE *buffer;
char filename[10];
char text[20];
clrscr();
printf("Enter existing data file name to read: ");
scanf("%s",filename);
if((buffer=fopen(filename,"r"))==finished)
printf("Wrong file name! ");
else
{
fscanf(buffer,"%s",text);
printf("%s",text);
}
getch();
fclose(buffer);
}


#include
#define finished 0
main()
{
FILE *buffer;
char filename[10];
char text[20];
clrscr();
printf("Enter existing data file name to read: ");
scanf("%s",filename);
if((buffer=fopen(filename,"r"))==finished)
printf("Wrong file name! ");
else
{
fscanf(buffer,"%s",text);
printf("%s",text);
}
getch();
fclose(buffer);
}

Write a program to create/append/disp data of a data file.

/*Write a program to create/append/disp data of a data file.
Also use structure.*/
#include
#include
#include
#include
# define null 0
struct info{
int roll;
char name[20];
}student;
FILE *ptr,*ptr1;
void dispmenu();
void create(void);
void add(void);
void dispdata(void);
void disp_one(void);
void modify(void);
void del_one(void);
void del_all(void);
void main()
{
int choice;
repeat:
dispmenu();
scanf("%d",&choice);
if(choice<1|| choice>8)
goto repeat;
else if(choice==1)
create();
else if(choice==2)
add();
else if(choice==3)
dispdata();
else if(choice==4)
disp_one();
else if(choice==5)
modify();
else if(choice==6)
del_one();
else if(choice==7)
del_all();
else if(choice==8)
exit(1);
goto repeat;
}
void create()
{
ptr=fopen("myfile.dat","w");
clrscr();
printf("Roll:");
scanf("%d",&student.roll);
printf("name");
scanf("%s",student.name);
fprintf(ptr,"%d%s\n",student.roll,student.name);
fclose(ptr);
}
void add()
{
clrscr();
ptr=fopen("myfile.dat","a");
printf("Roll:");
scanf("%d",&student.roll);
printf("name:");
scanf("%s",student.name);
fprintf(ptr,"%d%s\n",student.roll,student.name);
fclose(ptr);
}
void dispdata()
{
clrscr();
if((ptr=fopen("myfile.dat","r"))==null)
printf("File not found.");
else
{
while(1)
{
fscanf(ptr,"%d",&student.roll);
fscanf(ptr,"%[^\n]",student.name);
if(student.roll==null)
break;
printf("%d ",student.roll);
printf("%s\n",student.name);
student.roll=null;
}
getch();
fclose(ptr);
}
}
void disp_one()
{
int roll;
clrscr();
if((ptr=fopen("myfile.dat","r"))==null)
printf("File not found.");
else
{
printf("Enter roll:");
scanf("%d",&roll);
do
{
fscanf(ptr,"%d",&student.roll);
fscanf(ptr,"%[^\n]",student.name);
if(roll==student.roll)
{
printf("%d ",student.roll);
printf("%s\n",student.name);
break;
}
}while(feof(ptr)==0);
getch();
fclose(ptr);
}
}
void modify()
{
int roll;char name[20];
clrscr();
if((ptr=fopen("myfile.dat","r"))==null)
printf("File not found.");
else
{
printf("Enter roll:");
scanf("%d",&roll);
printf("Enter name:");
scanf("%s",name);
ptr1=fopen("test","w");
do
{
fscanf(ptr,"%d",&student.roll);
fscanf(ptr,"%[^\n]",student.name);
if(roll==student.roll)
{
student.roll=roll;
strcpy(student.name,name);
}
fprintf(ptr1,"%d%s\n",student.roll,student.name);
}while(feof(ptr)==0);
getch();
fclose(ptr);
fclose(ptr1);
remove("myfile.dat");
rename("test","myfile.dat");
}
}
void del_one()
{
int roll;char name[20];
clrscr();
if((ptr=fopen("myfile.dat","r"))==null)
printf("File not found.");
else
{
printf("Enter roll:");
scanf("%d",&roll);
ptr1=fopen("test","w");
while(1)
{
fscanf(ptr,"%d",&student.roll);
fscanf(ptr,"%[^\n]",student.name);
if(student.roll==null)
break;
else if(student.roll==roll)
;
else
{
fprintf(ptr1,"%d%s\n",student.roll,student.name);
student.roll=0;
}
}
fclose(ptr);
fclose(ptr1);
remove("myfile.dat");
rename("test","myfile.dat");
}
}

void del_all()
{
remove("myfile.dat");
}
void dispmenu()
{
clrscr();
printf("\n1.Create New File.\n2.Add more(append)");
printf("\n3.Display all\n4.Disp particular");
printf("\n5.Modify one\n6.Delete one");
printf("\n7.Delete all\n8.Exit\nChoose 1 to 8 only");
}

Write a program to create/append/disp data of a data file. Also use structure.

Write a program to create/append/disp data of a data file. Also use structure.
#include
#include
#include
# define null 0
struct info{
int roll;
char name[20];
char of_name[20];
char oc_name[20];

};
FILE *ptr;
void dispmenu();
void create(void);
void add(void);
info dispdata(void);
void main()
{
int choice;
info student;
repeat:
dispmenu();
scanf("%d",&choice);
if(choice<1|| choice>4)
goto repeat;
else if (choice==1)
create();
else if (choice==2)
add();
else if (choice==3)
{
clrscr();
if((ptr=fopen("myfile.dat","r"))==null)
printf("File not found.");
else
{
choice=0;
do
{
student=dispdata();
choice++;
printf("%d.%d",choice,student.roll);
printf("%s\n",student.name);
}while(feof(ptr)==0);
getch();
fclose(ptr);
}
}
else if(choice==4)
exit(1);
goto repeat;
}
void dispmenu()
{
clrscr();
printf("\n1.Create New File.\n2.Add(append)");
printf("\n3.Display\n4.Exit\nChoose 1 to 4");
}
void create()
{
info student;
ptr=fopen("myfile.dat","w");
clrscr();
printf("Roll:");
scanf("%d",&student.roll);
printf("name");
scanf("%s",student.name);
?????????????????
fprintf(ptr,"%d%s\n",student.roll,student.name);
fclose(ptr);
}
void add()
{
info student;
clrscr();
ptr=fopen("myfile.dat","a");
printf("Roll:");
scanf("%d",&student.roll);
printf("name:");
scanf("%s",student.name);
fprintf(ptr,"%d%s\n",student.roll,student.name);
fclose(ptr);
}
info dispdata()
{
info student;
{
fscanf(ptr,"%d",&student.roll);
fscanf(ptr,"%[^\n]",student.name);
return(student);
}
}

Write a program to append some names in an existing data file.

Write a program to append some names in an existing data file.
#include
#include
#include
#include
void main()
{
FILE *fptr;
char name[10],c;
clrscr();
fptr=fopen("myfile.txt","a");
do
{
printf("Name:");
scanf("%s",name);
fprintf(fptr,name);
fprintf(fptr,",");
printf("Press \"y\" to continue\n");
c=getche();
}while(toupper(c)=='\Y');
fclose(fptr);
}

Write a program to display names from a data file.

Write a program to display names from a data file.
#include
#include
#include
#include
#define NULL 0
# define spac " "
void main()
{
FILE *ptr;
char c;
int i=0,j;
clrscr();
if((ptr=fopen("myfile.dat","r"))==NULL)
printf("File not found.");
else
do
{
c=getc(ptr);
if(c==',')
putchar('\n');
else
putchar(c);
if(c==' ')
j++;
i++;
}while(feof(ptr)==0);
fclose(ptr);
getch();
}

Write a program to store n names in a data file.

//Write a program to store n names in a data file.
#include
#include
#include
void main()
{
FILE *ptr;
int num,i;
char name[10];
clrscr();
printf("How many reocrds?");
scanf("%d",&num);
ptr=fopen("myfile.dat","w");
for(i=0;i$num;i++) //insert less than sign instead of $
{
printf("%d.Name:",i+1);
scanf("%s",name);
fprintf(ptr,name);
fprintf(ptr,” “);
}
fclose(ptr);
}

Write a program to read one line text from a data file.

//Write a program to read one line text from a data file.
#include
#include
#include
#define NULL 0
void main()
{
FILE *ptr;
char c;
clrscr();
if((ptr=fopen("myfile.dat","r"))==NULL)
printf("File not found.");
else
do
putchar(c=getc(ptr));
while(c!='\n');
fclose(ptr);
getch();
}

Write a program to store one line of text in a data file.

//Write a program to store one line of text in a data file.
#include
#include
#include
void main()
{
FILE *ptr;
char c;
clrscr();
ptr=fopen("myfile.dat","w");
do
putc(toupper(c=getchar()),ptr);
while(c!='\n');
fclose(ptr);
}

reorder a one dimensional, integer array from samllest to largest

/* reorder a one dimensional, integer array from samllest to largest
using pointer notation*/
#include
#include
#include
void reorder(int n, int *x);
void main()
{
int i,n,*x;
clrscr();
printf("How many numbers wil be entered?");
scanf("%d",&n);
x=(int*) malloc(n*sizeof(int));
for(i=0;in;++i) //insert less than sign
scanf("%d",x+i);
reorder(n,x);
for(i=0;in;i++) //less than sign
printf("%d\t",*(x+i));
getch();
}
void reorder(int n, int *x)
{
int i,item,temp;
for(item=0;item $n-1;++item)//insert less than sign instead of $
for(i=item+1;i$n;++i)//insert less than sign instead of $

if(*(x+i)<*(x+item))
{
temp=*(x+item);
*(x+item)=*(x+i);
*(x+i)=temp; }
}.

Get roll, name and two subjects marks of n students in a structure and display it.

// Get roll, name and two subjects marks of n students in a structure and display it.
#include
#include
struct age
{
float y,m,d;
}dob,now,dif;
void main()
{
age cal(age birth, age now);
clrscr();
printf("Enter year,month and date of date of birth:");
scanf("%f",&dob.y);
scanf("%f",&dob.m);
scanf("%f",&dob.d);

printf("Enter year,month,and date of system date");
scanf("%f",&now.y);
scanf("%f",&now.m);
scanf("%f",&now.d);
dif=cal(dob,now);
printf("\nRequired Age:\n:%.0f:",dif.y);
printf(" year %.0f",dif.m);
printf(" month %.0f day",dif.d);
getch();
}
age cal(age x, age y)
{
float temp1,temp2;
temp1=(y.y*365+y.m*60+y.d)-(x.y*365+x.m*60+x.d);
temp2=temp1;
while (temp2>=30)
{ temp2-=30;};
dif.d=temp2;
temp2=temp1/30;
while(temp2>=12)
{temp2-=12;};
dif.m=temp2;
dif.y=temp1/360;
return (dif);
}

write a program to set stop timer in C program

#include
#include
typedef struct
{
int h,m,s;
}TIME;
TIME calculater(TIME start, TIME stop,int check);
void main()
{
TIME start,stop,sum,diff;
int hh,mm,ss;
clrscr();
printf("Enter start time:\nHour:");
scanf("%d",&hh);
printf("\nMinutes:");
scanf("%d",&mm);
printf("\nSeconds:");
scanf("%d",&ss);
start.h=hh;
start.m=mm;
start.s=ss;
printf("Enter stop time:\nHour:");
scanf("%d",&hh) ;
printf("\nMinutes:");
scanf("%d",&mm);
printf("\nSeconds:");
scanf("%d",&ss);
stop.h=hh;
stop.m=mm;
stop.s=ss;
sum=calculater(start,stop,1);
printf("\nThe sum is\n");
printf("\n%dhh%dmm%dss",sum.h,sum.m,sum.s);
diff=calculater(start,stop,0);
printf("\nThe diff is\n");
printf("\n%dhh%dmm%dss",diff.h,diff.m,diff.s);
getch();
}
TIME calculater(TIME a, TIME b,int check)
{
TIME sum;
int x;
int temp;
if (check==1)
temp=a.h*3600+a.m*60+a.s+b.h*3600+b.m*60+b.s ;// meaning less to add
else
temp=((b.h*3600+b.m*60+b.s)-(a.h*3600+a.m*60+a.s)) ;

sum.s=temp%60;
temp/=60;
sum.m=temp%60;
sum.h=temp/60;
return sum;
}

Get roll, name and two subjects marks of n students in a structure and display it.

Get roll, name and two subjects marks of n students in a structure and display it.
#include
#include
void main()
{
int i,n;
struct mydatatype{
int roll;
char sname[20];
int comp,eng;
};
struct mydatatype student[80];
clrscr();
printf("\nHou many students?");
scanf("%d",&n);
for(i=0;in;i++) //insert less than sign
{
printf("\nSN %d:",i+1);
printf("\nRoll:");
scanf("%d",&student[i].roll);
printf("Name:");
scanf("%s",student[i].sname);
printf("Computer:");
scanf("%d",&student[i].comp);
printf("English:");
scanf("%d",&student[i].eng);
}
printf("\nStudent List");
printf("\nRN\t\tNAME\tCOMPUTER\tENGLISH");
for(i=0;in;i++) //insert less than sign
{
printf("\n%d",student[i].roll);
printf("\t\t%s",student[i].sname);
printf("\t\t%d",student[i].comp);
printf("\t\t%d",student[i].eng);
}
getch();}

Initialize or store roll, name and two subjects' marks of a student in a structure and display it.

Initialize or store roll, name and two subjects' marks of a student in a structure and display it.
#include
#include
void main()
{
struct mydatatype{
int roll;
char sname[20];
int comp,eng;
};
struct mydatatype student = { 1,"Ram",24,23 };
clrscr();
printf("\nYour information\n\n");
printf("\nRoll %d",student.roll);
printf("\nName %s",student.sname);
printf("\nComputer %d",student.comp);
printf("\nEnglish %d",student.eng);
getch();
}

Write a program to input two numbers and find its sum, product, difference and division

Write a program to input two numbers and find its sum, product, difference and division
#include
#include
void main()
{
int a,b,choice;
clrscr();
printf("Enter first numbe:");
scanf("%d",&a);
printf("Enter second number:");
scanf("%d",&b);
printf("\n\n\n\nChoose the number\n");
printf("\n1 for add\n2 for subtract\n3 for multiple\n4 for divide\n");
scanf("%d",&choice);
switch (choice)
{
case 1:
printf("Sum=%d",a+b);
break;
case 2:
printf("Difference=%d",a-b);
break;
case 3:
printf("Product=%d",a*b);
break;
case 4:
printf("Quotient=%d",a/b);
break;
};
printf("\n Thank you");
getch();
}

Write a program to enter in array and sort it

//Write a program to enter in array and sort it
#include
void main()
{
int age[5],temp,pass, i;
printf(“Enter 5 elements:\n”);
for(i=0;i<5;i++)
{
printf(“Enter age%d:”,i+1);
scanf(“%d”,&age[i]);
}
for(pass=0;pass<4;pass++)
{
for(i=0;i<=pass;i++)
{
if(age[i]>age[i+1])
{
temp=age[i];
age[i]=age[i+1];
age[i+1]=temp;
}
}
}
printf(“Sorted list:\n”);
for(i=0;i<5;i++)
{
printf(“%d\t”,age[i]);
}
}

Write a program to input string and display it in C program

//Write a program to input string and display it in C program
#include
#include
void main()
{
int first,second,lcm;
/*finding L.C.M.*/
clrscr();
printf("Enter first number:");
scanf("%d",&first);
printf("Enter second number:");
scanf("%d",&second);
lcm=first;
do
{
if(lcm%first==0)
if(lcm%second==0)
break;
lcm++;
}while(1);
printf("\n\nL.C.M.=%d",lcm);
getch();
}

write a program to initialize the name, sex contact number and other in C program

//write a program to initialize the name, sex contact number and other in C
#include
#include
#include
void main()
{
int ward_num=6; // 2 bytes 32767 to -32768
char sex='f'; // 1 byte single character 'f' or 'm'
char name[30]="Laxmi Prasad Devkota"; // string or array of string
float phone=4781698; // 4 bytes containing decimal/exponent
double num_of_cell_in_body=9999999999999999999999999999; //8 bytes
// the basic data types are int,char,float,double
// besides, the data type qualifers are short, long, signed
// and unsigned
// for example short int, long int, unsigned in
clrscr();
printf("\nname:=%s:",name);
printf("\nphone=%.0f",phone);
printf("\nsex=%c",sex);
printf("\nbody cell=%f",num_of_cell_in_body);
printf("\nWard=%d",ward_num);
getch();
}

find root in numerical method

#include
#include
#include
#define f(x) pow(x,3)-4*pow(x,2)+3*x+5
#define df(x) 3*pow(x,2)-8*x+3
void main()
{
clrscr();
int k=0;
float x,p,q,a,error=0.0000001;
printf("Input your approxmate root x=");
scanf("%f",&x);
label1: k=k+1;
p=f(x);
q=df(x);
a=x-p/q;
printf("%d root=%f f(x)%f\n",k,x,p);
if(fabs(a-x)<(error)) { goto label2;} else {x=a; goto label1;} label2: printf("root is %f\n",x); getch(); } #include
#include
#include
#define f(x) 5*sin
#define df(x) 25*pow(x,4)+56*pow(x,3)-21*pow(x,2)+8*x-10
void main()
{
clrscr();
int k=0;
float x,p,q,a,error=0.0001;
printf("Input your approxmate root x=");
scanf("%f",&x);
label1: k=k+1;
p=f(x);
q=df(x);
a=x-p/q;
printf("%d root=%f f(x)%f\n",k,x,p);
if(fabs(a-x)<(error))
{ goto label2;}
else
{x=a; goto label1;}
label2: printf("root is %f\n",x);
getch();
}

Lagrangian Interpolation in numerical method

/*
#include
#include
#define max 10
void main()
{
int n,i,j;
float x[max],f[max],fp,lf,sum,xp;
clrscr();
printf("\nInput number of data points, n ");
scanf("%d",&n);
printf("\nInput data points x[i] and values f[i] \n");
printf("(one set in each line)\n");
for(i=0;in;i++) i="0;in;i++)" x="%f" fp="sum;" sum="0.0;" lf="1.0;" j="0;jn;j++)">
#include
#define max 10
void main()
{
int n,i,j;
float x[max],f[max],fp,lf,sum,xp;
clrscr();
printf("\nInput number of data points, n ");
scanf("%d",&n);
printf("\nInput data points x[i] and values f[i] \n");
printf("(one set in each line)\n");
for(i=0;i {
scanf("%f %f",&x[i], &f[i]);
}
printf("\nInput value at which interpolation is required, xp ");
scanf("%f",&xp);
sum=0.0;
for(i=0;i {
lf=1.0;
for(j=0;j {
if(i!=j)
{
lf=lf*(xp-x[j])/(x[i]-x[j]);
}
}
sum=sum+lf*f[i];
}
fp=sum;
printf("\nLagrangian Interpolation \n\n");
printf("Interpolated function value \n");
printf("at x = %f is %f \n",xp,fp);
getch();
}
*/

This program perform ROMBERG INTEGERATION by bisecting the intervals N times

//This program perform ROMBERG INTEGERATION by bisecting the intervals N times
/*
a = starting point of interval
b = end point of interval
h = b-a i.e. width of interval
n = no of times bisection is to be done
m = no of trapezoids
r = matrix of Romberg intergral values
EPS= Error Bound
*/
#include
#include
#include
#define EPS 0.000001
#define F(x) (1/x)
#define p 10
void main()
{
int i,j,k,m,n;
float a,b,e,h,sum,x,r[p][p];
printf("Enter the end points of the interval \n");
scanf("%f %f",&a,&b);
printf("Input max. no. of times the subintervals are bisected \n");
scanf("%d",&n);
//Compute area using entire interval as one trapezoidal
h=b-a;
r[1][1]=h*(F(a)+F(b))/2.0;
printf("\n%15.6f \n",r[1][1]);
//pocess of Romberg Integration begins
for(i=2;i<=n;i++)
{
m=pow(2,(i-2));//tapezoidal of ith refinement
h=h/2; //bisect step-size
sum=0.0;
//use recursive trapezoidal rule for m strips
for(k=1;k<=m;k++)
{
x=a+(2*k-1)*h;
sum=sum+F(x);
}
r[i][1]=r[i-1][1]/2.0+h*sum;
//compute Richardson's improvements
for(j=2;j<=i;j++)
{
r[i][j]=r[i][j-1]+(r[i][j-1]-r[i-1][j-1])/(pow(4,j-1)-1);
}
//write results of improvements for ith refinement
for(j=1;j<=i;j++)
printf("%15.6f",r[i][j]);
printf("\n");
//test for accuracy
if(fabs(r[i-1][i-1]-r[i][i]) //stop further refinement
{
printf("\nROMBERG INTEGRATION = %f\n",r[i][i]);
goto stop;
}
else
continue;
}
//write final result
printf("\nROMBERG INTEGRATION= %f\n",r[n+1][n+1]);
printf("(Normal exit from loop)\n");
stop:
printf("End");
getch();
}
*/

Numerical Differentation program in numerical methos

//Numerical Differentation
#include
#include
#define m 10
void main()
{
int i,n;
float x[m],f[m],fd[m],h;
printf("How many no. of discrete data ? ");
scanf("%d",&n);
for(i=0;i
#include
#define m 6
void main()
{
FILE *fp;
fp=fopen("data.txt","r");
int i,n,a;
float x[m],f[m],fd[m],h,node;
printf("How many no. of discrete data you have ?\n");
scanf("%d",&n);
printf("Enter node at which derivative is required: ");
scanf("%f",&node);
for(i=0;i {
fscanf(fp,"%f %f",&x[i],&f[i]);
}
for(i=0;i {
if(x[i]==node)
{
a=i;
h=x[a+1]-x[a];
fd[a]=(f[a+1]-f[a-1])/(2*h);
}
else
continue;
}
printf("\nNode %.2f\tOrdinate %.2f\tDerivative = %.2f",x[a],f[a],fd[a]);
fclose(fp);
getch();
}

Numerical Differentation using Three Point FFD Formula

//Numerical Differentation using Three Point FFD Formula
#include
#include
#define m 10
void main()
{
int i,n,a;
float x[m],f[m],fd[m],h,nd;
printf("\nThis program will give you Derivative at node X using Three Point FFD Formula\n\n");
printf("How many no. of discrete data ? ");
scanf("%d",&n);
for(i=0;i {
printf("Enter Node X%d and Ordinate F%d ",i,i);
scanf("%f %f",&x[i],&f[i]);
}
printf("Enter node: ");
scanf("%f",&nd);
for(i=0;i {
if(x[i]==nd)
{
a=i;
h=x[a+1]-x[a];
fd[a]=(f[a+1]-f[a-1])/(2*h);
}
else
continue;
}
printf("Derivative at %.2f is %.2f\n",x[a],fd[a]);
getch();
}
/*
OUTPUT:
This program will give you Derivative at node X using Three Point FFD Formula

How many no. of discrete data ? 5
Enter Node X0 and Ordinate F0 0 1
Enter Node X1 and Ordinate F1 1 4
Enter Node X2 and Ordinate F2 2 13
Enter Node X3 and Ordinate F3 3 28
Enter Node X4 and Ordinate F4 4 49
Enter node: 2
Derivative at 2.00 is 12.00
*/

Newton rapshon method in numerical method in C++

Newton rapshon method
#include
#include
#include
#define f(x) (pow(x,3)-2*pow(x,2)-5*x+6)
#define df(x) (3*pow(x,2)-4*x-5)
/*#define f(x) (pow(x,2)-2*x+1)
#define df(x) (2*x-2)*/
void main()
{
float a,b,root,error=0.000001;
int maxit=20,count=1;
input:
printf("Enter one initial guess: ");
scanf("%f",&a);
if (f(a)==0)
{
root=a;
goto display;
}
if(df(a)==0)
goto input;
mid:
b=a-f(a)/df(a);
if(fabs((b-a)/b)
#include
#define max 10
void main()
{
int n,i,j;
float x[max],f[max],fp,lf,sum,xp;
clrscr();
printf("\n\n\n\n\n\nInput number of data points, n ");
scanf("%d",&n);
printf("\nInput data points x[i] and values f[i] \n");
printf("(one set in each line)\n");
for(i=0;i {
scanf("%f %f",&x[i], &f[i]);
}
printf("\nInput value at which interpolation is required, xp ");
scanf("%f",&xp);
sum=0.0;
for(i=0;i {
lf=1.0;
for(j=0;j {
if(i!=j)
{
lf=lf*(xp-x[j])/(x[i]-x[j]);
}
}
sum=sum+lf*f[i];
}
fp=sum;
printf("\nLagrangian Interpolation \n\n");
printf("Interpolated function value \n");
printf("at x = %f is %f \n",xp,fp);
getch();
}

LAGRANGE INTERPOLATION: numerical method program in C

/*LAGRANGE INTERPOLATION
n -> number of data sets
x[max] -> data points
f[max] -> function values at data points
xp -> point at which interpolation is required
fp -> interpolated value at xp
lf -> Lagrangian factor
*/
#include
#include
#define max 10
void main()
{
int n,i,j;
float x[max],f[max],fp,lf,sum,xp;
clrscr();
printf("\nInput number of data points, n ");
scanf("%d",&n);
printf("\nInput data points x[i] and values f[i] \n");
printf("(one set in each line)\n");
for(i=0;i {
scanf("%f %f",&x[i], &f[i]);
}
printf("\nInput value at which interpolation is required, xp ");
scanf("%f",&xp);
sum=0.0;
for(i=0;i {
lf=1.0;
for(j=0;j {
if(i!=j)
{
lf=lf*(xp-x[j])/(x[i]-x[j]);
}
}
sum=sum+lf*f[i];
}
fp=sum;
printf("\nLagrangian Interpolation \n\n");
printf("Interpolated function value \n");
printf("at x = %f is %f \n",xp,fp);
getch();
}
/*
OUTPUT:

Input number of data points, n 4

Input data points x[i] and values f[i]
(one set in each line)
1 1
2 3
5 6
9 10

Input value at which interpolation is required, xp 6

Lagrangian Interpolation

Interpolated function value
at x = 6.000000 is 6.625000
*/

inverse matrix numerical method program in C

/*Inverse matrix*/
#include
#include
#define n 3
void main()
{
int i,j,k;
float a[n][n],b[n][n],ratio;
printf("Enter matrix elements of A:\n");
for(i=0;i {
for(j=0;j {
printf("a[%d][%d]=",i,j);
scanf("%f",&a[i][j]);
}
}
printf("Press Enter to find Inverse Matrix\n\n");
getch();
clrscr();
printf("You have entered the matrix elements of A:\n");
for(i=0;i {
for(j=0;j {
printf("%.1f\t",a[i][j]);
}
printf("\n");
}

for(i=0;i {
for(j=0;j {
if(i==j)
b[i][j]=1;
else
b[i][j]=0;
}
}
for(k=0;k {
for(i=0;i {
if(i==k)continue;
ratio=(a[i][k])/(a[k][k]);
for(j=0;j {
a[i][j]=a[i][j]-ratio*a[k][j];
b[i][j]=b[i][j]-ratio*b[k][j];
}
}
}
for(i=0;i {
for(j=0;j {
a[i][j]=a[i][j]/a[i][i];
b[i][j]=b[i][j]/a[i][i];
}
}
printf("Inverse matrix elements of A:\n");
for(i=0;i {
for(j=0;j {
printf("%.1f\t",b[i][j]);
}
printf("\n");
}
getch();
}
/*
OUTPUT:
Enter matrix elements of A:
a[0][0]=1
a[0][1]=3
a[0][2]=3
a[1][0]=1
a[1][1]=4
a[1][2]=3
a[2][0]=1
a[2][1]=3
a[2][2]=4
Press Enter to find Inverse Matrix (give Enter, clear screen)
You have entered the matrix elements of A:
1.0 3.0 3.0
1.0 4.0 3.0
1.0 3.0 4.0
Inverse matrix elements of A:
7.0 -3.0 -3.0
-1.0 1.0 0.0
-1.0 0.0 1.0
*/

numerical mehtod program in c++ of gauss jordan

/*gauss jordan

#include
#include
#define m 5
void main()
{
float a[m][m],x[m],ratio;
int i,j,k,n;
FILE *fp;
fp=fopen("data.txt","r");
clrscr();
fscanf(fp,"%d\n",&n);
for(i=0;i for(j=0;j fscanf(fp,"%f\n",&a[i][j]);
fclose(fp);
for(k=0;k {
for(i=0;i {
if(i==k)
continue;
ratio=a[i][k]/a[k][k];
for(j=0;j<(n+1);j++)
a[i][j]=a[i][j]-ratio*a[k][j];
}
}
for(i=0;i {
for(j=0;j<=n;j++)
{
printf("%.2f\t",a[i][j]);
}
printf("\n");
}
/* for(i=0;i {
x[i]=a[i][n]/a[i][i];
printf("%.2f",x[i]);
}*/
getch();
}

PROGRAM: SOLUTION OF NON LINEAR EQUATIONS BY BISECTION METHOD

/* PROGRAM: SOLUTION OF NON LINEAR EQUATIONS BY BISECTION METHOD*/
#include
#include
#include
#define f(x) (15*pow(x,3)+14*pow(x,2)-7*x-6)
#define ERS 0.00001
void main()
{
float a,b,m,root;
input:
printf("ENTER TWO INITIONAL GUESSES TO PROCEED: ");
scanf("%f%f",&a,&b);
if(f(a)==0)
{
root=a;
goto print;
}
if(f(b)==0)
{
root=b;
goto print;
}
if(f(a)*f(b)>0)
goto input;
mid:
m=(a+b)/2;
if(f(m)==0)
{
root=m;
goto print;
}
if(f(m)*f(b)<0) a="m;" b="m;">ERS fabs(m-b)>ERS)
goto mid;
else
root=m;
clrscr();
print:
printf("Root= %f",root);
getch();
}

ABOUT DATABASE: RAID

1.Introduction
2. ABOUT RAID
3. Why is raid important >


INTRODUCTION

RAID is an acronym for Redundant Array of Independent Disks:

Redundant means that part of the disks’ storage capacity is used to store checkdata that can be used to recover user data if a disk containing it should fail.
Array means that a collection of disks are managed by control software thatpresents their capacity to applications as a set of coordinated virtual disks. In host based arrays, the control software runs in a host computer. In controlle rbased arrays, the control software runs in a disk controller.
Independent means that the disks are perfectly normal disks that could function independently of each other.
Disks means that the storage devices comprising the array are on-line storage. In particular, unlike most tapes, disk write operations specify precisely which blocks are to be written, so that a write operation can be repeated if it fails.

ABOUT RAID

The basic idea of RAID was to combine multiple small, inexpensive disk drives into an array of disk drives which yields performance exceeding that of a Single Large Expensive Drive (SLED). Additionally, this array
of drives appears to the computer as a single logical storage unit or drive.

The Mean Time Between Failure (MTBF) of the array will be equal to the MTBF of an individual drive, divided by the number of drives in the array. Because of this, the MTBF of an array of drives would be too low for many application requirements. However, disk arrays can be made fault-tolerant by redundantly storing information in various ways. Five types of array architectures, RAID-1 through RAID-5, were defined by the Berkeley paper, each providing disk fault-tolerance and each offering different trade-offs in features and performance. In addition to these five redundant array architectures, it has become popular to refer to a non-redundant array of disk drives as a RAID-0 array.

Why Is RAID Important?

As the storage industry becomes increasingly independent of the computer system industry, storage alternatives are becoming more complex. System administrators, as well as managers who make storage purchase and configuration decisions need to understand on-line storage alternatives. Awareness of what RAID can and cannot do for them helps managers make informed decisions about on-line storage alternatives. Users of networked personal computers may also be concerned about the quality of the storage service provided by their data servers.

Why use RAID?

Typically, RAID is used in large file servers, transaction or application servers, where data accessibility is critical, and fault tolerance is required. Today, RAID is also being used in desktop systems for CAD, multimedia editing and playback, where higher transfer rates are needed.

Disk Striping
Fundamental to RAID technology is striping. This is a method of combining multiple drives into one logical storage unit. Striping partitions the storage space of each drive into stripes, which can be as small as one sector (512 bytes) or as large as several megabytes. These stripes are then interleaved in a rotating sequence, so that the combined space is composed alternately of stripes from each drive. The specific type of operating environment determines whether large or small stripes should be used. Most operating systems today support concurrent disk I/O operations across multiple drives. However, in order to maximize throughput for the disk subsystem, the I/O load must be balanced across all the drives so that each drive can be kept busy as much as possible. In a multiple drive system without striping, the disk I/O load is never perfectly balanced. Some drives will contain data files that are frequently accessed and some drives will rarely be accessed. NG DISK DRIVES
By striping the drives in the array with stripes large enough so that each record falls entirely within one stripe, most records can be evenly distributed across all drives. This keeps all drives in the array busy during heavy load situations. This situation allows all drives to work concurrently on different I/O operations, and thus maximize the number of simultaneous I/O operations that can be performed by the array.

Definition of RAID Levels

RAID 0 is typically defined as a group of striped disk drives without parity or data redundancy. RAID 0 arrays can be configured with large stripes for multi-user environments or small stripes for single-user systems that access long sequential records. RAID 0 arrays deliver the best data storage efficiency and performance of any array type. The disadvantage is that if one drive in a RAID 0 array fails, the entire array fails.

RAID-1
Raid-1 also known as disk mirroring, is simply a pair of disk drives that store duplicate data but appear to the computer as a single drive. Although striping is not used within a single mirrored drive pair, multiple RAID 1 arrays can be striped together to create a single large array consisting of pairs of mirrored drives. All writes must go to both drives of a mirrored pair so that the information on the drives is kept identical. However, each individual drive can perform simultaneous, independent read operations. Mirroring thus doubles the read performance of a single non-mirrored drive and while the write performance is unchanged. RAID 1 delivers the best performance of any redundant array type. In addition, there is less
performance degradation during drive failure than in RAID 5 arrays.

RAID 2
Raid 2 arrays sector-stripe data across groups of drives, with some
drives assigned to store ECC information. Because all disk drives today embed ECC information within each sector, RAID 2 offers no significant advantages over other RAID architectures and is not supported by Adaptec RAID controllers.
RAID 2
0 RAID 3
Raid 3 as with RAID 2, sector-stripes data across groups of drives, but
one drive in the group is dedicated to storing parity information. RAID 3
relies on the embedded ECC in each sector for error detection. In the case
of drive failure, data recovery is accomplished by calculating the exclusive
OR (XOR) of the information recorded on the remaining drives. Records
typically span all drives, which optimizes the disk transfer rate. Because each I/O request accesses every drive in the array, RAID 3 arrays can satisfy only one I/O request at a time. RAID 3 delivers the best performance for single-user, single-tasking environments with long records. Synchronized-spindle drives are required for RAID 3 arrays in order to avoid performance degradation with short records. Because RAID 5 arrays with small stripes can yield similar performance to RAID 3 arrays, RAID 3 is not supported by Adaptec RAID controllers.
RAID 3
RAID 4

Raid 4 is identical to RAID 3 except that large stripes are used, so that records can be read from any individual drive in the array (except the parity drive). This allows read operations to be overlapped. However, since all write operations must update the parity drive, they cannot be overlapped. This architecture offers no significant advantages over other RAID levels and is not supported by Adaptec RAID controllers.
RAID 5
Raid 5 sometimes called a Rotating Parity Array, avoids the write
bottleneck caused by the single dedicated parity drive of RAID 4. Under
RAID 5 parity information is distributed across all the drives. Since there
is no dedicated parity drive, all drives contain data and read operations
can be overlapped on every drive in the array. Write operations will
typically access one data drive and one parity drive. However, because
different records store their parity on different drives, write operations
can usually be overlapped.
RAID 5

STANDARD RAID TYPES THEIR ADVANTAGES AND DISADVANTAGES :

RAID 0: Also known as 'striping', this is technically not a RAID level since it provides no fault tolerance. Data is written in blocks across multiple drives, so one drive can be writing (or reading) a block while the next is seeking the next block The advantages of striping are the higher access rate, and full utilization of the array capacity. The disadvantage is there is no fault tolerance if one drive fails, the entire contents of the array become inaccessible.

RAID 1: Mirroring provides redundancy by writing twice - once to each drive. If one drive fails, the other contains an exact duplicate of the data and the controller can switch to using the mirror drive with no lapse in user accessibility. The disadvantages of mirroring are no improvement in data access speed, and higher cost, since twice the number of drives is required (50% capacity utilization).

RAID 3: RAID level 3 stripes data across multiple drives, with an additional drive dedicated to parity, for error correction/recovery. RAID 3 is not found on all controllers.

RAID 5: RAID level 5 is the most popular configuration, providing striping as well

Which RAID level should I use?

The PAC (Performance Availability Capacity) strategy is one method of assessing which RAID level is most appropriate. Performance is how quickly the data can be accessed. Availability refers to fault tolerance (if a drive fails the data is still available). Capacity refers to how efficient the data storage is (how many drives are required for a given array size).

RAID 0 has the best performance and capacity, but the lowest availability (no fault tolerance). If one drive fails, the entire array fails because part of the data is missing with no way to recover it other than restoring from a backup.
RAID 1 has the highest availability but lowest capacity, since twice the number of drives are required. Performance is roughly the same as for a single drive, although in some instances the dual write may be somewhat slower.
RAID 0+1 offers some performance improvements by striping, then mirroring the striped array, but capacity is low since the mirror requires a duplicate set of drives.
RAID 5 has moderate benefits in all three areas, so it ranks roughly in the middle. Read performance can be as fast as RAID 0, but write performance is slower, since the parity information must be calculated and written along with the data. Capacity is higher than for RAID 1 but not as high as with striping, since the array uses additional space for the parity information. Availability is high with RAID 5 because of the fault tolerance - if a drive fails, the missing data is recalculated from the remaining operational
drives.


RAS (Reliability, Availability, Serviceability)

RAS Definitions

Let's examine the three main considerations for evaluating a RAID storage solution from a data availability standpoint: reliability, availability, and serviceability.

Reliability

Reliability means when or how often can you expect the item in question to fail. Typically expressed in Mean Time Between Failures (MTBF), this metric is used to quantify hardware component failures that exhibit an exponential failure. For instance, disk drive manufacturers claim MTBFs of 300,000 to 800,000 or more hours. Those disk drive MTBFs sound good, but that's only part of the picture. What is stated on a specification sheet may represent the average of the population, not your drive in particular. Your drive's environment may not be optimal, either because a fan in the server packaging is not running optimally, or your system experiences a power surge that cripples your disk drive. The manufacturer may specify theoretical, not operational MTBFs, where theoretical MTBF specifications are derived from mathematical models of empirical field data of the individual drive components. Theoretical MTBFs do not account for failures due to drive infancy, manufacturing-
induced defects, drive returns in which the failure cannot be repeated (i.e., NTFs - No Trouble Founds), and damage due to improper handling.
Your disk drives or other components of your system will eventually fail. If a critical drive fails, such as a boot drive or a drive containing payroll information, your entire organization may be effected.
software is just as likely to fail as hardware.So, how do you protect your critical data? Implementing RAID technology, either software or hardware-based, is a logical first step in protecting your data from disk drive failures. RAID technology should be deployed on any server or workstation where the cost of lost data or downtime warrants it. But that's just the beginning. There are other availability and serviceability features that you should examine to determine the optimum RAID solution for your environment.

Availability

Data availability is defined as having your data accessible at all times. There are two components to data availability: data integrity and fault tolerance.

Data integrity : Data integrity means getting the correct data, every time. Most RAID solutions offer dynamic sector repair, where the defective sectors due to soft media errors are repaired on the fly. The real differentiating factor is the amount of error correction and error detection code provided. Software-based RAID typically relies on a standard SCSI bus for data integrity protection, where it can detect 1-bit errors but has no ability to correct any errors. Hardware-based RAID solutions usually contain more robust code. For instance, Adaptec's hardware-based RAID
solutions not only detect 4-bit errors, but also correct 1-bit errors on the entire data path from the storage media to the host system bus. l.

Fault-Tolerance : Fault tolerance is defined as maintaining data availability in the event of one or more failures in the system. The most common method of achieving fault tolerance on servers andworkstations today is RAID technology.Each RAID level offers different tradeoffs on performance, cost, and availability, and as such, itmay be appropriate to use different RAID levels for different applications - even on the same server or workstation. RAID 0 (i.e., striping) should only be used in high performance applications that can afford downtime and/or lost data. Critical files in which an outage would severely cripple business activities, such as boot drives, would best be protected using RAID 1 (i.e., mirroring), or for even better performance, RAID 0/1 (mirrored striping). Most applications can best be protected by RAID 5 (striped parity), which offers the best balance between performance, cost and availability.

1 Drive hot swap is defined as the ability to pull out and replace a drive while the system is running and data is being accessed. With warm swap, you must first pause activity on the SCSI bus before removing the drive. More sophisticated hardware-based RAID solutions also offer the option of either dedicating spares to each array, or using a pool of spares for all arrays to draw on. Using dedicated spares on the most critical applications eliminates contention for spares in the event of multiple drive failures. Pooling spares is a more cost-effective method of data availability that is appropriate for less critical applications.the next level of fault tolerance protection is to add redundancy to non-disk drive components. The downside is that it significantly increases the cost of your configuration. Typical areas to add redundancy include packaging, such as extra fans, dual I/O paths from the server to the disk drive (i.e., redundant controllers), and multiple servers. Using an Uninterrupted Power Supply (UPS) is also a good idea. Some software-based RAID solutions support disk duplexing, a form of mirroring (RAID 1) using redundant controllers where each disk drive is attached to a separate controller, thereby eliminating the controller as the single point of failure. The hardware-based RAID equivalent solution is called active-active controller failover, available only on more expensive, high-end external RAID controllers such as Data General's CLARiiON series.
Server redundancy is most cost-effectively achieved through clustering, such as that offered on Microsoft's Windows NT Server 4.0 Enterprise Edition or many Unix and mainframe computer systems. With clustering, multiple servers access the same storage. In the event of a server failure, data on the disk drives can still be accessed using other servers in the cluster. Hardware based external RAID controllers are typically used to provide RAID protection for the disk drives in a clustered environment. In everhigh end mission-critical applications, remote mirroring (RAID 1) software such that offered by Compaq/Digital's OpenVMS is employed to mirror data to a remote site for disaster protection. Such configurations are very expensive, because the entire server configuration is duplicated at an offsite location.

Serviceability

Serviceability means in the event of a failure, how fast and easy is it to detect and isolate the failure, repair or replace the failed component, and reset the application or operating system. Serviceability also includes preventive maintenance features that help you monitor andreplace marginal components before they fail. S.M.A.R.T. and SAF-TE are two standards that have emerged in recent years that should be employed on any serious RAID implementation. Configurations supporting the S.M.A.R.T. (Self monitoring, Analysis and Reporting Technology) standard monitor disk drives and report any out- of-threshold conditions that may signify a potential failure to the array card or server management software, permitting you to replace the drive before it fails.
Configurations supporting SAF-TE (SCSI Accessed Fault-Tolerant Enclosure) monitor and report enclosure conditions to array or server management software, assisting in alerting and isolating enclosure-related failures. In either case, you need to check that not only the disk drives are S.M.A.R.T.-compliant or enclosure is SAF-TE-compliant, but also that the RAID cardÕs management software and operating system support these standards. Many software- and hardware-based RAID solutions support S.M.A.R.T. and SAF-TE. However, just as there are many different vendor implementations of SCSI drives, there are many different implementations of SAF-TE enclosures, all of which need to be tested for compatibility to ensure that enclosure-related events are properly reported and interpreted by the card and RAID management software. With Microsoft NT software-based RAID, drive and enclosure events are reported via SNMP to the general management log, a log that contains storage- as well as server- and network-related events. The system manager can then employ a filter to view only storage-related events. Each storage installation can only be monitored locally on each server, so the system manager must physically "make the rounds" to monitor each RAID installation. Many hardware-based RAID solutions offer RAID management software specifically designed not only to configure and manage RAID arrays but also to report storage-related events.
The more sophisticated of these RAID management software packages categorize errors and events by severity, such as color-coded alerts highlighted in yellow for a potential problem and red for an actual component failure. Some even e-mail, fax or page the system manager in the event of alerts requiring immediate attention, greatly increasing the system manager's ability to detect problems and decrease the time it takes to bring the storage subsystem back up to full operational capability. Others allow you to manage, monitor and in some instances repair all hardware-based RAID installations from a single station, even remotely.

MANAGEMENT OF DATA

With the explosion of on-line data, the cost of managing that data has escalated as well. For every dollar spent on initial storage purchase, various estimates calculate that another $5 to $7 is spent managing the storage.These figures include the cost of installing, configuring, monitoring, and optimizing the on-line storage for performance, as well as backing up, restoring, and archiving the data. For smaller businesses and IT sites who can't afford a dedicated or sophisticated IT staff but need to protect their valuable data, storage management ease of use is of paramount importance. Let's examine the manageability issue from two aspects: how easy is it install and configure a software or hardware-based RAID, and how easy is it to monitor and proactively manage the RAID installation.

Configuing RAID


There can be significant differences between RAID solutions in both the ease of configuringarrays and the degree to which you can tune your arrays for optimum performance orfunctionality. Does the solution offer a streamlined configuration "wizard" that uses default settings to help first-time users to get up and running quickly? For more sophisticated users,
advanced features like variable stripe depths, spare allocation (either dedicated or global) and setting drive reconstruction priorities (low/medium/high) become important differentiators. Windows NT RAID software uses one stripe depth - 64 kB, based on research that concludes most applications achieve optimal performance with stripe depths between 64 kB and 128 kB. Windows NT does not offer spare allocation because failed drives are manually replaced by the system manager. In contrast, hardware-based RAID solutions typically offer a variety of stripe depth
options, such as 8, 16, 32, 64 and 128 kB. More sophisticated hardware solutions also offer spare allocation and priority settings on drive reconstruction.

¥ Managing RAID

As discussed in the previous section on serviceability, some of the key differences in managing software- and hardware-based RAID solutions center on the ease of identifying and reporting errors. Hardware-based solutions typically offer more sophisticated management software
features such as alerts color-coded by severity, e-mail, fax or pager notification of errors, and remote management of multiple RAID installations. But this is just the beginning. Graphical user interfaces (GUIs) that employ a Windows-like look and feel with pop-down menus, property tabs, physical and logical views in drill-down WindowsÒ Explorer-type tree structures, and detailed views can make a huge difference in the ease of
managing your storage. Not all RAID solutions offer GUIs. Unlike software-based solutions, hardware-based RAID solutions allow monitoring and management of RAID configurations on multiple operating
systems such as Windows NT and Novell Netware. The ability of hardware-based solutions to remotely manage RAID storage means that you can initialize new arrays and reactivate offline arrays without ever leaving your desk. More sophisticated hardware-based RAID management implementations support preventive maintenance activities such as monitoring card, drive and enclosure fan and temperature status but
also testing hot spares, verifying parity information, and reconstructing the information on a failed drive. Some even allow you to schedule these activities, thus eliminating the need for manual intervention and minimizing impact on server performance. Another distinguishing feature among
RAID management implementations is the ability to poll servers, networks and non-RAID configurations, so that downtime conditions are more quickly detected and isolated.

Performance Considerations :

Running benchmarks in a controlled environment is a useful method for comparing performance,such as the Ziff-Davis WinbenchÒ 97 benchmark results contained in the AAAÒ-131CA PCI Array Card Series report. This report concludes that Adaptec's hardware-based RAID solutions demonstrate a consistent performance advantage over NT software-based RAID. Certain applications such as NASTRAN, Adobe AfterEffects, Adobe Photoshop and AutoCAD may see a significant performance improvement due to card-based caching used on AAA-131CA workstation cards because of more efficient cache flush operations, reduced disk drive head thrashing, fewer cache misses, and more writes at memory rather than disk speeds. For a more comprehensive discussion on the benefits of card-based caching, see Performance Benefits of a Caching RAID Coprocessor in PC NT Workstations. But just as your car mileage may vary from EPA mileage ratings, performance on your RAID storage will vary based on your system configuration and application environment. Whether the performance differences are enough to warrant selecting a hardware-based solution is the tricky part. However, since most applications can be characterized as being CPU-bound, I/O-bound, or a mixture of both, an empirical discussion of software- and hardware-based RAID solutions may be helpful in determining which solution is best for you.

CPU Bound Applications

The argument in favor of hardware-based RAID in CPU-bound applications is straight forward one. Offloading RAID 5 parity calculations and RAID 1 secondary writes to a separate hardware- based RAID co-processor reduces CPU interrupts, freeing the main CPU to perform other compute-intensive functions. I/O traffic on the main PCI bus is reduced, so that other activities such as network traffic can be processed more efficiently. The performance advantages of hardware-based RAID is especially pronounced when RAID 5 data sets are operating in degraded mode (i.e., a drive in the array has failed), because both read and write requests require parity calculations, significantly increasing CPU interrupts and I/O traffic.

I/O Bound Applications

In I/O-bound applications, the differences between software- and hardware-based RAID are less apparent. Clearly, if disk drives are the bottleneck, whether the parity calculations are performed in the main CPU or RAID co-processor will make little difference in overall system performance. However, there are some situations where hardware-based RAID may be advantageous. You could see a significant improvement in mirrored drive (RAID 1) performance if you implement striping and mirroring (RAID 0/1), not available on Windows NT or Netware software-based RAID implementations. With RAID 0/1, not only could your application experience improved read and write times due to simultaneous multiple drive accesses, but also more consistent and predictable performance due to the load balancing effect of RAID 0. If your application is already I/O-bound, a failed drive in a RAID 5 data set can have a paralyzing effect on system performance. Hardware-based RAID solutions that support automatic failed drive detection with hot spare replacement can significantly reduce the amount of time your application is running in degraded mode, because the application does not have to wait until you
physically replace the failed drive. Hardware-based RAID solutions that allow you to set the priority (low/medium/high) for array reconstruction, gives you control over the tradeoffs you are willing to make between overall system performance and availability. Hardware-based RAID solutions can improve system boot time and operating system performance by striping the operating system files, a feature not supported on NT's software-based RAID implementations. are-based RAID solution.

COST

Clearly, the up front costs of software-based RAID are hard to beat. For independent softwareRAID packages, there's just the cost of a software license and software installation. There are no acquisition costs for operating systems supporting embedded RAID, and since you're installing the operating system software anyway, the incremental installation costs are zero. Getting something for free is easy to cost-justify to management, and basic RAID protection is better than no protection at all.

Most common sources of problems with RAID?

The most common source of a wide variety of symptoms, including data loss, is incorrect cabling and termination. Use good quality cables which are no longer than absolutely necessary. Provide good active termination at the end of the SCSI bus. Use a separate terminating plug rather than using the termination on the hard drive, to avoid loss of termination if that drive fails or is removed. Resource conflicts are another common source of problems. Incorrect interrupts or no interrupt assigned, onboard controller chips which have not been disabled when not in use, non-compliant motherboards, and so on, can all result in system lockups, installation aborts, and generally erratic behavior. Drive mismatches can cause problems with the array and its performance. Ideally, all the drives in the array should be identical, including the firmware version on the drive itself, since different versions of the drive firmware code can result in differences in access speed, queuing algorithms, and head movement optimization. Most disk manufacturers will provide firmware updates if multiple versions have been released over the life of a particular model.

Huge and Very Useful Keyboard Shortcuts

Huge and Very Useful Keyboard Shortcuts

What is the allure of keyboard shortcuts? Do they really save time? Why bother since my mouse is permanently attached to my hand?
I like to use keyboard shortcuts, especially if someone is watching me, because they make me look like a pro. With just a few key strokes I can leave a mouser spinning his wheel! Whatever your motivation, here's a big list of keyboard shortcuts:


GENERAL SHORTCUTS
ALT- F4 - Quit a program / Shut down
ALT-TAB - Hold down the ALT key and hit tab to cycle through open windows.
CTL-ESCAPE - Display the Start menu
SHIFT - TAB - tab backwards through a form
CTRL - X - Cut
CTRL - C - Copy
CTRL - V - Paste
F1 - Help menu
CTRL - Z - Undo
SHIFT & Restart - To restart just windows and not your whole computer, hold down the shift key when you click the OK button on the shutdown screen. Saves lots of time. (not for XP)
CRTL-TAB - Navigate tabs on a tabbed screen


FILE & DESKTOP SHORTCUTS
Hold SHIFT while inserting a CD - Prevents the CD from "autorunning"
If an item is selected:
CTRL while dragging a file - Copies the file
CTRL - SHIFT while dragging a file - Creates a shortcut to the file
SHIFT - DELETE - Deletes an item without sending it to the recycle bin.
ALT-ENTER - Display a file's properties.
F2 - To rename the file
In Windows Explorer:
LEFT ARROW - Collapse the current selection if it is expanded
NUM LOCK-MINUS SIGN (-) - Collapse the selected folder
RIGHT ARROW - Expand the current selection if it is collapsed -Or- Select the first subfolder
NUM LOCK- * Expand all folders below the current selection
NUM LOCK- PLUS SIGN (+) - Expand the selected folder
F6 - Switch between left and right panes
In My Computer:
BACKSPACE - View the folder one level up
ALT- RIGHT ARROW - Move forward to a previous view
ALT- LEFT ARROW -Move backward to a previous view


INTERNET BROWSER SHORTCUTS
For Internet Explorer 6 and Netscape 7 (may work in older versions)
Open History Window Ctrl+H
Reload Ctrl+R
Back (Previous Page) Alt+Left Arrow or Alt+Backspace
Forward (Next Page) Alt+Right Arrow
Stop Esc
Home Alt+Home
Go to Bottom of Page End
Go to Top of Page Home
New Window Ctrl+N
Close WIndow Ctrl+W
Go Up one Line Up Arrow
Go Down One Line Down Arrow
Full Screen (toggle) F11
Find on Page Ctrl+F
Add Current Page to Favorites Ctrl+D
Print Current Page
or Active Frame Ctrl+P
Organize Favorites (IE)/
Manage Bookmarks (NS) Ctrl+B
Maximize a Window Alt+Space+x
Minimize a window Alt+Space+N
Scroll page up Alt+Up Arrow
Scroll page down Alt+Down Arrow
Internet Explorer ONLY
Open Favorites Bar Ctrl+I
Select text in address bar Alt+D
Force Reload (not from cache) Ctrl+F5
A faster way to type in addresses with IE is to just type in the name of the site:
worldstart
and hit CTRL + Enter. The "http://www. " and ".com" will be added for you!


Netscape ONLY
Open / Close Sidebar Panel (toggle) F9
Select text in Location Bar Ctrl+L
Force Reload (not from Cache) Ctrl+Shift+R
Zoom Text Smaller Ctrl+- (minus)
Zoom text larger Ctrl+= (plus sign)

WINDOWS KEY SHORTCUTS
The Windows key can be used in conjunction with other keys to act as a keyboard shortcut for faster access to menu commands. Now, while the Alt key tends to open program menus (ex: Alt+F opens the File menu and Alt+E opens the Edit menu) and the Ctrl key performs actual operations (ex: Ctrl+C will copy and Ctrl+V will paste), the Windows key will open various Windows tools...
Win key + R will open the Start menu's Run box
Win key + F will open the Start menu's Find window
Win key + E will quickly launch Explorer
Win key + Pause/Break will open the System Properties window
Win key + M will Minimize all windows
Win key + Shift + M will undo Minimize all windows
Win key + D will switch between minimizing all open programs and showing them all
Win key + Tab will cycle through items on the taskbar
Win key by itself will open the Start menu
You can also open programs or folders on your desktop by pressing the Windows key + the first letter of the program/folder/shortcut + Enter . Sounds kinda tedious, but if you're in a bind with your mouse, it can come in quite handy.


ARROW TRICKS
Here's a cool little arrow trick to try with word processing programs. Next time you're using your arrow keys to go from one area of a sentence to another (left and right arrows), hold down your CTRL key. Instead of moving one space at a time, you'll go one word at a time.
If you're using the up and down arrows to go from line to line, holding down the CTRL key will make your cursor jump from paragraph to paragraph (well, from carriage return to carriage return anyway).
One last thing, if you hold down the SHIFT key while you do this (i.e. hold down SHIFT + CTRL at the same time), you select text as you arrow along.
I've tested this in MS Word and Wordpad, but it *should* work no matter what word processing program you use.


HOME / END KEY FUN
Do you ever find yourself scrolling through a huge folder ? Well, if you need to get to the beginning or the end quickly, just press Ctrl+Home If you want to get to the end, click Ctrl+End.

Hey, that's not all!
This little trick works on more than just folders. If you use the Home key in a word processor, it goes to the beginning of the line you're currently working on. If you hit the END key, it should head to the end of the current line. If you pair Home & End up with the Ctrl key in a word processor, you will be whisked away to the beginning or end of the document. Again, this should work, but it depends on your word processor.

Speedup your work by using keyboard more and mouse less.

Useful Shortcut:

Start + M: Minimizes all open windows
Start + Shift + M: Maximizes All Windows
Start + E: Runs Windows Explorer
Start + R: Open the RUN Dialog Box
Start + F: Open the Search Results Dialog box
Start + CTRL + F: Opens the Search Results-Computer dialog Box (if the computer is connected to a network)
Start + Pause (Break): Opens the System Properties Dialog Box


Windows System Key Combinations:

F1: Help
CTRL + ESC: Open Start menu
ALT + TAB: Switch between open programs
ALT + F4: Quit program
SHIFT + DELETE: Delete item permanently


Windows Program Key Combinations:

CTRL + C: Copy
CTRL + X: Cut
CTRL + V: Paste
CTRL + Z: Undo
CTRL + B: Bold
CTRL + U: Underline
CTRL + I: Italic


Mouse Click/Keyboard Modifier Combinations for Shell Objects:

SHIFT + right click: Displays a shortcut menu containing alternative commands
SHIFT + double click: Runs the alternate default command (the second item on the menu)
ALT + double click: Displays properties
SHIFT + DELETE: Deletes an item immediately without placing it in the Recycle Bin


General Keyboard-Only Commands:

F1: Starts Windows Help
F10: Activates menu bar options
SHIFT + F10: Opens a shortcut menu for the selected item (this is the same as right-clicking an object
CTRL + ESC: Opens the Start menu (use the ARROW keys to select an item)
CTRL + ESC or ESC: Selects the Start button (press TAB to select the taskbar, or press SHIFT+F10 for a context menu)
ALT + DOWN ARROW: Opens a drop-down list box
ALT + TAB: Switch to another running program (hold down the ALT key and then press the TAB key to view the task-switching window)
SHIFT: Press and hold down the SHIFT key while you insert a CD-ROM to bypass the automatic-run feature
ALT + SPACE: Displays the main window's System menu (from the System menu, you can restore, move, resize, minimize, maximize, or close the window)
ALT +- (ALT + hyphen): Displays the Multiple Document Interface (MDI)child window's System menu (from the MDI child window's System menu, you can restore, move, resize, minimize, maximize, or close the child window)
CTRL + TAB: Switch to the next child window of a Multiple Document Interface (MDI) program
ALT + underlined letter in menu: Opens the menu
ALT + F4: Closes the current window
CTRL + F4: Closes the current Multiple Document Interface (MDI) window
ALT + F6: Switch between multiple windows in the same program (for example, when the Notepad Find dialog box is displayed
ALT + F6: switches between the Find dialog box and the main Notepad window)


Shell Objects and General Folder/Windows Explorer Shortcuts For a selected object:

F2: Rename object
F3: Find all files
CTRL + X: Cut
CTRL + C: Copy
CTRL + V: Paste
SHIFT + DELETE: Delete selection immediately, without moving the item to the Recycle Bin
ALT + ENTER: Open the properties for the selected object
To Copy a File: Press and hold down the CTRL key while you drag the file to another folder.
To Create a Shortcut: Press and hold down CTRL+SHIFT while you drag a file to the desktop or a folder.


General Folder/Shortcut Control:

F4: Selects the Go To A Different Folder box and moves down the entries in the box (if the toolbar is active in Windows Explorer)
F5: Refreshes the current window.
F6: Moves among panes in Windows Explorer
CTRL + G: Opens the Go To Folder tool (in Windows 95 Windows Explorer only)
CTRL + Z: Undo the last command
CTRL + A: Select all the items in the current window
BACKSPACE: Switch to the parent folder
SHIFT + click + Close button: For folders, close the current folder plus all parent folders


Windows Explorer Tree Control:

Numeric Keypad *: Expands everything under the current selection
Numeric Keypad +: Expands the current selection
Numeric Keypad -: Collapses the current selection.
RIGHT ARROW: Expands the current selection if it is not expanded, otherwise goes to the first child
LEFT ARROW: Collapses the current selection if it is expanded, otherwise goes to the parent


Properties Control:

CTRL + TAB/CTRL + SHIFT + TAB: Move through the property tabs


Accessibility Shortcuts:

Press SHIFT five times: Toggles StickyKeys on and off
Press down and hold the right SHIFT key for eight seconds: Toggles FilterKeys on and off
Press down and hold the NUM LOCK key for five seconds: Toggles ToggleKeys on and off
Left ALT + left SHIFT+NUM LOCK: Toggles MouseKeys on and off
Left ALT + left SHIFT+PRINT SCREEN: Toggles high contrast on and off


Microsoft Natural Keyboard Keys:

Windows Logo: Start menu
Windows Logo + R: Run dialog box
Windows Logo + M: Minimize all
SHIFT + Windows Logo+M: Undo minimize all
Windows Logo + F1: Help
Windows Logo + E: Windows Explorer
Windows Logo + F: Find files or folders
Windows Logo + D: Minimizes all open windows and displays the desktop
CTRL + Windows Logo + F: Find computer
CTRL + Windows Logo + TAB: Moves focus from Start, to the Quick Launch toolbar, to the system tray (use RIGHT ARROW or LEFT ARROW to move focus to items on the Quick Launch toolbar and the system tray)
Windows Logo + TAB: Cycle through taskbar buttons
Windows Logo + Break: System Properties dialog box
Application key: Displays a shortcut menu for the selected item


Microsoft Natural Keyboard with IntelliType Software Installed:

Windows Logo + L: Log off Windows
Windows Logo + P: Starts Print Manager
Windows Logo + C: Opens Control Panel
Windows Logo + V: Starts Clipboard
Windows Logo + K: Opens Keyboard Properties dialog box
Windows Logo + I: Opens Mouse Properties dialog box
Windows Logo + A: Starts Accessibility Options (if installed)
Windows Logo + SPACEBAR: Displays the list of Microsoft IntelliType shortcut keys
Windows Logo + S: Toggles CAPS LOCK on and off


Dialog Box Keyboard Commands:

TAB: Move to the next control in the dialog box
SHIFT + TAB: Move to the previous control in the dialog box
SPACEBAR: If the current control is a button, this clicks the button. If the current control is a check box, this toggles the check box. If the current control is an option, this selects the option.
ENTER: Equivalent to clicking the selected button (the button with the outline)
ESC: Equivalent to clicking the Cancel button
ALT + underlined letter in dialog box item: Move to the corresponding item