最近发现系统中出现了很多 IOException: Connection reset by peer 与 ClosedChannelException: null深入看了看代码, 做了些测试, 发现 Connection reset 会在客户端不知道 channel 被关闭的情况下, 触发了 eve...
分类:
编程语言 时间:
2014-07-24 00:51:37
阅读次数:
390
1、编写calloc,内部用malloc。
void *calloc (size_t n, size_t size)
{
char * memory;
memory =(char*) malloc(n * size);
while( memory != NULL)
{
char * ptr;
ptr = memory;
while ( --n >= 0)
{
*pt...
分类:
其他好文 时间:
2014-07-23 22:40:17
阅读次数:
409
declare @dingdanid int declare @fanhuizhi intset @dingdanid = 1exec 检测订单出库资格 @dingdanid ,@fanhuizhi output (注意别忘了output否则返回值是NULL)select @fanhuizhicre...
分类:
数据库 时间:
2014-07-23 22:28:37
阅读次数:
296
共有部分: 1 String bookFrom = null; 2 String sheetFrom = null; 3 String bookTo = null; 4 String sheetTo = ...
分类:
其他好文 时间:
2014-07-23 22:24:17
阅读次数:
275
阅读到这么个类: public class FileDownloadList { /**上下文*/ private Context mContext; /**请求对象*/ private BaseRequestLims fileRequest = null; /**进度条对话框*/ private ...
分类:
其他好文 时间:
2014-07-23 20:51:25
阅读次数:
259
//数据生成程序/*#include #include #include #include #include #include #include #include using namespace std;int main() { int t = 999; srand( time(NULL...
分类:
其他好文 时间:
2014-07-23 20:48:25
阅读次数:
226
1、字符串包含程序 #include#includeint Strstr(char *String, char *Substring){ if(String==NULL||Substring==NULL||strlen(String)<strlen(Substring)) return -1; ch...
分类:
其他好文 时间:
2014-07-23 16:55:11
阅读次数:
236
一、pl/sql的进阶--控制结构在任何计算机语言(c,java,pascal)都有各种控制语句(条件语句,循环结构,顺序控制结构...),在pl/sql中也存在这样的控制结构。在本部分学习完成后,希望大家达到:1.使用各种if语句2.使用循环语句3.使用控制语句——goto和null(goto语句...
分类:
数据库 时间:
2014-07-23 16:51:31
阅读次数:
335
转型函数Number()可以用于任何数据类型,而另两个函数则专门用于把字符串转换成数值。这个3个函数对于同样的输入会有不同的结果。 Number()函数的转换规则如下: 如果是Boolean值,true和false将分别被转换为1和0 如果是是数字值,只是简单的传入和返回 如果是null...
分类:
其他好文 时间:
2014-07-23 16:22:31
阅读次数:
207
$ clang -dM -E -arch armv7 -x c /dev/null #define OBJC_NEW_PROPERTIES 1 #define __APCS_32__ 1 #define __APPLE_CC__ 6000 #define __APPLE__ 1 #define __...
分类:
其他好文 时间:
2014-07-23 16:18:21
阅读次数:
468