Friday, May 17, 2013

annoying problem with firefox 21 on mac

firefox used to minimize itself when you double click on the title bar, but with firefox 21 release, it does not behave any more. it seems that firefox app did not implement double mouse click handler.

switching to chrome unless firefox bring back this.

Saturday, February 16, 2013

sql fundation

two bases for sql: set theory and predicative logic

Wednesday, August 8, 2012

filter on current date and passing time

Table meeting has start and end time field and to select all meetings for today and exclude meetings finished two hours ago.

select * from meeting
where convert(date, start) = convert(date, getdate())
and cast(start-getdate() as float)*24*60 < -120

Thursday, July 28, 2011

Embed XML file in Flex application

[Embed(source="../assets/usa_tsa.kml", mimeType="application/octet-stream")]
private var tsaKml:Class;



var byteArray:ByteArray = new tsaKml() as ByteArray;
var xml:XML = new XML(byteArray.readUTFBytes(byteArray.length));

...

Sunday, July 24, 2011

Install Zend_Debugger on CENTOS

In setting up a local development server, I need to enable zend_debugger on centos server.

The newer version of the debugger is renamed as Studio Web Debugger (http://www.zend.com/en/products/studio/downloads). Download the debugger and follow the instruction.

However, on CentOS there might be some additional issue:

  1. if SELinux is enabled, you will get warnings like
Failed loading /usr/lib/php/modules/ZendDebugger.so: /usr/lib/php/modules/ZendDebugger.so: cannot enable executable stack as shared object requires: Permission denied.

To fix this, mark ZendDebugger as not need an executable stack.
        execstack -c /usr/lib/php/modules/ZendDebugger.so

To verify ZendDebugger.so does not need an executable stack, use the following command
        readelf -l /usr/lib/php/modules/ZendDebugger.so | grep STACK

outputs:
        GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4

The second to last column shows “RW” indicates that it does not need an executable stack.

If it shows “RWX/RWE”, the module does require an executable stack. In that case, an non-preferred approach is to turn off SELinux.

  1. Please also make sure libssl.so.0.9.8 is on the system. If the system has been updated, the entry libssl.so.0.9.8 might be missing from /usr/lib.
To fix that make symbolic link for libssl.so.0.9.8 in /usr/lib.






Tuesday, July 12, 2011

Install rgdal on Mac OSX

sudo R64 CMD INSTALL --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib' rgdal_0.7-5.tar.gz

Thursday, July 7, 2011

Installing Maven for Flash Builder

I have been trying to get more familiar with Maven for sometime, but have not got the time to go to the details of setting it up and put it into practice with real project. Recently we had a Flex project which involves multiple modules. I think it is a good time to get a real start on Maven with Flash Builder.

The good friend of google search on Maven + Flash Builder results in some links on these. I tried to get to those that were published within the last year.

Maven is now an integrated part of the new Eclipse Indigo release, and maven can be installed with a few mouse click.


  1. go to Help --> Install New Software

  2. Select Indigo - http://download.eclipse.org/release/indigo on the Work with dropdown list

  3. type m2e in the search box

  4. check m2e - Maven Integration for Eclipse

  5. PastedGraphic-2011-07-7-15-36.jpg

  6. click Next --> Next, on the last window, accept the terms of license agreement and click Finish.

  7. The last step, Click Restart Now to apply the newly installed m2e.

  8. PastedGraphic1-2011-07-7-15-36.jpg