The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should do...
分类:
其他好文 时间:
2014-12-27 06:43:00
阅读次数:
359
Java NIO的核心部件: Buffer Channel Selector Buffer 是一个数组,但具有内部状态。如下4个索引: capacity:总容量 position:下一个要读取/写入的元素索引 limit:限制,第一个不能读取/写入的元素索引 mark:位置标记,重置position...
分类:
编程语言 时间:
2014-12-22 17:34:31
阅读次数:
252
在看battery驱动时,遇到get_fs()和set_fs(KERNEL_DS),以下是具体函数:void 厂商名_bat_write_phone_bat_capacity_tofile(void){ struct file *fp_bat_sts = NULL; int used = 0; m....
分类:
系统相关 时间:
2014-12-22 02:05:10
阅读次数:
347
在某种程度上,可以将string类型视为字符容器,支持很多容器操作。与vector相似,string的字符也是连续存储的,因此也有capacity和reserve操作。另外,也可用迭代器输出字符串,如下例:string s("Hello world!");string :: iterator ite...
分类:
其他好文 时间:
2014-12-18 22:01:20
阅读次数:
248
1、链表定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListElement_t *head;
ListE...
分类:
其他好文 时间:
2014-12-13 23:25:33
阅读次数:
398
1、链表定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListElement_t *head;
ListE...
分类:
其他好文 时间:
2014-12-13 23:24:26
阅读次数:
416
1、 链表定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListElement_t *head;
List...
分类:
其他好文 时间:
2014-12-13 23:21:33
阅读次数:
218
1、链表定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListElement_t *head;
List...
分类:
其他好文 时间:
2014-12-12 11:48:13
阅读次数:
143
1、链表定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListElement_t *head;
ListElem...
分类:
其他好文 时间:
2014-12-12 11:46:41
阅读次数:
142
1、链表结构定义
typedef struct ListElement_t_ {
void *data;
struct ListElement_t_ *next;
} ListElement_t;
typedef struct List_t_{
int size;
int capacity;
ListEleme...
分类:
其他好文 时间:
2014-12-11 19:17:44
阅读次数:
201