Archive for November, 2009

JQuery: remove animation for jQuery UI date picker

Friday, November 27th, 2009
$("#screenerDatePickers input").datepicker({ duration: '' });


JQuery: remove table column

Friday, November 27th, 2009
 var colIdx = 2;
$('#myTable tr td:nth-child('+ colIdx  +'),
   #myTable tr th:nth-child('+ colIdx  +')').remove();


Eclipse: Boost performance with Memory setup

Tuesday, November 24th, 2009

Eclipse can become quite slow, especially if you have plugins like AJDT installed. Boosting the memory can help. Edit your eclipse.ini.

Original eclipse.ini


Update eclipse.ini


Tomcat: remote debugging setup

Friday, November 20th, 2009
set JPDA_TRANSPORT=dt_socket
bin/catalina.bat jpda start


Git: setup msysGit install with pageant/plink from putty

Thursday, November 19th, 2009
  1. Install msysgit
  2. Install Putty
  3. Setup Pageant
  4. Set GIT_SSH=C:Program Files (x86)PuTTYplink.exe in the windows environment
  5. Connect to the git server USING Putty (to accept the fingerprint of the server). This is only needed once.
  6. Then, you can use Git bash to connect to the ssh server

SSH: Configuring Pageant on Windows to automatically use a key

Thursday, November 19th, 2009
C:PuTTYpageant.exe d:main.ppk 


SQL: Select Count with Group By

Saturday, November 14th, 2009
SELECT department, COUNT(*) as "Number of employees"
FROM employees
WHERE salary > 25000
GROUP BY department


AspectJ: Warning advice defined has not been applied [Xlint:adviceDidNotMatch]

Friday, November 13th, 2009

In Eclipse and AJDT, you will see the following warning if an advice has not been applied

advice defined in xxxx has not been applied [Xlint:adviceDidNotMatch]	xxx.class...

To remove this, add the @SuppressAjWarnings({“adviceDidNotMatch”}) on your advice methods

For example:

public aspect MyAspect{
  pointcut ...

  Object around(Transactional transactional) : mylMethodExecution(transactional){

jQuery: Drag custom Clone helper with the correct width

Wednesday, November 11th, 2009

Often, when you drag an element with the helper = ‘clone’, you want the clone element width to be equal to the draggable element width. Unfortunately, this works only if the “width” has been set to the draggable element.

The solution, is to create a custom method for the helper like:

helper: function(){
return $(this).clone().width($(this).width());
revert: “invalid”