Friday, January 6, 2017

posgresql select case

Just to help if anyone stumble on this question like me, if you want to use if in PostgreSQL, you use "CASE"
select 
    case
        when stage = 1 then 'running'
        when stage = 2 then 'done'
        when stage = 3 then 'stopped'
    else 
        'not running'
    end as run_status from processes

Tuesday, January 3, 2017

regex tool

http://www.regexr.com/v1/desktop/

download desktop version

replace 1 with 2016

I have a database with year value 1=>2016, 2=> 2017, 3=>2015

use Pentaho data integration transformation

^.{0,1}[1]$ is used to match 1 with length 1
^.{0,1}[2]$ is used to match 2 with length 1
....




Tuesday, December 13, 2016

could not use chrome tool to break javascript code


you may defined the java script (function) code twice

game programming



https://www.codehunt.com/