Thursday, January 21, 2010

Records Of Sachin Tendukar

Just have a look at the records held by Sachin Tendulkar. No wonder why British Prime Minister is suggesting him for the honor of Sir .......

Records Held by Sachin Tendulkar.
1. Highest Run scorer in the ODI.
2. Most number of hundreds in the ODI 41.
3. Most number of nineties in the ODI.
4. Most number of man of the matches (56) in the ODI's.
5. Most number of man of the series(14) in ODI's.
6. Best average for man of the matches in ODI's.
7. First Cricketer to pass 10000 run in the ODI.
8. First Cricketer to pass 15000 run in the ODI.
9. He is the highest run scorer in the world cup (1,796 at an average of 59.87 as on 20 March 2007).
10. Most number of the man of the matches in the world cup.
11. Most number of runs 1996 world cup 523 runs in the 1996 Cricket World Cup at an average of 87.16.
12. Most number of runs in the 2003 world cup 673 runs in 2003 Cricket World Cup, highest by any player in a single Cricket World Cup.
13. He was Player of the World Cup Tournament in the 2003 Cricket World Cup.
14. Most number of Fifties in ODI's 87.
15. Appeared in Most Number of ODI's 407.
16. He is the only player to be in top 10 ICC ranking for 10 years.
17. Most number of 100's in test's 38.
18. He is one of the three batsmen to surpass 11,000 runs in Test cricket, and the first Indian to do so.
19. He is thus far the only cricketer to receive the Rajiv Gandhi Khel Ratna, India's highest sporting honor.
20. In 2003, Wisden rated Tendulkar as d No. 1 and Richards at No. 2 in all time Greatest ODI player.
21. In 2002, Wisden rated him as the second greatest Test batsman after Sir Donald Bradman.
22. He was involved in unbroken 664-run partnership in a Harris Shield game in 1988 with friend and team mate Vinod Kambli.
23. Tendulkar is the only player to score a century in all three of his Ranji Trophy, Duleep Trophy and Irani Trophy debuts.
24. In 1992, at the age of 19, Tendulkar became the first overseas born player to represent Yorkshire.
25. Tendulkar has been granted the Rajiv Gandhi Khel Ratna, Arjuna Award and Padma Shri by Indian government. He is the only Indian cricketer to get all of them.
26. Tendulkar has scored over 1000 runs in a calendar year in ODI's 7 times.
27. Tendulkar has scored 1894 runs in calendar year in ODI's most by any batsman.
28. He is the highest earning cricketer in the world.
29. He has the least percentage of the man of the matches awards won when team looses a match. Out of his 56 man of the match awards only 5 times India has lost.
30. Tendulkar most number man of match awards(10) against Australia.
31. In August of 2003, Sachin Tendulkar was voted as the "Greatest Sportsman" of the country in the sport personalities category in the Best of India poll conducted by Zee News.
32. In November 2006, Time magazine named Tendulkar as one of the Asian Heroes.
33. In December 2006, he was named "Sports person of the Year.
34. The current India Poised campaign run by The Times of India has nominated him as the Face of New India next to the likes of Amartya Sen, Mahatma Gandhi among others.
35. Tendulkar was the first batsman in history to score over 50 centuries in international cricket.
36. Tendulkar was the first batsman in history to score over 75 centuries in international cricket:79 centuries.
37. Has the most overall runs in cricket, (ODIs+Tests+Twenty20s), as of 30 June 2007 he had accumulated almost 26,000 runs overall.
38. Is second on the most number of runs in test cricket just after Brian Lara.
39. Sachin Tendulkar with Sourav Ganguly hold the world record for the maximum number of runs scored by the opening partnership. They have put together 6,271 runs in 128 matches.
40. The 20 century partnerships for opening pair with Sourav Ganguly is a world record.
41. Sachin Tendulkar and Rahul Dravid hold the world record for the highest partnership in ODI matches when they scored 331 runs against New Zealand in 1999.
42. Sachin Tendulkar has been involved in six 200 run partnerships in ODI matches - a record that he shares with Sourav Ganguly and Rahul Dravid.
43. Most Centuries in a calendar year: 9 ODI centuries in 1998.
44. Only player to have over 100 innings of 50+ runs (41 Centuries and 87 Fifties)(as of 18th Nov, 2007).
45. The only player ever to cross the 13,000-14,000 and 15,000 run marks IN ODI.
46. Highest individual score among Indian batsmen (186* against New Zealand Hyderabad in 1999).
47. The score of 186* is listed the fifth highest score recorded in ODI matches.
48. Tendulkar has scored over 1000 ODI runs against all major Cricketing nations.
49. Sachin was the fastest to reach 10,000 runs taking 259 innings and has the highest batting average among batsmen with over 10,000 ODI runs.
50. Most number of Stadium Appearances: 90 different Grounds.
51. Consecutive ODI Appearances: 185.
52. On his debut, Sachin Tendulkar was the second youngest debutant in the world.
53. When Tendulkar scored his maiden century in 1990, he was the second youngest to score a century.
54. Tendulkar's record of five test centuries before he turned 20 is a current world record.
55. Tendulkar holds the current record (217 against NZ in 1999/00 Season) for the highest score in Test cricket by an Indian when captaining the side.
56. Tendulkar has scored centuries against all test playing nations.[7] He was the third batman to achieve the distinction after Steve Waugh and Gary Kirsten.
57. Tendulkar has 4 seasons in test cricket with 1000 or more runs - 2002 (1392 runs), 1999 (1088 runs), 2001 (1003 runs) and 1997 (1000 runs).[6] Gavaskar is the only other Indian with four seasons of 1000+ runs.
58. He is second most number of seasons with over 1000 runs in world.
59. On 3 January 2007 Sachin Tendulkar (5751) edged past Brian Lara's (5736) world record of runs scored in Tests away from home.
60. Tendulkar and Brian Lara are the fastest to score 10,000 runs in Test cricket history. Both of them achieved this in 195 innings.
61. Second Indian after Sunil Gavaskar to make over 10,000 runs in Test matches.
62. Became the first Indian to surpass the 11,000 Test run mark and the third International player behind Allan Border and Brian Lara.
63. Tendulkar is fourth on the list of players with most Test caps. Steve Waugh (168 Tests), Allan Border (158 Tests), Shane Warne (145 Tests) have appeared in more games than Tendulkar.
64. Tendulkar has played the most number of Test Matches(144) for India (Kapil Dev is second with 131 Test appearances).
65. First to 25,000 international runs.
66. Tendulkar's 25,016 runs in international cricket include 14,537 runs in ODI's, 10,469 Tests runs and 10 runs in the lone Twenty20 that India has played.
67. On December 10, 2005, Tendulkar made his 35th century in Tests at Delhi against Sri Lanka. He surpassed Sunil Gavaskar's record of 34 centuries to become the man with the most number of hundreds in Test cricket.
68. Tendulkar is the only player who has 150 wkts and more than 15000 runs in ODI.
69. Tendulkar is the only player who has 40 wkts and more than 11000 runs in Tests.
70. Only batsman to have 100 hundreds in the first class cricket.

