Tuesday, April 19, 2011

A Typical Indian Wife ! Just for Joke

Husband: aaj khane mein kya banaogi?

Wife: Jo aap kaho

H: Dal chawal bana lo
W: Abhi kal hi to khaye the

H: to sabji roti bana lo
W: bacche nahi khayenge

H: to chhole puri bana lo
W: mujhe heavy heavy lagta hai

H: eggs bhurji bana lo
W: aaj guruvaar hai

H: paraanthe?
W: raat ko paraanthe kaun khata hai??

H: Hotel se mangwa lete hain?
W: roz roz hotel ka nahi khana chahiye

H: kadhi chawal?
W: dahi nahi hai

H: idly sambar?
W: usme time lagega.pehle bolna chahiye tha na!!

H: maggi hi bana lo, usme time nahi lagega
W: woh koi meal thodi hai? Pet nahi bharta

H: phir ab kya banaogi?
W: wo jo aap kaho

Friday, April 15, 2011

TOP JavaScript Mistakes And Solutions

TOP JavaScript Mistakes

1.Usage of for..in to iterate Arrays

Solution : always use regular for loops to iterate arrays

2.Array dimensions
Solution :Use literal notation to initialize arrays. Do not predefine array length

3. Undefined properties

Solution: if you want to explicitly declare a uninitialized properties
inside an object, mark them as null

4. Misuse of Closures

See JavaScript Closures FAQ ( http://jibbering.com/faq/notes/closures/) for an awesome explanation about closures and contexts.

Solution: use closures to simplify your code

5. Closures in loops

See JavaScript Closures FAQ for an awesome explanation about closures and contexts.

Solution: use a second function to pass the correct value.

6. Memory leaks with DOM objects

Solution: avoid those closures or undo the circular reference inside the function

7. Differentiate float numbers from integer numbers

Solution: don’t use decimals to “convert” numbers to floats

8. Usage of with() as a shortcut

See JavaScript Closures FAQ for an awesome explanation about closures and contexts.

Solution: don’t use with() for shortcuts. Only for context injection when you really need it.

9. Usage of strings with setTimeout/setInterval

Solution: never use strings for setTimeout()or setInterval()

10. Usage of setInterval() for heavy functions

Solution: avoid setInterval(), use setTimeout(

11. Misuse of ‘this’

* Regular function: myFunction(‘arg1’);

this points to the global object, wich is window for all browers.

* Method: someObject.myFunction(‘arg1’);

this points to object before the dot, someObject in this case.

* Constructor: var something = new myFunction(‘arg1’);

this points to an empty Object.

* Using call()/apply(): myFunction.call(someObject, ‘arg1’);


12. Usage of eval() to access dynamic properties

Solution: use square bracket notation instead of eval()

13. Usage of undefined as a variable

Solution: use typeof when checking for undefined


Tuesday, April 12, 2011

Balance & maintain the work life with easy five ways

These are five ways 

1)  Time management

2)  Use technology

3) Leave your work at work

4) Organize/Prioritize

5) Don't overbook   

If we follow these steps ... sure we will balance the work loaded life ...

Friday, April 8, 2011

10 things to know about Anna Hazare and Jan Lok Pal Bill

Hi friends,


I got an mail regarding this .... once check about "Anna Hazare "


1. Who is Anna Hazare?

An ex-army man. Fought 1965 Indo-Pak War

2. What's so special about him?

He built a village Ralegaon Siddhi in Ahamad Nagar district, Maharashtra

3. So what?

This village is a self-sustained model village. Energy is produced in the village itself from solar power, biofuel and wind mills.

In 1975, it used to be a poverty clad village. Now it is one of the richest village in India. It has become a model for self-sustained, eco-friendly & harmonic village.

4. Ok,...?

This guy, Anna Hazare was awarded Padma Bhushan and is a known figure for his social activities.

5. Really, what is he fighting for?

He is supporting a cause, the amendment of a law to curb corruption in India.

6. How that can be possible?

He is advocating for a Bil, The Jan Lokpal Bill (The Citizen Ombudsman Bill), that will form an autonomous authority who will make politicians (ministers), beurocrats (IAS/IPS) accountable for their deeds.

- . It's an entirely new thing right..?

In 1972, the bill was proposed by then Law minister Mr. Shanti Bhushan. Since then it has been neglected by the politicians and some are trying to change the bill to suit thier theft (corruption).

7. Oh.. He is going on a hunger strike for that whole thing of passing a Bill ! How can that be possible in such a short span of time?

The first thing he is asking for is: the government should come forward and announce that the bill is going to be passed.

Next, they make a joint committee to DRAFT the JAN LOKPAL BILL. 50% goverment participation and 50% public participation. Because you cant trust the government entirely for making such a bill which does not suit them.

8. Fine, What will happen when this bill is passed?

A LokPal will be appointed at the centre. He will have an autonomous charge, say like the Election Commission of India. In each and every state, Lokayukta will be appointed. The job is to bring all alleged party to trial in case of corruptions within 1 year. Within 2 years, the guilty will be punished. Not like, Bofors scam or Bhopal Gas Tragedy case, that has been going for last 25 years without any result.

9. Is he alone? Whoelse is there in the fight with Anna Hazare?

Baba Ramdev, Ex. IPS Kiran Bedi, Social Activist Swami Agnivesh, RTI activist Arvind Kejriwal and many more.

Prominent personalities like Aamir Khan is supporting his cause.

10. Ok, got it. What can I do?

At least we can spread the message. How?

Putting status message, links, video, changing profile pics.