Friday, September 28, 2012

Tuesday, September 18, 2012

How to color grep result output

On one meet up I noticed that some representative have colored grep result that is convenient:

So it is not a rocket science - link.

Briefly do:
export GREP_OPTIONS='--color=auto'

Sql Developer installation tuning and tips

Install SQLDeveloper
1 Unzip to folder ~/java/

2 Provide path to JRE

mkdir ~/.sqldeveloper/
echo "/usr/lib/jvm/java-6-sun/" > ~/.sqldeveloper/jdk
run SQLDeveloper from the shell

cd ~/java/sqldeveloper && chmod ogu+x && ./
3 Import connections to DBs.

Right click over "Connections" root node in Connections view - "Import Connections". 2 RI: Please add latest connections config here

 Connections file is here:

Configuration of SQLDeveloper:

0) If you have problems with rendering please change Theme to "Classic 10.1.3" in  Tools/Preferences ... Environment.

1) Change auto formatting in SQL Developer - menu tools/preferences in tree "code editor/Completion Insight"
unselect "Change case as you type"

2) Tools/Preferences tree Databases/NLS  property "Date Format" make as "YYYY-MM-DD" and update other date-time formats too by this.

3). install third-party Driver, for example MySQL goodlink, MSSQL goodlink2,
Download driver MySQL site.
Download MSSQL driver:  JTDS site
All drivers: list.
 Tools:Preferences menu, Database -> Third Party JDBC Driver .

Viewing Multiple Tables

You can have tabs open for more than one table. Just click the Freeze View button (it looks like a push pin) when you are viewing a table; and when you click to display another table, the tab for the first table will remain open.

Tuesday, September 11, 2012

eCoberture is dead, Eclemma is a king

There are two major projects for coverage testing in Eclipse: eCobertura, EclEmma.

EclEmma is active and good for Eclipse.

eCoberture is outdated and have painful bug with clean up coverage, but cobertura it is used in Sonar project.

Krusader Editor does not save settings in Ubuntu 12.04

Krusader in Ubuntu 12.04 does not save settings of its editor(KrViewer).
this cause creation of backup file (with '~' at the end) on each edit(F4) -> save operation for file.

File: ~/.kde/share/config/krusaderrc is not related for this.
No complains in group:

workaround is here.

To alternatively ease problem - change internal editor to smth else:
Settings / Configure Krusader ... tab General , tab View/Editor , Editor: /usr/bin/gedit
or /usr/bin/geany

Saturday, September 8, 2012

Eclipse complains about 1.5.0 is missing

During compilation of some opensource project you could come up to error "artifact 1.5.0 is missing" in Eclipse, but compilation works fine from terminal.

Problem is in what JDK Eclipse use and provide it the same path.
check correctness of $JAVA_HOME
You need to check $PATH variable to be sure that required JDK is in Path.
Even you have JAVA_HOME/bin in path, java could be taken from other location due to the fact that it could be found in path early than your, to check it:
which java
ls -la /usr/bin/java
ls -la /etc/alternatives/java
Make sure that /etc/alternatives/java points to your JDK. In my case it was to OpenJDK but my JAVA_HOME was pointed JDK 1.6. So I removed all openjdk packages from Synaptic in Ubuntu and  after that all worked fine.

Similar problem is described here.