Role Play Topics

The Debate Digest
A steady supply of pro/con articles to help you deliberate, take a stand, take action, vote, and back yourself up.
• Mandatory health insurance - Should governments mandate that individuals own health insurance, or face penalties? - October 8, 2009.
Featured pro and con arguments from this article:
• PRO: Mandatory health insurance ensures appropriate pooling of risk Keith Girard. "Health Care: The Case for Mandatory Universal Health Insurance." All Business. April 2 2009: "'Insurance, in its simplest form, works by pooling risks: many pay a premium up front, and then those who face a bad outcome (getting sick, being in a car accident, having their home burn down) get paid out of those collected premiums,' explained Katherine Baicker, a professor of health economics at Harvard’s School of Public Health. [...] Thus, the system is undermined by the uninsured, both healthy and unhealthy. [...] when healthy individuals choose to go uninsured, the model breaks down as well, because they are limiting the pool of reserves available for those who are sick. If they wait until they are sick to get insurance, they defeat the purpose of insurance, too. That’s why Massachusetts, one of the states leading health care reform efforts, requires universal participation in its health program."
• CON: Insurance mandates force citizens to buy special-interest benefits Paul Hsieh. "Health care in Massachusetts: a warning for America". Christian Science Monitor. September 30, 2009: "Under any system of mandatory insurance, the government must necessarily define what constitutes acceptable insurance. In Massachusetts, this has created a giant magnet for special interest groups seeking to have their own pet benefits included in the required package. Massachusetts residents are thus forced to purchase benefits they may neither need nor want, such as in vitro fertilization, chiropractor services, and autism treatment – raising insurance costs for everyone to reward a few with sufficient political pull."
Recent Debate Digest articles
• Escalation of the War in Afghanistan under the Obama administration - Should the Obama administration escalate the War in Afghanistan in 2009 and 2010?
• Health insurance cooperatives - Should health insurance co-ops be part of US health care reform? Are they a good alternative to public insurance? - September 4th, 2009.
• Public insurance option in US health care - Should the US create a public insurance option and hybrid public-private health care system? - August 27th, 2009.

• Mandatory calorie counts on menus - Is mandating calorie counts on restaurant menus good public policy? - August 18th, 2009.
• Civil unions vs. gay marriage - Which is superior, civil unions or gay marriage?
• Manned mission to Mars - Is a manned mission to Mars a good idea, or are continued robotic missions best? - August 10th, 2009.
• Colonization of the Moon - Is colonizing the Moon with a "Moonbase" a good idea? - August 5th, 2009.
• Mission to the Moon or Mars? - Should humanity return to the Moon first, or go to Mars? - August 3rd, 2009.
• Mandatory labeling of genetically modified foods - Should governments require that genetically modified foods be labeled? - July 23rd, 2009
• Filibuster - Is the filibuster a valuable tool in government, or should it be abandoned? - July 17th, 2009.
• Criminalization of Holocaust denial - Should denial of the Holocaust be illegal? - July 12th, 2009.

Role Play Topics

General
•Whether there is a fundamental rift between science and religion.
•Whether medieval philosophy was a positive step in the history of philosophy.
•Whether human beings are of greater value than animals.
•Whether human beings have free will.
•Whether a fetus is a person.
•Whether life has intrinsic value.
•Whether Zombies are Possible

Metaphysics/Epistemology
•Whether there exists a supreme being.
•Whether objects exist in and of themselves.
•Whether infinite causal regress is possible.
•Whether cause and effect is a necessary metaphysic.
•Whether there exists an uncaused cause.
•Whether human beings have an individuated existence beyond physical death.
•Whether there exists absolute truth.
•Whether a priori knowledge is possible.
•Whether truth exists in a deterministic universe.
•Whether being without form is possible.
•Whether human knowledge must be given by a higher being.
•Whether it is true that if an infinite being is possible, it must exist.
•Whether truth is the correspondence of the mind with reality.
•Whether it is possible to know if God exists.
•Whether mind is a distinct substance from body.
•Whether experience is the only source of knowledge.
•Whether consciousness plays an active role in the world.
•Whether knowledge may be gained through faith alone.
•Whether matter is the only reality.
•Whether the non-material is the only reality.
•Whether mere appearances are the only objects of knowledge.
•Whether the world exists outside the self.
•Whether determinism is incompatible with freedom.
•Whether there is substance.

Ethics
•Whether morality is absolute.
•Whether morality is absolute without the existence of God.
•Whether eating meat is ethical.
•Whether homosexuality is ethical.
•Whether suicide can ever be ethical.
•Whether euthanasia can ever be ethical.
•Whether abortion is ethical.
•Whether hunting animals for sport is ethical.
•Whether happiness of the individual should be the chief goal of ethics.
•Whether there exist any intrinsic human values.
•Whether virtue is sufficient for happiness.
•Whether the happiness of others ought to be the primary motivator for moral action.
•Whether cloning humans is ethical.

Logic
•Whether logic is objective.

