Destroy a session in PHP
< ?php
session_start();
session_destroy();
header("Location: logout.html");
?>
ATM - An alarm to police
Machine; enter your pin number reversed.
So if your number is 1254 mark 4521.
The ATM machine will give you your money, but will automatically recognize this as a plea for help and will alert the police unknown to the thief.
This option is in all ATM machines, but not many people know this.
Please pass this information on to others. No harm in keeping this in mind!!
IIT Roorkee Cognizance-2009
that was amazing moment
and that night is unforgettable to me.
here is that video...
Shortest Job First (SJF)-CPU Scheduling Algo in C
Code goes like that
# include < stdio.h>
# include < conio.h>
struct process
{
int pid ;
int burst ;
int wait ;
};
void main()
{
struct process p[5] , temp ;
int i,j,wait=0 ;
float twait;
clrscr();
for(i=0;i<5;i++)
{
p[i].pid = i+1 ;
printf("\nprocess p%d\n",i+1) ;
printf("\nenter burst time\n");
scanf("%d",&p[i].burst);
}
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
{
if(p[j].burst>p[i].burst)
{
temp=p[i];
p[i]=p[j] ;
p[j]=temp;
}
}
}
printf("\nprocess\t\tburst time\t\twaiting time\n");
for(i=0;i<5;i++)
{
p[i].wait=wait ;
printf("\np%d\t\t%d\t\t\t%d\n",p[i].pid,p[i].burst,p[i].wait);
wait = wait + p[i].burst ;
}
twait=wait;
printf("\n\n average waiting time= %f",(twait/5));
getch();
}
Priority Scheduling in C
code goes like that
#include< stdio.h>
#include< conio.h>
struct process
{
int pid;
int priority;
int comp;
int burst;
};
void main()
{
struct process p[5], temp;
int i,j, comp=0;
float tcomp;
clrscr();
for(i=0;i<5;i++)
{
p[i].pid = i+1;
printf("\nprocess p %d",i+1);
printf("\nenter burst time");
scanf("\n%d",&p[i].burst);
printf("\nenter priority ");
scanf("\n%d",&p[i].priority);
}
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
if(p[j].priority>p[i].priority)
{ temp=p[i];
p[i]=p[j];
p[j]=temp;
}
}
}
printf("\nprocess\t\tburst time\t\tpriority\t\tcompletion time\n");
for(i=0;i<5;i++)
{
{
comp=comp+p[i].burst;
}
printf("p%d\t\t %d\t\t\t %d\t\t\t %d\n",p[i].pid,p[i].burst,p[i].priority,comp);
}
tcomp=comp;
printf("\n\naverage waiting time=%f",(tcomp/5));
getch();
}
output for the above code is:
FCFS-CPU Scheduling in C
but google had disappointed me.....
so i am going to post it here!
#include < stdio.h>
#include < conio.h>
struct process
{
int pid;
int burst;
int wait;
};
void main()
{
struct process p[5];
int i, j, wait=0;
float twait;
clrscr();
for(i=1;i<=5;i++)
{
p[i].pid=i;
printf("\nprocess p%d\n",i);
printf("\nenter burst time\n");
scanf("%d",&p[i].burst);
}
printf("\nprocess\t\tburst time\t\twaiting time\n");
for(i=1;i<=5;i++)
{
p[i].pid=i;
p[i].wait=wait;
printf("\nP%d\t\t%d\t\t\t\t %d",p[i].pid, p[i].burst,p[i].wait);
wait = wait + p[i].burst;
}
twait=wait;
printf("\n\naverage waiting time= %f",(twait/5));
getch();
}
Output for this code looks like this
IMSEC list of holidays
Republic Day 26 January 2009 Monday
Milad-un-Nabi 10 March 2009 Tuesday
Mid Semester Break 08 – 15 March 2009
Ram Navami 03 April 2009 Friday
Baisakhi 13 April 2009 Monday
Ambedkar Jayanti 14 April 2009 Tuesday
IMSEC Academic Calendar Even Sem-2009
| Registration for all Students (clear outstanding dues) | 12 January 2009 |
| Last Date for Late Registration | 15 January 2009 |
| Classes begin | 13 January,2009* |
| Display of Shortage of Attendance Cases (attendance from 13 January to 7 February 2009) | 12 February 2009 |
| First Class Test | 16, 17, 18 February 2009 |
| Display of answer scripts to students | 23 February 2009 |
| Display of Shortage of Attendance Cases (attendance from 13 January to 5 March 2009) | 07 March 2009 |
| Mid semester break | 08 March – 15 March 2009 |
| Second Class Test | 25, 26, 27 March 2009 |
| Display of answer scripts to students | 31 March 2009 |
| Display of Shortage of Attendance Cases (attendance from 13 January to 18 April 2009) | 24 April 2009 |
| Last day of class | 29 April 2009 |
| Third Class Test | 30 April, 1, 2 May 2009 |
| Display of answer scripts to students | 5 May 2009 |
| List of detained students in UPTU examination (attendance from 13 January to 30 April 2009) | 5 May 2009 |
| End-Semester Examinations | to be announced by UPTU |
| End-semester Practical Examination | to be announced by UPTU |
| Summer Vacation | 01 June to 20 July 2009 |
LOK SABHA election Schedule 2009
Phase | Date of polling |
1 | 16th April |
2 | 23rd April (22nd April in one constituency of Manipur) |
3 | 30th April |
4 | 7th May |
5 | 13th May |
Counting | 16th May |
The new government will come in power on the 2nd of June.