自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (52)
  • 收藏
  • 关注

原创 xlsx文件按列筛选拆分工具

2、一个xlsx文件,可以选择按列拆分成一个文件多个sheet,每个分组一个sheet。2、将“mysplit_v7.exe”和“input.xlsx”放到同一个目录中。3、双击“mysplit_v7.exe”运行,可以按需选择列,来拆分多个文件,1、输入文件名改为"input.xlsx",第一行必须为列名称,不要留空行。1、若选择列有空值会保存到“空值.xlsx”或者名字为“空值”的sheet。1、一个xlsx文件,可以选择按列拆分成多个文件。2、输出文件首行加粗,第一列为序号,顺序从1开始。

2023-06-18 23:04:21 157

原创 xlsx文件按列筛选拆分成多个文件

xlsx文件按列筛选拆分成多个文件

2022-10-18 13:12:05 554 1

原创 VMware 虚拟机连外网,同时本机SecureCRT能够连接虚拟机,不同网段配置

VMware 虚拟机连外网,同时本机SecureCRT能够连接虚拟机,不同网1.检查本机连外网的网卡,打开 控制面板-》网络和 Internet-》网络连接,查看已连接网络的网卡右击,查看状态,这里IPV4连接,已连接 Internet。点击 详细信息,记录下 IPv4默认网关是192.168.1.1 ,网段:192.168.12,在VM上 点击编辑-》虚拟网络编辑器,打开虚拟网络编辑器,选中VMnet8,点击 “更改设置”,选择NAT模式设置 子网IP 1...

2020-10-18 20:09:54 1867 1

转载 two months

2015-11-08 begin 2015-12-05  mid  2016-01-05 end

2016-01-05 22:49:03 379

转载 Karthick's Blog How to install IBM WebSphere MQ Version 8 on Linux - Middleware News

http://www.websphereusergroup.org/middlewarenews/blog/

2014-12-29 20:32:34 545

原创 小代码

实现如下输出:

2014-11-04 23:43:35 452

转载 SecureCRT中文乱码、复制粘贴乱码解决办法

SecureCRT的默认配置对中文支持不好。很容易出现中文乱码。即使显示出来没有乱码,将文本复制粘贴到其他windows程序中也会是乱码,或者从windows复制进SecureCRT会乱码,很不方便。这个归结起来还是字符编码的问题,需要进行以下简单设置:1. 首先进入 Option 菜单 >> Session Option2. Terminal >> Emulation,在

2014-10-31 21:27:46 5319

转载 用iconv 文件格式转换

Windows转到linux中,文件乱码,文件编码转换

2014-10-30 23:46:30 4498

转载 vsftp.conf配置注释

vsftp有个中文矛盾。如果client是windows的,上传到服务器上的中文名文件,其他windows用户都能正常访问,但是服务器本地却是乱码,如果在服务器端touch一个中文名文件,在客户端却是乱码,这个问题已经困扰了我好久,,不像lftp一条“set ftp:charset "gbk" ”配置文件就解决了,  今天抽空去看了一下vsftp官方的文档,翻译一下,来个中文版的配置注释!!嘿

2014-09-21 20:17:02 608

原创 c 面试题

#includeint main(){ char str1[]="abc"; char str2[]="abc"; const char str3[]="abc"; const char str4[]="abc"; char *str5="abc"; char *str6="abc"; cout cout cout return 0;}0

2014-03-06 08:39:17 655

原创 rm 和符号链接

ln -s  dir  dir.linkrm dir.link/         --rm dir.[TAB]  用tab键rm -rf dir.link/      --这下可傻帽了!rm dir.link  --就可以  ls -d   --列不出当前目录下ls -d  */  --才可以列出当前目录下文件夹  *是通配符  以/结尾的是目录

2014-02-20 20:25:34 716

转载 VirtualBox中HOST-ONLY模式下共享上网

在HOST-ONLY网络模式下,虚拟系统的网卡连接到宿主计算机的VirtualBox Host-Only Network网卡上。如果要让VirtualBox的虚拟机可以访问外网,则主系统必须共享网络连接。具体操作步骤如下:1. 通过网络连接,打开“本地连接”的属性,在“共享”选项卡下设置“Inertnet连接共享”,选中 VirtualBox Host-Only Network,单击“

2013-10-19 12:27:59 1244

转载 Xcoding

1.Xcode 5 安装低版本模拟器方法:iPhoneOS6.1.sdk 在这目录下:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs 。拷贝到新版目录下即可iPhoneSimulator6.1.sdk 在者目录下:/Applications/Xcode.a

2013-10-15 22:37:04 748

转载 Oracle to_char格式化函数

Postgres 格式化函数提供一套有效的工具用于把各种数据类型(日期/时间,int,float,numeric)转换成格式化的字符串以及反过来从格式化的字符串转换成原始的数据类型。注意:所有格式化函数的第二个参数是用于转换的模板。表 5-7. 格式化函数  函数返回描述例子to_char(timestamp, text)text把 ti

2013-06-03 01:35:17 550

原创 AIX

QU1:AIX系统,用netstat  -a | grep 34001  查看34001端口是LISTEN状态,怎样关闭这端口?

2012-09-11 00:08:14 346

转载 CHM 格式打不开

CHM 意为 Compiled HTML。以CHM为扩展名的文件图标通常为一个带问号的文档图标,表示帮助文档,是 Microsoft 自 Windows 98 以来提供的一种帮助文档格式的文件,用于替代 Windows 95 下的 HLP(Help) 文件。Microsoft 自 Windows 98 以来,操作系统中都自带解释器(打开 CHM 文件的工具),即 Windows 安装目录下的 HH

2012-07-27 00:14:34 477

原创 oracle 入门常见问题

解锁用户:alter user scott identified by tiger account unlock;修改字符集:alter session set NLS_DATE_LANGUAGE = 'AMERICAN' ; 或'Simplified Chinese';重建scott用户和它所拥有的一切:@%ORACLE_HOME\RDDMS\ADMIN\scott.sql;

2012-06-30 22:21:08 1149

转载 总结自己常用的UltraEdit使用技巧

总结自己常用的UltraEdit使用技巧如果您问我每天都要打开的软件是什么,那毫无疑问是UltraEdit!作为一位DBA,每天都要写各种脚本,尤其是在对具有超多行行的大文件进行精心编辑时,没有一个好的文本编辑器是不成的。掐指一算,哇塞,自己使用UltraEdit编辑器已经有5年了,每当发现“她”所具有的某一功能和自己想要操作的目标不谋而合时就大为兴奋。开讲,下面的使用技巧是以小技

2012-05-24 00:30:43 1530

原创 Redhat 中的编码问题

Some coding problems in linux torment me recently.The Chinese characters are garbled when use man command,vim editor,SecureCRT tool,shell command and so on,what'smore ,some English characters are  gar

2012-05-06 18:43:24 744

原创 win7系统+U盘启动制作

1.下载win7 64位旗舰版。    ed2k://|file|cn_windows_7_ultimate_x64_dvd_x15-66043.iso|3341268992|7dd7fa757ce6d2db78b6901f81a6907a|/ 复制网址下载,推荐您用迅雷下载。win7旗舰版的64位系统2.校验MD5值     以下是32位的WIN7 MD5和SHA1:cn_windows

2012-04-30 18:01:59 1587

xlsx文件按列筛选拆分工具V7

功能 1、一个xlsx文件,可以选择按列拆分成多个文件 2、一个xlsx文件,可以选择按列拆分成一个文件多个sheet,每个分组一个sheet 使用说明: 1、输入文件名改为"input.xlsx",第一行必须为列名称,不要留空行 2、将“mysplit_v7.exe”和“input.xlsx”放到同一个目录中 3、双击“mysplit_v7.exe”运行,可以按需选择列,来拆分多个文件, 4、运行结果保存在当目录新建一个文件夹yyyymmddHHMMSS 注意: 1、若选择列有空值会保存到“空值.xlsx”或者名字为“空值”的sheet 2、输出文件首行加粗,第一列为序号,顺序从1开始 3、如果有很长的数据,拆分后自动转成科学计数格式,解决办法:在该列最后一行随便输入一些字符:aa,筛选列下面流空

2023-06-18

xlsx文件按列筛选拆分成多个文件工具

xlsx文件按列筛选拆分成多个文件工具 可以按需选择列,来拆分多个文件 有python源代码,exe可执行文件,测试按列,使用说明

2022-10-18

apache hadoop 2.7.2.chm

apahe hadoop2.7.2 官方文档,离线版 General Overview Single Node Setup Cluster Setup Hadoop Commands Reference FileSystem Shell Hadoop Compatibility Interface Classification FileSystem Specification Common CLI Mini Cluster Native Libraries Proxy User Rack Awareness Secure Mode Service Level Authorization HTTP Authentication Hadoop KMS Tracing HDFS HDFS User Guide HDFS Commands Reference High Availability With QJM High Availability With NFS Federation ViewFs Guide HDFS Snapshots HDFS Architecture Edits Viewer Image Viewer Permissions and HDFS Quotas and HDFS HFTP C API libhdfs WebHDFS REST API HttpFS Gateway Short Circuit Local Reads Centralized Cache Management HDFS NFS Gateway HDFS Rolling Upgrade Extended Attributes Transparent Encryption HDFS Support for Multihoming Archival Storage, SSD & Memory Memory Storage Support MapReduce MapReduce Tutorial MapReduce Commands Reference Compatibilty between Hadoop 1.x and Hadoop 2.x Encrypted Shuffle Pluggable Shuffle/Sort Distributed Cache Deploy MapReduce REST APIs MR Application Master MR History Server YARN Overview YARN Architecture Capacity Scheduler Fair Scheduler ResourceManager Restart ResourceManager HA Node Labels Web Application Proxy YARN Timeline Server Writing YARN Applications YARN Commands NodeManager Restart DockerContainerExecutor Using CGroups Secure Containers Registry YARN REST APIs Introduction Resource Manager Node Manager Timeline Server Hadoop Compatible File Systems Amazon S3 Azure Blob Storage OpenStack Swift Auth Overview Examples Configuration Building Tools Hadoop Streaming Hadoop Archives DistCp GridMix Rumen Scheduler Load Simulator Reference Release Notes API docs Common CHANGES.txt HDFS CHANGES.txt MapReduce CHANGES.txt YARN CHANGES.txt Metrics Configuration core-default.xml hdfs-default.xml mapred-default.xml yarn-default.xml Deprecated Properties

2021-10-24

AIX命令参考大全

《AIX 5L V5.2 命令参考大全》 共6卷。

2016-03-12

LinuxMan.chm

转:This CHM is make from ManPages V3.32 by [email protected].

2015-08-01

C++Primer第四版中文版+英文版+习题答案+源代码

经典不必多说! C++Primer第四版中文版+英文版+习题答案+源代码+CHM格式(中英版)

2014-06-07

