cli for postgres in linux

If  your PostgreSQL server is not started, start it with the following command. sudo service postgresql start To getting started with postgreSQL, open your Terminal, and type: username$ sudo su – postgres Now you are logged into your vm with the postgres user. Then connect to template1 database using the postgresql’s psql client: postgres ~$…

set author time in the eclipse code template

The setting path is: Windows > Preferences > Java > Code Style > Code Templates > Comments Select Types and edit the template to insert another value the system value format is like: ${date}   Then before the declaration of the class, just type /** and ENTER.

my eclipse shortcut

alt + enter  : project property.  ctrl/cmd + M : Maximize window alt+shift+r : rename ctrl/cmd + shift + O : organize import(automatic, very useful) Ctrl/cmd + / :  Annotate 1 or more lines. ctrl/cmd + shift + F : format code Control + I: Indent Is your code looking like this at times? Simply highlight the…

check out google code from eclipse subversion

In window->show view-> svn repository . In that window, right click and select “New” from the drop down menu, then click “Repository Location…”, enter the google code https  url. after authentication, look carefully on the structure. Then in the project, right click and Team-> share project. In the following window, make sure the path is…

eclipse project前面红色感叹号

如果删除了某个build path里的jar的源文件而没有在build path里面删除,工程前面就会出现红色感叹号。后果是很严重的,连更新的java文件都不会编译更新。悲催……   PS: primefaces中datatable接受类型只能是List不能是Set。所以在ORM的时候用List比Set保险!

Converting a Java Project to a Dynamic Web Project in Eclipse

To convert a Java Project to a Web Project switch to or open the Resource Perspective of the project, in the root of the project. Open the .project file and make sure the builders and natures are present that are needed for a web project. See the example below, the name should be the name…

arguments and VM arguments in Eclipse

Eclipse allows you to enter Program arguments and VM arguments into a Debug configuration. I have a Debug configuration for my ArgsTest class, and I pass in “pro1 pro2 pro3” as Program arguments and “-DsysProp1=sp1 -DsysProp2=sp2” as VM arguments. Program arguments are arguments that are passed to your application, which are accessible via the “args”…