PoiNtEr->: 2010

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Friday, December 31, 2010

Intermediate code Generation :Compiler Design:

Why Intermediate Representation is important???
Front end translates a program into intermediate representation.Its good to translate in IR because now we can use different back ends to convert the same code in different destination language ,so it give an ease to the construction of different compiler.Thats why every compiler programmer wants its middle phase to be intermediate representation.
hence benefits of IR are
1:Retargeting (as explained above)
2:Now we can use machine independent optimizer to optimize the produced intermediate code as the produced intermediate code is neither in source language form nor in destination language form .

figure showing intermediate code generator
kinds of IR are:
1:syntax tree
2:three address code
3:postfix
Syntax tree:
it depicts the hierarchical structure of source program
Postfix:
it is a lineralised representation of syntax tree
Three addess code:
A three address code is a sequence of statements of general form:
Z=x op y



In some books IR techniques are divided in following category
1:high level representation
2:low level representation
High level Representation is further divided into following:
1:Abstract syntax tree
2:Directed Acyclic Graph
3:P-code
Low level Representation
1:Three Address code
/* I will discuss three address code in detail in next of my posts */

Thursday, December 30, 2010

apache and Php5 in ubuntu

Step 1: install Apache2:

sudo apt-get install apache2

And you get apache2 installed as well. To double check, point your browser to http://localhost, and you should see the Apache2 placeholder page like this.

Step 2: To install support for PHP, do the usual

sudo apt-get install php5 libapache2-mod-php5

To verify that everything installed correctly and php support is enabled, you need to restart apache by doing this

sudo /etc/init.d/apache2 restart

Create a test php file called info.php, using a text editor of your choice (say gedit)

sudo gedit /var/www/info.php

and paste the following content and save the file

<?php

phpinfo();

?>

Now open the following page http://localhost/info.php and you should see something like this

Wednesday, December 29, 2010

BooTsTraPPing (CompilEr)

All this may seem to be skirting around a really nasty issue - how might the first high-level
language have been implemented? In ASSEMBLER? But then how was the assembler for
ASSEMBLER produced?

A full assembler is itself a major piece of software, albeit rather simple when compared with a
compiler for a really high level language, as we shall see. It is, however, quite common to define
one language as a subset of another, so that subset 1 is contained in subset 2 which in turn is
contained in subset 3 and so on, that is:

 

Bootstrapping

 

One might first write an assembler for subset 1 of ASSEMBLER in machine code, perhaps on a
load-and-go basis (more likely one writes in ASSEMBLER, and then hand translates it into
machine code). This subset assembler program might, perhaps, do very little other than convert
mnemonic opcodes into binary form. One might then write an assembler for subset 2 of
ASSEMBLER in subset 1 of ASSEMBLER, and so on.

This process, by which a simple language is used to translate a more complicated program, which
in turn may handle an even more complicated program and so on, is known as bootstrapping, by
analogy with the idea that it might be possible to lift oneself off the ground by tugging at one’s boot-straps.

Tuesday, December 28, 2010

First and Follow (compiler)

The construction of a predictive parser is aided by two functions associated with a grammar G. These

functions, FIRST and FOLLOW, allow us to fill in the entries of a predictive parsing table for G, whenever

possible. Sets of tokens yielded by the FOLLOW function can also be used as synchronizing tokens during

panic-mode error recovery.

just suppose for a sec that you r ll(1) parser and you have n supernatural power of seeing the future of string by one step.

in above statement that supernatural power is nothing but finding follow of given non-terminal to predict the next items....

hope u got the point ...n ya dnt take super natural shit seriously ... ;)

FIRST(α)

If α is any string of grammar symbols, let FIRST(α) be the set of terminals that begin the strings derived

from α. If α ⇒ ε then ε is also in FIRST(α).

To compute FIRST(X) for all grammar symbols X, apply the following rules until no more terminals or ε can

be added to any FIRST set:

1. If X is terminal, then FIRST(X) is {X}.

2.If X → ε is a production, then add ε to FIRST(X).

3.If X is nonterminal and X →Y1 Y2 ... Yk . is a production, then place a in FIRST(X) if for some i, a is in

FIRST(Yi), and ε is in all of FIRST(Y1), ... , FIRST(Yi-1); that is, Y1, ... ,Yi-1 ⇒ ε. If ε is in FIRST(Yj) for

all j = 1, 2, ... , k, then add ε to FIRST(X). For example, everything in FIRST(Y1) is surely in

FIRST(X). If Y1 does not derive ε, then we add nothing more to FIRST(X), but if Y1⇒ ε, then we add

FIRST(Y2) and so on.

Now, we can compute FIRST for any string X1X2 . . . Xn as follows. Add to FIRST(X1X2 ... Xn) all the non-

ε symbols of FIRST(X1). Also add the non-ε symbols of FIRST(X2) if ε is in FIRST(X1), the non-ε symbols

of FIRST(X 3) if ε is in both FIRST(X 1) and FIRST(X2), and so on. Finally, add ε to FIRST(X1X2 ... Xn) if,

for all i, FIRST(X i) contains ε.

FOLLOW(A)

Define FOLLOW(A), for nonterminal A, to be the set of terminals a that can appear immediately to the right

of A in some sentential form, that is, the set of terminals a such that there exists a derivation of the form

S⇒αΑaβ for some α and β. Note that there may, at some time during the derivation, have been symbols

between A and a, but if so, they derived ε and disappeared. If A can be the rightmost symbol in some

sentential form, then $, representing the input right endmarker, is in FOLLOW(A).

To compute FOLLOW(A) for all nonterminals A, apply the following rules until nothing can be added to any

FOLLOW set:

