- 浏览: 108857 次
- 性别:
- 来自: 深圳
最新评论
-
LinApex:
没用啊你的代码
Java调BeyondCompare -
zhang_takeiteasily:
"org.jnp.interfaces.NamingContextFactory"Not Found -
zhang_takeiteasily:
没有用
"org.jnp.interfaces.NamingContextFactory"Not Found -
--Gyh--:
IPartTypeManager是什么东西呢,能不能发下代码? ...
Richfaces構建節點樹 -
--Gyh--:
密码是多少?
TreeNode
文章列表
ExecTask exec = new ExecTask();
Project p = new Project();
exec.setProject(p);
exec.setExecutable(runable);
exec.createArg().setLine(arg);
exec.setFailonerror(false);
exec.setTimeout(timeout);
exec.execute() ...
public class MyTask extends Task {
private String inStr;
@Override
public void execute() {
System.out.println("inStr:" + inStr);
String outStr = "*" + inStr + "*";
getProject().setProperty("outStr", outStr);
}
public String getStr() ...
@Test
public void test6()
{
// 根据字符取unicode
System.out.println(Integer.toString("℃".toCharArray()[0]));
// 根据unicode取字符
System.out.println((char)8451);
}
http://blind.iteye.com/blog/602212
/**
* @author Q.Wong [2010-12-18]
*
*/
@WebService
public class WSDemo {
@WebMethod
public String sayHello(String name) {
return name + " Hello!";
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" de ...
/**
*
* @author Q.Wong [2010-12-17]
*
*/
public class TestInvoker {
private Logger logger = LogManager.getLogger(TestInvoker.class);
/**
* 索引保存在磁盘目录
*/
@Test
public void testFSDirectory() {
String indexDir = "d:\\temp\\index";
String sourceDir = " ...
/**
*
* @author Q.Wong [2010-12-17]
*
*/
public class QueryManager {
private static Logger logger = LogManager.getLogger(QueryManager.class);
/**
* 执行查询
*
* @param analyzer
* @param searcher
* @param field
* @param keyWord
* @param n
* @return
* @throw ...
/**
*
* @author Q.Wong [2010-12-17]
*
*/
public class IndexManager {
private static Logger logger = LogManager.getLogger(IndexManager.class);
/**
* return an IndexWriter with FSDirectory
*
* @param indexDir
* @param analyzer
* @return
* @throws CorruptIndexExc ...
Control characters used in above
samples
Character
Meaning
^
Beginning of line
$
End of line
\s
Whitespace (a tab or space)
*
Zero or more of the preceding character
?
Preceding character is optional
Expression
Meaning
^abc
Match "abc" at beginning of line
abc$
Match "abc" at end of line
^abc$
Match the line "abc" exactly
^\s*abc
Match "abc" at beginning of line, but allow leading
whitespa ...
public class CompareDemo {
// 可执行程序的路径
private String comparePath;
// 执行脚本文件所在的路径
private String execJSPath;
public CompareDemo(String comparePath, String execJSPath) {
this.comparePath = comparePath;
this.execJSPath = execJSPath;
}
// 比较两个文件
public boolean compareFile( ...
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
生成XX升级Zip包
=================================================================== ...
public class XXUpdate
{
/**
* 命令行入口
* 输入参数:新版本XX路径、旧版本XX路径、更新文件路径
*
* @param args
*/
public static void main(String args[])
{
String newXXPath = args[0];
String oldXXPath = args[1];
String updatePath = args[2];
...
public class MD5Utils
{
public static char[] hexChar = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
/**
* 获取文件的MD5
*
* @param file
* @return
* @throws Exception
*/
public static String ge ...