發表文章

目前顯示的是 5月, 2014的文章

Matlab JSON

https://github.com/kyamagu/matlab-json/ Matlab JSON v0.2 This package contains Matlab class to serialize/decode matlab object in json format. The software uses org.json java package to convert json to java object and then translates it into Matlab object. API All functions are scoped under json namespace. startup Initialize runtime environment. dump Encode matlab value into a JSON string. load Load matlab value from a JSON string. read Load a matlab value from a JSON file. write Write a matlab value into a JSON file. Usage Add path to the directory containing +json before use, and call json.startup. >> addpath /path/to/matlab-json >> json.startup To serialize matlab object: >> X = struct('field1', magic(2), 'field2', 'hello'); >> S = json.dump(X); >> disp(S); {"field2":"hello","field1":[[1,3],[4,2]]} To decode json string: >> X = json.load(S); >> disp(X); field2: 'hello'...

wget常用參數如下

  GNY Wget ,一個非交談式的網路抓檔工具.   用法: wget [選項]... [URL]...   命令的引數使用長項目與短項目相同.   使用遞回方式的取回:   -r, --recursive像是吸入web的取回--請小心使用!.   -l, --level=NUMBER遞回層次的最大值(0不限制).   --delete-after刪除下載完畢的檔案.   -k, --convert-links改變沒有關連的連結成為有關連.   -m, --mirror開啟適合用來映射的選項.   -nr, --dont-remove-listing不要移除`.listing'檔.   遞回式作業的允許與拒絕選項:   -A, --accept=LIST允許的擴充項目的列表.   -R, --reject=LIST拒絕的擴充項目的列表.   -D, --domains=LIST允許的網域列表.   --exclude-domains=LIST拒絕的網域列表(使用逗號來分隔).   -L, --relative只跟隨關聯連結前進.   --follow-ftp跟隨HTML文件裡面的FTP連結.   -H, --span-hosts當開始遞回時便到外面的主機.   -I, --include-directories=LIST允許的目錄列表.   -X, --exclude-directories=LIST排除的目錄列表.   -nh, --no-host-lookup不透過DNS查尋主機.   -np, --no-parent不追溯到起源目錄.   範例一:mirror一個網站   wget -r www.redhat.com   範例二:mirror一個網站下的某個目錄:   wget -r www.redhat.com/mirrors/LDP   範例三:結合nohup在後台運行,讓機器自動下載,並生成nohup.out文件,紀錄下載過程的速度。   nohup wget -c -t0 -T120 -i list.txt &         wget -r -np http://physionet.org/physiobank/database/mimic2w...