随笔- 254
文章- 1
评论- 10
阅读-
34万
03 2009 档案
java File(dir, delete, move...)
摘要:import java.io.*; public class FileOperate { public FileOperate() { } /** ...
阅读全文
javascript and bat
摘要:function executeOnShell(which) { var WshShell = new ActiveXObject("WScript.Shell"); iRet = WshShell.Run(which,1,true); window.focus(); } function setuppvpro() { if(rifWinGui != null) rifWinGui...
阅读全文
java.text.MessageFormat
摘要:int planet = 7; String event = "a disturbance in the Force"; String result = MessageFormat.format( "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.", planet, new Date(), event);...
阅读全文
java System.getenv() and System.getProperty()
摘要:System.getenv("") Get String from system enviroment variables System.getProperty() Get String from property file private static ResourceBundle resourceBundle = ResourceBundle.getBundle( ...
阅读全文
javascript add table content from xml
摘要:var e = document.getElementById("list2"); var seldevs = xmlResponse.getElementsByTagName("device"); var selvars = xmlResponse.getElementsByTagName("var"); var selids = xmlResponse.getElementsByTagN...
阅读全文
javascript get multiple select
摘要:function getMultiple(ob) { var arSelected = new Array(); arSelected = new Array(); while (ob.selectedIndex != -1) { arSelected.push(ob.options[ob.selectedIndex].value); ob.option...
阅读全文
javascript
摘要:the parameter obj, devobj are object, not string function to2(obj,devobj) { var tmp = obj.id; var deviceid = devobj.id; idlistbox = tmp.substring(0,(tmp.length-1)); var list1 = document.getEleme...
阅读全文
SetTimeout SetInterval
摘要:setTimeout only one time, so need recursion. So continues running the function one after one SetInterval continues running, without stoping, and it runs every intervals, without waiting the former sto...
阅读全文
jsp 参数提取
摘要:Enumeration param = request.getParameterNames(); while (param.hasMoreElements()) { name = param.nextElement().toString(); properties.setProperty(name, ...
阅读全文
java comparable
摘要:利用 Comparable 接口创建自己的类的排序顺序,只是实现 compareTo() 方法的问题。通常就是依赖几个数据成员的自然排序。同时类也应该覆盖 equals() 和 hashCode() 以确保两个相等的对象返回同一个哈希码。 这个接口的作用:如果数组或者集合中的(类)元素实现了该接口的话 , 我们就可以调用 Collections.sort 和 Arrays.sort 排序,或应用...
阅读全文