29 December 2010

Devil(2010)

 

















If you love to see supernatural activities on screen, then its indispensable for you to watch it. Five people with not so clean social backgrounds, stuck in a lift and began to feel precarious about each other as they were creeping towards their end by...(hehehehe). Unveil it yourself. This movie deserves more rating from IMDb, don't know how this site rates
NOTE OF CAUTION: THIS IS NOT A GHOSTLY MOVIE.



Delicious add to del.icio.us saved by 0 users

24 December 2010

Tees Mar Khan(TMK)


A complete entertainer. I want to frame it like this " A good meal without sumptuous dessert". Yes Akki was loud, Katrina was doing over-acting, ending was weak still you could find a big natural smile on your face throughout the movie. Farah is good in spoofing and this time she has taken SRK to the task. And for the detractors , I want to say , in this world the toughest job is to bring smile on others' face, if you people are looking for some logic, then go and attend some science conclaves , this movie is for bollywood lovers who know that they have to left their brain at home while rushing the multiplexes.
SOME MIGHT NOT AGREE WITH ME REGARDING TMK, I CANNOT HELP THEM AFTER ALL THEY ARE BORN IN A DEMOCRACY TOO, THEY CAN ALSO SPEAK ANYTHING, NO MATTER IF ITS LOGICAL OR NOT ;-)



Delicious add to del.icio.us saved by 0 users

10 November 2010

powerset program in java

The program was to find the power set of the given set . It was given to us as a lab work, i guess it might be useful for others as software community should always look for "REUSABILITY"



import java.io.*;

class powerset
{
   
    public static void main(String args[]) throws Exception
    {
       BufferedReader br=new BufferedReader(new InputStreamReader(System.in));   
       int i;char buff[]=new char[30];
       String str[]=new String[1024];
   
       str[0]="phi";
   
    System.out.print("Enter the no. of elements in the set : ");
    int x=Integer.parseInt(br.readLine());
    System.out.println();
    double n=Math.pow(2,x);
   
        for(i=0;i<x;i++)
        {
        System.out.print("Enter the "+(i+1)+" element of the set : ");
        String s=br.readLine();
        buff[i]=s.charAt(0);
        System.out.println();
        }
   
       
    for(i=1;i<n;i++)
    {
       
    str[i]=Integer.toString(i,2);
    int z=str[i].length();
    for(int j=0;j<x-z;j++)
    str[i]="0"+str[i];       
       
    }
       
        System.out.println("THE POWER SET IS : ");   
        System.out.println(str[0]);
       
        for(i=1;i<n;i++)
        {
            for(int j=0;j<x;j++)
            {
            char chk=str[i].charAt(j);
            if(chk=='1')
            System.out.print(buff[j]);
               
               
            }
           
        System.out.println();
           
           
           
           
      }
       
       
       
       
       
       
       
       
       
       
        }
   
   
    }



Delicious add to del.icio.us saved by 0 users

19 August 2010

postfix evaluation and checking the balance of the parenthesis

here r the codes for 2 famous problems of programming lab (for 1st yr btech students although i did it in my mtech).The language used here is c++.


1. POSTFIX EVALUATION (I got this problem in the entrance exam of IIIT-A)

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <ctype.h>


float a[30],top=-1;
void push(int val)
{
 if(top==29)
 cout<<"\nOVERFLOW";
 else
 {
  top++;
  a[top]=val;
 }

}

void pop(char c)
{ float temp;
switch(c)
{

case '+':  temp=a[top-1]+a[top];top--;a[top]=temp;break;
case '-':   temp=a[top-1]-a[top];top--;a[top]=temp;break;
case '*':   temp=a[top-1]*a[top];top--;a[top]=temp;break;
case '/':   temp=a[top-1]/a[top];top--;a[top]=temp;break;

}

}


void main()
{  char *p=NULL; int i,s=0; char opt;
do
{ top=-1;
clrscr();
cout<<"\nENTER THE POSTFIX NOTATION(separate operator and operand by a space) : ";
gets(p);
for(i=0;p[i]!=NULL;i++)
{

if(p[i]==' ')
continue;

else if(isdigit(p[i]))
{    while(isdigit(p[i]))
{
  s=s*10+p[i]-'0';
  i++;
}
push(s);
s=0;
}
else
pop(p[i]);
}
cout<<"\nANS IS : "<<a[0];
cout<<"\n\nDO YOU WANT TO CONTINUE(y/n) : ";
cin>>opt;

}while(opt=='y'||opt=='Y');
getch();
}





2. CHECKING THE BALANCE OF THE PARENTHESIS  (I got this problem as a lab test)


#include<iostream.h>
#include<conio.h>
#include<stdio.h>
 

int top=-1; char a[30];
 void push(char p)
 {
 if(top==29)
 cout<<"overflow";
 else
 {top++;
 a[top]=p;
 }

 }

     pop(char p)
{
     switch(p)
     {

     case ')' : if(a[top]=='('){top--;return 1;}
     case '}' : if(a[top]=='{'){top--;return 1;}
     case ']' : if(a[top]=='['){top--;return 1;}


     }
     return 0;

}

void main()
{  char *p=NULL;int i,valid=1;char opt='y';


do
{top=-1;    clrscr();     valid=1;
cout<<"\n\nENTER THE INFIX EXPRESSION : ";
gets(p);
for(i=0;p[i]!=NULL;i++)
{

if(p[i]=='('||p[i]=='{'||p[i]=='[')
push(p[i]);
else if(p[i]==')'||p[i]=='}'||p[i]==']')
{
int chk=pop(p[i]);
if(chk==0)
{valid=0;break;}

}
else
continue;
}

 if(valid==1 && top==-1)
 cout<<"\nbrackets are balanced" ;
 else
 cout<<"\nbrackets are not balanced";
cout<<"\n\ndo you wan to test more(y/n) : ";
cin>>opt;

}while(opt=='y'||opt=='Y');
 getch();
}



