博文

目前显示的是 四月, 2016的博文

Using PreparedStatement - OVER(ORDER BY ?) retrieved the rows un-sorted.

The ? in OVER(ORDER BY ?) is valid by setString(1, "columenName asc") in the following clause, this clause retrieved the rows un-sorted. " select * from (    select t.*, row_number() OVER(ORDER BY ?) AS row_number  from t_accounts t    where lower(Acct_id) like '?' ) p where p.row_number <? and p.row_number>=? " so the following works: " select * from (    select t.*, row_number() OVER(ORDER BY " +NameOfColumn+" "+ "asc" ) AS row_number  from t_accounts t    where lower(Acct_id) like '?' ) p where p.row_number <? and p.row_number>=? "   * Environment: using ojdbc6.jar for Oracle database.

Filtering on DataGrid in JeasyUI

To apply filtering and pagination on a datagrid component Test Result 2016- 04: Do not use the "easyui-datagrid" CSS, class="easyui-datagrid" in the table. // The filtering works . <table id="tblAccounts" style="width:910px;height:250px" toolbar="#toolbar1"></table> // The filtering doesn't work. <table id="tblAccounts" class=" easyui-datagrid " toolbar="#toolbar1"></table> Ref: http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem= http://www.jeasyui.com/tutorial/datagrid/datagrid33_demo.html

JavaScript hacks explained

From: http://blog.mdnbar.com/javascript-common-tricks There are several JavaScript tricks that are used widely by experienced programmers. Many of them may not be instantly obvious, especially for beginners. These tricks use language features not by their direct purpose, but rather by their side-effect to achieve goals, that can’t be achieved by default language means. Here I made a little compilation of such tricks with explanation. You should understand that most of these tricks are rather hacks and not something you should use in your daily development. The purpose of that article is to explain how they work, not to push to use them.  Using !! to convert value into a boolean Everything in JavaScript can be interpreted either as [truthy or falsy](’http://www.sitepoint.com/javascript-truthy-falsy/’). This means that when you put object into an if expression, it will either let you go by true-branch (i.e. it’s ‘truthy’) of by false branch('falsy’). 0, false, "", null, un...