Monday, August 31, 2009

C# events vs. delegates

C# events vs. delegates

We have looked at delegates and their implementation in two previous articles. But if you searched some more information about delegates on the web, you surely noticed they are almost always associated with the "event" construct.
Online event tutorials make it look like events are something pretty different from regular delegates instance, although related. Events are usually explained as if they were a special type or construct. But we will see they really are a modifier on the delegate type, which adds some restrictions that the compiler enforces and also adds two accessors (similar to the get and set for properties).

A first look at event vs. regular delegate
As I was finishing my previous posts on delegates, another C# construct started baking my noodle: events. Events definitely seem related to delegates, but I couldn't figure out how they differ.

From their syntax, events look like a field holding a combination of delegates, which is just what a multicast delegate is. Also they support the same combination operators as delegates (+ and -).
In the following sample program (which has no useful functionality what-so-ever) we see that msgNotifier (with event construct) and msgNotifier2 (plain delegate) appear to behave exactly the same way for all intents and purposes.

using System;
namespace EventAndDelegate
{
delegate void MsgHandler(string s);

class Class1
{
public static event MsgHandler msgNotifier;
public static MsgHandler msgNotifier2;
[STAThread]
static void Main(string[] args)
{
Class1.msgNotifier += new MsgHandler(PipeNull);
Class1.msgNotifier2 += new MsgHandler(PipeNull);
Class1.msgNotifier("test");
Class1.msgNotifier2("test2");
}

static void PipeNull(string s)
{
return;
}
}
}

Looking at the IL code for the Main method in this code, you will notice that both delegates msgNotifier and msgNotifier2 are again used exactly the same way.
.method private hidebysig static void Main(string[] args) cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 )
// Code size 95 (0x5f)
.maxstack 4
IL_0000: ldsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier
IL_0005: ldnull
IL_0006: ldftn void EventAndDelegate.Class1::PipeNull(string)
IL_000c: newobj instance void EventAndDelegate.MsgHandler::.ctor(object,
native int)
IL_0011: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0016: castclass EventAndDelegate.MsgHandler
IL_001b: stsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier
IL_0020: ldsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier2
IL_0025: ldnull
IL_0026: ldftn void EventAndDelegate.Class1::PipeNull(string)
IL_002c: newobj instance void EventAndDelegate.MsgHandler::.ctor(object,
native int)
IL_0031: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0036: castclass EventAndDelegate.MsgHandler
IL_003b: stsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier2
IL_0040: ldsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier
IL_0045: ldstr "test"
IL_004a: callvirt instance void EventAndDelegate.MsgHandler::Invoke(string)
IL_004f: ldsfld class EventAndDelegate.MsgHandler EventAndDelegate.Class1::msgNotifier2
IL_0054: ldstr "test2"
IL_0059: callvirt instance void EventAndDelegate.MsgHandler::Invoke(string)
IL_005e: ret
} // end of method Class1::Main

Looking at the C# keywords list on MSDN. It turns out that event is only a modifier. The question is what modification does it bring?

The added value of event
Events and interfaces
First, an event can be included in an interface declaration, whereas a field cannot. This is the most important behavior change introduced by the event modifier. For example:
interface ITest
{
event MsgHandler msgNotifier; // compiles
MsgHandler msgNotifier2; // error CS0525: Interfaces cannot contain fields
}

class TestClass : ITest
{
public event MsgHandler msgNotifier; // When you implement the interface, you need to implement the event too
static void Main(string[] args) {}
}

Event invocation
Furthermore, an event can only be invoked from within the class that declared it, whereas a delegate field can be invoked by whoever has access to it. For example:

using System;
namespace EventAndDelegate
{
delegate void MsgHandler(string s);

class Class1
{
public static event MsgHandler msgNotifier;
public static MsgHandler msgNotifier2;

static void Main(string[] args)
{
new Class2().test();
}
}

class Class2
{
public void test()
{
Class1.msgNotifier("test"); // error CS0070: The event 'EventAndDelegate.Class1.msgNotifier' can only appear on the left hand side of += or -= (except when used from within the type 'EventAndDelegate.Class1')
Class1.msgNotifier2("test2"); // compiles fine
}
}
}

