About Me

My photo
Bangalore, Karnantaka, India
Hi Frndss... I am Divya Prakash, presently working as an ABAP consultant , simplicity is my Prime Importance n I beleive in " First Deserve then DESIRE ".

Friday, October 30, 2009

Just for ur SMILE :)


How to be cruel to old guys:

AARP Eye Chart

THE FOUR �STAGES OF LIFE

Mountain Story - An interesting short story

"A son and his father were walking on the mountains.
Suddenly, his son falls, hurts himself and screams: "AAAhhhhhhhhhhh!!!"
To his surprise, he hears the voice repeating, somewhere in the mountain: "AAAhhhhhhhhhhh!!!"
Curious, he yells: "Who are you?"
He receives the answer: "Who are you?"
And then he screams to the mountain: "I admire you!"
The voice answers: "I admire you!"
Angered at the response, he screams: "Coward!"
He receives the answer: "Coward!"
He looks to his father and asks: "What's going on?"
The father smiles and says: "My son, pay attention."
Again the man screams: "You are a champion!"
The voice answers: "You are a champion!"
The boy is surprised, but does not understand.
Then the father explains: "People call this ECHO, but really this is LIFE.
It gives you back everything you say or do.
Our life is simply a reflection of our actions.
If you want more love in the world, create more love in your heart.
If you want more competence in your team, improve your competence.
This relationship applies to everything, in all aspects of life;
Life will give you back everything you have given to it."

YOUR LIFE IS NOT A COINCIDENCE. IT'S A REFLECTION OF YOU!"
-- Divya Prakash

Tuesday, October 27, 2009

Tips to Search Better in GOOGLE...




T
his is an old one, but very important: Put quotes around phrases that must be searched together. If you put quotes around "electric curtains," Google won't waste your time finding one set of Web pages containing the word "electric" and another set containing the word "curtains."



Similarly, put a hyphen right before any word you want screened out. If you're looking up dolphins, for example, you'll have to wade through a million Miami Dolphins pages unless you search for "dolphins - Miami ."



Google is a global White Pages and Yellow Pages. Search for "phonebook:home depot norwalk , ct," Google instantly produces the address and phone number of the Norwalk Home Depot. This works with names ("phonebook: robert jones las vegas , NV") as well as businesses.



Don't put any space after "phonebook." And in all of the following examples, don't type the quotes I'm showing you here.

G oogle is a package tracker. Type a FedEx or UPS package number (just the digits); when you click Search, Google offers a link to its tracking information.



G oogle is a calculator. Type in an equation ("32+2345*3- 234=").



G oogle is a units-of-measuremen t converter. Type "teaspoons in a gallon," for example, or "centimeters in a foot."



G oogle is a stock ticker. Type in AAPL or MSFT, for example, to see a link to the current Apple or Microsoft stock price, graphs, financial news and so on.



Google is an atlas. Type in an area code, like 212, to see a Mapquest map of the area.

Google is Wal-Mart's computer. Type in a UPC bar code number, such as "036000250015, " to see the description of the product you've just "scanned in." (Thanks to the Google Blog,
http://google. blogspace. com
, for this tip and the next couple.)


G oogle is an aviation buff. Type in a flight number like "United 22" for a link to a map of that flight's progress in the air. Or type in the tail number you see on an airplane for the full registration form for that plane.



G oogle is the Department of Motor Vehicles. Type in a VIN (vehicle identification number, which is etched onto a plate, usually on the door frame, of every car), like "JH4NA1157MT001832, " to find out the car's year, make and model.



F or hours of rainy-day entertainment, visit
http://labs. google.com
. Here, you'll find links to new, half-finished Google experiments- like Google Voice, in which you call (650) 623-6706, speak the words you want to search for and then open your browser to view the results. Disclaimer: It wasn't working when I tried it. (Ditto a lot of these experiments. )

Source:

Garima :)

( My Class mate )

Can we directly compare two structures using the == operator?

No, you cannot!

The
only way to compare two structures is to write your own function that compares the structures field by field. Also, the comparison should be only on fields that contain data (You would not want to compare the next fields of each structure!).

