摘要: 使用easy_install安装scrapy,报错error: Setup script exited with error: command 'gcc' failed with exit status 1查看报错信息发现尝试pip install lxml==3.3.0继续easy_install... 阅读全文
posted @ 2015-02-11 16:00 Beats 阅读(240) 评论(0) 推荐(0) 编辑
摘要: import MySQLdbimport MySQLdb.cursorscxn=MySQLdb.Connect(host='localhost',user='root',passwd='1234',db='db_name',port=3306,\ cursorclass=MySQLdb.cursor... 阅读全文
posted @ 2015-01-08 15:45 Beats 阅读(294) 评论(0) 推荐(0) 编辑
摘要: python 读取中文文件后,作为参数使用,经常会遇到乱码或者报错asii错误等。我们需要对中文进行decode('gbk')如我有一个data.txt文件有如下内容:百度谷歌现在想读取文件中内容构建查询语句代码如下:f=open('data.txt','r')for i in f.readline... 阅读全文
posted @ 2015-01-08 15:41 Beats 阅读(1166) 评论(0) 推荐(0) 编辑
摘要: 1. 默认情况下,ADB是通过USB来进行连接的。不需要USB线,直接在android设备上安装一个超级终端,在终端里运行以下代码即可:su setprop service.adb.tcp.port 5555stop adbdstart adbd之后,在PC端打开cmd命令行,输入:adb conn... 阅读全文
posted @ 2014-12-12 10:37 Beats 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 注:转自csdn zuyi532方法1:shell> mysql -uroot -proot -h localhost xxx库 -e " select * from xxx表 limit 1" >> out.txt方法2:#>echo "select * from xxx表 limit 1" | ... 阅读全文
posted @ 2014-11-17 14:56 Beats 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 如果button上有class属性的,如:可以这样写:css=button.x-right-button.代表class如果class里带的空格,用.来代替空格如:...可以这样写:css=button.x-btn-text.module_picker_icon如果想用别的属性值定位,用方括号【属性... 阅读全文
posted @ 2014-10-31 17:08 Beats 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 本人是在Centos中安装的mongodb1.下载mongodbcurl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.3.tgz2.解压下载好的文档tar -zxvf mongodb-linux-x86_64-2.6.... 阅读全文
posted @ 2014-08-29 15:31 Beats 阅读(306) 评论(0) 推荐(0) 编辑
摘要: mysql监控管理工具--innotop1.innotop安装参考官网:http://innotop.googlecode.com/svn/html/installing.html# wgethttp://innotop.googlecode.com/files/innotop-1.9.0.tar.... 阅读全文
posted @ 2014-08-11 16:37 Beats 阅读(672) 评论(0) 推荐(0) 编辑