每日一记

来源:互联网 发布:淳中科技矩阵 编辑:程序博客网 时间:2024/04/28 10:46
 1.收编代码的环境抛出了一个异常:
org.hibernate.exception.SQLGrammarException: could not execute query
定位了半天才知道,原来是数据库的表,与hibernate配置的字段对应不上,在此记下避免以后再遇到这个问题。

2.Java的properties配置文件key值既然也可以设置成中文,太强大了:

config.properties
=
 
 native2ascii config.properties config2.properties 
\u952e=\u503c
 
InputStream in = this.getClass().getResourceAsStream("config2.properties");
Properties p = new Properties();
p.load(in);
System.out.println(p.getProperty(""));







 

3.IE浏览器下,作为HTML某个标签如背景图片,图片的命名不能包含中文,因为包含中文图片就展示不出来了。

4.js判断图片是否存在:
function CheckImgExists(imgurl
    var ImgObj = new Image(); 
    // 
    ImgObj.src = imgurl; 
    if (ImgObj.fileSize > 0 || (ImgObj.width > 0 && ImgObj.height > 0)) 
    { 
        return true
    } 
    else 
    { 
        return false;
    }   
}
 


 

 



0 0