2016年11月2日

array

摘要: class array.array(typecode[,initializer]) 参数:typecode typecode 对应的C类型 对应的Python类型'b' signed char int'B' unsigned char int'u' Py_UNICODE Unicode charac 阅读全文

posted @ 2016-11-02 21:06 eaxebx 阅读(201) 评论(0) 推荐(0) 编辑

2016年10月7日

研究一下uucode编码

摘要: uucode编码是把任意二进制数据转换为ascii字符的编码用于在一些只能传递文本的地方传送二进制数据uu模块提供了encode()和decode()用于将一个文件转换为uucode编码的字符文件,文件的内容以begin开头以end结尾中间内容即转换的内容codecs模块的encode(),deco 阅读全文

posted @ 2016-10-07 15:02 eaxebx 阅读(1067) 评论(0) 推荐(0) 编辑

2016年10月6日

python的hashlib模块

摘要: # -*- coding: utf-8 -*- """python 的MD5 sha1 模块""" import hashlib #md5的例子 m = hashlib.md5() m.update(b"Hello 123") m.update(b" Hello 456") print(m.digest()) #字节串 print(m.hexdigest())#字符串 print(m.... 阅读全文

posted @ 2016-10-06 21:56 eaxebx 阅读(2570) 评论(0) 推荐(0) 编辑

2016年10月2日

Qt5遇到的问题

摘要: 好久没用Qt了,今天又重新安装了一个,结果遇到不少问题 本机环境:VS2015,Qt5.7 装好后,就新建工程测试了一下,结果无法编译,提示 :-1: error: cannot open C:\Users\我的用户名,中文的\AppData\Local\Temp\main.obj.7148.0.j 阅读全文

posted @ 2016-10-02 14:57 eaxebx 阅读(388) 评论(0) 推荐(0) 编辑

2014年11月24日

tkinter之文件对话框

摘要: 1 from tkinter import * 2 from tkinter.filedialog import * 3 4 filetype = [('Python Files', '*.py *.pyw'), 5 ('Text Files', '*.txt'), 6 ('... 阅读全文

posted @ 2014-11-24 13:08 eaxebx 阅读(870) 评论(0) 推荐(0) 编辑

2014年11月11日

关于随机数分布器的问题

摘要: 今天看C++Primer介绍的随机数,准备使用一下,结果出现点小问题,就是每次运行程序获得的首个随机数都是一样的。(已使用time作为随机数种子,按理说应该至少每秒产生的随机数都是不一样的)int main(){ default_random_engine e(time(0)); uni... 阅读全文

posted @ 2014-11-11 21:27 eaxebx 阅读(459) 评论(0) 推荐(0) 编辑

2014年10月9日

控制台程序进度指示器

摘要: #include #include #include int main(){ int i; for(i = 0; i < 101; i++){ printf("\r%3d%%",(int)(100L * i / 100)); fflush(stdout); ... 阅读全文

posted @ 2014-10-09 19:36 eaxebx 阅读(141) 评论(0) 推荐(0) 编辑

2014年10月7日

PyQt5+python3的FindDialog

摘要: 1 import sys 2 from PyQt5.QtWidgets import * 3 from PyQt5.QtCore import Qt, pyqtSignal 4 5 class FindDialog(QDialog): 6 findNext = pyqtSignal(st... 阅读全文

posted @ 2014-10-07 20:59 eaxebx 阅读(348) 评论(0) 推荐(0) 编辑

2014年9月22日

关于auto和decltype

摘要: 1 auto会忽略顶层const,保留底层const 2 3 int i = 0; 4 5 const int* const p = &i; 6 7 auto p2 = p; //p2是const int*,不是const int* const 8 //... 阅读全文

posted @ 2014-09-22 22:51 eaxebx 阅读(382) 评论(0) 推荐(1) 编辑

导航