NOTE: IF YOU WANT TO DISCUSS ANYTHING RELATED TO C,C++,JAVA(CORE),.NET(C#),DATA STRUCTURE,SQL THEN YOU ARE AT THE CORRECT DOOR....JUST KNOCK IT:)



Delicious add to del.icio.us saved by 0 users

16 July 2010

TO PLAY COUNTER STRIKE ON INTERNET

Today I played counter strike(cs) on internet and it was fun. I remember that i tried the same few years back but was nt successful to establish a connection between my group.
I know two applications used to connect over internet to play cs...
1. Hamachi(which I have not used yet;))
2.TeamViewer


TeamViewer :

TeamViewer is a simple and fast solution for remote control, desktop sharing and file transfer that works behind any firewall and NAT proxy.


STEPS TO CONNECT THROUGH TeamViewer

STEP1 : Download the teamviewer      download from here
STEP2 : Open the application

















STEP3 : From the above window, we can see our id is 127 256 125 and password is 6666.Now choose one of the players who will become server for the VPN connection. Ask the id of the server and type the same on right hand side textbox labeled id in the CREATE SESSION form , select the VPN radio box and click the button Connect to partner






(in this window, the id of VPN SERVER is 126 903 822)













(ask the password of the server VPN)














STEP4 :  Once the connection is established, the following window will appear





your ip address is 7.79.43.167
server ip address is 7.79.36.251
















NOTE : 1. ROLE OF TEAMVIEWER IS OVER,MINIMIZE IT(DONT CLOSE IT)
               2.VPN SERVER IS NOT SPECIAL, A PRIVATE CONNECTION HAS BEEN
                  ESTABLISHED AND EACH PEER HAS ITS OWN IP ADDRESS.
               3. ANY OF THE PEER CAN CREATE SERVER IN COUNTER STRIKE.


STEP5: All the peers open the same game either CONDITION ZERO(yellow icon) or
             COUNTER STRIKE1.6(white icon)

SIXTH STEP IS FOLLOWED BY THE PEER WHO WILL BECOME SERVER FOR COUNTER STRIKE,ANY AMONG THE PEERS CAN BECOME SERVER

STEP6:In the following window,COUNTER STRIKE1.6(white icon) is opened
            Click on New Game,select the map.
            Do the game settings(optional)
            Click the Start button...so the server established
















SEVENTH STEP IS FOLLOWED BY THE PEERS WHO WILL JOIN THE SERVER ESTABLISHED ABOVE.

THE PEER WHO HAS ESTABLISHED THE SERVER FOR COUNTER STRIKE SHOULD TELL HIS IP ADDRESS TO ALL THE PEERS


STEP7 : Click on Find Servers
              Click on the tab Favorites
              Click on the button Add Server
              Type the ip address of the peer who has established the server for the game.
             Refresh the page twice or thrice.....the server name should be visible in the list
             Select the required server from the list and click on the Connect button

              















(here the server is Freaky_ss)










enjoy the game:)



Delicious add to del.icio.us saved by 0 users

12 July 2010

PROCEDURE TO USE TURBO C IDE ON 64 BIT OS

I recently purchased DELL INSPIRON N5010 laptop. It has 64 bit OS(window 7 home basic). I don't want to jump into the long debated topic on  INTERNET that is "64 bit vs 32 bit OS " , stil here is the link which can bring smile on d faces of d debaters of both sides=>64 BIT OS VS 32 BIT OS

Now back to d topic , I found that turbo c ide wasn't working on my laptop.It was really infurating to see this message,

I searched a lot on internet and discussed the same with my friends(shubham and prabhakar) and finally got 2 solutions for this agonizing problem.

solution 1


use VM ware:

VMware Workstation is a desktop software that allows you to run multiple
x86‐compatible desktop and server operating systems simultaneously on a single PC,
in fully networked, portable virtual machines—with no rebooting or hard drive
partitioning required.



so we can run 32 bit os with the help of vm ware on 64 bit os n the problm is solved bt there is one significant con of this solution....extra load on processor....so this solution is alright for desktops bt for laptops some other viable solution should be used , so here comes more viable soln....

solution 2

use DOSBOX: 

DosBox is a free DOS open source emulator, used to make run games n applications that don't work in modern operating system, or non Microsoft operating system (like Linux)

STEP 1 : DOWNLOAD DOSBOX..DOWNLOAD FROM HERE...

STEP2  :  INSTALL IT  AND RUN THE APPLICATION


(THIS FORM APPEARS)












STEP 3 : USE MOUNT command....z:\>mount c c:\ (THIS STEP IS USED EVERY TIME U OPEN THE DOSBOX APPLICATION)

STEP 4 : MOVE TO THE DIRECTORY HAVING TURBO C INSTALLER(DIS Z FOR INSTALLING IT) , SUPPOSE THE INSTALLER Z IN DIRECTORY C THEN MOVE TO DIRECTORY C FROM DIRECTORY Z.....z:\>c:...  and instal the turbo ide

















STEP 5 : TURBO IDE IS READY TO BE USED NOW(DOSBOX is needed everytime).


















AFTER PRESSING ENTER IN THE LAST LINE...TURBO C WINDOW WILL APPEAR...

NOTE: IF THERE IS AN ERROR REGARDING HEADER FILES....THEN U HAVE TO GIVE THE PATH OF FOLDERS INCLUDE AND LIB







Delicious add to del.icio.us saved by 0 users