Friday, January 30, 2015

Test sharing code with Gist



package test;
import java.sql.Timestamp;
import util.CommonUtil;
public class TestDate {
public static void main(String[] args) throws Exception{
java.util.Date utilDate = CommonUtil.df.parse("22/01/2015 11:52:00");
Timestamp ts = new Timestamp(utilDate.getTime());
System.out.println("utilDate:" + utilDate);
System.out.println("sql timestamp:" + ts);
}
}
view raw gistfile1.java hosted with ❤ by GitHub
I am using gist for sharing code here. Credits to the original blogger's post.





How Do I Enable remote access to PostgreSQL database server?


This is a much discussed topic.
I will just quote links here  and here.

Note that if allowing the whole world to connect is desired. Append the following line

 host  all       all       0.0.0.0/0        md5