Calculating the year using only milliseconds

Nice way to get the current year in Java.

int year = System.currentTimeMillis()/1000/3600/24/365.25 + 1970;

Credits are due to Ewin Makepeace at http://stackoverflow.com/questions/136419/get-integer-value-of-the-current-year-in-java

IFRAME and reloading back the page to the top

I was trying to solve my way around a nuisance.. On web portal that I am working on, there exists the need to use an IFRAME in order to interface two difference platforms.

So, far things were going great but when I was submitting a long form, the new page that came as result would not be visible unless the user would manually wind up the browser window all the way to the top.

Tried out a few things until I finally found a working solution: using the "onload" event triggered by the IFrame and some java script.

So the end result to get neat looking pages is:

<iframe src="http://localhost?display=register" onLoad="window.parent.scroll(0,0);"></iframe>

And this way you get yourself back to the top of the page every time that a new page is requested inside the iframe window. Problem solved.

Take care!

:)

Reboot hosts the official forum for ISOstick

ISOstick is an interesting USB flash drive because it believes (and fools others) that it is an optical DVD drive. Recently received a full sponsoring from kickstarter.com to begin production: http://www.kickstarter.com/projects/elegantinvention/isostick-the-optical-drive-in-a-usb-stick/posts/120874 and should soon be available to everyone.

This a great tool for a any self-claimed rebooter. Allows to switch on-the-fly between multiple ISO images and customize them to his will, so I invited the creator behind this cool product to join our community and we are now the official discussion forum for isostick.

Really cool distinction, really cool person to help and work with. More details about this cooperation can also be read in Elegant Invention's blog at http://blog.elegantinvention.com/?p=161

Take care! :)