参考:《Redis设计与实现》 RedisObject Redis底层的所有数据结构:都是基于对象的;RedisObject 类型; 编码; 指向实际数据的指针; typedef struct redisObject{ // 类型 unsigned type:4; // 编码 unsigned en ...
分类:
其他好文 时间:
2020-07-05 19:30:02
阅读次数:
88
C语言实现线性表栈 //栈--线性表实现 #define ERROR -1 typedef int Position; typedef int ElemType; struct SNode{ ElemType *Data; Position Top; int MaxSize; }; typedef ...
分类:
编程语言 时间:
2020-07-05 19:24:06
阅读次数:
64
不多bb 直接代码 #include<iostream> #include<cstdio> using namespace std; const long long k=5e5+5; long long a[k]; struct Segment{ long long l,r; long long s ...
分类:
其他好文 时间:
2020-07-05 17:00:43
阅读次数:
58
单线程同步 使用socket传输数据 使用json序列化消息体 struct将消息编码为二进制字节串,进行网络传输 消息协议 1 // 输入 2 { 3 in: "ping", 4 params: "ireader 0" 5 } 6 7 // 输出 8 { 9 out: "pong", 10 res ...
分类:
编程语言 时间:
2020-07-05 10:54:57
阅读次数:
86
golang中json和struct的使用1、返回json响应结果在struct的字段后面加入json:"key"可以进行json格式输出,其中key为json的键名 type SuccessResponse struct { Code int `json:"code"` Msg string `j ...
分类:
Web程序 时间:
2020-07-05 01:04:04
阅读次数:
109
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define ls (l[cnt]) #define rs (r[cnt]) const int N = 100005; struct Ftree { int l[ ...
分类:
其他好文 时间:
2020-07-04 21:12:28
阅读次数:
69
static struct fib_table *fib_empty_table(struct net *net){ u32 id; for (id = 1; id <= RT_TABLE_MAX; id++) if (fib_get_table(net, id) == NULL) return f ...
分类:
系统相关 时间:
2020-07-04 20:30:01
阅读次数:
72
原题链接 题解 一个三维的bfs,直接向6个方向走就是了,直接套模板 #include <iostream> #include <algorithm> #include <queue> using namespace std; typedef struct node{ int x, y, z; no ...
分类:
其他好文 时间:
2020-07-04 15:21:05
阅读次数:
99
1、不可中断状态:进程处于睡眠状态,但是此刻进程是不可中断的。不可中断, 指进程不响应异步信号。 第 441 页 共 485 页2、暂停状态/跟踪状态:向进程发送一个 SIGSTOP 信号,它就会因响应该信号 而 进入 TASK_STOPPED 状态;当进程正在被跟踪时,它处于 TASK_TRACE ...
分类:
系统相关 时间:
2020-07-04 13:34:38
阅读次数:
115
PTA 01-复杂度3 二分查找 题目描述 本题要求实现二分查找算法。 函数接口定义: Position BinarySearch( List L, ElementType X ); 其中List结构定义如下: typedef int Position; typedef struct LNode * ...
分类:
其他好文 时间:
2020-07-04 11:53:06
阅读次数:
71