tada...
01 February 2011
case 39
"Why all the bad things happen with good people?" , this movie made me ponder over this. Has the Lucifer and his army grown so powerful that even the almighty is finding it hard to confine them? Although in the end, "light conquers the darkness","good defeats the bad", but at the cost of so much sacrifices and trouble:-(. Hey guys, no more adages ;-). This movie is fine. If you have flair for ghostly movies,then you can bang on it.
tada...
add to del.icio.us
saved by 0 users
tada...
24 January 2011
She's out of my league
Hilarious romantic love story. This was my second movie of Jay Baruchel and I am really impressed with this fluke ;-)(a lanky creature having galore acting skills).
The genre is not novel, its the same dork gets the diva, but the presentation is really refreshing.
I recommend it for cynical singles, friends don't despair:-)
add to del.icio.us
saved by 0 users
The genre is not novel, its the same dork gets the diva, but the presentation is really refreshing.
I recommend it for cynical singles, friends don't despair:-)
20 January 2011
chat application in java
I recently created a chat application in java which is based on client-server interaction model.
The server can't handle too much load(at max 50) as I am not using any database.
Following features of java are exploited :
*MultiThreading
*Sockets
*ArrayList
The server application is running on the IIITA server(atleast 23*6 if not 24*7)
I am attaching the link to download the "client application"
click me
Its not a big project but just the basic one which is playing with sockets and threads. If any one needs its source code, let me know.
see ya in the chat box ;)
add to del.icio.us
saved by 0 users
The server can't handle too much load(at max 50) as I am not using any database.
Following features of java are exploited :
*MultiThreading
*Sockets
*ArrayList
The server application is running on the IIITA server(atleast 23*6 if not 24*7)
I am attaching the link to download the "client application"
click me
Its not a big project but just the basic one which is playing with sockets and threads. If any one needs its source code, let me know.
see ya in the chat box ;)
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.
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 ;-)
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();
}
}
}
add to del.icio.us
saved by 0 users
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();
}
}
}
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:)
add to del.icio.us
saved by 0 users
1. POSTFIX EVALUATION (I got this problem in the entrance exam of IIIT-A)
#include
#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>
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();
}
Subscribe to:
Posts (Atom)

