会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
seawind2012
博客园
园子
首页
新随笔
联系
管理
订阅
2019年10月26日
flask中models定义表名时最好用小写字母
摘要: class Employee(db.Model, BaseDbModel): id = db.Column(db.Integer, autoincrement=True, primary_key=True) name = db.Column(db.String(30), nullable=False
阅读全文
posted @ 2019-10-26 08:22 seawind2012
阅读(340)
评论(0)
推荐(0)
2019年9月3日
中文编程系列-键盘控制移动的鸭子
摘要: # _*_ coding: utf-8 _*_ 导入 pygame 作为 游戏 导入 time 作为 时间 从 pygame.locals 导入 * 从 sys 导入 exit # 初始化pygame,为使用硬件做准备 游戏.init() # 创建一个窗口 窗口 = 游戏.display.set_mode((640, 480), 0, 32) # 设置窗口标题 游戏.display.set_cap
阅读全文
posted @ 2019-09-03 16:27 seawind2012
阅读(254)
评论(0)
推荐(0)
2019年7月12日
decode 和 encode作用
摘要: decode的作用是将其他编码的字符串转换成unicode编码,如str1.decode('gb2312'),表示将gb2312编码的字符串转换成unicode编码 encode的作用是将unicode编码转换成其他编码的字符串,如str2.encode('gb2312'),表示将unicode编码
阅读全文
posted @ 2019-07-12 09:29 seawind2012
阅读(623)
评论(0)
推荐(0)
公告