Tuesday, November 17, 2009

Reloading inittab without reboot

Use "/sbin/init q" if you made any changes to the inittab file and would like init to reload that file.

Thursday, November 12, 2009

A note on Java's Calendar set() method

Remember that the Calendar's internal fields include year, month, date, hour, minutes, seconds, milliseconds and time zone. Whenever you are calling a set() method with multiple fields, like set(year, month, date), it will not affect the rest of the fields.

Remember that there is no set() method with multiple fields available to set the milliseconds. If you would like to set the milliseconds, you must use set(Calendar.MILLISECOND, value). Likewise, if you are planning to set all the fields, its a good idea to reset all the fields using clear() method. This will clear milliseconds as well.

Most of the times, millisecond field may not be of interest to you. But if you are going to use the UTC milliseconds, by calling getTimeInMillis(), then make sure you set the right values for milliseconds as well.

Sunday, November 01, 2009

Netcat for windows

I was troubleshooting an issue with one of the clients. And I desperately needed them to run the netcat tool and send me the output. But their OS is windows. So I was looking for the netcat tool for windows. Here it is: http://joncraton.org/files/nc111nt.zip

SublimeText 3/Anaconda error

When I installed Anaconda manually by downloading and untarring the file (as given in the manual installation instructions here ), I got th...