摘要: import java.util.*;import java.util.regex.*;/*** Transforms words (from singular to plural, from camelCase to under_score, etc.). I got bored of doing Real Work...* @author chuyeow* @modified Winter Lau (http://www.oschina.net/)*/public class Inflector { // Pfft, can't think of a better name, bu 阅读全文
posted @ 2013-02-04 13:22 6小贝 阅读(2400) 评论(0) 推荐(0)
摘要: package com.cn.ninemax;import java.io.File;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.net.MalformedURLException;import java.net.URL;import java.net.URLClassLoader;public class JarUtils {private String classPath;private String className;private Stri 阅读全文
posted @ 2013-02-01 18:52 6小贝 阅读(506) 评论(0) 推荐(0)
摘要: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv=" 阅读全文
posted @ 2013-02-01 18:32 6小贝 阅读(278) 评论(0) 推荐(0)
摘要: private File photo; private String photoFileName; // 封装上传文件名的属性 private String root = "D:/root/pic";private void loadPicture() throws IOException { HttpServletRequest request = ServletActionContext.getRequest(); FileOutputStream fos; // 获取图片后缀名 String partRightType = ""; String s 阅读全文
posted @ 2013-02-01 18:30 6小贝 阅读(197) 评论(0) 推荐(0)
摘要: public List<String> getTag(String text){ List<String> lists=new ArrayList<String>(); @SuppressWarnings("unchecked") List<List<HasWord>> sentences = tagger.tokenizeText(new StringReader(text));//tagger.tokenizeText(new BufferedReader(new FileReader(args[1]))); 阅读全文
posted @ 2013-02-01 18:03 6小贝 阅读(757) 评论(0) 推荐(1)
摘要: 简单分句public List<String> getPhrase(String args,String type) { List<String> lists = new ArrayList<String>(); try { args = args.replaceAll("[;] ", "###").replaceAll("[.] a", ".&&&a").replaceAll( "[.] b", ".&&&a 阅读全文
posted @ 2013-02-01 18:00 6小贝 阅读(426) 评论(0) 推荐(0)
摘要: package com.ninemax.utils;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java. 阅读全文
posted @ 2013-02-01 17:53 6小贝 阅读(341) 评论(0) 推荐(0)
摘要: sqlserver 实现分页查询select top ("+pageSize+") word from(select distinct(d_word)as word,row_number() over(order by id asc) as rownumber from dbo.zdbz_dict_all) as tb where rownumber>("+(i*pageSize)+")将查询出来的数据导入到另外一个表中insert into test_cs(word)select distinct(d_word) as word from dbo 阅读全文
posted @ 2013-02-01 17:34 6小贝 阅读(311) 评论(0) 推荐(0)
摘要: package com.cn.ninemax;import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;public class JDBCUtil {public static Connection getConn(){ Connection conn=null;try {Class.forName("net.sourceforge.jtds.jdbc.Driver&q 阅读全文
posted @ 2013-01-31 17:46 6小贝 阅读(447) 评论(0) 推荐(0)