Religion and Mysticism
•Whether God exists.
•Whether spirits exist.
•Whether angels (or demons) exist.
•Whether there is such a thing as a singular correct religion.
•Whether religion is a positive social institution.
•Whether an omnipotent, omni-benevolent God and evil can be reconciled.
•Whether creationism provides a valid explanation for the state of the known universe.
•Whether the atheistic or the agnostic position is more tenable.
•Whether God is active in his creation.
•Whether the universe is divine.
•Whether speculative reason can discover the existence of God.
•Whether spirit is the only reality.

Philosophy of Language
•Whether language is necessary for thought.
•Whether words and concepts have objective meaning.

Philosophy of Science and Math
•Whether Zeno’s Paradox proves that there is no real relative change.
•Whether the universe is full of intelligent life.
•Whether a paradigmatic interpretation of science is valid.
•Whether matter is composed of a singular type of smallest, sub-atomic particles.

Philosophy of Politics and Law
•Whether the two-party system is preferable to a multi-party political system.
•Whether democracy is the ideal form of government.
•Whether capital punishment is a just social institution.
•Whether capitalism is a just socio-economic model.
•Whether affirmative action is a just social institution.
•Whether terrorism can ever be justified.
•Whether voting in a fundamentally flawed political system is worthwhile.
•Whether illegal drugs should be made legal.
•Whether the drinking age should be lowered or eliminated.
•Whether more taxes should be levied against the wealthy.
•Whether the state should provide universal healthcare.
•Whether the US governments’ prohibition on limiting the right of the people, under the Second Amendment, to carry and bear arms, should be removed from the Constitution.
•Whether there should be any qualification for voting.
•Whether the concerns of the individual should take precedence over the concerns of the many.
•Whether conservatism or liberalism is a more tenable social philosophy.
•Whether there is such a thing as a just war.
•Whether in the realm of leadership, it is better to appear good and just than to be good and just.
•Whether liberty comes to humankind by nature, or if it is granted by society.
•Whether the general mass of humanity should rule itself, or should be ruled by the elite.

Current Events
•Whether homosexuals should be allowed to marry.
•Whether mandatory military service would be worthwhile.
•Whether “under God” should be stricken from the Pledge of Allegience.

Anthropology, Sociology, and Psychology
•Whether the current state and progression of humanity is leading towards a higher social order, or relative social destruction.
•Whether children should be educated in any specific religion.
•Whether marriage is worthwhile social institution.
•Whether the family unit is a worthwhile social institution.

Philosophy of the Arts
•Whether there is a superior art form.
•Whether beauty is objective.

ROLE PLAY (Eg)

