摘要: Expect是在Tcl基础上创建起来的,它还提供了一些Tcl所没有的命令,它可以用来做一些linux下无法做到交互的一些命令操作,在远程管理方面发挥很大的作用。spawn命令激活一个Unix程序来进行交互式的运行。 send命令向进程发送字符串。expect命令等待进程的某些字符串。 expect支持正规表达式并能同时等待多个字符串,并对每一个字符串执行不同的操作.    使用示例:      ... 阅读全文
posted @ 2010-05-26 16:44 zhwj184 阅读(1502) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0"?><!-- charts/PredefinedAxisStyles.mxml --><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <!--[CDATA[ //导入相关包 import mx.collections.ArrayCollection; import mx.charts.*; import mx.charts.series.items.ColumnSerie 阅读全文
posted @ 2010-03-14 16:05 zhwj184 阅读(276) 评论(0) 推荐(0) 编辑
摘要: <?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="doDraw()" backgroundColor="#d6d4d4" backgroundGradientColors="[#FFFFFF, #FFFFFF]"> < 阅读全文
posted @ 2010-03-11 13:30 zhwj184 阅读(163) 评论(0) 推荐(0) 编辑
摘要: package{ import fl.controls.Button; import fl.controls.TextArea; import flash.display.Sprite; public class test extends Sprite { private var b1:Button; private var b2:Button; private var b3:Button; private var ta:TextArea; publi... 阅读全文
posted @ 2010-03-02 15:38 zhwj184 阅读(185) 评论(0) 推荐(0) 编辑
摘要: google chart使用非常简单,用非常的简单的js代码就能实现很漂亮的常用的图表类型,下面是一个示例,直接保存为html文件,用浏览器打开就能显示图表,使用非常简单。<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title> Google Visu 阅读全文
posted @ 2010-02-28 21:22 zhwj184 阅读(205) 评论(0) 推荐(0) 编辑
摘要: JDK的源码,看看到Integer.ValueOf(int)里面做了什么优化:public static Integer valueOf(int i) { final int offset = 128; if (i >= -128 && i <= 127) { // must cache return IntegerCache.cache[i + offset]; } return new Integer(i);} private static class IntegerCache { private IntegerCache(){} static final In 阅读全文
posted @ 2010-02-22 17:00 zhwj184 阅读(234) 评论(0) 推荐(0) 编辑
摘要: import java.io.IOException;public class ResponseUI extends Thread{ private static volatile double d = 1; public ResponseUI(){ super.setDaemon(true); //设置后台运行 start(); } public void run(){ while(true){ d = d + (Math.E + Math.PI) / d; } } /** * @param args * @throws InterruptedException *... 阅读全文
posted @ 2010-01-18 17:04 zhwj184 阅读(323) 评论(0) 推荐(0) 编辑
摘要: jdk1.4引入了Preferences API,它比对象序列化更接近于持久化,因为它可以自动存取和读取信息。Preferences类似于键值对,存取在一个节点层析结构中,不过它只能存取原始数据类型和字符串,每个字符串的长度不能超过8k。import java.util.prefs.Preferences;public class PreferencesDemo { public static void main(String []args){ Preferences pre = Preferences.userNodeForPackage(PreferencesDemo.class);... 阅读全文
posted @ 2010-01-18 14:43 zhwj184 阅读(145) 评论(0) 推荐(0) 编辑
摘要: ac--输出用户连接时间 access--确定文件是否可以存取访问 ali--list mail aliases apm--查询高级电源管理(APM)BIOS apropos--search the whatis database for strings at-- (batch,atq,atrm)排队、检查或删除以后要执行的作业。 autorun-- 自动装载/卸载CDROMs并在装载后执行/path/to/cdrom/autorun biff--新到邮件提醒 builtins2--bash内建命令 bzip2--(bunzip2)一种块排序文件压缩软件,v0.9.5 cal--显示一个日历 阅读全文
posted @ 2010-01-15 15:01 zhwj184 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1.避免在where子句中对字段施加函数,这样将导致索引失效,比如:select * from user where to_char(create_time,'yyyymmdd')='20090101';原因:在建立index的时候是根据字段来建立的,也就是说oracle在inidex的时候是索引的字段的值,如果提供给oracle的是一个需要经过函数处理的比较,oracle就没办法通过索引中的索引键值来进行相应的比较,所以就不会走到索引上2.避免在SQL中发生隐式类型转换如:select * from user where id='123'; - 阅读全文
posted @ 2010-01-15 13:42 zhwj184 阅读(148) 评论(0) 推荐(0) 编辑