This restriction on invocations is quite strong. Even derived classes from the class declaring the event aren't allowed to fire the event. A way to deal with this is to have a protected virtual method to trigger the event.


Event accessors
Also, events come with a pair of accessor methods. They have an add and remove method.
This is similar to properties, which offer a pair of get and set methods.

You are allowed to override these accessors, as shown in examples 2 and 3 on this C# event modifier reference on MSDN. Although I don't see how example 2 is useful, you could imagine that you could have a custom add to send some notification or write a log entry, for example, when a listener is added to your event.
The add and remove accessors need to be customized together, otherwise you get error CS0065 ('Event.TestClass.msgNotifier' : event property must have both add and remove accessors).
Looking at the IL for a previous example, where the event accessors weren't customized, I noticed compiler generated methods (add_msgNotifier and remove_msgNotifier) for the msgNotifier event. But they weren't used, and whenever the event was accessed the same IL code was duplicated (inlined).
But when you customize these accessors and look at the IL again, you'll notice that the generated accessors are now used when you access the event. For example, this code :

using System;
namespace Event
{
public delegate void MsgHandler(string msg);

interface ITest
{
event MsgHandler msgNotifier; // compiles
MsgHandler msgNotifier2; // error CS0525: Interfaces cannot contain fields
}

class TestClass : ITest
{
public event MsgHandler msgNotifier
{
add
{
Console.WriteLine("hello");
msgNotifier += value;
}

}

static void Main(string[] args)
{
new TestClass().msgNotifier += new MsgHandler(TestDel);
}
static void TestDel(string x)
{
}
}
}

brings the following IL for the Main method:
{
.entrypoint
// Code size 23 (0x17)
.maxstack 4
IL_0000: newobj instance void Event.TestClass::.ctor()
IL_0005: ldnull
IL_0006: ldftn void Event.TestClass::TestDel(string)
IL_000c: newobj instance void Event.MsgHandler::.ctor(object,
native int)
IL_0011: call instance void Event.TestClass::add_msgNotifier(class Event.MsgHandler)
IL_0016: ret
} // end of method TestClass::Main

Event signature
Finally, even though C# allows it, the .NET framework adds a restriction on the signature of delegates that can be used as events. The signature should be foo(object source, EventArgs e), where source is the object that fired the event and e contains any additional information about the event.


Conclusion
We have seen that the event keyword is a modifier for a delegate declaration that allows it to be included in an interface, constraints it invocation from within the class that declares it, provides it with a pair of customizable accessors (add and remove) and forces the signature of the delegate (when used within the .NET framework).

Saturday, August 29, 2009

9 Important XML Syntax Rules You Must Know


9 Important XML Syntax Rules You Must Know



XML became a W3C Recommendation on February 10, 1998. It has been amazing to see how quickly the XML standard has developed, and how quickly a large number of software vendors have adopted the standard. The syntax rules of XML are very simple and logical. The rules are easy to learn, and easy to use.

1. All XML Elements Must Have a Closing Tag

In HTML, you will often see elements that don't have a closing tag:

This is a paragraph

This is another paragraph


In XML, it is illegal to omit the closing tag. All elements must have a closing tag:

This is a paragraph


This is another paragraph




Note: You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML document itself, and it has no closing tag.


2. XML Tags are Case Sensitive


XML elements are defined using XML tags.

XML tags are case sensitive. With XML, the tag is different from the tag .

Opening and closing tags must be written with the same case:

This is incorrect
This is correct


Note: "Opening and closing tags" are often referred to as "Start and end tags". Use whatever you prefer. It is exactly the same thing.


3. XML Elements Must be Properly Nested


In HTML, you might see improperly nested elements:

This text is bold and italic


In XML, all elements must be properly nested within each other:

This text is bold and italic


In the example above, "Properly nested" simply means that since the element is opened inside the element, it must be closed inside the element.

4. XML Documents Must Have a Root Element

XML documents must contain one element that is the parent of all other elements. This element is called the root element.



.....




