自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 Thread dump result of region server

"IPC Server handler 26 on 60020" tid=72 daemon=true priority=5 state=BLOCKED at org.apache.hadoop.hbase.regionserver.HLog.append at org.apache.hadoop.hbase.regionserver.HRegion.put...

2010-09-29 09:58:11 63

原创 State of a Thread

NEW - A thread that has not yet started is in this state.RUNNABLE - A thread executing in the Java virtual machine is in this state.BLOCKED - A thread that is blocked waiting for a monitor lock ...

2010-09-28 14:53:50 80

原创 当hbase的master无法停掉的时候……

some times you will find the master in a hbase cluster cannot be stopped, so check the following two items suggested by some guy in hbase user mail list.But I'm not sure it helps. > If zookee...

2010-09-28 11:19:48 116

原创 字符串指针、字符数组的sizeof和strlen结果

int main(){ char *p1="china"; char p2[]="china"; char p3[100]={0}; strcpy(p3, "china"); cout << sizeof(p1) << endl; cout << sizeof(p2) << endl; cout &amp

2010-09-27 08:36:13 151

原创 code snippet

char temp[3];char temp2[3];int a[100];void split(int m, int n, int a[], int index){ if(m!=0){ a[index]=m; if(index-1>=0 && a[index]<a[index-1]) return; index++;...

2010-09-27 08:31:14 79

原创 虚继承

http://www.cppblog.com/franksunny/archive/2008/10/16/64168.html

2010-09-26 09:03:57 50

原创 调整堆的算法

BeginadjustHeap(A[], i) // Heapify takes in our heap and index of current root node of subtree to be heapified{left=leftChild();right=rightChild();largest=i;if left<=A.heap-size AND A[l...

2010-09-25 10:34:35 317

原创 multiset usage as heap

Middle numberThere is a sequence of integers, we have two operations now1 add a: means add an integer a to the end of the sequence, forms a N+1 long sequence.2 mid : Output the current sequence'...

2010-09-24 21:37:05 78

原创 虚函数表又是怎样实现的?

每个含有虚函数的类有一张虚函数表(vtbl),表中每一项指向一个虚函数的地址,实现上是一个函数指针的数组。虚函数表既有继承性又有多态性。每个派生类的vtbl继承了它各个基类的vtbl,如果基类vtbl中包含某一项,则其派生类的vtbl中也将包含同样的一项,但是两项的值可能不同。如果派生类覆盖(override)了该项对应的虚函数,则派生类vtbl的该项指向重载后的虚函数,没有重载的话,则沿...

2010-09-20 22:01:13 263

原创 记一次面试

今天参加了一个phone interview,有几道题自己还记着。1. c++析构函数为啥是虚函数。2. 四个cast。3. 类初始化列表。编译器为什么要按照声明中的顺序初始化?4. 一个空类,编译器帮你实现了哪些default的函数。4. IQ题。假设三个事件A,B,C,给你两枚硬币,如果根据扔硬币的结果得到独立概率的一件事情。...

2010-09-20 15:10:18 78

原创 正整数分解算法

问题:将以正整数n表示成一系列正整数之和. n=n1+n2+n3+...+nk (n1>=n2>=n3>=nk>=1, k>=1)这就是正整数n的一个划分,正整数n不同的划分个数称为正整数n的划分数, 记作p(n)例如:6 有如下11种划分则p(6)=116;5+1;4+2, 4+1+1;3+3, 3+2+1, 3+1+1+1;2+2+2, 2+2+1+1, 2+...

2010-09-19 16:56:32 1191

原创 Reading for ParNew (promotion failed) and (concurrent mode failure)

http://java-monitor.com/forum/showthread.php?t=645Dear All,If you are struggling to understand the messages ParNew (promotion failed) and (concurrent mode failure), you might want to bone up on me...

2010-09-19 11:22:27 265

原创 Reading for ParNew (promotion failed) and (concurrent mode failure)

http://java-monitor.com/forum/showthread.php?t=645Dear All,If you are struggling to understand the messages ParNew (promotion failed) and (concurrent mode failure), you might want to bone up o...

2010-09-19 11:19:26 398

原创 java jvm GC 参数设置

1: heap size a: -Xmx 指定jvm的最大heap大小,如:-Xmx2g b: -Xms 指定jvm的最小heap大小,如:-Xms1g c: -Xmn 指定jvm中New Generation的大小,如:-Xmn256m d: -XX:PermSize 指定jvm中Perm Generation的最小值,如:-XX:PermSize=32m e: -XX:MaxP...

2010-09-19 10:54:12 178

原创 异或运算法则

  1. a ^ b = b ^ a   2. a ^ b ^ c = a ^ (b ^ c) = (a ^ b) ^ c;   3. d = a ^ b ^ c 可以推出 a = d ^ b ^ c.   4. a ^ b ^ a = b.

2010-09-14 09:47:29 2226

原创 常量字符串为什么位于静态存储区

http://hi.baidu.com/%D0%C7%BB%F0%D3%C4%C0%B6/blog/item/410174384e529ffbb211c71c.html  

2010-09-13 22:41:28 98

原创 云计算 定义

【云计算】概念是由Google提出的,这是一个美丽的网络应用模式。狭义云计算是指IT基础设施的交付和使用模式,指通过网络以按需、易扩展的方式获得所需的资源;广义云计算是指服务的交付和使用模式,指通过网络以按需、易扩展的方式获得所需的服务。这种服务可以是IT和软件、互联网相关的,也可以是任意其他的服务,它具有超大规模、虚拟化、可靠安全等独特功效;“云计算”图书版本也很多,都从理论和实践上介绍了云计算...

2010-09-10 17:26:16 132

原创 How to generate permutations

The following algorithm generates the next permutation lexicographically after a given permutation. It changes the given permutation in-place.Find the largest index k such that ...

2010-09-07 23:10:08 160

原创 generate combinations

http://compprog.wordpress.com/2007/10/17/generating-combinations-1/ #include <iostream>#include <vector>using namespace std;void print(vector<char> chars, char array...

2010-09-07 22:52:31 195

原创 polymorphism and inheritance

Inheritance Inheritance is the capability of a class to use properties and methods of another class while adding its own functionalities.Java uses extends to set the relationship between a parent cl...

2010-09-07 21:04:00 104

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除