Download all file from ftp server recursively

Posted on January 7, 2008
Filed Under Linux | Leave a Comment

I moved http://www.sri-lankan.net to DreamHost last month and wanted to download all the files from my old hosting provider. I found the ncftpget command so useful. Here is how…

1
$ ncftpget -T -R -v -u "ramesh" sri-lankan.net ./sri /www

HSQL changes not getting saved

Posted on January 6, 2008
Filed Under Java | Leave a Comment

I had my time with the interns yesterday when they complained that the changes they made are not getting saved to the HSQL database. I spend an hour trying to find out why, at last I found out that in HSQL you need to send a SHUTDOWN command to save the changes in a clean way…

1
2
3
4
5
Statement st = conn.createStatement();
 
// db writes out to files and performs clean shuts down
st.execute("SHUTDOWN");
conn.close();

Select a random row from a table

Posted on December 22, 2007
Filed Under SQL | Leave a Comment

I was looking for a clean and simple way of selecting a random record from a table. Here is what I found…

1
SELECT * FROM TABLE ORDER BY RAND() LIMIT 1

Wedding Pictures…

Posted on July 15, 2007
Filed Under Photos | Leave a Comment

« go back
  • About

    This is an area on your website where you can add text. This will serve as an informative location on your website, where you can talk about your site.