摘要: 上几天工作需要大量的xml文档,文档的docid不能重复,所以就写了一个方法来实现,记录下来以免丢掉。View Code 1 private static void ChangeId(File file,int i)throws DocumentException, IOException{ 2 UUID uuid = UUID.randomUUID(); 3 SAXReader saxReader = new SAXReader(); 4 Document document = saxReader.read(file); 5 ... 阅读全文
posted @ 2012-05-11 14:56 爱我所艾 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 如你的电脑要在22:00关机,可以选择“开始→运行”,输入“at 22:00 Shutdown -s”,这样,到了22点电脑就会出现“系统关机”对话框,默认有30秒钟的倒计时并提示你保存工作。如果你想以倒计时的方式关机,可以输入“Shutdown.exe -s -t 3600”,这里表示60分钟后自动关机,“3600”代表60分钟。 设置好自动关机后,如果想取消的话,可以在运行中输入“shutdown -a”。另外输入“shutdown -i”,则可以打开设置自动关机对话框,对自动关机进行设置。 阅读全文
posted @ 2012-05-11 14:51 爱我所艾 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 功能:采用存储过程、type组合来实现批量入库,以节省系统开销,提高效率。sql脚本: 1)View Code 1 CREATE OR REPLACE TYPE WANGCHY.t_cableLine_point AS OBJECT2 (3 ID NUMBER(10),4 CABLELINEID NUMBER(10),5 ROADPOINTID NUMBER(10),6 ORDERNUM NUMBER(10),7 REMARK NUMBER(10)8 ) 2)View Code 1 CREATE OR REPLACE TYPE WANGCHY.ARRAY_cableL... 阅读全文
posted @ 2012-05-11 14:38 爱我所艾 阅读(9777) 评论(0) 推荐(0) 编辑
摘要: View Code 1 package com.test.suanfa; 2 3 public class BinaryTreeTest{ 4 public static void main(String args[]){ 5 6 BinaryTreeTest b = new BinaryTreeTest(); 7 int data[] = { 12, 11, 34, 45, 67, 89, 56, 43, 22, 98 }; 8 BinaryTree root = new BinaryTree(data[0]); ... 阅读全文
posted @ 2012-05-11 14:28 爱我所艾 阅读(237) 评论(0) 推荐(0) 编辑
摘要: View Code 1 package com.test.suanfa; 2 3 public class Maopao { 4 public static void main(String[] args) { 5 Maopao sort = new Maopao(); 6 int[] arr= new int[]{7,22,11,5,400,99,20,22,5}; 7 sort.sort(arr); 8 for(int i : arr) 9 System.out.print(i+",");1... 阅读全文
posted @ 2012-05-11 14:27 爱我所艾 阅读(188) 评论(0) 推荐(0) 编辑
摘要: View Code 1 package com.test.suanfa; 2 3 public class QuickSoft { 4 5 private void swap(int a[], int i, int j) { 6 int tmp = a[i]; 7 a[i] = a[j]; 8 a[j] = tmp; 9 }10 11 private int partition(int a[], int p, int r) {12 int point = a[r];13 // 将小于等... 阅读全文
posted @ 2012-05-11 14:26 爱我所艾 阅读(167) 评论(0) 推荐(0) 编辑