摘要: HDFS是Hadoop最主要的分布式存储系统。一个HDFS集群主要包括一个管理文件系统元信息的NameNode和多个存储数据的DataNode。Hadoop的主要特征:1 Hadoop非常适用于使用商业硬件做分布式存储和分布式计算的。hadoop有非常好的容错性,可伸缩性和极其简单的可扩展性。2 H... 阅读全文
posted @ 2014-12-15 20:54 ruccsbingo 阅读(184) 评论(0) 推荐(0) 编辑
摘要: int binary_search(int* A, int value, int p, int r);int main(int argc, char *argv[]){ int A[] = {1, 2, 3, 4, 4, 4, 4, 4, 4, 5}; int index... 阅读全文
posted @ 2014-11-06 19:09 ruccsbingo 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 前序遍历二叉树int preorder_tree_walk(BinTreeNode * root){ if(root == NULL){ return -1; } stack s; BinTreeNode * p = root; while(!s.empt... 阅读全文
posted @ 2014-09-05 13:56 ruccsbingo 阅读(136) 评论(0) 推荐(0) 编辑
摘要: //中序遍历int inorder_tree_walk(BinTreeNode * root){ if(root == NULL){ return -1; } stack s; BinTreeNode * p = root; while(!s.empty(... 阅读全文
posted @ 2014-09-05 13:45 ruccsbingo 阅读(169) 评论(0) 推荐(0) 编辑
摘要: def partition(A, p, r): j = p+1 for i in range(p+1, r+1): if(A[i] < A[p]): tmp = A[i] A[i] = A[j] A[j] =... 阅读全文
posted @ 2014-08-31 18:01 ruccsbingo 阅读(208) 评论(0) 推荐(0) 编辑
摘要: tmp = []def bucket_sort(old): for i in range(len(old)): tmp.append([]) for i in old: tmp[int( i * len(old) )].append(i) ... 阅读全文
posted @ 2014-08-31 16:18 ruccsbingo 阅读(335) 评论(0) 推荐(0) 编辑
摘要: def insert_sort(old): for i in range(1, len(old)): for j in range(i, 0, -1): if(old[j] < old[j-1]): tmp = old[j] ... 阅读全文
posted @ 2014-08-31 15:48 ruccsbingo 阅读(107) 评论(0) 推荐(0) 编辑
摘要: old = [2, 5, 3, 0, 2, 3, 0, 3]new = [0, 0, 0, 0, 0, 0]for i in range(len(old)): new[old[i]] = new[old[i]] + 1for i in range(len(new)): for j in ... 阅读全文
posted @ 2014-08-31 10:39 ruccsbingo 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1 There are certain rules when using references: (Page 451)A reference must be initialized when it is created. (Pointers can be initialized at any ... 阅读全文
posted @ 2014-06-24 09:36 ruccsbingo 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1 序言——为什么折腾Google Test 被逼无奈的。 最近研究google开源的基于列存储的数据库查询引擎supersonic源码。初略的浏览了一遍代码,竟然没有main函数,顿时惊讶的目瞪口呆呀。对于习惯了从main函数开始,一行一行跟代码的程序猿,只觉得无从下手了。看了看源码中的REA... 阅读全文
posted @ 2014-06-21 12:03 ruccsbingo 阅读(623) 评论(0) 推荐(0) 编辑