A: Invite B to go somewhere this weekend.
B: Politely refuse A's invitation.
A: Call and tell your boss (B) you can't come to work because of illness.
B: You think A is bluffing (not really sick).
A: Ask B to teach you to play tennis.
B: You hate coaching for free.
A: Try to get B to divulge a secret about someone else.
B: Don't be persuaded to do it.
A: Ask B to give you a ride home.
B: A's house is out of the way, and your time is limited.
A: Call and tell B you can't come to the party on Friday.
B: Try to get A to come to the party. (It's a surprise party for him/her.)
A: Try to get B to smoke marijuana.
B: You don't want to use any illegal drug.
A: Call to order a pizza.
B: Wrong number. You sell pitas, not pizzas.
A: Present B with an unsolicited gift.
B: You do not feel comfortable accepting the gift.
A: Try to get B to go on a date with your niece/nephew.
B: You can't stand A's niece/nephew.
A: You ran over B's favorite pet with your truck. Apologize to him/her.
B: You are very upset with the news. The pet is irreplaceable.
A: You lost your wedding ring. Tell your spouse (B).
B: Get angry with A for losing the ring.


Here is a list of debate topics. I know there are many, many more. If anyone wants to debate any of these topics, make a note of it (providing which position you want to take) below, so that anyone seeking to debate may contact you to set it up. Or if you wish to challenge another member, make a note of that as well.

Everyone is welcome to suggest topics. I will add the good ones to the list.

YACC

/*Yacc specifications of simple desktop calculator*/
%{
#include ctype.h
%}
%token DIGIT
%%
line : expr '\n' {printf("%d\n",$1);}

expr : expr '+' term {$$=$1+$3;}
|term

term : term '*' factor {$$=$1*$3;}
|factor

factor : '('expr')' {$$=$2;}
|DIGIT
;
%%
yylex() {
int c;
c=getchar();
if(isdigit(c)){
yylval=c-'0';
return DIGIT;
}
return c;
}

OUTPUT:
$ yacc y1.y
$ cc y.tab.c -ly
$ ./a.out
2+3
5
$

LEX TOOL

%{
#include math.h
#include stdio.h
%}
DIGIT [0-9]
ID [a-z][a-z0-9]*
%%
{DIGIT}+ {printf("An Integer : %(%d) \n",yytext,atoi(yytext));}
{DIGIT}+"."{DIGIT}* {printf("A Float : %s(%g) \n",yytext,atof(yytext));}
if|then|begin|end|procedure|function {printf("A keyword : %s\n",yytext);}
{ID} printf("An identifier:%s \n",yytext);
"+"|"-"|"*"|"/" printf("An Operator:%s \n ",yytext);
%%
int main(int argc,char *argv[])
{
++argv;--argc;/*skip over program name*/
if(argc>0)
yyin=fopen(argv[0],"r");
else
yyin=stdin;
yylex();
}

$ lex lex1.l
$ cc lex.yy.c -ll
$ a.out
if
A keyword : if

thr
An identifier:thr

then
A keyword : then

123
An Integer : %(4203076) CNTR+d

TOP DOWN PARSER

#include stdio.h
#include conio.h
#include string.h
#include ctype.h

int main()
{
char G[2][15]={"S->cAd/cd",
"A->ac/ab" };

char str[20],n[2];
int i,j,k,l,m,t;
int p,q;
clrscr();
printf("Grammar \n");
for(p=0;p<2;p++)
{
for(q=0;q<15;q++)
printf("%c",G[p][q]);
printf("\n\n");
}

printf("Enter the string to be parsed : ");
gets(str);
for(i=0,k=3,l=0;str[i]!='\0';k++)
{
if(G[l][k]!=str[i])
{
if(isupper(G[l][k]))
{
t=k;
m=i;
k=2;
l++;
}
if(G[l][k]=='/'||G[l][k]=='\0'&&l!=0)
{
l--;
k=t;
}
else if(k!=2)
{
for(j=k;G[l][j]!='/'&&G[l][j]!='\0';j++)
if(G[l][j]=='\0')
{
if(i==0)
{
printf("Not Accepted");
exit(0);
}
else
k=2;
}
if(l!=0)
i=m;
k=j;
} }
else
i++;

}
if(str[i]=='\0'&&G[l][k]=='/'||G[l][k]=='\0'&&l==0)
printf("Accepted");
else
printf("Not Accepted");
return 0;
}

OUTPUT:
Grammar
S->cAd/cd
A->ac/ab
Enter the string to be parsed : cabd
Accepted


Grammar
S->cAd/cd
A->ac/ab
Enter the string to be parsed : aaa
Not Accepted

RECURSIVE DESCENT PARSER

#include stdio.h
#include conio.h
int main()
{
char g[30]={"S->icts/wcts/dtcs" };
char s[40];
int i,j,k;
clrscr();
printf("Grammar \n\n");
for(i=0;g[i]!='\0';i++)
printf("%c",g[i]);
printf("Enter the string : ");
gets(s);
for(i=0,k=3;(s[i]!='\0')&&(g[k]!='\0');k++)
{
if(g[k]!=s[i])
{
for(j=k;(g[j]!='/')&&(g[j]!='\0');j++);
k=j;
}
else
i++;
}
if(s[i]=='\0'&&(g[k]=='/'||g[k]=='\0'))
{
printf("String is Accepted");
exit(0);
}
printf("String is not accepted");
return 0;
}
OUTPUT:
Grammar:
S->icts/wcts/dtcs
Enter the string : wctg
String is not accepted

Grammar:
S->icts/wcts/dtcs
Enter the string : dtcs
String is Accepted

OPERATOR PRECEDENCE PARSER

#include stdio.h
#include string.h
#include conio.h
char stack[20],stack1[20],next,s[10];
int top=-1;
char prod[9][10]={
">><<<<<>>",
">><<<<<>>",
">>>><<<>>",
">>>><<<>>",
">>>><<<>>",
">>>>>ee>>",
"<<<<<<<=e",
">>>>>ee>>",
"<<<<<< };
char G[7][6]={
"E->E+E",
" /E-E",
" /E*E",
" /E/E",
" /(E)",
" /i "
};


int main()
{
char symbol;
int i=0,flag=0;
int j,k;
clrscr();
printf("Grammar\n");
for(j=0;j<7;j++)
{
for(k=0;k<6;k++)
printf("%c",G[j][k]);
printf("\n");
}
printf("\n\n OPERATOR PRECEDENCE RELATIONS \n");
printf("\n -------------------------------------------------------- \n");
printf("%c\t%c\t%c\t%c\t%c\t%c\t%c\t%c\t%c\t",'+','-','*','/','^','i','(',')','$');
printf("\n------------------------------------------------------------------\n");
for(j=0;j<9;j++)
{
for(k=0;k<10;k++)
printf("%c\t",prod[j][k]);
printf("\n");
}
printf("Enter the string : ");
gets(s);
++top;
stack[top]='$';
next=s[i];
while(1)
{
if(stack[top]=='$'&& next=='$'||next=='\0')
break;
else
{
symbol=prod[f(stack[top])][f(next)];
if(symbol=='<'||symbol=='=')
{
stack[++top]=symbol;
stack[++top]=next;
}
else if(symbol=='>')
{
do
{
top--;
}while(stack[top]!='<');
stack[++top]=next;
if(next!='$')
{
for(j=0;j<=top;j++)
stack1[j]=stack[j];
stack1[j]=symbol;
}
}
else
flag=1;
next=s[++i];
}
}

printf("\n STACK : ");
for(j=0;j<=top;j++)
printf("%c",stack1[j]);
printf("%c",'$');
if(flag==0)
printf("\n\n Accepted");
else
printf("Rejected");
return 0;
}


int f(char ch)
{
switch(ch)
{
case '+':return 0;
case '-':return 1;
case '*':return 2;
case '/':return 3;
case '^':return 4;
case 'i':return 5;
case '(':return 6;
case ')':return 7;
case '$':return 8;
default :
{
printf("\n ERROR ");
exit(0);
}
}
}

OUTPUT:



OPERATOR PRECEDENCE RELATIONS

--------------------------------------------------------
+ - * / ^ i ( ) $
------------------------------------------------------------------
> > < < < < < > >

> > < < < < < > >

> > > > < < < > >

> > > > < < < > >

> > > > < < < > >

> > > > > e e > >

< < < < < < < = e

> > > > > e e > >

< < < < < < < e e

Enter the string : i + i @ i $
ERROR

Enter the string : i +i*i$
STACK : $<+<*> $
Accepted

LR PARSER

#include stdio.h
#include conio.h
#include string.h
#define MAX 36
char action_table[12][6][4]={
"s5","e1","e1","s4","e1","e1",
"e1","s6","e1","e1","e1","A",
"e1","r2","s7","e1","r2","r2",
"e1","r4","r4","e1","r4","r4",
"s5","e1","e1","s4","e1","e1",
"e1","r6","r6","e1","r6","r6",
"s5","e1","e1","s4","e1","e1",
"s5","e1","e1","s4","e1","e1",
"e1","s6","e1","e1","s11","e1",
"e1","r1","s7","e1","r1","r1",
"e1","r3","r3","e1","r3","r3",
"e1","r5","r5","e1","r5","r5"
};
char goto_table[12][3][4]={
"1","2","3",
" "," "," ",
" "," "," ",
" "," "," ",
"8","2","3",
" "," "," ",
" ","9","3",
" "," ","10",
" "," "," ",
" "," "," ",
" "," "," ",
" "," "," "
};

char G[6][10]={
"E-->E+T",
"E-->T",
"T-->T*F",
"T-->F",
"F-->(E)",
"F-->i"
};

int i,top=-1;
char stack[MAX],st[20];
char err_flag;
void push(char ch)
{
if(top>MAX-1)
printf("\n Stack is full \n");
else
{
if(ch=='')
return;
else
stack[++top]=ch;
}
}
char pop()
{
char ch;
if(top<0)
{
printf("\n stack is empty \n");
return '\0';
}
ch=stack[top--];
stack[top+1]='\0';
return ch;
}
int char_val(char ch)
{
int x;
switch(ch)
{
case'i':
case'E': x=0;
break;
case'+':
case'T': x=1;
break;
case'*':
case'F': x=2;
break;
case'(':x=3;
break;
case')':x=4;
break;
case'$' :x=5;
break;
}
return x;
}
void error()
{
err_flag=1;
}
void main()
{
char x,a,tab_e[5],goto_e[4];
int i=0,len,xx,yy,zz,red_val,l;
clrscr();
printf("\n Enter a string ending with a $: ");
fflush(stdin);
scanf("%s",st);
printf("\n Input string is %s ",st);
push('0');
printf("\n\n\n\n\t\t parse table for expression grammar");
printf("-------------------------------------------------\n");
printf("\n\t\tAction_Table\t\t\tGoto_table");
printf("-------------------------------------------------\n");
printf("\n%7s%7s%7s%7s%7s%7s%7s%7s%7s","id","+","*","(",")","$","E","T","F");
printf("\n-----------------------------------------------\n");

for(xx=0;xx<12;xx++)
{
for(yy=0;yy<6;yy++)
printf("%7s",action_table[xx][yy]);
for(yy=0;yy<3;yy++)
printf("%7s",goto_table[xx][yy]);
printf("\n\n");
}
printf("\n MOVES MADE BY LR PARSER \n");
printf("---------------------------\n");
printf("STACK\t\t\tINPUT_STRING \n");
printf("--------------------------\n");
do
{
if(stack[top]=='\n')
{
for(l=0;l printf("%c",stack[l]);
printf("%d\t\t",stack[top]);
}
else
printf("%s\t\t\t",stack);
for(xx=0;st[xx]!='\0';xx++)
if(xx printf(" ");
else
printf("%c",st[xx]);
printf("\n");
if(stack[top]=='1' && stack[top-1]=='1')
x=11;
else
x=stack[top];
a=st[i];
if(stack[top]=='\n')
xx=10;
else if(stack[top]=='1' && stack[top-1]=='1')
{
xx=11;
stack[--top]=11;
}
else
xx=x-'0';
if(top>2)
switch(stack[top-1])
{
case 'i':
case '+':
case '*':
case '(':
case ')':
case '$':
case 'E':
case 'T':
case 'F':
break;
default:
xx+=(stack[top-1]-'0')*10;
break;
}
yy=char_val(a);
strcpy(tab_e,action_table[xx][yy]);
if(tab_e[0]=='s')
{
push(a);
push(tab_e[1]);
if(tab_e[2]!='\0')
push(tab_e[2]);
a=st[++i];
}
else
if(tab_e[0]=='r')
{
red_val=tab_e[1]-'0';
len=strlen(G[red_val-1]);
for(len=len-4;len>0;len--)
{
pop();
pop();
}
xx=stack[top]-'0';
push(G[red_val-1][0]);
yy=char_val(G[red_val-1][0]);
if(xx==7&&yy==2)
push(10);
else
push(goto_table[xx][yy][0]);
}
else if(action_table[xx][yy][0]=='A')
break;
else
error();

}while(!err_flag);
if(err_flag)
printf("Parsing is unsuccessfull");
else
printf("\n parsing is successfull\n");
getch();
}

OUTPUT:
Input string is : i*i+i$

-------------------------------------------------------------------
parse table for expression grammar
-------------------------------------------------------------------
Action_Table Goto_table
-------------------------------------------------------------------
id + * ( ) $ E T F
-------------------------------------------------------------------
s5 e1 e1 s4 e1 e1 1 2 3

e1 s6 e1 e1 e1 A

e1 r2 s7 e1 r2 r2

e1 r4 r4 e1 r4 r4

s5 e1 e1 s4 e1 e1 8 2 3

e1 r6 r6 e1 r6 r6

s5 e1 e1 s4 e1 e1 9 3

s5 e1 e1 s4 e1 e1 10

e1 s6 e1 e1 s11 e1

e1 r1 s7 e1 r1 r1

e1 r3 r3 e1 r3 r3

e1 r5 r5 e1 r5 r5


MOVES MADE BY LR PARSER
---------------------------------------------
STACK INPUT_STRING
----------------------------------------------
0 i*i+i$
0i5 *i+i$
0F3 *i+i$
0T2 *i+i$
0T2*7 i+i$
0T2*7i5 +i$
0T2*7F10 +i$
0T2 +i$
0E1 +i$
0E1+6 i$
0E1+6i5 $
0E1+6F3 $
0E1+6T9 $
0E1 $

parsing is successfull

LEXICAL ANALYSER

#include stdio.h
#include conio.h
#include string.h
#include ctype.h

/*SYMBOL TABLE*/

struct symbol_table
{
char * token_type;
const char * att;
}symbol[30];
/*GLOBAL VARIABLES*/

int index=0,look=0;
char st1[10],st2[10];
/*LOOK UP TABLE*/

int lookup(char st[])
{
int i;
for(i=1;i<=30;i++)
{
if(!strcmp(symbol[i].att,st))
return i;
else if(!i)
return 0;
}
return -1;
}

void insert(char st1[],const char st2[])
{
symbol[index].token_type=(char *)malloc(strlen(st1));
symbol[index].att=(char *)malloc(strlen(st2));
strcpy(symbol[index].token_type,st1);
strcpy(symbol[index].att,st2);
index++;
}


int main()
{
int i,j,k,val,flag,ln=0,x,y=0;
char c,ch,chr[50];
char res[10][10]={"if","else","while","do","for"};
clrscr();
printf("Enter the string : ");
while(1)
{
j=0;
flag=0;
chr[0]='\0';
c=getchar();
if(c=='$')
break;
else if((c==' ')||(c=='\t'));
else if(c=='\n')
ln++;
else if(isdigit(c))
{
while(isdigit(c))
{
chr[j]=c;
j++;
c=getchar();
}
chr[j]='\0';
ungetc(c,stdin);
insert("Num",chr);
printf("\n",chr);
}
else if(isalpha(c))
{
while(isalpha(c))
{
chr[j]=c;
j++;
c=getchar();
}
chr[j]='\0';
for(k=0;k<5;k++)
if(!strcmp(chr,res[k]))
{
insert(chr,res[k]);
flag=1;
printf("\n",res[k]);
break;
}
if(!flag)
{
look=lookup(chr);
if(look!=0)
{
insert("Id",chr);
printf("\n",chr);
}
else
{
printf("\n",chr);
insert("Id",chr);
index++;
}
}
ungetc(c,stdin);
}
else if(c=='>')
{
chr[0]=c;
chr[1]='\0';
c=getchar();
if(c=='=')
{
chr[1]=c;
chr[2]='\0';
printf("\n",chr);
insert("GTE",chr);
}
else
{ ungetc(c,stdin);
printf("\n",chr);
insert("GT",chr);
}
}
else if(c=='<')
{
chr[0]=c;
chr[1]='\0';
c=getchar();
if(c=='>')
{
chr[1]=c;
chr[2]='\0';
printf("\n",chr);
insert("NE",chr);
}
else if(c=='=')
{
chr[1]=c;
chr[2]='\0';
printf("\n",chr);
insert("LTE",chr);
}
else
{
ungetc(c,stdin);
printf("\n",chr);
insert("LT",chr);
}
}
else if(c=='=')
{
chr[0]=c;
chr[1]='\0';
c=getchar();
if(c=='=')
{
chr[1]=c;
chr[2]='\0';
printf("\n",chr);
insert("EQU",chr);
}
else
{
printf("\n",chr);
insert("ASS_OP",chr);
ungetc(c,stdin);
}
}
else
{
switch(c)
{
case '+':
chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("PLUS",chr);
break;
case '-':

chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("MINUS",chr);
break;
case '*':

chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("MULTI",chr);
break;
case '/':

chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("DIVISION",chr);
break;
case '%':

chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("MODULOS",chr);
break;
case '(':
chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert("(",chr);
break;
case ')':
chr[0]=c;
chr[1]='\0';
printf("\n",c);
insert(")",chr);
break;
default:
printf("\n",chr);
}
}
}

printf("\n\t\tSYMBOL TABLE");
printf("\n..............................................\n");
printf("%s\t\t%s\t\t%s","TOKEN","TOKEN_TYPE","TOKEN_VALUE");
printf("\n...............................................\n");
for(k=0;k {
y=0;
for(x=0;x if(!strcmp(symbol[k].att,symbol[x].att))
{
y=1;
printf("%s\t\t%s\t\t%d\n",symbol[k].att,symbol[k].token_type,x);
break;
}
if(y==0)
{
printf("%s\t\t%s\t\t%d\n",symbol[k].att,symbol[k].token_type,k);
}
}
getch();
return 0;
}


OUTPUT:

Enter the string : if(a==b) a+b$









SYMBOL TABLE
............................................…………………………………..
TOKEN TOKEN_TYPE TOKEN_VALUE
.............................................…………………………………
if if 0
( ( 1
a Id 2
== EQU 3
b Id 4
) ) 5
a Id 2
+ PLUS 7
b Id 4

Sunday, January 10, 2010

MS-Dos Programming

Introduction

SECTION 1 PROGRAMMING FOR MS-DOS

Chapter 1 Genealogy of MS-DOS
Chapter 2 MS-DOS in Operation
Chapter 3 Structure of MS-DOS Application Programs
Chapter 4 MS-DOS Programming Tools
Chapter 5 Keyboard and Mouse Input
Chapter 6 Video Display
Chapter 7 Printer and Serial Port
Chapter 8 File Management
Chapter 9 Volumes and Directories
Chapter 10 Disk Internals
Chapter 11 Memory Management
Chapter 12 The EXEC Function
Chapter 13 Interrupt Handlers
Chapter 14 Installable Device Drivers
Chapter 15 Filters
Chapter 16 Compatibility and Portability

SECTION 2 MS-DOS FUNCTIONS REFERENCE

SECTION 3 IBM ROM BIOS AND MOUSE FUNCTIONS REFERENCE


SECTION 4 LOTUS/INTEL/MICROSOFT EMS FUNCTIONS REFERENCE

For Download:

http://www.ziddu.com/download/8005419/MS-DOSProgramming.pdf.html

ADOBE Flex Programming & Applications

Adobe Flex3 Advanced Data Visualization Developer Guide

http://www.ziddu.com/download/7968324/AdobeFlex3AdvancedDataVisualizationDeveloperGuide.pdf.html

Adobe Flex3 Compiler API User Guide

http://www.ziddu.com/download/7968450/AdobeFlex3CompilerAPIUserGuide.pdf.html

Adobe Flex3 Developer Guide

http://www.ziddu.com/download/7968511/AdobeFlex3DeveloperGuide.pdf.html

Adobe Flex3 Programming ActionScript 3

http://www.ziddu.com/download/7968509/AdobeFlex3ProgrammingActionScript3.pdf.html

Building And Deploying Adobe Flex 3 Applications

http://www.ziddu.com/download/7968507/BuildingAndDeployingAdobeFlex3Applications.pdf.html

Creating And Extending Adobe Flex 3 Components

http://www.ziddu.com/download/7968502/CreatingAndExtendingAdobeFlex3Components.pdf.html

Developing Flex Applications

http://www.ziddu.com/download/7968506/DevelopingFlexApplications.pdf.html

Flex ActionScript Language Reference

http://www.ziddu.com/download/7968508/FlexActionScriptLanguageReference.pdf.html

Getting Started With Flex

http://www.ziddu.com/download/7968505/GettingStartedWithFlex.pdf.html

Using Adobe Flex Builder 3

http://www.ziddu.com/download/7968504/UsingAdobeFlexBuilder3.pdf.html

Using Flex Builder

http://www.ziddu.com/download/7968503/UsingFlexBuilder.pdf.html

Saturday, January 9, 2010

DBMS Lab Manual

Company database Along with queries
bank data base Along with queries
sailors_reserves_boats database Along with queries

pl/sql programs

1 write a pl/sql program to display the numbers from 30 to 40.
2 write a pl/sql program to find the area of circle
3 Fibonacci series
4 Factorial:
5 odd numbers
6 prime number

Function:

Procedure:

FUNCTION USING CASE STATEMENTS:

EXCEPTION HANDLING:

TRIGGERS

Download:

http://www.ziddu.com/download/8005381/DBMSPrograms.doc.html

Detail Description of C language

About Algorithms

http://www.ziddu.com/download/8088549/Algo.pdf.html

About Files

http://www.ziddu.com/download/8088547/Files.pdf.html

About Functions

http://www.ziddu.com/download/8088550/Functions.pdf.html

About Pointers

http://www.ziddu.com/download/8088548/Pointers.pdf.html

About Strings

http://www.ziddu.com/download/8088552/Strings.pdf.html

About Arrays

http://www.ziddu.com/download/8088551/Arrays.pdf.html

Tricks to Solve Maths Easy

Contents:

Algebraic Functions

http://www.ziddu.com/download/8088431/Algebra_Cheat_Sheet.pdf.html

Trigonometric Functions

http://www.ziddu.com/download/8088432/Trig_Cheat_Sheet.pdf.html

Laplace Transforms

http://www.ziddu.com/download/8088430/Laplace_Table.pdf.html

Derivatives & Integrals

http://www.ziddu.com/download/8088429/Common_Derivatives_Integrals.pdf.html

Calculus

http://www.ziddu.com/download/8088433/Calculus_Cheat_Sheet_All.pdf.html

DML/DDL COMMANDS & More (DBMS)

DML/DDL COMMANDS

Done in SQL



CREATION OF TABLES:

INSERTION OF VALUES INTO TABLES:

SELECT COMMAND:

AGGREGATES

NUMERIC FUNCTIONS

CHARACTER FUNCTIONS:

DATE FUNCTIONS:

VIEWS

JOIN COMMAND

QUERIES

1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED THE GREEN BOAT?
3.FIND THE SIDs OF SAILORS WHO HAVE RESERVED A RED BOAT?
4.FIND THE COLOURS OF BOATS RESERVED BY LUBBER?
5.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED ON MONDAY?
6.FIND THE NAMES OF THE SAILORS WHOSE AGE IS GREATER THAN 16?
7.FIND THE COLOUR OF THE BOATS RESERVED BY THE SAILORS WHOSE AGE IS GREATER THAN 25?

NESTED QUERIES

1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE SAILORS WHO HAVE NOT RESERVED BOAT 103?
3.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED A RED BOAT?

GROUP BY CLAUSE

1.FIND THE AGE OF THE YOUNGEST SAILOR FOR EACH RATING LEVEL?

2.FIND THE AVERAGE AGE OF SAILORS FOR EACH RATING LEVEL THAT HAS ATLEAST TWO SAILORS?

CORELATED NESTED QUERIES

1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE NAMES OF THE SAILOR WITH BID=103?
3.FIND THE NAMES OF SAILORS WHO HAVE NOT ACQUIRED BID =103

PL/SQL PROGRAMS

1.FIND THE SUM OF TWO INTERGERS?
2.FIND THE AVERAGE OF 3 INTEGERS?
3.FIND THE RESULT OF THE STUDENT?
4.FIND WHETHER THE GIVEN NUMBER IS EVEN OR ODD?
5.PRINTIN THE FIRST 20 INTEGERS?
6.PRINTING SUM OF GIVEN NUMBERS?
7.FINDING FACTORIAL OF GIVEN NUMBER?

EXCEPTIONS

ZERO_DIVIDE Exception
Catch 'divide by zero' exception
OTHERS Exception

CASES

OTHERS

TRIGGERS

What is a Trigger?
Syntax of Triggers
1) Create the 'product' table and 'product_price_history' table
2) Create the price_history_trigger and execute it.
3) Lets update the price of a product.
4)If you ROLLBACK the transaction before committing to the database, the data inserted to the table is also rolled back.

Download Following Link For Above Programs:

http://www.ziddu.com/download/8088346/SQL.doc.html

DBMS Programs

Data Base Management Programs (DBMS)

Done in oracle 10G


1) To find sum of 2 given numbers
2) To find average of 3 given numbers
3) To check whether a student is pass or fail for a given mark
4) To find whether a given number is odd or even
5) To find factorial of a given number
6) To calculate sum of numbers from m to n
7) To check whether given number is prime or not
8) To display numbers from m to n
9) Exception zero_divide1
10) Exception zero_divide2
11) Exception zero_divide3
12) Invalid number exception
13) Others exception
14) Others exception should be at the end
15) Creation of table
16) Insertion of values
17) Selection of a table
18) Views
19) Aggregate functions
20) Joins
21) Conversion functions
22) Number functions
23) Case function
24) Date functions
25) Calculating area of circle for given radius

