10 2012 档案

vs 在线引用
摘要:http://www.oschina.net/question/54100_35518 阅读全文

posted @ 2012-10-27 12:23 雨渐渐 阅读(114) 评论(0) 推荐(0) 编辑

新的解析html工具类
摘要:http://www.cnblogs.com/hibernate3-example/archive/2012/05/27/2520615.html 阅读全文

posted @ 2012-10-22 15:21 雨渐渐 阅读(108) 评论(0) 推荐(0) 编辑

语法树
摘要:个人感觉有点类似于有限状态机package com.smart.enumcompareto.test;import com.smart.enumcompareto.test.TernarySearchTrie.TSTNode;/** * 语法树匹配到的结果,记录最终节点和最终节点的index * * @author dell * */public class MatchRet { private int index; private TSTNode node; public MatchRet(TSTNode node,int index){ this.i... 阅读全文

posted @ 2012-10-19 09:07 雨渐渐 阅读(232) 评论(0) 推荐(0) 编辑

java枚举类型_Ordinal compareTo
摘要:public enum Color { RED, BLUE, BLACK, YELLOW, GREEN}public class Program { //RED, BLUE, BLACK, YELLOW, GREEN public static void main(String[] args) {// testOrdinal(); testCompareTo(); } public static void testCompareTo(){ int dis=Color.GREEN.compareTo(Color.RE... 阅读全文

posted @ 2012-10-17 17:29 雨渐渐 阅读(459) 评论(0) 推荐(0) 编辑

正向最大长度匹配与逆向最大长度匹配
摘要:package com.smart.basic;public class TernarySearchTrie { public final class TSTNode { /** * 节点的值,词原文,词性,词频等 */ public String data = null; /** * 低节点 */ protected TSTNode loNode; /** * 相等节点 */ protected TSTNod... 阅读全文

posted @ 2012-10-16 23:18 雨渐渐 阅读(969) 评论(0) 推荐(0) 编辑

守则
摘要:1,先画图,后写代码,数据结构画图,流程也画图 阅读全文

posted @ 2012-10-16 17:36 雨渐渐 阅读(145) 评论(0) 推荐(0) 编辑

eclipse去掉拼写检查
摘要:Myeclipse菜单 window——General——Editors——Text Editors——Spelling——把右边的Enable spell checking的勾去掉就行了,也就是取消单词的拼写检查。 阅读全文

posted @ 2012-10-16 13:58 雨渐渐 阅读(472) 评论(0) 推荐(0) 编辑

getResource()和getResourceAsStream的路径问题
摘要:http://blog.sina.com.cn/s/blog_4b5bc0110100g22w.html 参考源package javaapplication;import java.io.File;public class Test { public static void main(String[] args) { File file3=new File(Test.class.getResource("file3.txt").getFile()); if(file3!=null){ System.out.println("file3.... 阅读全文

posted @ 2012-10-15 22:13 雨渐渐 阅读(307) 评论(0) 推荐(0) 编辑

nutch从网页中提取字段并索引_HtmlParseFilter
摘要:package org.apache.nutch.htmlfilter.my;import java.util.regex.*;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.apache.hadoop.conf.Configuration;import org.apache.nutch.crawl.Crawl;import org.apache.nutch.metadata.Metadata;import org.apache.nutch.parse.H 阅读全文

posted @ 2012-10-15 11:13 雨渐渐 阅读(718) 评论(0) 推荐(0) 编辑

简单的有限状态机
摘要:package com.smart.fsm.phonebank;public class FSM { static State[][] transTable=new State[State.values().length][10]; static{ transTable[State.start.ordinal()][1]=State.chinese; transTable[State.start.ordinal()][2]=State.english; transTable[State.chinese.ordinal()][0]=S... 阅读全文

posted @ 2012-10-14 19:56 雨渐渐 阅读(184) 评论(0) 推荐(0) 编辑

导航