上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: @23种设计模式目录创建型1. Factory Method(工厂方法)2. Abstract Factory(抽象工厂)3. Builder(建造者)4. Prototype(原型)5. Singleton(单例)结构型6. Adapter Class/Object(适配器)7. Bridge(桥... 阅读全文
posted @ 2015-08-06 23:26 何似王 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1,策略模式2,个体模式3,工厂模式4,观察者模式 1 observers[] = $obj;17 }18 public function getExchangeRate()19 {20 return $this->exchange_rate;21 }... 阅读全文
posted @ 2015-08-06 22:59 何似王 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-08-05 11:59 何似王 阅读(176) 评论(0) 推荐(0) 编辑
摘要: example:self.file = www.baidu.com存有baidu站的index.html1 def parseAndGetLinks(self): # parse HTML, save links2 self.parser = HTMLParser(Abst... 阅读全文
posted @ 2015-08-04 23:21 何似王 阅读(588) 评论(0) 推荐(0) 编辑
摘要: @Python pickle模块学习 pickle提供了一个简单的持久化功能。可以将对象以文件的形式存放在磁盘上。------------------------------------------pickle.dump(obj, file[, protocol]) 序列化对象,并将结果数据流... 阅读全文
posted @ 2015-08-01 22:39 何似王 阅读(198) 评论(0) 推荐(0) 编辑
摘要: @python中基于descriptor的一些概念(上)python中基于descriptor的一些概念(上)1. 前言2. 新式类与经典类2.1 内置的object对象2.2 类的方法2.2.1 静态方法2.2.2 类方法2.3 新式类(new-style class)2.3.1 __init__... 阅读全文
posted @ 2015-08-01 22:36 何似王 阅读(223) 评论(0) 推荐(0) 编辑
摘要: @python中基于descriptor的一些概念(下)3. Descriptor介绍3.1 Descriptor代码示例3.2 定义3.3 Descriptor Protocol(协议)3.4 Descriptor调用方法4. 基于Descriptor实现的功能4.1 property4.2 函数... 阅读全文
posted @ 2015-08-01 22:36 何似王 阅读(298) 评论(0) 推荐(0) 编辑
摘要: @python __set__ __get__ 等解释 如果你和我一样,曾经对method和function以及对它们的各种访问方式包括self参数的隐含传递迷惑不解,建议你耐心的看下去。这里还提到了 Python属性查找策略,使你清楚的知道Python处理obj.attr和obj.attr=... 阅读全文
posted @ 2015-08-01 21:52 何似王 阅读(792) 评论(0) 推荐(1) 编辑
摘要: SQL(Structure Query Language)语言是数据库的核心语言。SQL的发展是从1974年开始的,其发展过程如下:1974年-----由Boyce和Chamberlin提出,当时称SEQUEL。1976年-----IBM公司的Sanjase研究所在研制RDBMS SYSTEM R时... 阅读全文
posted @ 2015-07-31 10:46 何似王 阅读(201) 评论(0) 推荐(0) 编辑
摘要: @Python新式类和经典类的区别 classClassicClass():passclassNewStyleClass(object):passx1=ClassicClass()x2=NewStyleClass()printx1.__class__,type(x1)printx2.__clas... 阅读全文
posted @ 2015-07-31 00:25 何似王 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页