1、 Dict2.1 数据结构定义dict.h// 哈希表结构typedef struct dictht { dictEntry **table; //哈希表数组指针 unsigned long size; //哈希表大小 unsigned long sizemask; //掩码...
分类:
其他好文 时间:
2014-08-03 15:11:05
阅读次数:
193
//接前一章,本节主要介绍线性区以及相关线性区的操作。
线性区
Linux通过类型为vm_area_struct的对象实现线性区。
vm_area_struct:
struct vm_area_struct {
struct mm_struct * vm_mm; /* The address space we belong to. */
unsigned long vm_start...
分类:
系统相关 时间:
2014-08-03 10:21:55
阅读次数:
497
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
struct node{
char...
分类:
其他好文 时间:
2014-08-03 10:20:25
阅读次数:
216
# include
# include
# include
using namespace std;
int fa[10010];
struct node
{
int p;
int d;
};
struct node a[10010];
bool cmp(node a1,node a2)//利润从大到小
{
return a1.p>a2.p;
}
int find(int x)
{...
分类:
其他好文 时间:
2014-08-03 10:16:25
阅读次数:
208
问题:将二叉树的所有结点指向他的右边的一个结点分析:对于每一个结点来说,其操作都是一样的,除了他的左儿子指向右儿子外,其左儿子的全部右后辈均指向其右儿子的全部左后辈/** * Definition for binary tree with next pointer. * struct TreeLin...
分类:
其他好文 时间:
2014-08-03 10:12:05
阅读次数:
178
方法Go 没有类。然而,仍然可以在结构体类型上定义方法。方法接收者出现在func关键字和方法名之间的参数中。package mainimport ( "fmt" "math")type Vertex struct { X, Y float64}func (v *Vertex) Abs() float...
分类:
其他好文 时间:
2014-08-03 07:49:14
阅读次数:
227
链表是Redis中使用非常广泛的一种数据结构,很多地方如List结构底层就是用链表实现的。链表的定义在头文件adlist.h 中,很常见的双向链表,结构如下: 1 // 链表节点 2 typedef struct listNode { 3 struct listNode *prev; //指...
分类:
其他好文 时间:
2014-08-03 01:45:04
阅读次数:
347
1.进程的基本概念 1.1操作系统有三大抽象概念: a)进程:程序的执行过程; b)文件: IO; c)虚拟内存:可用的地址空间; 1.2 进程在内核中是一种数据结构 task_struct(定义见/usr/src/linux-headers-3.8.0-29/include/...
分类:
系统相关 时间:
2014-08-02 23:19:24
阅读次数:
378
1.OC中,只有对象才能设置为nil,而swift中除了对象,Int、struct、enum等任何可选类型都可以等于nil2.OC中,nil是一个指向不存在对象的指针。swift中,nil不是指针,nil是个确定的值,用来表示值缺失。
分类:
其他好文 时间:
2014-08-02 23:06:34
阅读次数:
281
先预处理得到各个编号的点的位置再判断 点在二元一次方程的上方还是下方#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define MAXN 11111
#include
#include
struct ...
分类:
其他好文 时间:
2014-08-02 20:56:44
阅读次数:
241