设计模式(转载) 自己写代码,基本是面向过程的,换句话说,就是直接实现工程,不会考虑什么借口啊,对象啊,的东西。。。所以对设计模式,也了解不了太深,简单的列出23种模式及简介。 面向对象实际上就两句话:一是松耦合(Coupling),二是高内聚(Cohesion)。面向对象系统追求的目标就是尽可能地...
                            
                            
                                分类:
其他好文   时间:
2015-05-26 21:12:53   
                                阅读次数:
113
                             
                    
                        
                            
                            
                                责任链模式的英文是:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain util an...
                            
                            
                                分类:
其他好文   时间:
2015-05-22 09:48:07   
                                阅读次数:
359
                             
                    
                        
                            
                            
                                1.获取   acquire
2.取样   sample
3.峰值检测  peak detect
4.方波和脉冲  square waves and pulse
5.耦合  coupling
6.粗调/细调  coarse/fine
7.探头衰减系数   probe attenuation factor
8.反相   invert
9.光轴(最大发光强度中心)   optical ...
                            
                            
                                分类:
其他好文   时间:
2015-02-28 10:16:37   
                                阅读次数:
178
                             
                    
                        
                            
                            
                                一般模块之间可能的连接方式有七种,构成耦合性的七种类型。它们之间的关系为(由弱到强)非直接耦合(Nondirect Coupling) 如果两个模块之间没有直接关系,它们之间的联系完全是通过主模块的控制和调用来实现的,这就是非直接耦合。这种耦合的模块独立性最强。 。数据耦合(Data Couplin...
                            
                            
                                分类:
其他好文   时间:
2014-11-05 16:59:56   
                                阅读次数:
227
                             
                    
                        
                            
                            
                                当函数的参数有多个时(比如多于4个),可以考虑将这些参数组织放入一个class(struct),然后函数参数就减少为一个。 1.以class instance来穿参数,可以很容易在各个函数之间传递参数,能减少代码量。 2.如果增加或减少参数,只要修改class的定义即可,函数signature不.....
                            
                            
                                分类:
其他好文   时间:
2014-10-28 12:08:35   
                                阅读次数:
187
                             
                    
                        
                            
                            
                                1 结对编程 1.1 结对编程的优缺点 1.2 结对伙伴的优缺点2 Information Hiding, interface design, loose coupling 2.1 Information Hiding 2.2 interface design 2.3 loose coup...
                            
                            
                                分类:
其他好文   时间:
2014-10-17 23:09:50   
                                阅读次数:
310
                             
                    
                        
                            
                            
                                一,callback 回调函数即函数f1和函数f2的关系是f1(f2());f2作为f1()的回调函数,在f1执行过程中就开始执行f2,先执行线程的主要逻辑,将比较耗时的任务放在后面执行。回调函数的优点是简单、容易理解和部署缺点是不利于代码的阅读和维护,各个部分之间高度耦合(Coupling),流程...
                            
                            
                                分类:
编程语言   时间:
2014-10-13 17:42:09   
                                阅读次数:
170
                             
                    
                        
                            
                            
                                CAE.NPV.Scheduler.v4.22.250.0 1CD CSI Bridge 2015 v17.0.0.1083 1CD CSI SAP2000 v17.0.0.1083 1CD Ensoft LPILE 2013 v7.07 Win32 1CD Ensoft Shaft 2012 v....
                            
                            
                                分类:
其他好文   时间:
2014-08-30 11:05:29   
                                阅读次数:
264
                             
                    
                        
                            
                            
                                1.绘制箭头的三种方式
  // Drawing code
//    CGContextRef con = UIGraphicsGetCurrentContext();
//    //draw a black(by default) vertical line,the shaft of the arrow  箭杆
//    CGContextMoveToPoint(con, 100, 10...
                            
                            
                         
                    
                        
                            
                            
                                Chain of Responsibility in the Real WorldThe idea of the Chain Of Responsibility is that it avoids coupling the sender of the request to the receiver,...
                            
                            
                                分类:
其他好文   时间:
2014-07-18 08:36:38   
                                阅读次数:
294