
		 
		2009年5月1日		  
	
 
	
			
			class Square{
public:
 Square(int x ) :value(x*x){
 }
Square(const Square& other) = delete;//rule 1
const Square & operator = (const Square& other) == delete;//rule 2
const Square & operator = (Square&& other) = delete;//rule3 
..
}Square s = 9; //因为s没有初始化,会先用9 调用构造函数
 Square(int x ) , 然后调用Square(const Square& other),和rule1 违背Square s2(8);
 s= s2;//对应rule 2
 s= Square(9);//对应 rule3 
posted @ 
2019-12-31 21:11 huohuo 阅读(1071) | 
评论 (0) | 
编辑 收藏
			 其实一直想学ruby,总是拖拖拉拉推了几年。
很多ruby的教材要么老厚一本
要么是东一榔头西一斧头,逻辑性不清楚
ruby语法还没说清楚就上rails了
这个教材挺好。
今天才发现argument 是实参,parameter是形参
			
posted @ 
2014-07-07 22:20 huohuo 阅读(247) | 
评论 (0) | 
编辑 收藏
			
小新看到妈妈用订书机订了一个盒子,他就从打印机上面拿了几张a4纸,钉了一个像盒子的东西,当作他的百宝箱,把他的一些零零碎碎的东西放到他的百宝箱中。 有一天他看到了妈妈的首饰盒,他觉得很漂亮,就和妈妈说:妈妈,我把你这个盒子里面的东西放到我的那个百宝箱里面,你这个盒子给我当百宝箱吧。 妈妈当然不同意。小新很希望要个百宝箱,爸爸就问他:“你需要一个多大的百宝箱?” 小新比划了一个大小,他希望大一点,能装很多东西。爸爸问他是不是希望箱子能有很多分隔? 小新说不要分隔,但是百宝箱要有锁。 爸爸明白了---你就是要个能锁住的箱子嘛,我给你找个皮箱,带密码锁的。  第二天,爸爸上班回来,发现他平时用的笔记本电脑被小新锁在他的"新百宝箱"----密码锁皮箱里面了,密码是小新设的。 爸爸不知道密码,打不开皮箱,爸爸就和小新说:"帮爸爸把电脑拿出来,爸爸要给你查一个睡觉前讲的故事,不然今天就没故事听了"。 小新说:“你用手机也可以查的嘛,别以为我不知道”
			
posted @ 
2014-01-20 21:49 huohuo 阅读(236) | 
评论 (0) | 
编辑 收藏
			1 解析utf-8的中文字符问题,我修改了 ReportTask类里面的一个方法,增加了一个getJava().setVmArgs("-Dfile.encoding=utf-8")
2.覆盖率出不了数据   一方面注意制定datafile,把cubertura-instrument和cobertura-report的datafile设置为一个,另外junit里面也要设置一个系统属性,制定cubertura的datafile属性.  不制定datafile时,可能生成文件在当前运行ant的目录.但是我们ant任务中的junit测试任务,可能会使用不同的目录来作工作路径.这样会导致datafile不一致.
另外一个是要记得将javac 任务的debug="yes" ,因为只有debug =yes时,编译的代码才带有行信息,能显示覆盖.  当然常见的问题是junit的classpath中的instrument class目录放到原来被测class之前.
			
posted @ 
2013-08-18 22:37 huohuo 阅读(518) | 
评论 (0) | 
编辑 收藏下载putty的安装版本,安装之后有一个plink pscp程序。
plink程序负责调用ssh命令
pscp负责上传文件。
plink -l user -pw pass   hostname
但是因为plink会提示是否要保存密码,不能保证自动批处理运行,此时利用管道的能力来输入提示的结果
echo Y >yes.txt
plink -l user -pw pass   hostname <yes.txt
			posted @ 
2012-03-04 06:31 huohuo 阅读(627) | 
评论 (0) | 
编辑 收藏posted @ 
2011-12-21 01:27 huohuo 阅读(305) | 
评论 (0) | 
编辑 收藏posted @ 
2011-12-21 00:33 huohuo 阅读(341) | 
评论 (0) | 
编辑 收藏posted @ 
2011-12-20 22:53 huohuo 阅读(334) | 
评论 (0) | 
编辑 收藏posted @ 
2011-12-19 02:15 huohuo 阅读(258) | 
评论 (0) | 
编辑 收藏测试环境redhat5.5: 
vmware建两台虚拟机(btw,似乎双核系统只能建俩,3个就死掉了) 
192.168.229.129 
192.168.229.130 
下载2011年12月15日的最新zookeeper 
加压到 
/opt/zookeeper-3.4.0/ 
配置/opt/zookeeper-3.4.0/conf/zoo.cfg 
可以把那个例子考过来 
- # The number of milliseconds of each tick   
- tickTime=2000  
- # The number of ticks that the initial    
- # synchronization phase can take   
- initLimit=10  
- # The number of ticks that can pass between    
- # sending a request and getting an acknowledgement   
- syncLimit=5  
- # the directory where the snapshot is stored.   
- # do not use /tmp for storage, /tmp here is just    
- # example sakes.   
- dataDir=/opt/zookeeper-3.4.0/data/zookeeper   
- dataLogDir=/opt/zookeeper-3.4.0/data/log   
- # the port at which the clients will connect   
- clientPort=2181  
- #   
- # Be sure to read the maintenance section of the    
- # administrator guide before turning on autopurge.   
- #   
- # http:  
- #   
- # The number of snapshots to retain in dataDir   
- #autopurge.snapRetainCount=3  
- # Purge task interval in hours   
- # Set to "0" to disable auto purge feature   
- #autopurge.purgeInterval=1  
- server.1=192.168.229.129:2888:3888  
- server.2=192.168.229.130:2888:3888  
 # The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/opt/zookeeper-3.4.0/data/zookeeper
