字符串匹配
精确:
indexOf(String str); -- strstr(), O(mn)。
lastIndexOf(String str); -- continue 的别样用法。
matches(String regex); -- Regex.compile()/match()。
模糊:
java package?
Spell Checker -- 两个字符串的相似程度...
分类:
编程语言 时间:
2014-06-20 11:00:18
阅读次数:
287
Your browser does not support the video tag.
IE9对于video标签确实是不支持的,到了IE10这个问题才有所改善。只是也有解决的办法,去下载一个video.js就能够了,这是一个针对低版本号IE的HTML5视频支持的解决方式,在书写代码时,使用标...
分类:
Web程序 时间:
2014-06-11 13:07:21
阅读次数:
314
拼音输入法输出的候选分成两个部分,系统词以及短句(智能组词),智能组词是通过model以及解码弄出来的,后续再说。
系统词就是那些常用的词(词组)收录到词典中,用户的输入和词典中的词match时,直接吐出来,而不需要解码获得。
系统词以及对应的rank(score)对输入法的体验很大,毕竟大多数用户还是继续短词输入。
系统词包含几个部分:
1.基础词
2.高频短串
3....
分类:
其他好文 时间:
2014-06-10 19:17:09
阅读次数:
231
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-06-10 10:52:03
阅读次数:
180
An IO call issynchronousif, when you call it, it
does not return until the operation is completed, or until enough time has
passed that your network s...
分类:
编程语言 时间:
2014-06-10 10:07:56
阅读次数:
273
ListView 的高度 必须要设置成一个明确的值 或者match_parent
不然就会调用多次getView方法
分类:
移动开发 时间:
2014-06-09 18:51:50
阅读次数:
253
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
android:layout_width="wrap...
分类:
其他好文 时间:
2014-06-08 17:58:54
阅读次数:
633
代码清单:
<?php
/**
* 判断字符串是否为utf8编码,英文和半角字符返回ture
* @author ruxing.li
* @param $string
* @return bool
*/
function is_utf8($string) {
return preg_match('%^(?:
[\x09\x0A\x0D\x...
分类:
其他好文 时间:
2014-06-08 10:47:58
阅读次数:
267
1.错误:在eclipse中使用run->run on
server的时候,选择tomcat6会报错误:The server does not support version 3.0 of the J2EE Web
module specification2.原因:Tomcat 6.0最多支持Ser...
分类:
Web程序 时间:
2014-06-07 22:16:41
阅读次数:
339
GPS(Graph Processing
System),java.lang.OutOfMemoryError: Java heap space,Rdflib,No handlers could be
found for logger "rdflib.term"does not look like ...
分类:
其他好文 时间:
2014-06-06 17:37:26
阅读次数:
348