摘要: 需要安装mysql connector 前往 https://dev.mysql.com/downloads/connector/python/ 下载 选择Platform independence,下载zip包 解压zip包,进入目录,运行python setup.py install,即可成功安 阅读全文
posted @ 2017-10-14 11:26 oDoraemon 阅读(340) 评论(0) 推荐(0)
摘要: 知乎上看到的Python练手项目推荐,链接见:https://www.zhihu.com/question/29372574,不知道是我自己懒得看还是理解力不行,这些项目真的是...太大了呀~~~~ 昨天大概浏览了一下Flask,发现里面的example很有意思,代码极少,思路框架十分清晰,推荐新手 阅读全文
posted @ 2017-10-14 09:33 oDoraemon 阅读(1085) 评论(8) 推荐(0)
摘要: 官网示例: http://httpd.apache.org/docs/current/vhosts/examples.html 阅读全文
posted @ 2017-10-11 15:19 oDoraemon 阅读(976) 评论(0) 推荐(0)
摘要: Python跑一个aggregate脚本,报错:pymongo.errors.CursorNotFound: Cursor not found, cursor id: 35411720832 搜了下原因,猜测应该跟我的网络关系比较大。 网络不顺,导致数据传输时间过长,Cursor长时间无操作。等到再 阅读全文
posted @ 2017-09-18 10:13 oDoraemon 阅读(815) 评论(0) 推荐(0)
摘要: 午睡一觉醒来,突然想伪造IP地址。搜了一下,Mark。 源地址:http://www.cnblogs.com/lmule/archive/2010/10/15/1852020.html 看ecshop的lib_base.php的时候里面获取客户端真实ip的函数(real_ip),有许多情况的判断,主 阅读全文
posted @ 2017-09-12 14:03 oDoraemon 阅读(352) 评论(0) 推荐(0)
摘要: 在Rstudio安装tidyselect的时候,提示 ERROR: compilation failed for package ‘tidyselect’ 搜了一下,在github上找到tidyselect的页面 https://github.com/tidyverse/tidyselect,提示通 阅读全文
posted @ 2017-09-01 10:01 oDoraemon 阅读(574) 评论(0) 推荐(0)
摘要: 下载解压后进入bin目录 使用mysql_install_db.exe工具:https://mariadb.com/kb/en/mariadb/mysql_install_dbexe/ 安装完成后,在使用sc start MyDB的时候,总是不成功。cmd提示start pending,连接数据库连 阅读全文
posted @ 2017-07-22 19:29 oDoraemon 阅读(900) 评论(0) 推荐(0)
摘要: 今天写了这样的一段代码,出现了BUG。 BUG表现为,第二条log_message在event_log中出现了两次,第一条message则不见了。 网上可以找到一样的问题:[Python]list.append()在for循环中每次添加的都是最后的一个元素 主要原因是dict是一个可变的对象,lis 阅读全文
posted @ 2017-06-22 18:36 oDoraemon 阅读(5649) 评论(0) 推荐(0)
摘要: :set fileformat=unix 阅读全文
posted @ 2017-06-19 15:26 oDoraemon 阅读(670) 评论(0) 推荐(0)
摘要: Python 查询Mysql,如果是datetime类型,在json序列化的时候会出现问题。 在网上查了一下,解决方案基本都是遍历dict数据,如果是datetime则转化为字符串。 由于我的数据量很大,后台做循环再返回前端,响应将近40s,十分头疼。 据说使用json_dump方法可以处理这个问题 阅读全文
posted @ 2017-06-15 17:45 oDoraemon 阅读(14103) 评论(0) 推荐(0)