dataLogDir=/opt/zookeeper-3.4.0/data/log
# the port at which the clients will connect
clientPort=2181
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=192.168.229.129:2888:3888
server.2=192.168.229.130:2888:3888
修改/opt/zookeeper-3.4.0/bin/zkServer.sh 
- status)   
-     # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output   
-     #STAT=`echo stat | nc -q 1 localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') 2> /dev/null| grep Mode`   
-     STAT=`echo stat | nc localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') 2> /dev/null| grep Mode`  
 status)
    # -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output
    #STAT=`echo stat | nc -q 1 localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') 2> /dev/null| grep Mode`
    STAT=`echo stat | nc localhost $(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') 2> /dev/null| grep Mode`
以上这些多台机器一样 
log和data都在dataDir下面 
如果找不到log了用大招: 
ps -ef|grep zookeeper 
ls -l /proc/123123/fd 
其中有一个是log 
然后dataDir建立一个文件myid 
在192.168.229.129上 
echo 1 >/opt/zookeeper-3.4.0/data/zookeeper/myid 
在192.168.229.130上 
echo 2 >/opt/zookeeper-3.4.0/data/zookeeper/myid 
对应zoo.cfg里面的 
注意一定是数字 然后zkServer.sh start  
启动 
zkServer.sh status 
看状态 
echo ruok|nc localhost 2181          
//are you ok? 
echo dump|nc localhost 2181 
echo stat|nc localhost 2181 
echo srst|nc localhost 2181 
zkServer.sh stop 
posted @ 
2011-12-16 03:48 huohuo 阅读(1343) | 
评论 (0) | 
编辑 收藏 
public class Util {
 final static int LINE_COUNT = 16;
 final static int WORD_COUNT = 2;
 public static StringBuffer toHex(byte b)
 {
  byte factor = 16;
  int v = b & 0xff;//去掉byte转换之后的负数部分。
  byte high = (byte)( v / factor);
  byte low = (byte)(v % factor);
  StringBuffer buf = new StringBuffer();
  buf.append(toHexLow(high)).append(toHexLow(low));
  return buf;
 }
 private static char toHexLow(byte b)
 {
  if(b > 16 || b < 0 )
  {
   throw new IllegalArgumentException("inpt parameter should less than 16 and greater than 0");
  }
  if(b < 10){
   return (char)('0' + (char)b);
  }
  else{
    return (char)('A' + (b-10));
  }
 }
 
 public static StringBuffer toHex(int val)
 {
  StringBuffer buf = toHex((byte)(val >>24 & 0xff)).append(toHex((byte)(val>>16&0xff)));
  return buf.append(toHex((byte)(val>>8&0xff))).append(toHex((byte)(val & 0xff)));
 }
 
 /**
  * 打印二进制数组
  * @param arr
  * @param off
  * @param len
  */
 public static void printBytes(byte [] arr,int off,int len)
 {
  if(arr == null || len <= 0 || off <0 || off + len > arr.length){
   return;
  }
  
  int count = 0;
  
  for(int i = off; count < len; ++i)
  {
   System.out.print(toHex(arr[i]));
   
   ++ count;
   if(count% WORD_COUNT == 0)
   {
    System.out.print(' ');
   }
   if(count % LINE_COUNT == 0)
   {
    System.out.println();
   }
  }
 }
 
 public static void main(String[] args) {
  byte[] arr = new byte[256];
  for(int i = 0; i < 256;++i )
  {
   
   arr[i] = (byte)i;
   
  }
  
  printBytes(arr,0,256);
  printBytes(arr,240,16);
  
  System.out.println(toHex(1));
  System.out.println(toHex(0xffffffff));
  System.out.println(toHex(0xeeffaacc));
 }
}
另外c++写好的小端序的int数据,用java读入如此处理
 private static int convertInt(byte[]  arr)
 {
  if(arr == null || arr.length != 4)
  {
   throw new IllegalArgumentException("bytes array error");
  }
  int val = (arr[0] & 0xff) | (arr[1] & 0xff)<<8 | (arr[2] & 0xff)<<16 | (arr[3]&0xff)<<24;
  return val;
 }
			posted @ 
2011-11-02 21:36 huohuo 阅读(5410) | 
评论 (0) | 
编辑 收藏
			1.修改当前的hostname可以用
hostname  myname 
此时只是修改了内存内部的,下次启动又恢复了
2.机器在启动的时候会调用/etc/rc.d/boot.localnet
脚本看后面的附录,这个脚本会判断当前的$HOSTNAME变量是否设置,没有设置就会读取/etc/HOSTNAME
来设置主机名。
3.因此要修改hostname,
 3.1 修改/etc/HOSTNAME文件
 3.2 修改当前的$HOSTNAME变量
 3.3 停掉/etc/rc.d/boot.localnet
 3.4 启动 /etc/rc.d/boot.localnet
因此执行脚本如下:
 export HOSTNAME=myname
 echo $HOSTNAME>/etc/HOSTNAME
  /etc/rc.d/boot.localnet stop
 /etc/rc.d/boot.localnet start
