`
dickyzhu
  • 浏览: 107334 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论
文章列表
对单列表格排列 <html> <head> <title>table sort</title> <script type="text/javascript"> var bFlag = true; function compareTRs(oTR1,oTR2){ var sValue1 = oTR1.cells[0].firstChild.nodeValue; var sValue2 = oTR2.cells[0].firstChild.nodeValue; return sValue1.loc ...
Linux链接分两种,一种被称为硬链接(Hard Link),另一种被称为符号链接(Symbolic Link)。默认情况下,ln命令产生硬链接。 --硬连接 硬连接指通过索引节点来进行连接。在Linux的文件系统中,保存在磁盘分区中的文件不管是什么类型都给它分配一个编号,称为索引节点号(Inode Index)。在Linux中,多个文件名指向同一索引节点是存在的。一般这种连接就是硬连接。硬连接的作用是允许一个文件拥有多个有效路径名,这样用户就可以建立硬连接到重要文件,以防止“误删”的功能。其原因如上所述,因为对应该目录的索引节点有一个以上的连接。只删除一个连接并不影响索引节点本身和其它的连接, ...
1.如何修改文件 修改 /etc/X11/XF86Config文件 命令cd /etc/X11进入X11目录,用vi编辑器修改,命令为vi XF86Config 2.Linux中文乱码 修改一下 /etc/sysconfig/i18n,文件内容为 LANG="en_US" LANGUAGE="en_US" SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" SYSFONTACM="8859-15" ...
最近为系统重新做一套日志,来替换原来框架自带的日志。问题是开发的时候用的是windox操作系统,产品上线发布是在AIX,在配置log4j的日志文件路径的时候不能把文件路径写死了,原来打算写个servlet,在用户登录的时候就初始化,设置日志文件的相对路径,但发现有时候登录出错,出错的原因就是找不到日志文件的类。后来就试试看能不能在websphere配置下变量,然后读取,发现可行。 首先,新建一个变量,Application servers > MetCare0 > Process Definition > Java Virtual Machine > Custom Pro ...
private String getRelativePath() { String relativePath = ""; try { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("windows xp") > -1) { Process p = null; p = Runtime.getRuntime().exec("cmd /c set"); ...
今天面试碰到的一个问题,只知道递归可以实现 public static boolean is2Power(int num) { if(num ==1) return true; if(num%2==0) return is2Power(num/2); return false; } 感觉也可以利用进位来实现,但一时半会想不出来,后来上网查了下,很简单 public static boolean is2Power(int num) { return (x&(x-1) )==0; }
工程出现红叉叉,报错的信息是Target runtime Apache Tomcat v5.5 is not defined.主要原因是org.eclipse.wst.common.project.facet.core.xml文件错误,我的server是websphere6.1因此把xml文件里面的配置稍微改下就Ok <?xml version="1.0" encoding="UTF-8"?> <faceted-project>   <runtime name="Apache Tomcat v5.5"/ ...
import java.io.File; import java.io.FileWriter; import java.io.IOException; public class DirMaking { public static void main(String[] args) throws IOException{ String path = "c:/temp1/temp2/met.xml"; File file = new File(path); if(!file.getParentFile().exists()) file.g ...
check if you have spaces in the top line in your xml which reads <?xml version="1.0"?> If you have spaces to begin with , the xml processor does not like it. remove the spaces and it shoudl work
InputStream在被读出后,在下次读取的时候会出现null。因此在下次读取或者利用InputStream的时候要把它写回去。 import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public clas ...
二叉树深度的递归算法 int height(BTNODE *t) { if(!t) { return 0; } int left_height = height(t->left_child); int right_height = height(t->right_child); return (left_height > right_height ? left_height+1:right_height+1); } 遍历二叉树的非递归算法 void PreOrder(BiTree ...
htc 文件
<a onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.baidu.com')" href="http://www.baidu.com">把百度设为主页</a>
var EventUtil = new Object(); /** 添加事件处理函数 */ EventUtil.addEventHandler = function(oTarget,sEventType,fnHandler){ if(oTarget.addEventListener){// for DOM-compliant browsers oTarget.addEventListener(sEventType,fnHandler,false); }else if(oTarget.attachEvent)// for IE { oTarget.attachEvent(" ...
方法一: /** * @param originStr String contains Chinese character. * @return the number of Chinese character */ public static int countChineseCharacter(String originStr) { int count = 0; String temp = null; for (int i = 0; i < originStr.length(); i++) { temp = String.valueOf(ori ...
Global site tag (gtag.js) - Google Analytics