博文

目前显示的是 五月, 2017的博文

CSV & javascript

<a href="data:application/csv;charset=utf-8,test,tes,1,encodeURIComponent()" download="test.csv" target="_blank"> CSV</a> Reference: http://wijmo.com/topic/wijgrid-in-csv/ <!DOCTYPE html> < html xmlns =" http://www.w3.org/1999/xhtml "> < head > < title ></ title > <!--jQuery References--> < script src =" http://code.jquery.com/jquery-1.9.1.min.js " type =" text/javascript "></ script > < script src =" http://code.jquery.com/ui/1.10.1/jquery-ui.min.js " type =" text/javascript "></ script > <!--Theme--> < link href =" http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css " rel =" stylesheet " type =" text/css " /> <!--Wijmo Widgets CSS--> < link href =" http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20132.9.min.css " rel =" styles...

Request Payload and Anuglar post

Reference:  How to send right format of payload in Angular 2 since the php backend accept only 'x-www-form-urlencoded'? http://stackoverflow.com/questions/38375791/how-to-send-right-format-of-payload-in-angular-2-since-the-php-backend-accept-on import { Http, Response,Headers, RequestOptions} from '@angular/http'; public getUserConfig():Observable<Response>{ let widgetUrl = '/api/getXConfig'; let data =encodeURI('jinData={"USERID":"Jin"}'); let options = new RequestOptions({ withCredentials: true }); var headers = new Headers(); // //headers.append('Content-Type', 'application/json'); //'application/x-www-form-urlencoded') can't send "Request Payload" //headers.append('Content-Type', 'application/x-www-form-urlencoded'); // headers.append('Content-Type', 'text/plain; charset=utf-8'); options.headers=headers; return this._http....

learning angular2

1: Clear Environment   >node –v C:\Users\jchen> del %USERPROFILE%\.npmrc Could Not Find C:\Users\jchen\.npmrc   >rmdir /s/q "c:\Program Files\nodejs" c:\Program Files\nodejs\node_perfctr_provider.man - Access is denied. c:\Program Files\nodejs\npm - Access is denied. c:\Program Files\nodejs\npm.cmd - Access is denied. Access is denied. > rmdir /s/q "%APPDATA%\npm" C:\Users\jchen\AppData\Roaming\npm\NODE_M~1\vs-tac\NODE_M~1\cordova\4300A3~1.0\NODE_M~1\cordova\NODE_M~1\CORDOV~1\NODE_M ~1\CORDOV~1\NODE_M~1\BROWSE~1\NODE_M~1\BROWSE~3\NODE_M~1\COMBIN~1\NODE_M~1\INLINE~1\NODE_M~1 - The directory is not empty. >rmdir /s/q "%APPDATA%\npm-cache" Go Control Panel\All Control Panel Items\Programs and Features uninstall nodejs Manually remove "%APPDATA%\npm" and "%APPDATA%\npm-cache" 2. Install Nodejs Download the file node-v7.7.2-x64.msi from https://nodejs.org/en/dow...