附录:/etc/rc.d/boot.localnet
case "$1" in
  start)
        # clean up old yp bindings
        rm -f /var/yp/binding/*.[12]
        #
        # set hostname and domainname
        #
        XHOSTNAME=""
        test -f /etc/HOSTNAME && {
            read XHOSTNAME < /etc/HOSTNAME
        }
        test -n "$HOSTNAME" -a "$HOSTNAME" != '(none)' && {
            echo Using boot-specified hostname \'${HOSTNAME}\'
            XHOSTNAME="$HOSTNAME"
        }
        test -n "$XHOSTNAME" && {
            echo -n Setting up hostname \'${XHOSTNAME%%.*}\'
            hostname ${XHOSTNAME%%.*}
            rc_status -v -r
        }
        XDOMAINNAME=""
        test -f /etc/defaultdomain && {
            read XDOMAINNAME < /etc/defaultdomain
        }
        test -n "$XDOMAINNAME" && {
            echo -n Setting up NIS domainname \'$XDOMAINNAME\'
        }
        domainname "$XDOMAINNAME"
        test -n "$XDOMAINNAME" && {
        rc_status -v -r
                          
			posted @ 
2011-10-27 22:21 huohuo 阅读(16413) | 
评论 (3) | 
编辑 收藏这个装完带验证url
http://wenku.baidu.com/view/373ed21fb7360b4c2e3f64ce.html
			posted @ 
2011-10-25 06:50 huohuo 阅读(194) | 
评论 (0) | 
编辑 收藏posted @ 
2011-10-25 06:45 huohuo 阅读(191) | 
评论 (0) | 
编辑 收藏
			1.安装suse
装好vmware workstation8,跑到open suse,下载suse11的光盘iso文件,将iso文件映射到vmware的光驱做安装。
2.安装vmwaretools,用root用户执行
vmware安装目录中的linux.iso中带有的VMwareTools*.gz
执行vmware-install.pl
一路回车,中途碰到问题,提到找不到kernel header文件,
The path "" is not a valid path to the 2.6.37-1-1.2-desktop kernel
参照网上文件
安装了kernel-devel ,还是碰到问题,,又安装了kernel-desktop-devel*.rpm
再试用 rpm -ql kernel-desktop-devel,
发现这个包的文件都安装的 /usr/src/linux-2.6.37.1-1.2-obj/
下面,于是我采用这个路径/usr/src/linux-2.6.37.1-1.2-obj/i586/desktop/include 
结果安装成功。这个vmwaretools主要是为了提供一个和主操作系统共享文件目录的作用吧。
安装起来还是比较费劲的。
			
posted @ 
2011-10-25 05:51 huohuo 阅读(2275) | 
评论 (0) | 
编辑 收藏
今天找了第三方的代码,然后自己修改了部分,实现了透明动画gif的读写,jdk 5下测试通过。
虽然jdk6支持gif的读写,但是很多系统没有升级到jdk6,不可能为了一个gif读写伸缩功能就要升级到jdk6.
这个例子里面使用了开源的gifdecoder animatedgifencoder。
开源的gifdecoder有个bug,透明色经常被它变为黑色,这样很不好。
另外GifUtil类里面有伸缩gif图的例子,有些人图伸缩之后存会gif会出现颜色变多了,超过gif的256色,
因此伸缩也是有特别注意的地方。
具体看代码吧,没有太多空解释
			
posted @ 
2009-09-10 19:53 huohuo 阅读(2137) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

文章来源:
http://www.flickr.com/photos/liyunxin/3409487358/
			posted @ 
2009-05-01 10:57 huohuo 阅读(128) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

文章来源:
http://www.flickr.com/photos/liyunxin/3408678473/
			posted @ 
2009-05-01 10:57 huohuo 阅读(88) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

在朝阳一巷的工商一行宿舍
文章来源:
http://www.flickr.com/photos/liyunxin/3408678585/
			posted @ 
2009-05-01 10:57 huohuo 阅读(96) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

在朝阳一巷的工商一行宿舍
文章来源:
http://www.flickr.com/photos/liyunxin/3409487680/
			posted @ 
2009-05-01 10:57 huohuo 阅读(103) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

在朝阳一巷的工商一行宿舍
文章来源:
http://www.flickr.com/photos/liyunxin/3409487798/
			posted @ 
2009-05-01 10:57 huohuo 阅读(101) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

文章来源:
http://www.flickr.com/photos/liyunxin/3408678979/
			posted @ 
2009-05-01 10:57 huohuo 阅读(111) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

文章来源:
http://www.flickr.com/photos/liyunxin/3409488100/
			posted @ 
2009-05-01 10:57 huohuo 阅读(102) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

文章来源:
http://www.flickr.com/photos/liyunxin/3408679279/
			posted @ 
2009-05-01 10:57 huohuo 阅读(93) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

锦母角的船上,和奶奶在一起
文章来源:
http://www.flickr.com/photos/liyunxin/3409488420/
			posted @ 
2009-05-01 10:57 huohuo 阅读(89) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

锦母角的船上
文章来源:
http://www.flickr.com/photos/liyunxin/3408679495/
			posted @ 
2009-05-01 10:57 huohuo 阅读(87) | 
评论 (0) | 
编辑 收藏李运新 發表相片:

和爸爸妈妈在一起
文章来源:
http://www.flickr.com/photos/liyunxin/3408680885/
			posted @ 
2009-05-01 10:57 huohuo 阅读(664) | 
评论 (1) | 
编辑 收藏
jad -debug -o -r -sjava -dsrc **/*.class
由于jad不支持新版本的class文件,使用
-debug ,可以强制对新版本的class文件反编译
-d是指定目标路径
**/*.class 表示当前目录下所有class文件
xx/**/*.class 表示xx目录下所有class文件
 
jad的网站
http://www.kpdus.com/jad.html
 
新版jad下载路径
http://www.kpdus.com/jad/winnt/jadnt158.zip
 
 
今天转换了oracle adf的代码,好多编译不过,郁闷,写jad的后来不出版本了啊
oracle也垃圾,说是公开代码了,都没有地方下载
 
 
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.11784700.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(246) | 
评论 (0) | 
编辑 收藏
最近下了oracle adf的 source code,想编译一下javadoc,用eclipse生成,搞出来out of memory,
于是翻了一下ant 的帮助,做了一个build.xml,设置了Xmx
本来工作正常得,删除了一点东西,没有测试,先贴着吧。
【adf 得代码还是挺难找的,终于在老外的一个blog上找到,是oracle给apache的,和 jdeveloper 10.1.3上的还是有点差别】
 
