自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(70)
  • 问答 (1)
  • 收藏
  • 关注

原创 struts 命名 bug

今天在魏总的帮忙下找到一个struts 的bugstruts的 action里的 变量 不能用 大小写的class  Class  命名, 例如不能叫lessonclass  或者 lessonClass public class ClassAction extends ActionSupport { private Lesson lesson;//这里不能用lessoncla...

2014-06-16 08:57:58 194

原创 js notes

1 array and object definitionlet's introduce this bit of terminology: defining an array with [] is called array literal notation and defining an object using the curly braces {} is called object lit...

2014-06-14 09:26:00 193

原创 js 控制iframe 自适应高度

<iframe width="300" id="iframetestid" frameborder="0" scrolling="no" src="test.php" onload="setTimeout(function(){reSetIframe('iframetestid');},200);" ></iframe> 

2014-06-13 17:30:47 249

原创 HTML的一些小积累

1.   position:absolute 使用 position:absolute 的元素,如果它的父节点没有使用position:relative的话,它自己的绝对定位就是相对于整个文档的。它的父节点使用position:relative 或者 position:fixed,那么他的绝对定位就是相对于它的父节点的。 2. 让所有字符大写:text-transfor...

2014-06-13 17:20:56 146

js 中 在 拖动时 阻止 click事件

最近在做一个小应用时碰到一个需求是 鼠标可以拖动图片,然后在鼠标单击图片的时候可以放大图片。 这样就碰到一个问题,因为鼠标要实现拖放,鼠标首先是要单击图片然后才开始 拖放。所以拖放和放大功能就会重叠。 要解决这个问题,网上搜到一个解决方法是 设置一个全局变量。  因为拖放时 鼠标的 动作顺序是: a1 鼠标点击(mousedown), a2 鼠标移动(mousemove),...

2012-08-01 16:14:55 1020

原创 PHP, The difference between single and double quotes

Well first of all, single quotes are much more efficient than double quotes, which is shown in the results from a simple test, which you can find here:http://phpbar.isgreat.org/viewtopic.php?f=2&...

2012-07-21 21:19:45 129

Gmail treat sub-domains as spam

今天测试给gmail发送邮件时候,开始总是被gmail列入到spam中, 后来找到他们的文档http://support.google.com/mail/bin/answer.py?hl=en&answer=1366858Phishing scamsSome spammers send fraudulent messages that try to trick you in...

2012-05-13 16:52:09 350

iptv

iptv[/b][b]市场概述[/b][/b][/b]据市场研究公司iSuppli最新发表的研究报告称,2007年,北美IPTV用户达到了120万,比2006年增长了四倍。北美和南美的全部IPTV用户在2007年年底达到了180万,增长率为257%。 这篇报告称,IPTV到目...

2011-06-11 00:43:32 2647

原创 javascript 模态窗口

用jQuery Impromptu调试个模态窗口调到最后ie6居然不能用,真是好看不中用,还是山寨好:   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html ...

2011-02-13 18:10:46 110

struts 标签的定义

 <html:text styleId="sysconfig_form_exgrate" property="exchangeRate" size="6" maxlength="6"/>   styleId 最后就是id 在js中document.getElementById();的参数。

2011-02-13 18:05:36 125

javascript 权威指南 学习笔记3:javascript 作用域

var testvar = 'window属性';var o3 = { testvar:'3', testvar2:'3**', fun:function(){ alert('o3: '+this.testvar);//'obj3' var inner = function(){ alert('o3-inner: '+th...

2011-02-13 18:00:15 104

javascript 权威指南 学习笔记1

 If you attempt to read the value of an undeclared variable, JavaScript will generate an error. If you assign a value to a variable that you have not declared with var, JavaScript will implici...

2011-02-05 23:32:39 209

javascript 权威指南 学习笔记2: Comparison Operators

 Comparison OperatorsThe most commonly used types of relational operators are the comparison operators, which are used to determine the relative order of two values. The comparison operators...

2011-02-05 23:31:41 194

原创 php读取文件

1。php存文件的时候$testfilename2居然是非要单引号才行,要不然用双引号会报错,以后用变量的时候应该多用单引号  $testfilename2='D:\ProgramFiles2\AppServ\www\catch28\admin\testmethod6.html';//文件名,可以为.php或者.txt等文本文件file_put_contents($testfile...

2011-02-05 23:26:46 111

原创 solaris 字符串对比

http://bugzilla.globus.org/globus/show_bug.cgi?id=4929 solaris 和 HPUX 上的== 号不好使 solaris and HPUX:   if [ "$findstr" = "31" -a "$PLATFORM" = "OS/390" ];then 其它linux: if [ "$findstr" == "31&q

2011-02-05 23:25:59 153

javascript 权威指南 学习笔记3:Equality (==) and Identity (===)

5.4.1 Equality (==) and Identity (===)The == and === operators check whether two values are the same, using two different definitions of sameness. Both operators accept operands of...

2011-02-05 23:23:47 304

原创 ant 正则表达式 换行符

SSH上传文件的时候 报错  无法上传文件 可能是因为存在本地的文件所在的文件夹的名称含有非法字符。 今天写ant的正则匹配表达式,由于换行符没有匹配到,加上\r\n就好了,必须两个一起加。 property 文件里是这样的, WASSDK-WinX32-FP0000013.status=youarerightWASEmbeded-WinX32-FP0000013.st...

2011-02-05 23:05:08 331

读取json数据

最近做的东西想要用js直接读取json格式的文件,读取的文件是标准的json格式,所以直接采用eval函数得到数据。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>...

2009-10-15 17:17:49 106

struts 文件上传 乱码

action 代码:   public void savemovieinfo(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // TODO Auto-generated method stub MovieI...

2009-08-12 17:27:19 157

网页控件 上传 文件

使用java程序直接读取硬盘文件上传和使用控件上传其实都是一样的,都是利用 common net 包的FTPClient 等类来上传文件,不同之处就在于如何在客户端获取文件。前一种方式是通过java的流对象来读取文件(InputStream iStream = new FileInputStream(fileName);),而后一种方式要通过程序解析来自客户端的request请求来得到文件流,前一...

2009-08-12 14:36:11 248

ftp 文件上传 无法上传中文名称

代码参考上一篇《ftp文件上传 文件损坏》   client.setControlEncoding("GBK");client.uploadFile("D:\\video_1080p\\1080P\\我们Taxi3_WMVHD_Extr.wmv", "Taxi2_WMVHD_Extract.wmv");  public void setControlEncod...

2009-08-12 14:11:16 517

ftp 文件上传 文件损坏

  这里演示的是配置好ftp服务器后,通过java程序读取硬盘文件上传(相对于通过网页控件<input type="file">获得文件上传)。首先到apache上下载 common net 包,然后参考http://www.iteye.com/topic/139300或者http://www.iteye.com/topic/173786 提供的代码: 具体的操...

2009-08-12 13:35:16 321

myeclipse 安装后会报错 Processing Dirty Regions

我的开发环境:Eclipse 3.3.2 + MyEclipse 6.0.1 + Tomcat 6.0.16,经常报以下错误: An internal error occurred during: "Processing Dirty Regions".org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidationHel...

2009-08-06 23:53:19 139

asm包冲突

配置完ssh后,启动tomcat,发现: 严重: action: nullorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionfactoryid' defined in ServletContext resource [/WEB-IN...

2009-08-06 23:50:09 141

com.mysql.jdbc.exceptions MySQLNonTransientConnectionException

启动工程后,开始运行正常,但运行一段时间访问量稍微变大后控制台会报错: 1. org.hibernate.exception.JDBCConnectionException: could not execute query 2. at org.hibernate.exception.SQLStateConverter.convert(SQLStateC...

2009-08-06 23:43:32 264

GenericObjectPool java.lang.NoClassDefFoundError

启动myeclipse工程后MyEclipse6.0控制台下的错误提示: Exception in thread "main"org.springframework.beans.factory.BeanCreationException: Error creating beanwith name 'dataSource' defined in class path resou...

2009-08-06 23:36:47 128

resin 无法启动 com.caucho.config.LineConfigException:

将项目部署到resin后,发现无法启动:  [00:00:42.536] Server[] starting[00:00:42.536] [00:00:42.536] Windows Vista 6.0 x86[00:00:42.537] Java 10.0-b19, 32, mixed mode, sharing, GB18030, zh, Sun Microsystem...

2009-08-05 13:59:13 438

Eclipse 下 配置 resin 不能有空格

在Eclipse里部署resin的时候不能有空格,否则会报错: unknown argument 'Files\resin3\conf\resin.conf'usage: Resin [-conf resin.conf] [-server id] windows默认安装路径是Program Files,如果把resin安装在这个目录里,直接启动resin是没有问题的,但如果...

2009-08-05 13:05:34 102

hibernate 级联插入

映射文件见上一篇《hibernate 级联删除》   插入时候报错:   org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not insert: [com.hotel.dao.Movie]; uncategorized SQLException for S...

2009-08-05 12:42:07 169

hibernate 级联删除

配置文件和pojo类如下: <?xml version="1.0" encoding="utf-8"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-...

2009-08-04 10:49:30 101

$.getJSON 缓存

使用jQuery的$.getJSON函数似乎是做了缓存处理,比如struts中有一个action是输出的json格式的数据,action路径是getsyncpath: function getResult(){ $.getJSON( getsyncpath,null,function call(data){ var flag_sync = data.r...

2009-07-28 18:12:30 136

jQuery 回调函数 缺少”:” 错误

 使用jQuery官方网站提供的例子无法运行,老是报缺少”:” 不知道是什么原因。   Load JSON data using an HTTP GET request.As of jQuery 1.2, you can load JSON data located on another domain if you specify a JSONPcallback, whic...

2009-07-28 17:47:53 136

Eclipse 3.3.2 + MyEclipse 6.0.1 + Tomcat 6.0.16 Processing Dirty Regions错误

我的Eclipse 3.3.2 + MyEclipse 6.0.1 + Tomcat 6.0.16经常报以下错误:An internal error occurred during: "Processing Dirty Regions".org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidationHelperAn intern...

2009-07-28 17:27:56 137

getJSON函数无反应

使用JSON时在页面上的返回值一定要是json格式的数据,例如一个 Map  返回成 Json格式{“result”,true},如果只是返回true ,jquery的getJSON函数不报任何错误,而且浏览器没有任何反应,javaranch上有一位仁兄也碰到同样的问题:     Josh Nathanson   ...

2009-07-28 17:06:16 339

!DOCTYPE 标签中 Transitional 和 Strict的区别

在项目中使用到JQuery菜单:http://www.i-marco.nl/weblog/jquery-accordion-menu/  在其他的浏览器里菜单没有问题,但在ie6 下面 会出现不停闪动的情况,最后排查原因,居然是头部的问题,用这个(这个是eclipse自动生成的)就不行,<!DOCTYPE HTML PUBLIC "-//W3C//DTDHTML 4....

2009-07-28 15:58:29 135

原创 SCJP 5.0 Study Notes(3)

 Enums <!---->·    <!---->myEnum.valueOf(String) – returns value of corresponding enum value <!---->·    <!---->yourEnum.values() lists all the possible values of yourEnu...

2009-07-03 22:11:43 99

原创 SCJP 5.0 Study Notes(2)

Encapsulation, coupling, cohesion<!---->·    <!---->Good encapsulation promotes loose coupling<!---->·    <!---->Coupling is not used to evaluate classe...

2009-07-03 21:48:32 103

fetch 属性和 property-ref属性

java pojo类和hibernate映射文件分别为: /** * SysRepeaterMng entity. * * @author MyEclipse Persistence Tools */public class SysRepeaterMng implements java.io.Serializable { // Fields /** * ...

2009-06-30 12:55:25 163

org.hibernate.tuple.AbstractEntityTuplizer.createP

hibernate配置文件:   <hibernate-mapping> <class name="com.database.BoxBillMng" table="BOX_BILL_MNG" schema="ZHENGJIANG"> <id name="billId" type="java.lang.Lon

2009-06-30 12:42:26 105

json 乱码解决办法

上周在处理json输出值的时候发现输出的都是乱码,和jsp输出一样,只要在servlet里输出加上 response.setCharacterEncoding("UTF-8"); 即可解决。

2009-06-29 08:38:57 137

空空如也

java 内存问题

2009-07-12

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除