2013年12月29日

摘要: MMSEG: A Word Identification System for Mandarin Chinese Text Based on Two Variants of the Maximum Matching AlgorithmPublished: 1996-04-29Updated: 1998-03-06Document updated: 2000-03-12License: Free for noncommercial useCopyright © 1996-2006Chih-Hao Tsai(Email:hao520@yahoo.com)Related Technical 阅读全文
posted @ 2013-12-29 13:33 Monster_Ch 阅读(335) 评论(0) 推荐(0) 编辑

2013年12月27日

摘要: 标记一下比较重要的类:ExecutorService:真正的线程池接口。ScheduledExecutorService能和Timer/TimerTask类似,解决那些需要任务重复执行的问题。ThreadPoolExecutorExecutorService的默认实现。ScheduledThreadPoolExecutor继承ThreadPoolExecutor的ScheduledExecutorService接口实现,周期性任务调度的类实现。要配置一个线程池是比较复杂的,尤其是对于线程池的原理不是很清楚的情况下,很有可能配置的线程池不是较优的,因此在Executors类里面提供了一些静态工厂 阅读全文
posted @ 2013-12-27 20:24 Monster_Ch 阅读(180) 评论(0) 推荐(0) 编辑

2013年10月28日

摘要: url中汉字编码互相转换Java代码如下:package com.gjob.common;public class URLtoUTF8 { //转换为%E4%BD%A0形式 public static String toUtf8String(String s) { StringBuffer sb = new StringBuffer(); for (int i = 0; i = 0 && c <= 255) { sb.append(c); } else { byte[] b; try { b = String.valueOf(c).getBytes("utf-. 阅读全文
posted @ 2013-10-28 15:56 Monster_Ch 阅读(971) 评论(0) 推荐(0) 编辑

2013年10月9日

摘要: Problem 11In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 0849 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 0081 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 6552 70 95 23 04 60 11 42 69 24 阅读全文
posted @ 2013-10-09 21:41 Monster_Ch 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Problem 9A Pythagorean triplet is a set of three natural numbers,abc, for which,a2+b2=c2For example, 32+ 42= 9 + 16 = 25 = 52.There exists exactly one Pythagorean triplet for whicha+b+c= 1000.Find the productabc.JAVA:public class P009 { public static void main(String[] args){ int a=0,b=0,c=0; int .. 阅读全文
posted @ 2013-10-09 21:39 Monster_Ch 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Problem 10The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.Find the sum of all the primes below two million.JAVA:public class P010 { public static void main(String[] args){ long sum = 0; for(int i=2;i<2000000;i++){ if(isprime(i)){ sum+=i; } } System.out.print(sum); } public static boo... 阅读全文
posted @ 2013-10-09 21:38 Monster_Ch 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Problem 8Find the greatest product of five consecutive digits in the 1000-digit number.731671765313306249192251196744265747423553491949349698352031277450632623957831801698480186947885184385861560789112949495459501737958331952853208805511125406987471585238630507156932909632952274430435576689664895044 阅读全文
posted @ 2013-10-09 21:38 Monster_Ch 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Problem 7By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.What is the 10 001st prime number?\JAVA:public class P007 { public static void main(String[] args){ int num = 1; for(int i =3 ;;i++){ if(isprime(i)) num++; if(num==10001){ System.... 阅读全文
posted @ 2013-10-09 21:37 Monster_Ch 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Problem 6Published on Friday, 14th December 2001, 06:00 pm; Solved by 196379The sum of the squares of the first ten natural numbers is,12+ 22+ ... + 102= 385The square of the sum of the first ten natural numbers is,(1 + 2 + ... + 10)2= 552= 3025Hence the difference between the sum of the squares of 阅读全文
posted @ 2013-10-09 21:34 Monster_Ch 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Smallest multipleProblem 52520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that isevenly divisibleby all of the numbers from 1 to 20?JAVA:public class P005 { public static void main(String[] args){ int sum. 阅读全文
posted @ 2013-10-09 21:33 Monster_Ch 阅读(173) 评论(0) 推荐(0) 编辑

导航