上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页

2015年4月1日

摘要: 由于不能在控制台输出,可以使用Messagebox 但是有时候要用到输出int之类的,需要转换。转换过程中有会有很多问题。 这里给出两个可行的代码 int a = 5, b = 10; int result = getMax(a, b); WCHAR tmp[8]; wsprintf(... 阅读全文
posted @ 2015-04-01 19:15 长456风 阅读(159) 评论(0) 推荐(0)

2015年3月20日

摘要: dict = {'a':7,'b':3,'c':4,'d':1,'e':8,}print dictorder_dict = collections.OrderedDict()order_dict['a'] = 1order_dict['b'] = 2print order_dictprint o... 阅读全文
posted @ 2015-03-20 17:05 长456风 阅读(175) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-def dict_test(): #构造Map并对其排序 attr_tul = list(['a','b','c']) one_tul = list([[3,4],[1,9],[2,5]]) one_dic = {} f... 阅读全文
posted @ 2015-03-20 14:26 长456风 阅读(223) 评论(0) 推荐(0)
摘要: #构造Map并对其排序attr_tul = ['a','b','c','d','e','f']one_tul = [1,3,2,5,8,4]one_dic = {}for i in range(len(attr_tul)): one_dic[attr_tul[i]] = one_tul[i... 阅读全文
posted @ 2015-03-20 12:58 长456风 阅读(119) 评论(0) 推荐(0)

2015年3月19日

摘要: 报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position ipath = 'D:/学习/语料库/SogouC.mini/Sample/C000013/18.txt'uipath = unicode(ipath , "u... 阅读全文
posted @ 2015-03-19 22:18 长456风 阅读(811) 评论(0) 推荐(0)

2015年3月12日

摘要: 使用或 标准的正则表达式有小括号,但是python的没有 # -*- coding: utf-8 -*-import sysimport reimport sysreload(sys)sys.setdefaultencoding( "utf-8" )if __name__ == '__main... 阅读全文
posted @ 2015-03-12 20:41 长456风 阅读(1399) 评论(0) 推荐(0)

2015年3月11日

摘要: python3导入模块和python2 有些不同 需要指定相对目录 如,在Project下有一个nlp目录里面有一个ltp模块,则 from n1.ltp import Clawer 阅读全文
posted @ 2015-03-11 20:01 长456风 阅读(189) 评论(0) 推荐(0)
摘要: 原来的 save = open('1.txt', 'w', 'utf8') 用下面的 save = codecs.open('1.txt', 'w', 'utf8') 阅读全文
posted @ 2015-03-11 19:35 长456风 阅读(1317) 评论(0) 推荐(0)
摘要: import urllib.request url = "http://www.oschina.net/" data = urllib.request.urlopen(url).read() print(data) ''' Created on 2013-1-... 阅读全文
posted @ 2015-03-11 19:10 长456风 阅读(192) 评论(0) 推荐(0)

2015年3月9日

摘要: 开始总是乱码,该设置的都设置了,后来用charde检测编码也一直报错,之后重启了pycharm就好了,乱码问题也没了 阅读全文
posted @ 2015-03-09 22:33 长456风 阅读(233) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页

导航