5. XML Attribute Values Must be Quoted

XML elements can have attributes in name/value pairs just like in HTML.

In XML the attribute value must always be quoted. Study the two XML documents below. The first one is incorrect, the second is correct:


Tove
Jani




Tove
Jani



The error in the first document is that the date attribute in the note element is not quoted.

6. Entity References


Some characters have a special meaning in XML.

If you place a character like "<" inside an XML element, it will generate an error because the parser interprets it as the start of a new element.

This will generate an XML error:

if salary < 1000 then


To avoid this error, replace the "<" character with an entity reference:

if salary < 1000 then


There are 5 predefined entity references in XML:

< < less than
> > greater than
& & ampersand
' ' apostrophe
" " quotation mark


Note: Only the characters "<" and "&" are strictly illegal in XML. The greater than character is legal, but it is a good habit to replace it.


7. Comments in XML

The syntax for writing comments in XML is similar to that of HTML.



8. White-space is Preserved in XML


HTML truncates multiple white-space characters to one single white-space:

HTML: Hello my name is Tove
Output: Hello my name is Tove.


With XML, the white-space in a document is not truncated.

9. XML Stores New Line as LF

In Windows applications, a new line is normally stored as a pair of characters: carriage return (CR) and line feed (LF). The character pair bears some resemblance to the typewriter actions of setting a new line. In Unix applications, a new line is normally stored as a LF character. Macintosh applications use only a CR character to store a new line.

Sunday, August 23, 2009

ఇచ్చట పెళ్ళికొడుకులు అమ్మబడును

హైదరాబాదులొ ఈ మధ్య ఒక కొత్త mall తెరిచారు. ఇచ్చట పెళ్ళి కొడుకులు కూడా అమ్మబడును అని ప్రకటనలు ఇచ్చారు (అవును సరిగ్గా పెళ్ళైన కొత్తలో సినిమాలో లాగానే). కాకపోతే కొన్ని షరతులు పెట్టారు, అవి ఏమిటంటే:

* అమ్మాయిలు మా mallకి ఒక్కసారి మాత్రమే అనుమతింప బడుతారు
* పెళ్ళి కొడుకులని వారి వారి హోదా, రుచులు, అభిరుచులకు తగ్గట్లు వివిధ అంతస్థులలో వర్గీకరించబడ్డారు. ఏ అంతస్థులో పెళ్ళి కొడుకునైనా మీరు ఎన్నుకోవచ్చును. ఆ అంతస్థులో నచ్చకపోతే మీరు మరో అంతస్థుకి వెళ్ళవచ్చు. కాకపోతే మీరు వెనక్కి తిరిగి రావటానికి అస్కారము లేదు, చివరి అంతస్థు నుంచి బయటకు పోవడం తప్ప.

ఇదేదో బావుందే చూద్దామని ఒక అమ్మాయి mallకి వస్తుంది. అంతస్థులవారీగా ఈ విధంగా సూచనలు ఉన్నాయి.

మెదటి అంతస్థు: ఈ పెళ్ళి కొడుకులకు ఉద్యోగాలు ఉన్నాయి. భార్యను బాగా చూసుకుంటారు.

రెండవ అంతస్థు: ఈ పెళ్ళి కొడుకులకు ఉద్యోగాలు ఉన్నాయి. భార్యను బాగా చూసుకుంటారు , పిల్లలను ప్రేమిస్తారు.

మూడవ అంతస్థు: ఈ పెళ్ళి కొడుకులకు ఉద్యోగాలు ఉన్నాయి. భార్యను బాగా చూసుకుంటారు , పిల్లలను ప్రేమిస్తారు. మరియు వీళ్ళు చాలా అందగాళ్ళు.

అద్భుతం!! అని అనుకుంటూ ఇంకా పైకి వెళ్తే ఎలా ఉంటుందో అనుకుంటూ వెళ్ళింది ఆ అమ్మాయి.

