• 博客(0)
  • 资源 (2)

空空如也

dive into python

目录 1. 安装 Python 1.1. 哪一种 Python 适合您? 1.2. Windows 上的 Python 1.3. Mac OS X 上的 Python 1.4. Mac OS 9 上的 Python 1.5. RedHat Linux 上的 Python 1.6. Debian GNU/Linux 上的 Python 1.7. 从源代码安装 Python 1.8. 使用 Python 的交互 Shell 1.9. 小结 2. 第一个 Python 程序 2.1. 概览 2.2. 函数声明 2.2.1. Python 和其他编程语言数据类型的比较 2.3. 文档化函数 2.4. 万物皆对象 2.4.1. 模块导入的搜索路径 2.4.2. 何谓对象? 2.5. 代码缩进 2.6. 测试模块 3. 内置数据类型 3.1. Dictionary 介绍 3.1.1. Dictionary 的定义 3.1.2. Dictionary 的修改 3.1.3. 从 dictionary 中删除元素 3.2. List 介绍 3.2.1. List 的定义 3.2.2. 向 list 中增加元素 3.2.3. 在 list 中搜索 3.2.4. 从 list 中删除元素 3.2.5. 使用 list 的运算符 3.3. Tuple 介绍 3.4. 变量声明 3.4.1. 变量引用 3.4.2. 一次赋多值 3.5. 格式化字符串 3.6. 映射 list 3.7. 连接 list 与分割字符串 3.7.1. 字符串方法的历史注解 3.8. 小结 4. 自省的威力 4.1. 概览 4.2. 使用可选参数和命名参数 4.3. 使用 type、str、dir 和其它内置函数 4.3.1. type 函数 4.3.2. str 函数 4.3.3. 内置函数 4.4. 通过 getattr 获取对象引用 4.4.1. 用于模块的 getattr 4.4.2. getattr 作为一个分发者 4.5. 过滤列表 4.6. and 和 or 的特殊性质 4.6.1. 使用 and-or 技巧 4.7. 使用 lambda 函数 4.7.1. 真实世界中的 lambda 函数 4.8. 全部放在一起 4.9. 小结 5. 对象和面向对象 5.1. 概览 5.2. 使用 from module import 导入模块 5.3. 类的定义 5.3.1. 初始化并开始类编码 5.3.2. 了解何时去使用 self 和 __init__ 5.4. 类的实例化 5.4.1. 垃圾回收 5.5. 探索 UserDict:一个封装类 5.6. 专用类方法 5.6.1. 获得和设置数据项 5.7. 高级专用类方法 5.8. 类属性介绍 5.9. 私有函数 5.10. 小结 6. 异常和文件处理 6.1. 异常处理 6.1.1. 为其他用途使用异常 6.2. 与文件对象共事 6.2.1. 读取文件 6.2.2. 关闭文件 6.2.3. 处理 I/O 错误 6.2.4. 写入文件 6.3. for 循环 6.4. 使用 sys.modules 6.5. 与目录共事 6.6. 全部放在一起 6.7. 小结 7. 正则表达式 7.1. 概览 7.2. 个案研究:街道地址 7.3. 个案研究:罗马字母 7.3.1. 校验千位数 7.3.2. 校验百位数 7.4. 使用 {n,m} 语法 7.4.1. 校验十位数和个位数 7.5. 松散正则表达式 7.6. 个案研究:解析电话号码 7.7. 小结 8. HTML 处理 8.1. 概览 8.2. sgmllib.py 介绍 8.3. 从 HTML 文档中提取数据 8.4. BaseHTMLProcessor.py 介绍 8.5. locals 和 globals 8.6. 基于 dictionary 的字符串格式化 8.7. 给属性值加引号 8.8. dialect.py 介绍 8.9. 全部放在一起 8.10. 小结 9. XML 处理 9.1. 概览 9.2. 包 9.3. XML 解析 9.4. Unicode 9.5. 搜索元素 9.6. 访问元素属性 9.7. Segue 10. 脚本和流 10.1. 抽象输入源 10.2. 标准输入、输出和错误 10.3. 查询缓冲节点 10.4. 查找节点的直接子节点 10.5. 根据节点类型创建不同的处理器 10.6. 处理命令行参数 10.7. 全部放在一起 10.8. 小结 11. HTTP Web 服务 11.1. 概览 11.2. 避免通过 HTTP 重复地获取数据 11.3. HTTP 的特性 11.3.1. 用户代理 (User-Agent) 11.3.2. 重定向 (Redirects) 11.3.3. Last-Modified/If-Modified-Since 11.3.4. ETag/If-None-Match 11.3.5. 压缩 (Compression) 11.4. 调试 HTTP web 服务 11.5. 设置 User-Agent 11.6. 处理 Last-Modified 和 ETag 11.7. 处理重定向 11.8. 处理压缩数据 11.9. 全部放在一起 11.10. 小结 12. SOAP Web 服务 12.1. 概览 12.2. 安装 SOAP 库 12.2.1. 安装 PyXML 12.2.2. 安装 fpconst 12.2.3. 安装 SOAPpy 12.3. 步入 SOAP 12.4. SOAP 网络服务查错 12.5. WSDL 介绍 12.6. 以 WSDL 进行 SOAP 内省 12.7. 搜索 Google 12.8. SOAP 网络服务故障排除 12.9. 小结 13. 单元测试 13.1. 罗马数字程序介绍 II 13.2. 深入 13.3. romantest.py 介绍 13.4. 正面测试 (Testing for success) 13.5. 负面测试 (Testing for failure) 13.6. 完备性检测 (Testing for sanity) 14. 测试优先编程 14.1. roman.py, 第 1 阶段 14.2. roman.py, 第 2 阶段 14.3. roman.py, 第 3 阶段 14.4. roman.py, 第 4 阶段 14.5. roman.py, 第 5 阶段 15. 重构 15.1. 处理 bugs 15.2. 应对需求变化 15.3. 重构 15.4. 后记 15.5. 小结 16. 函数编程 16.1. 概览 16.2. 找到路径 16.3. 重识列表过滤 16.4. 重识列表映射 16.5. 数据中心思想编程 16.6. 动态导入模块 16.7. 全部放在一起 16.8. 小结 17. 动态函数 17.1. 概览 17.2. plural.py, 第 1 阶段 17.3. plural.py, 第 2 阶段 17.4. plural.py, 第 3 阶段 17.5. plural.py, 第 4 阶段 17.6. plural.py, 第 5 阶段 17.7. plural.py, 第 6 阶段 17.8. 小结 18. 性能优化 18.1. 概览 18.2. 使用 timeit 模块 18.3. 优化正则表达式 18.4. 优化字典查找 18.5. 优化列表操作 18.6. 优化字符串操作 18.7. 小结 A. 进一步阅读 B. 五分钟回顾 C. 技巧和窍门 D. 示例清单 E. 修订历史 F. 关于本书 G. GNU Free Documentation License G.0. Preamble G.1. Applicability and definitions G.2. Verbatim copying G.3. Copying in quantity G.4. Modifications G.5. Combining documents G.6. Collections of documents G.7. Aggregation with independent works G.8. Translation G.9. Termination G.10. Future revisions of this license G.11. How to use this License for your documents H. GNU 自由文档协议 H.0. 序 H.1. 适用范围和定义 H.2. 原样复制 H.3. 大量复制 H.4. 修改 H.5. 合并文档 H.6. 文档合集 H.7. 独立著作聚集 H.8. 翻译 H.9. 终止协议 H.10. 协议将来的修订 H.11. 如何为你的文档使用本协议 I. Python license I.A. History of the software I.B. Terms and conditions for accessing or otherwise using Python I.B.1. PSF license agreement I.B.2. BeOpen Python open source license agreement version 1 I.B.3. CNRI open source GPL-compatible license agreement I.B.4. CWI permissions statement and disclaimer J. Python 协议 J.0. 关于译文的声明 J.A. 软件的历史 J.B. 使用 Python 的条款和条件 J.B.1. PSF 协议 J.B.2. BeOpen Python 开源协议第 1 版 J.B.3. CNRI 开源 GPL 兼容协议 J.B.4. CWI 许可声明与免责声明

