1. Export pgadmin3 query results to a file
In pgAdmin III there is an option to export to file from the query window. In the main menu it's Query -> Execute to file or there's a button that does the same thing (it's a green triangle with a blue floppy disk as opposed to the plain green triangle which just runs the query).
Source: http://stackoverflow.com/questions/1517635/save-pl-pgsql-output-from-PostgreSQL-to-a-csv-file
2. Convert varchar to number in PostgreSQL and displaying results in sorted order
select * from table_name order by to_number(column_name,'99') desc;
here '99' is the format of the number to be displayed
3. Change data type of a column in PostgreSQL
alter table table_name alter column column_name type datatype
4. Add a column to existing table in PostgreSQL
alter table table_name add column column_name datatype
5. Enable only error message logging in log4j properties file
# Root logger option
log4j.rootLogger=ERROR
6. Thread Dump
A Java thread dump is a way of finding out what every thread in the JVM is doing at a particular point in time. It Java threads that are currently active in a Java Virtual Machine. This is especially useful if a Java application sometimes seems to hang when running under load, as an analysis of the dump will show where the threads are stuck. We can generate a thread dump under Unix/Linux by running kill -QUIT <pid>, and under Windows by hitting Ctl + Break.
Source: http://stackoverflow.com/questions/12277091/what-is-the-meaning-of-thread-dump
7. Get thread dump in linux
top
- Command used to display the top CPU processes
We 'll get the pid corresponding to java from this
to display thread dump
kill -3 <PID>
the corresponding thread dump will be displayed in console
8. Eclipse: The specified JRE installation does not exist
This is how I fixed it:
1. Open Eclipse.
2. Go to Preferences.
2. Go to Preferences.
3. Click Add
4. A Window should popup
5. Select Standard VM.
6. Select Directory
7. Use this path: Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/
7. Use this path: Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/
8. Click Open
9. Then Finish
9. Then Finish
10. Right click your Project then click Properties
11. Select Java Build Path then click Add Library
12. Select JRE System Library
13. Click Environments and select the jdk1.7.0_45
14. Finish
Source: http://stackoverflow.com/questions/26477692/eclipse-the-specified-jre-installation-does-not-exist
No comments:
Post a Comment