#decoding=utf-8‘‘‘编写可供用户查询的员工信息表!1|用户认证IDNamedepartmentphone查询关键字:姓名‘‘‘importlinecache
input01=raw_input("plswriteyourname:")
i=1
name=[]
count=len(open(‘user.txt‘,‘rU‘).readlines())
whilei<=count:
fline=linecache.getline("user..
分类:
编程语言 时间:
2014-09-05 03:20:01
阅读次数:
203
Shuffle过程是MapReduce的核心,也被称为奇迹发生的地方。要想理解MapReduce, Shuffle是必须要了解的。我看过很多相关的资料,但每次看完都云里雾里的绕着,很难理清大致的逻辑,反而越搅越混。前...
分类:
其他好文 时间:
2014-09-04 22:26:00
阅读次数:
346
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:
其他好文 时间:
2014-09-04 22:17:00
阅读次数:
185
项目中要模拟openstack的swift的多路write功能。初步设想是用python的eventlet来实现多线程。比如在write的时候要同时写入两个storage,就用eventlet生成2个线程,两个线程并行的去write,各自返回。但是我刚才在查eventlet的时候发现eventlet...
分类:
其他好文 时间:
2014-09-04 22:14:10
阅读次数:
251
假设server和client 已经建立了连接,server调用了close, 发送FIN 段给client(其实不一定会发送FIN段,后面再说),此时server不能再通过socket发送和接收数据,此时client调用read,如果接收到FIN 段会返回0,但client此时还是可以write ...
分类:
其他好文 时间:
2014-09-04 16:36:39
阅读次数:
214
#region二叉树的先序遍历2///3///二叉树的先序遍历4///5///6///7publicvoidBinTree_DLR(ChainTree tree)8 {9if(tree ==null)10return;1112//先输出根元素13 Console.Write(tree.data +"...
分类:
其他好文 时间:
2014-09-04 16:22:49
阅读次数:
261
继承体系:
1:字节流
以stream结尾的都是字节流。字节流用于读取二进制数据。
2:字符流
结尾都是以reader/writer结尾的。
Write
append(char c) :写入字符
write(char[] cbuf)
write(String str)
write(int c)
flush(...
分类:
其他好文 时间:
2014-09-03 22:44:48
阅读次数:
230
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NOdefaults write com....
分类:
其他好文 时间:
2014-09-03 22:37:27
阅读次数:
225
解决的问题 文件总量太大 一台服务器无法存放 只能放在网络集群中分节点存放 也就是通过屏蔽网络部分 形成一个“ one big CPU” 和 “one big disk” 。Client只需要向这个CPU去做read/write/mofity操作即可。但是对于业务的不同,也无法去满...
分类:
其他好文 时间:
2014-09-03 22:34:17
阅读次数:
272