HBase的分页实现相对复杂一些。核心思想是结合分页过滤器PageFilter(pageSize)和查询设置开始行scan.setStartRow(lastRow),lastRow为上一次查询rowkey,需要注意的是该rowkey是一个数组,对应多字段的存储位置;不同用户登录会产生不同lastRo...
分类:
其他好文 时间:
2015-06-03 17:27:49
阅读次数:
99
import reimport ioimport sysinput_stream = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8')s = input_stream.readlines()s = "\n".join(s)pc = '(//.*...
分类:
其他好文 时间:
2015-06-03 08:25:20
阅读次数:
1717
So fun! It connects algorithm(regex) with real world usages!So basically speaking, C:pointer syntax, #include\scanf\typedef; Java: import\public class...
分类:
其他好文 时间:
2015-06-03 07:20:29
阅读次数:
156
如题,代码如下:
void reverse_words(std::string& original)
{
enum {
scan_normal,
scan_frag,
} state;
char buf[4];
memset(buf, 0, sizeof(buf));
int last = original.size() - 1;
int cur = original....
分类:
其他好文 时间:
2015-06-02 21:56:13
阅读次数:
168
在xml配置了这个标签后,spring可以自动去扫描base-pack下面或者子包下面的java文件,如果扫描到有@Component @Controller@Service等这些注解的类,则把这些类注册为bean注意:如果配置了那么标签就可以不用再xml中配置了,因为前者包含了后者。另外还提供了两...
分类:
其他好文 时间:
2015-06-02 16:45:18
阅读次数:
69
[转]浅谈C/C++内存泄露及其检测工具对于一个c/c++程序员来说,内存泄漏是一个常见的也是令人头疼的问题。已经有许多技 术被研究出来以应对这个问题,比如 Smart Pointer,Garbage Collection等。Smart Pointer技术比较成熟,STL中已经包含支持Smart P...
分类:
其他好文 时间:
2015-06-02 13:06:46
阅读次数:
94
$volist}--> ?c=passport&a=login'"> ">约见TA ?c=passport&a=login'"> ">约见TA images/xj/01.png">/*css*/.banner img {max-width:100%; height:auto;width...
分类:
其他好文 时间:
2015-06-01 18:30:01
阅读次数:
125
My intuition told me that it is a line-scan process.. and yes it is. First, we sort all (a,b,k) by index\start-end, then we do a line scan. And in C++...
分类:
其他好文 时间:
2015-06-01 11:07:34
阅读次数:
95
Note this smart observation from Editorial: "M will be either P or Q or (A_i+A_j)/2"..Yea I know, my code is not condense enough..#include #include #i...
分类:
其他好文 时间:
2015-06-01 09:34:11
阅读次数:
95
1 ./hbase shell 2 list 查看所有的表 3 list ‘table_name’ 查询表名,模糊匹配 4 5 scan 'table_name', {LIMIT => 10} 查出表中的10条记录 6 get 'table_name', 'row_key' 通过rowkey查出.....
分类:
其他好文 时间:
2015-05-30 18:11:43
阅读次数:
150