2014年3月11日
摘要: 1.定义 提供一个创建对象实例的功能,而无需关系其具体实现。被创建实例的类型可以是接口、抽象类,也可以是具体的类。 简单工厂属于创建型模式,不属于23中GOF设计模式,是工厂模式中最简单实用的一种。 2.类图 简单工厂的实质是由一个工厂类通过传入的参数动态的创建... 阅读全文
posted @ 2014-03-11 17:19 爱生活的夜 阅读(133) 评论(0) 推荐(0) 编辑
  2014年3月10日
摘要: $(document).ready(function() { //when the id="top" link is clicked $('#top').click(function() { //scoll the page back to the top $(document).scrollTo(0,500); }}); 阅读全文
posted @ 2014-03-10 09:52 爱生活的夜 阅读(96) 评论(0) 推荐(0) 编辑
  2014年3月6日
摘要: UML中类间关系主要有六种,分别是继承、实现、依赖、关联、聚合、组合 1.继承 继承是指A类继承B类,继承它private除外的所有属性和方法,这种关系是最常见的关系,在java中使用extends表示类的继承关系。 2.实现 实现是指A类实现B接口的方法,在java中使用implements表示类的实现关系。 3.依赖 依赖是指A类使用了B类,而且这种关系是偶然性的、临时性的、非常弱的,但B类的变化会影响A类。 4.关联 关联是类之间或类与接口之间语义级别的强依赖关系,这种关系比依赖更强,不在依赖的偶然性,不是临时性的,一般是长期性的。 5.聚合 ... 阅读全文
posted @ 2014-03-06 10:59 爱生活的夜 阅读(234) 评论(0) 推荐(0) 编辑
  2014年2月28日
摘要: 1.表数据结构如下 select * from test tinsert into test values(1, 'jerry');insert into test values(2, 'jerry');insert into test values(3, 'jerry');insert into test values(4, 'tom');insert into test values(5, 'tom');insert into test values(6, 'jake');insert into 阅读全文
posted @ 2014-02-28 10:39 爱生活的夜 阅读(493) 评论(0) 推荐(0) 编辑
  2014年2月26日
摘要: 1.clientX和clientY clientX和clientY是事件发生时,鼠标离浏览器可视文档区域左上角的位置2.offsetX和offsetY offsetX和offsetY是事件发生时,鼠标离元素右上角的位置 阅读全文
posted @ 2014-02-26 14:35 爱生活的夜 阅读(183) 评论(0) 推荐(0) 编辑
  2014年2月12日
摘要: 阅读全文
posted @ 2014-02-12 16:25 爱生活的夜 阅读(315) 评论(0) 推荐(0) 编辑
  2014年2月11日
摘要: 使用javascript修改title 1.这个在chrome中可以成功,在ie8中报错 我是标题 2.ie8中修改方法: 我是标题 阅读全文
posted @ 2014-02-11 10:31 爱生活的夜 阅读(878) 评论(0) 推荐(0) 编辑
  2014年2月5日
摘要: MySQL Type NameReturn value ofGetColumnClassNameReturned as Java ClassBIT(1)(new in MySQL-5.0)BITjava.lang.BooleanBIT( > 1)(new in MySQL-5.0)BITbyte[]TINYINTTINYINTjava.lang.Booleanif the configuration propertytinyInt1isBitis set totrue(the default) and the storage size is 1, orjava.lang.Integeri 阅读全文
posted @ 2014-02-05 23:06 爱生活的夜 阅读(1576) 评论(0) 推荐(0) 编辑
  2014年1月27日
摘要: 1.什么是单例模式? 保证类仅有一只示例,并提供一个访问它的全局访问点。 2.单例模式类图 3.java 实现 a.饿汉模式 package com.jerry.pattern.singleton;/** * 单例模式 * 饿汉子模式 * @author Jer... 阅读全文
posted @ 2014-01-27 10:54 爱生活的夜 阅读(180) 评论(0) 推荐(0) 编辑
  2014年1月26日
摘要: 1.$.grep的功能是查找过滤功能的数组,原数组不受影响。 2.参数定义 jQuery.grep( array, function(elementOfArray, indexInArray), [ invert ] ) array :用于过滤的数组 function(elementOfArray, indexInArray) :回调函数,用于处理每个元素的比较,elementOfArray是过滤数组的元素,indexInArray是过滤数组元素的下标 invert :如果“invert”为false,或没有提供,函数返回一个所有元素组成的数组对于“callbac... 阅读全文
posted @ 2014-01-26 09:18 爱生活的夜 阅读(246) 评论(0) 推荐(0) 编辑