JSTL中没有把int类型转成string的函数,要想解决获得int类型数据的长度,缺失麻烦。
获得String数据的长度要jstl的fn即可${fn:length(string)},但是int数据呢?
经过测试,下面的方法可行:
${fn:length(fn:substring(test,0,...
分类:
Web程序 时间:
2014-08-07 18:55:40
阅读次数:
250
LCS!~如果你在百度上搜这个的话会出来”英雄联盟冠军联赛”,orz。。但是今天要讲的LCS是最长公共子序列 ,"Longest Common Subsequence "not"League of Legends Championship Series"小盆友们又要涨姿势了~ 最长公共子序列也称作最...
分类:
其他好文 时间:
2014-08-07 18:46:50
阅读次数:
271
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4...
分类:
其他好文 时间:
2014-08-07 18:13:20
阅读次数:
171
题目:uva10405 - Longest Common Subsequence(LIS,最长共同自序列)
题目大意:找出两个字符串中的最长公共的子序列。
解题思路:这类问题是第一次接触,不知道怎么做。百度了一下,发现了递推公式:dp【i】【j】:代表第一个字符串的前i个字符和第二个字符串的前j个字符比较能得到的最长的公共子序列。s【i】 == s【j】 ,dp【i】【j】...
分类:
其他好文 时间:
2014-08-06 23:04:32
阅读次数:
243
字符串大小写转换toUpperCase()将所有的字符串转换成大写toLowerCase()将所有的字符串转换成小写substring(x,y)返回字符串的一部分,从x开始到y结束charAt(x)获取第x个字符indexOf("",x)查找字符串,第一个内容是字符串,第二个是从第x开始得到的值为这...
分类:
编程语言 时间:
2014-08-06 22:28:37
阅读次数:
281
Your intuition would tell you that there's a O(n) solution. Actually it is another stack-based problem to solve.class Solution {public: struct Rec ...
分类:
其他好文 时间:
2014-08-06 14:37:41
阅读次数:
186
function checkImgType(this_){ var filepath=$(this_).val(); var extStart=filepath.lastIndexOf("."); var ext=filepath.substring(extStart,filepat...
分类:
Web程序 时间:
2014-08-06 14:31:11
阅读次数:
200
public void GetDown(String Url) { string StringFileName = Url.Substring(Url.LastIndexOf("/") + 1); string StringFilePath ...
分类:
其他好文 时间:
2014-08-06 14:21:31
阅读次数:
173
2D DP is an intuitive solution of course, but I got an MLE error, so I simplified it into a 1D DP:class Solution {public: void goDp(vector &dp, int...
分类:
其他好文 时间:
2014-08-06 06:14:40
阅读次数:
196
String
Problem Description
You hava a non-empty string which consists of lowercase English letters and may contain at most one '?'. Let's choose non-empty substring G from S (it can be G = S...
分类:
其他好文 时间:
2014-08-05 19:29:50
阅读次数:
240