摘要: Mapping a dictionary:D = {'food': 'Spam', 'quantity':4} #build with {}D = dict(food='Spam', quantity=4) #build with dict()D={}D['key'] = 'value' #add key,value to a dict.#Sorting Keys:for key in sorted(D): print(key, '=>', D[key])#Missing Ke 阅读全文
posted @ 2011-10-28 17:17 Aeol Kong 阅读(207) 评论(0) 推荐(0)
摘要: Examples from Learning Python 4th editionM = [[1,2,3],[2,3,4],[3,4,5]col2 = [row[1] for row in M][row[1] + 1 for row in M][row[1] for row in M if row[1] % 2 == 0]diag = [M[i][i] for i in [0,1,2]]G = (sum(row) for row in M) #Create a generator of row sumsnext(G) #Run the ite... 阅读全文
posted @ 2011-10-26 13:05 Aeol Kong 阅读(266) 评论(0) 推荐(0)
摘要: 1. 关于服务管理: netstartnet stopsc query 对于命令详细信息的检索,配合grep可以检索出需要的配置:sc qc ServiceName | grep 2. 配合cygwin时的编码设置set LANG=zh_CN可以使用locale命令查看当前的配置 阅读全文
posted @ 2011-09-15 15:27 Aeol Kong 阅读(132) 评论(0) 推荐(0)
摘要: From: http://flavio.castelli.name/howto_use_git_with_svnHowto use Git and svn togetherPosted by Flavio in Howto, KDE, Programming In these days I’ve heard lot of rumors around Git. After reading some manual/tutorial/guide I discovered that it can be really useful, especially if you spend lot of time 阅读全文
posted @ 2011-08-26 09:03 Aeol Kong 阅读(405) 评论(0) 推荐(0)