Saturday, July 25, 2009

Object oriented JS

I was going th the object oriented js and below is the basic example


function base (){};
base.prototype.foo=function(){
alert('base prototype foo');
};

var b = new base();
b.foo = function(){alert('base.foo');};

function sub(){};
sub.prototype=b;

function subsub(){};
subsub.prototype= new sub();

function sss(){};
sss.prototype=new subsub();

function test(){
//var b = new base();
alert('b.foo\n' + b.foo);
//alert('b.prototype foo\n' + b.prototype);
//var s0 = new sub();
//alert('s0.foo\n'+ s0.foo);
//alert('s0.prototype.foo\n' + s0.prototype.foo);
var ss= new sss();
alert( 'sss.foo\n' + ss.foo);
alert(sss.toString());
//ss.foo();
ss.prototype.foo();
};
test();








base is extended by sub, which is further extended by subsub. We create a new instance of this subsub and call the inherited method. simple.

Monday, July 20, 2009

Never argue with woman..

Never Argue with a Woman

One morning the husband returns after several hours
of fishing and decides to take a nap.
Although not familiar with the lake,
the wife decides to take the boat out.
She motors out a short distance,
anchors, and reads her book.


Along comes a Game Warden in his boat.
He pulls up alongside the woman and says,
'Good morning, Ma'am. What are you doing?'
'Reading a book,' she replies,
( thinking , 'Isn't that obvious ? ')



'You're in a
Restricted Fishing Area,' he informs her.



'I'm sorry, officer, but I'm not fishing. I'm reading'




'Yes, but you have all the equipment.
For all I know you could start at any moment.
I'll have to take you in and write you up.'



'For reading a book,' she replies
,

'You're in a Restricted Fishing Area,'
he informs her again,
'I'm sorry, officer, but I'm not fishing.
I'm reading'



'Yes, but you have all the equipment.
For all I know you could start at any moment.
I'll have to take you in and write you up.'



'If you do that,
I'll have to charge you with sexual assault ,'
says the woman.



'But I haven't even touched you,' says the game warden.



'That's true, but you have all the quipment.
For all I know you could start at any moment.'


'Have a nice day ma'am,' and he left.


MORAL :
Never argue with a woman who reads.
It's likely she can also think.

some images ....








Just for laughs

Woman inspires us to great things, and prevents us from achieving them.

"There's a way of transferring funds that is even faster than electronic banking. It's called marriage."

"I've had bad luck with both my wives. The first one left me, and the second one didn't."

Two secrets to keep your marriage brimming
1. Whenever you're wrong, admit it,
2. Whenever you're right, shut up.

The most effective way to remember your wife's birthday is to forget it once...

My wife and I were happy for twenty years. Then we met..

A good wife always forgives her husband when she's wrong.

First Guy (proudly): "My wife's an angel!"
Second Guy: "You're lucky, mine's still alive."

Wear the seat belt

Thursday, July 16, 2009

Thats MOM




WHEN I CAME DRENCHED IN THE RAIN…………………

BRO SAID : “ WHY DON’T YOU TAKE AN UMBRELLA WITH YOU?”

SISTER SAID:”WHY DIDN’T YOU WAIT TILL IT STOPPED”

DAD ANGRILIY SAID: “ONLY AFTER GETTING COLD YOU WILL REALISE”.

BUT MY MOM AS SHE WAS DRYING MY HAIR SAID”

“STUPID RAIN”


Tuesday, July 14, 2009

LockedHard Drive weight increasing?

heres a funny post my friend had just forwarded me... hope the author wanted to spread some smile and hence asked it.

http://social.answers.microsoft.com/Forums/en-US/vistahardware/thread/720108ee-0a9c-4090-b62d-bbd5cb1a7605

Monday, July 13, 2009

Art of dying....

q

Atom Bomb : An invention to end all inventions.



Boss : Someone who is early when you are late and late when you are early.



Cigarette : A pinch of tobacco rolled in paper with fire at one end and a fool on the other.


Etc. : A sign to make others believe that you know more than you actually do.



Experience : The name men give to their mistakes.

Opportunist : A person who starts taking a bath if he accidentally falls into a river.



Optimist : A person who while falling from Eiffel tower says midway "See I am not injured yet."
Smile : A curve that can set a lot of things straight.



Tears : The hydraulic force by which masculine will-power is defeated by feminine water power.

Q

Q

Don't take life too seriously; you'll never get out of it alive

Wednesday, July 8, 2009

Simple answers...

Sometimes, some of life's most difficult questions have a very simple
answers / solutions .........



Once upon a time a married couple celebrated their 25th marriage
anniversary. They had become famous in the city for not having a single
conflict in their period of 25 years. Local newspaper editors had
gathered at the occasion to find out the secret of their well known
"happy going marriage".

Editor: " Sir. It's amazingly unbelievable. How did you make this
possible? "
Husband recalling his old honeymoon days said: " We had been to Shimla
for honeymoon after marriage. Having selected the horse riding finally,
we both started the ride on different horses.

My horse was pretty okay but the horse on which my wife was riding
seemed to be a crazy one. On the way ahead, that horse jumped suddenly,
making my wife topple over. Recovering her position from the ground, she
patted the horse's back and said "This is your first time.". She again
climbed the horse and continued with the ride. After a while, it
happened again. This time she again kept calm and said "This is your
second time" and hopped back on the horse and continued riding. When the horse dropped her third time, she
silently took out the revolver from the purse and shot the horse dead !!


I shouted at my wife: "What did you do, you psycho. You killed the poor
animal. Are you crazy?"

She gave a silent look and said: "This is your first time!!!"

Husband: "Well, that's it. We are happy ever after."

Sunday, July 5, 2009

Suicide

Gratitude

THIS WOMAN IN THE VIDEO FOUND THIS LION INJURED IN
THE FOREST READY TO DIE. SHE TOOK THE LION WITH HER
AND NURSED THE LION BACK TO HEALTH. WHEN THE LION
WAS BETTER SHE MADE ARRANGEMENTS WITH A ZOO TO
TAKE THE LION AND GIVE IT A NEW AND HAPPY HOME.

THIS VIDEO WAS TAKEN WHEN THE WOMAN AFTER SOME TIME
WENT TO GO VISIT THE LION TO SEE HOW HE WAS DOING.


Bow and Arrow !!

What a pilot!