Showing posts from December, 2012

Get UnixTimeStamp in Java

Current UnixTimeStamp:

long currentUnixTimestamp = System.currentTimeMillis()/1000;

 1) From date to UnixTimestamp:  SELECT UNIX_TIMESTAMP('2012-12-27 08:03:00');

2) From UnixTimeStamp to date:  SELECT FROM_UNIXTIME(1356618379);

Auto scroll to a DIV on page

You can set your page focus to a DIV on the basis of id element.

Let's say you have an element...
<div id="my_div" >  Scroll here.... </div>

Always Use: document.getElementById('my_div').scrollIntoView();