<project name="name of project" default="javadoc" basedir=".">
 <property name="adf-api.home"      value="E:/doc/oracle/apache-drop/adf-faces/adf-faces-api"/>
 <property name="adf-impl.home"      value="E:/doc/oracle/apache-drop/adf-faces/adf-faces-impl"/>
 <property name="dest.home"      value="E:/doc/oracle/apache-drop"/>
 
 
 
  <path id="doc.src.path">
   <pathelement path="${adf-api.home}/src/main/java"/>
      
   <pathelement path="${adf-api.home}/target/maven-i18n-plugin/main/java"/>
      
   <pathelement path="${adf-api.home}/target/maven-xrts-plugin/main/java"/>
      
   <pathelement path="${adf-api.home}/target/maven-faces-plugin/main/java"/>
      
    <pathelement path="${adf-impl.home}/src/main/java"/>
      
   <pathelement path="${adf-impl.home}/target/maven-javascript-plugin/main/resources"/>
      
   <pathelement path="${adf-impl.home}/target/maven-xrts-plugin/main/java"/>
      
   <pathelement path="${adf-impl.home}/target/maven-i18n-plugin/main/java"/>
      
   <pathelement path="${adf-impl.home}/target/maven-i18n-plugin/main/javascript"/>
      
   <pathelement path="${adf-impl.home}/target/maven-faces-plugin/main/java"/>
          
 </path>
  <path id="classes.path" >
  </path>
  <target name="javadoc" 
   description="Create Javadoc API documentation">
    <mkdir          dir="${dest.home}/docs/api"/>
    <javadoc sourcepathref="doc.src.path" packagenames="oracle.*"
                destdir="${dist.home}/docs/api"
          maxmemory="200M">
    
    </javadoc>
  </target>
</project>
文章来源:
http://stocknewbie.bokee.com/viewdiary.11971386.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(845) | 
评论 (0) | 
编辑 收藏早就听说google的map功能,今天在地图上找到把自己居住和上班的地方
找到了自己的卫星图,真的很有意思,这个图还是比较老的,图中科技园的中兴还在施工
 
http://maps.google.com/maps?f=q&hl=zh-CN&q=china&ie=UTF8&t=k&om=1&ll=22.536976,113.937063&spn=0.009711,0.021458
 
纬度 22。53  经度  113。93 属于热带,在北京西南面
 
 
两个软件
javascript plus,上面带了和js相关的dom,js core reference js client guide 之类的帮助。
编辑器有code insight 功能
 
dom inspector 可以查看页面上某个元素的属性,style,作为ie的插件,可以用鼠标点选控件来知道其中的dom对象属性和html代码
 
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.12043254.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(175) | 
评论 (0) | 
编辑 收藏
目前使用oracle adf 框架 10.1.3 版本
1 adf 的源代码 (交付给apache 的)
http://people.apache.org/~bdudney/apache-drop.zip
是从http://www.orablogs.com/jjacobi/ 上面看到了
 
2. 其实我把 adf-faces-api  adf-faces-impl.jar 用jad 解码出来了,反正许多编译不过,里面的代码版本和apache的版本还不是一致的
 
3. apache 的myface 正在改adf-faces 的代码,可以去他们的svn上取,取出来的结构和原来oracle的区别很大。
怀疑下一个版本的jdeveloper ,如果基于myface的adf 作表示层的话,兼容性很难保证。
 
4。 adf 空间里面的类层次比较复杂,oracle原来是使用uix机制,为了遵守jsf规范使用jsf绘制的时候,很多处理还是有uix概念。我怀疑如果重新设计的话,adf 完全可以简单得多。不过目前oracle adf 控件同时支持pda,desktop,
是了不起的,虽然没有尝试过他的pda版本
 
5 adf-facs-impl.jar!META-INF/faces-config.xml 定义了UIComponent 和Render的对应关系。
因此如果要修改adf控件的绘制器时,可以干掉jar包下的faces-config.xml,在自己的代码路径建立 /META-INF/faces-config.xml  ,修改这个文件来修改控件对应的绘制器
 
唉,混了这么多年,还在表示层打滚,应该看看工作流了。
 
 
 
 
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.12098419.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(652) | 
评论 (0) | 
编辑 收藏
上周折腾了几天,oracle workflow 2.6.3没有装好,这周和zg交流了一下,发现我没有看installation guide ,他的中间层装对了,我的数据库装对了,今天终于整合出来了,虽然他是linux,我是winxp
 
经验如下:
workflowserver 2.6.3 依赖 oracle db,oracle db companion cd.oracle httpserver standalone 9.04,
 
1.装10g dbserver ,oracle 10g db server 字符集选用中文的UTF-8编码方式,不能用zhs16gbk,因为
工作流配置程序WorkflowCA.jar中写死了zhs对应的字符集是utf8,要出现中文,就得用utf8
2.安装dbserver 的伴侣盘oracle 10 g companion cd ,安装第一项.装了这个才有一些什么owa_util之类的东西,大概是oracle web agent吧
 
3.装完dbserver之后就可以装workflowserver 的服务器部分,装到10g服务器下
 
4.装完之后,数据库菜单下面有个 workflow configuration assistant,按照安装指南设置一下参数。
5. oracle application server 里面的 httpserver ,需要放到不在数据库的那个oracle_home,我装在d:\oracleApache. 这个httpserver ,将一些请求,转成对数据库的pl/sql procedure的请求,由plsql代码生成网页
 
(其实伴侣盘里面也是有oracle http server ,我刚开始没有配置好,也许也是可以的,后来就选zg装成功的as中的httpserver)
 
6.安装workflowserver 的middletier 到 httpserver所在的oraclehome
 
需要修改dads.conf
<Location /pls/wf>
  SetHandler pls_handler
  Order deny,allow
  Allow from all
  AllowOverride None
  PlsqlDatabaseConnectString 10.16.33.178:1521:ORCL
  PlsqlAuthenticationMode Basic
  PlsqlDefaultPage wfa_html.home
  PlsqlNLSLanguage      "SIMPLIFIED CHINESE_CHINA.UTF8"
</Location>
 
7. windows xp 下启动httpserver时,
a.网上邻居-》本地连接-》属性-》高级—》Wins标签-》去掉启用LMhosts查询
前的勾就可以了.
b 控制面板-》windows防火墙-》高级标签-》网络连接设置-》设置-》勾选安
全Web服务器(HTTPS)"选项,按两次"确定"即可
c。关闭一些vpn之类的软件,一些网络程序,如skype 时才能正常启动httpserver
启动httpserver失败时,请查看
D:\oraApache\Apache\Apache\logs\error_log
和D:\oraApache\opmn\logs\HttpServer~1
如果D:\oraApache\Apache\Apache\logs\error_log显示
[Tue Jul 18 16:27:33 2006] [crit] (10022)提供了一个无效的参数。: 
setup_inherited_listeners: WSASocket failed to open the inherited socket.
表示端口被占用,检查是否启动了其他特别的vpn软件,或者软件占用了apache server的端口,使用有其他网络程序干扰.
netstat -a 和netstat -ab
8.访问页面 http://localhost:7777/pls/wf/wfa_html.home
 