For Above Programs Download Following Link:

http://www.ziddu.com/download/8088156/DBMS.doc.html

More Examples:

Bank Database Schema:

http://www.ziddu.com/download/8088154/bankdatabase.doc.html

Sailor Database Schema:

http://www.ziddu.com/download/8088157/salorsdatabase.doc.html

Company Database Schema:

http://www.ziddu.com/download/8088155/companydatabase.doc.html

All Data Structure Programs in C++

1. Krushkals Alg. (kruskals.cpp)
2. Job sequencing (jsd.cpp)
3. Mergesort (NMergeso.cpp)
4. Quicksort (qsort.cpp)
5. Stack using Arrays (stack1.cpp)
6.Stacks using Linked Lists (stkll.cpp)
7.PROGRAM TO CIRCULAR QUEUES USING ARRAYS
8.Deque using linked lists
9.PROGRAM TO IMPLEMENT NON RECURSIVE INORDER TRAVERSAL
10.PROGRAM TO IMPLEMENT NON RECURSIVE PREORDER TRAVERSAL
11.PROGRAM TO IMPLEMENT NON RECURSIVE POSTORDER TRAVERSAL
12.Binary search
13.Queens problem
14.Binary Search Tree15.program to implement heap sort
16.AVL TREE17.All Pairs Shortest Path
18.Implementation of Single Source Shortest Path problem
19.Implementation of Optimal Binary Search Tree
20.Implementation of Prims Alg
21.Greedy Knapsack Problem implementation
22.BFT for a graph23.DFS of a graph
24.Queue using Arrays
25.Queue using Linked Lists