2009-08-27

C++ by Example

Every day, more and more people learn and use the C++ programming Language. I have taught C to thousands of students in my life. I see many of those students now moving to C++ in their school work or career. The C++ language is becoming an industry-accepted standard programming language, using the solid foundation of C to gain a foothold. C++ is simply a better C than C. C++ By Example is one of several books in Que抯 new line of By Example series. The philosophy of these books is simple: The best way to teach computer programming concepts is with multiple examples. Command descriptions, format syntax, and language references are not enough to teach a newcomer a programming language. Only by looking at numerous examples and by running sample programs can programming students get more than just a 揻eel?for the language. Table of Contents Overview I Introduction to C++ 1 Welcome to C++ 2 What Is a Program? 3 Your First C++ Program 4 Variables and Literals 5 Character Arrays and Strings 6 Preprocessor Directives 7 Simple Input/Output II Using C++ Operators 8 Using C++ Math Operators and Precedence 9 Relational Operators 10 Logical Operators 11 Additional C++ Operators III C++ Constructs 12 The while Loop 13 The for Loop 14 Other Loop Options 15 The switch and goto Statements 16 Writing C++ Functions IV Variable Scope and Modular Programming 17 Variable Scope 18 Passing Value 19 Function Return Values and Prototyping 20 Default Arguments and Function Overloading V Character Input/Output and String Functions 21 Device and Character Input/Output 22 Character, String, and Numeric Functions Contents x VI Arrays and Pointers 23 Introducing Arrays 24 Array Processing 25 Multidimensional Arrays 26 Pointers 27 Pointers and Arrays VII Structures and File Input/Output 28 Structures 29 Arrays of Structures 30 Sequential Files 31 Random-Access Files 32 Introduction to Object-Oriented Programming VIII References A Memory Addressing, Binary, and Hexadecimal Review B Answers to Review Questions C ASCII Table D C++ Precedence Table E Keyword and Function Reference F The Mailing List Application Glossary Index

2009-02-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除