摘要: 原文地址: https://medium.com/dataseries/analysis-of-the-storage-mechanism-in-influxdb-b84d686f3697 TODO 阅读全文
posted @ 2019-10-17 11:17 ~嘉言懿行~~我是煲仔饭~~ 阅读(214) 评论(0) 推荐(0) 编辑
摘要: # 下載包 https://www.elastic.co/downloads/past-releases/elasticsearch-6-0-1 https://github.com/mobz/elasticsearch-head # 本地安裝 ## 安裝elasticsearch 1. 拷貝到目錄 阅读全文
posted @ 2018-02-09 11:37 ~嘉言懿行~~我是煲仔饭~~ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: todo 阅读全文
posted @ 2017-11-20 14:57 ~嘉言懿行~~我是煲仔饭~~ 阅读(290) 评论(0) 推荐(0) 编辑
摘要: HBase(dfs三副本,syncwal) Cassandra(N=3,W=2,R=2, batch commitlog) CAP CP CA 数据存储模型 LSM LSM 数据写入网络开销 Rpc 没有压缩,1份原始数据,占用大约3倍流量 Rpc 有压缩,1份原始数据,占用大概([三份数据写入流量 阅读全文
posted @ 2017-11-08 11:35 ~嘉言懿行~~我是煲仔饭~~ 阅读(352) 评论(0) 推荐(0) 编辑
摘要: TODO 阅读全文
posted @ 2017-11-03 10:57 ~嘉言懿行~~我是煲仔饭~~ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Procedure V2, 是hbase1.1版本引入的一套fault-tolerant的执行multi-steps-job的框架, 目前主要用在Master中, 比如创建表,删除表等操作 新旧比较 下面比较0.94版本和1.25版本下的建表流程 0.94 0.94版本中,创建表是通过HBaseAd 阅读全文
posted @ 2017-06-10 10:47 ~嘉言懿行~~我是煲仔饭~~ 阅读(2076) 评论(0) 推荐(0) 编辑
摘要: 笔者运行环境: 1. windows 10 2. cygwin,安装openssh 3. git版本 2.11.0 前置操作,如果已经配置可以略过 1. cygwin下执行 ssh-keygen -t rsa 后一路回车 2. cat ~/.ssh/id_rsa.pub 得到公钥key 3. git 阅读全文
posted @ 2017-05-19 22:57 ~嘉言懿行~~我是煲仔饭~~ 阅读(1496) 评论(0) 推荐(0) 编辑
摘要: gem sources#查看目前的源gem sources --remove https://rubygems.org/gem sources -a https://ruby.taobao.org/再执行 gem install rails 阅读全文
posted @ 2015-07-01 10:28 ~嘉言懿行~~我是煲仔饭~~ 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 问题描述有一些目标节点 v1, v2...vn需要一个算法,能够将任意key映射到目标节点中的一个vx评价方式1. 对于一个比较大的key集合,分布在各个目标节点的key的数量要尽可能均匀2. 如果目标节点集合有增减,key和vx的映射关系变化最小普通的一致性哈希有明显的问题,不做赘述。Ketama... 阅读全文
posted @ 2015-06-17 12:10 ~嘉言懿行~~我是煲仔饭~~ 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 《产品经理实战手册》,王欣、夏济 编著,中国经济出版社,2006《产品经理的第一本书》,(美)哥乔斯 著,戴维依 译,中 国财经出版社,2004《产品经理的第二本书》,(美)哥乔斯 著,戴维依 译,中 国财经出版社,2004《人人都是产品经理》苏杰 著《Web信息架构:设计大型网站》(美)Louri... 阅读全文
posted @ 2014-12-29 15:45 ~嘉言懿行~~我是煲仔饭~~ 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 最长公共子序列 1 #include 2 #include 3 #include 4 #include 5 6 #define N 5 7 8 int max(int a, int b, int c) { 9 10 int ab = a>b ? a : b;11 return a... 阅读全文
posted @ 2014-12-15 13:52 ~嘉言懿行~~我是煲仔饭~~ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 最长递增子序列#include#include#include#include#define N 4int solve(int *array, int n) { int *dp = (int *)malloc(n * sizeof(int)); int i; int j; i... 阅读全文
posted @ 2014-12-15 13:51 ~嘉言懿行~~我是煲仔饭~~ 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 非递归实现#include#includeint isOrdered(int *array, int begin, int end) { return *(array+end) > *(array+begin) ? 1 : 0;}int contains(int *array, int beg... 阅读全文
posted @ 2014-12-15 07:30 ~嘉言懿行~~我是煲仔饭~~ 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 有序数组二分查找的变形,代码如下:#include#includeint main() { int *array = (int *)malloc(sizeof(int)*16); int i; for(i = 0; i *(array+begin) ? 1 : 0;}int contains(i... 阅读全文
posted @ 2014-12-13 09:52 ~嘉言懿行~~我是煲仔饭~~ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 开会一边听领导畅想未来,无聊翻到博客园,很久很久没有更新博客了~ 发现之前居然有些博文的访问量也上千~ 挺激动,好的习惯要坚持~四年前,只身来到北京,拖着所有的行李,来到北五环的农民出租房,以几乎最低的价格,找了一个临时住处,一家小小的公司~~一晃,四年~经历三家公司,从后端到前端,从前端到测试,从... 阅读全文
posted @ 2014-12-05 14:59 ~嘉言懿行~~我是煲仔饭~~ 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 大二的时候数据结构课死活没看懂的一个东东,看了2小时,敲了2小时,调了2小时。。。平衡树某一节点的左右子树高度相差大于1的时候即需要调整,调整可分为四中情况 ll,rr,lr,rl其中lr,rl是由不同顺序的ll,rr来实现的,代码比想象的简短。一棵平衡的树只有在插入和删除节点的时候,才会变的不平衡,所以掌握好时机,判断平衡是否破坏及不平衡的种类,再纠正即可代码如下。。avl.hstruct AVLNode { struct AVLNode *left; struct AVLNode *right; int data; int height;};static const... 阅读全文
posted @ 2014-03-01 01:59 ~嘉言懿行~~我是煲仔饭~~ 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 工作三年有余,抛开基础的编码能力,我的概念中的coder的几个阶段,纯属意淫第一阶段 只想着开发,拿到需求,迫不及待,从满足眼前的需求都困难,到可以轻松应对开发需求【面向过程】 面对需求变更,几乎每次都需要全盘重写,大量重复代码第二阶段 开始尝试设计,花更多地时间在设计上,会产出些照猫画虎面向对象的... 阅读全文
posted @ 2014-02-26 15:27 ~嘉言懿行~~我是煲仔饭~~ 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 过完年刚上班,项目还没有开始,对于即将到来的项目,想尝试是否可以找到一个开发效率接近python,运行效率接近静态语言的编程语言,选择基本就是scala和go,公司的技术组成基本都是c派的,scala暂不考虑,闲暇时间对python2.7和go1.2做了个性能比较,作为一个参考吧,测试方法很粗糙,结果不尽准确,目的只为得到大概的运行效率的比较。网上看到过go的web模块和python2.7的tornado,twisted框架等作比较,基本都是以微弱优势胜出,但是因为涉及到io操作,无法对计算效率作比较,我简单对cpu intensive的任务做了一个单线程情况下的比较测试任务选择工作中常见的字 阅读全文
posted @ 2014-02-14 17:02 ~嘉言懿行~~我是煲仔饭~~ 阅读(1530) 评论(0) 推荐(0) 编辑
摘要: 业余时间翻译,水平很差,如有瑕疵,纯属无能。原文链接http://blog.golang.org/go-maps-in-actiongo语言中的map实战1. 简介哈希表是计算机科学中最重要的数据结构之一。许多哈希表的实现有着千差万别的特性,但是总体上他们都提供了快速查询,添加和删除功能。go语言提供了内置数据类型map。2. 声明和初始化map的声明格式如下:map[KeyType] ValueTypeKeyType类型必须是可以比较的,而ValueType可以是任意类型,甚至是另一个map。以下这个m是一个键值为string,值为int的哈希表:var m map[string]int哈希 阅读全文
posted @ 2014-02-12 18:39 ~嘉言懿行~~我是煲仔饭~~ 阅读(10622) 评论(0) 推荐(1) 编辑
摘要: 1. 一个月一本专业方面的书2. go语言摸清楚3. 活的健康,精彩些4. 认真工作,认真学习5. 学习英语,每天四篇听写,cri, voa, cnn,npr~6. 争取开始做房奴 阅读全文
posted @ 2014-02-07 21:25 ~嘉言懿行~~我是煲仔饭~~ 阅读(171) 评论(0) 推荐(0) 编辑
摘要: stack的应用#include#include#include#include#include#define MAX 128using namespace std;stack back_stack;stack forward_stack;int main() { char raw[MAX]; char * now; char * s; now = (char *)malloc(sizeof(char) * 128); strcpy(now, "http://www.acm.org/"); while(1) { cin >> raw; ... 阅读全文
posted @ 2014-01-28 19:12 ~嘉言懿行~~我是煲仔饭~~ 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 简单,两次排序#include #include #include #define MAX 50000struct Vote { int index; int a; int b;};struct Vote candidates[MAX];int N, K;int cmp_1(const void * a, const void * b) { return ((struct Vote *)b)->a - ((struct Vote *)a)->a; }int cmp_2(const void * a, const void * b) { return... 阅读全文
posted @ 2014-01-27 16:54 ~嘉言懿行~~我是煲仔饭~~ 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 排序,遍历,需要裁减#include #include #include #define MAX 20000int cows[MAX];int N;int L;int cmp(const void * a, const void * b) { return *(int *)a - *(int *)b; }int main() { int i; int j, k; int count; count = 0; scanf("%d%d", &N, &L); for(i = 0; i L) { break; ... 阅读全文
posted @ 2014-01-27 15:24 ~嘉言懿行~~我是煲仔饭~~ 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 判断一个图是否是一个树,树满足一下2个条件即可:1. 边树比node数少12. 所有node的入度非0即1节点数是0的时候,空树,合法树~代码如下#include #include #include #define MAX 100int matrix[MAX][MAX];int node[MAX] = {0};int N = 0;int M = 0;int check() { int i, j; int sum; if(N == 0) { return 1; } if(N != M + 1) { return 0;... 阅读全文
posted @ 2014-01-27 13:32 ~嘉言懿行~~我是煲仔饭~~ 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 年终总结来的有点晚,计划明天回家凌晨的火车,年前公司的项目几乎都停止了,索性总个结吧~2013年,白驹过隙,又是一眨眼~ 工作上,可以分为两段,前半年,在一个大公司做QA,很感谢这家公司,记得刚入职的时候,每天7点到公司,那时还是初冬,同事们10点才开始陆续的到公司,一个人,等也不开,看着老大给的各种资料,真的很爽,最初的一个月是我感觉进步最大的一个月,规范的流程,清晰的架构,全方面的了解了什么是测试,这也正是我进来前最想得到的,单元测试,集成测试,系统测试,冒烟测试,坦白讲,这些只是对研发工作本身也是很有好处的,一个利于测试的架构和设计才是靠谱的,这也正是TTD的根本~ 但是如果让架构,程序 阅读全文
posted @ 2014-01-27 10:37 ~嘉言懿行~~我是煲仔饭~~ 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 字符串查找是经典场景,也是面试中最常见的一道题。说来惭愧,毕业3年了,才明白了kmp算法的实现,以前一直以为这类算法是基础,工作中中不会碰到【也的确没有碰到过。。。】但是,对这些基本算法结构的理解是做一个工程师最基本的技能,好好学习,天天向上,在年前项目停止打酱油的日子里,敲了个bf和kmp的实现#include #include #include int bf(char *s, char* p) { int i, j; int lens,lenp; if(NULL == s || NULL == p) { return -1; } len... 阅读全文
posted @ 2014-01-26 17:42 ~嘉言懿行~~我是煲仔饭~~ 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 小写字母的字典树#include #include #include #define MAXN 1000#define LEN 100char END[LEN] = "0";struct node{ struct node* next[26]; int id; int end; };int count;char book[MAXN][LEN];struct node root;int isin(struct node *root, char *tmp) { char head; if(tmp[0] == '\0') { if(root-... 阅读全文
posted @ 2014-01-15 19:13 ~嘉言懿行~~我是煲仔饭~~ 阅读(221) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define INF 1000000#define MAXN 32int N;int matrix[MAXN][MAXN];int dist[MAXN];int path[MAXN];int s[MAXN];void dijkstra(int u){ /* init */ int i, j, k; int min; int v; int tmp; for(i =0; i tmp){ dist[k]= tmp; path[k]= v; } } }}void print_... 阅读全文
posted @ 2014-01-13 17:40 ~嘉言懿行~~我是煲仔饭~~ 阅读(222) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define MAXN 100#define MAXM 9900int N, M;struct Edge { int u,v; double weight; } edge[MAXM];int vertexs[MAXN];int parents[MAXN];double xs[MAXN];double ys[MAXN];int edge_cmp(const void* a, const void* b) { return (((struct Edge*)a)->weight - ((struct Edge*)b)->... 阅读全文
posted @ 2014-01-08 18:04 ~嘉言懿行~~我是煲仔饭~~ 阅读(240) 评论(0) 推荐(0) 编辑
摘要: #include #include #define MAX 100int N, M;struct Edge { int u,v; int weight; } edge[MAX];int vertexs[MAX];int parents[MAX];int edge_cmp(const void* a, const void* b) { return ((struct Edge*)a)->weight - ((struct Edge*)b)->weight; }int parents_find(int x) { int s; for(s = x; pa... 阅读全文
posted @ 2014-01-08 16:44 ~嘉言懿行~~我是煲仔饭~~ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: PacketsTime Limit:1000MSMemory Limit:10000KTotal Submissions:41014Accepted:13776DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the square parcels of the same heigh 阅读全文
posted @ 2014-01-07 23:45 ~嘉言懿行~~我是煲仔饭~~ 阅读(271) 评论(0) 推荐(0) 编辑
摘要: aov图拓扑序列算法 阅读全文
posted @ 2014-01-07 15:31 ~嘉言懿行~~我是煲仔饭~~ 阅读(389) 评论(0) 推荐(0) 编辑
摘要: supervisord的功能和简单使用,包括基本配置,基本命令,基本应用场景~ 阅读全文
posted @ 2013-08-29 15:28 ~嘉言懿行~~我是煲仔饭~~ 阅读(679) 评论(0) 推荐(0) 编辑
摘要: python;备份文件脚本 阅读全文
posted @ 2013-08-26 14:48 ~嘉言懿行~~我是煲仔饭~~ 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 最近看了下go的入门教程,被它的强大震撼了,第一印象感觉特点主要有如下几个吧:1. 集c,python,erlang之长,和c同属静态语言,保证效率;语法如python一样简洁,库很强大;从erlang借鉴了协程【是否准确?】和channel两个工具,使其从语言层面就支持并发任务。2. 没有类,代码感觉像纯c去做面向对象,估计Linus大神会喜欢3. 保留了c中强大的指针,但是和引用一样,能做操作但不能做指针运算4. 祛除许多重复的语法结构,比如where,do where这两个可以用for来做的结构,简化代码结构5. 优化了一些语法结构,比如switch,在case中不需要显示的break, 阅读全文
posted @ 2013-08-23 10:40 ~嘉言懿行~~我是煲仔饭~~ 阅读(291) 评论(1) 推荐(0) 编辑
摘要: 版本: beansdb 0.5.3下载地点:http://code.google.com/p/beansdb/beansdb是豆瓣用来存储不变小object的支持中等数据规模的nosql的持久型数据库~跟memcache相比,主要特点如下1. 数据是持久化的,value 完全在硬盘上操作,内存中只存放key的hash索引2. 在持久化的基础上,为了提高可靠性,一份数据可以设置存放在多个地方3. 把分布式坐在了客户端的api里,beansdb本身是单机的4. 存储使用bitcast的方式~~ 跟b+树索引(tokyocabinet)和lsm(leveldb)又不一样的~挺巧妙~5. beansd 阅读全文
posted @ 2013-05-07 09:46 ~嘉言懿行~~我是煲仔饭~~ 阅读(845) 评论(0) 推荐(0) 编辑
摘要: Error Handling出处:http://www.erlang.org/course/error_handling.html1. 定义 a. Link 一个exit信号的双线扩散管道 b. Exit Signal process的exit信息 c. Error Trapping 如果接到相linked的其他process的exit signal,可以像接受消息一样对其进行处理2. Exit Signals are Sent when Processes Crash 当一个process退出的时候,exit signal会被发送给与其相link的其他process 3. Exit... 阅读全文
posted @ 2013-05-05 13:49 ~嘉言懿行~~我是煲仔饭~~ 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.erlang.org/course/concurrent_programming.html1. 定义 a. process 一个concurrent activity, 【线程,进程,whatever】,erlang的虚拟机环境会负责将所有的process并发 b. Message 一种activity之间交换传达message的方法 c. Timeout 一种等待一定时间的机制,方法 d. registered process 一个注册的 concurrent process, 有名字 e. Server/client Model 服务端/客户端模型 并... 阅读全文
posted @ 2013-05-04 16:24 ~嘉言懿行~~我是煲仔饭~~ 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Sequential Programming出处:http://www.erlang.org/course/sequential_programming.html1. 数字 erlang下数字有两种,整型 和 浮点型 a 整型 10 %%正整数字 -234 %% 16#AB10F %%16进制整数 2#110111010 %%2进制整数 【最多36】 $A %% 字符A的ascii码 b 浮点型 17.368 -56.654 12.34E-102 Atoms a... 阅读全文
posted @ 2013-05-04 12:47 ~嘉言懿行~~我是煲仔饭~~ 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 1. History出处:http://www.erlang.org/course/history.html1982 - 1985Experiments with programming of telecom using > 20 different languages. Conclusion: The language must be a very high level symbolic language in order to achive productivity gains ! (Leaves us with: Lisp , Prolog , Parlog ...)1985 - 阅读全文
posted @ 2013-05-04 12:46 ~嘉言懿行~~我是煲仔饭~~ 阅读(228) 评论(0) 推荐(0) 编辑