自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(90)
  • 资源 (10)
  • 收藏
  • 关注

转载 HBase LSM结构

转载自:http://blog.csdn.net/lifuxiangcaohui/article/details/39962921讲LSM树之前,需要提下三种基本的存储引擎,这样才能清楚LSM树的由来:哈希存储引擎  是哈希表的持久化实现,支持增、删、改以及随机读取操作,但不支持顺序扫描,对应的存储系统为key-value存储系统。对于key-value的插入以及查询,

2015-07-02 17:42:25 2502

翻译 Cloudera Impala官方文档中文翻译-2(Using Impala to Query HBase Tables)

Impala官方文档中文翻译

2014-10-30 16:53:53 6678 1

原创 C++全局变量在多个源代码文件中的使用

在比较大的项目中,如果需要使用全局变量,那么就需要注意一些全局变量声明、使用不当引起的问题了。本篇文章主要内容有两个:普通全局变量、静态全局变量、全局常量。1、普通全局变量:假设我们需要在多个不同的编译单元(比如两个.cc文件)中使用全局变量进行传值,如我们有如下三个源码文件:main.cc:运行入口,有一个main函数,其中会打印出全局变量var的值;#include "def.

2014-10-27 17:06:47 25439 4

原创 LeetCode || Minimum Path Sum

Minimum Path Sum Total Accepted: 19916 Total Submissions: 63796My SubmissionsQuestion Solution Given a m x n grid filled with non-negative numbers, find a path from top left to b

2014-10-19 11:40:15 5052

原创 算法学习之---蓄水池抽样问题

问题:如何在无限大的数据流中随机选取K个数据,保证当前遍历过的i个元素中每一个元素被选中的概率均为 k/i?从而对于n个元素,每个元素被选中的概率均为 k/n。解:对于前k个元素,我们直接选中放入一个虚拟的蓄水池中,对于第 k+1 个元素,我们用 k/(k+1) 的概率选中它,一旦选中了,就随机替换掉蓄水池中的某一个元素,这样前 k 个被选中的元素在第 k+1 个元素到来时依然被选中的概率即为

2014-09-17 22:03:16 1340

原创 Impala源码分析---1

2、Impala源码分析参考链接:http://www.sizeofvoid.net/wp-content/uploads/ImpalaIntroduction2.pdf本章开始进入源码分析阶段,参考链接是一篇非常好的impala实现、运行流程介绍的文档,感谢作者。2.1 Impala内部架构         Impala内部架构图如下:图2-1 Impala内部架构

2014-08-28 12:54:36 9435

翻译 Cloudera Impala官方文档中文翻译-1

Impala官方文档翻译参考链接:Cloudera Impala User Guide:http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/Impala/impala.html 1、Impala简介1.1概述         Impala提供针对Hado

2014-08-25 16:23:25 23537 2

原创 LeetCode || Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.判断一个int值是否为回文数。本题有几点需要注意:(1)不能用额外存储空间,也就是说只能用常数空间解决;诸如将int转换为string再去比较字符是不可行的;(2)判断回文数的方法有两个:从中间开始向两头判断、从两头向中间判断;后者更简

2014-07-19 15:40:38 1006

原创 LeetCode || Clone Graph

Clone Graph Total Accepted: 11444 Total Submissions: 52034My SubmissionsClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirect

2014-06-29 20:45:53 897

原创 LeetCode || Gas Station