నాలుగవ అంతస్థు: ఈ పెళ్ళి కొడుకులకు ఉద్యోగాలు ఉన్నాయి. భార్యను బాగా చూసుకుంటారు , పిల్లలను ప్రేమిస్తారు. మరియు వీళ్ళు చాలా అందగాళ్ళు. ఇంటి పని, వంట పనిలో కూడా సహాయ పడతారు.

"ఆహా !! ఈ mall చాలా బావుందే. ఈ అంతస్థులో నాకు కావలసిన వరుడు దొరుకుతాడు అని అనుకున్నది. అలా అనుకున్న మరు క్షణమే ఇంకా పైకి వెళ్తే ఎలాంటి వాళ్ళు ఉంటారబ్బా!! అని అనుకొని తరువాతి అంతస్థుకి వెళ్తుంది".

అక్కడి సూచన ఇది:

"మీతో కలిపి ఈ అంతస్థుకి చేరుకున్నవారి సంఖ్య : 61,397. ఈ అంతస్థులో పెళ్ళికొడుకులు లేరు. ఆడవాళ్ళని మెప్పించడం అసాధ్యం."

most annoying web page on internet

guys pls paste this link on your address bar and see what happen.




Code:


http://home.comcast.net/~wolfand/
dont panic it is not a virus or anything

just enjoy:ty ping:

Friday, August 7, 2009

Jokes

Hahaha Good one

An Arab was admitted in the Lilavati Hospital at Mumbai for a heart transplant, but prior to the surgery the doctors needed to store his blood in case need arises. As the gentleman had a rare type of blood, it couldn't be found locally. So the call went out to the neighboring states.

Finally a Gujarati was located who had a similar type of blood. The Gujarati willingly donated his blood for the Arab.

After the surgery, the Arab sent the Gujarati as appreciation for giving his blood, a new BMW 540iL, diamonds, lapis lazuli jewelry, and half a million US dollars.

Once again the Arab had to go through a corrective surgery. His doctor telephoned the Gujarati who was more than happy to donate his blood again.

After the second surgery, the Arab sent the Gujarati a thank you card and a box of almond halwa sweets.

The Gujarati was shocked to see that the Arab this time did not reciprocate the Gujarati's kind gesture as he had anticipated.

He phoned the Arab and asked him "This time also I thought that u would give me a new car, Diamonds and Jewelry. But u gave only a card and a box of almond sweets.

To this the Arab replied "Can't help it, Bapu..... Now I have Gujju blood in my veins!!


*************************************************************************************
An American, Japanese, and a Sardar were sitting in the sauna. Suddenly there was
a beeping sound.The American pressed his forearm and the beeping stopped.
The others looked at him questioningly." That's my pager," he
said, "I have a microchip under the skin of my arm.

A few minutes later phone rang. The Japanese lifted his palm to his ear. When he finished he explained, "That's my mobile phone. I have a microchip in my hand.

The Sardar felt low-tech and inferior. He didn't know what to do
to be as impressive as the American & the Japanese. He decided to take a
break in the toilet. When he returned, he didn't realize that there was a
piece of toilet paper got stuck and hanging from his backside. The others raised
their eyebrows and said, "Wow! What's that?" Instead of
being embarrassed, inspiration struck his mind. The Sardar explained, "I'm
getting a FAX. The other two fainted.


**************************************************************************

Fed up with people making fun of him, Santa Singh decided to change his religion. He joined a priest in a church as is assistant. One day the priest was called away for an emergency. Not wanting to leave the confessional unattended, he called Santa D'costa (his new assistant) and asked him to cover for him.


Santa told him he wouldn't know what to say, but the priest told him to stay with him for a little while and learn what to do. Santa joined the priest and then followed him into the confessional.


A few minutes later a woman came in and said "Father, forgive me for I have sinned"

Priest: "What did you do?" Woman: " I committed adultery"
Priest: "How many times?" Woman: "Three times"
Priest: "Say Two Hail Marys, put $ 5.00 in the charity box, and sin no more."


A few minutes later a man entered the confessional. He said "Father, forgive me for I have sinned"
Priest: "What did you do?" Man: "I committed adultery"
Priest: "How many times?" Man: "Three times"
Priest: "Say two Hail Marys, put $ 5.00 in the charity box, and sin no more."