1.Place $ in FOLLOW(S), where S is the start symbol and $ is the input right endmarker.

2.If there is a production A ⇒ αΒβ, then everything in FIRST(β), except for ε, is placed in FOLLOW(B).

3.If there is a production A ⇒ αΒ, or a production A ⇒ αΒβ where FIRST(β) contains ε (i.e., β ⇒ε),

then everything in FOLLOW(A) is in FOLLOW(B).

EXAMPLE

Consider the expression grammar :

E → T E’

E’→ + T E’ | ε

T → F T’

T’→ * F T’ | ε

F → ( E ) | id

Then:

FIRST(E) = FIRST(T) = FIRST(F) = {( , id}

FIRST(E’) = {+, ε}

FIRST(T’) = {*, ε}

FOLLOW(E) = FOLLOW(E’) = {) , $}

FOLLOW(T) = FOLLOW(T’) = {+, ), $}

FOLLOW(F) = {+, *, ), $

/*important point to note ...most of student do mistake while finding follow..please remember if u r finding follow and applying rule2 then that doesnt mean that now you dont have to check for condition 3,check for it also if condition applies then follow its rules also */

/* have any problem then feel free 2 comment*/

Secrets Of C language

I was solving problems some time ago and came to know some good facts about c and c++ and wrote some interesting codes.

1. A C program which can print the file name it is kept in ;) .

#include<stdio.h>

main(){

printf(“the source file name is %s\n”,__FILE__);

}

actually __FILE__ is a macro which stands for the file name the programme is kept in and the compiler does the rest.

2. Usage of assignment suppression operator in scanf – Suppose you have some crap input (the input is provided to you but that is not of any use to your program) then what normally we do is take a dummy variable and scan the input in that variable. Example -

int dummy;

scanf(“%d”,&dummy);

but there is one more method which can save memory and time

what you do is

scanf(“%*d”);

In this method, we provide a character * to the scanf function and by doing that; scanf will scan the input from standard input but it wont assign it to any variable. This is scanned in a buffer of sufficient size and you dont have to worry about that.

3. Printing something with variable width -

Suppose you are to print some formatted output in some program and for that sometime you require to print a variable in a fix width ..

for example if you have to pring an integar in width of 5 or more then you do

printf(“%5d”, var);

now if var is 10 it will append 2 leading spaces to complete the atleast 5 width rule.

now suppose you dont want leading spaces but leading zeroes, then here is another method to write the same -

printf(“%05d”,var);

now if var is 10 it will print 00010 and so on.

Another condition comes if the width in which we want to print the variable is not known at the compile time – suppose you want to print variable with a width which is contained in another variable, then we can use -

printf(“%*d”,x,var);

here x is the width length variable. Whenever we do this * operator .. then it looks for the next integar argument provided in the arguments and then assumes that it is the width in which the variable is to be printed.

Now if x = 2 then it will b the same as

printf(“%2d”,var); ..

this way we can work with this width thing pretty well.

If any of you guys know some nice facts about c or cpp language, then please post them as comments. Any gud suggestions related to things I posted are also welcome. Have Fun

Saturday, December 25, 2010

Wget Commands(UbUnTu)

it is usually installed in all Linux distros, but if not we can install it.

Debian / Ubuntu

apt-get install wget

Fedora / CentOS

yum install wget

Sabayon

emerge wget

Now lets explore some of its features.

If there is the need to download a single page.

wget http://www.site.com/file.pdf

But if there is the need to download the entire site, use the recursive option.

wget -r http://www.site.com

Now what to do if only certain file types are needed?

Use the -A option

To download only pdf and jpg use.

wget -r -A pdf,jpg http://www.site.com

Well now suppose that there is the need to follow external links, usually wget does not do this, here we can use -H option.

wget -r -H -A pdf,jpg http://www.site.com

This is a little bit dangerous as it could end up downloading a lot much files that the ones needed, so we could limit the sites to follow, we will use -D for this.

wget -r -H -A pdf,jpg -Dfiles.site.com http://www.site.com

By default wget will follow 5 levels when using -r option, we can change this behaviour with the -l option.

wget -r -l 2 http://www.site.com

This way only two levels depth will be followed

Concept of Pointers

click here to download entire pdf

HeRmiTe Spline( For computer Graphics,B.tech C.S)

Hermite spline ( named after ~the French ~

mathematician Charles ~Hermite) is an

interpolating piecewise cubic polynomial with a specified tangent at each control

point.

Unlike the natural cubic splines, Hermite splints can be adjusted locally

because each curve section is only dependent on its endpoint constraints.

If P(L)represents a parametric cubic point function for the curve section be-

tween control points pi and pk, a s shown in Fig. then the boundary

conditions that define this Hermite spline is

with Dpk and Dpk+1,

specifying the values for the parametric derivatives (slope of

the curve) a t control points pk and p k + respectively.

We can write the vector equivalent of above equation for hermite also:

where the x component of P is,

and similarly for the

y and z components

The matrix equivalent of above equation

and the derivative of thin point function can be expressed as

Hermite polynomials can be useful for some digitizing applications where

it may not be too difficult to specify or approximate the curve slopes. But for

most problems in computer graphics, it is more useful to generate spline curves

without requiring input values for curve slopes or other geometric information,

in addition to control-point coordinates. Cardinal splines and Kochanek-Bartels

splines, discussed in the following two sections, are variations on the Hermite

splines that d o not require input values for the curve derivatives at the control

points. Procedures for these splines compute parametric derivatives from the co-

ordinate positions of the control points.

Substituting endpoint values and 1 for parameter u Into the previous two equations, we can express the Hermite boundary conditions