Download Above Programs From:

http://www.ziddu.com/download/8088032/datastructureprograms.doc.html

MASM Programs (MPI)

MASM Programs (MPI)

1. Separation of prime numbers and composite numbers in given array.
2. Arranging list of elements in an array in ascending order.
3. Calculating GCD of two given numbers.
4. Calculating LCM of two given numbers.
5. Calculating largest number in an array.
6. Separation of positive numbers and negative numbers in given array.
7. Calculating whether a given number is prime or not.
8. Calculating smallest number in an array.
9. Finding square root of a given number.

Download above Programs from:

http://www.ziddu.com/download/8088033/MASMPrograms.rar.html


Complete Lab Manual:

i.MICROPROCESSOR 8086

M.1
1. Introduction
2. Using Turbo – Assembler-Linker-Debugger
(TASM, TLINK, TD)
3. Introduction to the trainer & Instructions to user
M.2
1. a). 8bit addition
b). 16bit addition
2. a). 8bit subtraction
b). 16bit subtraction
3. a). 8bit multiplication
b). 16bit multiplication
4. a). 8bit division
b). 16bit division
5. Multi byte addition
6. Multi byte subtraction
7. Signed multiplication
8. Signed division
9. ASCII addition
10. ASCII subtraction
11. ASCII multiplication
12. ASCII division
M.3
1. Packed to unpacked BCD
2. BCD to ASCII conversion
M.4
1. Block Transfer
2. String Reversal
3. String insertion
4. String deletion
5. Length of string
6. String comparison
M.5
1. Program design example (calculator)
M.6
1. DOS interrupts

