一、什么是设计模式
设计模式:设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。由此可见,设计模式不是代码复用而是经验复用。是代码设计的经验总结。
设计模式的六大原则:【单一职责、里氏替换、依赖倒置、接口隔离、迪米特法则、开闭】
23中常用的设计模式:
【单例模式、工厂模式、抽象工厂模式、模板模式、代理模式、建造者模式、原型模式、中...
分类:
其他好文 时间:
2015-04-15 19:34:00
阅读次数:
148
https://leetcode.com/problems/min-stack/Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Pu...
分类:
其他好文 时间:
2015-04-15 16:44:16
阅读次数:
126
Count Color
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 37647
Accepted: 11315
Description
Chosen Problem Solving and Program design as an optional cour...
分类:
其他好文 时间:
2015-04-14 19:42:17
阅读次数:
119
MM01建立缺省值,如圖:2、字段狀態的組合控制 a、字段狀態的優先級,由高往低 HIDE diaplay reqd entry opt. entryb、字段狀態五個組合 行業領域 M 工廠關聯字段 0001 事務代碼(mm02/mm01/mm03) 採購類型(E OR F) 物料類型 (...
分类:
其他好文 时间:
2015-04-14 19:41:06
阅读次数:
153
In programming language design, a first-class citizen (also object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other ent...
分类:
其他好文 时间:
2015-04-14 13:07:03
阅读次数:
395
“内容策略”,“移动优先”,“响应式设计”,“原子设计”等设计思想和技术的根源。这些概念最早其实是由luke wroblewski,brad frost等人在同一个设计思想框架下提出的。笔者经“面向未来的友好设计(Future Friendly Web Design)”设计理念联合创始人Jason ...
分类:
其他好文 时间:
2015-04-14 12:35:18
阅读次数:
231
http://www.cnblogs.com/edaplayer/p/3678897.html以前在学校初学fpga的时候碰到sdram就搞不定了,现在突然发现网上有好多现成的代码,友晶的,altera有个Mobile_DRAM_Altera_MAX_II_CPLD_Design_Example版本...
分类:
其他好文 时间:
2015-04-14 08:24:52
阅读次数:
271
题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find themaximum profit. You may complete...
分类:
其他好文 时间:
2015-04-13 16:09:05
阅读次数:
121
我们接着讨论设计模式,上篇文章我讲完了5种创建型模式,这章开始,我将讲下7种结构型模式:适配器模式、装饰模式、代理模式、外观模式、桥接模式、组合模式、享元模式。其中对象的适配器模式是各种模式的起源,我们看下面的图:6、适配器模式适配器模式将某个类的接口转换成客户端期望的另一个接口表示,目的是消除由于...
分类:
其他好文 时间:
2015-04-13 16:08:25
阅读次数:
146
先来张图,看看这11中模式的关系:第一类:通过父类与子类的关系进行实现。第二类:两个类之间。第三类:类的状态。第四类:通过中间类父类与子类关系13、策略模式(strategy)策略模式定义了一系列算法,并将每个算法封装起来,使他们可以相互替换,且算法的变化不会影响到使用算法的客户。需要设计一个接口,...
分类:
其他好文 时间:
2015-04-13 16:02:31
阅读次数:
225