桥接模式(bridge) 定义 将抽象部分与实现部分分离,使它们都可以独立的变化。 UML类图 角色 Bridge模式基于类的最小设计原则,通过使用封装,聚合以及继承等行为来让不同的类承担不同的责任。它的主要特点是把抽象(abstraction)与行为实现(implementation)分离开来,从 ...
分类:
其他好文 时间:
2016-06-27 15:17:24
阅读次数:
207
2iSome years ago I started work on my first CUDA implementation of the Multiparticle Collision Dynamics (MPC) algorithm, a particle-in-cell code used ...
分类:
其他好文 时间:
2016-06-27 10:41:22
阅读次数:
306
#import "ViewController.h"@interface ViewController ()<UITextFieldDelegate>{ UIView * _mainView;}@end@implementation ViewController- (void)viewDidLoad ...
分类:
其他好文 时间:
2016-06-26 22:20:05
阅读次数:
214
界面搭建 创建一个画饼状的类 eatView 集成UIView #import "eatView.h" @implementation eatView // Only override drawRect: if you perform custom drawing. // An empty impl ...
分类:
其他好文 时间:
2016-06-26 21:16:35
阅读次数:
241
在.NET应用程序中,MD5CryptoServiceProvider实例化时,造成This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms异常。意思是MD5Cryp ...
分类:
编程语言 时间:
2016-06-25 12:09:31
阅读次数:
190
java 在java中的interface是‘接口’的意思,而java的类声明用class,即接口用interface声明,类是用class声明,是两个独立的部分。 只有在类声明要实现某个接口时,他们两者才建立了关系,例如: [html] view plaincopyprint? interface ...
分类:
编程语言 时间:
2016-06-24 18:53:48
阅读次数:
185
创建UIButton子类 直接上代码了 .h文件 .m文件 #import "GraphicBtn.h" @implementation GraphicBtn - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame] ...
分类:
移动开发 时间:
2016-06-24 12:16:55
阅读次数:
234
js代码functionparseXML(file) { try { xmlDoc=newActiveXObject("Microsoft.XMLDOM"); }catch(e) { try { xmlDoc=document.implementation.createDocument("","",null); }catch(e) { alert(e.message); return; } } ..
分类:
Web程序 时间:
2016-06-20 18:57:19
阅读次数:
154
当我们使用eclipse新建一个Servlet时,我们到web.xml中配置后有时会出现服务器无法启动的情况 下面我们来看: eg: servlet: ** * Servlet implementation class LogoServlet */@WebServlet("/LogoServlet" ...
分类:
其他好文 时间:
2016-06-20 00:37:01
阅读次数:
220
程序代码: http://www.codeproject.com/Articles/30535/A-Simple-QuadTree-Implementation-in-C 四叉树: 四叉树节点: 数据项,作为T传入: 包围盒接口: 渲染四叉树: 主窗体调用: 运行结果: ...
分类:
其他好文 时间:
2016-06-18 01:23:15
阅读次数:
255