摘要:
from multiprocessing import Pooldef f(x): print 'cal ', x return x * xdef callback1(arg): print arg print 'result ready, in callback'if __name__ == '__main__': pool = Pool (processes =4) result = pool.apply_async(f, [10], callback=callback1) #result = pool.apply_async(f, [10] 阅读全文
摘要:
install ImageMagick download rpm package fromhttp://www.imagemagick.org/script/binary-releases.php#unix but lots of dependencies. how to solve, one way is apt-get install imagemagick , one is install smart 阅读全文
摘要:
xoff3=509if [ "$xoff3" -gt 500 ] then echo "yoff3 > 500"fisuch a heavy burden 阅读全文
摘要:
#!/bin/bashimage="/media/C/1.jpg"result="/media/C/12.jpg"width=`convert $image -format "%w" info:`height=`convert $image -format "%h" info:`#Now convert your percentages to pixels as variables, for examplexoff=`convert xc: -format "%[fx:$width*10/100]&quo 阅读全文
摘要:
jade-->htmlhttps://github.com/visionmedia/jade#jade1jade(1)Usage: jade [options] [dir|file ...]Options: -h, --help output usage information -V, --version output the version number -o, --obj <str> javascript options object -O, --out <dir> output the compiled html to <dir> -p, ... 阅读全文
摘要:
update'$set': { "options":{ "A":"choice A stands for", "B":"choice B stands for", "C":"choice C stands for", "D":"choice D stands for", } }find$and:[{html:/答案/},{html:/回复/}]$or:[{html:/答案/},{title:/测试/} 阅读全文