- 博客(11)
- 资源 (7)
- 收藏
- 关注
转载 strncpy&snprintf用法之比较
strncpy的正确用法:strncpy(dest, src, sizeof(dest));dest[sizeof(dest)-1] = ‘\0’;snprintf的正确用法:snprintf(dest, sizeof(dest), "%s", src);strncpy的问题:size一定要用sizeof(dest)或sizeof(dest)-1,不可误
2011-11-09 22:11:50
1007
转载 TCP Three Way Handshake
The TCP three way handshake is the process for establishing a TCP connection. A TCP connection is established as shown in the below example. In this example, we assume a client computer is contacting a server to send it some information.1.The client sends
2011-05-07 11:41:00
1065
1
转载 C中关键词const释义
const是一个C语言的关键字,它限定一个变量不允许被改变。使用const在一定程度上可以提高程序的安全性和可靠性,另外,在观看别人代码的时候,清晰理解const所起的作用,对理解对方的程序也有一些帮助。 请参考下如下几个问题来理解const的使用:问题1:const变量 & 常量 为什么下面的例子在使用一个const变量来初始化数组,ANSI C的编译器会报告一个错误呢? const int n = 5; int a[n]; 答案与分析: 1)、这个问题讨论的是“常量”与
2011-04-18 23:02:00
540
原创 html expires
14.4. HTML meta expires 网页缓存过期时间expires 属性值 -- 网页缓存过期时间expires用于网页缓存过期时间 expires出现在http-equiv属性中,使用content属性表示页面缓存的过期时间 引用网址:http://www.dreamdu.com/xhtml/expires/ <br />expires用于设定网页的过期时间,一旦过期就必须从服务器上重新加载.时间必须使用GMT格式.expires示例<metahttp-equiv="expires"con
2010-09-19 22:48:00
3286
原创 progress bar
<br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=gb
2010-08-23 22:08:00
554
原创 统计汉字数
<br /><script><br />// 统计汉字数,不包括标点符号<br />function countChinese(str){<br /> var m=str.match(/[/u4e00-/u9fff/uf900-/ufaff]/g);<br /> return (!m?0:m.length);<br />}<br />// 统计非ASCII字符数<br />function countNonAlphabet(str){<br /> var m=str.match(/[^/x
2010-08-09 22:34:00
477
原创 数据结构---图(C描述)
<br />#include<string.h><br />#include<ctype.h><br />#include<malloc.h> /* malloc()等*/<br />#include<limits.h> /* INT_MAX 等*/<br />#include<stdio.h> /* EOF(=^Z 或F6),NULL */<br />#include<stdlib.h> /* atoi() */<br />#include<io.h> /* eof() */<br />#include<
2010-06-24 22:45:00
427
原创 数据结构---图(C描述)
<br />#include<string.h><br />#include<ctype.h><br />#include<malloc.h> /* malloc()等*/<br />#include<limits.h> /* INT_MAX 等*/<br />#include<stdio.h> /* EOF(=^Z 或F6),NULL */<br />#include<stdlib.h> /* atoi() */<br />#include<io.h> /* eof() */<br />#include<
2010-06-24 22:45:00
444
原创 xml
主题:javaScript通用数据类型校验该帖已经被评为良好帖作者正文melin 等级: 文章: 294 积分: 363 来自: 合肥 发表时间:2006-10-26 相关文章: 常见js函数 常用JS代码实例 date_select
2010-03-09 22:40:00
432
原创 顺序栈(C语言)(转)
偶尔看到以下C写的“栈”程序,感觉作者写的较透彻,易懂。给希望学习数据结构的学生或相关人员一个比较轻松的认识。程序实现功能:依次向栈中压入0~19二十个数字,然后依次出栈并输出。头文件:SeqStack.h//SeqStack.h#define TRUE 1#define FALSE 0#define STACK_SIZE 20typedef int ElementTyp
2010-02-07 20:35:00
407
javascript 进度条
2010-08-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