Monday, 25 November 2013

Hack facebook account funny trick

Hi friends,
            Today i'm here with a new trick. Actually it's not a real facebook account hacking trick, it's only for fun. You must have seen facebook newer feature Photo comment that allow users to edit published posts and comments.With the new feature, the comment box has a camera button available. As you click on it, Facebook gives you the option to add a photo. The photo then gets uploaded and is inserted a part of the comment. It works similar to the way photos are embedded in messages with the users having the option to add text along with the image.

            Facebook engineer Bob Baldwin, one of the developers behind the release, said he was inspired to create the photo comments feature because, "sometimes showing a photo helps me tell a story much better than words alone" and it's really true. 

         Most image formats including JPEG, PNG and TIFF that are supported for regular Facebook image uploads are supported with the comments feature as well. GIF files, as before, remain unsupported
                 
               Ok ok, it's enough. You are thinking what is new in this post while you all are familiar with this feature. Ok let me explain, you can edit your friend's facebook profile name and put his/her nickname instead of his name and take the snapshot of the page and send to your friend. He/She will think how did you do this? You can edit anything on facebook according to your need and make fun of your friend. Ok, here some steps. Follow 'em.

Step:1  Go to your friend's facebook profile and left click on the page and select Inspect element (For Chrome and Mozila) or press CTRL+SHIFT+1 shortcut key (For Chrome).




Step:2 When you click on Inspect Element, a editing panel opens bottom of the page like this.




Step:3  Now left click on the highlighted area and select Edit Text or you can directly press F2. Now type your friend's nickname or anything else. When you have completed typing, click anywhere on the page and close the Inspect Element and you will see that you typed on the panel, now that is showing on the page.



Step:4 Now take snapshot of the page by pressing PrntScr button on your keyboard and goto paint and paste the snapshot by pressing CTRL+V. Cut the page according to your size and save the picture. Now you have ready to send this picture to your friend. 




By using this trick, you can also edit status of you anyone on facebook, relationship status and even you can edit your marksheet and get marks according to your need. 

Enjoy :)

Saturday, 23 November 2013

How to use multiple ip address in windows7 8 vista

Hello friends,

                   how are you? Please tell me in comments. Ok, now about the post. Today i'll tell you how can you use multiple IPs on your computer or laptop. Windows allow you to use multiple IP at a time and here multiple mean no limit but you have to choose suitable and valid IP that works on your computer. It is more beneficial where DHCP that is Dynamic Host Protocol disabled. The Dynamic Host Configuration Protocol is a standardized networking protocol used on IP networks that dynamically configures IP addresses and other information that is needed for Internet communication. DHCP allows computers and other devices to receive an IP address automatically from a central DHCP server, reducing the need for a network administrator or a user from having to configure these settings manually
                  In other words, when you connected to the network and the net speed goes down, you have no need to change your IP because the another IP switch and continue to provide you net. To use multiple IPs follow the steps,


Step:1 Go to Control pannel -> Network And Sharing Center and you will see following window.



Step:2 You can see that my computer is using one IP now.  Click on Local Area Connection and  again click on properties in Local Area Connection Status dialogue box. Another box will open. Select Internet Protocol Version 4(TCP/IPv4) and the click on Properties.




Step:3 A new dialogue box open where you can see your existing IP. In that box, click on Advance button.




Step:4 When you click on that button, anothor dialogue box will open. In that box you can see Add button. Click on that and type another IP that is not in use by your computer or another computer on the network and the Supnet Mask and click on Add button. If you want to add another Default gateway, that is given in the bottom in the property box and click on OK button.




Step:5 Close all the dialogue box by clicking on OK button. Now go to Control Panel -> Network Sharing and System Center, what you will see. Now your computer is using two IPs. You can increase the no of IP according your need.




Enjoy :)

Please Comment and share. :)


Program to implement SSTF disk scheduling algorithm in C

