`
standalone
  • 浏览: 596818 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
As someone has said here 引用You need to look more at the types of queries that you will be needing to access your data rather that just nomarlise every thing to 3rd normal form as in traditional relational databases. I collected several useful documents on how to design hbase schema. See the attach ...
Today I used rsync to copy some files but I found for symbolic links it will ignore them if you just use simple command line: rsync SRC DEST With google, I finally figure out I need to add the "--links" option. 引用       --copy-links               Turn all symlinks into normal files (leav ...
I'm reading source code of hbase. When come to class org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher I find this class has private member *unassignedNodes* but I cannot find where nodes are added into the set. To be figured out. 71 // set of unassigned nodes watched 72 private Set<Strin ...
As I have said in my last post, I was developing a hbase based mapreduce application. But one damn thing is the hadoop cluster managed by our system admin has no hbase jars in its classpath... So I have to figure out how to provide jars needed by hbase to hadoop. I know "hadoop jar" comman ...
Currrently I'm working on sth like calculating how many hits on a page. The problem is the raw data can be huge, so it may not scale if you use RDBMS. The raw input is as follows. Date Page  User ----------- date1 page1 user1 date1 page1 user2 date1 page2 user1 date1 page2 user3 ...   ... So I ne ...
If you meet this exception, make sure you include the guava-r09-jarjar.jar JAR in your build path. This is usually located in /usr/lib/hadoop-0.20/lib.
http://leetcode.com/onlinejudge#question_91 Decode WaysJun 25 '121292 / 5011 A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of ways to decod ...
Check if a binary tree is balanced or not. This solution is from the discuss board. Much better than mine. /** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class So ...
http://leetcode.com/onlinejudge#question_4 Solution: a little ugly. public class Solution { public double findMedianSortedArrays(int A[], int B[]) { // Start typing your Java solution below // DO NOT write main() function int len1 = A.length; int len2 = ...
Q:  Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:     Only one letter can be changed at a time     Each intermediate word must exist in the dictionary For example, Given: start = "hit" end = "cog& ...

[leetcode] sqrt(x)

I have talked about this question in my previous posts. http://leetcode.com/onlinejudge#question_69 Q: Implement int sqrt(int x). Compute and return the square root of x. Solution: public class Solution { public int sqrt(int x) { // Start typing your Java solution below / ...
http://leetcode.com/onlinejudge#question_126 Q: Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:     Only one letter can be changed at a time     Each intermediate word must exist in the dictionary For example, Given: ...
http://leetcode.com/onlinejudge#question_38 Question: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1 ...
几种我所用到的用来处理日期,时间的函数总结。 Perl 1. localtime # 0 1 2 3 4 5 6 7 8 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); If parameter is not provides, it will use current time. Note the $year returned contains the number of years since 1900, to get a 4-digit year y ...
http://leetcode.com/onlinejudge#question_131 Question: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return   [     ["aa","b"],     ["a&q ...
Global site tag (gtag.js) - Google Analytics