摘要:
字符计数问题这里有个字符串'hereisasampleofenglishtext'问里面各个字符出现次数是多少要求返回结果:(字典是无序的,所以只要结果正确,不要求顺序如此){'a':2,'':6,'e':5,'g':1,'f':1,'i':2,'h':2,'m':1,'l':2,'o':1,'n':1,'p':1,'s':3,'r':1,'t':2,'x':1}代码:代码更多解法参考:tieba... 阅读全文
posted @ 2010-09-14 22:23
oyzway
阅读(345)
评论(0)
推荐(0)
摘要:
[代码]转:[代码] 阅读全文
posted @ 2010-09-14 21:06
oyzway
阅读(1204)
评论(0)
推荐(0)
摘要:
Linux Command Line and Shell Scripting Bible__第10章第10章 更多结构化命令-----------for-----------[代码]内部字段分隔符IFS(internal field separator) bash shell默认将 空格、制表符、换行符 看作字段分隔符。如果想将IFS的值更改为只识别换行符,需要这样做:IFS=$'\n'警告:当使... 阅读全文
posted @ 2010-09-14 17:47
oyzway
阅读(660)
评论(0)
推荐(0)
摘要:
Chapter 2: Date Manipulation __Linux 101 HacksHack 7. Set System Date and TimeTo change the system date use:[代码]For example, to set system date to Jan 31st 2009, 10:19 p.m, 53 seconds[代码]You can also ... 阅读全文
posted @ 2010-09-14 00:23
oyzway
阅读(434)
评论(0)
推荐(0)
浙公网安备 33010602011771号