9.后记: 其实这个版本有bug,在有个脚本里面有 select to_number('10g') from ....
会提示错误,windows下面,这个错误似乎不影响,可以一直装下去,linux下面似乎要改掉。
文章来源:
http://stocknewbie.bokee.com/viewdiary.12103536.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(1045) | 
评论 (0) | 
编辑 收藏
今天看cctv-12的道德观察,里面讲一些百姓英雄。在桂林发生一起抢包事件,一个女孩背着包在街上走,此时一个小偷从后面冲过来,小偷抢了包就走,女孩在后面追,大叫抓小偷,追了一阵,女孩体力不支,越追越远。此时前面有两个女孩,正在散步,小偷从她们前面冲过去了,这是其中一个叫邓树花,听到抓小偷,于是追了出去,小偷本来以为甩掉了失主,打开包的拉链一看,就一个老式的三星旧手机,不值什么钱,这个时候后面有又人追来,赶紧跑,后面的mm紧追不舍,他就把包扔了,心想不会追吧,结果女孩仍然在追,(女孩事后说,我当时好像看见他丢了点什么,但不知道是包),女孩追上去,抓住了小偷的衣领。小偷掏出刀:放了我吧,再不放,我就捅死你,女孩当时一直不肯放手(画外音说不管小偷怎样求饶,邓树花就不肯放) 邓树花后来说:我当时看到刀,吓懵了,都忘记自己还抓着他的衣领。小偷往她手上割了一刀,她当时感觉麻麻的,没有放手,又割了两刀,没有用,一刀捅在手臂。邓树花没有力气了,就拉不住小偷,摔到在地上,小偷逃走了,这是邓树花大叫抓小偷,几个在附近的酒吧门口的人发现了,两个送邓树花去了医院,三个追小偷去了(他们说女人都抓小偷,我们怎么能不追呢),追了一阵,前面也有人拦住小偷,小偷拿刀示威,同时求饶,要他们放了他,此时围住他的人说:你如果就是偷东西还罢了,还拿刀伤人,一定不能放,最后搏斗,抓住小偷,一人负伤。
我和lp看了觉得好玩,这位女英雄很真实,很有趣。
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.13204052.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(114) | 
评论 (0) | 
编辑 收藏
			     摘要:  
 DHTML,Table标签,固定行头,固定列头列 
 
<html>
<head> 
<!--固定行列头,曲滨200608-->
<style type="text/css"> 
<!-- 
body,table, td, a { 
font:9pt; 
} 
 
/...  
阅读全文
			posted @ 
2009-05-01 10:52 huohuo 阅读(418) | 
评论 (0) | 
编辑 收藏
最近刚结婚,我妈来了,丈母娘来了,这几天,发现自己很傻。以前以为我妈是很直爽的人,最近也发现妈妈也是有点精明的。岳母更是非常了得的人。 老婆一直以为岳父已经比较糊涂,头脑不清楚,岳母也不是那么精明了。这次来了,才知道,岳父其实也很精的。我们年轻一代,其实不如他们,具体事情就不说了。(老婆说,我这口气,好像是以前认为比他们精明,其实老婆以为岳父母糊涂,就是自己以为自己清楚)。
具体事情就不说了,记录以下以前看到的一个段子
 
My Father 
When I was:
Four years old: My daddy can do anything.
Five years old: My daddy knows a whole lot.
Six years old: My dad is smarter than your dad.
Eight years old: My dad doesn't know exactly everything.
Ten years old: In the olden days, when my dad grew up, things were sure different.
Twelve years old: Oh, well, naturally, Dad doesn't know anything about that. He is too old to remember his childhood.
Fourteen years old: Don't pay any attention to my dad. He is so old-fashioned.
Twenty-one years old: Him? My Lord, he's hopelessly out of date.
Twenty-five years old: Dad knows about it, but then he should, because he has been around so long.
Thirty years old: Maybe we should ask Dad what he thinks. After all, he's had a lot of experience.
Thirty-five years old: I'm not doing a single thing until I talk to Dad.
Forty years old: I wonder how Dad would have handled it. He was so wise.
Fifty years old: I'd give anything if Dad were here now so I could talk this over with him. Too bad I didn't appreciate how smart he was. I could have learned a lot from him.
Writer Unknown 
中文翻译:
我的爸爸
当我四岁的时候:爸爸可以做任何事。
当我五岁的时候:爸爸知道的很多。
当我六岁的时候:我爸爸比你爸爸聪明。
当我八岁的时候:爸爸并不是知道每一件事。
当我十岁的时候:在爸爸成长的旧日里,事情和现在完全不同。
当我十二岁的时候:哦,很显然,爸爸对于那件事什么也不知道。他太老了,回忆不起自己的童年了。
当我十四岁的时候:别管我爸爸。他太守旧了。
当我二十一岁的时候:他?上帝,他是无可救药地过时了。
当我二十五岁的时候:爸爸对此了解,但是这是他应该了解的,因为他已经经历了这么多。
当我三十岁的时候:也许我们该问问爸爸他是怎么想的。毕竟他有很多经验。
当我三十五岁的时候:除非我和爸爸谈谈,否则我不能做任何事。
当我四十岁的时候:我想知道爸爸会怎样处理这件事。他是如此明智。
当我五十岁的时候:如果爸爸在这,我会把所有的东西都给他。太遗憾了,我没有意识到他是多么明智。我本来能从他身上学到更多
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.13391801.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(122) | 
评论 (0) | 
编辑 收藏
最近做性能测试,使用jprofile + microsoft web stress tool  测tomcat上的网页.
做了个网页例子,和.net对比速度,发现速度比不过.net
 
