var inputArray = document.getElementsByTagName("input"); var strArray = []; ; i < inputArray.length; i++) { inputArray[i].index = i; strArray.push(inputArray[i].value); inputArray[i].onfocus = function () { if (strArray[this.index] == inputAr…
import java.beans.PropertyDescriptor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.sql.Timestamp; class Person { private String name; private int age; private Timestamp birth; public Timestamp getBirth() { return birth…
当变量为'',false,null,undefined,0,NaN时,返回默认值 var a='' a || 'hello world'   "hello world" var a=false a || 'ccc' "ccc" var a=null a || 'ccc' "ccc" var a=undefined a || 'ccc' "ccc"   0 || 'ccc'  "ccc"  NaN || 'c…
SQLServer判断指定列的默认值是否存在,并修改默认值 2008年10月21日 星期二 下午 12:08 if exists(select A.name as DefaultName,B.name as TableName from sysobjects A inner join sysobjects B on A.parent_obj = B.id where A.xtype = 'D' and B.xtype = 'U' and B.name = 'test') --在SQLserver…
格式为: NVL( string1, replace_with) 功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值. 引申一下,此NVL的作用与SQLserver 中的 ISNULL( string1, replace_with) 一样. 注意事项:string1和replace_with必须为同一数据类型,除非显式的使用TO_CHAR函数. 例:NVL(TO_CHAR(numeric_column), 'some string') 其…
参考文档:https://blog.csdn.net/lulidaitian/article/details/70941769 springMVC+mybatis查询数据,返回resultType=”map”时,如果数据为空的字段,则该字段省略不显示,可以通过添加配置文件,规定查询数据为空是则返回null. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC &…
在前些时间开发中遇到一个问题当flash值<param name="movie" value=""/>为空时,IE版本>=9不会触发domready事件. 代码如下: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/fla…
 <#list pageView.list as msg>      <form name="msgForm" id="msgForm" action="findMsgById.do" method="post">   <tr class="tr3" onMouseOver="this.style.backgroundColor='whitesmoke'"…
用hibernate做数据库插入操作时,在数据库端已经设置了对应列的默认值,但插入的数据一直为null.查找资料发现,原来是hibernate的配置项在作怪. Hibernate允许我们在映射文件里控制insert和update语句的内容.比如在映射文件中<property 元素中的update属性设置成为false,那么这个字段,将不被包括在基本的update语句中,修改的时候,将不包括这个字段了.insert同理.dynamic动态SQL语句的配置也是很常用的.下面介绍配置SQL语句的具体属…
在定义函数的时候,如果函数的参数有默认值,有两种类型的参数,一种是整数,字符串这种不可变类型,另一种是列表这种可变类型,对于第一种情况没有什么特殊的地方,但是对于可变类型,有一个微妙的小陷阱. 可变类型以及小陷阱: # coding=utf-8 def append_item(item, list1=[]): list1.append(item) return list1 print(append_item((1))) # [1] print(append_item((2))) # [1, 2]…