Posts

Oracle: OUTER JOIN operator

Just to note that (+) means an OUTER JOIN. Example : select a2 from table_a,table_b where table_a.a1=table_b.b1 (+) and table_b.b1=999999

Mac OS X: how to list all open ports running in your machine

In Mac OS X, I do use netstat -a -p tcp  Though the ideal one to list all open ports in Mac OS X being opened is lsof -i -P | grep -i "listen" Simple command, but hope that helps.

Issue Single Command To Kill a Process In Linux/Unix system

I am so tired of issuing back and forth this 'ps axu' command thing. I was debugging stuff in JBoss and I do always 'ps axu|grep jboss' then I took the process id and kill it by: kill -9 processid Then I just tried killing two process id at a time like for example: kill -9 processid1 processid2 and that will actually kill two process id, however, that's still tedious but it does help in some way. So I figure it out that I can use awk tool for this and get the column where the processid would be printed. So I found out a way with just one command to kill a process either in Linux/Unix system. I did this in my Mac OS X Snow Leopard. kill -9 $(ps -e|grep jboss|awk '{ print $1 }') // works in Snow Leopard or kill -9 $(ps -re|grep sl1 | awk -F ':' '{ print $3}'| awk '{print $1}') // Works in Mac OS X 10.8 Snow Lion or kill -9 $(ps axu|grep jboss|awk '{ print $2 }') // Linux   the '$1' there is the ...

SVN: How-to view modified files being commited to central repository

In order to view base on the revision number, just use the 'svnlook' tool to achieve this. Say for example: svnlook changed -r 23 /opt/repo Where /opt/repo is the central repository. svnlook will look for the 'REPO_PATH/format' file, so just check if that file exist so that you can assure it that it is the right path for your repository. Hope this helps.

Quickest way to create a table in Oracle

I found this very easy and quick to create a table, though sort of copy a table to another table. The syntax is: create table table_to_create as select * from source_table where 1=0 Hope you find this a little bit of help.

Use Shell Editor for Eclipse for editing bash, ksh, csh in Unix/Linux system

Image
I found ShellEd when googling for any shell editor. It was trouble at first because there's no  how-to that directs me, where I expect to have a direct link that I can copy-en-paste to my Eclipse for installation. So what I did, I download ShellEd (as of this writing file version ShellEd-Update-2.0.0_M3.zip) from sourceforge.net and install, as required, the Linux Tools . After installing Linux Tools, I then locate thru archive the ShellEd zip file and install it successfully. It works good and I feel satisfied with this cool tool to be embedded in eclipse. The sample attached shell script is from JBoss twiddle. It does supports syntax highlighting, intellisense which is cool. Hope this helps.

Discrimanator annotation in Hibernate

Just a note I don't want to forget, @Discriminator annotation for Hibernate, is that, it's idea is base on the enum type in database or perhaps just a type discriminator for a record on how to identify it. It's powerful, and is a helpful feature of hibernate.