Santa, a quick learner, told the priest that he understood the job and the priest could leave. Santa D'costa was now alone. A few minutes later another woman entered and said "Father, forgive me for I have sinned"


Santa: "What did you do?" Woman: "I committed adultery"

Santa: "How many times?" Woman: "Once"


Santa: "Go do it two more times, we have a special offer this week, three times for $ 5.00......


******************************************************************************
Sardar [fun] detective
A policeman was testing 3 Singh brothers who were training to become detectives.

To test their skills in recognizing a suspect, he shows thefirst Singh a picture for 5 seconds and then hides it. ‘This is your suspect, how would you recognize him?’

The first Singh answers, ‘That’seasy, we’ll catch him fast because he only has one eye!’ The policeman

says, ‘Well…uh.. .that’s because the picture I showed is his side profile.’

Slightly flustered by this ridiculous response, he flashes the picture for 5 seconds at the second Singh and asks him, ‘This is your suspect, how would you recognize him?’

The second Singh smiles and says, ‘Ha! He’d be too easy to catch because he only has one ear!’

The policeman angrily responds,

‘What’s the matter with you two? Of course only one eye and one ear are showing because it’s a picture of his side profile! Is that the best answer

you can come up with?’

Extremely frustrated at this point, he shows the picture to the third Singh

and in a very testy voice asks, ‘This is your suspect, how would you recognize him?

He quickly adds, ‘Think hard before giving me a stupid answer.’ The Singh

looks at the picture intently for a moment and says, ‘The suspect wears

contact lenses.’ The policeman is surprised and speechless because he really

doesn’t know himself if the suspect wears contacts or not. ‘Well, that’s an

interesting answer. Wait here for a few minutes while I check his file and

I’ll get back to you on that.’ He leaves the room and goes to his office,

checks the suspect’s file in his computer, and comes back with a beaming

smile on his face.

‘Wow! I can’t believe it. It’s TRUE! The suspect does in fact wear contact

lenses. Good work! How were you able to make such an astute observation? ‘

‘That’s easy,’ the Singh replied. ‘He can’t wear regular glasses because he

only has one eye and one ear.’


*******************************************************************
3 sardars are going on a motor cycle.

A police man shows his hand to stop .

then sardar shouted ::::--"" OYE IDIOT already 3 are sitting ......where will u sit ??????""
*********************


Banta and Kidnap
Banta spending his life in real poverty decides to earn some quick bucks through an illegal way.
He thinks of kidnaping someone and demanding ransom from the parents of that child.
In order to execute his plan, he goes to a nearby park and finds a little girl playing there. He writes a note "I have kidnapped your daughter. Drop by Rs.2,00,000 in the park by 12:00pm tomorrow else your daughter will be killed".
He pins the note on the girl's shirts and drops her at her home.
Next day..
Banta desperately waiting at the park for the money.
That little girl comes with a bag and hands over the bag to Banta with a note.
Banta checks the bag and finds Rs.2,00,000 in the bag. He desparately check the note which happens to be from Santa. It reads....
"Please don't kill my daughter. I'm sending Rs.2,00,000 with my daughter. Keep it and release my daughter".



******************************************************

Doctor aur Santa (Patient) [Hilarious Joke]
Doctor to Santa (Patient): Ab aapki tabiyat kaisi hai?
Santa: Doctor saheb Pehle se jyada kharab ho gayi hai.
Doctor: dawai khali thi kya?
Santa : Nai doctor saheb. Dawai ki shishi to bhari hui thi.
Doctor: Are Santa ji mere kehne ka matlab hai ki, dawai le li thi kya.
Santa: Ji, aapne dawai de di thi aur maine le li thi.
Doctor: Abe, dawai pili thi kya?
Santa: Oho, nahi doctor saheb dawai to lal thi.
Doctor: Abe GADHE, Dawai KO piliya tha kya?
Santa : Nahi. Doctor, Piliya to mujhe tha.
Doctor (in frustration) : Abe Teri to, Dawai ko muh lagakar Pet me dala tha ki nahi?
Santa: Nahi doctor saheb.
Doctor: Kyon?
Santa: Kyonki dhakkan band tha.
Doctor: Teri sale, to khola kyon nai.
Santa: Saheb, aapne hi to kaha tha ki, shishi ka dhakkan band rakhna.
Doctor: Tera ilaj main nahi kar sakta!
Santa: Accha Doctor saheb ye to bata do ki main thik kaise hounga?
Doctor : Abe teri …@#$!^&*!!!



