Mind you, I saw this in actual production code. It makes my heart break... :cry:
Code:if(result == true)
return true;
else
return false;
Printable View
Mind you, I saw this in actual production code. It makes my heart break... :cry:
Code:if(result == true)
return true;
else
return false;
I saw that as well in some code (thankfully not in production yet):
Code:void MyClass::setName(string name)
{
name = m_name;
}
This is a better way to get a zero:Quote:
Originally Posted by Apollyon
:cool:Quote:
MSDN
lpdwHandleCode:DWORD GetFileVersionInfoSize(
LPTSTR lptstrFilename, // file name
LPDWORD lpdwHandle // set to zero
);
[out] Pointer to a variable that the function sets to zero.
Recently, a group of computer scientists (all male) announced that computers should also be referred to as being female. Their reasons for drawing this conclusion follows:
Five reasons to believe computers are female:
1) No one but the Creator understands their internal logic.
2) The native language they use to communicate with other computers is incomprehensible to everyone else.
3) The message "Bad command or file name" is about as informative as, "If you don't know why I'm mad at you, then I'm certainly not going to tell you."
4) Even your smallest mistakes are stored in long-term memory for later retrieval.
5) As soon as you make a commitment to one, you find yourself spending half your paycheck on accessories for it.
However, another group of computer scientists (all female) think that computers should be referred to as if they were male.
Their reasons follow:
1) They have a lot of data, but are still clueless.
2) They are supposed to help you solve problems, but half the time they ARE the problem.
3) As soon as you commit to one you realize that, if you had waited a little longer, you could have obtained a better model.
4) In order to get their attention, you have to turn them on.
5) Big power surges knock them out for the rest of the night.
Mom comes to visit her son Kumar for dinner...who lives with a girl
roommate Sunita...
During the course of the meal, his mother couldn't help but notice how
pretty Kumar's roommate was. She had long been suspicious of a
relationship between the two, and this had only made her more curious.
Over the course of the evening, while watching the two interact, she
started to wonder if there was more between Kumar and his roommate
than met the eye.
Reading his mom' s thoughts, Kumar volunteered," I know what you must
be thinking, but I assure you, Sunita and I are just roommates."
About a week later, Sunita came to Kumar saying, "Ever since your
mother came to dinner, I' ve been unable to find the silver jar. You
don't suppose she took it, do you? "
"Well, I doubt it, but I 'll email her, just to be sure " So he sat
down and wrote:
Dear Mother,
I 'm not saying that you did take the silver jar from my house, I 'm
not saying that you did not take the jar. But the fact remains
that it has been missing ever since you were here for dinner.
Love, Kumar
Several days later, Kumar received an email from his Mother which
read:
Dear Son,
I 'm not saying that you do sleep with Sunita, and I'm not saying that
you do not sleep with Sunita. But the fact remains that if she were
sleeping in her OWN bed, she would have found the silver jar by now.
Love, Mum.
Moral of the Story..... Don' t Lie to Your Mother...
That is a very nice story ;)
Supernatural
There was this case in the hospital's Intensive care
ward where patients always died in the same bed and on Sunday
morning at 11a.m., regardless of their medical condition.
This puzzled the doctors and some even thought that it had
something to do with the supernatural. No one could solve
the mystery as to why the deaths took place at 11 AM. So a worldwide
expert team was constituted and they decided to go down
to the ward to investigate the cause
of the incidents. So on the next Sunday morning few minutes
before 11a.m., all doctors and nurses nervously waited
outside the ward to see for themselves what the terrible
phenomenon was all about. Some were holding wooden crosses,
prayer books and other holy objects to ward off evil. Just
then the clock struck 11...and then...and then...and
then.
Santa Singh, the part-time Sunday sweeper, entered the
ward and unplugged the life support system & plugged
in the vacuum cleaner.
Look carefully, Hollywood movies:
Many annoying web pages you have visited,
try this :D
Length of a situation
1. The length of a minute depends on which side of the bathroom door you are standing on.
2. Auto-mechanic to customer : I'm afraid you have more of a problem than I anticipated Your battery needs a new car.
3. A young businessman had just started his own firm. He'd rented a beautiful office and had it furnished with antiques. Sitting there, he saw a man come into the outer office. Wishing to appear busy, the businessman picked up the phone and started to pretend he had a big deal working. He threw huge figures around and made giant commitments. Finally, he hung up and asked the visitor, "Can I help you?" The man said, "Sure. I've come to install the phone!"
4.To steal ideas from one person is plagiarism; to steal from many is research.
5. President Calvin Coolidge and his wife were once visiting a state fair when a prize rooster was brought to the attention of the first lady, "This rooster does its love duty up to eight times a day, ma'am." A surprised Mrs. Coolidge replied, "Please pass along that information to the president." Having heard the comment, Mr. Coolidge asked the rooster owner, "Eight times a day, eh? With the same hen?" The owner replied, "No, sir, with a different hen each time." The president replied with a smile, "Please pass that along to Mrs. Coolidge
*~ Type Of Girls ~*
HARD-DISK Girls:
She remembers everything, FOREVER.
RAM Girls:
She forgets about you, the moment you turn her off.
WINDOWS Girls:
Everyone knows that she can't do a thing right, but no one can live without her.
SCREENSAVER Girls:
She is good for nothing but at least she is fun!
INTERNET Girls:
Difficult to access.
SERVER Girls:
Always busy when you need her.
MULTIMEDIA Girls:
She makes horrible things look beautiful.
CD-ROM Girls:
She is always faster and faster.
E-MAIL Girls:
Every ten things she says, eight are nonsense.
VIRUS Girls:
Also known as "WIFE"; when you are not expecting her, she
comes, installs herself and uses all your resources. If you try to uninstall her you will lose something, if you don't try to uninstall her you will lose everything............
An engineer, a physicist, and a lawyer were being interviewed for a position as chief executive officer of a large corporation.
The engineer was interviewed first, and was asked a long list of questions, ending with "How much is two plus two?"
The engineer excused himself, and made a series of measurements and calculations before returning to the board room and announcing, "Four."
The physicist was next interviewed, and was asked the same questions. Before answering the last question, he excused himself, made for the library, and did a great deal of research. After a consultation with the United States Bureau of Standards and many calculations, he also announced "Four."
The lawyer was interviewed last, and was asked the same questions. At the end of his interview, before answering the last question, he drew all the shades in the room, looked outside the door to see if anyone was there, checked the telephone for listening devices, and asked,"How much do you want it to be?"
One evening recently, a mother entered her daughter's bedroom to discover it empty. As she looked around, she spied a letter over the bed. With trembling hands and a terrible sense of premonition, she read....
Dear Mom;
Please don't be mad, but I eloped with my new boyfriend. I finally found real love and he is so nice Mom, with all his piercings and tattoos and his big Harley. Not only that, I'm pregnant and Ahmed says we're going to be really happy in his trailer in the woods. He wants to have lots more children with me and you know that's one of my dreams too. Also, he taught me that marijuana doesn't hurt anyone and we're going to grow it for us and his friends, who will pay us by giving us all the cocaine and ecstasy we'll ever need and we'll pray every day for scientists to find the cure for AIDS so that Ahmed can get better. He deserves it. Don't worry Mom, I'm 15 years old now and I know how to take care of myself. Some day I'll visit so you can get to know your grandchildren.
Your daughter, Judith
After fainting, Mom came to and read the rest of the letter....
PS: Mom, it's not true. I'm next door at Janey's house. I just wanted to show you that there are worse things in life than the report card on my desk... love you!
A man was walking in the street when he heard a voice: "Stop! Stand still! If you take one more step, a brick will fall down on your head and kill you."
The man stopped and a big brick fell right in front of him. The man was astonished. He went on, and after awhile he was going to cross the road.
Once again the voice shouted, "Stop! Stand still! If you take one more step a car will run over you and you will die."
The man did as he was instructed, just as a car came careening around the corner, barely missing him.
"Where are you?" the man asked. "Who are you?"
"I am your guardian angel," the voice answered.
"Oh yeah?" the man asked..."And where were you when I got married?"
A couple came upon a wishing well. The husband leaned over, made a wish and threw in a penny. The wife decided to make a wish, too. But she leaned over too much, fell into the well, and drowned. The husband was stunned for a while but then smiled and said:
"It really works!"
At 4.30 am the telephone rings. "Hello, Master Carlos? This is Arnaldo your country house caretaker"
"Ah yes, Arnaldo. What can I do for you? Is there a problem?"
"Um, I am just calling to advise you, sir, that your parrot died"
"My parrot? Dead? The one that won the competition?"
"That's the one."
"Darn! That's such a pity! I spent a small fortune on that bird.
Oh well.........how did he die?"
"From eating rotten meat."
"Rotten meat? Who gave him rotten meat?"
"Nobody. He ate the meat of one of the dead horses."
"Dead horse? What dead horse Arnaldo?"
"Why, those pure breed ones that you had, sir. They died
from all that work pulling the water cart."
"Are you insane, Arnaldo? What water cart?"
"The one we used to put out the fire."
"Good Lord! What fire are you talking about, man?"
"The one at your house! A candle fell and then the
curtain caught on fire."
"What the.....!!! But there's electricity at the house!!!!
What was the candle for???"
"For the funeral."
"WHAT BLOODY FUNERAL???!!!!!"
"Your mother's! She showed up one night out of the blue and I
thought she was a thief, so I shot her."