上一页 1 ··· 13 14 15 16 17
摘要: importpymssqlclassMSSQL:"""对pymssql的简单封装pymssql库,该库到这里下载:http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql使用该库时,需要在Sql Server Configuration Manager里面将TCP/IP协议开启用法:"""def__init__(self,host,user,pwd,db):self.host=hostself.user=userself.pwd=pwdself.db=dbdef__GetConnect(se 阅读全文
posted @ 2013-07-23 22:20 预见者 阅读(2213) 评论(0) 推荐(0) 编辑
摘要: pymssql methodsset_max_connections(number)-- Sets maximum number of simultaneous database connections allowed to be open at any given time. Default is 25.get_max_connections()-- Gets current maximum number of simultaneous database connections allowed to be open at any given time.Connection(pymssqlCn 阅读全文
posted @ 2013-07-23 22:19 预见者 阅读(781) 评论(0) 推荐(0) 编辑
摘要: 先来一个简单的例子吧:?12345678910importMySQLdbtry:conn=MySQLdb.connect(host='localhost',user='root',passwd='root',db='test',port=3306)cur=conn.cursor()cur.execute('select * from user')cur.close()conn.close()exceptMySQLdb.Error,e:print"Mysql Error %d: %s"%(e.ar 阅读全文
posted @ 2013-07-23 22:09 预见者 阅读(247) 评论(0) 推荐(0) 编辑
摘要: The following identifiers are used as reserved words, orkeywordsof the language, and cannot be used as ordinary identifiers. They must be spelled exactly as written here:False class finally is returnNone continue for lambda tryTrue def from ... 阅读全文
posted @ 2013-07-23 21:53 预见者 阅读(315) 评论(0) 推荐(0) 编辑
摘要: C++ STL 的实现:1.vector 底层数据结构为数组 ,支持快速随机访问2.list 底层数据结构为双向链表,支持快速增删3.deque 底层数据结构为一个中央控制器和多个缓冲区,详细见STL源码剖析P146,支持首尾(中间不能)快速增删,也支持随机访问4.stack 底层一般用23实现,封闭头部即可,不用vector的原因应该是容量大小有限制,扩容耗时5.queue 底层一般用23实现,封闭头部即可,不用vector的原因应该是容量大小有限制,扩容耗时6.45是适配器,而不叫容器,因为是对容器的再封装7.priority_queue 的底层数据结构一般为vector为底层容器... 阅读全文
posted @ 2013-06-13 14:34 预见者 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 转义字符收集如下:转义字符意义ASCII码值(十进制)\a响铃(BEL) 007\b退格(BS) 008\f换页(FF) 012\n换行(LF) 010\r回车(CR) 013\t水平制表(HT) 009\v垂直制表(VT) 011\\反斜杠092\?问号字符063\'单引号字符039\"双引号字符034\0空字符(NULL) 000\ddd任意字符三位八进制\xhh任意字符二位十六进制不过要注意:1,\v垂直制表和\f换页符对屏幕没有任何影响,但会影响打印机执行响应操作。2,\n其实应该叫回车换行。换行只是换一行,不改变光标的横坐标;回车只是回到行首,不改变光标的纵坐标。3 阅读全文
posted @ 2013-06-08 16:42 预见者 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 在 “资源视图”-》“Stringtable” 下 右键stringtable -》 插入副本 弹出对话框 选择语言 如 “英语(美国)” 确定会新增加了一个stringtable 然后在BOOL C**** App::InitInstance(){// 新增 if (GetACP() != 936) // 如果判断当前系统不是中文系统用下列函数将英文字串表设为使用字串表 { SetThreadUILanguage(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US)); }}需要把新增加stringtable里面的所有中文信息改为英... 阅读全文
posted @ 2013-06-08 16:09 预见者 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 宽字节转单字节 :size_twcstombs(char*mbstr,constwchar_t*wcstr,size_tcount);单字节转宽字节 :size_tmbstowcs(wchar_t*wcstr,constchar*mbstr,size_tcount);上面这两个是标准C++的,下面两个好像是微软的函数。不过上面两个函数只能一个一个的转换,也就是说一次只能转换一个字符。下面两个方法就是 宽字符串与单字节字符串之间的转换。宽字节转多字节 :WideCharToMultiByte //其实这里的多字节就是我们说的char多字节转宽字节 :MultiByteToWideChar //多 阅读全文
posted @ 2013-06-08 14:45 预见者 阅读(526) 评论(0) 推荐(0) 编辑
摘要: SELECT creation_time N'语句编译时间' ,last_execution_time N'上次执行时间' ,total_physical_reads N'物理读取总次数' ,total_logical_reads/execution_count N'每次逻辑读次数' ,total_logical_reads N'逻辑读取总次数' ,total_logical_writes N'逻辑写入总次数' , execution_count N'执行次数' , total_wo 阅读全文
posted @ 2013-04-09 16:48 预见者 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17