Intelligent Sardarji
PLEASE READ: As you all know, Sardarji jokes are very famous in India. But we understand that these kind of jokes are targeted toward a particular community and is more a humiliation of them. WE LOVE AND RESPECT OUR SIKH FRIENDS AND DON’T PROMOTE ANYTHING THAT HUMILIATES THEM OR MAKE FUN OF THEIR COMMUNITY. This mail is posted on the website since we found this to be appraising and not humiliating.
A Sardarji and an American are seated next to each other on a flight from Los Angeles to New York. The American asks if he would like to play a fun game.
The Sardarji, tired, just wants to take a nap, so he politely declines and rolls over to the window to catch a few winks.
The American persists and explains that the game is easy and a lot of fun. He says, “I ask you a question, and if you don't know the answer, you pay me five dollars, and vice versa.”
Again, he declines and tries to get some sleep.
The American, now agitated, says, “Okay, if you don't know the answer, you pay me $5,and if I don’t know the answer, I will pay you $500.”
This catches the Sardarji's attention and, figuring there will be no end to this torment, agrees to the game.
The American asks the first question: “What’s the distance from the earth to the moon?”
The Sardarji doesn't say a word, reaches into his wallet,pulls out a $5.00 bill, and hands it to the American.
“Okay,” says the American, “your turn”.
He asks, “What goes up a hill with three legs and comes down with four legs?”
The American, puzzled, takes out his laptop computer & searches all his preferences........no answer. He taps into the air phone with his modem and searches the Internet and the Library of Congress... no answer.
Frustrated, he sends e-mails to all his friends and coworkers but to no avail.
After an hour, he wakes the Sardarji and hands him $500.
The Sardarji thanks him and turns back to get some more sleep.
The American, who is more than a little miffed, stirs the Sardarji and asks, “Well, what’s the answer?”
Without a word, the Sardarji reaches into his purse, hands the american $5, and goes back to sleep.



Banta’s Letter To Bill Gates
Subject: Problems with my new computer
Dear Mr. Bill Gates,
We have bought a computer for our home and we have found some problems, which I want to bring to your notice.
1. There is a button ‘Start’ but there is no 'stop' button. We request you to check this.
2. We find there is ‘Run’ in the menu. One of my friends clicked ‘Run’ he ran up to Amritsar! So, we request you to change that to ‘Sit’, so that we can click that by sitting.
3. One doubt is whether any ‘Re-Scooter’ is available in system? I find only ‘Recycle’, but I own a scooter at my home.
4. There is ‘Find’ button but it is not working properly. My wife lost the door key and we tried a lot trace the key with this ‘Find’ button, but was unable to trace. Please rectify this problem.
5. My child learnt ‘Microsoft Word’ now he wants to learn ‘Microsoft Sentence’, so when you will provide that?
6. I bought computer, CPU, mouse and keyboard, but there is only one icon which shows ‘My Computer’: when you will provide the remaining items?
7. It is surprising that windows says ‘My Pictures’ but there is not even a single photo of mine. So when will you keep my photo in that.
8. There is ‘Microsoft Office’ what about ‘Microsoft Home’ since I use the PC at home only.
9. You provided ‘My Recent Documents’. When you will provide ‘My Past Documents’?
10. You provide ’My Network Places‘. For God sake please do not provide ’My Secret Places‘. I do not want to let my wife know where I go after my office hours.
One personal questions.. How is it that your name is Gates but u are selling WINDOWS?
Regards,
Banta