用jprofile 跟踪多并发情况,发现在 
bean:write 在写整数和日期类型时,会找格式,并且从properties中找不同语言版本的格式.于是会访问
WriteTag.retrieveFormatString
  TagUtils.getInstance().message
       PropertyMessageResource.getMessage(Locale locale, String key) 
 
PropertyMessageResource.getMessage(Locale locale, String key) 中有个synchronized 块,这里导致了代码的等待时间过长.
    
文章来源:
http://stocknewbie.bokee.com/viewdiary.15201750.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(164) | 
评论 (0) | 
编辑 收藏
<?xml version="1.0" encoding="UTF-8"?>
<project name="cobertura.examples.basic" default="coverage" basedir=".">
 <description>
    Cobertura - http://cobertura.sourceforge.net/
    Copyright (C) 2003 jcoverage ltd.
    Copyright (C) 2005 Mark Doliner <thekingant@users.sourceforge.net>
    Cobertura is licensed under the GNU General Public License
    Cobertura comes with ABSOLUTELY NO WARRANTY
    </description>
 
 <property name="build.dir" value="${basedir}/build"/>
 <!-- 需要测试的代码生成的代码路径-->
 <property name="classes.dir" value="${build.dir}/classes"/>
 <!-- 为需要测试的代码生成的对应的测量类,用于测量覆盖率-->
 <property name="instrumented.dir" value="${build.dir}/instrumented-classes"/>
 
 <!-- 单元测试的代码,这部分代码不生成覆盖率数据,因此和待测试代码要分开-->
 <property name="test.classes.dir" value="${build.dir}/test-classes"/>
 
 <!-- 所有报告的路径-->
 <property name="reports.dir" value="${build.dir}/reports"/>
 <!-- junit 生成两种测试报告的路径,xml和html-->
 <property name="reports.xml.dir" value="${reports.dir}/junit-xml"/>
 <property name="reports.html.dir" value="${reports.dir}/junit-html"/>
 
 <!-- cobertura生成的两种测试覆盖吕的报告,xml和html-->
 <property name="coverage.xml.dir" value="${reports.dir}/cobertura-xml"/>
 <property name="coverage.html.dir" value="${reports.dir}/cobertura-html"/>
 
 
 <property name="src.dir" value="${basedir}/src" />
 <!--测试代码的路径-->
 <property name="test.dir" value="${basedir}/test" />
 
 <path id="cobertura.classpath">
  <fileset dir="${basedir}">
   <include name="lib/unittest/*.jar" />
  </fileset>
 </path>
 <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
 <target name="init">
  <mkdir dir="${build.dir}" />
  <mkdir dir="${classes.dir}" />
  <mkdir dir="${test.classes.dir}" />
  <mkdir dir="${instrumented.dir}" />
  <mkdir dir="${reports.xml.dir}" />
  <mkdir dir="${reports.html.dir}" />
  <mkdir dir="${coverage.xml.dir}" />
  <mkdir dir="${coverage.html.dir}" />
 </target>
 <target name="compile" depends="init">
  <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="yes">
   <classpath refid="cobertura.classpath" />
  </javac>
 </target>
 
 
 <target name="compiletest" depends="compile">
  <javac srcdir="${test.dir}" destdir="${test.classes.dir}" debug="yes">
   <classpath location="${classes.dir}"/>
   <classpath refid="cobertura.classpath" />
  </javac>
 </target>
 <target name="instrument" depends="init,compile">
  <!--
   Remove the coverage data file and any old instrumentation.
  -->
  <delete file="cobertura.ser"/>
  <delete dir="${instrumented.dir}" />
  <!--
   Instrument the application classes, writing the
   instrumented classes into ${build.instrumented.dir}.
  -->
  <cobertura-instrument todir="${instrumented.dir}">
   <!--
    The following line causes instrument to ignore any
    source line containing a reference to log4j, for the
    purposes of coverage reporting.
   -->
   <ignore regex="org.apache.log4j.*" />
   <fileset dir="${classes.dir}">
    <!--
     Instrument all the application classes, but
     don't instrument the test classes.
    -->
    <include name="**/*.class" />
    <exclude name="**/*Test.class" />
   </fileset>
  </cobertura-instrument>
 </target>
 <target name="test" depends="init,compiletest">
  <junit fork="yes" dir="${basedir}" haltonerror="no" failureProperty="test.failed">
   <!--
    Note the classpath order: instrumented classes are before the
    original (uninstrumented) classes.  This is important.
   -->
   <classpath location="${instrumented.dir}" />
   <classpath location="${classes.dir}" />
   <classpath location="${test.classes.dir}" />
   <!--
    The instrumented classes reference classes used by the
    Cobertura runtime, so Cobertura and its dependencies
    must be on your classpath.
   -->
   <classpath refid="cobertura.classpath" />
   <formatter type="xml" />
   <test name="${testcase}" todir="${reports.xml.dir}" if="testcase" />
   <batchtest todir="${reports.xml.dir}" unless="testcase">
    <fileset dir="${test.dir}">
     <include name="**/*Test.java" />
    </fileset>
   </batchtest>
  </junit>
  <junitreport >
   <fileset dir="${reports.xml.dir}">
    <include name="TEST-*.xml" />
   </fileset>
   <report format="frames" todir="${reports.html.dir}" />
  </junitreport>
 </target>
 <target name="coverage-check">
  <cobertura-check branchrate="34" totallinerate="100" />
 </target>
 <target name="coverage-report">
  <!--
   Generate an XML file containing the coverage data using
   the "srcdir" attribute.
  -->
  <cobertura-report srcdir="${src.dir}" destdir="${coverage.xml.dir}" format="xml" />
 </target>
 <target name="alternate-coverage-report">
  <!--
   Generate a series of HTML files containing the coverage
   data in a user-readable form using nested source filesets.
  -->
  <cobertura-report destdir="${coverage.html.dir}">
   <fileset dir="${src.dir}">
    <include name="**/*.java"/>
   </fileset>
  </cobertura-report>
 </target>
 <target name="clean" description="Remove all files created by the build/test process.">
  <delete dir="${build.dir}" />
  <delete dir="${classes.dir}" />
  <delete dir="${instrumented.dir}" />
  <delete dir="${reports.dir}" />
  <delete file="cobertura.log" />
  <delete file="cobertura.ser" />
 </target>
 <target name="coverage" depends="clean,compile,instrument,test,coverage-report,alternate-coverage-report" description="Compile, instrument ourself, run the tests and generate JUnit and coverage reports."/>
