Posts

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

Qlikview tips - how to escape characters and space LOAD INLINE table

When you load a table using LOAD * INLINE, and need a space at the end of a string. Then you will find it is impossible to have a space like below in the red highlight part: LOAD * INLINE [ FieldName A   A-B-C B ]; And you can get it by using replace() function like below: LOAD Replace(FieldName,'$',' ' )as FieldName  INLINE [ FieldName A $ A-B-C B ]; This replace() function can also be used to escape "]" or other characters. Really handy and smart design.

Qlikview tips - QMC Document CALs setting

There are different ways in Qlikview Management Console (QMC) to set the .qvw remote access. Here we are talking about remote access using "Document CALs". First you need to create local windows users in the local server where QMC is installed. In Windows Server 2008 RC: Start->Administrative tool ->Server Manager ->Configuration ->Local Users and Groups ->Users In the window with the user list, right click->New User. Here you need to key in at least "User name" and "Full name" and password for the user. The "Full name" will be recognized in the QMC. Note: remember the password you just set, otherwise you need to reset it, as you can not see the password after you create a user. Second, open QMC->Documents->expand the document ->select the .qvw->Document CALs tab ->Assigned Users->add user (Click an icon with two persons at the right below ) ->in the search, key in the "Full name" ...

Qlikview tips - Sort table by expression columns

Qilkview is designed to use conditional sort (use expressions) on dimension column (DC)level, but not on Expression Column (we use EC for short in the rest part of the article) level. EC we talking about here are the columns that created in the Expression tab. Therefore, it took me some time to figure it out how to use it. Normally, you can sort the table in the Sort tab by giving an fixed order of all the columns, including dimension columns and  expression columns. What if your clients want to select specific data based on the EC and sort the result in another column instead of the default fixed sort priority? Then you will find what we discuss here helpful. If you have tried to use expression to sort on the EC, you may already found out the Expression option is gray and can not be selected/edited for them in the  Sort  tab . At the beginning I thought I can not use it. But later I figure it out, you can process this in the Expression option in the DC part. But you...

Use VBA Macro in Nprinting

Nprinting can use VBA macro in the excel report like normal excel report. Only thing that you need to pay attention is the format of the template and the output file. If the report template you are using is not .xlsm format, you can save it as .xlsm format. Or if you add macro in a non-xlsm format file, when you save it, you will got notification and then can save the file to .xlsm format. In order to change the output file format in nprinting, you can open the task>reports , then there is a list of the reports that used in the task.  There is a column called "Output Format" where identify the format of the output of the report, then you can modify it to .xlsm.