A byte by byte comparison (say using memcmp()) will also fail. This is because the comparison might fonder on random bits present in unused "holes" in the structure (padding used to keep the alignment of the later fields correct). So a memcmp() of the two structure will almost never work. Also, any strings inside the strucutres must be compared using strcmp() for similar reasons.

There is also a very good reason why structures can be compared directly -
unions!. It is because of unions that structures cannot be compared for equality. The possibility that a structure might contain a union makes it hard to compare such structures; the compiler can't tell what the union currently contains and so wouldn't know how to compare the structures. This sounds a bit hard to swallow and isn't 100% true, most structures don't contain unions, but there is also a philosophical issue at stake about just what is meant by "equality" when applied to structures. Anyhow, the union business gives the Standard a good excuse to avoid the issue by not supporting structure comparison.



If your structures dont have stuff like floating point numbers, pointers, unions etc..., then you
could possibly do a memset() before using the structure variables..


memset (&myStruct, 0, sizeof(myStruct));



This will set the whole structure
(including the padding) to all-bits-zero. We can then do a memcmp() on two such structures.


memcmp (&s1,&s2,sizeof(s1));


But this is very
risky and can end up being a major bug in your code!. So try not to do this kind of memcmp() operations on structures variables as far as possible!

What are Trigraph characters?

These are used when you keyboard does not support some special characters


??= #
??( [
??) ]
??< {
??> }
??! |
??/ \
??' ^
??- ~

Can structures be assigned to variables and passed to and from functions?

Yes, they can!

But note that when structures are passed, returned or assigned, the copying is done only at one level (The data pointed to by any pointer fields is
not copied!.

When should a type cast be used?

There are two situations in which to use a type cast.

The first use is to change the type of an operand to an arithmetic operation so that the operation will be performed properly.

The second case is to cast pointer types to and from void * in order to interface with functions that expect or return void pointers. For example, the following line type casts the return value of the call to malloc() to be a pointer to a foo structure.


struct foo *p = (struct foo *) malloc(sizeof(struct foo));


A type cast should
not be used to override a const or volatile declaration. Overriding these type modifiers can cause the program to fail to run correctly. A type cast should not be used to turn a pointer to one type of structure or data type into another. In the
rare events in which this action is beneficial, using a union to hold the values makes the programmer?s intentions clearer.

When should the register modifier be used?

The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU?s registers, if possible, so that it can be accessed faster. There are several restrictions on the use of the register modifier.

First, the variable must be of a type that can be held in the CPU?s register. This usually means a single value of a size less than or equal to the size of an integer. Some machines have registers that can hold floating-point numbers as well. Second, because the variable might not be stored in memory, its address cannot be taken with the unary & operator. An attempt to do so is flagged as an error by the compiler. Some additional rules affect how useful the register modifier is. Because the number of registers is limited, and because some registers can hold only certain types of data (such as pointers or floating-point numbers), the number and types of register modifiers that will actually have any effect are dependent on what machine the program will run on. Any additional register modifiers are silently ignored by the compiler. Also, in some cases, it might actually be slower to keep a variable in a register because that register then becomes unavailable for other purposes or because the variable isn?t used enough to justify the overhead of loading and storing it. So when should the register modifier be used? The answer is never, with most modern compilers. Early C compilers did not keep any variables in registers unless directed to do so, and the register modifier was a valuable addition to the language. C compiler design has advanced to the point, however, where the compiler will usually make better decisions than the programmer about which variables should be stored in registers. In fact, many compilers actually ignore the register modifier, which is perfectly legal, because it is only a hint and not a directive.

What is the difference between constants defined through #define and the constant keyword?

A constant is similar to a variable in the sense that it represents a memory location (or simply, a value). It is different from a normal variable,in that it cannot change it's value in the proram - it must stay for ever stay constant. In general, constants are a useful because they can prevent program bugs and logical errors(errors are explained later). Unintended modifications are prevented from occurring. The compiler will catch attempts to reassign new values to constants. Constants may be defined using the preprocessor directive #define. They may also be defined using the const keyword. So whats the difference between these two?

#define ABC 5
and
const int abc = 5;

There are two main advantages of the second one over the first technique. First, the type of the constant is defined. "pi" is float. This allows for some type checking by the compiler. Second, these constants are variables with a definite scope. The scope of a variable relates to parts of your program in which it is defined. There is also one good use of the important use of the const keyword. Suppose you want to make use of some structure data in some function. You will pass a pointer to that structure as argument to that function. But to make sure that your structure is readonly inside the function you can declare the structure argument as const in function prototype. This will prevent any accidental modification of the structure values inside the function.
Hope this was useful....:)
- - - Div