C++ 标准库(第一版+第二版+源代码+PDF

2014/05/18 17:14 3,537,801 C++.Standard Library,The.A.Tutorial.and.Reference.chm 2014/05/18 17:31 13,108,234 C++标准程序库.pdf 2014/05/18 18:09 236,213 cppstdlib-code.zip 2014/05/18 18:10 169,927 examples.zip 2014/05/18 18:02 14,470,662 The C++ Standard Library A Tutorial and Reference (2nd Edition).pdf 2014/05/18 17:54 4,801,530 The C++ Standard Library.pdf 7 个文件 36,324,367 字节

2014-05-18

C++标准库(第二版)英文版.pdf

The C++ Standard Library A Tutorial and Reference (2nd Edition)+cppstdlib-code.zip C++标准库(第二版)英文版.pdf 非扫描版+源代码 Prefaceto the SecondEdition xxiii Acknowledgments for the SecondEdition xxiv Prefaceto the FirstEdition xxv Acknowledgments for the FirstEdition xxvi 1 About This Book 1 1.1 Why This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Before ReadingThis Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Styleand Structure of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.4 How to ReadThis Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.5 Stateof the Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.6 Example Codeand AdditionalInformation . . . . . . . . . . . . . . . . . . . . . 5 1.7 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Introduction to C++ and the StandardLibrary 7 2.1 Historyof the C++ Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.1 Common Questionsabout the C++11 Standard . . . . . . . . . . . . . . 8 2.1.2 Compatibility between C++98 and C++11 . . . . . . . . . . . . . . . . . 9 2.2 Complexity and Big-O Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 New LanguageFeatures 13 3.1 New C++11 Language Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1.1 Important MinorSyntax Cleanups . . . . . . . . . . . . . . . . . . . . . 13 3.1.2 AutomaticType Deductionwith auto . . . . . . . . . . . . . . . . . . . 14 3.1.3 UniformInitialization and Initializer Lists . . . . . . . . . . . . . . . . . 15 3.1.4 Range-Basedfor Loops . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.5 MoveSemanticsand Rvalue References . . . . . . . . . . . . . . . . . . 19 viii Contents 3.1.6 New String Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1.7 Keyword noexcept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.1.8 Keyword constexpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.9 New Template Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.10 Lambdas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.1.11 Keyword decltype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.1.12 New Function Declaration Syntax . . . . . . . . . . . . . . . . . . . . . 32 3.1.13 Scoped Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.1.14 New FundamentalData Types . . . . . . . . . . . . . . . . . . . . . . . 33 3.2 Old “New” Language Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.2.1 ExplicitInitialization for FundamentalTypes . . . . . . . . . . . . . . . 37 3.2.2 Definitionof main() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4 GeneralConcepts 39 4.1 Namespace std . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.2 Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.3 Errorand ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.3.1 Standard ExceptionClasses. . . . . . . . . . . . . . . . . . . . . . . . . 41 4.3.2 Members of ExceptionClasses. . . . . . . . . . . . . . . . . . . . . . . 44 4.3.3 PassingExceptions with Classexception_ptr . . . . . . . . . . . . . . 52 4.3.4 Throwing Standard Exceptions . . . . . . . . . . . . . . . . . . . . . . . 53 4.3.5 Deriving from Standard ExceptionClasses. . . . . . . . . . . . . . . . . 54 4.4 CallableObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.5 Concurrencyand Multithreading. . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.6 Allocators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5 Utilities 59 5.1 Pairs and Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.1.1 Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.1.2 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 5.1.3 I/O for Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 5.1.4 Conversions between tuple sandpairs . . . . . . . . . . . . . . . . . . 75 5.2 Smart Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.2.1 Classshared_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.2.2 Classweak_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 5.2.3 Misusing Shared Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.2.4 Shared and WeakPointersin Detail. . . . . . . . . . . . . . . . . . . . . 92 5.2.5 Classunique_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Contents ix 5.2.6 Classunique_ptrin Detail . . . . . . . . . . . . . . . . . . . . . . . . 110 5.2.7 Classauto_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 5.2.8 FinalWordsonSmart Pointers . . . . . . . . . . . . . . . . . . . . . . . 114 5.3 Numeric Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.4 Type Traitsand Type Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.4.1 Purposeof Type Traits . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 5.4.2 Type Traitsin Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5.4.3 ReferenceWrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 5.4.4 Function Type Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . 133 5.5 Auxiliary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 5.5.1 Processing the Minimumand Maximum. . . . . . . . . . . . . . . . . . 134 5.5.2 Swapping Two Va l u e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 5.5.3 SupplementaryComparison Operators . . . . . . . . . . . . . . . . . . . 138 5.6 Compile-Time FractionalArithmeticwith Classratio . . . . . . . . . . . . . 140 5.7 Clocks and Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 5.7.1 Overview of the ChronoLibrary . . . . . . . . . . . . . . . . . . . . . . 143 5.7.2 Durations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 5.7.3 Clocks and Timepoints . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 5.7.4 Date and TimeFunctions byC and POSIX . . . . . . . . . . . . . . . . . 157 5.7.5 Blocking with Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 5.8 Header Files , ,and . . . . . . . . . . . . . . 161 5.8.1 Definitionsin . . . . . . . . . . . . . . . . . . . . . . . . . . 161 5.8.2 Definitionsin . . . . . . . . . . . . . . . . . . . . . . . . . . 162 5.8.3 Definitionsin . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6 The StandardTe m p l a t e Library 165 6.1 STL Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 6.2 Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 6.2.1 Sequence Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.2.2 Associative Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 6.2.3 UnorderedContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.2.4 Associative Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.2.5 OtherContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 6.2.6 Container Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.3 Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 6.3.1 Further Examples of UsingAssociative and UnorderedContainers . . . . 193 6.3.2 Iterator Categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 x Contents 6.4 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 6.4.1 Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 6.4.2 Handling MultipleRanges . . . . . . . . . . . . . . . . . . . . . . . . . 207 6.5 Iterator Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 6.5.1 Insert Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 6.5.2 Stream Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 6.5.3 ReverseIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 6.5.4 MoveIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6.6 User-DefinedGenericFunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6.7 ManipulatingAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 6.7.1 “Removing”Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 6.7.2 ManipulatingAssociative and UnorderedContainers . . . . . . . . . . . 221 6.7.3 Algorithms versus MemberFunctions . . . . . . . . . . . . . . . . . . . 223 6.8 Functions as AlgorithmArguments . . . . . . . . . . . . . . . . . . . . . . . . . 224 6.8.1 UsingFunctions as AlgorithmArguments . . . . . . . . . . . . . . . . . 224 6.8.2 Predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 6.9 UsingLambdas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.10 Function Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 6.10.1 Definitionof Function Objects . . . . . . . . . . . . . . . . . . . . . . . 233 6.10.2 PredefinedFunction Objects . . . . . . . . . . . . . . . . . . . . . . . . 239 6.10.3 Binders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 6.10.4 Function Objectsand Bindersversus Lambdas . . . . . . . . . . . . . . . 243 6.11 Container Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 6.11.1 Requirements for Container Elements . . . . . . . . . . . . . . . . . . . 244 6.11.2 Va l u eSemanticsor ReferenceSemantics. . . . . . . . . . . . . . . . . . 245 6.12 Errors and Exceptions inside the STL . . . . . . . . . . . . . . . . . . . . . . . . 245 6.12.1 ErrorHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 6.12.2 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 6.13 Extendingthe STL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 6.13.1 Integrating AdditionalTypes . . . . . . . . . . . . . . . . . . . . . . . . 250 6.13.2 Deriving from STL Types . . . . . . . . . . . . . . . . . . . . . . . . . . 251 7 STL Containers 253 7.1 Common Container Abilitiesand Operations . . . . . . . . . . . . . . . . . . . . 254 7.1.1 Container Abilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 7.1.2 Container Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 7.1.3 Container Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Contents xi 7.2 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 7.2.1 Abilitiesof Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 7.2.2 ArrayOperations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 7.2.3 Usingarray s as C-StyleArrays . . . . . . . . . . . . . . . . . . . . . . 267 7.2.4 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 7.2.5 TupleInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 7.2.6 Examples of UsingArrays . . . . . . . . . . . . . . . . . . . . . . . . . 268 7.3 Ve c t o r s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 7.3.1 Abilitiesof Ve c t o r s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 7.3.2 Ve c t o r Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 7.3.3 UsingVe c t o r sas C-StyleArrays . . . . . . . . . . . . . . . . . . . . . . 278 7.3.4 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 7.3.5 Examples of UsingVe c t o r s . . . . . . . . . . . . . . . . . . . . . . . . . 279 7.3.6 Classvector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 7.4 Deques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 7.4.1 Abilitiesof Deques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 7.4.2 Deque Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 7.4.3 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 7.4.4 Examples of UsingDeques. . . . . . . . . . . . . . . . . . . . . . . . . 288 7.5 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 7.5.1 Abilitiesof Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 7.5.2 List Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 7.5.3 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 7.5.4 Examples of UsingLists . . . . . . . . . . . . . . . . . . . . . . . . . . 298 7.6 Forward Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 7.6.1 Abilitiesof Forward Lists . . . . . . . . . . . . . . . . . . . . . . . . . . 300 7.6.2 Forward List Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 302 7.6.3 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 7.6.4 Examples of UsingForward Lists . . . . . . . . . . . . . . . . . . . . . . 312 7.7 Sets and Multisets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 7.7.1 Abilitiesof Sets and Multisets . . . . . . . . . . . . . . . . . . . . . . . 315 7.7.2 Setand MultisetOperations. . . . . . . . . . . . . . . . . . . . . . . . . 316 7.7.3 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 7.7.4 Examples of UsingSets and Multisets . . . . . . . . . . . . . . . . . . . 325 7.7.5 Example of Specifying the Sorting Criterion at Runtime . . . . . . . . . . 328 xii Contents 7.8 Mapsand Multimaps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 7.8.1 Abilitiesof Mapsand Multimaps. . . . . . . . . . . . . . . . . . . . . . 332 7.8.2 Map and Multimap Operations . . . . . . . . . . . . . . . . . . . . . . . 333 7.8.3 UsingMapsas Associative Arrays . . . . . . . . . . . . . . . . . . . . . 343 7.8.4 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 7.8.5 Examples of UsingMapsand Multimaps. . . . . . . . . . . . . . . . . . 345 7.8.6 Example with Maps,Strings,and Sorting Criterion at Runtime . . . . . . 351 7.9 UnorderedContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 7.9.1 Abilitiesof UnorderedContainers . . . . . . . . . . . . . . . . . . . . . 357 7.9.2 Creating and Controlling UnorderedContainers . . . . . . . . . . . . . . 359 7.9.3 OtherOperationsfor UnorderedContainers . . . . . . . . . . . . . . . . 367 7.9.4 The Bucket Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 7.9.5 UsingUnorderedMapsas Associative Arrays . . . . . . . . . . . . . . . 374 7.9.6 ExceptionHandling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 7.9.7 Examples of UsingUnorderedContainers . . . . . . . . . . . . . . . . . 375 7.10 OtherSTL Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 7.10.1 Strings as STL Containers . . . . . . . . . . . . . . . . . . . . . . . . . 385 7.10.2 Ordinary C-StyleArrays as STL Containers . . . . . . . . . . . . . . . . 386 7.11 Implementing ReferenceSemantics . . . . . . . . . . . . . . . . . . . . . . . . . 388 7.12 Whento Use WhichContainer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 8 STL ContainerMembersin Detail 397 8.1 Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 8.2 Create, Copy,and DestroyOperations . . . . . . . . . . . . . . . . . . . . . . . . 400 8.3 Nonmodifying Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 8.3.1 Size Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 8.3.2 Comparison Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 8.3.3 Nonmodifying Operationsfor Associative and UnorderedContainers . . . 404 8.4 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 8.5 Direct ElementAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 8.6 Operationsto Generate Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 8.7 Inserting and RemovingElements . . . . . . . . . . . . . . . . . . . . . . . . . . 411 8.7.1 Inserting Single Elements . . . . . . . . . . . . . . . . . . . . . . . . . . 411 8.7.2 Inserting MultipleElements . . . . . . . . . . . . . . . . . . . . . . . . . 416 8.7.3 RemovingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 8.7.4 Resizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 Contents xiii 8.8 Special MemberFunctions for Lists and Forward Lists . . . . . . . . . . . . . . . 420 8.8.1 Special MemberFunctions for Lists (and Forward Lists) . . . . . . . . . 420 8.8.2 Special MemberFunctions for Forward Lists Only . . . . . . . . . . . . 423 8.9 Container Policy Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 8.9.1 Nonmodifying Policy Functions . . . . . . . . . . . . . . . . . . . . . . 427 8.9.2 ModifyingPolicy Functions . . . . . . . . . . . . . . . . . . . . . . . . 428 8.9.3 Bucket Interface for UnorderedContainers . . . . . . . . . . . . . . . . . 429 8.10 Allocator Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 8.10.1 FundamentalAllocator Members . . . . . . . . . . . . . . . . . . . . . . 430 8.10.2 Constructorswith Optional Allocator Parameters . . . . . . . . . . . . . 430 9 STL Iterators 433 9.1 Header Files for Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 9.2 Iterator Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 9.2.1 Output Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 9.2.2 Input Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 9.2.3 Forward Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 9.2.4 BidirectionalIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 9.2.5 Random-Access Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . 438 9.2.6 The Incrementand DecrementProblem of Ve c t o r Iterators . . . . . . . . 440 9.3 Auxiliary Iterator Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 9.3.1 advance() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 9.3.2 next()and prev(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 9.3.3 distance() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 9.3.4 iter_swap() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 9.4 Iterator Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 9.4.1 ReverseIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 9.4.2 Insert Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 9.4.3 Stream Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 9.4.4 MoveIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 9.5 Iterator Traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 9.5.1 WritingGenericFunctions for Iterators . . . . . . . . . . . . . . . . . . . 468 9.6 WritingUser-DefinedIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 xiv Contents 10 STL Function Objectsand UsingLambdas 475 10.1 The Conceptof Function Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 475 10.1.1 Function Objectsas Sorting Criteria . . . . . . . . . . . . . . . . . . . . 476 10.1.2 Function Objectswith Internal State . . . . . . . . . . . . . . . . . . . . 478 10.1.3 The Return Va l u eof for_each() . . . . . . . . . . . . . . . . . . . . . 482 10.1.4 Predicatesversus Function Objects. . . . . . . . . . . . . . . . . . . . . 483 10.2 PredefinedFunction Objectsand Binders . . . . . . . . . . . . . . . . . . . . . . 486 10.2.1 PredefinedFunction Objects . . . . . . . . . . . . . . . . . . . . . . . . 486 10.2.2 Function Adapters and Binders. . . . . . . . . . . . . . . . . . . . . . . 487 10.2.3 User-DefinedFunction Objectsfor Function Adapters . . . . . . . . . . . 495 10.2.4 Deprecated Function Adapters . . . . . . . . . . . . . . . . . . . . . . . 497 10.3 UsingLambdas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 10.3.1 Lambdas versus Binders . . . . . . . . . . . . . . . . . . . . . . . . . . 499 10.3.2 Lambdas versus StatefulFunction Objects. . . . . . . . . . . . . . . . . 500 10.3.3 Lambdas Calling Global and MemberFunctions . . . . . . . . . . . . . . 502 10.3.4 Lambdas as HashFunction, Sorting,or Equivalence Criterion . . . . . . . 504 11 STL Algorithms 505 11.1 AlgorithmHeader Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 11.2 AlgorithmOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 11.2.1 A BriefIntroduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 11.2.2 Classification of Algorithms . . . . . . . . . . . . . . . . . . . . . . . . 506 11.3 Auxiliary Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 11.4 The for_each()Algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 11.5 Nonmodifying Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 11.5.1 Counting Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 11.5.2 Minimumand Maximum. . . . . . . . . . . . . . . . . . . . . . . . . . 525 11.5.3 SearchingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 11.5.4 Comparing Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 11.5.5 Predicatesfor Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 11.6 ModifyingAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 11.6.1 Copying Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 11.6.2 MovingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 11.6.3 Transforming and Combining Elements . . . . . . . . . . . . . . . . . . 563 11.6.4 Swapping Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 11.6.5 AssigningNew Va l u e s . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 11.6.6 ReplacingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 Contents xv 11.7 RemovingAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 11.7.1 RemovingCertain Va l u e s . . . . . . . . . . . . . . . . . . . . . . . . . . 575 11.7.2 RemovingDuplicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 11.8 Mutating Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 11.8.1 Reversingthe Orderof Elements . . . . . . . . . . . . . . . . . . . . . . 583 11.8.2 Rotating Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 11.8.3 PermutingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 11.8.4 Shuffling Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 11.8.5 MovingElements to the Front . . . . . . . . . . . . . . . . . . . . . . . 592 11.8.6 Partition into Two Subranges . . . . . . . . . . . . . . . . . . . . . . . . 594 11.9 Sorting Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 11.9.1 Sorting AllElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 11.9.2 Partial Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 11.9.3 Sorting Accordingto the n th Element . . . . . . . . . . . . . . . . . . . 602 11.9.4 HeapAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 11.10 Sorted-Range Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 11.10.1SearchingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 11.10.2MergingElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 11.11 Numeric Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 11.11.1Processing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 11.11.2Converting Relativeand Absolute Va l u e s . . . . . . . . . . . . . . . . . . 627 12 SpecialContainers 631 12.1 Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 12.1.1 The Core Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 12.1.2 Example of UsingStacks . . . . . . . . . . . . . . . . . . . . . . . . . . 633 12.1.3 A User-DefinedStackClass. . . . . . . . . . . . . . . . . . . . . . . . . 635 12.1.4 Classstack in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . 637 12.2 Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 12.2.1 The Core Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 12.2.2 Example of UsingQueues . . . . . . . . . . . . . . . . . . . . . . . . . 640 12.2.3 A User-DefinedQueue Class . . . . . . . . . . . . . . . . . . . . . . . . 641 12.2.4 Classqueue in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . 641 12.3 PriorityQueues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 12.3.1 The Core Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 12.3.2 Example of UsingPriorityQueues. . . . . . . . . . . . . . . . . . . . . 643 12.3.3 Classpriority_queue in Detail . . . . . . . . . . . . . . . . . . . . 644 xvi Contents 12.4 Container Adapters in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 12.4.1 Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 12.4.2 Constructors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 12.4.3 SupplementaryConstructorsfor PriorityQueues. . . . . . . . . . . . . . 646 12.4.4 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 12.5 Bitsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 12.5.1 Examples of UsingBitsets . . . . . . . . . . . . . . . . . . . . . . . . . 651 12.5.2 Classbitsetin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 13 Strings 655 13.1 Purposeof the String Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 13.1.1 A First Example: Extractinga Temporary Filename . . . . . . . . . . . . 656 13.1.2 A Second Example: ExtractingWordsand PrintingThemBackward . . . 660 13.2 Description of the String Classes . . . . . . . . . . . . . . . . . . . . . . . . . . 663 13.2.1 String Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 13.2.2 OperationOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666 13.2.3 Constructorsand Destructor . . . . . . . . . . . . . . . . . . . . . . . . 667 13.2.4 Strings and C-Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 13.2.5 Size and Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 13.2.6 ElementAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 13.2.7 Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 13.2.8 Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 13.2.9 Substringsand String Concatenation . . . . . . . . . . . . . . . . . . . . 676 13.2.10Input/Output Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 13.2.11Searchingand Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 13.2.12The Va l u enpos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 13.2.13Numeric Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 13.2.14Iterator Supportfor Strings . . . . . . . . . . . . . . . . . . . . . . . . . 684 13.2.15Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 13.2.16Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 13.2.17Strings and Ve c t o r s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 13.3 String Classin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 13.3.1 Type Definitionsand StaticVa l u e s . . . . . . . . . . . . . . . . . . . . . 693 13.3.2 Create, Copy,and DestroyOperations . . . . . . . . . . . . . . . . . . . 694 13.3.3 Operationsfor Size and Capacity . . . . . . . . . . . . . . . . . . . . . . 696 13.3.4 Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 13.3.5 Character Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 13.3.6 GeneratingC-Strings and Character Arrays . . . . . . . . . . . . . . . . 700 Contents xvii 13.3.7 ModifyingOperations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 13.3.8 Searchingand Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 13.3.9 Substringsand String Concatenation . . . . . . . . . . . . . . . . . . . . 711 13.3.10Input/Output Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 712 13.3.11Numeric Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 13.3.12GeneratingIterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 13.3.13Allocator Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 14 RegularExpressions 717 14.1 The Regex Matchand Search Interface . . . . . . . . . . . . . . . . . . . . . . . 717 14.2 Dealingwith Subexpressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 14.3 Regex Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 14.4 Regex Token Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 14.5 ReplacingRegularExpressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 14.6 Regex Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 14.7 Regex Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 14.8 The Regex ECMAScriptGrammar . . . . . . . . . . . . . . . . . . . . . . . . . 738 14.9 OtherGrammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 14.10 BasicRegex Signaturesin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . 740 15 Input/Output UsingStreamClasses 743 15.1 Common Background of I/O Streams . . . . . . . . . . . . . . . . . . . . . . . . 744 15.1.1 Stream Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 15.1.2 Stream Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 15.1.3 Global Stream Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 15.1.4 Stream Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 15.1.5 Manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 15.1.6 A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 15.2 FundamentalStream Classesand Objects. . . . . . . . . . . . . . . . . . . . . . 748 15.2.1 Classes and ClassHierarchy . . . . . . . . . . . . . . . . . . . . . . . . 748 15.2.2 Global Stream Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 15.2.3 Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752 15.3 Standard Stream Operators <> . . . . . . . . . . . . . . . . . . . . . . . . 753 15.3.1 Output Operator <> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754 15.3.3 Input/Output of Special Types . . . . . . . . . . . . . . . . . . . . . . . 755 xviii Contents 15.4 Stateof Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 15.4.1 Constants for the Stateof Streams . . . . . . . . . . . . . . . . . . . . . 758 15.4.2 MemberFunctions Accessingthe Stateof Streams. . . . . . . . . . . . . 759 15.4.3 Stream Stateand BooleanConditions . . . . . . . . . . . . . . . . . . . 760 15.4.4 Stream Stateand Exceptions . . . . . . . . . . . . . . . . . . . . . . . . 762 15.5 Standard Input/Output Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 767 15.5.1 MemberFunctions for Input . . . . . . . . . . . . . . . . . . . . . . . . 768 15.5.2 MemberFunctions for Output . . . . . . . . . . . . . . . . . . . . . . . 771 15.5.3 Example Uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 15.5.4 sentryObjects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 15.6 Manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774 15.6.1 Overview of AllManipulators . . . . . . . . . . . . . . . . . . . . . . . 774 15.6.2 How ManipulatorsWork . . . . . . . . . . . . . . . . . . . . . . . . . . 776 15.6.3 User-DefinedManipulators. . . . . . . . . . . . . . . . . . . . . . . . . 777 15.7 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 15.7.1 Format Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 15.7.2 Input/Output Format of BooleanVa l u e s . . . . . . . . . . . . . . . . . . 781 15.7.3 FieldWidth, Fill Character,and Adjustment . . . . . . . . . . . . . . . . 781 15.7.4 PositiveSign and UppercaseLetters . . . . . . . . . . . . . . . . . . . . 784 15.7.5 Numeric Base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 15.7.6 Floating-Point Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 15.7.7 GeneralFormatting Definitions . . . . . . . . . . . . . . . . . . . . . . . 789 15.8 Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 15.9 File Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 15.9.1 File Stream Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 15.9.2 Rvalue and MoveSemanticsfor File Streams . . . . . . . . . . . . . . . 795 15.9.3 File Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 15.9.4 RandomAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 15.9.5 UsingFile Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 15.10 Stream Classesfor Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 15.10.1String Stream Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 15.10.2MoveSemanticsfor String Streams. . . . . . . . . . . . . . . . . . . . . 806 15.10.3char* Stream Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 15.11 Input/Output Operators for User-DefinedTypes . . . . . . . . . . . . . . . . . . . 810 15.11.1Implementing Output Operators . . . . . . . . . . . . . . . . . . . . . . 810 15.11.2Implementing Input Operators . . . . . . . . . . . . . . . . . . . . . . . 812 15.11.3Input/Output UsingAuxiliary Functions . . . . . . . . . . . . . . . . . . 814 Contents xix 15.11.4User-DefinedFormat Flags . . . . . . . . . . . . . . . . . . . . . . . . . 815 15.11.5Conventionsfor User-DefinedInput/Output Operators . . . . . . . . . . . 818 15.12 Connecting Input and Output Streams . . . . . . . . . . . . . . . . . . . . . . . . 819 15.12.1Loose Coupling Usingtie() . . . . . . . . . . . . . . . . . . . . . . . . 819 15.12.2TightCoupling UsingStream Buffers . . . . . . . . . . . . . . . . . . . 820 15.12.3Redirecting Standard Streams. . . . . . . . . . . . . . . . . . . . . . . . 822 15.12.4Streamsfor Readingand Writing. . . . . . . . . . . . . . . . . . . . . . 824 15.13 The Stream Buffer Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826 15.13.1The Stream Buffer Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 826 15.13.2Stream Buffer Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . 828 15.13.3User-DefinedStream Buffers . . . . . . . . . . . . . . . . . . . . . . . . 832 15.14 PerformanceIssues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844 15.14.1Synchronization with C’sStandard Streams . . . . . . . . . . . . . . . . 845 15.14.2Buffering in Stream Buffers . . . . . . . . . . . . . . . . . . . . . . . . . 845 15.14.3UsingStream Buffers Directly . . . . . . . . . . . . . . . . . . . . . . . 846 16 Internationalization 849 16.1 Character Encodingsand Character Sets . . . . . . . . . . . . . . . . . . . . . . . 850 16.1.1 Multibyte and Wide-CharacterText . . . . . . . . . . . . . . . . . . . . . 850 16.1.2 Different Character Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 851 16.1.3 Dealingwith Character Sets in C++ . . . . . . . . . . . . . . . . . . . . 852 16.1.4 Character Traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 16.1.5 Internationalization of Special Characters . . . . . . . . . . . . . . . . . 857 16.2 The Conceptof Locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857 16.2.1 UsingLocales. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858 16.2.2 Locale Facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864 16.3 Localesin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 866 16.4 Facets in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 16.4.1 Numeric Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870 16.4.2 Monetary Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874 16.4.3 Timeand Date Formatting . . . . . . . . . . . . . . . . . . . . . . . . . 884 16.4.4 Character Classification and Conversion . . . . . . . . . . . . . . . . . . 891 16.4.5 String Collation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904 16.4.6 Internationalized Messages . . . . . . . . . . . . . . . . . . . . . . . . . 905 xx Contents 17 Numerics 907 17.1 RandomNumbers and Distributions. . . . . . . . . . . . . . . . . . . . . . . . . 907 17.1.1 A First Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908 17.1.2 Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912 17.1.3 Enginesin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915 17.1.4 Distributions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917 17.1.5 Distributionsin Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921 17.2 Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925 17.2.1 Classcomplex in General . . . . . . . . . . . . . . . . . . . . . . . . 925 17.2.2 Examples UsingClasscomplex . . . . . . . . . . . . . . . . . . . . . 926 17.2.3 Operationsfor Complex Numbers . . . . . . . . . . . . . . . . . . . . . 928 17.2.4 Classcomplex in Detail . . . . . . . . . . . . . . . . . . . . . . . . . 935 17.3 Global Numeric Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941 17.4 Va l a r r a y s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943 18 Concurrency 945 18.1 The High-Level Interface: async() and Futures . . . . . . . . . . . . . . . . . . 946 18.1.1 A First Example Usingasync() and Futures . . . . . . . . . . . . . . . 946 18.1.2 AnExample of Waitingfor Two Tasks . . . . . . . . . . . . . . . . . . . 955 18.1.3 Shared Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960 18.2 The Low-Level Interface: Threadsand Promises . . . . . . . . . . . . . . . . . . 964 18.2.1 Classstd::thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964 18.2.2 Promises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969 18.2.3 Classpackaged_task . . . . . . . . . . . . . . . . . . . . . . . . . . 972 18.3 Startinga Thread in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973 18.3.1 async() in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974 18.3.2 Futuresin Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975 18.3.3 Shared Futuresin Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . 976 18.3.4 Classstd::promise in Detail . . . . . . . . . . . . . . . . . . . . . . . 977 18.3.5 Classstd::packaged_task in Detail . . . . . . . . . . . . . . . . . . . 977 18.3.6 Classstd::thread in Detail . . . . . . . . . . . . . . . . . . . . . . . . 979 18.3.7 Namespace this_thread . . . . . . . . . . . . . . . . . . . . . . . . . 981 18.4 Synchronizing Threads, or the Problem of Concurrency . . . . . . . . . . . . . . 982 18.4.1 Bewareof Concurrency! . . . . . . . . . . . . . . . . . . . . . . . . . . 982 18.4.2 The Reason for the Problem of Concurrent Data Access . . . . . . . . . . 983 18.4.3 WhatExactlyCan GoWrong (the Extent of the Problem) . . . . . . . . . 983 18.4.4 The Features to Solvethe Problems . . . . . . . . . . . . . . . . . . . . . 987 Contents xxi 18.5 Mutexesand Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989 18.5.1 UsingMutexesand Locks . . . . . . . . . . . . . . . . . . . . . . . . . . 989 18.5.2 Mutexesand Locks in Detail . . . . . . . . . . . . . . . . . . . . . . . . 998 18.5.3 Calling Oncefor MultipleThreads . . . . . . . . . . . . . . . . . . . . . 1000 18.6 ConditionVa r i a b l e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003 18.6.1 Purposeof ConditionVa r i a b l e s . . . . . . . . . . . . . . . . . . . . . . . 1003 18.6.2 A First Complete Example for ConditionVa r i a b l e s . . . . . . . . . . . . 1004 18.6.3 UsingConditionVa r i a b l e s to Implement a Queue for MultipleThreads . . 1006 18.6.4 ConditionVa r i a b l e s in Detail . . . . . . . . . . . . . . . . . . . . . . . . 1009 18.7 Atomics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012 18.7.1 Example of UsingAtomics . . . . . . . . . . . . . . . . . . . . . . . . . 1012 18.7.2 Atomicsand TheirHigh-Level Interface in Detail . . . . . . . . . . . . . 1016 18.7.3 The C-StyleInterface of Atomics . . . . . . . . . . . . . . . . . . . . . . 1019 18.7.4 The Low-Level Interface of Atomics . . . . . . . . . . . . . . . . . . . . 1019 19 Allocators 1023 19.1 UsingAllocatorsas an Application Programmer . . . . . . . . . . . . . . . . . . 1023 19.2 A User-DefinedAllocator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1024 19.3 UsingAllocatorsas a LibraryProgrammer . . . . . . . . . . . . . . . . . . . . . 1026 Bibliography 1031 Newsgroups and Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031 Books and Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032 Index 1037 This page intentionally left blank

2014-05-18

UNIX高级环境编程(第三版)英文版+源代码+高清完整PDF版

Advanced Programming in the UNIX Environment 3rd Edition UNIX高级环境编程(第三版)英文版+源代码+PDF 非扫描版,有目录。 Contents Foreword to the Second Edition xix Preface xxi Preface to the Second Edition xxv Preface to the First Edition xxix Chapter 1. UNIX System Overview 1 1.1 Introduction 1 1.2 UNIX Architecture 1 1.3 Logging In 2 1.4 Files and Directories 4 1.5 Input and Output 8 1.6 Programs and Processes 10 1.7 Error Handling 14 1.8 User Identification 16 1.9 Signals 18 1.10 Time Values 20 1.11 System Calls and Library Functions 21 1.12 Summary 23 Chapter 2. UNIX Standardization and Implementations 25 2.1 Introduction 25 2.2 UNIX Standardization 25 2.2.1 ISO C 25 2.2.2 IEEE POSIX 26 2.2.3 The Single UNIX Specification 30 2.2.4 FIPS 32 2.3 UNIX System Implementations 33 2.3.1 UNIX System V Release 4 33 2.3.2 4.4BSD 34 2.3.3 FreeBSD 34 2.3.4 Linux 35 2.3.5 Mac OS X 35 2.3.6 Solaris 35 2.3.7 Other UNIX Systems 35 2.4 Relationship of Standards and Implementations 36 2.5 Limits 36 2.5.1 ISO C Limits 37 2.5.2 POSIX Limits 38 2.5.3 XSI Limits 41 2.5.4 sysconf, pathconf, and fpathconf Functions 42 2.5.5 Indeterminate Runtime Limits 49 2.6 Options 53 2.7 Feature Test Macros 57 2.8 Primitive System Data Types 58 2.9 Differences Between Standards 58 2.10 Summary 60 Chapter 3. File I/O 61 3.1 Introduction 61 3.2 File Descriptors 61 3.3 open and openat Functions 62 3.4 creat Function 66 3.5 close Function 66 3.6 lseek Function 66 3.7 read Function 71 3.8 write Function 72 3.9 I/O Efficiency 72 3.10 File Sharing 74 3.11 Atomic Operations 77 3.12 dup and dup2 Functions 79 3.13 sync, fsync, and fdatasync Functions 81 3.14 fcntl Function 82 3.15 ioctl Function 87 3.16 /dev/fd 88 3.17 Summary 90 Chapter 4. Files and Directories 93 4.1 Introduction 93 4.2 stat, fstat, fstatat, and lstat Functions 93 4.3 File Types 95 4.4 Set-User-ID and Set-Group-ID 98 4.5 File Access Permissions 99 4.6 Ownership of New Files and Directories 101 4.7 access and faccessat Functions 102 4.8 umask Function 104 4.9 chmod, fchmod, and fchmodat Functions 106 4.10 Sticky Bit 108 4.11 chown, fchown, fchownat, and lchown Functions 109 4.12 File Size 111 4.13 File Truncation 112 4.14 File Systems 113 4.15 link, linkat, unlink, unlinkat, and remove Functions 116 4.16 rename and renameat Functions 119 4.17 Symbolic Links 120 4.18 Creating and Reading Symbolic Links 123 4.19 File Times 124 4.20 futimens, utimensat, and utimes Functions 126 4.21 mkdir, mkdirat, and rmdir Functions 129 4.22 Reading Directories 130 4.23 chdir, fchdir, and getcwd Functions 135 4.24 Device Special Files 137 4.25 Summary of File Access Permission Bits 140 4.26 Summary 140 Chapter 5. Standard I/O Library 143 5.1 Introduction 143 5.2 Streams and FILE Objects 143 5.3 Standard Input, Standard Output, and Standard Error 145 5.4 Buffering 145 5.5 Opening a Stream 148 5.6 Reading and Writing a Stream 150 5.7 Line-at-a-Time I/O 152 5.8 Standard I/O Efficiency 153 5.9 Binary I/O 156 5.10 Positioning a Stream 157 5.11 Formatted I/O 159 5.12 Implementation Details 164 5.13 Temporary Files 167 5.14 Memory Streams 171 5.15 Alternatives to Standard I/O 174 5.16 Summary 175 Chapter 6. System Data Files and Information 177 6.1 Introduction 177 6.2 Password File 177 6.3 Shadow Passwords 181 6.4 Group File 182 6.5 Supplementary Group IDs 183 6.6 Implementation Differences 184 6.7 Other Data Files 185 6.8 Login Accounting 186 6.9 System Identification 187 6.10 Time and Date Routines 189 6.11 Summary 196 Chapter 7. Process Environment 197 7.1 Introduction 197 7.2 main Function 197 7.3 Process Termination 198 7.4 Command-Line Arguments 203 7.5 Environment List 203 7.6 Memory Layout of a C Program 204 7.7 Shared Libraries 206 7.8 Memory Allocation 207 7.9 Environment Variables 210 7.10 setjmp and longjmp Functions 213 7.11 getrlimit and setrlimit Functions 220 7.12 Summary 225 Chapter 8. Process Control 227 8.1 Introduction 227 8.2 Process Identifiers 227 8.3 fork Function 229 8.4 vfork Function 234 8.5 exit Functions 236 8.6 wait and waitpid Functions 238 8.7 waitid Function 244 8.8 wait3 and wait4 Functions 245 8.9 Race Conditions 245 8.10 exec Functions 249 8.11 Changing User IDs and Group IDs 255 8.12 Interpreter Files 260 8.13 system Function 264 8.14 Process Accounting 269 8.15 User Identification 275 8.16 Process Scheduling 276 8.17 Process Times 280 8.18 Summary 282 Chapter 9. Process Relationships 285 9.1 Introduction 285 9.2 Terminal Logins 285 9.3 Network Logins 290 9.4 Process Groups 293 9.5 Sessions 295 9.6 Controlling Terminal 296 9.7 tcgetpgrp, tcsetpgrp, and tcgetsid Functions 298 9.8 Job Control 299 9.9 Shell Execution of Programs 303 9.10 Orphaned Process Groups 307 9.11 FreeBSD Implementation 310 9.12 Summary 312 Chapter 10. Signals 313 10.1 Introduction 313 10.2 Signal Concepts 313 10.3 signal Function 323 10.4 Unreliable Signals 326 10.5 Interrupted System Calls 327 10.6 Reentrant Functions 330 10.7 SIGCLD Semantics 332 10.8 Reliable-Signal Terminology and Semantics 335 10.9 kill and raise Functions 336 10.10 alarm and pause Functions 338 10.11 Signal Sets 344 10.12 sigprocmask Function 346 10.13 sigpending Function 347 10.14 sigaction Function 349 10.15 sigsetjmp and siglongjmp Functions 355 10.16 sigsuspend Function 359 10.17 abort Function 365 10.18 system Function 367 10.19 sleep, nanosleep, and clock_nanosleep Functions 373 10.20 sigqueue Function 376 10.21 Job-Control Signals 377 10.22 Signal Names and Numbers 379 10.23 Summary 381 Chapter 11. Threads 383 11.1 Introduction 383 11.2 Thread Concepts 383 11.3 Thread Identification 384 11.4 Thread Creation 385 11.5 Thread Termination 388 11.6 Thread Synchronization 397 11.6.1 Mutexes 399 11.6.2 Deadlock Avoidance 402 11.6.3 pthread_mutex_timedlock Function 407 11.6.4 Reader-Writer Locks 409 11.6.5 Reader-Writer Locking with Timeouts 413 11.6.6 Condition Variables 413 11.6.7 Spin Locks 417 11.6.8 Barriers 418 11.7 Summary 422 Chapter 12. Thread Control 425 12.1 Introduction 425 12.2 Thread Limits 425 12.3 Thread Attributes 426 12.4 Synchronization Attributes 430 12.4.1 Mutex Attributes 430 12.4.2 Reader-Writer Lock Attributes 439 12.4.3 Condition Variable Attributes 440 12.4.4 Barrier Attributes 441 12.5 Reentrancy 442 12.6 Thread-Specific Data 446 12.7 Cancel Options 451 12.8 Threads and Signals 453 12.9 Threads and fork 457 12.10 Threads and I/O 461 12.11 Summary 462 Chapter 13. Daemon Processes 463 13.1 Introduction 463 13.2 Daemon Characteristics 463 13.3 Coding Rules 466 13.4 Error Logging 469 13.5 Single-Instance Daemons 473 13.6 Daemon Conventions 474 13.7 Client-Server Model 479 13.8 Summary 480 Chapter 14. Advanced I/O 481 14.1 Introduction 481 14.2 Nonblocking I/O 481 14.3 Record Locking 485 14.4 I/O Multiplexing 500 14.4.1 select and pselect Functions 502 14.4.2 poll Function 506 14.5 Asynchronous I/O 509 14.5.1 System V Asynchronous I/O 510 14.5.2 BSD Asynchronous I/O 510 14.5.3 POSIX Asynchronous I/O 511 14.6 readv and writev Functions 521 14.7 readn and writen Functions 523 14.8 Memory-Mapped I/O 525 14.9 Summary 531 Chapter 15. Interprocess Communication 533 15.1 Introduction 533 15.2 Pipes 534 15.3 popen and pclose Functions 541 15.4 Coprocesses 548 15.5 FIFOs 552 15.6 XSI IPC 556 15.6.1 Identifiers and Keys 556 15.6.2 Permission Structure 558 15.6.3 Configuration Limits 559 15.6.4 Advantages and Disadvantages 559 15.7 Message Queues 561 15.8 Semaphores 565 15.9 Shared Memory 571 15.10 POSIX Semaphores 579 15.11 Client-Server Properties 585 15.12 Summary 587 Chapter 16. Network IPC: Sockets 589 16.1 Introduction 589 16.2 Socket Descriptors 590 16.3 Addressing 593 16.3.1 Byte Ordering 593 16.3.2 Address Formats 595 16.3.3 Address Lookup 597 16.3.4 Associating Addresses with Sockets 604 16.4 Connection Establishment 605 16.5 Data Transfer 610 16.6 Socket Options 623 16.7 Out-of-Band Data 626 16.8 Nonblocking and Asynchronous I/O 627 16.9 Summary 628 Chapter 17. Advanced IPC 629 17.1 Introduction 629 17.2 UNIX Domain Sockets 629 17.2.1 Naming UNIX Domain Sockets 634 17.3 Unique Connections 635 17.4 Passing File Descriptors 642 17.5 An Open Server, Version 1 653 17.6 An Open Server, Version 2 659 17.7 Summary 669 Chapter 18. Terminal I/O 671 18.1 Introduction 671 18.2 Overview 671 18.3 Special Input Characters 678 18.4 Getting and Setting Terminal Attributes 683 18.5 Terminal Option Flags 683 18.6 stty Command 691 18.7 Baud Rate Functions 692 18.8 Line Control Functions 693 18.9 Terminal Identification 694 18.10 Canonical Mode 700 18.11 Noncanonical Mode 703 18.12 Terminal Window Size 710 18.13 termcap, terminfo, and curses 712 18.14 Summary 713 Chapter 19. Pseudo Terminals 715 19.1 Introduction 715 19.2 Overview 715 19.3 Opening Pseudo-Terminal Devices 722 19.4 pty_fork Function 726 19.5 pty Program 729 19.6 Using the pty Program 733 19.7 Advanced Features 740 19.8 Summary 741 Chapter 20. A Database Library 743 20.1 Introduction 743 20.2 History 743 20.3 The Library 744 20.4 Implementation Overview 746 20.5 Centralized or Decentralized? 750 20.6 Concurrency 752 20.7 Building the Library 753 20.8 Source Code 753 20.9 Performance 781 20.10 Summary 786 Chapter 21. Communicating with a Network Printer 789 21.1 Introduction 789 21.2 The Internet Printing Protocol 789 21.3 The Hypertext Transfer Protocol 792 21.4 Printer Spooling 793 21.5 Source Code 795 21.6 Summary 843 Appendix A. Function Prototypes 845 Appendix B. Miscellaneous Source Code 895 B.1 Our Header File 895 B.2 Standard Error Routines 898 Appendix C. Solutions to Selected Exercises 905 Bibliography 947 Index 955 更多内容请访问: http://www.apuebook.com/

2013-10-21

分区助手专业版4.0

用这工具里的EPW.exe把FAT32转换成NTFS后,再把C盘容量扩大啦 中文版,菜鸟级被用的。 智能提示我先把先把虚拟内存中D盘页面文件先清除再扩容

2013-03-24

Programming in Objective-C (Fourth Edition ) Stephen G. Kochan

英文版 有目录 非影印版 Contents at a Glance 1 Introduction 1 2 Programming in Objective-C 7 3 Classes, Objects, and Methods 27 4 Data Types and Expressions 51 5 Program Looping 71 6 Making Decisions 93 7 More on Classes 127 8 Inheritance 151 9 Polymorphism, Dynamic Typing, and Dynamic Binding 177 10 More on Variables and Data Types 195 11 Categories and Protocols 219 12 The Preprocessor 233 13 Underlying C Language Features 247 14 Introduction to the Foundation Framework 303 15 Numbers, Strings, and Collections 307 16 Working with Files 369 17 Memory Management and Automatic Reference Counting 399 18 Copying Objects 413 19 Archiving 425 20 Introduction to Cocoa and Cocoa Touch 443 21 Writing iOS Applications 447 A Glossary 479 B Address Book Example Source Code 487 Index 493

2012-11-17

计算机组成原理(第2版)_唐朔飞

计算机组成原理(第二版)_唐朔飞 扫描版 共434页 2009年11月第6次印刷。

2012-04-07

Linux那些事儿.rar

注:下载后,评价时给5星,还你11分 Linux那些事儿.rar Linux那些事儿.rar Linux那些事儿.rar

2011-04-17

C语言程序设计(非扫描版).pdf

注:下载后,评价时给5星,还你11分 C语言程序设计.pdf C语言程序设计.pdf

2011-04-17

数据结构(C语言版).严蔚敏_吴伟民(最新版).pdf

注:下载后,评价时给5星,还你11分 数据结构(C语言版).严蔚敏_吴伟民.扫描版.zip 清华大学出版社

2011-04-17

FVP密码查看工具FVP密码查看工具

注:下载后,评价时给5星,还你11分 FVP密码查看工具 能够查看网页中保留的密码*****

2011-04-12

Red Hat Linux 9.0基础教程.zip

注:下载后,评价时给5星,还你11分 Red Hat Linux 9.0基础教程.zip

2011-04-10

百度工具栏.zip 百度工具箱

注:下载后,评价时给5星,还你11分 用IE浏览器时,装上这个百度工具箱,可下载网页上的各种音频视频,非常方便!

2011-04-10

完整版《数据结构1800题+答案》

注:下载后,评价时给5星,还你11分 完整版《数据结构1800题+答案》

2011-04-09

Linux完整教程(初级教程).CHM

注:下载后,评价时给5星,还你11分 全部来网上论坛精华!

2011-04-04

IBM.PC.汇编语言程序设计(第五版)完整版.pdf

注:下载后,评价时给5星,还你11分 注:下载后,评价时给5星,还你11分 注:下载后,评价时给5星,还你11分

2011-04-04

The C programming Language.chm

注:下载后,评价时给5星,还你11分 Contents Preface Preface to the first edition Introduction Chapter 1: A Tutorial Introduction Getting Started Variables and Arithmetic Expressions The for statement Symbolic Constants Character Input and Output File Copying Character Counting Line Counting Word Counting Arrays Functions Arguments - Call by Value Character Arrays External Variables and Scope Chapter 2: Types, Operators and Expressions Variable Names Data Types and Sizes Constants Declarations Arithmetic Operators Relational and Logical Operators Type Conversions Increment and Decrement Operators Bitwise Operators Assignment Operators and Expressions Conditional Expressions Precedence and Order of Evaluation Chapter 3: Control Flow Statements and Blocks If-Else Else-If Switch Loops - While and For Loops - Do-While Break and Continue Goto and labels Chapter 4: Functions and Program Structure Basics of Functions Functions Returning Non-integers External Variables Scope Rules Header Files Static Variables Register Variables Block Structure Initialization Recursion The C Preprocessor File Inclusion Macro Substitution Conditional Inclusion Chapter 5: Pointers and Arrays Pointers and Addresses Pointers and Function Arguments Pointers and Arrays Address Arithmetic Character Pointers and Functions Pointer Arrays; Pointers to Pointers Multi-dimensional Arrays Initialization of Pointer Arrays Pointers vs. Multi-dimensional Arrays Command-line Arguments Pointers to Functions Complicated Declarations Chapter 6: Structures Basics of Structures Structures and Functions Arrays of Structures Pointers to Structures Self-referential Structures Table Lookup Typedef Unions Bit-fields Chapter 7: Input and Output Standard Input and Output Formatted Output - printf Variable-length Argument Lists Formatted Input - Scanf File Access Error Handling - Stderr and Exit Line Input and Output Miscellaneous Functions String Operations Character Class Testing and Conversion Ungetc Command Execution Storage Management Mathematical Functions Random Number generation Chapter 8: The UNIX System Interface File Descriptors Low Level I/O - Read and Write Open, Creat, Close, Unlink Random Access - Lseek Example - An implementation of Fopen and Getc Example - Listing Directories Example - A Storage Allocator Appendix A: Reference Manual Introduction Lexical Conventions Syntax Notation Meaning of Identifiers Objects and Lvalues Conversions Expressions Declarations Statements External Declarations Scope and Linkage Preprocessor Grammar Appendix B: Standard Library Input and Output: <stdio.h> File Operations Formatted Output Formatted Input Character Input and Output Functions Direct Input and Output Functions File Positioning Functions Error Functions Character Class Tests: <ctype.h> String Functions: <string.h> Mathematical Functions: <math.h> Utility Functions: <stdlib.h> Diagnostics: <assert.h> Variable Argument Lists: <stdarg.h> Non-local Jumps: <setjmp.h> Signals: <signal.h> Date and Time Functions: <time.h> Implementation-defined Limits: <limits.h> and <float.h>

2011-04-04

数学建模竞赛教程.pdf

注:下载后,评价时给5星,还你11分 很经典的一本数模教材!

2011-04-04

Dos2Win.CHM

Dos2Win.CHM Dos2Win.CHM Dos2Win.CHM Dos2Win.CHM

2011-04-03

汇编程序设计教程.chm

注:下载后,评价时给5星,还你11分 课程介绍 第1章 预备知识  1.1 汇编语言的由来及其特点   1 机器语言   2 汇编语言   3 汇编程序   4 汇编语言的主要特点   5 汇编语言的使用领域  1.2 数据的表示和类型   1 数值数据的表示   2 非数值数据的表示   3 基本的数据类型  1.3 习题 第2章 CPU资源和存储器  2.1 寄存器组   1 寄存器组   2 通用寄存器的作用   3 专用寄存器的作用  2.2 存储器的管理模式   1 16位微机的内存管理模式   2 32位微机的内存管理模式  2.3 习题 第3章 操作数的寻址方式  3.1 立即寻址方式  3.2 寄存器寻址方式  3.3 直接寻址方式  3.4 寄存器间接寻址方式  3.5 寄存器相对寻址方式  3.6 基址加变址寻址方式  3.7 相对基址加变址寻址方式  3.8 32位地址的寻址方式  3.9 操作数寻址方式的小结  3.10 习题 第4章 标识符和表达式  4.1 标识符  4.2 简单内存变量的定义   1 内存变量定义的一般形式   2 字节变量   3 字变量   4 双字变量   5 六字节变量   6 八字节变量   7 十字节变量  4.3 调整偏移量伪指令   1 偶对齐伪指令   2 对齐伪指令   3 调整偏移量伪指令   4 偏移量计数器的值  4.4 复合内存变量的定义   1 重复说明符   2 结构类型的定义   3 联合类型的定义   4 记录类型的定义   5 数据类型的自定义  4.5 标号  4.6 内存变量和标号的属性   1 段属性操作符   2 偏移量属性操作符   3 类型属性操作符   4 长度属性操作符   5 容量属性操作符   6 强制属性操作符   7 存储单元别名操作符  4.7 表达式   1 进制伪指令   2 数值表达式   3 地址表达式  4.8 符号定义语句   1 等价语句   2 等号语句   3 符号名定义语句  4.9 习题 第5章 微机CPU的指令系统  5.1 汇编语言指令格式   1 指令格式   2 了解指令的几个方面  5.2 指令系统   1 数据传送指令   2 标志位操作指令   3 算术运算指令   4 逻辑运算指令   5 移位操作指令   6 位操作指令   7 比较运算指令   8 循环指令   9 转移指令   10 条件设置字节指令   11 字符串操作指令   12 ASCII-BCD码调整指令   13 处理器指令  5.3 习题 第6章 程序的基本结构  6.1 程序的基本组成   1 段的定义   2 段寄存器的说明语句   3 堆栈段的说明   4 源程序的结构  6.2 程序的基本结构   1 顺序结构   2 分支结构   3 循环结构  6.3 段的基本属性   1 对齐类型   2 组合类型   3 类别   4 段组  6.4 简化的段定义   1 存储模型说明伪指令   2 简化段定义伪指令   3 简化段段名的引用  6.5 源程序的辅助说明伪指令   1 模块名定义伪指令   2 页面定义伪指令   3 标题定义伪指令   4 子标题定义伪指令  6.6 习题 第7章 子程序和库  7.1 子程序的定义  7.2 子程序的调用和返回指令   1 调用指令   2 返回指令  7.3 子程序的参数传递   1 寄存器传递参数   2 存储单元传递参数   3 堆栈传递参数  7.4 寄存器的保护与恢复  7.5 子程序的完全定义   1 子程序完全定义格式   2 子程序的位距   3 子程序的语言类型   4 子程序的可见性   5 子程序的起始和结束操作   6 寄存器的保护和恢复   7 子程序的参数传递   8 子程序的原型说明   9 子程序的调用伪指令   10 局部变量的定义  7.6 子程序库   1 建立库文件命令   2 建立库文件举例   3 库文件的应用   4 库文件的好处  7.7 习题 第8章 输入输出和中断  8.1 输入输出的基本概念   1 I/O端口地址   2 I/O指令  8.2 中断   1 中断的基本概念   2 中断指令   3 中断返回指令   4 中断和子程序  8.3 中断的分类   1 键盘输入的中断功能   2 屏幕显示的中断功能   3 打印输出的中断功能   4 串行通信口的中断功能   5 鼠标的中断功能   6 目录和文件的中断功能   7 内存管理的中断功能   8 读取和设置中断向量  8.4 习题 第9章 宏  9.1 宏的定义和引用   1 宏的定义   2 宏的引用   3 宏的参数传递方式   4 宏的嵌套定义   5 宏与子程序的区别  9.2 宏参数的特殊运算符   1 连接运算符   2 字符串整体传递运算符   3 字符转义运算符   4 计算表达式运算符  9.3 与宏有关的伪指令   1 局部标号伪指令   2 取消宏定义伪指令   3 中止宏扩展伪指令  9.4 重复汇编伪指令   1 伪指令REPT   2 伪指令IRP   3 伪指令IRPC  9.5 条件汇编伪指令   1 条件汇编伪指令的功能   2 条件汇编伪指令的举例  9.6 宏的扩充   1 宏定义形式   2 重复伪指令REPEAT   3 循环伪指令WHILE   4 循环伪指令FOR   5 循环伪指令FORC   6 转移伪指令GOTO   7 宏扩充的举例   8 系统定义的宏  9.7 习题 第10章 应用程序的设计  10.1 字符串的处理程序  10.2 数据的分类统计程序  10.3 数据转换程序  10.4 文件操作程序  10.5 动态数据的编程  10.6 COM文件的编程  10.7 驻留程序  10.8 程序段前缀及其应用   1 程序段前缀的字段含义   2 程序段前缀的应用  10.9 习题 第11章 数值运算协处理器  11.1 协处理器的数据格式   1 有符号整数   2 BCD码数据   3 浮点数  11.2 协处理器的结构  11.3 协处理器的指令系统   1 操作符的命名规则   2 数据传送指令   3 数学运算指令   4 比较运算指令   5 超越函数运算指令   6 常数操作指令   7 协处理器控制指令  11.4 协处理器的编程举例  11.5 习题 第12章 汇编语言和C语言  12.1 汇编语言的嵌入  12.2 C语言程序的汇编输出  12.3 一个具体的例子  12.4 习题 附录

2011-04-03

[麻省理工学院-算法导论](英文版).chm

注:下载后,评价时给5星,还你11分 Table of Contents Introduction to Algorithms, Second Edition Preface Part I - Foundations Chapter 1 - The Role of Algorithms in Computing Chapter 2 - Getting Started Chapter 3 - Growth of Functions Chapter 4 - Recurrences Chapter 5 - Probabilistic Analysis and Randomized Algorithms Part II - Sorting and Order Statistics Chapter 6 - Heapsort Chapter 7 - Quicksort Chapter 8 - Sorting in Linear Time Chapter 9 - Medians and Order Statistics Part III - Data Structures Chapter 10 - Elementary Data Structures Chapter 11 - Hash Tables Chapter 12 - Binary Search Trees Chapter 13 - Red-Black Trees Chapter 14 - Augmenting Data Structures Part IV - Advanced Design and Analysis Techniques Chapter 15 - Dynamic Programming Chapter 16 - Greedy Algorithms Chapter 17 - Amortized Analysis Part V - Advanced Data Structures Chapter 18 - B-Trees Chapter 19 - Binomial Heaps Chapter 20 - Fibonacci Heaps Chapter 21 - Data Structures for Disjoint Sets Part VI - Graph Algorithms Chapter 22 - Elementary Graph Algorithms Chapter 23 - Minimum Spanning Trees Chapter 24 - Single-Source Shortest Paths Chapter 25 - All-Pairs Shortest Paths Chapter 26 - Maximum Flow Part VII - Selected Topics Chapter 27 - Sorting Networks Chapter 28 - Matrix Operations Chapter 29 - Linear Programming Chapter 30 - Polynomials and the FFT Chapter 31 - Number-Theoretic Algorithms Chapter 32 - String Matching Chapter 33 - Computational Geometry Chapter 34 - NP-Completeness Chapter 35 - Approximation Algorithms Part VIII - Appendix: Mathematical Background Appendix A - Summations Appendix B - Sets, Etc. Appendix C - Counting and Probability Bibliography Index List of Figures List of Corollaries List of Problems List of Exercises

2011-04-03

UNIX环境高级编程.pdf

注:下载后,评价时给5星,还你11分 第1章U N I X基础知识 第2章U N I X标准化及实现 第3章文件I / O 第4章文件和目录 第5章标准I/O 库 第6章系统数据文件和信息 第7章U N I X进程的环境 第8章进程控制 第9章进程关系 第10章信号 第11章终端I / O 第1 2章高级I / O 第1 3章精灵进程 第1 4章进程间通信 第1 5章高级进程间通信 第1 6章数据库函数库 第1 7章与PostScript 打印机通信 第1 8章调制解调器拨号器 第1 9章伪终端

2011-04-03

多线程编程指南.pdf

注:下载后,评价时给5星,还你11分 前言.......................................................................................................................................................11 1 多线程基础介绍.................................................................................................................................15 定义多线程术语................................................................................................................................ 15 符合多线程标准................................................................................................................................ 16 多线程的益处.................................................................................................................................... 17 提高应用程序的响应................................................................................................................. 17 有效使用多处理器..................................................................................................................... 17 改进程序结构.............................................................................................................................. 17 占用较少的系统资源................................................................................................................. 17 结合线程和RPC(远程过程调用) ...................................................................................... 18 多线程概念......................................................................................................................................... 18 并发性和并行性......................................................................................................................... 18 多线程结构一览......................................................................................................................... 18 线程调度..................................................................................................................................... 19 线程取消..................................................................................................................................... 19 线程同步..................................................................................................................................... 20 使用64 位体系结构........................................................................................................................... 20 2 基本线程编程.....................................................................................................................................23 线程库................................................................................................................................................. 23 创建缺省线程.............................................................................................................................. 23 等待线程终止.............................................................................................................................. 25 简单线程的示例......................................................................................................................... 26 分离线程..................................................................................................................................... 28 为线程特定数据创建键............................................................................................................ 29 删除线程特定数据键................................................................................................................. 30 3 设置线程特定数据..................................................................................................................... 31 获取线程特定数据..................................................................................................................... 32 获取线程标识符......................................................................................................................... 36 比较线程ID ................................................................................................................................ 36 初始化线程................................................................................................................................. 37 停止执行线程.............................................................................................................................. 38 设置线程的优先级..................................................................................................................... 38 获取线程的优先级..................................................................................................................... 39 向线程发送信号......................................................................................................................... 40 访问调用线程的信号掩码........................................................................................................ 41 安全地Fork ................................................................................................................................. 42 终止线程..................................................................................................................................... 42 结束.............................................................................................................................................. 43 取消线程..................................................................................................................................... 43 取消线程..................................................................................................................................... 45 启用或禁用取消功能................................................................................................................. 45 设置取消类型.............................................................................................................................. 46 创建取消点................................................................................................................................. 47 将处理程序推送到栈上............................................................................................................ 48 从栈中弹出处理程序................................................................................................................. 48 3 线程属性..............................................................................................................................................51 属性对象............................................................................................................................................. 51 初始化属性................................................................................................................................. 52 销毁属性..................................................................................................................................... 53 设置分离状态.............................................................................................................................. 54 获取分离状态.............................................................................................................................. 55 设置栈溢出保护区大小............................................................................................................ 56 获取栈溢出保护区大小............................................................................................................ 57 设置范围..................................................................................................................................... 58 获取范围..................................................................................................................................... 59 设置线程并行级别..................................................................................................................... 60 获取线程并行级别..................................................................................................................... 60 设置调度策略.............................................................................................................................. 61 获取调度策略.............................................................................................................................. 62 目录 4 多线程编程指南• 2006年10月 设置继承的调度策略................................................................................................................. 63 获取继承的调度策略................................................................................................................. 64 设置调度参数.............................................................................................................................. 64 获取调度参数.............................................................................................................................. 65 设置栈大小................................................................................................................................. 67 获取栈大小................................................................................................................................. 68 关于栈.......................................................................................................................................... 69 设置栈地址和大小..................................................................................................................... 71 获取栈地址和大小..................................................................................................................... 73 4 用同步对象编程.................................................................................................................................75 互斥锁属性......................................................................................................................................... 76 初始化互斥锁属性对象............................................................................................................ 77 销毁互斥锁属性对象................................................................................................................. 78 设置互斥锁的范围..................................................................................................................... 79 获取互斥锁的范围..................................................................................................................... 80 设置互斥锁类型的属性............................................................................................................ 80 获取互斥锁的类型属性............................................................................................................ 82 设置互斥锁属性的协议............................................................................................................ 82 获取互斥锁属性的协议............................................................................................................ 84 设置互斥锁属性的优先级上限............................................................................................... 85 获取互斥锁属性的优先级上限............................................................................................... 86 设置互斥锁的优先级上限........................................................................................................ 87 获取互斥锁的优先级上限........................................................................................................ 88 设置互斥锁的强健属性............................................................................................................ 89 获取互斥锁的强健属性............................................................................................................ 90 使用互斥锁......................................................................................................................................... 91 初始化互斥锁.............................................................................................................................. 92 使互斥保持一致......................................................................................................................... 93 锁定互斥锁................................................................................................................................. 94 解除锁定互斥锁......................................................................................................................... 96 使用非阻塞互斥锁锁定............................................................................................................ 97 销毁互斥锁................................................................................................................................. 98 互斥锁定的代码示例................................................................................................................. 99 条件变量属性.................................................................................................................................. 105 目录 5 初始化条件变量属性............................................................................................................... 106 删除条件变量属性................................................................................................................... 106 设置条件变量的范围............................................................................................................... 107 获取条件变量的范围............................................................................................................... 108 使用条件变量.................................................................................................................................. 109 初始化条件变量....................................................................................................................... 109 基于条件变量阻塞................................................................................................................... 111 解除阻塞一个线程................................................................................................................... 112 在指定的时间之前阻塞.......................................................................................................... 114 在指定的时间间隔内阻塞...................................................................................................... 116 解除阻塞所有线程................................................................................................................... 117 销毁条件变量状态................................................................................................................... 119 唤醒丢失问题............................................................................................................................ 120 生成方和使用者问题............................................................................................................... 120 使用信号进行同步.......................................................................................................................... 124 命名信号和未命名信号.......................................................................................................... 125 计数信号量概述....................................................................................................................... 125 初始化信号............................................................................................................................... 126 增加信号................................................................................................................................... 128 基于信号计数进行阻塞.......................................................................................................... 129 减小信号计数............................................................................................................................ 129 销毁信号状态............................................................................................................................ 130 使用信号时的生成方和使用者问题.................................................................................... 131 读写锁属性....................................................................................................................................... 133 初始化读写锁属性................................................................................................................... 134 销毁读写锁属性....................................................................................................................... 134 设置读写锁属性....................................................................................................................... 135 获取读写锁属性....................................................................................................................... 136 使用读写锁....................................................................................................................................... 136 初始化读写锁............................................................................................................................ 137 获取读写锁中的读锁............................................................................................................... 138 读取非阻塞读写锁中的锁...................................................................................................... 139 写入读写锁中的锁................................................................................................................... 139 写入非阻塞读写锁中的锁...................................................................................................... 140 解除锁定读写锁....................................................................................................................... 140 销毁读写锁............................................................................................................................... 141 目录 6 多线程编程指南• 2006年10月 跨进程边界同步............................................................................................................................... 142 生成方和使用者问题示例...................................................................................................... 142 比较元语........................................................................................................................................... 145 5 使用Solaris 软件编程......................................................................................................................147 进程创建中的fork 问题................................................................................................................. 147 Fork-One 模型........................................................................................................................... 148 Fork-all 模型.............................................................................................................................. 151 选择正确的Fork ....................................................................................................................... 151 进程创建:exec 和exit 问题....................................................................................................... 152 计时器、报警与剖析...................................................................................................................... 152 每LWP POSIX 计时器............................................................................................................. 152 每线程报警............................................................................................................................... 153 剖析多线程程序....................................................................................................................... 153 非本地转向:setjmp 和longjmp .................................................................................................. 154 资源限制........................................................................................................................................... 154 LWP 和调度类................................................................................................................................. 154 分时调度................................................................................................................................... 155 实时调度................................................................................................................................... 155 公平共享调度程序................................................................................................................... 155 固定优先级调度....................................................................................................................... 156 扩展传统信号.................................................................................................................................. 156 同步信号................................................................................................................................... 157 异步信号................................................................................................................................... 157 延续语义................................................................................................................................... 157 对信号执行的操作................................................................................................................... 158 定向于线程的信号................................................................................................................... 160 完成语义................................................................................................................................... 162 信号处理程序和异步信号安全............................................................................................. 163 中断对条件变量的等待.......................................................................................................... 165 I/O 问题............................................................................................................................................. 166 I/O 作为远程过程调用............................................................................................................ 167 人为的异步性............................................................................................................................ 167 异步I/O ..................................................................................................................................... 167 共享的I/O 和新的I/O 系统调用.......................................................................................... 169 目录 7 getc 和putc 的替代项............................................................................................................. 169 6 安全和不安全的接口...................................................................................................................... 171 线程安全........................................................................................................................................... 171 MT接口安全级别............................................................................................................................ 173 不安全接口的可重复执行函数............................................................................................. 174 异步信号安全函数.......................................................................................................................... 175 库的MT安全级别........................................................................................................................... 175 不安全库................................................................................................................................... 176 7 编译和调试....................................................................................................................................... 177 编译多线程应用程序...................................................................................................................... 177 为编译做准备............................................................................................................................ 177 选择Solaris 语义或POSIX 语义............................................................................................ 178 包括<thread.h> 或<pthread.h> .......................................................................................... 178 定义_REENTRANT 或_POSIX_C_SOURCE .................................................................................. 179 使用libthread 或libpthread 链接..................................................................................... 179 与POSIX 信号的-lrt 链接.................................................................................................... 181 将原有模块与新模块链接...................................................................................................... 181 备用线程库....................................................................................................................................... 181 调试多线程程序............................................................................................................................... 181 多线程程序中常见的疏忽性问题......................................................................................... 181 使用TNF 实用程序跟踪和调试............................................................................................ 182 使用truss ................................................................................................................................. 182 使用mdb ..................................................................................................................................... 182 使用dbx ..................................................................................................................................... 183 8 Solaris 线程编程...............................................................................................................................185 比较Solaris 线程和POSIX 线程的API ....................................................................................... 185 API 的主要差异........................................................................................................................ 185 函数比较表............................................................................................................................... 186 Solaris 线程的独有函数.................................................................................................................. 189 暂停执行线程............................................................................................................................ 190 继续执行暂停的线程............................................................................................................... 191 目录 8 多线程编程指南• 2006年10月 相似的同步函数-读写锁............................................................................................................. 192 初始化读写锁............................................................................................................................ 192 获取读锁................................................................................................................................... 194 尝试获取读锁............................................................................................................................ 194 获取写锁................................................................................................................................... 195 尝试获取写锁............................................................................................................................ 196 解除锁定读写锁....................................................................................................................... 196 销毁读写锁的状态................................................................................................................... 197 相似的Solaris 线程函数................................................................................................................. 199 创建线程................................................................................................................................... 199 获取最小栈大小....................................................................................................................... 201 获取线程标识符....................................................................................................................... 202 停止执行线程............................................................................................................................ 202 向线程发送信号....................................................................................................................... 203 访问调用线程的信号掩码...................................................................................................... 203 终止线程................................................................................................................................... 204 等待线程终止............................................................................................................................ 204 创建线程特定的数据键.......................................................................................................... 206 设置线程特定的数据值.......................................................................................................... 207 获取线程特定的数据值.......................................................................................................... 208 设置线程的优先级................................................................................................................... 208 获取线程的优先级................................................................................................................... 210 相似的同步函数-互斥锁............................................................................................................. 210 初始化互斥锁............................................................................................................................ 210 销毁互斥锁............................................................................................................................... 213 获取互斥锁............................................................................................................................... 213 释放互斥锁............................................................................................................................... 214 尝试获取互斥锁....................................................................................................................... 214 相似的同步函数:条件变量......................................................................................................... 215 初始化条件变量....................................................................................................................... 215 销毁条件变量............................................................................................................................ 216 等待条件................................................................................................................................... 217 等待绝对时间............................................................................................................................ 218 等待时间间隔............................................................................................................................ 218 解除阻塞一个线程................................................................................................................... 219 解除阻塞所有线程................................................................................................................... 220 目录 9 相似的同步函数:信号.................................................................................................................. 220 初始化信号............................................................................................................................... 220 增加信号................................................................................................................................... 222 基于信号计数阻塞................................................................................................................... 222 减小信号计数............................................................................................................................ 223 销毁信号状态............................................................................................................................ 224 跨进程边界同步............................................................................................................................... 224 生成方和使用者问题示例...................................................................................................... 224 fork() 和Solaris 线程的特殊问题................................................................................................ 227 9 编程原则........................................................................................................................................... 229 重新考虑全局变量.......................................................................................................................... 229 提供静态局部变量.......................................................................................................................... 230 同步线程........................................................................................................................................... 231 单线程策略............................................................................................................................... 232 可重复执行函数....................................................................................................................... 232 避免死锁........................................................................................................................................... 234 与调用相关的死锁................................................................................................................... 235 锁定原则................................................................................................................................... 235 线程代码的一些基本原则............................................................................................................. 236 创建和使用线程............................................................................................................................... 236 使用多处理器.................................................................................................................................. 237 基础体系结构............................................................................................................................ 237 线程程序示例.................................................................................................................................. 241 需要进一步阅读的内容.......................................................................................................... 241 A 样例应用程序:多线程grep .........................................................................................................243 tgrep 的说明.................................................................................................................................... 243 B Solaris 线程示例: barrier.c ........................................................................................................301 索引.................................................................................................................................................... 311

2011-04-03

VI使用完全教程.pdf

注:下载后,评价时给5星,还你11分 图解vi使用,非常适合初学者! LINUX入门的好资料

2011-04-03

Linux Socket Programming by Example

TABLE OF CONTENTS Introduction 1 Part 1 Basic Socket Concepts 5 1 Introducing Sockets 7 A Brief Historical Introduction 8 Understanding Sockets 9 Defining a Socket 9 Using Sockets 10 Referencing Sockets 11 Comparing Sockets to Pipes 12 Creating Sockets 13 Using socketpair(2) in an Example 14 Running the Demonstration Program 16 Performing I/O on Sockets 17 Closing Sockets 21 The shutdown(2) Function 22 Shutting Down Writing to a Socket 22 Dealing with Duplicated Sockets 23 Shutting Down Reading from a Socket 24 Knowing When Not to Use shutdown(2) 24 Writing a Client/Server Example 24 2 Domains and Address Families 35 Nameless Sockets 36 Anonymous Calls 36 Generating Addresses 36 Understanding Domains 36 Forming Socket Addresses 37 Examining the Generic Socket Address 37 Forming Local Addresses 38 Forming Traditional Local Addresses 39 Forming Abstract Local Addresses 44 Forming Internet (IPv4) Socket Addresses 47 Understanding Network Byte Order 49 Performing Endian Conversions 50 Page v Initializing a Wild Internet Address 51 Initializing a Specific Internet Address 52 Specifying an X.25 Address 55 Specifying Other Address Families 58 The AF_UNSPEC Address Family 61 3 Address Conversion Functions 65 Internet IP Numbers 66 Internet Address Classes 66 Understanding Netmask Values 67 Allocating IP Addresses 72 Private IP Numbers 72 Reserved IP Numbers 73 Manipulating IP Numbers 73 Using the inet_addr(3) Function 73 The inet_aton(3) Function 77 Using the inet_ntoa(3) Function 80 Using inet_network(3) 83 Using the inet_lnaof(3) Function 85 Using the inet_netof(3) Function 86 Using the inet_makeaddr(3) Function 87 4 Socket Types and Protocols 93 Specifying the Domain of a Socket 94 Choosing PF_INET or AF_INET 94 Using the PF_LOCAL and AF_LOCAL Macros 95 Using the socket(2) Function 96 Choosing a Socket Type 96 Understanding the SOCK_STREAM Socket Type 97 Understanding the SOCK_DGRAM Socket Type 99 Understanding the SOCK_SEQPACKET Socket Type 100 Choosing a Protocol 101 Using PF_LOCAL and SOCK_STREAM 102 Using PF_LOCAL and SOCK_DGRAM 103 Using PF_INET and SOCK_STREAM 103 Using PF_INET and SOCK_DGRAM 105 Socket Domain and Type Summary 106 Other Linux-Supported Protocols 107 Researching Other Protocols 109 Page vi 5 Binding Addresses to a Socket 115 The Purpose of the bind(2) Function 116 Using the bind(2) Function 116 Obtaining the Socket Address 120 Writing a sock_addr() Function 121 Obtaining a Peer Socket Address 125 Interfaces and Addressing 128 Specifying an Interface Address Example 128 Binding a Specific Interface Address 129 Binding for Any Interface 130 6 Connectionless-Oriented Protocols 133 The Methods of Communication 134 Understanding the Advantages 134 Understanding the Disadvantages of Connectionless Communications 135 Performing Input/Output of Datagrams 136 Introducing the sendto(2) Function 136 Introducing the recvfrom(2) Function 138 Writing a UDP Datagram Server 140 Writing a UDP Datagram Client 146 Testing the Datagram Client and Server 150 Testing with No Server 152 TEAMFLY Team-Fly® Testing with Other IP Numbers 153 Leaving out bind(2) in Client Programs 154 Replying to a Wild Address 154 7 Connection-Oriented Protocols for Clients 159 Reviewing the Methods of Communication 160 TCP/IP Handles Lost Packets 160 TCP/IP Handles Duplicated Packets 161 TCP/IP Handles Sequencing 161 TCP/IP Handles Flow Control 161 Understanding the Advantages of TCP/IP 161 Internet Services 162 Examining the /etc/services File 162 Using Function getservent(3) 163 Using the setservent(3) Function 166 Using the endservent(3) Function 167 Page vii Looking up a Service by Name and Protocol 167 Looking up a Service by Port and Protocol 168 Consulting the /etc/protocols File 168 Using the setprotoent(3) Function 171 Using the endprotoent(3) Function 172 Looking up a Protocol by Name 172 Looking up a Protocol by Number 172 Writing a TCP/IP Client Program 173 Introducing the connect(2) Function 173 Preparing to Write the Client Program 174 The daytime Client Program 176 Using connect(2) on SOCK_DGRAM Sockets 180 8 Connection-Oriented Protocols for Servers 183 Understanding the Role of the Server 184 The listen(2) Function 185 Understanding the Connect Queue 186 Specifying a Value for backlog 187 The accept(2) Function Call 188 Understanding the Role of accept(2) 189 Writing a TCP/IP Server 190 Running a Wild Server 196 Modifying the Client Program 197 9 Hostname and Network Name Lookups 203 Understanding the Need for Names 204 Using the uname(2) Function 204 Obtaining Hostnames and Domain Names 207 Using Function gethostname 207 Using the getdomainname(2) Function 208 Testing gethostname(2) and getdomainname(2) 208 Resolving Remote Addresses 210 Error Reporting 210 Reporting an h_errno Error 211 Using the gethostbyname(3) Function 212 Applying the gethostbyname(3) Function 214 The gethostbyaddr(3) Function 217 Using the sethostent(3) Function 223 Using the endhostent(3) Function 224 Page viii Part 2 Advanced Socket Programming 227 10 Using Standard I/O on Sockets 229 Understanding the Need for Standard I/O 230 Associating a Socket with a Stream 230 Using fdopen(3) to Associate a Socket with a Stream 231 Closing a Socket Stream 232 Using Separate Read and Write Streams 233 Duplicating a Socket 234 Closing the Dual Streams 234 Winding up Communications 235 Shutting Down the Write Side Only 235 Shutting Down the Read Side Only 237 Shutting Down Both Read and Write Sides 237 Handling Interrupts 238 Handling EINTR for Other Functions 240 Denning Buffer Operation 240 Applying FILE Streams to Sockets 243 Presenting the mkaddr() Function 243 The RPN Calculator Engine Code 249 Trying out the RPN Server 264 11 Concurrent Client Servers 269 Understanding the Multiple-Client Problem 270 Overview of Server Functions 271 Using fork(2) to Service Multiple Clients 275 Understanding the Overall Server Process 280 Understanding the Child Server Process Flow 281 Understanding Process Termination Processing 282 Designing Servers That Use select(2) 282 Introducing the select(2) Function 283 Manipulating File Descriptor Sets 285 Applying select(2) to a Server 287 Testing the select(2) -Based Server 299 Limitations of the Example 301 12 Socket Options 305 Getting Socket Options 306 Applying getsockopt(2) 307 Page ix Setting Socket Options 310 Applying the setsockopt(2) Function 311 Retrieving the Socket Type (SO_TYPE) 315 Setting the SO_REUSEADDR Option 317 Setting the SO_LINGER Option 320 Setting the SO_KEEPALIVE Option 323 Setting the SO_BROADCAST Option 324 Setting the SO_OOBINLINE Option 325 Options SO_PASSCRED and SO_PEERCRED 326 13 Broadcasting with UDP 329 Understanding Broadcast Addresses 330 Broadcasting on 255.255.255.255 330 Enhancing the mkaddr.c Subroutine 331 Broadcasting from a Server 332 Receiving Broadcasts 338 Demonstrating the Broadcasts 342 Broadcasting to a Network 343 Starting Broadcasts 343 Receiving Broadcasts 345 Receiving Broadcasts from a Remote Host 345 Troubleshooting Hints 346 14 Out-of-Band Data 349 Defining Out-of-Band 350 Understanding the Need for Out-of-Band Data 350 Sockets and Out-of-Band Data 351 Variations in Implementation 351 Using Out-of-Band Data 353 Writing Out-of-Band Data 353 Reading Out-of-Band Data 354 Understanding the Signal SIGURG 355 Supporting Subprograms 356 Receiving with the SIGURG Signal 359 Sending Out-of-Band Data 362 Testing the oobrecv and oobsend Programs 365 Page x Understanding the Urgent Pointer 366 Understanding TCP Urgent Mode 366 Urgent Mode When tcp_stdurg=1 369 Receiving Out-of-Band Data Inline 370 Determining the Urgent Pointer 370 Using Out-of-Band Data Inline 371 Limitations of the Urgent Mode Pointer 375 Processing Out-of-Band Data with select(2) 377 15 Using the inetd Daemon 379 Steps Common to Most Servers 380 Introducing inetd 380 The /etc/inetd.conf Configuration File 381 The Design Parameters of inetd Servers 383 Implementing a Simple stream tcp Server 384 Configuring /etc/inetd.conf to Invoke a New Server 385 Disabling the New Service 389 Datagram Servers with inetd 389 Understanding wait and nowait 390 16 Network Security Programming 393 Defining Security 394 The Challenges of Security 394 Identifying Friend or Foe 396 Securing by Hostname or Domain Name 396 Identifying by IP Number 397 Securing inetd Servers 398 Centralized Network Policy 399 Understanding the TCP Wrapper Concept 399 Determining Access 401 Installing Wrapper and Server Programs 403 Examining Server and Wrapper Logging Code 403 Examining the Datagram Server Code 405 Examining the Simple TCP Wrapper Program 410 Introducing the Client Program 414 Installing and Testing the Wrapper 418 Monitoring the Log Files 419 Starting Your inetd Daemon 419 Page xi Testing the Wrapper Program 420 Testing the Server Timeout 421 Uninstalling the Demonstration Programs 422 Datagram Vulnerability 423 17 Passing Credentials and File Descriptors 427 Problem Statement 428 Introducing Ancillary Data 428 Introducing I/O Vectors 429 The I/O Vector (struct iovec) 429 The readv(2) and writev(2) Functions 430 The sendmsg(2) and recvmsg(2) Functions 432 The sendmsg(2) Function 432 The recvmsg(2) Function 433 Understanding struct msghdr 433 Ancillary Data Structures and Macros 435 Introducing struct cmsghdr Structure 435 Introducing the cmsg(3) Macros 437 Iterating through Ancillary Data 439 Creating Ancillary Data 440 Presenting an Ancillary Data Example 441 The Common Header File common.h 442 The misc.c Module 443 TEAMFLY Team-Fly® The recvcred.c Module 443 The Simple Web Server web80 447 The reqport() Function 451 The recv_fd() Function 453 The sockserv Server Program 456 The send_fd() Function 465 Testing the Socket Server 468 Testing sockserv 469 18 A Practical Network Project 473 Problem Statement 474 Solving the Quote Service Problem 474 Obtaining Stock Market Quotes 474 Examining the Quote Server Program 477 Fetching Quotations via get_tickinfo() 484 Page xii Broadcasting Quotes via broadcast() 493 Examining the Client Program 495 Compiling and Running the Demonstration 500 Starting the qserve Quotation Server 501 Starting the mktwatch Client 501 If the finance.yahoo.com Service Changes 503

2011-04-03

Foxit Reader3.0

注:下载后,评价时给5星,还你11分 FoxitReader3.0+PDFEdit+Manual+PDFPasswordRemover3.0破解版.zip

2011-03-27

Foxit Reader3.0(绿色版+汉化版+英文版)

注:下载后,评价时给5星,还你11分 一直想找个好用的pdf编辑器,都不满意啊。后在网上看到Foxit Reader3.0好用,就整理了下,得此资源。提供的虽是绿色版,功能可能有限(但对一般玩家够了),但也包含了key,可供升级更新用。 阅读PDF+编辑PDF内容+编辑PDF书签

2011-03-27

Learning the vi and Vim Editors, Seventh Edition

注:下载后,评价给5星,还你11分 Part I. Basic and Advanced vi 1. The vi Text Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 A Brief Historical Perspective 5 Opening and Closing Files 6 Quitting Without Saving Edits 10 2. Simple Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 vi Commands 13 Moving the Cursor 14 Simple Edits 18 More Ways to Insert Text 30 Joining Two Lines with J 31 Review of Basic vi Commands 32 3. Moving Around in a Hurry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Movement by Screens 35 Movement by Text Blocks 38 Movement by Searches 39 Movement by Line Number 43 Review of vi Motion Commands 44 4. Beyond the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 More Command Combinations 47 Options When Starting vi 48 Making Use of Buffers 51 Marking Your Place 52 Other Advanced Edits 53 Review of vi Buffer and Marking Commands 53 vii 5. Introducing the ex Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 ex Commands 55 Editing with ex 58 Saving and Exiting Files 63 Copying a File into Another File 65 Editing Multiple Files 65 6. Global Replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Confirming Substitutions 72 Context-Sensitive Replacement 73 Pattern-Matching Rules 74 Pattern-Matching Examples 81 A Final Look at Pattern Matching 89 7. Advanced Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Customizing vi 95 Executing Unix Commands 99 Saving Commands 103 Using ex Scripts 114 Editing Program Source Code 120 8. Introduction to the vi Clones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 And These Are My Brothers, Darrell, Darrell, and Darrell 125 Multiwindow Editing 126 GUI Interfaces 127 Extended Regular Expressions 128 Enhanced Tags 129 Improved Facilities 134 Programming Assistance 138 Editor Comparison Summary 140 Nothing Like the Original 141 A Look Ahead 141 Part II. Vim 9. Vim (vi Improved): An Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Overview 146 Where to Get Vim 150 Getting Vim for Unix and GNU/Linux 151 Getting Vim for Windows Environments 156 Getting Vim for the Macintosh Environment 157 Other Operating Systems 157 viii | Table of Contents Aids and Easy Modes for New Users 157 Summary 158 10. Major Vim Improvements over vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Built-in Help 159 Startup and Initialization Options 160 New Motion Commands 167 Extended Regular Expressions 169 Customizing the Executable 171 11. Multiple Windows in Vim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Initiating Multiwindow Editing 174 Opening Windows 177 Moving Around Windows (Getting Your Cursor from Here to There) 180 Moving Windows Around 181 Resizing Windows 183 Buffers and Their Interaction with Windows 186 Playing Tag with Windows 190 Tabbed Editing 191 Closing and Quitting Windows 192 Summary 193 12. Vim Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 What’s Your Favorite Color (Scheme)? 195 Dynamic File Type Configuration Through Scripting 205 Some Additional Thoughts About Vim Scripting 213 Resources 218 13. Graphical Vim (gvim) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 General Introduction to gvim 220 Customizing Scrollbars, Menus, and Toolbars 225 gvim in Microsoft Windows 236 gvim in the X Window System 237 GUI Options and Command Synopsis 237 14. Vim Enhancements for Programmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Folding and Outlining (Outline Mode) 240 Auto and Smart Indenting 251 Keyword and Dictionary Word Completion 259 Tag Stacking 268 Syntax Highlighting 270 Compiling and Checking Errors with Vim 279 Some Final Thoughts on Vim for Writing Programs 284 Table of Contents | ix 15. Other Cool Stuff in Vim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 Editing Binary Files 285 Digraphs: Non-ASCII Characters 287 Editing Files in Other Places 289 Navigating and Changing Directories 290 Backups with Vim 292 HTML Your Text 293 What’s the Difference? 294 Undoing Undos 296 Now, Where Was I? 297 What’s My Line (Size)? 300 Abbreviations of Vim Commands and Options 302 A Few Quickies (Not Necessarily Vim-Specific) 303 More Resources 304 Part III. Other vi Clones 16. nvi: New vi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 Author and History 307 Important Command-Line Arguments 308 Online Help and Other Documentation 309 Initialization 309 Multiwindow Editing 310 GUI Interfaces 311 Extended Regular Expressions 311 Improvements for Editing 312 Programming Assistance 315 Interesting Features 315 Sources and Supported Operating Systems 315 17. Elvis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Author and History 317 Important Command-Line Arguments 317 Online Help and Other Documentation 319 Initialization 319 Multiwindow Editing 320 GUI Interfaces 323 Extended Regular Expressions 328 Improved Editing Facilities 328 Programming Assistance 332 Interesting Features 335 elvis Futures 340 x | Table of Contents Sources and Supported Operating Systems 340 18. vile: vi Like Emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Authors and History 343 Important Command-Line Arguments 344 Online Help and Other Documentation 345 Initialization 346 Multiwindow Editing 347 GUI Interfaces 349 Extended Regular Expressions 357 Improved Editing Facilities 359 Programming Assistance 365 Interesting Features 368 Sources and Supported Operating Systems 374

2011-03-20

unix环境高级编程(第二版英文版CHM)附源代码.rar

注:下载后,评价给5星,还你11分 Chapter 1. UNIX System Overview Chapter 2. UNIX Standardization and Implementations Chapter 3. File I/O Chapter 4. Files and Directories Chapter 5. Standard I/O Library Chapter 6. System Data Files and Information Chapter 7. Process Environment Chapter 8. Process Control Chapter 9. Process Relationships Chapter 10. Signals Chapter 11. Threads Chapter 12. Thread Control Chapter 13. Daemon Processes Chapter 14. Advanced I/O Chapter 15. Interprocess Communication Chapter 16. Network IPC: Sockets Chapter 17. Advanced IPC Chapter 18. Terminal I/O Chapter 19. Pseudo Terminals Chapter 20. A Database Library Chapter 21. Communicating with a Network Printer

2011-03-20

Linux程序设计第四版.pdf

注:下载后,评价时给5星,还你11分 Chapter 1: Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 2: Shell Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 3: Working with Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Chapter 4: The Linux Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Chapter 5: Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Chapter 6: Managing Text-Based Screens with curses . . . . . . . . . . . . . . . . 211 Chapter 7: Data Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Chapter 8: MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Chapter 9: Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 Chapter 10: Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 Chapter 11: Processes and Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 Chapter 12: POSIX Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Chapter 13: Inter-Process Communication: Pipes . . . . . . . . . . . . . . . . . . . . 525 Chapter 14: Semaphores, Shared Memory, and Message Queues. . . . . . . . . 577 Chapter 15: Sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 Chapter 16: Programming GNOME Using GTK+ . . . . . . . . . . . . . . . . . . . . . . 645 Chapter 17: Programming KDE Using Qt. . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Chapter 18: Standards for Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761

2011-03-20

Shell十三问.dpf

不用多说学习linux shell的好资料: shell基础十二篇+Shell十三问。 注:下载后,评价时给5星,还你11分

2011-03-20

shell基础十二篇

不用多说学习linux shell的好资料: shell基础十二篇+Shell十三问。 注:下载后,评价给5星,还你11分

2011-03-20

红旗Linux用户基础教程

注:下载后,评价时给5星,还你11分 第1章Linux及红旗Linux简介 第2章红旗Linux中文环境 第3章常用Linux命令介绍 第4章Shell简介 第5章使用vi 第6章使用外部设备 第7章多用户管理及用户安全 第8章备份数据 第9章文件系统 第10章目 录 系 统第 11章文件和目录操作 第12章核心升级和应用软件安装 第13章配置网络和网络服务

2011-03-13

linux程序设计(原版)第三版

注:下载后,评价时给5星,还你11分 Chapter 1: Getting Started 1 Chapter 2: Shell Programming 17 Chapter 3: Working with Files 91 Chapter 4: The Linux Environment 135 Chapter 5: Terminals 171 Chapter 6: Managing Text-Based Screens with curses 205 Chapter 7: Data Management 249 Chapter 8: MySQL 303 Chapter 11: Processes and Signals 445 Chapter 12: POSIX Threads 477 Chapter 13: Inter-Process Communication: Pipes 505 Chapter 14: Semaphores, Shared Memory, and Message Queues 557 Chapter 15: Sockets 587 Chapter 16: Programming GNOME Using GTK+ 623 Chapter 17: Programming KDE Using Qt 677 Chapter 18: Device Drivers 721 Chapter 19: Standards for Linux 799 The C Programming Language 800 A Brief History Lesson 800 The GNU Compiler Collection 801 xxvii Contents gcc Options 801 Compiler Options for Standards Tracking 802 Define Options for Standard Tracking 802 Compiler Options for Warnings 802 Interfaces and the LSB 803 LSB Standard Libraries 804 A Brief History Lesson 804 Using the LSB Standard for Libraries 805 LSB Users and Groups 805 LSB System Initialization 805 The Filesystem Hierarchy Standard 807 /bin 808 /boot 808 /dev 808 /etc 809 /home 809 /lib 809 /mnt 809 /opt 809 /root 809 /sbin 809 /tmp 809 /usr 810 /var 810 Further Reading about Standards 810 Summary 810

2011-03-13

五笔中文输入法安装包

注:下载后,评价时给5星,还你11分 五笔输入法安装包 无插件 五笔输入法安装包 无插件 五笔输入法安装包 无插件 五笔输入法安装包 五笔输入法安装包

2010-08-19

空空如也

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

TA关注的人

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