本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Same Tree
Total Accepted: 15922 Total
Submissions: 38418
Given two binary trees, write a function to check if they are equal o...
分类:
其他好文 时间:
2014-05-14 01:15:40
阅读次数:
293
recv函数会将套接字缓冲区中的内容读出,但不清空,与read函数的区别在此。此函数有一个flag标志位,设为MSG_PEEK。
send函数会将缓冲区中的内容写入到套接字,也不清空,与write函数的区别在此。
用这两个函数可以先接收或发送缓冲区中的内容,然后再用readn(此时缓冲区中的内容依然存在)与write函数去继续判断换行符/n,对缓冲区内容实现换行输出。
echocli.c...
分类:
其他好文 时间:
2014-05-13 23:43:35
阅读次数:
494
Person's solution 是用来一种基于软件的解决关键区域问题的算法(critical-section).
它并非完美的,有可能不正确地工作。而且是限制解决两个进程同步的问题。
但是它很简单,很原始,学习起来也是很轻松的。
代码如下:
do {
flag[i] = true;
turn = j;
while (flag[j] && turn == j...
分类:
编程语言 时间:
2014-05-13 08:01:01
阅读次数:
407
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3768
Continuous Login
Time Limit: 2 Seconds Memory Limit: 131072 KB Special Judge
Pierre is recently obsessed...
分类:
其他好文 时间:
2014-05-13 07:28:07
阅读次数:
412
Compiling dogecoind on CentOS
There seems to be some collective difficulty installing altcoin programs on CentOS. This shouldn't come as a surprise to anybody who has used CentOS on even a semi-regul...
分类:
其他好文 时间:
2014-05-13 07:27:06
阅读次数:
542
如何计算每天的平均反复访问人数
if strdate
avgvpd=Int((usercnt)/startdate) %>
显示结果
that is it.this page have been viewed since November 10,1998...
分类:
其他好文 时间:
2014-05-13 06:31:40
阅读次数:
261
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Palindrome Number
Total Accepted: 12165 Total
Submissions: 41736
Determine whether an integer is a palindrome. Do this wit...
分类:
其他好文 时间:
2014-05-13 05:28:07
阅读次数:
253
document.write("**************一.指代当前对象**********************");
function print(str){
document.write(str+"");
};
/*
javascript里面的this可谓是所有语言里最让人费解的了,学习国java或者php的人
在学习javascript的时候会觉得非常莫名其妙,因为...
分类:
编程语言 时间:
2014-05-13 05:15:47
阅读次数:
387
用JS脚本书写文字的方法,下面是一个简单的例子:
==============================================
脚本代码:
document.write("这是红色的字")
==============================================
效果: 这是红色的字
=======================...
分类:
其他好文 时间:
2014-05-12 22:47:31
阅读次数:
414
Y2K Accounting BugTime Limit:1000MSMemory
Limit:65536KTotal Submissions:9632Accepted:4806DescriptionAccounting for
Computer Machinists (ACM) has suffe...
分类:
其他好文 时间:
2014-05-12 19:47:15
阅读次数:
462