码迷,mamicode.com
首页 >  
搜索关键字:shuffle write    ( 15634个结果
LeetCode:Same Tree
问题描述: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 解...
分类:其他好文   时间:2014-10-24 13:03:03    阅读次数:148
a trick in reading and storing file in the exact way!
read and write file is a very common operation regarding file mainuplation.However, the powerfull getline only can read line by line(with new line cha...
分类:其他好文   时间:2014-10-24 12:54:51    阅读次数:161
BufferedInputStream的理解.
BufferedInputStream 自带 8M 缓冲区,我们自己又定义 byte[] buf = new byte[1024*1024];那 bis.read(buf) 就会去, 8M 缓冲区取数据, 读到自己的 1M 缓冲区, 直到碰到 bos.write(buf,0,len) 把1M缓冲区的...
分类:其他好文   时间:2014-10-24 01:33:42    阅读次数:212
UVA 147 Dollars (DP)
New Zealand currency consists of $100, $50, $20, $10, and $5 notes and $2, $1, 50c, 20c, 10c and 5c coins. Write a program that will determine, for any given amount, in how many ways that amount may b...
分类:其他好文   时间:2014-10-23 22:49:46    阅读次数:247
linux上 用户间发送消息 通信
联想:scp命令1、使用write命令,向指定用户发送信息:用户可以使用write命令给其他在线用户发送消息。格式:$write zhangsanhelloworld //通信内容按CTRL+D就将消息发送给zhangsan这个用户。在Shell提示符号输入write,username指接受发送信息...
分类:系统相关   时间:2014-10-23 22:31:06    阅读次数:352
Linux下的非阻塞IO(一)
非阻塞IO是相对于传统的阻塞IO而言的。 我们首先需要搞清楚,什么是阻塞IO。APUE指出,系统调用分为两类,低速系统调用和其他,其中低速系统调用是可能会使进程永远阻塞的一类系统调用。但是与磁盘IO有关的系统调用是个例外。 我们以read和write为例,read函数读取stdin,如果是阻塞IO,...
分类:系统相关   时间:2014-10-23 12:11:41    阅读次数:259
LeetCode--Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:其他好文   时间:2014-10-23 11:56:21    阅读次数:221
Mac 登录界面多了一个其他账户删除
原因分析:       在安装一些软件时会自动启用root账户,但是在安装完成后没有关闭root账户,这样就造成系统以为用户要使用root账户,所以在登录界面出现了一个"其他"账户 解决方法:      打开终端,在终端中输入如下语句回车,然后重新启动,即可解决     sudo defaults write /Library/Preferences/com.apple.log...
分类:系统相关   时间:2014-10-23 09:29:35    阅读次数:343
查看某个端口是否链接超时
defcurl_tyt(port):buf=cStringIO.StringIO()cc=pycurl.Curl()cc.setopt(cc.URL,‘http://10.67.21.11‘)cc.setopt(cc.WRITEFUNCTION,buf.write)cc.setopt(cc.CONNECTTIMEOUT,5)cc.setopt(cc.TIMEOUT,8)cc.setopt(cc.PROXY,‘http://10.67.21.11:%s‘%port)cc.perform()
分类:其他好文   时间:2014-10-23 07:03:59    阅读次数:272
udp编程的学习
后来网上查阅TCP的协议,发现应该是TCP的握手信号导致这个问题,TCP是传输控制协议,协议内会保证数据的正确性,所以每次的数据发送都会等待接收端的ACK。 而被动退出(拔掉网线),接收端根本没有回复,server端就会反复发送之前没有ACK 的数据,导致write阻塞。...
分类:其他好文   时间:2014-10-23 00:04:14    阅读次数:259
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!