Sunday, October 25, 2009

What is LUCK ?

Luck

He worked by day
And toiled by night.

He gave up play
And some delight.

Dry books he read
New things to learn.

And forged ahead
Success to earn.

He plodded on with
Faith and pluck;

And when he won,
Men called it luck.

Friday, October 23, 2009

7 DONT's after a meal

After a meal..



Don't smoke- Experiment from experts proves that smoking a cigarette after meal is comparable to smoking 10 cigarettes (chances of cancer is higher).



Don't eat fruits immediately -
Immediately eating fruits after meals will cause stomach to be bloated with air. Therefore take fruit 1-2 hr after meal or 1hr before meal.



Don't drink tea - Because tea leaves contain a high content of acid. This substance will cause the Protein content in the food we consume to be hardened thus difficult to digest.



Don't loosen your belt - Loosening the belt after a meal will easily cause the intestine to be twisted & blocked.


Don't bathe - Bathing will cause the increase of blood flow to the hands, legs & body thus the amount of blood around the stomach will therefore decrease. This will weaken thedigestive system in our stomach.

Don't walk about - People always say that after a meal walk a hundred steps and you will live till 99. In actual fact this is not true. Walking will cause the digestive system to be unable to absorb the nutrition from the food we intake.


Don't sleep immediately - The food we intake will not be able to digest properly. Thus will lead to gastric & infection in our intestine.

Its not an Elephant's job to follow THIS ...

Wednesday, October 21, 2009

Thursday, October 8, 2009

How to Propose a Girl in C++

#include
#include
#define Cute beautiful_lady

main()
{
goto college;
scanf("100%",&ladies);

if(lady ==Cute)
line++;
while( !reply )
{

printf("I Love U");

scanf("100%",&reply);
}

if(reply == "GAALI")
main(); _/* go back and repeat the process */

else if(reply == "SANDAL ")
exit(1);



else if(reply == "I Love U")
{
lover =Cute ;
love = (heart*)malloc(sizeof(lover));
}

goto restaurant;

restaurant:
{
food++;
smile++;
pay->money = lover->money;
return(college);
}

if(time==2.30)
goto cinema;

cinema:
{
watch++;
if(intermission)
{
coke++;
Popecorn++;
}
}

if(time ==6.00)
goto park;
}
}
{
for(time=6.30;time<= 8.30;time+=0.001)
kiss = kiss+1;// not applicable to kids...
}
free(lover);
return(home);
}

Monday, October 5, 2009

My Interview Experience with Indian Navy (UES SSC)

Hello frnds...
I would like to share my experience with Indian Navy selection under UES (University Entry Seheme).
Today at 9 am the Navy people gave a presentation about Navy and the selection process. Then they divided all the students(approx 180-200) from various colleges of Tamil Nadu into 3 groups A,B and C.
I was in group A batch 2. This division was to conduct a group discussion for about 15-20 min.
My group got the topic "Should the 10th board exam removed or not ???"
I gave my points in the discussion that eventually became Super Heated !!!
Other topics were :
->Plane crash- responsible who - Mgmt or Pilots??
->IQ and EQ ??
Around 1 : 45 pm results came out and I cleared the Gd round :)

Then we were asked to come for Interview at 2 45 pm....
I went to the office in our campus and after some time I got a call to go inside a cabin for the interview....The interview was basically an aptitude one...Qts covered were:
1.Ur games interests
2.Extracurricular details
3.Frnds opinion about u
4.Basic computer qts like wat is RAM, ROM, Spped of computer...etc
5.Why u want to join Navy?
6.U appeared for NCC?
7.Any past experience about Navy?
8. Say about ur family?
Like these types of qts....
then the officer told its k...n u can leave ...he was grading me simultaneously on 10 parameters.....
then I told Thank U sir n came out....
Hope this may be useful. Any further help of any sort, if needed, pl leave a comment or a mail....-:)
Urs
Div

Pic :)

Pic :)
Look at !!!