echo " ls *.$2 | while read file;do grep -n $1 $file | while read out; do echo $file,$out;done; done">search.sh搜索:sh search.sh get_longest_overlap c即可...
分类:
系统相关 时间:
2015-08-06 12:41:38
阅读次数:
166
复习字符串操作—————————————————————————–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
题目:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest...
分类:
其他好文 时间:
2015-08-05 07:44:48
阅读次数:
139
问题:Given an array of N integer, find the length of the longest increasing subsequence.For example, given [1,-5,4,5,10,-1,-5,7], the longest increasing...
分类:
编程语言 时间:
2015-08-05 00:40:24
阅读次数:
154
问题描述Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The lo...
分类:
其他好文 时间:
2015-08-04 12:46:55
阅读次数:
115
对于切词确实是一个复杂的功能,足以写上好几篇论文,但是如果仅仅想对一个句子、一个段落、一篇文章进行切词,可以利用中国自然语言开源组织中各位大牛写好的工具。已经打包成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
原文:http://www.cnblogs.com/chinafine/archive/2009/02/26/1398771.html1.substring 方法定义和用法substring 方法用于提取字符串中介于两个指定下标之间的字符。语法stringObject.substring(start...
分类:
Web程序 时间:
2015-08-04 09:20:14
阅读次数:
99