flume-ng
是一个分布式,高可用的日志收集系统。主要用来将分布在不同服务器上的业务日志汇总在一个集中的数据存储中心一
安装与环境配置下载地址http://flume.apache.org/download.html,下载Apache Flume
binary至目标服务器解压运行环境java版本...
分类:
其他好文 时间:
2014-06-10 21:03:30
阅读次数:
451
ldd命令用于判断某个可执行的 binary 档案含有什么动态函式库。 参数说明: --version
打印ldd的版本号 -v --verbose 打印所有信息,例如包括符号的版本信息 -d --data-relocs
执行符号重部署,并报告缺少的目标对象(只对ELF格式适用) -r -...
分类:
其他好文 时间:
2014-06-10 19:54:17
阅读次数:
258
以i为根节点时,其左子树构成为[0,...,i-1],其右子树构成为[i+1,...,n]构成。根结点确定时,左子树与右子树的结点个数都是确定的。这样就可以把这个问题化成子问题。因此可以用动态规划解。Sigma(左边的子树可能状态
* 右边子树可能状态) = 当前个数的结点可能的状态数。public...
分类:
其他好文 时间:
2014-06-10 12:46:05
阅读次数:
175
第一次看到accept,心里有点小开心/** * Definition for binary tree
* public class TreeNode { * int val; * TreeNode left; * TreeNode right; *
TreeNode...
分类:
其他好文 时间:
2014-06-10 11:53:41
阅读次数:
241
Given a binary tree, check whether it is a
mirror of itself (ie, symmetric around its center).For example, this binary tree
is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-10 11:51:42
阅读次数:
213
奇偶校验位是一个表示给定位数的二进制数中1的个数是奇数还是偶数的二进制数。奇偶校验位是最简单的错误检测码。A
parity bit, or check bit is a bit added to the end of a string of binary code
that indicates wh...
分类:
Web程序 时间:
2014-06-10 11:51:03
阅读次数:
288
问题:
给定的二叉查找树中,有两个节点不小心被调换了位置,现在需要将其修正,不改变树的结构。
分析:
二叉排序树的中序遍历是有序的,所以这个问题又是建立在中序遍历模板上的问题,所以我们可以对其进行中序遍历,并用一个pre指针指向当前遍历结果中的最后一个结点,即下次遍历前的前一个结点。然后就可以通过将当前结点与pre结点进行比较,来判断是否有序了。若乱序,就将这两个结点都放入到预先定义的容器中...
分类:
其他好文 时间:
2014-06-10 10:54:41
阅读次数:
153
Binary Tree Maximum Path SumGiven a binary
tree, find the maximum path sum.The path may start and end at any node in the
tree.For example:Given the be...
分类:
其他好文 时间:
2014-06-10 10:42:58
阅读次数:
203
binary search\sort\find operations
status InsertNode(Node* root, data x, Node* father)
{
if(root==NULL)
{
if(father==NULL)
Tree empty;
else
{
if(xdata)
{
father->left=new Node//inital l...
分类:
其他好文 时间:
2014-06-10 08:09:49
阅读次数:
234
问题:
给定一个有序链表,生成对应的平衡二叉搜索树。
分析
见Convert
Sorted Array to Binary Search Tree
实现:
TreeNode *buildTree(ListNode* head, ListNode *end){
if(head == NULL || head == end)
return NULL;
...
分类:
其他好文 时间:
2014-06-10 07:17:29
阅读次数:
264