鬼辅神攻的博客
鬼辅神攻 · 共 9 篇文章
autotest.xml
<property file="CI_tool/ant.properties"/> <taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath> <fileset dir="${ant.home}/lib" includes="ant-contrib*.jar"/> </classpath> </taskdef> <!-- <exec executable="cmd"> <arg value="/c"/> <arg value="d:\bvt\ci_tool\xxx.bat"/> <arg value="-p"/> </exec>…
2011-07-14 17:29 · XML · 评论(0)
java实现负载均衡
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Random; public class TJunheng { private static char asciis = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r'}; private static final int MAX_SEGMENTS = 7; /** * <p>…
2011-07-14 17:26 · J2SE · 评论(0)
Java实现类似C/C++中的__FILE__、__FUNC__、__LINE__等,主要用于日志等功能中
import java.text.SimpleDateFormat; import java.util.Date; /** Java实现类似C/C++中的__FILE__、 FUNC 、__LINE__等,主要用于日志等功能中。 @version 1.0 2011-07-13 */ public abstract class CommonFunction { /** * 打印日志时获取当前的程序文件名、行号、方法名 输出格式为: * * @return */ public static String getFileLineMethod() { StackTraceElement traceE…
2011-07-13 11:30 · J2SE · 评论(0)
归并排序的java实现
import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** 归并排序的java实现 @version 1.0 2011-07-13 10:10 @author 鬼辅神攻 / public class MergeSort { / * * @param * 必须实现了Comparable接口 * @param list * 待排序数组 * @return 正序排列的结果 */ public static <T extends Comparable > List sort(List list) { …
2011-07-13 11:29 · J2SE · 评论(0)
泛型实现的快速排序算法
import java.util.ArrayList; import java.util.List; import java.util.Random; /** 泛型实现的快速排序算法 @version 1.0 2011-07-13 09:53 @author 鬼辅神攻 */ public class QuickSort { public static void main(String args) { Random rand = new Random(); List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < 50…
2011-07-13 11:20 · J2SE · 评论(0)
Java自动化测试用例结果统计对象
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.ArrayList; /** Java自动化测试用例结果统计对象(ST、UT) @version 1.0 2011-07-13 11:10 @author 鬼辅神攻 */ public class TestResult { private String caseName =…
2011-07-13 11:15 · J2SE · 评论(0)
Unload table data to unl files (Oracle)
#!/bin/ksh ############################################################### Use : Unload the table data to unl format Usage : Put the table names in tables.txt and call the script ############################################################### ############# Usage ########################## if then e…
2011-07-12 17:32 · shell · 评论(0)
使用shell脚本读取xml的属性值和节点值
#FUNCRION: GetNodeValue #DESC : Get xmlnode value #INPUT : 1-XmlFilePath 2-NodeName #OUTPUT : nodevalue function GetNodeValue { if ;then echo " error: arguments is not enough" echo " USAGE: $0 XmlFilePath NodeName" echo " XmlFilePath xmlfile path type" echo " NodeName nodename type" echo e.g.: $0 $…
2011-07-12 17:27 · shell · 评论(0)