摘要: 理解ACID与BASE的区别(ACID是关系型数据库强一致性的四个要求,而BASE是NoSQL数据库通常对可用性及一致性的弱要求原则,它们的意思分别是,ACID:atomicity, consistency, isolation, durability;BASE:Basically Availabl 阅读全文
posted @ 2016-02-08 20:23 侠之大者kamil 阅读(126) 评论(0) 推荐(0) 编辑
摘要: PyCharm3.0默认快捷键( 1、编辑(Editing) Ctrl + Space 基本的代码完成(类、方法、属性) Ctrl + Alt + Space 快速导入任意类 Ctrl + Shift + Enter 语句完成 Ctrl + P 参数信息(在方法中调用参数) Ctrl + Q 快速查 阅读全文
posted @ 2016-02-05 22:37 侠之大者kamil 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 权威yuijbh 阅读全文
posted @ 2016-02-04 23:08 侠之大者kamil 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 权威 阅读全文
posted @ 2016-02-04 23:06 侠之大者kamil 阅读(130) 评论(0) 推荐(0) 编辑
摘要: d代码: # __author__ = liukun # coding:utf-8 line = input("please input the config \n :") #提示输入字符 #输入{"backend":"www.oldboy.org","record":{"server":"100. 阅读全文
posted @ 2016-02-02 21:06 侠之大者kamil 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 代码: fileReadObj = open("input.txt") fileWriteObj = open("output.txt", 'w') fileLineText = fileReadObj.readline() while ('' != fileLineText): string = 阅读全文
posted @ 2016-02-02 17:20 侠之大者kamil 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 代码 my_dic = collections.defaultdict(dict) #或者 import collections my_dic = defaultdict(dict) 把字典的 value 设置一个默认类型。 阅读全文
posted @ 2016-02-01 21:17 侠之大者kamil 阅读(111) 评论(0) 推荐(0) 编辑
摘要: file: jim|123|1 tom|321|3 kamil|432|1 # __author__ = liukun # coding:utf-8 obj = open('file.txt','r') line_list = obj.readlines() #['jim|123|1\n', 'to 阅读全文
posted @ 2016-02-01 11:55 侠之大者kamil 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 代码 import collections#counter继承字典的方法,items(),keys(),vavle() obj = collections.Counter('acbdafcbad') print(obj) print(type(obj)) print(obj.most_common( 阅读全文
posted @ 2016-01-29 23:49 侠之大者kamil 阅读(128) 评论(0) 推荐(0) 编辑
摘要: python的set和其他语言类似, 是一个无序不重复元素集, 基本功能包括关系测试和消除重复元素. 集合对象还支持union(联合), intersection(交), difference(差)和sysmmetric difference(对称差集)等数学运算. sets 支持 x in set 阅读全文
posted @ 2016-01-29 21:57 侠之大者kamil 阅读(226) 评论(0) 推荐(0) 编辑