</project>
文章来源:
http://stocknewbie.bokee.com/viewdiary.15201790.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(682) | 
评论 (0) | 
编辑 收藏
select level, d1.dept_id,d1.dept_code,sys_connect_by_path(dept_code,'/') path from zte_fbp_depts d1
start with  d1.dept_id=12
connect by prior d1.dept_id= d1.parent_dept_id
文章来源:
http://stocknewbie.bokee.com/viewdiary.16533973.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(155) | 
评论 (0) | 
编辑 收藏
性能测试经验总结
1.要有信心
2.要有稳定,干净的环境,要停掉服务器上不必要的进程和服务
3.要在检查资源是否正常释放了,
内存是否存在泄漏,内存的不断增长,也会影响请求的相应时间
数据库连接是否在使用后得到释放.
可以查看对象的分配状况
要检查查询的时候是将所有的数据查出来了还是只查了一页数据
4.连接池的配置,可以分配足够初始连接,同时配置没有连接时的等待时间,要保证始终是取到连接的
免得测出的是假相.
给出一个配置的例子
 <bean id="dataSource" class="com.zte.platform.db.FolDataSource"
       destroy-method="close">
   <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
 <property name="url" value=""/>
 <property name="username" value=""/>
 <property name="password" value=""/>
   <property name="initialSize" value="50" />
   <property name="maxActive" value="200" />
   <property name="maxWait" value="-1"/>
   <property name="maxIdle" value="100"/>
   <property name="removeAbandoned" value="true"/>
   <property name="removeAbandonedTimeout" value="30000"/> 
   <property name="logAbandoned" value="true"/> 
 </bean>
5 要用profile工具,判断在多并发情况下,时间的分配状况,抓住主要矛盾,解决最影响性能的地方
6.服务器需要配置好,对内存和线程都需要配置.
    tomcat配置
    <Connector
port="8088"               maxHttpHeaderSize="8192"
               maxThreads="100" minSpareThreads="100" maxSpareThreads="450"
               enableLookups="false" redirectPort="8443" acceptCount="300"
               connectionTimeout="20000" disableUploadTimeout="true" />
内存配置:
这次测试只配置了java vm,  -Xms1024M -Xmx1024M
有人推荐这样配置: 
JVM_ARGS= -Xms1408M -Xmx1408M -XX:MaxPermSize=96M -XX:NewSize=500M -XX:MaxNewSize=500M -Xss128k -XX:+UseConcMarkSweepGC -XX:+UseParNewGC 
7.测试脚本中不能带session标识,如http://..../app/perftest.jsp;jsessionid=D68FC8BDDB954F33AD2626D67553EC8E
需要去掉 ;jsessionid=D68FC8BDDB954F33AD2626D67553EC8E ,因为带sessionid会导致测试结果是多个线程访问一个用户的会话.
实际应用中是一个用户一个会话一个线程
8 日志分析,分析日志中出现的异常,异常发生的时候,往往性能会降低,也会引发失败事务.
9. 和其他系统集成了,要先和其他系统分开进行测试,达标一个再集成进来,将问题局部化定位.
10.最好调优人员学会使用 loadrunner测试工具,先自己使用loadrunner测试通过再给测试人员,提高效率
 
 
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.17160571.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(125) | 
评论 (0) | 
编辑 收藏
还缺少一个onchange处理,使用正则表达式的处理方式,
以下是限制文字的输入
<style>
 INPUT.num_text
 {
  imme-mode:disabled;
  onkeydown: expression(onkeydown=function ()
  {
   var   k=window.event.keyCode;   
   if(
   k==46||k==8||k==189||k==109||k==190||k==110|| k>=48 && k<=57
   ||k>=96 && k<=105||k>=37 && k<=40 )
   { 
    return true;
   }
   else if (k==13)
   {
    window.event.keyCode = 9;
    
    return true;
   }
   else{
    
      return false;
   } 
  });
 }
 
</style>
 
<form>
       <input type="text"   class="num_text"  />
     
</form>
文章来源:
http://stocknewbie.bokee.com/viewdiary.18663505.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(132) | 
评论 (0) | 
编辑 收藏
package com.zte.platform;
import java.io.IOException;
import javax.faces.webapp.FacesServlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class ZteFacesServlet extends HttpServlet
{
 private static final String INIT_PARAM_ERROR_PAGE = "errorPage";
        private Log log = LogFactory.getLog(getClass());        
        
 private FacesServlet delegate;
 private String errorPage;
 public void init(ServletConfig servletConfig) throws ServletException
 {
  delegate = new FacesServlet();
  delegate.init(servletConfig);
  errorPage = servletConfig.getInitParameter(INIT_PARAM_ERROR_PAGE);
 }
 public void destroy()
 {
  delegate.destroy();
 }
 public ServletConfig getServletConfig()
 {
  return delegate.getServletConfig();
 }
 public String getServletInfo()
 {
  return delegate.getServletInfo();
 }
 public void service(ServletRequest request, ServletResponse response)
   throws ServletException, IOException
 {
  try
  {
   delegate.service(request, response);
  } catch (Throwable e)
  {
            log.error("page exception ,redirect to error page ",e);
            try{
   redirectToErrorPage((HttpServletRequest) request,
     (HttpServletResponse) response);
            }
            catch(Exception ex)
            {
             log.error("fail to redirect to error page",ex);
             //throw new RuntimeException("fail to redirect to error page,original exceptioin is", e);
            }
  }
 }
 private void redirectToErrorPage(HttpServletRequest request,
   HttpServletResponse response) throws IOException
 {
  if (!"".equals(errorPage))
  {
   response.sendRedirect(request.getContextPath() + errorPage);
  }
 }
}
文章来源:
http://stocknewbie.bokee.com/viewdiary.18876476.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(190) | 
评论 (0) | 
编辑 收藏divHtml = divHtml + "<iframe src='about:blank' style='position:absolute;top:0px;left:0px; visibility:inherit;  width:190px;height:232px;z-index:-1; scrolling='no' frameborder='0' filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';'></iframe>"
  
