12 2012 档案
摘要:windows>preferences>myeclipse>files and edtitors>xml>xmlcatalog 点add,在出现的窗口中的Key Type中选择URI,在location中选File syetem,然后在spring解压目录中的dist/resources目录中选择spring-beans-2.5.xsd,回到设置窗口时不要着急关闭窗口,应把窗口中的Key Type改为Schema location,Key改为http://www.springframework.org/schema/beans/spring-beans-2.5.x
阅读全文
摘要:提问:我刚学hibernate里面讲了双向关联,我设计了表student 字段id,name,teacherid,teacher表字段id,name,studentid teacherid关联teacher的id,studentid关联student表的id,然后我想插入其中一张表的时候,无法插入数据 报错信息:Cannot add or update a child row: a foreign key constraint fails (`upload/student`, CONSTRAINT `FK_Reference_2` FOREIGN KEY (`teacherid`) REFER
阅读全文
摘要:YCFHQ-9DWCY-DKV88-T2TMH-G7BHP
阅读全文
摘要://jquery验证图片类型与大小实例function validate_edit_logo(a){ var file = $('file').value; if(!/.(gif|jpg|jpeg|png|gif|jpg|png)$/.test(file)){ alert("图片类型必须是.gif,jpeg,jpg,png中的一种") if(a==1){ return false; } }else{ var image = new image(); image.src = file; var height = image.height; var width
阅读全文
摘要:一、在Head中加入 <script src="../lib/js/ajaxfileupload.js" type="text/javascript"></script> <script src="../lib/js/ligerui.expand.js" type="text/javascript"></script>二、Html中的Div代码 <div id="AppendBill_Div" style="display:none
阅读全文
摘要:jquery的插件主要分为三类:1、封装对象方法的插件:大部分插件都是封装对象的插件2、封装全局函数的插件:将独立的函数添加到jquery的命名空间之下。Jquery.ajax()和jquery.trim()就是jquery内部作为全局函数的插件添加到内核上去的。3、选择器插件:扩充自己喜欢的一些选择器。编写Jquery插件的基本要点:、一般命名的时候最好是按照jquery.[插件名].js命名。、所有的对象都应当附加到jquery.fn对象上,所有的全局函数应该附加到jquery对象本身上、通过this.each()来便利对象,这里的this指向的是当前选择器通过选择器获取的jquery对象
阅读全文
摘要:这其实是对3个问题的补充。定义一个接口IFoo,既不支持协变,也不支持逆变。interfaceIFoo<T>{voidMethod1(Tparam);TMethod2();}实现接口IFoopublicclassFooClass<T>:IFoo<T>{publicvoidMethod1(Tparam){Console.WriteLine(default(T));}publicTMethod2(){returndefault(T);}}定义一个接口IBar支持对参数T的协变interfaceIBar<outT>{TMethod();}实现接口IBa
阅读全文
摘要:“TParent不能安全转换成TSub”,是这两个问题的共同原因。我们定义一个接口IFoo。interfaceIFoo<T>{voidMethod1(Tparam);TMethod2();}我们看一下协变的过程:IFoo<TSub>转换成IFoo<TParent>。Method1:将TSub替换成TParent,Method1显然存在 TParent到TSub的转换。Method2:返回值类型从TSub换成了TParent,是类型安全的。所以支持协变的参数只能用在方法的返回值中。 再看一下逆变的过程:IFoo<TParent>转换成IFoo<
阅读全文
浙公网安备 33010602011771号