How to debug in Eclipse with webshpsere

Go to http://localhost:8091/ibm/console/, login in.

Servers->Server Types->WebShpere application servers->server1
Additional Properties->Debugging service
Check "Enable service at server startup"
Check "JVM debug port", usually it's 7777, this is the port number that you will use.
Click Apply, then click Save directly to the master configuration.
A restart on WebShpere is needed.

In Eclipse, Run->Debug Configurations->Remote Java Application
Create a new Debug Configuration, make sure host as localhost, and port as 7777, also attach source.

How to debug Java code originated by ANT script in Eclipse

Need add the followings to the ant target that you are intended to debug.

   
      
      
       ...
    

When you run this target, it will say "[java] Listening for transport dt_socket at address: 5432", and stop here for you to debug.
You need go to Run->Debug Configurations->Remote Java Application
Create a new Debug Configuration

Host: localhost
Port: 5432

Also attach source.

If you run it, it will go to the debugging point.

How do you undo clicking Never Save Password in Chrome?

I really like Chrome's "Save Password" function, saving me a lot of time typing. But sometimes, if I accidently check "Never for this site", I will lost the capability. The question is how could I get it back? 

chrome://chrome/settings/

Click "Manage saved passwords".

In the bottom, you will see "Never Save" list, just delete the entry you would like to save the password.

Notepad++ Plugins

XML Tools: Pretty Print

Oracle date related SQL queries

select TO_DATE(sysdate, 'dd/mm/yyyy') from dual

select TO_CHAR(sysdate, 'MM/DD/YYYY') from dual;

select sysdate from dual;

select * from myTable where DTTMCREATED BETWEEN TO_DATE('09/20/2012','mm/dd/yyyy') AND TO_DATE('09/21/2012','mm/dd/yyyy') 

/* as it's case insensitive in sql, so MM==mm
Oracle use mi to replace mm, and hh24 to represent use 24 hours format. */


Oracle: managing password

After a while, oracle user password will expire:

login in as system
select username, account_status from dba_users;
alter user HAIBO_JPMC identified by my_pass;