Sunday, January 29, 2012

Multicore processor flavours

There various kind of processor flavours, which there are dual core, quad core, and octa core, and some of it may have multi-threaded support, and some may have different set of cache and memory configuration.

Hyperthreading is the most common term used by processor. It is a processor which allows two or more threads to execute on a single chip. This technique allow the processor to present itself as a multiple processor in the operating system where physically it is not.

Multicore revolution

Multicore processor is an new architecture design that place multiple processors on a single computer chip. Also known as Chip Multiprocessors.

The initial idea was to increase the processor's computing speed, anyhow by increasing the computing speed, in the same time, will require more power, and thus will increase the heat of the processor. This will effect the cost to cold down the system.

Instead of making it faster, the approach is to add in another processor to regain the higher processing speed. Here it comes to multicore revolution.

Thursday, January 26, 2012

JAVA program and HSQLDB

Since the database is up, I was trying to make a simple program that could fetch data from the database.

Assuming there is a table called employee with a column named EMPNAME in the database. This is the code snippet that could achieve the objective.

conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/testdb", "SA", "");
stm = conn.createStatement();
rs = stm.executeQuery("select * from employee");
while( ) {

Wednesday, January 25, 2012

Steps required to start up HSQLDB in Fedora 16

Finally I have my HSQLDB setup in Fedora 16. It took me sometimes to set it up because it was really hard to find a good tutorial and really understand the whole process.

1. Extract the tool into a location called HSQLDB_HOME.
2. Create a file named and at following content into it:

3. Launch the database server by using following command in CLI:
java -classpath HSQLDB_HOME/hsqldb/lib/hsqldb.jar org.hsqldb.server.Server --database.0 file:db0/db0 --dbname.0 testdb

4. Connect to DB server using a GUI tool by using following command in CLI:

java org.hsqldb.util.DatabaseManagerSwing

5. Connect the DB by using following URL:


That's about the steps required to run HSQLDB. The DB is ready to be use so that tomorrow I can start my lesson in Hibernate.

Tuesday, January 24, 2012

Chinese input in Fedora 16

To enable Chinese input in Fedora 16, easy job!

  1. Type su -c 'yum scim-pinyin' in CLI.
  2. Goto Input Method Selector. Select Use SCIM from the list.
  3. Logout current user and login again to take effect.

To switch to Chinese input method, press Crtl-Space, which is the default trigger.

Uninstall Oracle XE

Configuring enterprise product is really hard. Although I have successfully start up Oracle listener, but I still failed to configure a database in Oracle. No more wasting time on this configuration work, thus I had decided to un-install it.

First check oracle is installed:
rpm -qa | grep oracle

If there is an output, then un-install it:
su -c 'rpm -e oracle-xe-11.2.0-1.0.x86_64'

Not there yet, some files need manual instruction:
rm -rf /u01
rm /etc/oratab

Oracle is un-installed successfully!

Sunday, January 22, 2012

Starting up Oracle DB listener

I have Oracle Database 11g Express Edition installed in my Fedora 16. It is not set to auto startup when my PC first launch for the purpose of saving resources. Now I'm going to do it manually to startup and shutdown the Oracle DB. There are a list of environment variable locate inside bin/ must be set before doing this, otherwise an error message saying that command not found will be shown.

Let's first check on the status to make sure the DB isn't up, type:
lsnrctl status

following output will be shown on the screen:
 TNS-12541: TNS:no listener
  TNS-12560: TNS:protocol adapter error
   TNS-00511: No listener
    Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=huahsin68.fedora)(PORT=1521)))
 TNS-12541: TNS:no listener
  TNS-12560: TNS:protocol adapter error
   TNS-00511: No listener
    Linux Error: 111: Connection refused

Now lets start the Oracle, type:
su -c 'lsnrctl start'

following output is shown:
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/huahsin68/listener/alert/log.xml
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted

Listener failed to start. See the error message(s) above...

To fix this error, modify the configuration file:

by changing KEY = EXTPROC_FOR_XE to KEY = EXTPROC0.

Lets give it another try, following output will be shown:
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/huahsin68/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=huahsin68.fedora)(PORT=1521)))

Alias                     LISTENER
Version                   TNSLSNR for Linux: Version - Production
Start Date                22-JAN-2012 12:25:33
Uptime                    0 days 0 hr. 2 min. 20 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/huahsin68/listener/alert/log.xml
Listening Endpoints Summary...
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Although the listener is up, anyhow there are some problem with the database instance.

Saturday, January 21, 2012

Any good use of Facebook?

Facebook is a famous term in nowadays where everyone of my friends know about it. Even smartphone producer are bringing Facebook as part of their phone feature.

I register a Facebook account in 2009 and has been very active in Facebook in late of 2010 until 2011. My impression to this platform was that Facebook is something like ICQ + web 2.0. I am not a fans of ICQ but I was very active in forums like,,, and These are a few forum sites which I was very active before I know about Facebook.

It was very interesting when I first joined Facebook, sooner in late of 2010, I am trying to make it as a news feed just like Google Reader where I subscribe all my favorite sites and trying to make it as a knowledge sharing platform just like a forums. I was very active in this activity so called 'Facebook Forum customization' in 2011 because my job environment allowing me to surf Facebook during working hour. I was almost logging into Facebook every day to read my 'customize' news feeds.

Anyhow the 'Facebook Forum' response was very low. It was totally out of my expectation, even worse there are a lot more rubbish, nonsense and annoying news feeds posting on my Facebook wall and everyone's Facebook wall. At first I though that I was sharing some knowledge to others but I was bringing nonsense to others in the same time. Eventually, we are wasting time reading nonsense on Facebook.

I was trying my best to utilize this platform but at last, I started to realize that forum is much more better than Facebook because what I need is knowledge whereas Facebook is suit for marketing purpose.

I'm still trying to find the good use of Facebook.

Sunday, January 15, 2012

Migrating my Jenkin

How could I migrate my existing Jobs in Jenkin to new PC? Believe it or not, this is really a joke but it just work!

Replace the jobs folder in new PC with existing jobs folder in old PC, and then reload Jenkin configuration from hard disk. That's it!

Regarding the existing users, I have no clue with it, no matter how many experiment I tried, it just not work. Thus recreate the user list is the only way. So lucky that my team only consist of six peoples so far.

Happy Jenkin ^.^

Migrating my SVN

Finally my new PC has arrived. Is time to migrate the SVN to new PC. Yuhuu~

To backup SVN, make sure everyone are not checking in any source code at the moment when backup is in the process. To do this, in existing SVN server, issue a command:

svnadmin dump my_repo_today

In the new SVN server, issue the command:

svnadmin create new_repo_path
svnadmin load new_repo_path < my_repo_today

Please note: if you are using CollabNet Subversion, do not do dump in CLI and then load the new_repo_today through CollabNet Subversion's Interface. It just not working.

Happy SVN :o)