ii. INTERFACING

1. I8279 Keyboard/Display Interface
2. I8086 LED’s & switch interface

iii. MICROCONTROLLER 8051

1. I8051 LED’s & switch interface
2. Transferring a block of data from Internal ROM to internal RAM
3. a) Internal ROM to external RAM
b) Internal ROM to external RAM
4. Understanding the three memory areas of 00-FF

Download above Lab Manual from:

http://www.ziddu.com/download/8088034/MPILabManual.pdf.html

Unix Shell Programs

Unix ( Shell Programs )

1. A) Write a shell script to perform integer arithmetic operations.

B) Write a shell script to perform floating point arithmetic operations.

2. Write a shell script to display first 10 natural numbers.

3. Write a shell script to find out the factorial of the given number.

4. Write a shell script to find out whether the given number is prime number or not.

5. Write a shell script to find out sum of the digits of the given number.

6. Write a shell script that takes a command line argument and reports on whether it is directory, a file, or something else.

7. Write a shell script that computes the gross salary of a employee according to the following rules:
i) If basic salary is <1500 then HRA=10% of the basic and DA=90% of the basic.
ii) If the basic salary is >=1500 then HRA= Rs500 and DA=98% of the basic
The basic salary is entered interactively through the key board.

8. Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions.

9. Develop an interactive script that asks for a word and a file name and then tells how many times that word occurred in the file.

