Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-08-09 00:17:57
阅读次数:
86
1989. Subpalindromes
Time limit: 0.5 second
Memory limit: 64 MB
You have a string and queries of two types:
replace i’th character of the string by character a;check if substring sj...sk i...
分类:
其他好文 时间:
2015-08-08 18:22:03
阅读次数:
160
(图片大小:300*226px) if (imgPro.ImageUrl.Substring(imgPro.ImageUrl.LastIndexOf("/") + 1)....
分类:
Web程序 时间:
2015-08-08 18:13:56
阅读次数:
132
1. Palindrome Partitioning https://leetcode.com/problems/palindrome-partitioning/ Given a string s, partition s such that every substring of the parti...
分类:
编程语言 时间:
2015-08-07 23:31:16
阅读次数:
183
1.velocity获取字符串长度方法: 用length()就可以了,截取子字符串用substring(0,10) 。$str.substring(0,3)2.volecity遍历map: #foreach($infos in $lineBusiness.entrySet()) ${i...
分类:
其他好文 时间:
2015-08-07 22:18:04
阅读次数:
110
复习字符串操作—————————————————————————–indexOf 查找字符 返回位置
charAt 查找位置 返回字符
substring 获取字符窜
split 分割字符串
正则表达式的概念和写法—————————————————正则 :也叫做规则,让计算机能够读懂人类的规则正则都是操作字符串的。正则的写法:
var re = /a/; 和数组字符串区分开来
v...
分类:
编程语言 时间:
2015-08-06 00:29:10
阅读次数:
120
一、拼接字符串的形式DateTimedt=Convert.ToDateTime("20100101".Substring(0,4)+"-"+"20100101".Substring(4,2)+"-"+"20071107".Substring(6,2));
二、Convert.ToDateTime(string)string格式有要求,必须是yyyy-MM-dd
hh:mm:ss三、Convert.ToDateTime(string,
IFormatProvider..
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-08-05 12:27:30
阅读次数:
108
对于切词确实是一个复杂的功能,足以写上好几篇论文,但是如果仅仅想对一个句子、一个段落、一篇文章进行切词,可以利用中国自然语言开源组织中各位大牛写好的工具。已经打包成jar包,可以直接调用了,无须自己再考虑复杂的算法。
当然这种切词是对于自然语言的,对于一些有规律的字符串,请自行利用indexOf、substring、split的各类Java自带函数,没有使用额外java包的必要。
首先假如有如...
分类:
编程语言 时间:
2015-08-04 11:23:02
阅读次数:
236
首先要使用EL表达式中的fn标签,则需要添加: 首先一个案例如下:${fn:substring(policy.createTime,0,19) }policy.createTime是字符串,0是开始位置,19是结束位置。另外一些常见的方法如下所示:fn:cont...
分类:
其他好文 时间:
2015-08-04 11:20:21
阅读次数:
93