auto commit

This commit is contained in:
CyC2018 2018-02-22 01:51:07 +08:00
parent be93a81427
commit cc1daa03cf
4 changed files with 105 additions and 105 deletions

View File

@ -17,7 +17,7 @@
* [1. 索引分类](#1-索引分类)
* [1.1 B-Tree 索引](#11-b-tree-索引)
* [1.2 哈希索引](#12-哈希索引)
* [1.3. 空间索引数据R-Tree](#13-空间索引数据r-tree)
* [1.3. 空间索引数据R-Tree](#13-空间索引数据r-tree)
* [1.4 全文索引](#14-全文索引)
* [2. 索引的优点](#2-索引的优点)
* [3. 索引优化](#3-索引优化)

View File

@ -21,9 +21,9 @@
* [进程状态的切换](#进程状态的切换)
* [调度算法](#调度算法)
* [1. 批处理系统中的调度](#1-批处理系统中的调度)
* [1.1 先来先服务FCFS](#11-先来先服务fcfs)
* [1.2 短作业优先SJF](#12-短作业优先sjf)
* [1.3 最短剩余时间优先SRTN](#13-最短剩余时间优先srtn)
* [1.1 先来先服务FCFS](#11-先来先服务fcfs)
* [1.2 短作业优先SJF](#12-短作业优先sjf)
* [1.3 最短剩余时间优先SRTN](#13-最短剩余时间优先srtn)
* [2. 交互式系统中的调度](#2-交互式系统中的调度)
* [2.1 优先权优先](#21-优先权优先)
* [2.2 时间片轮转](#22-时间片轮转)
@ -69,16 +69,16 @@
* [3. 段页式](#3-段页式)
* [4. 分页与分段区别](#4-分页与分段区别)
* [页面置换算法](#页面置换算法)
* [1. 最佳Optimal](#1-最佳optimal)
* [2. 先进先出FIFO](#2-先进先出fifo)
* [3. 最近最久未使用LRULeast Recently Used](#3-最近最久未使用lruleast-recently-used)
* [4. 时钟Clock](#4-时钟clock)
* [1. 最佳Optimal](#1-最佳optimal)
* [2. 先进先出FIFO](#2-先进先出fifo)
* [3. 最近最久未使用LRULeast Recently Used](#3-最近最久未使用lruleast-recently-used)
* [4. 时钟Clock](#4-时钟clock)
* [第五章 设备管理](#第五章-设备管理)
* [磁盘调度算法](#磁盘调度算法)
* [1. 先来先服务FCFSFirst Come First Serverd](#1-先来先服务fcfsfirst-come-first-serverd)
* [2. 最短寻道时间优先SSTFShortest Seek Time First](#2-最短寻道时间优先sstfshortest-seek-time-first)
* [3. 扫描算法SCAN](#3-扫描算法scan)
* [4. 循环扫描算法CSCAN](#4-循环扫描算法cscan)
* [1. 先来先服务FCFSFirst Come First Serverd](#1-先来先服务fcfsfirst-come-first-serverd)
* [2. 最短寻道时间优先SSTFShortest Seek Time First](#2-最短寻道时间优先sstfshortest-seek-time-first)
* [3. 扫描算法SCAN](#3-扫描算法scan)
* [4. 循环扫描算法CSCAN](#4-循环扫描算法cscan)
* [参考资料](#参考资料)
<!-- GFM-TOC -->

View File

@ -43,7 +43,7 @@
* [IP 地址编址](#ip-地址编址)
* [1. 分类的 IP 地址](#1-分类的-ip-地址)
* [2. 划分子网](#2-划分子网)
* [3. 无分类编址 CIDR构成超网](#3-无分类编址-cidr构成超网)
* [3. 无分类编址 CIDR构成超网](#3-无分类编址-cidr构成超网)
* [IP 地址和 MAC 地址](#ip-地址和-mac-地址)
* [地址解析协议 ARP](#地址解析协议-arp)
* [路由器的结构](#路由器的结构)

View File

@ -1,108 +1,108 @@
<!-- GFM-TOC -->
* [第一章 重构,第一个案例](#第一章-重构,第一个案例)
* [第一章 第一个案例](#第一章-第一个案例)
* [第二章 重构原则](#第二章-重构原则)
* [第三章 代码的坏味道](#第三章-代码的坏味道)
* [1. Duplicated Code重复代码](#1-duplicated-code重复代码)
* [2. Long Method过长函数](#2-long-method过长函数)
* [3. Large Class过大的类](#3-large-class过大的类)
* [4. Long Parameter List过长的参数列](#4-long-parameter-list过长的参数列)
* [5. Divergent Change发散式变化](#5-divergent-change发散式变化)
* [6. Shotgun Surgery散弹式修改](#6-shotgun-surgery散弹式修改)
* [7. Feature Envy依恋情结](#7-feature-envy依恋情结)
* [8. Data Clumps数据泥团](#8-data-clumps数据泥团)
* [9. Primitive Obsession基本类型偏执](#9-primitive-obsession基本类型偏执)
* [10. Switch Statementsswitch 惊悚现身)](#10-switch-statementsswitch-惊悚现身)
* [11. Parallel Inheritance Hierarchies平行继承体系](#11-parallel-inheritance-hierarchies平行继承体系)
* [12. Lazy Class冗余类](#12-lazy-class冗余类)
* [13. Speculative Generality夸夸其谈未来性](#13-speculative-generality夸夸其谈未来性)
* [14. Temporary Field令人迷惑的暂时字段](#14-temporary-field令人迷惑的暂时字段)
* [15. Message Chains过度耦合的消息链](#15-message-chains过度耦合的消息链)
* [16. Middle Man中间人](#16-middle-man中间人)
* [17. Inappropriate Intimacy狎昵关系](#17-inappropriate-intimacy狎昵关系)
* [18. Alernative Classes with Different Interfaces异曲同工的类](#18-alernative-classes-with-different-interfaces异曲同工的类)
* [19. Incomplete Library Class不完美的类库](#19-incomplete-library-class不完美的类库)
* [20. Data Class幼稚的数据类](#20-data-class幼稚的数据类)
* [21. Refused Bequest被拒绝的馈赠](#21-refused-bequest被拒绝的馈赠)
* [22. Comments过多的注释](#22-comments过多的注释)
* [1. Duplicated Code重复代码](#1-duplicated-code重复代码)
* [2. Long Method过长函数](#2-long-method过长函数)
* [3. Large Class过大的类](#3-large-class过大的类)
* [4. Long Parameter List过长的参数列](#4-long-parameter-list过长的参数列)
* [5. Divergent Change发散式变化](#5-divergent-change发散式变化)
* [6. Shotgun Surgery散弹式修改](#6-shotgun-surgery散弹式修改)
* [7. Feature Envy依恋情结](#7-feature-envy依恋情结)
* [8. Data Clumps数据泥团](#8-data-clumps数据泥团)
* [9. Primitive Obsession基本类型偏执](#9-primitive-obsession基本类型偏执)
* [10. Switch Statementsswitch 惊悚现身)](#10-switch-statementsswitch-惊悚现身)
* [11. Parallel Inheritance Hierarchies平行继承体系](#11-parallel-inheritance-hierarchies平行继承体系)
* [12. Lazy Class冗余类](#12-lazy-class冗余类)
* [13. Speculative Generality夸夸其谈未来性](#13-speculative-generality夸夸其谈未来性)
* [14. Temporary Field令人迷惑的暂时字段](#14-temporary-field令人迷惑的暂时字段)
* [15. Message Chains过度耦合的消息链](#15-message-chains过度耦合的消息链)
* [16. Middle Man中间人](#16-middle-man中间人)
* [17. Inappropriate Intimacy狎昵关系](#17-inappropriate-intimacy狎昵关系)
* [18. Alernative Classes with Different Interfaces异曲同工的类](#18-alernative-classes-with-different-interfaces异曲同工的类)
* [19. Incomplete Library Class不完美的类库](#19-incomplete-library-class不完美的类库)
* [20. Data Class幼稚的数据类](#20-data-class幼稚的数据类)
* [21. Refused Bequest被拒绝的馈赠](#21-refused-bequest被拒绝的馈赠)
* [22. Comments过多的注释](#22-comments过多的注释)
* [第四章 构筑测试体系](#第四章-构筑测试体系)
* [第五章 重构列表](#第五章-重构列表)
* [第六章 重新组织函数](#第六章-重新组织函数)
* [1. Extract Method提炼函数](#1-extract-method提炼函数)
* [2. Inline Method内联函数](#2-inline-method内联函数)
* [3. Inline Temp内联临时变量](#3-inline-temp内联临时变量)
* [4. Replace Temp with Query以查询取代临时变量](#4-replace-temp-with-query以查询取代临时变量)
* [5. Introduce Explaining Variable引起解释变量](#5-introduce-explaining-variable引起解释变量)
* [6. Split Temporary Variable分解临时变量](#6-split-temporary-variable分解临时变量)
* [7. Remove Assigments to Parameters移除对参数的赋值](#7-remove-assigments-to-parameters移除对参数的赋值)
* [8. Replace Method with Method Object以函数对象取代函数](#8-replace-method-with-method-object以函数对象取代函数)
* [9. Subsititute Algorithn替换算法](#9-subsititute-algorithn替换算法)
* [1. Extract Method提炼函数](#1-extract-method提炼函数)
* [2. Inline Method内联函数](#2-inline-method内联函数)
* [3. Inline Temp内联临时变量](#3-inline-temp内联临时变量)
* [4. Replace Temp with Query以查询取代临时变量](#4-replace-temp-with-query以查询取代临时变量)
* [5. Introduce Explaining Variable引起解释变量](#5-introduce-explaining-variable引起解释变量)
* [6. Split Temporary Variable分解临时变量](#6-split-temporary-variable分解临时变量)
* [7. Remove Assigments to Parameters移除对参数的赋值](#7-remove-assigments-to-parameters移除对参数的赋值)
* [8. Replace Method with Method Object以函数对象取代函数](#8-replace-method-with-method-object以函数对象取代函数)
* [9. Subsititute Algorithn替换算法](#9-subsititute-algorithn替换算法)
* [第七章 在对象之间搬移特性](#第七章-在对象之间搬移特性)
* [1. Move Method搬移函数](#1-move-method搬移函数)
* [2. Move Field搬移字段](#2-move-field搬移字段)
* [3. Extract Class提炼类](#3-extract-class提炼类)
* [4. Inline Class将类内联化](#4-inline-class将类内联化)
* [5. Hide Delegate隐藏“委托关系”](#5-hide-delegate隐藏“委托关系”)
* [6. Remove Middle Man移除中间人](#6-remove-middle-man移除中间人)
* [7. Introduce Foreign Method引入外加函数](#7-introduce-foreign-method引入外加函数)
* [8. Introduce Local Extension引入本地扩展](#8-introduce-local-extension引入本地扩展)
* [1. Move Method搬移函数](#1-move-method搬移函数)
* [2. Move Field搬移字段](#2-move-field搬移字段)
* [3. Extract Class提炼类](#3-extract-class提炼类)
* [4. Inline Class将类内联化](#4-inline-class将类内联化)
* [5. Hide Delegate隐藏“委托关系”](#5-hide-delegate隐藏“委托关系”)
* [6. Remove Middle Man移除中间人](#6-remove-middle-man移除中间人)
* [7. Introduce Foreign Method引入外加函数](#7-introduce-foreign-method引入外加函数)
* [8. Introduce Local Extension引入本地扩展](#8-introduce-local-extension引入本地扩展)
* [第八章 重新组织数据](#第八章-重新组织数据)
* [1. Self Encapsulate Field自封装字段](#1-self-encapsulate-field自封装字段)
* [2. Replace Data Value with Object以对象取代数据值](#2-replace-data-value-with-object以对象取代数据值)
* [3. Change Value to Reference将值对象改成引用对象](#3-change-value-to-reference将值对象改成引用对象)
* [4. Change Reference to value将引用对象改为值对象](#4-change-reference-to-value将引用对象改为值对象)
* [5. Replace Array with Object以对象取代数组](#5-replace-array-with-object以对象取代数组)
* [6. Duplicate Observed Data赋值“被监视数据”](#6-duplicate-observed-data赋值“被监视数据”)
* [7. Change Unidirectional Association to Bidirectional将单向关联改为双向关联](#7-change-unidirectional-association-to-bidirectional将单向关联改为双向关联)
* [8. Change Bidirectional Association to Unidirectional将双向关联改为单向关联](#8-change-bidirectional-association-to-unidirectional将双向关联改为单向关联)
* [9. Replace Magic Number with Symbolic Constant以字面常量取代魔法数](#9-replace-magic-number-with-symbolic-constant以字面常量取代魔法数)
* [10. Encapsulate Field封装字段](#10-encapsulate-field封装字段)
* [11. Encapsulate Collection封装集合](#11-encapsulate-collection封装集合)
* [12. Replace Record with Data Class以数据类取代记录](#12-replace-record-with-data-class以数据类取代记录)
* [13. Replace Type Code with Class以类取代类型码](#13-replace-type-code-with-class以类取代类型码)
* [14. Replace Type Code with Subcalsses以子类取代类型码](#14-replace-type-code-with-subcalsses以子类取代类型码)
* [15. Replace Type Code with State/Strategy (以 State/Strategy 取代类型码)](#15-replace-type-code-with-statestrategy-以-statestrategy-取代类型码)
* [16. Replace Subclass with Fields以字段取代子类](#16-replace-subclass-with-fields以字段取代子类)
* [1. Self Encapsulate Field自封装字段](#1-self-encapsulate-field自封装字段)
* [2. Replace Data Value with Object以对象取代数据值](#2-replace-data-value-with-object以对象取代数据值)
* [3. Change Value to Reference将值对象改成引用对象](#3-change-value-to-reference将值对象改成引用对象)
* [4. Change Reference to value将引用对象改为值对象](#4-change-reference-to-value将引用对象改为值对象)
* [5. Replace Array with Object以对象取代数组](#5-replace-array-with-object以对象取代数组)
* [6. Duplicate Observed Data赋值“被监视数据”](#6-duplicate-observed-data赋值“被监视数据”)
* [7. Change Unidirectional Association to Bidirectional将单向关联改为双向关联](#7-change-unidirectional-association-to-bidirectional将单向关联改为双向关联)
* [8. Change Bidirectional Association to Unidirectional将双向关联改为单向关联](#8-change-bidirectional-association-to-unidirectional将双向关联改为单向关联)
* [9. Replace Magic Number with Symbolic Constant以字面常量取代魔法数](#9-replace-magic-number-with-symbolic-constant以字面常量取代魔法数)
* [10. Encapsulate Field封装字段](#10-encapsulate-field封装字段)
* [11. Encapsulate Collection封装集合](#11-encapsulate-collection封装集合)
* [12. Replace Record with Data Class以数据类取代记录](#12-replace-record-with-data-class以数据类取代记录)
* [13. Replace Type Code with Class以类取代类型码](#13-replace-type-code-with-class以类取代类型码)
* [14. Replace Type Code with Subcalsses以子类取代类型码](#14-replace-type-code-with-subcalsses以子类取代类型码)
* [15. Replace Type Code with State/Strategy (以 State/Strategy 取代类型码)](#15-replace-type-code-with-statestrategy-以-statestrategy-取代类型码)
* [16. Replace Subclass with Fields以字段取代子类](#16-replace-subclass-with-fields以字段取代子类)
* [第九章 简化条件表达式](#第九章-简化条件表达式)
* [1. Decompose Conditional分解条件表达式](#1-decompose-conditional分解条件表达式)
* [2. Consolidate Conditional Expression合并条件表达式](#2-consolidate-conditional-expression合并条件表达式)
* [3. Consolidate Duplicate Conditional Fragments (合并重复的条件片段)](#3-consolidate-duplicate-conditional-fragments-合并重复的条件片段)
* [4. Remove Control Flag移除控制标记](#4-remove-control-flag移除控制标记)
* [5. Replace Nested Conditional with Guard Clauses (以卫语句取代嵌套条件表达式)](#5-replace-nested-conditional-with-guard-clauses-以卫语句取代嵌套条件表达式)
* [6. Replace Conditional with Polymorphism (以多态取代条件表达式)](#6-replace-conditional-with-polymorphism-以多态取代条件表达式)
* [7. Introduce Null Object引入Null对象](#7-introduce-null-object引入null对象)
* [8. Introduce Assertion引入断言](#8-introduce-assertion引入断言)
* [1. Decompose Conditional分解条件表达式](#1-decompose-conditional分解条件表达式)
* [2. Consolidate Conditional Expression合并条件表达式](#2-consolidate-conditional-expression合并条件表达式)
* [3. Consolidate Duplicate Conditional Fragments (合并重复的条件片段)](#3-consolidate-duplicate-conditional-fragments-合并重复的条件片段)
* [4. Remove Control Flag移除控制标记](#4-remove-control-flag移除控制标记)
* [5. Replace Nested Conditional with Guard Clauses (以卫语句取代嵌套条件表达式)](#5-replace-nested-conditional-with-guard-clauses-以卫语句取代嵌套条件表达式)
* [6. Replace Conditional with Polymorphism (以多态取代条件表达式)](#6-replace-conditional-with-polymorphism-以多态取代条件表达式)
* [7. Introduce Null Object引入Null对象](#7-introduce-null-object引入null对象)
* [8. Introduce Assertion引入断言](#8-introduce-assertion引入断言)
* [第十章 简化函数调用](#第十章-简化函数调用)
* [1. Rename Method函数改名](#1-rename-method函数改名)
* [2. Add Parameter添加参数](#2-add-parameter添加参数)
* [3. Remove Parameter移除参数](#3-remove-parameter移除参数)
* [4. Separate Query from Modifier将查询函数和修改函数分离](#4-separate-query-from-modifier将查询函数和修改函数分离)
* [5. Parameterize Method令函数携带参数](#5-parameterize-method令函数携带参数)
* [6. Replace Parameter with Explicit Methods以明确函数取代参数](#6-replace-parameter-with-explicit-methods以明确函数取代参数)
* [7. Preserve Whole Object保持对象完整](#7-preserve-whole-object保持对象完整)
* [8. Replace Parameter with Methods以函数取代参数](#8-replace-parameter-with-methods以函数取代参数)
* [9. Introduce Parameter Object引入参数对象](#9-introduce-parameter-object引入参数对象)
* [10. Remove Setting Method移除设值函数](#10-remove-setting-method移除设值函数)
* [11. Hide Method隐藏函数](#11-hide-method隐藏函数)
* [12. Replace Constructor with Factory Method (以工厂函数取代构造函数)](#12-replace-constructor-with-factory-method-以工厂函数取代构造函数)
* [13. Encapsulate Downcast封装向下转型](#13-encapsulate-downcast封装向下转型)
* [14. Replace Error Code with Exception (以异常取代错误码)](#14-replace-error-code-with-exception-以异常取代错误码)
* [15. Replace Exception with Test以测试取代异常](#15-replace-exception-with-test以测试取代异常)
* [1. Rename Method函数改名](#1-rename-method函数改名)
* [2. Add Parameter添加参数](#2-add-parameter添加参数)
* [3. Remove Parameter移除参数](#3-remove-parameter移除参数)
* [4. Separate Query from Modifier将查询函数和修改函数分离](#4-separate-query-from-modifier将查询函数和修改函数分离)
* [5. Parameterize Method令函数携带参数](#5-parameterize-method令函数携带参数)
* [6. Replace Parameter with Explicit Methods以明确函数取代参数](#6-replace-parameter-with-explicit-methods以明确函数取代参数)
* [7. Preserve Whole Object保持对象完整](#7-preserve-whole-object保持对象完整)
* [8. Replace Parameter with Methods以函数取代参数](#8-replace-parameter-with-methods以函数取代参数)
* [9. Introduce Parameter Object引入参数对象](#9-introduce-parameter-object引入参数对象)
* [10. Remove Setting Method移除设值函数](#10-remove-setting-method移除设值函数)
* [11. Hide Method隐藏函数](#11-hide-method隐藏函数)
* [12. Replace Constructor with Factory Method (以工厂函数取代构造函数)](#12-replace-constructor-with-factory-method-以工厂函数取代构造函数)
* [13. Encapsulate Downcast封装向下转型](#13-encapsulate-downcast封装向下转型)
* [14. Replace Error Code with Exception (以异常取代错误码)](#14-replace-error-code-with-exception-以异常取代错误码)
* [15. Replace Exception with Test以测试取代异常](#15-replace-exception-with-test以测试取代异常)
* [第十一章 处理概括关系](#第十一章-处理概括关系)
* [1. Pull Up Field字段上移](#1-pull-up-field字段上移)
* [2. Pull Up Method函数上移](#2-pull-up-method函数上移)
* [3. Pull Up Constructor Body构造函数本体上移](#3-pull-up-constructor-body构造函数本体上移)
* [4. Push Down Method函数下移](#4-push-down-method函数下移)
* [5. Push Down Field字段下移](#5-push-down-field字段下移)
* [6. Extract Subclass提炼子类](#6-extract-subclass提炼子类)
* [7. Extract Superclass提炼超类](#7-extract-superclass提炼超类)
* [8. Extract Interface提炼接口](#8-extract-interface提炼接口)
* [9. Collapse Hierarchy折叠继承体系](#9-collapse-hierarchy折叠继承体系)
* [10. Form Template Method塑造模板函数](#10-form-template-method塑造模板函数)
* [11. Replace Inheritance with Delegation (以委托取代继承)](#11-replace-inheritance-with-delegation-以委托取代继承)
* [12. Replace Delegation with Inheritance (以继承取代委托)](#12-replace-delegation-with-inheritance-以继承取代委托)
* [1. Pull Up Field字段上移](#1-pull-up-field字段上移)
* [2. Pull Up Method函数上移](#2-pull-up-method函数上移)
* [3. Pull Up Constructor Body构造函数本体上移](#3-pull-up-constructor-body构造函数本体上移)
* [4. Push Down Method函数下移](#4-push-down-method函数下移)
* [5. Push Down Field字段下移](#5-push-down-field字段下移)
* [6. Extract Subclass提炼子类](#6-extract-subclass提炼子类)
* [7. Extract Superclass提炼超类](#7-extract-superclass提炼超类)
* [8. Extract Interface提炼接口](#8-extract-interface提炼接口)
* [9. Collapse Hierarchy折叠继承体系](#9-collapse-hierarchy折叠继承体系)
* [10. Form Template Method塑造模板函数](#10-form-template-method塑造模板函数)
* [11. Replace Inheritance with Delegation (以委托取代继承)](#11-replace-inheritance-with-delegation-以委托取代继承)
* [12. Replace Delegation with Inheritance (以继承取代委托)](#12-replace-delegation-with-inheritance-以继承取代委托)
<!-- GFM-TOC -->
# 第一章 重构,第一个案例
# 第一章 第一个案例
如果你发现自己需要为程序添加一个特性,而代码结构使你无法很方便地达成目的,那就先重构这个程序。