上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 19 下一页
摘要: Class cursor.MySQLCursor具体方法和属性如下:Constructor cursor.MySQLCursorMethod MySQLCursor.callproc(procname, args=())Method MySQLCursor.close()Method MySQLCursor.execute(operation, params=None, multi=False)Method MySQLCursor.executemany(operation, seq_params)Method MySQLCursor.fetchall()Method MySQLCursor. 阅读全文
posted @ 2013-08-09 10:06 bigbigtree 阅读(5812) 评论(0) 推荐(0)
摘要: 首先对于数据库的基本操作要有一定基础,其次了解Python的基础语法。建议先阅读MysqL中文教程http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/和Python基础教程。一、python连接Mysql连接MySQL的方法有多种,如MySQLdb http://sourceforge.net/projects/mysql-python/但是该项目并不支持python3。现在Mysql官方已经提供了python的连接接口Connector/Python,有安装方法和文档。Connector/Python安装地址:http://dev.my 阅读全文
posted @ 2013-08-08 20:59 bigbigtree 阅读(1726) 评论(0) 推荐(0)
摘要: 连接mysql数据库:cnx = mysql.connector.connect(user='joe', database='test') Connector/Python参数列表Argument NameDefaultDescriptionuser(username*)The user name used to authenticate with the MySQL server.password(passwd*)The password to authenticate the user with the MySQL server.database(db*)T 阅读全文
posted @ 2013-08-08 11:05 bigbigtree 阅读(541) 评论(0) 推荐(0)
摘要: BLOB是一个二进制大对象,可以容纳可变数量的数据。有4种BLOB类型:TINYBLOB、BLOB、MEDIUMBLOB和LONGBLOB。它们只是可容纳值的最大长度不同。A binary large object that can hold a variable amount of binary data. The sorting and comparison of the values for these objects is performed in case-sensitive manner.TINYBLOBA binary large object column with a max 阅读全文
posted @ 2013-08-07 21:50 bigbigtree 阅读(17572) 评论(0) 推荐(1)
摘要: 最近做一些数据库调研的工作,目标是实现影像更快的入库、出库、查询,并实现并行访问等操作。将结果总结成一个mongoImg类,也算是小结吧。 1 ''' 2 Created on 2013-8-6 3 class mongoInsert 4 @author: tree 5 ''' 6 __metacl... 阅读全文
posted @ 2013-08-07 09:59 bigbigtree 阅读(10009) 评论(6) 推荐(0)
摘要: 将一个py脚本从Centos转到win运行,出错如下:UnicodeDecodeError: 'gbk' codec can't decode byte 0xff in position 0: illegal multibyte sequence虽然明白是编码的问题,网络上decode()什么的,貌似不适用python3。后来发现使用字节方式打开可以。出错函数如下:gridfs.GridFS.put()函数。其中调用了读写操作If you want raw bytes then you need to open it in binary mode.pipe = open 阅读全文
posted @ 2013-08-05 16:19 bigbigtree 阅读(19143) 评论(3) 推荐(0)
摘要: 混淆了 python2 里边的 str 和 unicode 数据类型。1.对需要 str->unicode 的代码,可以在前边写上import sysreload(sys)sys.setdefaultencoding('utf8')把 str 编码由 ascii 改为 utf8 (或 gb18030)2.python3 区分了 unicode str 和 byte arrary,并且默认编码不再是 ascii 阅读全文
posted @ 2013-08-02 14:45 bigbigtree 阅读(24490) 评论(0) 推荐(0)
摘要: eclipse emacs 插件http://www.mulgasoft.com/emacspluseclipse字体设置:一、把字体设置为Courier New操作步骤:打开Elcipse,点击菜单栏上的“Windows”——点击“Preferences”——点击“Genneral”——点击“Appearance”——点击“Colors and Font”——在右侧框展开“Basic”文件夹--双击“Text Font”——在弹出窗选择“Courier New”(注:这里可能找不到“Courier New”,点击字体选择框左下角的“显示更多字体”链接来打开设置字体的控制面板,找到“Couri 阅读全文
posted @ 2013-08-01 16:41 bigbigtree 阅读(384) 评论(0) 推荐(0)
摘要: 安装mongohttp://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/其中修改:echo logpath=C:\mongodb\log\mongo.log > C:\mongodb\mongod.cfg此命令行用来配置mongodb安装,创建文件夹mk C:\mongodb\data\dbmk C:\mongodb\log编辑mongod.cfg如下:##store data heredbpath=C:\mongodb\data\db##all output go herelogpath=C:\mongodb\ 阅读全文
posted @ 2013-08-01 11:35 bigbigtree 阅读(268) 评论(0) 推荐(0)
摘要: 20130715 GPT分区下双系统安装,还没有在linux(debian)下安装INode上网软件。开始任务一个:快视数据协议的维护和更新。刚刚接手,文档阅读中。。。准备10点下班,今天是个开始,琐碎的日子,收获很少的时候, 便放到这里。ps 今天没完成阅读~ over20130717 有点虚度了,办理了网络和RTX。接手了一个小任务,landsat8的快视格式规整。定义ZY卫星的数据头格式。。。说起来好听 感觉收获还没复习几页C++primer多。。。囧20130730 回家休假啦,虚度了十来天。接下来努力,加油~! english+coding skills 阅读全文
posted @ 2013-07-15 21:47 bigbigtree 阅读(242) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 19 下一页