Posts

Showing posts from 2015

run batch in task Scheduler rise problem in server 2008 R2

For a long time, I sometimes got (0x1) error from task scheduler in Windows server 2008 R2. Finally solve it by separating all the cmds in the batch file and add them one by one in the "Actions" in Task Scheduler. It seems that the task scheduler can not run a batch file correctly for some reason. But have no idea why.

jqgrid "form editing" example in Python-Django

It tooks me  a lot of time to figure out jqgrid form editing add/edit/del the jqgrid table in Django/Python structure, as the similar topics I found in the internet always only discussed part of it, or half-way solution.  So after several days painful time, I finally have most part works. Now  summary it. I use array from python to display in jqgrid. Html: <table id="list"></table> <div id="pager"></div> The javascript : //This is correct way to get the array from python, even with syntax //error highlighted in javascript var sitedata = {{ siteArray }} jQuery ( "#list" ). jqGrid ({ datatype: local mtype : 'POST' , //height: 450, autowidth: true , shrinkToFit: true, colNames :[ 'Website' , 'Year' , 'Website Id' , 'Create Date' , 'Comment' ], colModel :[ { name : 'site_name',index:...

MTU size of ubuntu 12.04 and 14.04

The MTU must be 1500, otherwise it lost access or become unstable to access the website from all browsers.  Can also cause error as below when running script to fetch data from outside server in ubuntu system. Operation timed out after 100004 milliseconds with 0 bytes received.

mysql tips - JOIN and GROUP BY - complex query example

SELECT td.c1, td.c2, sum(tc.c3) FROM   (SELECT tc.*, tb.c1, tb.c2 FROM tb       JOIN (SELECT ta.c1, ta.c2, sum(ta.c3) FROM ta WHERE... GROUP BY...) tc       ON  tb.c4=ta.c5) td GROUP BY td.c1, td.c2