HTML : Easiest way to create simple tooltips

Tooltips are the ones which appear as little bubbles with text, when you mouse hover over an item on Web-page.

In HTML, it is very easy to create them.

Simply add 'title' attribute to the element.

Examples:

<a title="Tooltip for Anchor !" href="someLink" >Gliding Phenomena Blog </a>

<img title="Tooltip on an Image..." src="myPic.jpg"  />

<div title="This is tooltip for the entire DIV">

Some content.

Blah 

Blah

</div>

SQL : Update only year in the date field

UPDATE mytable
SET datefield = CONCAT('2012','-',MONTH(datefield),'-',DAYOFMONTH(datefield))
WHERE YEAR(datefield) = 2006;

Javascript: Regex for Email Validation


function isValidEmail(email){
 var emailRegx = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
 return emailRegx.test(email);
}

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...