先上一段代码:这里用到的两个常量:STDIN_FILENO ,STDOUT_FILENO 定义在unidtd.h中 并且在该头文件中定义了很多系统服务的函数原型:如 read(),write();该程序从标准输入获得信息 并将信息输出到标准输出中
分类:
系统相关 时间:
2014-10-22 23:41:38
阅读次数:
695
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //context.Response.Write(c...
分类:
Web程序 时间:
2014-10-22 21:35:03
阅读次数:
199
二维数组:int[,] i=new int[m,n] 二维数组中m代表有几个n长度的一维数组,索引仍然从0开始。练习:Console.Write("请输入人数:"); int n=int.Parse(Console.ReadLine()); ...
分类:
其他好文 时间:
2014-10-22 20:14:26
阅读次数:
216
个人感觉学一门语言,首先是要学他的输入和输出,而输出的第一句肯定是hello world,javascript的输出是alert,输入是prompt(当然也可以是document.write)。function是声明函数的,这点和Java和c#就有所不同(它们不需要声明),数组的声明是var a=n...
分类:
Web程序 时间:
2014-10-22 20:08:53
阅读次数:
227
某些业务问题使用批处理是最实在的解决方案, 而 Spring batch 框架提供了实现批处理作业的架构。 Spring Batch 将一个分块模式定义为三个阶段: 读取(read)、 处理(process)、 已经写入(write),并且支持对常见资源的读取和写入。 本期的Open source Java projects 系列探讨了 Spring Batch 是干什么的以及如何使用它。...
分类:
数据库 时间:
2014-10-22 18:11:19
阅读次数:
1052
对一个对端已经关闭的socket调用两次write, 第二次将会生成SIGPIPE信号, 该信号默认结束进程.具体的分析可以结合TCP的"四次握手"关闭. TCP是全双工的信道, 可以看作两条单工信道, TCP连接两端的两个端点各负责一条. 当对端调用close时, 虽然本意是关闭整个两条信道,.....
分类:
其他好文 时间:
2014-10-22 17:49:33
阅读次数:
163
Key words: merge compare columnswhen we contact merge sql in ETL,When we update some columns we should compare the value change or not.We always write...
分类:
其他好文 时间:
2014-10-22 14:24:51
阅读次数:
160
import base64f = open("m1.jpg", "rb")res = f.read()s = base64.b64encode(res)f = open("hello.txt","w")f.write(s)
分类:
编程语言 时间:
2014-10-22 12:54:16
阅读次数:
424
之前文章提到写时复制(copy-on-write)技术,要实现这种功能,针对上文中Handle代码,需要将size_t * use这个抽象出来,封装成一个引用计数类,提供写时复制功能。CUseCount类实现如下: 1 class CUseCount 2 { 3 public: 4 ...
分类:
其他好文 时间:
2014-10-22 06:23:50
阅读次数:
208
Given two binarytrees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and...
分类:
其他好文 时间:
2014-10-21 23:02:04
阅读次数:
240