10. Write a shell script that takes a login name a s command-line argument and reports when that person logs in

11. Write a shell script which receives two file names a s arguments. It should check whether the two file contents are same or not. If they are same then second file should be deleted.

12. Write an interactive file-handling shell program. Let it offer the user the choice of copying, removing, renaming, or linking files. Once the user has made a choice, have the program ask the user for the necessary information, such as the file name and so on.

13. Write a shell script to search for particular element from an array of elements.

14. Write a shell script to accept a string in the command line and reverse the same string.

15. Write a shell script to find out whether the given string is Palindrome or not

Download All Programs By Following Link:

http://www.ziddu.com/download/8087687/Unix.doc.html

Java Lab Manual

1. Write a Java program that prints all real solutions to the quadratic equation ax2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant
b2 -4ac is negative, display a message stating that there are no real solutions.

2. The Fibonacci sequence is defined by the following rule. The fist two values in the sequence are 1 and 1. Every subsequent value is the run of the two values preceding it. Write a Java program that uses both recursive and non recursive functions to print the nth value in the Fibonacci sequence.

3. Write a Java program that prompts the user for an integer and then prints out all prime numbers up to that. Integer.

4. Write a Java program that checks whether a given string is a palindrome or not. Ex: MADAM is a palindrome.

5. Write a Java program for sorting a given list of names in ascending order.

6. Write a Java program to multiply two given matrices.

7. Write a Java Program that reads a line of integers, and then displays each integers, and the sum of all the integers (use stringtokenizer class.

8. Write a Java program that reads on file name from the user then displays information about whether the file exists, whether the file is readable, whether the file is writable, the type of file and the length of the file in bytes.

9. Write a Java program that reads a file and displays a file and displays the file on the screen, with a line number before each line.

10. Write a Java program that displays the number of characters, lines and words in a text file.

11. Write a Java program that:Implements stack ADT.

12. Write an applet that displays a simple message.

13. Write an applet that computes the payment of a loan based on the amount of the loan, the interest rate and the number of months. It takes one parameter from the browser: Monthly rate; if true, the interest rate is per month; other wise the interest rate is annual.

14. Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the + - X % operations. Add a text field to display the result.

15. program for handling mouse events.

16. Write a java program for creating multiple threads.

17. Write a Java program that correctly implements producer consumer problem using the concept of inter thread communication.

18. Write a Java program that lets users create Pie charts. Design your own user interface (with swings & AWT)

19. Write a Java program that allows the user to draw lines, rectangles and ovals.

20. Write a Java program that implements a simple client/server application. The client sends data to a server. The server receives the data, uses it to produce a result, and then sends the result back to the client. The client displays the result on the console. For ex: The data sent from the client is the radius of a circle, and the result produced by the server is the area of the circle.

21.Write a Java program that illustrates how run time polymorphism is achieved.

Download All Programs With The Following Link:

http://www.ziddu.com/download/8087586/java_lab_manual.doc.html

  © For Movies Click Here Softwares by For Games Click Here 2010

Back to TOP