pig里面有一个TOP功能。我不知道为什么用不了。有时间去看看pig源代码。SET job.name 'top_k';SET job.priority HIGH;--REGISTER piggybank.jar;REGISTER wizad-etl-udf-0.1.jar;--DEFINE Sequ...
分类:
Web程序 时间:
2015-07-08 14:30:14
阅读次数:
137
1、编写一个函数,接收一个字符串,把用户输入的字符串中的第一个字母转换成小写然后返回(命名规范骆驼命名)names.SubString(0,1)s.SubString(1);可算有个顺溜点完成的题目了= =!骆驼命名:Camel-Case除第一个单词之外,其他单词首字母大写。帕斯卡:Pascal 在...
分类:
Web程序 时间:
2015-07-08 14:14:01
阅读次数:
162
Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concate...
分类:
其他好文 时间:
2015-07-08 12:57:18
阅读次数:
104
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
[...
分类:
其他好文 时间:
2015-07-07 19:28:43
阅读次数:
116
StringUtils.substring(String.valueOf(maxSequence), 0, -3)如上,关键就是那个-3,表示倒数第三位。
分类:
其他好文 时间:
2015-07-06 19:37:42
阅读次数:
93
题意是寻找一个字符串的最大回文字串,最简单的是n3方的算法,由于字符串最大长度为1000,所以这个方法很危险而且不科学。紧接着想到的是一个n方的算法:回文子串是从中间向两边产生的,那么对于每个字符考察这个字符往外的所有可能不就可以找到以这个字符为中心的最长回文子串了吗?当然要考虑偶数的情况,即那个中...
分类:
其他好文 时间:
2015-07-06 15:51:01
阅读次数:
106
题目:
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
题意:
给定字符串S...
分类:
编程语言 时间:
2015-07-06 12:30:14
阅读次数:
115
Q:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters ...
分类:
其他好文 时间:
2015-07-05 16:41:08
阅读次数:
97
函数名函数说明使用举例fn:contains判断字符串是否包含另外一个字符串fn:containsIgnoreCase判断字符串是否包含另外一个字符串(大小写无关)fn:endsWith判断字符串是否以另外字符串结束fn:escapeXml把一些字符转成XML表示,例如fn:substring获取子...
分类:
Web程序 时间:
2015-07-04 18:22:23
阅读次数:
139