class Solution {public: int canCompleteCircuit(vector &gas, vector &cost) { int restGas, num; for(int i=0; i<gas.size(); ++i){ if(gas[i]>=cost[i]){ res

2014-06-28 21:31:06 1265

原创 LeetCode || Candy

Candy Total Accepted: 12392 Total Submissions: 68386My SubmissionsThere are N children standing in a line. Each child is assigned a rating value.You are giving candies to these childre

2014-06-28 19:59:36 1840

原创 LeetCode || Word Break II

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "

2014-06-26 12:33:38 6379 1

原创 LeetCode || Word Break

Word Break Total Accepted: 15419 Total Submissions: 75670My SubmissionsGiven a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of

2014-06-25 19:37:05 823

原创 LeetCode || LRU Cache

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if

2014-06-24 14:05:20 3191

原创 LeetCode || Copy List with Random Pointer

Copy List with Random Pointer Total Accepted: 12730 Total Submissions: 56262My SubmissionsA linked list is given such that each node contains an additional random pointer which could poi

2014-06-24 00:17:30 1684

原创 Android开发遇到的问题

1、导入某个现有工程文件夹后,出现R资源不能resolve的错误,导致程序无法编译运行,此时右键->properties->android,看最上面的taget又没有选择对,勾选当前可选的最高那个版本(即你本机已经安装的最高版本的SDK),点击apply,错误解决。2、style.xml里出现样式无法识别:error: Error retrieving parent for ite

2014-05-07 00:01:51 24770 2

原创 编程之美初赛第一场

题目3 : 活动中心时间限制:12000ms单点时限:6000ms内存限制:256MB描述A市是一个高度规划的城市,但是科技高端发达的地方,居民们也不能忘记运动和锻炼,因此城市规划局在设计A市的时候也要考虑为居民们建造一个活动中心,方便居住在A市的居民们能随时开展运动,锻炼强健的身心。城市规划局希望活动中心的位置满足以下条件:1.

2014-04-20 00:07:54 1945

原创 LeetCode || Generate Parentheses

Generate Parentheses Total Accepted: 9845 Total Submissions: 32228My SubmissionsGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.F

2014-04-10 22:26:41 696

原创 LeetCode || 总结(持续更新)

1、Evaluate Reverse Polish Notation,后缀运算符表达式计算,用栈存储操作数和中间计算结果,每次取操作数时弹栈,计算完成将结果压栈即可。

2014-04-09 23:39:17 1072

原创 LeetCode || Single Number II

Single Number II Total Accepted: 12144 Total Submissions: 37399My SubmissionsGiven an array of integers, every element appears three times except for one. Find that single one.Note:Y

2014-04-09 23:35:07 19925 9

原创 LeetCode || Integer to Roman

Integer to Roman Total Accepted: 6855 Total Submissions: 21222My SubmissionsGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.

2014-04-09 23:29:21 876

原创 LeetCode || Remove Element

Remove Element Total Accepted: 11841 Total Submissions: 36675My SubmissionsGiven an array and a value, remove all instances of that value in place and return the new length.The order o

2014-04-09 23:26:12 3541 1

原创 LeetCode || Maximum Subarray

Maximum Subarray Total Accepted: 12325 Total Submissions: 37953My SubmissionsFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For

2014-04-09 23:24:55 868

转载 LeetCode || Binary Tree Preorder Traversal

Binary Tree Preorder Traversal Total Accepted: 14844 Total Submissions: 43090My SubmissionsGiven a binary tree, return the preorder traversal of its nodes' values.For example:Given b

2014-04-09 23:22:45 829

原创 LeetCode || Unique Binary Search Trees

Unique Binary Search Trees Total Accepted: 11525 Total Submissions: 32497My SubmissionsGiven n, how many structurally unique BST's (binary search trees) that store values 1...n?For exa

2014-04-09 23:16:41 11765

原创 LeetCode || Median of Two Sorted Arrays

Median of Two Sorted Arrays Total Accepted: 9557 Total Submissions: 57293My SubmissionsThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted

2014-04-09 23:14:56 977 2

原创 LeetCode || Two Sum

Two Sum Total Accepted: 16363 Total Submissions: 87273My SubmissionsGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum s

2014-04-09 23:11:47 35320 9

原创 LeetCode || Best Time to Buy and Sell Stock

Best Time to Buy and Sell Stock Total Accepted: 11385 Total Submissions: 37201My SubmissionsSay you have an array for which the ith element is the price of a given stock on day i.If yo

2014-04-09 23:08:35 870

原创 LeetCode || Linked List Cycle 1&2

Linked List Cycle Total Accepted: 14505 Total Submissions: 41837My SubmissionsGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra sp

2014-04-09 23:03:14 656

原创 LeetCode || Permutations

Permutations Total Accepted: 11461 Total Submissions: 37405My SubmissionsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permut

2014-04-09 22:57:36 621

原创 LeetCode || Sort Colors

Sort Colors Total Accepted: 10901 Total Submissions: 35483My SubmissionsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent

2014-04-09 22:55:45 609

原创 LeetCode || Max Points on a Line

Max Points on a Line Total Accepted: 7478 Total Submissions: 73426My SubmissionsGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.

2014-04-09 22:30:44 946

原创 LeetCode || Sort List

Sort List Total Accepted: 8485 Total Submissions: 43568My SubmissionsSort a linked list in O(n log n) time using constant space complexity.

2014-04-09 22:21:07 607

原创 LeetCode || Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the

2014-04-09 22:17:47 7346 2

原创 LeetCode || Container With Most Water

Container With Most Water Total Accepted: 8060 Total Submissions: 26543My SubmissionsGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).

2014-04-09 21:56:28 1129

原创 umask函数的用处

#include "sys/types.h"#include "sys/stat.h"mode_t umask(mode_t cmask);umask函数为进程设置文件方式创建屏蔽字。unix中文件最大访问权限是0777, 即_rwxrwxrwx.如果讲umask函数设置为0111, 那么默认创建文件的权限就是0777与0111的异或0666,即_rw_rw_rw.这是umask给进程限定的最高权

2014-03-17 13:50:53 820

原创 堆和栈的区别

原文地址:http://blog.tianya.cn/blogger/post_show.asp?BlogID=462085&PostID=8462168&idWriter=0&Key=0一、预备知识—程序的内存分配  一个由c/C++编译的程序占用的内存分为以下几个部分  1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。  

2014-03-17 13:50:51 481

原创 如何在eclipse的android工程中添加外部javadoc.jar包,方便开发

以前写android工程时,从来没有添加过外部的javadoc.jar,也不太清楚这个javadoc具体怎么用,今天在写一个AR的应用,使用了wikitude的开发包,当然他也自带javadoc.jar,特意研究了一下,当我们使用外部的源码包时(开源的或者不开源的),通常都会自带一个开发文档即javadoc,这个文档我们可以直接打开查看各个类与方法的使用介绍,但是既然eclipse的功能已经很强大

2014-03-17 13:50:49 2475

原创 Android下的多线程

消息循环是一个很有用的线程方式,曾经自己用C在Linux下面实现一个消息循环的机制,往消息队列里添加数据,然后异步的等待消息的返回。当消息队列为空的时候就会挂起线程,等待新的消息的加入。这是一个很通用的机制。在Android,这里的线程分为有消息循环的线程和没有消息循环的线程,有消息循环的线程一般都会有一个Looper,这个事android的新概念。我们的主线程(UI线程)就是一个消息循环的线

2014-03-17 13:50:47 545

原创 android looper

(1) Looper类别用来为一个线程开启一个消息循环。默认情况下Android中新诞生的线程是没有开启消息循环的。(主线程除外,主线程系统会自动为其创建Looper对象,开启消息循环)Looper对象通过MessageQueue来存放消息和事件。一个线程只能有一个Looper,对应一个MessageQueue。(2) 通常是通过Handler对象来与Looper交互的。Han

2014-03-17 13:50:45 468

hadoop 2.2.0 native文件夹库文件-64bit版

hadoop 2.2.0自带的native文件夹里的库文件是32位版本的,如果你的系统是64位的,那么配置过程中会报错,所以需要自己重新编译为64位的,但是重新编译很麻烦,这里直接提供给大家-64bit版

2014-03-29

java开发用的POI

java开发用的POI,用来生成excel

2013-03-05

flash player 最新debug版本

官网最新版flashplayer_11_plugin_debug,Flex开发必备

2013-01-07

ADT-14.0.0.zip

ADT-14.0.0.zip,用于搭建android开发环境,官网经常连不上,所以方便大家使用

2012-06-15

用于java RPC编程的相关包xmlrpc-server-3.1.3.jar

用于java RPC编程的相关包xmlrpc-server-3.1.3.jar

2012-06-15

arm-linux-gcc-3.4.1.tar.bz2

arm-linux-gcc-3.4.1.tar.bz2用于linux下交叉编译环境的搭建。

2012-05-26

android指南针程序

这是一个简单的android指南针程序,有源码,还有png图像在里面

2011-05-21

masql连接驱动jar资源包

好用的masql连接驱动,试过了,很好用的,我们学院都用这个,特别号,老师给的。。。。为了挣点积分啊

2011-03-19

快速排序算法实现 我自己做的

快速排序算法实现,我自己做的,希望对大家有所帮助!!!

2010-11-27

KMP算法中求NEXT的方法

KMP算法中求NEXT的方法,希望对大家有所帮助啊,呵呵!!!

2010-11-27

空空如也

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

TA关注的人

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