---恢复内容开始---http://www.devdiv.com/ios_id_nsobject_id_lt_nsobject_gt_-blog-1-50764.html---恢复内容结束---http://www.cocoachina.com/bbs/read.php?tid=151376htt...
分类:
其他好文 时间:
2015-12-22 10:11:29
阅读次数:
164
InputStream是字节流,多用于读取二进制数据InputStreamReader是字符流,多用于读取文本文件。有不同的编码方式,如utf8等。可以在构造的时候指定编码方式。例如,两者都有一个无参read函数,前者读取一个字节并转换为int(0-255),后者读取一个字符并转换为int(最高两位...
分类:
其他好文 时间:
2015-12-21 12:40:13
阅读次数:
159
mysql 表日常变化前几use performance_schema create table test.snap1 as SELECT OBJECT_SCHEMA, OBJECT_NAME, COUNT_STAR, SUM_TIMER_WAIT, COUNT_READ, SUM_TIMER_RE...
分类:
数据库 时间:
2015-12-21 12:29:35
阅读次数:
138
import urllib.request,io,os,sysreq=urllib.request.Request("http://echophp.sinaapp.com/uncategorized/194.html")f=urllib.request.urlopen(req)s=f.read()s...
分类:
编程语言 时间:
2015-12-21 10:51:45
阅读次数:
165
??文件打开int open(const char *pathname, intflags, mode_tmode);普通方式(Canonical mode)flags中没有设置O_SYNC and O_DIRECT。这样的方式中read是堵塞调用(blocking call),等到磁盘数据读取完成...
分类:
系统相关 时间:
2015-12-21 09:18:51
阅读次数:
150
1.maste thread负责将缓冲池中的数据异步刷新到磁盘,保证数据的一致性。2.IO Thread负责IO请求的回调处理。1.0版本之前有4个IO Thread,负责write、read、insert buffer和log IO Thread1.0.x开始,read thread和write ...
分类:
数据库 时间:
2015-12-21 00:00:54
阅读次数:
523
re.S让.能够匹配\n,默认情况点是不能匹配换行符的1.爬取网页源码中的图片#-*-coding:utf-8-*-
importre
importrequests
withopen(‘source.txt‘,‘r‘)asf:
html=f.read()
#匹配图片网址,括号中为需要返回的内容
pic_url=re.findall(‘imgsrc="(.*?)"class="lessonimg"‘,html,re..
分类:
编程语言 时间:
2015-12-20 17:44:26
阅读次数:
224
一道比较有意思的水题。题目The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is r...
分类:
其他好文 时间:
2015-12-19 01:26:36
阅读次数:
248
一:明确源1.Read InputStream2.是不是纯文本文件 是就是Read 不是就是InputStreasm3.设备:硬盘 控制台 键盘二:明确目的1. Writer OutputStream2.是不是纯文本文件 是就是Writer 不是就是OutputStream3.设备:硬盘 控制台 内...
分类:
其他好文 时间:
2015-12-18 21:20:38
阅读次数:
147
linux中非阻塞socket中read、write的返回值
分类:
其他好文 时间:
2015-12-17 19:00:39
阅读次数:
663