ACM programming problems archive:
http://www.ntnu.edu.tw/acm/ProblemSetArchive.html
Friday, November 26, 2010
Overflow in Binary search
Overflow in Binary search:
http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
Apparently this bug was there in Java libraries till JDK 6.0
http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
Apparently this bug was there in Java libraries till JDK 6.0
Friday, November 5, 2010
How to increase sudo timeout in linux
If you are tired of typing sudo too many times:
http://www.go2linux.org/disable-cache-password-sudo
Same procedure for disabling can be used for increasing as well. Just add a line to /etc/sudoers file through visudo
http://www.go2linux.org/disable-cache-password-sudo
Same procedure for disabling can be used for increasing as well. Just add a line to /etc/sudoers file through visudo
Defaults:userName timestamp_timeout = 20
Saturday, October 30, 2010
Tomcat and default welcome page
I was trying to setup a quick website in my machine and installed tomcat and invoked it from browser as http://hostname it wasn't serving anything. Then I realised I had to add this block in web.xml
browser I added it and added an index.html and it still didn't work. Then I looked at webapps folder and saw a folder ROOT and added index.html there and it started serving home page!
index.html
index.htm
index.jsp
Screen, bash and ctrl+a
Today I was using bash and ctrl+a is very useful for going to the start of a command in bash. But it was not working in my Mac. I thouht it was a problem in Mac bindings and opened keyboard and mouse, terminal preferences etc.
When none of this could fix the issue, I realised that I was ssh'ing to my work machine and using a screen to avoid losing session when connection drops. This program uses ctrl+a as the meta key and was not passing this on to bash. So I had to use
screen -e ^xx
to change the meta key to ctrl+x and everything was fine again.
When none of this could fix the issue, I realised that I was ssh'ing to my work machine and using a screen to avoid losing session when connection drops. This program uses ctrl+a as the meta key and was not passing this on to bash. So I had to use
screen -e ^xx
to change the meta key to ctrl+x and everything was fine again.
Monday, August 9, 2010
Java 1.6 on Mac
See here:
http://dhruba.name/2008/12/22/compiling-java-16-projects-using-maven-on-mac-os-x/
http://answers.yahoo.com/question/index?qid=20090415211021AAFgnYh
http://dhruba.name/2008/12/22/compiling-java-16-projects-using-maven-on-mac-os-x/
http://answers.yahoo.com/question/index?qid=20090415211021AAFgnYh
Saturday, February 20, 2010
one complement and twos complement in google search
It is really cool!
I was searching for 2s complement of -1 [I know how to calculate it. just to be sure!] . I just typed -1 in twos complement and it actually gave
-1 = 0xFFFFFFFF
very nice!
I searched for ones complement of -1 as well and it worked. Good work!
Subscribe to:
Posts (Atom)