document.all.myDiv.innerHTML = divHtml;
 
这种方式有个问题,就是width和height写死了,
如果div自身设置了width和height,可以将iframe的width,height设置成100%
divHtml = divHtml + "<iframe src='about:blank' style='position:absolute;top:0px;left:0px; visibility:inherit;  width:100%;height:100%;z-index:-1; scrolling='no' frameborder='0' filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';'></iframe>"
文章来源:
http://stocknewbie.bokee.com/viewdiary.18876477.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(245) | 
评论 (0) | 
编辑 收藏
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.PushbackInputStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class UtfTool
{
    /**
     * ant 编译之后的result文件,注意要编译提示错误的文件名要在同一行
     * 可以设置命令提示窗口的缓冲区大小实现
     * @param resultFileName
     */
    public static Set getFileNamesFromCompileResult(String resultFileName)
     throws java.io.IOException
    {
 Set<String> set = new HashSet();
 BufferedReader reader = new BufferedReader(new FileReader(
  resultFileName));
 String start = "[javac] ";
 int startLen = start.length();
 String end = ".java:";
 int endLen = end.length();
 
 String errMsg = "\\65279";
 while (reader.ready())
 {
     String line = reader.readLine();
     int indexStart = line.indexOf(start);
     
     if(line.indexOf(errMsg) == -1)
     {
  continue;
     }
     if (indexStart != -1)
     {
  int indexEnd = line.indexOf(end);
  if (indexEnd != -1)
  {
      String name = line.substring(indexStart + startLen,
       indexEnd + endLen - 1);
      set.add(name.trim());
  }
     }
 }
 return set;
    }
    
    /**
     * 读取流中前面的字符,看是否有bom,如果有bom,将bom头先读掉丢弃
     * @param in
     * @return
     * @throws IOException
     */
    public static InputStream getInputStream(InputStream in) throws IOException
    {
 PushbackInputStream testin = new PushbackInputStream(in);
 int ch = testin.read();
 if (ch != 0xEF)
 {
     testin.unread(ch);
 } else if ((ch = testin.read()) != 0xBB)
 {
     testin.unread(ch);
     testin.unread(0xef);
 } else if ((ch = testin.read()) != 0xBF)
 {
     throw new IOException("错误的UTF-8格式文件");
 } else
 {
     //不需要做,这里是bom头被读完了
    //// System.out.println("still exist bom");
 }
 return testin;
    }
    
    
    
    /**
     * 根据一个文件名,读取完文件,干掉bom头。
     * @param fileName
     * @throws IOException
     */
    public static void trimBom(String fileName) throws IOException
    {
 FileInputStream fin = new FileInputStream(fileName);
 //开始写临时文件
 InputStream in = getInputStream(fin);
 String tmpFileName = fileName + ".tmp";
 FileOutputStream out = new FileOutputStream(tmpFileName);
 byte b[] = new byte[4096];
 int len = 0;
 while (in.available() > 0)
 {
     len = in.read(b, 0, 4096);
     out.write(b, 0, len);
 }
 in.close();
 fin.close();
 out.close();
 //临时文件写完,开始将临时文件写回本文件。
 in = new FileInputStream(tmpFileName);
 System.out.println("[" + fileName + "]");
 out = new FileOutputStream(fileName);
 while (in.available() > 0)
 {
     len = in.read(b, 0, 4096);
     out.write(b, 0, len);
 }
 in.close();
 out.close();
    }
    /**
     * 根据ant编译错误来去除bom
     * @param resultFile
     * @throws IOException
     */
    static void trimBomByCompileResult(String resultFile) throws IOException
    {
 Set<String> set = getFileNamesFromCompileResult(resultFile);
 for (String fName : set)
 {
     trimBom(fName);
 }
    }
    public static void main(String[] args) throws IOException
    {
 trimBomByCompileResult("c:/result3.txt");
 
 ///List<String> list = getFileNamesFromCompileResult(resultFile);
// InputStream in = new FileInputStream(
//  "D:/cc/SSB_SRC_DEV_lijinglin2/TP_SSB/SSB_CJ203_Component/ProductCode/com/zte/ssb/component/access/implementation/dao/ImplementationDAO.java");
// getInputStream2(in);
// in.close();
    }
}
文章来源:
http://stocknewbie.bokee.com/viewdiary.22061282.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(1870) | 
评论 (0) | 
编辑 收藏执行sql
select  o.name,cl.name,cm.text from sysobjects o,syscolumns cl, syscomments cm
 where o.id = cl.id and cl.cdefault = cm.id  and o.type='U'
  and o.name='test2' and cl.name like 'col%'
 
test2是标明, col%是列名通配符, 'U' 表示表格是用户表
 
返回结果:
 
name                           name                           text                                                                                                                                                                                                                                                            
----                           ----                           ----                                                                                                                                                                                                                                                            
test2                          col1                           DEFAULT (0)                                                                                                                                                                                                                                                     
test2                          col2                           DEFAULT  2                                                                                                                                                                                                                                                      
test2                          col3                           DEFAULT  getdate()            
 
 
syscolumns 中 id 表示对应的表格在sysobjects中id, cdefault表示在syscomments中的缺省值注释id
 
 
缺省值可能会出现函数, 例如  default getdate(),
所以我觉得应该这个缺省值可以剥离掉default, 如果使用hibernate实现,还只能用dynamic insert,dynamic update.
 
 
文章来源:
http://stocknewbie.bokee.com/viewdiary.31463433.html
			posted @ 
2009-05-01 10:52 huohuo 阅读(499) | 
评论 (0) | 
编辑 收藏