原代码 测试 测试1 $("li.li2 a[id^='one4_']").mouseover(function(){ $('li.li2 div.xiala_list a').each(function(){ $(this).attr('href', ...
分类:
其他好文 时间:
2014-12-03 18:48:10
阅读次数:
446
这里是最为见得的链表测试代码,使用如下接口:
初始化(INIT_HEAD)、添加(list_add)、遍历(list_for_each)及取节点list_entry
功能待丰富,目前代码如下:
#include "list.h"
struct stListUse
{
char *name;
int index;
struct list_hea...
分类:
系统相关 时间:
2014-11-04 00:13:24
阅读次数:
832
1 while(list($key,$value) = each($arr))2 {3 while(list($k,$v) = each($value))4 {5 echo $key."==>".$k."===>".$v."";6 }7 } 1 $msg = array( 2 arra...
分类:
Web程序 时间:
2014-08-20 23:52:33
阅读次数:
274
接上一篇Linux 内核 链表 的简单模拟(1) 第五章:Linux内核链表的遍历/***
list_for_each - iterate over a list* @pos: the &struct list_head to use as a
loop cursor.* @...
分类:
系统相关 时间:
2014-06-07 22:09:58
阅读次数:
451
最近写了一个接受socket数据包,然后再重组上层协议包的东西。每次read到数据就将数据添加到一个链表的尾部,然后检查是否收到了一个完整的包。为了减少内存碎片,把用过的链表节点添加到另外一个链表中,这样下次可以从这个cache链表中重用节点。
在debug的时候我把cache list中的数据打印出来,代码如下:
struct seg_node
{
void* bu...
分类:
其他好文 时间:
2014-05-25 21:31:09
阅读次数:
326
一、list_for_each
1.list_for_each原型
#define list_for_each(pos, head) for (pos = (head)->next, prefetch(pos->next); pos != (head); pos = pos->next, prefetch(pos->next))
它实际上是一个 for 循环,利用...
分类:
其他好文 时间:
2014-05-13 08:50:12
阅读次数:
506
转载:http://www.kernelchina.org/node/1050linux的list实现之中有如下东东:#define
list_for_each(pos, head) \ for (pos = (head)->next; prefetch(pos->next),
pos != (h....
分类:
系统相关 时间:
2014-05-09 10:04:38
阅读次数:
323
linux内核中的list太好用了,可惜VC编译器不支持
typeof关键字,将linux内核中的list直接移植过来不能用修改所有与typeof相关的代码后,终于可以勉强在VC下运行起来了,但是还不完美,list_for_each_entry和list_for_each_entry_safe需要增...
分类:
其他好文 时间:
2014-05-09 08:57:19
阅读次数:
603