/*
   SSTF Disk Scheduling Algorithm
   Created By: Pirate
*/


#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int queue[100],t[100],head,seek=0,n,i,j,temp;
float avg;
// clrscr();
printf("*** SSTF Disk Scheduling Algorithm ***\n");
printf("Enter the size of Queue\t");
scanf("%d",&n);
printf("Enter the Queue\t");
for(i=0;i<n;i++)
{
    scanf("%d",&queue[i]);
}
printf("Enter the initial head position\t");
scanf("%d",&head);
  for(i=1;i<n;i++)
  t[i]=abs(head-queue[i]);
for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if(t[i]>t[j])
      {
        temp=t[i];
        t[i]=t[j];
        t[j]=temp;
        temp=queue[i];
        queue[i]=queue[j];
        queue[j]=temp;
      }
  }
  }
  for(i=1;i<n-1;i++)
  {
  seek=seek+abs(head-queue[i]);
  head=queue[i];
}
  printf("\nTotal Seek Time is%d\t",seek);
avg=seek/(float)n;
printf("\nAverage Seek Time is %f\t",avg);
getch();
}





Output


















Program to implement FIFO Disk Scheduling algorithm in C

/*
   FCFS Disk Scheduling Algorithm
   Created by: Pirate
*/

#include<stdio.h>
#include<conio.h>
void main()
{
int queue[100],n,head,i,j,k,seek=0,diff;
float avg;
// clrscr();
  printf("*** FCFS Disk Scheduling Algorithm ***\n");
printf("Enter the size of Queue\t");
scanf("%d",&n);
printf("Enter the Queue\t");
for(i=1;i<=n;i++)
  {
    scanf("%d",&queue[i]);
  }
  printf("Enter the initial head position\t");
scanf("%d",&head);
queue[0]=head;
printf("\n");
for(j=0;j<=n-1;j++)
{
    diff=abs(queue[j+1]-queue[j]);
    seek+=diff;
    printf("Move from %d to %d with Seek %d\n",queue[j],queue[j+1],diff);
  }
printf("\nTotal Seek Time is %d\t",seek);
  avg=seek/(float)n;
printf("\nAverage Seek Time is %f\t",avg);
  getch();
}




Output















Friday, 22 November 2013

Program to implement LRU page replacement algorithm in C

/*
    LRU Page Replacement Algorithm
    Created By: Pirate
*/


#include<stdio.h>
#include<conio.h>
int n,ref[100],fs,frame[100],count=0;
void input();
void show();
void cal();
void main()
{
printf("****************** LRU Page Replacement Algo *********************\n");
  input();
  cal();
show();
  getch();
}
void input()
{
  int i;
  printf("Enter no of pages in Refrence String\t");
scanf("%d",&n);
  printf("Enter the reference string:");
  for(i=0;i<n;i++)
  scanf("%d",&ref[i]);
  printf("Enter the Frame Size\t");
  scanf("%d",&fs);
}
void cal()
{
int i,j,k=0,c1,c2[100],r,temp[100],t;
  frame[k]=ref[k];
  count++;
  k++;
  for(i=1;i<n;i++)
     {
    c1=0;
           for(j=0;j<fs;j++)
           {
    if(ref[i]!=frame[j])
              c1++;
           }
         if(c1==fs)
         {
               count++;
                 if(k<fs)
      {
                  frame[k]=ref[i];
                     k++;
                 }
               else
               {
                     for(r=0;r<fs;r++)
                     {
                        c2[r]=0;
                        for(j=i-1;j<n;j--)
                    {
                               if(frame[r]!=ref[j])
                              c2[r]++;
                              else
                               break;
                         }
                  }
                     for(r=0;r<fs;r++)
                     temp[r]=c2[r];
                     for(r=0;r<fs;r++)
                     {
                        for(j=r;j<fs;j++)
                            {
                              if(temp[r]<temp[j])
                               {
                                  t=temp[r];
                                     temp[r]=temp[j];
                                     temp[j]=t;
                               }
                         }
                     }
                  for(r=0;r<fs;r++)
                     {
                           if(c2[r]==temp[0])
                           frame[r]=ref[i];
                     }        
      }
  }
}
}
void show()
{
printf("Page Faults = %d",count);
}





