上一页 1 2 3 4 5 6 ··· 14 下一页
摘要: LevelDB的编码coding util/coding.h #include "leveldb/slice.h" #include "port/port.h" namespace leveldb { // Standard Put... routines append to a string // 阅读全文
posted @ 2021-06-04 00:08 胖胖咩 阅读(179) 评论(0) 推荐(0)
摘要: LevelDB跳表skipList db/skiplist.h #include <atomic> #include <cassert> #include <cstdlib> #include "util/arena.h" #include "util/random.h" namespace lev 阅读全文
posted @ 2021-05-31 00:58 胖胖咩 阅读(79) 评论(0) 推荐(0)
摘要: levelDB数据结构之slice //两个数据成员 //char *data_ 真正的数据 //size_t size_ char*数据成员的长度 #include <cassert> #include <cstddef> #include <cstring> #include <string> 阅读全文
posted @ 2021-05-31 00:57 胖胖咩 阅读(185) 评论(0) 推荐(0)
摘要: LevelDB求随机数 util/random.h #include <cstdint> namespace leveldb { // A very simple random number generator. Not especially good at // generating truly 阅读全文
posted @ 2021-05-31 00:50 胖胖咩 阅读(54) 评论(0) 推荐(0)
摘要: LevelDB内存池Arena util/arena.h namespace leveldb { class Arena { public: Arena(); Arena(const Arena&) = delete; Arena& operator=(const Arena&) = delete; 阅读全文
posted @ 2021-05-31 00:47 胖胖咩 阅读(113) 评论(0) 推荐(0)
摘要: LevelDB的互斥量与条件变量 port/port_stdcxx.h namespace leveldb{ namespace port{ class CondVar; // Thinly wraps std::mutex. // 简单封装了c++的std::mutex class LOCKABL 阅读全文
posted @ 2021-05-31 00:44 胖胖咩 阅读(180) 评论(0) 推荐(0)
摘要: LevelDB的返回状态status include/leveldb/status.h #include "leveldb/export.h" #include "leveldb/slice.h" namespace leveldb { //对于OK消息,值就是nullptr //对于不OK的消息, 阅读全文
posted @ 2021-05-31 00:42 胖胖咩 阅读(252) 评论(0) 推荐(0)
摘要: 一条包含字母 A-Z 的消息通过以下映射进行了 编码 : 'A' -> 1 'B' -> 2 ... 'Z' -> 26 要 解码 已编码的消息,所有数字必须基于上述映射的方法,反向映射回字母(可能有多种方法)。例如,"11106" 可以映射为: "AAJF" ,将消息分组为 (1 1 10 6) 阅读全文
posted @ 2021-04-21 19:23 胖胖咩 阅读(191) 评论(0) 推荐(0)
摘要: 说明 本文档只说明与官方文档的不同的地方,也就是说我在跟着官方文档走的时候我出现的问题的解决方法 安装 首先是MathFunctions的CMakeLists.txt add_library(MathFunctions mysqrt.cxx) target_include_directories(M 阅读全文
posted @ 2021-04-21 03:21 胖胖咩 阅读(67) 评论(0) 推荐(0)
摘要: 文件目录结构为: main.c | |--lib | |--libcalc.a |--libcalc2.so | |--include | |--head.h 静态库的使用 gcc main.c -o a -I ./include/ -L ./lib/ -l calc 其中-I参数指定了搜索头文件的 阅读全文
posted @ 2021-03-13 21:39 胖胖咩 阅读(124) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 14 下一页