2015年6月26日

c 链表交换节点的排序

摘要: #include typedef struct listnode { int f; struct listnode *next;} ListNode;ListNode *sort(ListNode *head){ ListNode *p,*p1,*p2,*p3; ListNo... 阅读全文

posted @ 2015-06-26 10:22 嘘寒问暖 阅读(692) 评论(0) 推荐(0) 编辑

2015年6月25日

c 查找替换字符串

摘要: #include #include char *mystrstr(char *s1, char *s2){ int i; if (*s2) { while(*s1) { for(i = 0; *(s1+i) == *(s2+i); i++) { if(!*(s2+i+1)) ... 阅读全文

posted @ 2015-06-25 12:22 嘘寒问暖 阅读(629) 评论(0) 推荐(0) 编辑

2015年6月19日

c 字符串压缩

摘要: #include #include //查找该元素是否已经存在int find(char t[],int len,char ch){ int i; for(i = 0; i < len; i++) { if (t[i] == ch) { return 1; } } return 0;}ch... 阅读全文

posted @ 2015-06-19 17:32 嘘寒问暖 阅读(539) 评论(0) 推荐(0) 编辑

2015年6月17日

c 链表实例

摘要: #include #include struct node{ int data; struct node *next;};typedef struct node NODE;typedef struct node * PNODE;PNODE constructlist( PNODE head,... 阅读全文

posted @ 2015-06-17 14:42 嘘寒问暖 阅读(258) 评论(0) 推荐(0) 编辑

c 删除字符串中的指定字符

摘要: #include #include void delChar(char *s, char ch){ int i,j; int len = strlen(s); for(i = 0; i < len; i++) { if(s[i] == ch) { for(j = i; j < len; ... 阅读全文

posted @ 2015-06-17 11:25 嘘寒问暖 阅读(1396) 评论(0) 推荐(0) 编辑

2015年6月16日

js 获取url并删除指定参数

摘要: //返回参数字符串function remove_arg_from_url(arg_name_removed) { //设置或获取 href 属性中跟在问号后面的部分。 var url = window.location.search; var arr = []; var q... 阅读全文

posted @ 2015-06-16 12:11 嘘寒问暖 阅读(2857) 评论(0) 推荐(0) 编辑

2015年6月12日

c 语言 格式化输出

摘要: #include int main(){ int i; unsigned int j; char input[ ]="10 0x1b aaaaaaaa bbbbbbbb"; char s[5]; sscanf(input,"%d %x %5[a-z] %*s %f",... 阅读全文

posted @ 2015-06-12 13:48 嘘寒问暖 阅读(193) 评论(0) 推荐(0) 编辑

2015年6月10日

c 查找 子字符串

摘要: #include int Search(char *s1, char *s2) { char *temp = s1; int count = 0; while(*temp != '\0') { char *tmp1 = temp; char *t1 = s2; while(*t1 != '\0... 阅读全文

posted @ 2015-06-10 17:27 嘘寒问暖 阅读(629) 评论(0) 推荐(0) 编辑

2015年5月20日

c strstr

摘要: #include int strend(char *s , char *t) { char *temp = s; while(*temp != '\0') { char *tmp1 = temp; char *t1 = t; while(*t1 != '\0' && *tmp1 != '\... 阅读全文

posted @ 2015-05-20 15:13 嘘寒问暖 阅读(197) 评论(0) 推荐(0) 编辑

2015年5月8日

php session cookie加密实例

摘要: session cookie之间的差别在于session可以方便的存取多种数据类型,而cookie只支持字符串类型,同时对于一些安全性比较高的数据,cookie需要进行格式化与加密存储,而session存储在服务端则安全性较高。 10000, 'name' => 'spark', 'em... 阅读全文

posted @ 2015-05-08 11:04 嘘寒问暖 阅读(1432) 评论(0) 推荐(0) 编辑

导航