摘要: 一,函数的文档: zip(): Make an iterator that aggregates elements from each of the iterables. Returns an iterator of tuples, where the i-th tuple contains the 阅读全文
posted @ 2016-04-11 19:13 蒙面 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 在项目 algorithm_submit 中: 查询给定用户的角色: >>> Role.query.join(User, Role.id == User.role_id).filter_by(email = '1074976039@qq.com') >>> Role.query.join(User, Role.id == User.role_id).filter_by(email ... 阅读全文
posted @ 2015-12-01 18:45 蒙面 阅读(125) 评论(0) 推荐(0) 编辑
摘要: import codecs f = codecs.open('test.txt', 'w', 'utf-8') f.write('中文') f.close() 运行结果: 阅读全文
posted @ 2015-08-18 16:16 蒙面 阅读(2362) 评论(0) 推荐(0) 编辑
摘要: 豆瓣电影主页上爬到了如下url: href=""http://movie.douban.com/subject/26289144/?from=showing"" href=""http://movie.douban.com/subject/26289144/?from=showing"" href=""h... 阅读全文
posted @ 2015-08-18 14:26 蒙面 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 动态语言的多态和静态语言c++等多态含义不太一样,c++中的多态就是参数数量和类型不同的方法就是不同方法,而动态语言中的多态其实值的是方法的寻找过程,即向右找到类(或者单件类),在类中找不到的话再找父类,一直在祖先链中找到或者找不到为止,先找到的就被调用: class MyClass(object): def fn(x): print ("This is t... 阅读全文
posted @ 2015-08-12 17:39 蒙面 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 一,两个函数的文档: 1,time.time(): time.time() Return the time in seconds since the epoch as a floating point number. Note that even though the time is always returned as a floating point number, not all ... 阅读全文
posted @ 2015-08-11 21:24 蒙面 阅读(3038) 评论(0) 推荐(0) 编辑
摘要: 正确语法为: select * from user where userName = '1' & userPassword = '1' 阅读全文
posted @ 2015-07-22 21:43 蒙面 阅读(147) 评论(0) 推荐(0) 编辑
摘要: over 阅读全文
posted @ 2015-07-21 22:01 蒙面 阅读(172) 评论(0) 推荐(0) 编辑
摘要: mysql> SET PASSWORD FOR root@localhost = PASSWORD('newpass');执行以上命令可将root用户的密码修改为newpass 阅读全文
posted @ 2015-07-16 11:09 蒙面 阅读(742) 评论(0) 推荐(0) 编辑
摘要: 一,配置wamp安装目录下的 \bin\apache\apache2.4.9\bin 目录下的php.ini文件,下拉到最下面,配置[xdebug]: [xdebug] xdebug.remote_enable = on xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.prof... 阅读全文
posted @ 2015-07-05 22:03 蒙面 阅读(1108) 评论(0) 推荐(0) 编辑