Output








Program to implement Deadlock Detection Algorithm in C

/*
    Deadlock Detection Algorithm
    Created By: Pirate
*/


#include<stdio.h>
#include<conio.h>
int max[100][100];
int alloc[100][100];
int need[100][100];
int avail[100];
int n,r;
void input();
void show();
void cal();
int main()
{
int i,j;
  printf("********** Deadlock Detection Algo ************\n");
  input();
  show();
cal();
  getch();
  return 0;
}
void input()
{
  int i,j;
  printf("Enter the no of Processes\t");
  scanf("%d",&n);
printf("Enter the no of resource instances\t");
scanf("%d",&r);
printf("Enter the Max Matrix\n");
for(i=0;i<n;i++)
  {
    for(j=0;j<r;j++)
    {
      scanf("%d",&max[i][j]);
    }
  }
printf("Enter the Allocation Matrix\n");
for(i=0;i<n;i++)
{
    for(j=0;j<r;j++)
    {
      scanf("%d",&alloc[i][j]);
    }
  }
  printf("Enter the available Resources\n");
  for(j=0;j<r;j++)
  {
    scanf("%d",&avail[j]);
  }
}
void show()
{
int i,j;
printf("Process\t Allocation\t Max\t Available\t");
  for(i=0;i<n;i++)
  {
  printf("\nP%d\t   ",i+1);
    for(j=0;j<r;j++)
    {
      printf("%d ",alloc[i][j]);
    }
    printf("\t");
    for(j=0;j<r;j++)
    {
      printf("%d ",max[i][j]);
    }
    printf("\t");
    if(i==0)
    {
      for(j=0;j<r;j++)
      printf("%d ",avail[j]);
    }
  }
}
void cal()
{
int finish[100],temp,need[100][100],flag=1,k,c1=0;
int dead[100];
  int safe[100];
  int i,j;
  for(i=0;i<n;i++)
  {
    finish[i]=0;
  }
  //find need matrix
  for(i=0;i<n;i++)
  {
    for(j=0;j<r;j++)
    {
      need[i][j]=max[i][j]-alloc[i][j];
    }
}
while(flag)
{
    flag=0;
     for(i=0;i<n;i++)
    {
      int c=0;
      for(j=0;j<r;j++)
      {
        if((finish[i]==0)&&(need[i][j]<=avail[j]))
        {
           c++;
          if(c==r)
          {
            for(k=0;k<r;k++)
            {
              avail[k]+=alloc[i][j];
              finish[i]=1;
              flag=1;
                  }
            //printf("\nP%d",i);
            if(finish[i]==1)
            {
              i=n;
          }
                }
        }
      }
      }
   }
   j=0;
   flag=0;
   for(i=0;i<n;i++)
   {
    if(finish[i]==0)
    {
      dead[j]=i;
      j++;
      flag=1;
    }
  }
  if(flag==1)
  {
    printf("\n\nSystem is in Deadlock and the Deadlock process are\n");
    for(i=0;i<n;i++)
    {
      printf("P%d\t",dead[i]);
    }
}
  else
  {
    printf("\nNo Deadlock Occur");
  }
}





Output



Program for Bankers algorithm for deadlock avoidance in c

/*
    Bankers Deadlock Avoidance Algorithm
    Created By: Pirate
*/

