1、pig安装 1)解压,重命名、设置环境变量,同hadoop 2)编辑文件$PIG_HOME/conf/pig.properties,增加两行如下内容 fs.default.name=hdfs://hadoop:9000 mapred.job.tracker=hadoop:9001...
分类:
其他好文 时间:
2014-06-14 11:40:40
阅读次数:
205
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2014-06-14 08:52:31
阅读次数:
265
学习有两种方式。第一是强化。
任何事物,你想明白,下功夫就够。华生让小阿尔伯特学会了恐惧小白鼠。 后来者推波助澜,Peter Pig可以放置物品,斯金纳的鸽子会打球,海豚学会了表演。
奥巴马总统在为小朋友的演讲中也提到了学习中碰到挫折的时候,需要重复,这其实契合行为主义的思想。这第一种方式的内涵就是...
分类:
其他好文 时间:
2014-06-12 15:28:20
阅读次数:
205
Physical
Plan生成过程优化后的逻辑运行计划被LogToPhyTranslationVisitor处理,生成物理运行计划。这是一个经典的Vistor设计模式应用场景。当中,LogToPhyTranslationVisitor的visit()为入口方法,通过DependencyOrderWa...
分类:
其他好文 时间:
2014-06-10 21:35:33
阅读次数:
362
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is
a palindrome.
"race a car" is no...
分类:
其他好文 时间:
2014-06-10 18:36:29
阅读次数:
193
原题地址:https://oj.leetcode.com/problems/palindrome-number/题意:Determine
whether an integer is a palindrome. Do this without extra space.click to show
spo...
分类:
编程语言 时间:
2014-06-10 16:06:52
阅读次数:
286
题目:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.
解题思路:
回文划分,题目意思是给一个字符串,找出将字符串划分为一系列回文子串的各种可能组合。例如,一个子串“aab“,你需要返回["aa","b"],["a","a","b"]。这个题目的解法也是非常的典型---循环加递归,...
分类:
其他好文 时间:
2014-06-09 23:24:11
阅读次数:
256
题目:For example,"A man, a plan, a canal: Panama" is a palindrome. "race a car" is not a palindrome.
解题思路:验证一个字符串是否是回文字符串。首先看看wiki上对于回文的解释:回文,亦称回环,是正读反读都能读通的句子,亦有将文字排列成圆圈者,Famous examples include "Amore, Roma", "A man, a plan, a canal: Panama" and "No 'x' in...
分类:
其他好文 时间:
2014-06-08 16:30:29
阅读次数:
235
题目:For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut
解题思路:给一个字符串,如果字符串可以划分成若干子回文字符串,返回最小的划分数量。
这个题如果还用之前求所有划分组合的循环加递归方法的话,就会得到超时的错误。这是就要考虑别的方法,动态规划倒是一个不错的方法,但是动态规划最重要的是要找到动态方程。本题的动态方程:
dp[i] =...
分类:
其他好文 时间:
2014-06-08 14:56:58
阅读次数:
257