Hermite polynomials can be useful for some digitizing applications where

it may not be too difficult to specify or approximate the curve slopes. But for

most problems in computer graphics, it is more useful to generate spline curves

without requiring input values for curve slopes or other geometric information,

in addition to control-point coordinates. Cardinal splines and Kochanek-Bartels

splines, discussed in the following two sections, are variations on the Hermite

splines that d o not require input values for the curve derivatives at the control

points. Procedures for these splines compute parametric derivatives from the co-

ordinate positions of the control points.

lex program

The following is an example of a lex program that implements a rudimentary scanner for a Pascal-like syntax:

%{

/* Need this for the call to atof() below. */

#include <math.h>

/* Need this for printf(), fopen(), and stdin below. */

#include <stdio.h>

%}

DIGIT [0-9]

ID [a-z][a-z0-9]*

%%

{DIGIT}+ {

printf("An integer: %s (%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);

"{"[^}\n]*"}" /* Eat up one-line comments. */

[ \t\n]+ /* Eat up white space. */

. printf("Unrecognized character: %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();

}

/*command required to run program on linux is "lex <filename.l>" ,where ".l" is extension of lex file.you can also google flex and download it to run above.*/

/*after running above program you will get a "lex.yy.c" if you are using flex. */

A Newbies guide to Linux



/*Comments are encouraged and motivates author to write more interesting posts*/
Over the years there has been tremendous growth in Desktop Linux , and Linux distributions these days are getting more and more user friendly with all kind of fancy graphical interface . Still the power of Linux or any other UNIX distribution lies in it console and shell commands . Now even though shell is often considered difficult by Linux newbies still it's possible to learn few basic commands , and in this article I'll try to explain basic commonly used console commands .
The general format of Linux command line :
$ command -options target
Where target is target filename or expression
Some Commonly used Linux commands : -
Showing Currently working directory
The command prints the current working directory , for example
$ pwd
/home/vishal
It shows /home/vishal because /home/vishal is the currently working directory .
Listing files in the directory : -
ls -a :- Displays all the files in the directory , by default ls does not show hidden files( hidden files start with (.) )
ls -l :- Displays the detailed listing of the files in the directory , information like Permission , links , owner , group , size , date , name are displayed
ls -S : the -S option displays the file list in a sorted fashion with the biggest sized file displayed first
ls -sS : the -s option displays file size before the filename combined with -S option it displays a sorted list of files currently in directory with the filesize infront of the filename.
ls -Sr : the -r option combined with -S displays the sorted list of files in the current directory with the smallest sized file displayed first.
ls -sSh : the command displays the sorted list of files in the directory with the file size displayed in a more understandable fashion.
ls -F : this command displays the list of files and directory with directories ending with (/) , executable files with (*) , Symbolic links with ( @)
Removing Directories/File : -
rm directory_name/File_name : Removes directory , Files
rm – i filename/directory_name : Removes directory/file with confirmation
rm -rf filename/directory_name : Removes directory and sub-directory recursively , -f stands for Force
rm -r Directory_Name : Removes directory if it is empty
Copying completely one directory to another directory
cp -r source_directory_name destination_directory_name
-r stands for Recursively
Creating Archives :
gzip (GNU Zip)
gzip can be used for compressing a single file , it is not meant for compressing entire directories as other file formats do . The default extension used bu gzip archives is (.gz) .
gzip filename.ext would create a file name filename.gz and replace the existing filename.ext file with filename.ext.gz file which is compressed gzip archive , the gzip command retains the file's attributes the modification,time stamp, access etc.
The compression level of the file can be varied by using options from 1 to 9 while compressing a file
gzip -1 filename.ext would compress the file quicker but with less compression.
gzip -9 filename.ext would compress the file slower but with more compression.
the default compression level is 6.
The filesize of compressed gzip archive would depend on the orignal file format it would do well with a non - archived file such as txt,doc,bmp etc but would fair poorly with JPG , PNG etc which are already compressed by some algorithm.
The gzipped file can be decompressed by using the gzip -d or gunzip command at the command line.
the default file extension used by gzip archives is .gz if you want to use a different file extension it could be done by using the -S option
example : gzip -S .x filename.ext would create a archive by the name of filename.ext.x
tar ( Tape archiver )
The tar program combines a number of files and directory in a single file which then can be compressed using a gzip or bzip2 program to reduce it's file size.
tar -cvf file.tar file1 file2 file3 file4 : This would create a tar archive combining the file1 file2 and file3 into a single file the archive have the same name as the file1 since we have specified the -f option which makes tar use the first option as the filename of the archive , -c tells the tar program to create a archive and -v option displays all the background information on the screen.
tar -cvf file.tar file1.tar file/ : This command would create a archive named file.tar with file1.tar and file subdirectory as the content of the archive .
tar -cvzf file.tar.gz file1 file2 file3 file/ : This command would create a tar file consisiting of the files and directory specified and then the file is compressed using the gzip program, to create a final archive file.tar.gz.
tar -cvjf file.tar.bz2 file1 file2 file3 file/ : This command would create a tar file consisiting of the files and directory specified and then the file is compressed using the bzip2 program, to create a final archive file.tar.bz2
tar -xvf file.tar : This command would extract all the files contained in the tar file file.tar
tar -xvjf file.tar.bz2 : This command would extract all the files contained in the file file.tar.bz2 , it would first call the bzip2 program to extract the file.tar and the call tar to extract the file.tar and it's conetent.
tar -xvzf file.tar.gz : This command would extract all the files contained in the file.tar.gz , it would first call the gzip program to extract the file.tar and then call tar to extract file.tar and it's content.
If you have created the file.tar but want to add some file(s) later it can be done using the following command and using the -rf option .
tar -rf file.tar file(s)
bzip2
The bzip2 is similar to gzip program but compresses file better and more effectively as compared to gzip program . The default extension used by bzip2 program is (.bz2) , the usage of bzip2 is very similar to the gzip program but has some additional options , which are described here .
bzip2 -k filename.ext : This commmand would create a archive of the filename.ext but would also keep a copy of the orignal file unlike gzip which replaces existing file with the the new archive file.
the bzip2 program also has different compression level ranging from 1 -least to 9-maximum . which can be set by using syntax like : bzip2 -1 filename.ext
bzip2 archives can be extracted by using the bzip2 -d option or by using the program bunzip2 .
Displaying file in the console
$ cat file-name(s)
The above command displays the content of file one after the another .
cat v1 v2 v3 > v4 This statement would combine the content of textfile v1,v2,v3 and create a new file v4 having all the content of three files.
cat v4 >> v5 This statement would append v4 file at the end of file v5. To end the statement type (Ctrl + D (EOF))
cat > filename << STOP This statement would create a filenamed filename at the console and accept input from the user for the file , the file is ended(terminated ) on pressing Ctrl + D.
$ more file-name
The above command displays the content of file page-wise , asking user to press a key usually “space bar” when the entire screen is filled to move on to next screen. The command is particularly useful for long files.
$ head File-Name
The above command displays the first few lines of the file .
$ tail file-name
The above command displays the last few lines of the file .
$ wc file-name
The above command would count the lines , words and characters of the file .
Creating Soft-Link/File -Aliases
If you are right now in /home/xyz directory and you issue the following command , it would create a soft-link of the file( file-name ) in the directory /home/xyz
$ ln -s /path/file-name
Searching Commands
$ grep -r “Text” *
The above command would display all the files in the current directory and all it's sub-directory having “Text” by searching recursively .
$ grep -n “Text” filename
The above command search for “Text” in the file-name and displays the line-number where the text was found .
$ grep “file[- ] name “ file
The above command searches for text “file-name” and “file name” in the file and displays it on the screen .
$ find file-name
the above command searches for file-name in directory hierarchy .
Some Other Miscellaneous Commands
$ cal
Commands displays calendar on the screen
$ clear
The command clears the console screen of any text
$ man command
Gives information about command
$ passwd
Above command allows changing of password of logged in user
$ df
Above command displays the free diskspace .
$ who
The command shows the user who are logged into the system .
$ env
Shows environment variables
$ ps
Shows running processes
$ top
The above command shows a dynamic real-time view of running system . It displays system summary information as well as list of task being managed by the linux kernel .

Friday, December 10, 2010

C Graphics Programming in Ubuntu

C Graphics Programming in Ubuntu (how to run c graphics program on ubuntu?? ANswer is here->)

An EasY solution for all those who want to run c graphics program on Ubuntu

libgraph - library providing the TurboC graphics API ( graphics.h) in Linux using SDL.

For using this , you need to follow some simple steps as mentioned below:

First of all, you need to install the dependencies so that all the required compiler tools gets installed.For that you need to run the given command on the terminal:

sudo apt-get install build-essential

Next you need to install some packages. They are: libsdl-image1.2,libsdl-image1.2-dev,guile-1.8 and guile-1.8-dev. For that run the given command at the terminal:

sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev

Now, download and install libgraph-1.0.2.tar.gz from the link :

http://mirror.veriportal.com/savannah/libgraph/

Download this file in any folder and extract it in the home folder or on the desktop wherever you want.

Open the terminal and navigate to the folder where you have extracted libgraph-1.0.2 with the help of cd command. Install this using the commands given below:

./configure (Return)

sudo make (Return)

sudo make install (Return)

After this you can start your C graphics programming in linux. Now try writing a simple C graphics program by including the header file "graphics.h". You can do the programs as you in TURBO C.

For writing the programs you can use the "gedit" tool in ubuntu. For compiling the programs, navigate to the source program folder and use the following command:

gcc filename.c -lgraph

if u get string conversion error try this:

gcc filename -lgraph -Wno-write-string

if you get this error(/tmp/ccYXvPbQ.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'

collect2: ld returned 1 exit status

)

then try this

gcc filename -lstdc++ -lgraph -Wno-write-strings

For executing the program, use the command ./a.out

The error “./a.out: error while loading shared libraries: libgraph.so.1: cannot open shared object file: No such file or directory” can be solved by

sudo cp /usr/local/lib/libgraph.* /usr/lib

Have any problem feel free to post it here.

Saturday, November 27, 2010

Facts about India

FaCts YoU mUst KnoW

1. India is one of only three countries that makes supercomputers (the US and Japan are other two)

2.India is one six countries that launches satellites

3.The Bombay stock exchange list more than 6000 companies. Only the NYSE has more

4. Eight Indian companies are listed on the NYSE; three on the NASDAQ

5. By volume of pills produced, the Indian pharmaceutical industry is the world's second largest after china

6. India has the second largest community of software developers, after the US

7. India has the second largest network of paved highways, after the US

8. India is the world's largest producer of milk, and among the top five producers of sugar, cotton,tea, coffee, spices, rubber, rubber, silk and fish

9. 100 of the Fortune 500 companies have R & D facilities in India

10. Two million people of Indian origin live in the US

11. Indian born Americans are among the most affluent and best educated of the recent immigrants groups in the US

12. 30% of the R & D researchers in American pharmaceutical companies are indian americans.

13. Nearly 49% of the high tech startups in silicon valley and washington DC are owned by Indian and Indian american

14. India sends more students to US college than any country in the world. Last year more than 80000 students

Wednesday, November 24, 2010

GATE-2011

                                       GATE-2011 Computer Science & Engineering
(This might help you to prepare)

GATE is the most coveted entrance exam acting as a pathway to higher education , for the technical graduates.
The demography of the examinees writing GATE largely comprises of the students from private engineering colleges
who due to some reason or the other haven't been able to crack AIEEE or JEE belying their talent after +2.
For them, it is the best chance to prove that they too deserve a place in India's premier T-Schools.
I would like to address some of the issues and confusions that the aspirants face during the period of GATE preparation. I will present the answer to some FAQs(frequently asked questions ) here that most students ask. I will be oriented towards CS&IT because I am a CS student and I don't have ideas about other branches. But most parts of the article should be useful for every branch. If you are a non-CS student you can skip the parts where I've delved into CS specifics.
Please note that everything in this article reflects my view and may not comply to everyone else's view.
Q-1. Is coaching necessary for success in GATE?
Ans. No it is not. But joining a test series from any good coaching institute is what I recommend. Every test exposes some part of the syllabus you aren't proficient with. So you can work and repair yourself with that part.
Q-2. I don't have GATEForum or Brilliant study material. How should I study?
Ans. You don't need any third party study material if you seriously want to crack GATE. You just need the standard course books and previous year GATE papers. I'll suggest the best course books for the subjects later in the article, but only for CS&IT because I'm a CS student.
Q-3. How should I prepare?
Ans. Well, if you have studied properly during your B.Tech/B.E. then you don't need to prepare!!! Hehehe! But noone actually studies seriously during B.Tech/B.E.! Engineering is fun time! Passing exams during B.Tech/B.E involves mugging up the important stuff the night before paper and vomiting everything in the answer book! Back to our topic now, well if you have slight ideas of every subject, at least the overview i.e. what the subject is all about and some other basic fundas then you can prepare easily. Just collect all the standard books and previous year papers. Identify the topics which are source to questions in the previous papers and study the topics seriously and thoroughly, followed by practicing questions asked in papers from previous years. That was the way I prepared. As an added advantage, join a test series. To further add up, try to collect test series papers from other institutes from your friends if you can. The crux is that, study the topics and practice more and more and more ..... and more and even more and yet even more questions.
Q-4. How to perform self study?
Ans. Answered in Q-3. I'm emphasizing self-study only.
Q-5. How to start GATE preparations?
Ans. Collect standard books. If you have sold them then collect anyhow, from your friends or from the seconds sale books market or anywhere you can. Then identify the topics from previous year papers and make a list for each subject. The list should be sorted in descending order of the frequency of topic in GATE papers. For example: for TOC I had identified the most frequent topic as "Identifying the grammar or language". For Computer Architecture, "Pipelining" and "Cache memory" were hot topics. in Data Structures and Algorithms "Trees" were hot. I've misplaced my list, otherwise I would have posted it for the students.
Q-6. I'm a working professional, I don't have time. Can I even dream of GATE?
Ans. If your CS concepts are clear, you don't need to dream, because you can do it! You just need 2 hours every day for 3 months. Thats enough to crack GATE.
Q-7. Which books should I study for CS&IT?
Ans.
1. Operating Systems: 1. Galvin, Gagne & Siberschatz or 2. William Stallings
2. Computer Architecure: M. Morris Mano
3. TOC: Ullman, Hopcroft and Rajeev Motwani(He is no more in this world! :-( He was the guide for Sergey Brin, the Google co-founder, you can check Brin's blog about Late Rajeev Motwani http://too.blogspot.com/2009/06/remembering-rajeev.html)
4. Digital Logic and Circuits: M. Morris Mano
5. C Programming: C - The complete reference by Herbert Schildt. Study pointers especially in this book.
6. Data Structures: 1. Schaum series from TMH. Writer is Seymour Lipschutz or 2. A V Aho, Ullman and Hopcroft
7. Compiler Design: A.V.Aho and Ullman
8. DBMS: 1. Elmasri and Navathe or 2. Raghu Rama Krishnan
9. Algorithms: 1. Introduction to algorithms by Cormen and 2. Sartaz Sahni and Ellis Horowitz
10. Networking: 1. Andrew S. Tanebaum AND 2. Forouzan
11. Software Engineering: Pressman
12. Discrete Mathematics: Seymour Lipschutz
Q-8. I'm not sure I can crack GATE. Should I go for it?
Ans. Yeah you can, if you have a mind that loves to learn instead of mug. Go for it!
Q-9. I don't understand TOC, or subject X. Should I study it?
Ans. You can drop a subject if you hate it. Concentrate and focus more on subjects that you are interested with.
1. http://indifun.in/gate/resources
Collection of text books
2. http://johnpatrick.vndv.com/gate
Collection of more text books as well as several PPTs
3. http://johnpatrick.vndv.com/gate/papers
All previous year papers
4. http://hpc.serc.iisc.ernet.in/~govind/hpc/
Awesome collection of lecture notes from India's best T-School i.e.
Indian Institute of Science Bangalore(IISc, Bangalore)
5. http://www.itl.nist.gov/div897/sqg/dads/
Dictionary of data structures
6. http://www-math.cudenver.edu/~wcherowi/courses/m4408/gtln.html
Graph theory material
7. http://www.csanimated.com/animation.php?t=B-tree
An ultimate guide to B-Tree data structures
8. http://webster.cs.ucr.edu/AoA/Windows/HTML/MemoryArchitecturea2.html
Memory architecture
9. http://www.d.umn.edu/~gshute/arch/cache.html
Jargon buster for cache memories
10. http://www.cs.iastate.edu/~prabhu/Tutorial/title.html
A very good tutorial on Computer Architecture
11. http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/
Basic concepts in computer organization
12. http://www.mec.ac.in/resources/notes/index.html
Online DS and Automata material from MEC
13. http://www.cs.odu.edu/~toida/nerzic/content/schedule/schedule.html
Discrete mathematics material
14. http://www.ugrad.cs.ubc.ca/~cs421/notes/
Automata theory excellent stuff
15. http://people.csail.mit.edu/rinard//osnotes/
Operating Systems material
16. http://www.nos.org/htm/course.htm
Some very basic stuff for beginners
17. http://www.gateguru.org/automata.html
Automata theory previous years GATE papers solved
18. http://cpualgorithm.blogspot.com/
CPU Scheduling example code in C
19. http://www.po28.dial.pipex.com/maths/formulae.htm
Some handy mathematical formulae
20. These are links to useful material from NPTEL(NATIONAL PROGRAM FOR
TECHNOLOGY ENHANCED LEARNING) program run by IITs, which puts all
their lecture notes on the web.
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-%20Guwahati/comp_org_arc/web/index.htm
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/compiler-desing/ui/TOC.htm
http://www.cdeep.iitb.ac.in/nptel/Computer%20Science/Design%20and%20Analysis%20of%20Algorithms/TOC.htm
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-%20Guwahati/data_str_algo/frameset.htm
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-%20Guwahati/afl/index.htm
21.http://www.techvyom.com
e-book hub .
Thanks. I believe I answered most of the queries that arise in the minds of aspirants, but still if you have some doubt in your mind I would love to see the feedback and questions. You may comment here or mail me
(not orignal post ,go to link 21 for more help regarding course material and e-books)

Sunday, November 21, 2010

Zeest is BaCk...!!

yeah your all time favourite Zeest is back with its new Song "100RUPAI"

after the huge success of BC Sutta now they are back again after 7years....

Nice song you all Must check it out

specially die-heart fans of BC SUTTA

CLICK HERE

Saturday, November 6, 2010

SHAURYA 2010

SHAURYA-2010
26th North Zone Inter-University Youth Festival
November 21-25, 2010







Organized by
Bundelkhand University, Jhansi
Under the aegis of
Association of Indian Universities, New Delhi
Sponsored by
Ministry of Youth Affairs & Sports
Government of India






for participating and further queries please click here
Or Go To IET JHANSI BLOG

Thursday, August 19, 2010

airTEL song in C LANGUAGE




#include<stdio.h>
#include<graphics.h>
#include<dos.h>
float main(void)
{
float A,Bb,D,G,F;
A = 440;
G = 780;
Bb = 461;
D = 586;
F = 687;
sound(G);
delay(500);
nosound();
sound(G);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(G);
delay(500);
nosound();
sound(2*D);
delay(500);
nosound();
sound(2*A);
delay(250);
nosound();
sound(2*Bb);
delay(250);
nosound();
sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(500);
nosound();
sound(2*A);
delay(500);
nosound();
sound(G);
delay(250);
nosound();
sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound();

sound(G);
delay(500);
nosound();
sound(G);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(G);
delay(500);
nosound();
sound(2*D);
delay(500);
nosound();
sound(2*A);
delay(250);
nosound();
sound(2*Bb);
delay(250);
nosound();
sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(500);
nosound();
sound(2*A);
delay(500);
nosound();
sound(G);
delay(250);
nosound();
sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound();

sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound();

sound(2*A);
delay(250);
nosound();
sound(G);
delay(250);
nosound();
sound(F);
delay(250);
sound(G);
delay(250);
sound(2*A);
delay(250);
sound(2*Bb);
delay(500);
sound(2*A);
delay(500);
sound(G);
delay(250);
sound(F);
delay(250);
sound(D);
delay(500);
nosound();
return 0;
}


Wednesday, August 11, 2010

I.E.T,JHANSI



                                     Institute of Engineering & Technology,jhansi


           



                                                              http://www.ietjhansi.blogspot.com/


Thursday, August 5, 2010

How to print from an iPad?


Here's a simple way to print things from Apple iPad:




Why India is still a Developing Country ... a short story



Why India is still a Developing Country ... a short story




An Old Story:


The Ant works hard in the withering heat all summer building its house and laying up supplies for the winter. The Grasshopper thinks the Ant is a fool and laughs and dances and plays the summer away.

Come winter, the Ant is warm and well fed. The Grasshopper has no food or shelter so he dies out in the cold.


Indian Version:


The Ant works hard in the withering heat all summer building its house and laying up supplies for the winter. The Grasshopper thinks the Ant's a fool and laughs and dances and plays the summer away.

Come winter, the shivering Grasshopper calls a press conference and demands to know why the Ant should be allowed to be warm and well fed while others are cold and starving. NDTV, BBC, CNN show up to provide pictures of the shivering Grasshopper next to a video of the Ant in his comfortable home with a table filled with food.

The World is stunned by the sharp contrast. How can this be that this poor Grasshopper is allowed to suffer so?

Arundhati Roy stages a demonstration in front of the Ant's house.

Medha Patkar goes on a fast along with other Grasshoppers demanding that Grasshoppers be relocated to warmer climates during winter .

Mayawati states this as 'injustice' done on Minorities.

Amnesty International and Koffi Annan criticize the Indian Government for not upholding the fundamental rights of the Grasshopper.

The Internet is flooded with online petitions seeking support to the Grasshopper (many promising Heaven and Everlasting Peace for prompt support as against the wrath of God for non-compliance) .

Opposition MPs stage a walkout. Left parties call for ' Bengal Bandh' in West Bengal and Kerala demanding a Judicial Enquiry.

CPM in Kerala immediately passes a law preventing Ants from working hard in the heat so as to bring about equality of poverty among Ants and Grasshoppers.

Mamta Bannerji allocates one free coach to Grasshoppers on all Indian Railway Trains, aptly named as the 'Grasshopper Rath'.

Finally, the Judicial Committee drafts the ' Prevention of Terrorism Against Grasshoppers Act' [POTAGA], with effect from the beginning of the winter.

Kapil Sibbal makes 'Special Reservation ' for Grasshoppers in Educational Institutions & in Government Services.

The Ant is fined for failing to comply with POTAGA and having nothing left to pay his retroactive taxes, it’s home is confiscated by the Government and handed over to the Grasshopper in a ceremony covered by NDTV.

Arundhati Roy calls it ' A Triumph of Justice'.

Mamta calls it 'Socialistic Justice '.

CPM calls it the ' Revolutionary Resurgence of the Downtrodden '

Koffi Annan invites the Grasshopper to address the UN General Assembly.


Many years later ...


The Ant has since migrated to the US and set up a multi-billion dollar company in Silicon Valle. 100s of Grasshoppers still die of starvation despite reservation somewhere in India.

AND

As a result of loosing lot of hard working Ants and feeding the grasshoppers, India is still a developing country !


Last Words


Usually I stay away from publishing other people's contents on this blog. However, this post actually breaks the rule. The above is an post i have seen on some other blog....



Wednesday, July 14, 2010

RajEsH pOem in HaPpY DaYs moVie


If you can keep your head when all about you
Are losing theirs and blaming it on you,
If you can trust yourself when all men doubt you
But make allowance for their doubting too,
If you can wait and not be tired by waiting,
Or being lied about, don't deal in lies,
Or being hated, don't give way to hating,
And yet don't look too good, nor talk too wise:

If you can dream--and not make dreams your master,
If you can think--and not make thoughts your aim;
If you can meet with Triumph and Disaster
And treat those two impostors just the same;
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build 'em up with worn-out tools:
If you can make one heap of all your winnings
And risk it all on one turn of pitch-and-toss,
And lose, and start again at your beginnings
And never breath a word about your loss;
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: "Hold on!"
If you can talk with crowds and keep your virtue,
Or walk with kings--nor lose the common touch,
If neither foes nor loving friends can hurt you;
If all men count with you, but none too much,
If you can fill the unforgiving minute
With sixty seconds' worth of distance run,
Yours is the Earth and everything that's in it,
And--which is more--you'll be a Man, my son!
--Rudyard Kipling

Tuesday, June 29, 2010

Command Prompt in fuLL Screen in Window7 and Vista

     sTeps to get full window of command prompt in Window7 n VisTa

                                                                     



          1:  open command prompt

          2:  type:WMIC ,then press enter

          3:  after dat jst click on full window tab...here u get..

    for latest software news go to :   www.9down.com

Tuesday, May 4, 2010

how to run turbo c in full screen mode in vista n windows 7...?

steps:

1:download turbo c n install it on your system click here 2 download nw

2:now download dosbox .click here to download

3:install dosbox

4:open it and mount d drive on which turbo c is installed

ex: here i installed in c drive so command will be

mount c c:\

now go in c drive by giving command

c:

now go to directory where tc.exe is present lyk in my case itis bin folder under tc folder in c drive,it cn be differnt for different turbo c setups

cd tc

cd bin

tc

after typing above three command u will get tc screen pree ALt+ENTER  for full screen

:note:if u get error likeUNABLE to INCLUDE <HEADER> then check directory in option tab of  turbo explorer n correct it 2 accord to urs....:

for

WINDOW 7




jst go 2 device manager n disable video driver n u will get full screen

happing coding frm :

Vishal Mishra


                                      http:// vishalmishraoo7.blogspot.com

Saturday, May 1, 2010

Numb by LiNkiN pArK

someWhere I bEloNg by LiNkiN paRk..

                                                                  one of ma fav linkin's song here it goes.......:


[Verse 1]
I had nothing to say
and i get lost in the nothingness inside of me
(i was confused)
and i live it all out to find, but im not the only person wit these things in mind
(inside of me)
but all that they can see the words revealed
is the only real thing that i got left to feel
(nothing to lose)
just stuck hollow and alone
and the fault is my own and the fault is my own

[Chorus]
i wanna heal i wanna feel what i thought was never real
i wanna let go of the pain ive felt so long.
erase all the pain til its gone
i wanna heal i wanna feel like im close to something real.
i wanna find something ive wanted all along
somewhere i belong

and i got nothing to say. i cant believe i didnt fall right down on my face
(i was confused)
look at everywhere only to find.
it is not the way i had imagined it all in my mind.
(so what am i)
what do i have but negativity
cuz i cant trust no one by the way everyone is looking at me
(nothing to lose)
nothing to gain im hollow and alone
and the fault is my own
and the fault is my own

[repeat chorus]

[Verse 3] (Chester)
I will never know myself until i do this on my own
cuz i will never feel anything else until my wounds are healed
i will never be anything til i break away from me
i will break away. ill find myself today



A WiSh....

I wish this should not happen to anybody. So people speak out if you Love someone...

This is a love story of some guy..

10th Grade:-

As I sat there in English class,
I stared at the girl next to me.
She was my so called 'best friend'.
I stared at her long, silky hair,
and wished she was mine.
But she didn't notice me like that,
and I knew it.
After class,
she walked up to me and asked me for
the notes she had missed the day before.
I handed them to her.She said 'thanks'
and gave! me a kiss on the cheek.
I want to tell her, I want her to know
that I don't want to be just friends,
I love her but I'm just too shy,
and I don't know why.


11th grade:-

The phone rang. On the other end,
it was her. She was in tears,
! mumbling on and on about how
her love had broke her heart.
She asked me to come over
because she didn't want to be alone, So I did.
As I sat next to her on the sofa, I stared at her
soft eyes, wishing she was mine.

After 2 hours, one Drew Barrymore movie,
and three bags of chips,
she decided to go home.
She looked at me, said 'thanks'
and gave me a kiss
on the cheek..I want to tell her,
I want her to know that
I don't want to be just friends,
&n! bsp; I love her but I'm just too shy,
and I don't know why.

Senior year:-

One fine day she walked to my locker.
"My date is sick" she said,
"hes not gonna go" well,
I didn't have a date, and in 7th grade,
we made a promise that
if neither of us had dates,
we would go together just as 'best friends'.
So we did.
That night, after everything was over,
I was standing at her front door step.
I stared at her as She smiled at me
and stared at me with her crystal eyes.
! Then she said- "I had the best time, thanks!"
and gave me a kiss on the cheek.
I want to tell her,
I want her to know
that I don't want to be just friends,
I love her but I'm just too shy,
and I don't know why.

Graduation:-

A day passed, then a week, then a month.
Before I could blink, it was graduation day.
up on stage to get her diploma.
I wanted her to be mine-but
she didn't notice me like that, and I knew it.
Before everyone went home,
she came to me in her smock and hat,
and cried as I hugged her.
Then she lifted her head from my shoulder
and said- 'you're my best friend,
thanks' and gave me a kiss on the cheek.
I want to tell her,
I want her to know
that I don't want to be just friends,
I love her but I'm just too shy,
and I don't know why.

Marriage:-

Now I sit in the pews of the church.
That girl is getting married now.
and drive off to her new life,
married to another man.
I wanted her to be mine,
but she didn't see me like that,
and I knew it.
But before she drove away,
she came to me and said 'you came !'.
She said 'thanks' and kissed me on the cheek.
I want to tell her,
I want her to know
that I don't want to be just friends,
&nbs! p; I love her but I'm just too shy,
and I don't know why.

Death:-

Years passed, I looked down at the coffin
of a girl who used to be my 'best friend'.
At the service, they read a diary entry
she had wrote in her high school years.
This is what it read:
'I stare at him wishing he was mine,
but he doesn't notice me like that,
and I know it.
I want to tell him,
I want him to know that
I don't want to be just friends,
I love him but I'm just too shy,
and I don't know why.
I wish he would tell me he loved me !
.........'I wish I did too...'

I thought to my self, and I cried.


Friday, April 30, 2010

FaCts U mUst KnoW

Facts about India....

1. India is one of only three countries that makes supercomputers (the US and Japan are other two)

2.India is one six countries that launches satellites

3.The Bombay stock exchange list more than 6000 companies. Only the NYSE has more

4. Eight Indian companies are listed on the NYSE; three on the NASDAQ

5. By volume of pills produced, the Indian pharmaceutical industry is the world's second largest after china

6. India has the second largest community of software developers, after the US

7. India has the second largest network of paved highways, after the US

8. India is the world's largest producer of milk, and among the top five producers of sugar, cotton,tea, coffee, spices, rubber, rubber, silk and fish

9. 100 of the Fortune 500 companies have R & D facilities in India

10. Two million people of Indian origin live in the US

11. Indian born Americans are among the most affluent and best educated of the recent immigrants groups in the US

12. 30% of the R & D researchers in American pharmaceutical comapnies are indian american

13. Nearly 49% of the high tech startups in silicon valley and washington DC are owned by Indian and Indian american

14. India sends more students to US college than any country in the world. Last year more than 80000 students


Thursday, April 29, 2010

best peom 2008 nominated by un



This poem was nominated by the UN as the best poem of 2006
Written by an African Kid
When I born, I black
When I grow up, I black
When I go in Sun, I black
When I scared, I black
When I sick, I black
And when I die, I still black
And you white fellow
When you born, you pink
When you grow up, you white
When you go in sun, you red
When you cold, you blue
When you scared, you yellow
When you sick, you green
And when you die, you gray
And you calling me colored :)??


LiFe



Life,
What is it? I ask this question to myself.. In this journey of 19 so called years (?), had seen many faces,came across untold truths, trying to figure out mystery which keeps us going.Sometimes I think to myself, why I am doing this? "WHY" for me the real mystery of life...why sometimes people compromise on most valuable things of life and sometimes give up for least one. How we can love someone passionately and at the same time hate someone. Why we think there is right and wrong when there is only 'right'.
Sometime we think "Life is beautiful' and sometimes it sucks. Do life changes..for me No.. it is same, right from the moment I was born. For me it is journey, like a rollar coaster ride.. just enjoy it.. take it as experience...and try best to use it..
Most of us infact all of us want to be successful in life. What makes one successful? by following path of successful people? I would rather say one should meet the people who faced the failure so that you should not repeat those mistake.Life is like a dream, but one thing is most common between them, as you can dream about what you want, you can have a life you want. What is difference between success and failure.. just lack of vision..
Action, drama, thriller, horror, comedy, romance, sci-fi...dis is life for me...
Camera is rolling, lights are ON, and I am da only leading actor, standing on a set, and enjoying my act....
Action...............

c program dat shows printf returns a value



#include<stdio.h>




#include<conio.h>




main()




{




printtf("%d",printf("richa"));




getch();




}




output: richa5




here five is d value which printf return dat shows how many charactr it will print.....



Sunday, April 25, 2010

print %d using printf statement in c language




#include<stdio.h>




#include<conio.h>




main()




{




printf("%%d");




getch();




}