#include<stdio.h>
#include<conio.h>
int max[100][100];
int alloc[100][100];
int need[100][100];
int avail[100];
int n,r;
void input();
void show();
void cal();
int main()
{
int i,j;
printf("********** Baner's Algo ************\n");
input();
show();
cal();
getch();
return 0;
}
void input()
{
int i,j;
printf("Enter the no of Processes\t");
scanf("%d",&n);
printf("Enter the no of resources instances\t");
scanf("%d",&r);
printf("Enter the Max Matrix\n");
for(i=0;i<n;i++)
{
for(j=0;j<r;j++)
{
scanf("%d",&max[i][j]);
}
}
printf("Enter the Allocation Matrix\n");
for(i=0;i<n;i++)
{
for(j=0;j<r;j++)
{
scanf("%d",&alloc[i][j]);
}
}
printf("Enter the available Resources\n");
for(j=0;j<r;j++)
{
scanf("%d",&avail[j]);
}
}
void show()
{
int i,j;
printf("Process\t Allocation\t Max\t Available\t");
for(i=0;i<n;i++)
{
printf("\nP%d\t   ",i+1);
for(j=0;j<r;j++)
{
printf("%d ",alloc[i][j]);
}
printf("\t");
for(j=0;j<r;j++)
{
printf("%d ",max[i][j]);
}
printf("\t");
if(i==0)
{
for(j=0;j<r;j++)
printf("%d ",avail[j]);
}
}
}
void cal()
{
int finish[100],temp,need[100][100],flag=1,k,c1=0;
int safe[100];
int i,j;
for(i=0;i<n;i++)
{
finish[i]=0;
}
//find need matrix
for(i=0;i<n;i++)
{
for(j=0;j<r;j++)
{
need[i][j]=max[i][j]-alloc[i][j];
}
}
printf("\n");
while(flag)
{
flag=0;
  for(i=0;i<n;i++)
{
int c=0;
for(j=0;j<r;j++)
{
if((finish[i]==0)&&(need[i][j]<=avail[j]))
{
    c++;
if(c==r)
{
for(k=0;k<r;k++)
{
avail[k]+=alloc[i][j];
finish[i]=1;
flag=1;
      }
printf("P%d->",i);
if(finish[i]==1)
{
i=n;
}
        }
}
}
  }
  }
  for(i=0;i<n;i++)
  {
if(finish[i]==1)
{
c1++;
}
else
{
printf("P%d->",i);
}
}
if(c1==n)
{
printf("\n The system is in safe state");
}
else
{
printf("\n Process are in dead lock");
printf("\n System is in unsafe state");
}
}




Output













FIFO page replacement algorithm program in C

/*
   FIFO Page Replacement Algorithm
   Created by: Pirate
*/
#include<stdio.h>
#include<conio.h>
int n,ref[100],fs,frame[100],count=0;
int f=-1,r=-1;
void input();
void show();
void cal();
void queue(int k);
void main()
{
                 printf("************ FIFO Page Replacement Algo **************\n");
                 input();
                 cal();
                 show();
                 getch();
}
void input()
{
                 int i;
                 printf("Enter the no of pages in Refrence String\t");
                 scanf("%d",&n);
                 printf("Enter Refrence string");
                 for(i=0;i<n;i++)
                 {
                                 scanf("%d",&ref[i]);
                 }
                 printf("Enter the Frame Size\t");
                 scanf("%d",&fs);
}
void cal()
{
                 int i;
                 for(i=0;i<fs;i++)
                 {
                                frame[i]=-1;
                 }
                 for(i=0;i<n;i++)
                 {
                                 queue(ref[i]);
                 }
}
void queue(int k)
{
                 int i;
                 for(i=0;i<fs;i++)
                 {
                                 if(frame[i]==k)
                                 {
                                                 return;
                                 }
                 }
                 if(r==fs-1)
                 {
                                 r=0;
                 }
                 else if(r==-1)
                 {
                                 f=0;
                                 r=0;
                 }
                 else
                 {
                                 r=r+1;
                 }
                 frame[r]=k;
                 count++;
}
void show()
{
                 printf("Page Faults=%d",count);
}


Output