Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
function readOnly( t ) | |
local proxy = {} | |
local mt = { | |
__index = t, | |
__newindex = function ( t, k, v ) | |
error("attempt to update a read-only table", 2) | |
end | |
} | |
setmetatable(proxy, mt) | |
return proxy |
Set = {} | |
-- create a new set with the values of the | |
-- given list | |
local mt = {} | |
function Set.new(l) | |
local set = {} |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
出现fatal: remote origin already exists. git,可是我就是没有弄过,不知道怎么解决耗了挺久,在网页上看就是没看出来,把网页上的仓库删了还出这个错误,终于找到方法git remote rm origin | |
重新git remote add origin [email protected]:young001/personal_config.git | |
最后git push origin master |
http://www.cnblogs.com/simonw/archive/2007/01/17/622032.html | |
http://blog.csdn.net/hong201/article/details/4153182 | |
http://www.cnblogs.com/simonw/archive/2006/12/20/597986.html |
http://spf13.com/post/ultimate-vim-config |
http://hi.baidu.com/zhmsong/blog/item/7cb17eeaddca8adad539c977.html | |
:s/XXX/YYY/g | |
其中XXX是需要替换的字符串,YYY是替换后的字符串 | |
以上这句只对当前行进行替换,如果需要进行全局替换,则要: | |
%s/XXX/YYY/g | |
如果需要对指定部分进行替换,可以用V进入visual模式,再进行 | |
:s/XXX/YYY/g | |
或者可以指定行数对指定范围进行替换: |
http://www.gammon.com.au/forum/?id=9908 | |
http://blog.fuqcool.com/2011/04/17/algorithm-shuffle.html | |
http://en.wikipedia.org/wiki/Fisher-Yates_shuffle |
http://linux.itwaka.com/administer/69448.html | |
sudo apt-get install libnss3-tools | |
最终执行如下命令导入根证书: | |
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n <证书别名> -i <证书文件> |
sed -i "s/floating-point/fixed-point/g" `find . -name "*.xml"|xargs grep floating-point -rl` | |
http://www.blogjava.net/hispark/archive/2010/08/14/328851.html | |