摘要: Solution for: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Posted by:Ibrahim Assaab()Date: June 07, 2008 02:00AMH... 阅读全文
posted @ 2014-05-18 19:39 crazywings 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 清除缓存geronimo -vvv -c runargs for debug, jpda run, jpda start, run and start commands: -q --quiet No startup progress -l --long ... 阅读全文
posted @ 2014-04-23 22:59 crazywings 阅读(328) 评论(0) 推荐(0) 编辑
摘要: I'm assuming it looks something like:http\://localhost\:8080/plugin/maven-repo/=system\={Simple}nullIf you change to be:http\://localhost\:8080/plugin... 阅读全文
posted @ 2014-04-23 19:49 crazywings 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: Design PatternsGoF PatternsCreationalAbstract factoryBuilderFactory methodPrototypeSingletonStructuralAdapterBridgeCompositeDecoratorFacadeFlyweightProxyBehavioralChain of responsibilityCommandInterpreterIteratorMediatorMementoObserverStateStrategyTemplate methodVisitorConcurrency PatternsActive obj 阅读全文
posted @ 2014-04-02 11:27 crazywings 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Function coverage – has each function been tested?Statement coverage – has each node in the program been executed?Decision coverage – has each edge in the program been executed? (IF and CASE statements)Condition coverage – has each Boolean sub-expression evaluated both to true and false?Parameter va 阅读全文
posted @ 2014-04-01 22:12 crazywings 阅读(171) 评论(0) 推荐(1) 编辑
摘要: 步入平民化:谈智能家居五大实用功能智能家居又称智能住宅,是以住宅为平台,利用先进的计算机、嵌入式系统和网络通讯技术,将家中的各种设备,包括照明系统、环境控制系统、网络家电等通过家庭网络连接到一起,构建高效的住宅设施与家庭日程事务的管理系统。 智能家居又称智能住宅,是以住宅为平台,利用先进的计算机、嵌入式系统和网络通讯技术,将家中的各种设备,包括照明系统、环境控制系统、网络家电等通过家庭网络连接到一起,构建高效的住宅设施与家庭日程事务的管理系统。 智能家居日趋平民化 在某建材广场,笔者走访了一位正打算装修的房客,她当即表示,由于新房子的空间很小,所以想通过全面房屋智能化操控来提高房子的空间... 阅读全文
posted @ 2013-10-07 01:09 crazywings 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 先看官方的doc说明:Object org.eclipse.core.runtime.IAdaptable.getAdapter(Class adapter)Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.Parameters:adapter the adapter class to look upReturns:a object castable to the given clas 阅读全文
posted @ 2013-08-13 16:56 crazywings 阅读(714) 评论(0) 推荐(0) 编辑
摘要: 问题:当运行Eclipse的plugin去加载workspace的类时,是加载不到的,除非使用JavaProject的Classloader。We want here to define a class loader for our Eclipse plugin that uses the project class loader to load any given class.解决:1.通过Project去加载List javaProjects = new ArrayList();IProject[] projects = ResourcesPlugin.getWorkspace().get 阅读全文
posted @ 2013-07-24 14:58 crazywings 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 抽象工厂:生产多个抽象产品,即形成了抽象产品族,则需要抽象多个抽象方法,如果把“一个抽象产品和一个抽象方法”当做一个“工厂方法”理解,则这样就形成了抽象的工厂,工厂中都是抽象的,无业务逻辑。 每需要一个新的产品族的时候,扩展具体类即可。 缺点:只能生产产品族,,产品族是固定的,即无法添加新产品。工厂方法:目的是生产一个仅且一个抽象产品,生产的细节由其派生类去实现。 但是在细节上,包含了具体的业务逻辑,即非抽象的方法存在,只有一个“抽象方法”,顾名思义“工厂方法”,一个抽象的“方法”当做“工厂”用。 每需要创建一个有且只有一个新的对象时候,扩展即可。 ... 阅读全文
posted @ 2013-07-21 10:19 crazywings 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 对一个List的模型,例如Class A聚合List B,对B的crud操作可以委托给A去完成,这是基本的模型。但是仔细看会发现,如果有相同的类型List C出现,则将重复B的操作,所以此刻需要将B,C抽象出一个ListModel。然后A聚合ListModel类型的B,C,让B,C共享代码。这样有神马意义?举个例子,如果B在执行CRUD后需要触发事件,则该事件在A中触发,可能与A有紧耦合的关系,但是A没有必要关心B的其他操作,它本来的目的只是单纯的通过A的接口在添加或删除B的元素。抽象的意思:1.让使用者对其操作细节透明。2.共享代码。这样提高了内聚降低了耦合。 阅读全文
posted @ 2013-07-17 15:13 crazywings 阅读(238) 评论(0) 推荐(0) 编辑