摘要: 一个成功的 Git 分支模型 2014/12/12 · IT技术 · 4 评论 · Git 分享到:55 sass进阶篇 Spring事务管理 Android-屏幕适配全攻略 Android-仿微信图片选择器 本文由 伯乐在线 - henry 翻译,sunbiaobiao 校稿。未经许可,禁止转载! 阅读全文
posted @ 2016-02-29 17:10 xiaojiayu 阅读(204) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/rebelqsp/article/details/22109925 阅读全文
posted @ 2016-02-24 17:42 xiaojiayu 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Python 对字符串切片 对字符串切片字符串 'xxx'和 Unicode字符串 u'xxx'也可以看成是一种list,每个元素就是一个字符。因此,字符串也可以用切片操作,只是操作结果仍是字符串:>>> 'ABCDEFG'[:3]'ABC'>>> 'ABCDEFG'[-3:]'EFG'>>> 'A 阅读全文
posted @ 2016-02-23 14:28 xiaojiayu 阅读(150) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import time,serialser = serial.Serial('COM3', 57600, timeout=10,parity=serial.PARITY_EVEN, rtscts=1)i = 0now = time.time()print(ser.inWa 阅读全文
posted @ 2016-02-23 14:21 xiaojiayu 阅读(760) 评论(0) 推荐(0) 编辑
摘要: Python 本身没有“break n” 和“goto” 的语法,这也造成了Python 难以跳出多层(特定层数)循环。下面是几个跳出多层(特定层数)循环的tip。 1、自定义异常 class getoutofloop(Exception): pass try: for i in range(5): 阅读全文
posted @ 2016-02-17 14:53 xiaojiayu 阅读(12293) 评论(0) 推荐(0) 编辑
摘要: #json string:s = json.loads('{"name":"test", "type":{"name":"seq", "parameter":["1", "2"]}}')print sprint s.keys()print s["name"]print s["type"]["name 阅读全文
posted @ 2016-02-17 14:48 xiaojiayu 阅读(59899) 评论(0) 推荐(2) 编辑
摘要: Python的字典的items(), keys(), values()都返回一个list dict = { 1 : 2, 'a' : 'b', 'hello' : 'world' } dict.values() ['b', 2, 'world'] dict.keys() ['a', 1, 'hell 阅读全文
posted @ 2016-02-16 15:08 xiaojiayu 阅读(512) 评论(0) 推荐(0) 编辑
摘要: random库 random.random()返回n,则 0 <= n < 1的小数。random.uniform(a,b) 返回n ,则 a <= n <= b的浮点数。random.randint(a,b)返回n ,则a <= n <= b的整数。random.choice(sequence) 阅读全文
posted @ 2016-02-03 18:50 xiaojiayu 阅读(461) 评论(0) 推荐(0) 编辑
摘要: from sqlalchemy import create_engine,text,Column,Integer,String,Sequencefrom sqlalchemy.ext.declarative import declarative_basefrom sqlalchemy.orm imp 阅读全文
posted @ 2016-02-02 16:12 xiaojiayu 阅读(208) 评论(0) 推荐(0) 编辑