ilusm的博客
ilusm · 共 24 篇文章
Velocity 搭建
网上关于Velocity的资料确实挺多的.我看了好多,就是让velocity跑不起来.感觉就怪了.于是我回头看了下velocity自带的例子.simple. 是war包.于是部署了下,还真跑起来了. 下面把velocity简单说下,希望能节省摸索velocity的时间. 我是在Eclipse3.2+myEclipse 下部署的. 首先 建一个web 项目. 名字 velocityTest. 然后建类,是为了测试elocity如何取类属性值. package com.test; /* * Licensed to the Apache Software Foundation (ASF) unde…
2008-09-19 15:26 · Velocity · 评论(1)
JavaScript:reset object
reset object A reset button on an htm form. A reset button resets all elements in a form to their defaults. 语法 To define a reset button, use standard htm 语法 with the addition of the onClick event handler: <INPUT TYPE="reset" NAME="resetName" VALUE="buttonText" [onClick="handlerText"]> NAME="resetNa…
2008-08-25 10:41 · JavaScript · 评论(0)
JavaScript:referrer property
referrer property Specifies the URL of the calling document when a user clicks a link. 语法 document.referrer Property of document 描述 When a user navigates to a destination document by clicking a link object on a source document, the referrer property contains the URL of the source document. Evaluate…
2008-08-25 10:32 · JavaScript · 评论(0)
JavaScript:random method
random method Returns a pseudo-random number between zero and one. This method is available on Unix platforms only. 语法 Math.random() Method of Math 例子 //Displays a random number between 0 and 1 document.write("The random number is " + Math.random())
2008-08-25 10:31 · JavaScript · 评论(0)
正则表达式使用详解
正则表达式使用详解 简介 简单的说,正则表达式是一种可以用于模式匹配和替换的强有力的工具。其作用如下: 测试字符串的某个模式。例如,可以对一个输入字符串进行测试,看在该字符串是否存在一个电话号码模式或一个信用卡号码模式。这称为数据有效性验证。 替换文本。可以在文档中使用一个正则表达式来标识特定文字,然后可以全部将其删除,或者替换为别的文字。 根据模式匹配从字符串中提取一个子字符串。可以用来在文本或输入字段中查找特定文字。 基本语法 在对正则表达式的功能和作用有了初步的了解之后,我们就来具体看一下正则表达式的语法格式。 正则表达式的形式一般如下: /love/ 其中位于“/”定界符之间的部分就…
2008-08-21 17:51 · JavaScript · 评论(0)
JS的正则表达式实例
//校验是否全由数字组成 function isDigit(s){ var patrn=/^[0-9]{1,20}$/; if (!patrn.exec(s)) return false return true } //校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串 function isRegisterUserName(s){ var patrn=/^[a-zA-Z]{1}([a-zA-Z0-9]|[._]){4,19}$/; if (!patrn.exec(s)) return false return true } //校验用户姓名:只能输入1-30个以字母开…
2008-08-21 17:38 · JavaScript · 评论(0)
Java48个关键字速查表
Java语言一共使用了48个保留关键字,他们主要可以分为如下几类。 +访问控制 private 私有, protected 保护, public 共享. +类、方法和变量修饰符 abstract 摘要, class 类, extends 扩允, final 结局, implements 工具, interface 接口, native 本地, new 新, static 静态, synchronized 同步,transient 短暂, volatile 易失. +程序控制语句 break, continue, return, do, while, if, else, for, instan…
2008-08-21 17:29 · Java · 评论(0)
oracle中获得某表中的随机数据记录
大数据集表随机取数据 select * from (select * from table_name sample(10) order by trunc(dbms_random.value(0, 1000))) where rownum = 1; sample(10):含义为检索表中的10%数据 从Oracle8i开始Oracle提供采样表扫描特性 Oracle访问数据的基本方法有: 1.全表扫描 2.采样表扫描 全表扫描(Full table Scan) 全表扫描返回表中所有的记录。 执行全表扫描,Oracle读表中的所有记录,考查每一行是否满足WHERE条件。Oracle顺序的读分配给该…
2008-08-21 17:27 · Oracle · 评论(0)
JavaScript:radio object
radio object A set of radio buttons on an htm form. A set of radio buttons lets the user choose one item from a list. 语法 To define a set of radio buttons, use standard htm 语法 with the addition of the onClick event handler: <INPUT TYPE="radio" NAME="radioName" VALUE="buttonValue" [CHECKED] [onClick=…
2008-07-01 17:28 · JavaScript · 评论(0)
JavaScript控制页面元素显示隐藏
javascript 控制 html元素 显示/隐藏 1。编写js函数 <script type="text/javascript"> function display(id){ var traget=document.getElementById(id); if(traget.style.display=="none") { traget.style.display=""; }else{ traget.style.display="none"; } } </script> 2. 要显示/隐藏的html元素加上 id 属性 <table> <tr id="menu" > <td>控制这个tr…
2008-07-01 17:12 · JavaScript · 评论(0)
JavaScript:radio object:实例1
当然还可以用DWRUtil.getValue("selHotel");取值。在只有一个radio时,那么document.frm.selHotel.checked 值为true或flase,DWRUtil.getValue("selHotel")的值为true或flase,radio的值为document.frm.selHotel.value即true或flase。如果有多个radio时,那么document.frm.selHotel[i].checked 值为true或flase,DWRUtil.getValue("selHotel")的值为document.frm.selHotel[i]…
2008-06-13 16:04 · JavaScript · 评论(0)
JavaScript:window.open()--窗口参数详解!
window.open()方法中,窗口控制参数的详细定义: alwaysLowered innerWidth screenY alwaysRaised left scrollbars channelmode location status dependent menubar titlebar directories outerWidth toolbar fullscreen outerHeight top height menubar width hotkeys resizable z-lock innerHeight screenX alwaysLowered Internet Explo…
2008-06-06 16:52 · JavaScript · 评论(0)
[DEBUG]java.util.ConcurrentModificationException
import java.util.ArrayList; import java.util.Iterator; class User { private String userName, password; private int ID; User(int p_ID, String p_userName, String p_password) { ID = p_ID; userName = p_userName; password = p_password; } } public class Test { static ArrayList al = new ArrayList(); publi…
2008-06-05 09:06 · Java · 评论(0)
Hibernate: No row with the given identifier exists
最简单的原因是ID错误 org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [cn.cedex.srm.model.ShipNoticeOrder#A1093080516094434, ] ... 之前前台给后台传参数时。传了两个ID过去,一个从input中传过去的,一个已参数的形式传过去的。结果webwork后台接收到的ID时 “ID1, ”因此Hibernata查询不到这个ID对应的记录了。
2008-05-29 14:09 · Java · 评论(1)