KMP算法Next[]函数深入理解,Next[]当前字符前匹配字符数,串长n-Next[i]=串内循环子串的长度p。本题求子循环串内循环节数。Problem DescriptionFor each prefix of a given string S with N characters (each ...
分类:
其他好文 时间:
2015-02-15 16:25:23
阅读次数:
137
publicstaticstringGetFirstString(stringstringToSub,intlength){Regexregex=newRegex("[\u4e00-\u9fa5]+",RegexOptions.Compiled);char[]stringChar=stringToS...
分类:
其他好文 时间:
2015-02-15 16:17:42
阅读次数:
152
本文属于自我复习,内容重复请勿见怪
如何在android应用的自定义底层C中调用java的代码?这是本次自我复习的计划。
首先,我得创建一个demo,结构如下:
1.创建一个接口类NativeDataProvider,他的作用是调用c方法,然后回调java方法
public class NativeDataProvider {
static final String TAG ...
分类:
移动开发 时间:
2015-02-15 15:14:16
阅读次数:
195
Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input string...
分类:
其他好文 时间:
2015-02-15 15:12:47
阅读次数:
195
import java.util.*;
public class 图形显示 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
while(in.hasNext()){
int n=in.nextInt();
//行数
for(int i=0;i
for(int j=1;...
分类:
其他好文 时间:
2015-02-15 15:10:50
阅读次数:
139
/**
* 平方和与立方和
* 所有偶数的平方和以及所有奇数的立方和
*/
import java.util.*;
public class acm2007 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextInt()) {...
分类:
其他好文 时间:
2015-02-15 15:08:47
阅读次数:
280
生成唯一数: 1 public static synchronized String generateUniqueID() { 2 if (seq > ROTATION) 3 seq = 0; 4 buf.delete(0, buf.length()); 5 ...
分类:
其他好文 时间:
2015-02-15 15:03:07
阅读次数:
183
/// /// 得到文件的MD5值 /// /// 文件路径 /// public static string GetFileMD5Code(string Path) { try ...
分类:
其他好文 时间:
2015-02-15 15:02:55
阅读次数:
171
知识点1:1 String str1 = "abc";// 没有创建任何对象2 String str2 = new String("abc");// 创建了2个对象3 String str3 = new String("abc");// 创建了1个对象4 System.out.println(str...
分类:
编程语言 时间:
2015-02-15 15:01:25
阅读次数:
198
验证码 手机号: 用户名: 控制器下的代码 [HttpPost] public ActionResult Index6() { string zh ="XXXXX...
分类:
移动开发 时间:
2015-02-15 14:56:34
阅读次数:
129