Santa’s Interview
Interviewer: Tell me the opposite of good.
Santa: Bad.
Interviewer: Come.
Santa: Go.
Interviewer: Ugly.
Santa: Pichlli.
Interviewer: U G L Y?
Santa: PICHLLY !!!!!!!
Interviewer: Shut Up.
Santa: Keep Talking.
Interviewer: Get Out.
Santa: Come In.
Interviewer: Oh my God.
Santa: Oh your Devil.
Interviewer: You are Rejected.
Santa: I am Selected.
~~~ BALLE BALLLE ~~~



University were to be interviewed for a prestigious job. One common
question was asked to all 4 of them.


INTERVIEWER: WHICH IS THE FASTEST THING IN THE WORLD?

YALE guy: Its light, Nothing can travel faster than light

HARVARD Guy: It's the Thought; because thought is so fast it comes instantly in
your mind.

MIT guy: Its Blink, you can blink and its hard to realize you blinked

SANTA SINGH: Its Loose motion

INTERVIEWER: (Shocked to hear Santa's reply, asked) "WHY"?

SANTA SINGH: Last night after dinner, I was lying in my bed and I got the
worst stomach cramps, and before I could THINK, BLINK, or TURN ON
THE LIGHTS, it was over!!!!



Santa: I have swallowed a key.
Doctor: When?
Santa: 3 months back!
Doctor: What were you doing till now?
Santa: I was using duplicate key, now I have lost it too.


A lady calls Santa for repairing door bell. Banta doesn’t turns up for 4 days.
Lady calls again, Banta replies: I’m coming daily since 4 days, I press the bell but no one comes out.


Lady to inspector Santa: My husband went to buy potatoes 5 days ago, he hasn’t come back yet!
Santa: Why don’t you cook something else?


Banta’s wife dies. He is calm, but his wife’s lover is crying furiously...
Finally, Banta consoles him saying “Don’t worry buddy, I will marry again”.


Santa keeps the door open while bathing.
Banta asking him why is he doing that?
Santa says “I’m afraid that someone might watch me from the key hole”.


Banta apni pregnant wife ko pizza hut le jaa raha tha.
Santa: Oye, apni pregnant wife ko itne dard mein hospital ki jagah pizza hut kyun leja raha hai?
Banta: Kyun key pizza hut mein “Delivery Free” hai.


Banta enters shop shouts, “Where is my free gift with this oil?”
Shopkeeper: Iske saath koi gift nahin hai bhai saab?
Banta: Oye ispe likha to hai “CHOLESTROL FREE”.


One tourist from U.S.A. asks Santa: Any great man born in this village?
Santa: No sir, only small Babies!!!


Teacher: A for?
Banta: Apple
Teacher: Jor se bolo?
Banta: Jay mata di.


American says: “US mein shaadi e-mail se hoti hai..”
Santa says: “India me to.. shaadi sirf fe-mail (female) se hoti hai...!!!”


Banta orders pizza.
Waiter: Sir should I cut it into 4 pieces or into 8 pieces?
Banta: 4 hi kar dena, 8 khaye nahi jayenge.


Santa dials a number. A girl receives the call.
Santa: Who are you?
Girl: Seeta here.
Santa: Maine to Chandigarh phone kiya tha, yeh to Ayodhya chala gaya.


Banta: Truck dekhkar tum kaampte kyon ho?
Santa: Ek truck driver meri biwi lekar bhaag gaya tha, har baar lagta hai
jaise usko vapas karne aya hai.


Pathan sitting on the top of the mountain and studying.
When a person asked what he was doing?
He replied, Oye! Higher studies yaar.


2 pathans were fighting after exam.
Sir: Why are you fighting?
1st pathan: This fool left the answer sheet blank.
Sir: So what?
2nd pathan: Even i did the same thing, now teacher will think that we both copied.


Santa: I’m very kanjoos, I went 2 honeymoon alone saved 1/2 money.
Banta: You are nothing I saved all my money.
Santa: How?
Banta: My friend was going and I sent my wife with him.


Santa goes to Kaun Banega Karodpati show. Amitabh Bachchan asks him, “Santaji aap kiske saath yahan aaye hai?”
Santa: Pitaaji ke saath.
Amitabh: Aap ke pitaaji ka shubhnaam?
Santa: Hmmmm.... yes.
Amitabh: Ammmm.... kya naam hai aapke pitaji ka?
Santa: Hmmmm... OK.
Amitabh: Are Santaji, main aapse aapke pitaji ka naam poochh raha hoon.
Santa: Pehle mujhe 4 options to do!!!


Banta: All of the thrill is gone from my marriage.
Santa: Why not add some intrigue to your life and have an affair?
Banta: But what if my wife finds out?
Santa: Heck, this is a new age we live in. Go ahead and just tell her about it.
Banta goes home to his wife and says, “Preeto, I think an affair will help bring us closer together”.
Preeto, “Forget it, I’ve already tried that. It didn’t work.”


The headmaster of a school reprimanded Banta. ‘It has been reported that you called your history teacher gadhaa (Ass). You are fined Rs.50.’
‘Sir, would I be fined if I called a gadhaa my guruji?’ asks Banta.
‘Surely not’, replied the headmaster.
Banta: ‘That’s fine, Guruji!’.


A Manager of the branch bank found he had no space left to store old records.
He wrote to his regional manager Banta to for permission to destroy old records.
Banta Singh replied back: “I do not mind your destroying old records but please make sure you keep photo-copies of all the destroyed papers”.


Santa and Banta decide to go on picnic one day. When they get there, they realize they’ve forgotten the whisky.
Banta says he’ll get it if Santa promises not to eat the chicken till he returns.
Now, Santa waits and waits till a whole day goes by, when Santa says to himself: Come on, I’m hungry. He is not going to come back so let me eat the chicken anyway.
Suddenly Banta pops up from behind a tree and says: If you do that, I won’t go!


Banta showed his palm to a palmist. He examined the lines on Banta’s hand & said, A beautiful girl will come into your life, but be very careful.
Why should I have to be careful? asked Banta. She should be careful of her life. I drive a Blueline bus!


Walking up to a department store’s fabric counter, a pretty girl asked, “I want to buy this material for a new dress. How much does it cost?”
“Only one kiss per meter madam,” replied Banta (clerk).
“That’s fine,” replied the girl. “I’ll take five meters.”
“Five meters only?”, asked Banta “Hmmmmm..”, girl thinks for a moment and said, “OK, give me ten meters”.
With expectation and anticipation written all over his face, Banta hurriedly measured out and wrapped the cloth, then held it out teasingly.
The girl snapped up the package and pointed to a little old man standing beside her and said “Grandpa will pay the bill”.



Santa bought a new mobile.
He called everyone from his Phone Book & said "My Mobile No. has changed.
Earlier it was Nokia 3310 Now it is 6610."
Santa : I am a Proud Santa, My son is in Medical College.
Banta : Really, what is he studying?
Santa : No he is not studying, they are Studying him.
Santa: What is Common between Krishna, Ram, Gandhiji & Jesus?
Banta: All are Born on Government Holidays.
Pappu, while filling up a form: Dad, what should I write for mother tongue?
Banta: Very long!
Frog: Tumhare paas dimaag nahin hai.
Santa: Hai.
Frog: Nahin hai.
Santa: Hai. Frog: Nahin hai & jumps into the well.
Santa: Isme suicide karne waali kya baat thi?
Banta was caught for speeding and went before the judge.
The judge: What will you take 30 days or Rs.3000?
Banta: I think I'll take the money.
Santa: My dad was an extremely brave man. He once entered a lion's cage.
Banta: He probably might have got a lot of applause when he came out.
Santa: He never came out of the cage!
Santa found answer to the most difficult question ever
What comes first the chicken or the egg?
O yaar, jiska order pehle doge, vo ayega!
Teacher to Banta: Where were you born?
Banta : In Tiruvanantapuram.
Teacher : Spell it?
Banta : (after thinking) I think I was born in GOA.
Santa : People consider me as a GOD
Banta : How do you know??
Santa : When I went to the Park today, everybody said, Oh GOD! You have came again.
Santa complained to Police : Sir all items are missing, except the TV in my house.
Police : Why did the thief not take the TV?
Santa : I was watching the TV.

Search This Blog