Python 中urllib2.urlopen 中存在中文转码问题,解决方法如下:1.import BeautifulSoupimport chardetresponse =urllib2.urlopen('%s'%line) #response.decode('utf-8')...
分类:
编程语言 时间:
2014-10-08 14:44:45
阅读次数:
176
[leetccode]You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?...
分类:
其他好文 时间:
2014-10-08 11:29:55
阅读次数:
193
以下摘自:http://www.jb51.net/article/17560.htm为什么Python使用过程中会出现各式各样的乱码问题,明明是中文字符却显示成“\xe4\xb8\xad\xe6\x96\x87”的形式?为什么会报错“UnicodeEncodeError: 'ascii' codec...
分类:
编程语言 时间:
2014-10-08 11:27:15
阅读次数:
240
偶然需要了解,学习了这篇文章,转载记录一下
自:http://blog.csdn.net/jxzkin/article/details/7949629
1.创建测试数据 [html]view plaincopy CREATETABLECC (StudentNVARCHAR2(2),CourseNVA...
分类:
数据库 时间:
2014-10-07 16:34:53
阅读次数:
380
JSON是前端编程经常用到的格式,对于PHP或者Python,解析JSON都不是什么大事,尤其是PHP的json_encode和json_decode,干的相当的漂亮。Linux下也有处理处理JSON的神器:jq。 对于JSON格式而言,jq就像sed/awk/grep这些神器一样的方便,而也,jq...
分类:
其他好文 时间:
2014-10-07 08:24:53
阅读次数:
355
TypesEquality and ComparisonsJavaScript has two different ways of comparing the values of objects for equality.The Equality OperatorThe equality opera...
分类:
编程语言 时间:
2014-10-05 03:25:57
阅读次数:
166
Chapter 18 Saving, Loading, and Application State1. Archiving is one of the most common ways of persisting model objects on iOS. Archiving an object i...
分类:
移动开发 时间:
2014-10-04 00:03:55
阅读次数:
286
Functions are values, and we can manipulate function values in interesting ways.Currying allows us to produce a new function by combining a function a...
分类:
编程语言 时间:
2014-10-03 21:58:45
阅读次数:
174
Perishable Press网站近日发表了一篇文章《3 Ways to Preload Images with CSS, JavaScript, or Ajax》,分享了利用CSS、JavaScript及Ajax实现图片预加载的三大方法。下面为译文。预加载图片是提高用户体验的一个很好方法。图片预...
分类:
编程语言 时间:
2014-10-03 18:02:34
阅读次数:
328
今天在研究微信天气预报的时候,获取到json数据,后来json_decode为对象,但是去看不懂他的意思,于是百度搜索到的结果:{ "weatherinfo": { "city":"北京", ...
分类:
其他好文 时间:
2014-10-03 02:02:03
阅读次数:
250