自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (8)
  • 收藏
  • 关注

空空如也

Agile Web Development with Rails 3nd Edition

Agile Web Development with Rails 3nd Edition 2009年发布的正式版,纯英文。

2009-05-28

十天内词汇量突破20000

 本版教程为毕克所著目的是在十天内提高单词量到20000,每6页为一天.借助于金山词霸矫正发音<br> 学习要求是脱口背诵,每天学习6小时.建议在学习本教材的同时学习<br> READING.DOC 学习要求是熟读<br> TALKING.DOC 学习要求是脱口背诵<br> 学完上述4项,应可完成英语素质教育第一阶段.<br> 考取CCIE 以及 Ph.D Majored in Networking System, I swear.<br> My Buddha almighty!<br>

2008-05-12

《K线图经典图解》

《K线图经典图解》皆在为出入炒股的朋友学习

2008-05-12

Web 开发敏捷之道 第二版

Agile Web Development with Rails<br>Second Edition<br>Contents<br>Preface to the Second Edition xi<br>1 Introduction 1<br>1.1 Rails Is Agile . . . . . . . . . . . . . . . . . . . . . . . . . . . 3<br>1.2 Finding Your Way Around . . . . . . . . . . . . . . . . . . . 5<br>Part I—Getting Started 8<br>2 The Architecture of Rails Applications 9<br>2.1 Models, Views, and Controllers . . . . . . . . . . . . . . . . 9<br>2.2 Active Record: Rails Model Support . . . . . . . . . . . . . 13<br>2.3 Action Pack: The View and Controller . . . . . . . . . . . . 17<br>3 Installing Rails 19<br>3.1 Your Shopping List . . . . . . . . . . . . . . . . . . . . . . . 20<br>3.2 Installing on Windows . . . . . . . . . . . . . . . . . . . . . 20<br>3.3 Installing on Mac OS X . . . . . . . . . . . . . . . . . . . . . 22<br>3.4 Installing on Linux . . . . . . . . . . . . . . . . . . . . . . . 24<br>3.5 Development Environments . . . . . . . . . . . . . . . . . . 24<br>3.6 Rails and Databases . . . . . . . . . . . . . . . . . . . . . . 28<br>3.7 Keeping Up-to-Date . . . . . . . . . . . . . . . . . . . . . . . 31<br>3.8 Rails and ISPs . . . . . . . . . . . . . . . . . . . . . . . . . . 31<br>4 Instant Gratification 32<br>4.1 Creating a New Application . . . . . . . . . . . . . . . . . . 32<br>4.2 Hello, Rails! . . . . . . . . . . . . . . . . . . . . . . . . . . . 35<br>4.3 Linking Pages Together . . . . . . . . . . . . . . . . . . . . . 46<br>4.4 What We Just Did . . . . . . . . . . . . . . . . . . . . . . . . 50<br>Prepared exclusively for Leonardo Augusto Pires<br>CONTENTS vi<br>Part II—Building an Application 52<br>5 The Depot Application 53<br>5.1 Incremental Development . . . . . . . . . . . . . . . . . . . 53<br>5.2 What Depot Does . . . . . . . . . . . . . . . . . . . . . . . . 54<br>5.3 Let’s Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58<br>6 Task A: Product Maintenance 59<br>6.1 Iteration A1: Get Something Running . . . . . . . . . . . . 59<br>6.2 Iteration A2: Add a Missing Column . . . . . . . . . . . . . 71<br>6.3 Iteration A3: Validate! . . . . . . . . . . . . . . . . . . . . . 74<br>6.4 Iteration A4: Prettier Listings . . . . . . . . . . . . . . . . . 79<br>7 Task B: Catalog Display 87<br>7.1 Iteration B1: Create the Catalog Listing . . . . . . . . . . . 87<br>7.2 Iteration B2: Add a Page Layout . . . . . . . . . . . . . . . 91<br>7.3 Iteration B3: Use a Helper to Format the Price . . . . . . . 93<br>7.4 Iteration B4: Linking to the Cart . . . . . . . . . . . . . . . 94<br>8 Task C: Cart Creation 97<br>8.1 Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br>8.2 Iteration C1: Creating a Cart . . . . . . . . . . . . . . . . . 100<br>8.3 Iteration C2: A Smarter Cart . . . . . . . . . . . . . . . . . 103<br>8.4 Iteration C3: Handling Errors . . . . . . . . . . . . . . . . . 109<br>8.5 Iteration C4: Finishing the Cart . . . . . . . . . . . . . . . . 114<br>9 Task D: Add a Dash of Ajax 118<br>9.1 Iteration D1: Moving the Cart . . . . . . . . . . . . . . . . . 119<br>9.2 Iteration D2: An Ajax-Based Cart . . . . . . . . . . . . . . . 124<br>9.3 Iteration D3: Highlighting Changes . . . . . . . . . . . . . . 128<br>9.4 Iteration D4: Hide An Empty Cart . . . . . . . . . . . . . . 130<br>9.5 Iteration D5: Degrading if JavaScript is Disabled . . . . . 133<br>9.6 What We Just Did . . . . . . . . . . . . . . . . . . . . . . . . 134<br>10 Task E: Checkout! 136<br>10.1 Iteration E1: Capturing an Order . . . . . . . . . . . . . . . 136<br>11 Task F: Administration 152<br>11.1 Iteration F1: Adding Users . . . . . . . . . . . . . . . . . . . 152<br>11.2 Iteration F2: Logging In . . . . . . . . . . . . . . . . . . . . 160<br>11.3 Iteration F3: Limiting Access . . . . . . . . . . . . . . . . . 163<br>11.4 Iteration F4: A Sidebar, More Administation . . . . . . . . 164<br>Report erratum Prepared exclusively for Leonardo Augusto Pires<br>CONTENTS vii<br>12 Task G: One Last Wafer-Thin Change 172<br>12.1 Generating the XML Feed . . . . . . . . . . . . . . . . . . . 172<br>12.2 Finishing Up . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<br>13 Task T: Testing 181<br>13.1 Tests Baked Right In . . . . . . . . . . . . . . . . . . . . . . 181<br>13.2 Unit Testing of Models . . . . . . . . . . . . . . . . . . . . . 182<br>13.3 Functional Testing of Controllers . . . . . . . . . . . . . . . 194<br>13.4 Integration Testing of Applications . . . . . . . . . . . . . . 205<br>13.5 Performance Testing . . . . . . . . . . . . . . . . . . . . . . 214<br>13.6 Using Mock Objects . . . . . . . . . . . . . . . . . . . . . . . 218<br>Part III—The Rails Framework 221<br>14 Rails in Depth 222<br>14.1 So Where’s Rails? . . . . . . . . . . . . . . . . . . . . . . . . 222<br>14.2 Directory Structure . . . . . . . . . . . . . . . . . . . . . . . 222<br>14.3 Rails Configuration . . . . . . . . . . . . . . . . . . . . . . . 230<br>14.4 Naming Conventions . . . . . . . . . . . . . . . . . . . . . . 233<br>14.5 Logging in Rails . . . . . . . . . . . . . . . . . . . . . . . . . 237<br>14.6 Debugging Hints . . . . . . . . . . . . . . . . . . . . . . . . 237<br>14.7 What’s Next . . . . . . . . . . . . . . . . . . . . . . . . . . . 239<br>15 Active Support 241<br>15.1 Generally Available Extensions . . . . . . . . . . . . . . . . 241<br>15.2 Enumerations and Arrays . . . . . . . . . . . . . . . . . . . 242<br>15.3 String Extensions . . . . . . . . . . . . . . . . . . . . . . . . 243<br>15.4 Extensions to Numbers . . . . . . . . . . . . . . . . . . . . 245<br>15.5 Time and Date Extensions . . . . . . . . . . . . . . . . . . . 246<br>15.6 An Extension to Ruby Symbols . . . . . . . . . . . . . . . . 247<br>16 Active Record Basics 249<br>16.1 Tables and Classes . . . . . . . . . . . . . . . . . . . . . . . 250<br>16.2 Columns and Attributes . . . . . . . . . . . . . . . . . . . . 251<br>16.3 Primary Keys and IDs . . . . . . . . . . . . . . . . . . . . . 257<br>16.4 Connecting to the Database . . . . . . . . . . . . . . . . . . 259<br>16.5 CRUD—Create, Read, Update, Delete . . . . . . . . . . . . 261<br>16.6 Relationships between Tables . . . . . . . . . . . . . . . . . 277<br>16.7 Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . 300<br>Report erratum Prepared exclusively for Leonardo Augusto Pires<br>CONTENTS viii<br>17 More Active Record 307<br>17.1 Acts As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307<br>17.2 Aggregation . . . . . . . . . . . . . . . . . . . . . . . . . . . 312<br>17.3 Single Table Inheritance . . . . . . . . . . . . . . . . . . . . 318<br>17.4 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322<br>17.5 Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<br>17.6 Advanced Attributes . . . . . . . . . . . . . . . . . . . . . . 339<br>17.7 Miscellany . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343<br>18 Action Controller and Rails 346<br>18.1 Context and Dependencies . . . . . . . . . . . . . . . . . . 346<br>18.2 The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347<br>18.3 Routing Requests . . . . . . . . . . . . . . . . . . . . . . . . 348<br>18.4 Action Methods . . . . . . . . . . . . . . . . . . . . . . . . . 360<br>18.5 Cookies and Sessions . . . . . . . . . . . . . . . . . . . . . . 371<br>18.6 Flash—Communicating between Actions . . . . . . . . . . 382<br>18.7 Filters and Verification . . . . . . . . . . . . . . . . . . . . . 384<br>18.8 Caching, Part One . . . . . . . . . . . . . . . . . . . . . . . 390<br>18.9 The Problem with GET Requests . . . . . . . . . . . . . . . 397<br>19 Action View 400<br>19.1 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br>19.2 Builder templates . . . . . . . . . . . . . . . . . . . . . . . . 402<br>19.3 RHTML Templates . . . . . . . . . . . . . . . . . . . . . . . 403<br>19.4 Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406<br>19.5 Formatting Helpers . . . . . . . . . . . . . . . . . . . . . . . 408<br>19.6 Linking to Other Pages and Resources . . . . . . . . . . . . 411<br>19.7 Pagination . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413<br>19.8 Form Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . 415<br>19.9 Layouts and Components . . . . . . . . . . . . . . . . . . . 432<br>19.10 Caching, Part Two . . . . . . . . . . . . . . . . . . . . . . . . 442<br>19.11 Adding New Templating Systems . . . . . . . . . . . . . . . 447<br>20 The Web, V2.0 451<br>20.1 Introducing AJAX . . . . . . . . . . . . . . . . . . . . . . . . 451<br>20.2 The Rails Way . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br>20.3 The User Interface, Revisited . . . . . . . . . . . . . . . . . 462<br>20.4 Advanced Techniques . . . . . . . . . . . . . . . . . . . . . 467<br>Report erratum Prepared exclusively for Leonardo Augusto Pires<br>CONTENTS ix<br>21 Action Mailer 479<br>21.1 Sending E-mail . . . . . . . . . . . . . . . . . . . . . . . . . 479<br>21.2 Receiving E-mail . . . . . . . . . . . . . . . . . . . . . . . . 487<br>21.3 Testing E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . 489<br>22 Web Services on Rails 493<br>22.1 What AWS Is (and What It Isn’t) . . . . . . . . . . . . . . . . 493<br>22.2 The API Definition . . . . . . . . . . . . . . . . . . . . . . . . 494<br>22.3 Dispatching Modes . . . . . . . . . . . . . . . . . . . . . . . 499<br>22.4 Using Alternate Dispatching . . . . . . . . . . . . . . . . . . 502<br>22.5 Method Invocation Interception . . . . . . . . . . . . . . . . 504<br>22.6 Testing Web Services . . . . . . . . . . . . . . . . . . . . . . 506<br>22.7 Protocol Clients . . . . . . . . . . . . . . . . . . . . . . . . . 509<br>23 Securing Your Rails Application 510<br>23.1 SQL Injection . . . . . . . . . . . . . . . . . . . . . . . . . . 510<br>23.2 Cross-Site Scripting (CSS/XSS) . . . . . . . . . . . . . . . . 513<br>23.3 Avoid Session Fixation Attacks . . . . . . . . . . . . . . . . 516<br>23.4 Creating Records Directly from Form Parameters . . . . . 517<br>23.5 Don’t Trust ID Parameters . . . . . . . . . . . . . . . . . . . 519<br>23.6 Don’t Expose Controller Methods . . . . . . . . . . . . . . . 520<br>23.7 File Uploads . . . . . . . . . . . . . . . . . . . . . . . . . . . 521<br>23.8 Don’t Cache Authenticated Pages . . . . . . . . . . . . . . . 522<br>23.9 Knowing That It Works . . . . . . . . . . . . . . . . . . . . . 522<br>24 Deployment and Production 524<br>24.1 Development Deployments . . . . . . . . . . . . . . . . . . . 525<br>24.2 Initial Production Deployments . . . . . . . . . . . . . . . . 526<br>24.3 Playing Nice With Existing Environments . . . . . . . . . . 526<br>24.4 Hosting Multiple Applications on the Same Machine . . . 526<br>24.5 Scaling Out . . . . . . . . . . . . . . . . . . . . . . . . . . . 526<br>Part IV—Appendices 528<br>A Introduction to Ruby 529<br>A.1 Ruby Is an Object-Oriented Language . . . . . . . . . . . . 529<br>A.2 Ruby Names . . . . . . . . . . . . . . . . . . . . . . . . . . . 531<br>A.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531<br>A.4 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533<br>A.5 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536<br>A.6 Arrays and Hashes . . . . . . . . . . . . . . . . . . . . . . . 536<br>A.7 Control Structures . . . . . . . . . . . . . . . . . . . . . . . 538<br>Report erratum Prepared exclusively for Leonardo Augusto Pires<br>CONTENTS x<br>A.8 Regular Expressions . . . . . . . . . . . . . . . . . . . . . . 538<br>A.9 Blocks and Iterators . . . . . . . . . . . . . . . . . . . . . . 539<br>A.10 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540<br>A.11 Marshaling Objects . . . . . . . . . . . . . . . . . . . . . . . 540<br>A.12 Interactive Ruby . . . . . . . . . . . . . . . . . . . . . . . . . 541<br>A.13 Ruby Idioms . . . . . . . . . . . . . . . . . . . . . . . . . . . 541<br>A.14 RDoc Documentation . . . . . . . . . . . . . . . . . . . . . . 543<br>B Configuration Parameters 545<br>B.1 Active Record Configuration . . . . . . . . . . . . . . . . . . 545<br>B.2 Action Pack Configuration . . . . . . . . . . . . . . . . . . . 546<br>B.3 Action Mailer Configuration . . . . . . . . . . . . . . . . . . 548<br>B.4 Test Case Configuration . . . . . . . . . . . . . . . . . . . . 548<br>C Source Code 549<br>C.1 The Full Depot Application . . . . . . . . . . . . . . . . . . 549<br>D Resources 572<br>D.1 Online Resources . . . . . . . . . . . . . . . . . . . . . . . . 572<br>D.2 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . 572

2008-05-12

Programming Ruby 2nd

Programming Ruby<br>The Pragmatic Programmers’ Guide<br>Second Edition<br>Dave Thomas<br>with Chad Fowler<br>and Andy Hun

2008-05-12

Ruby CookBook

Ruby Cookbook <br>By Lucas Carlson, Leonard Richardson <br>............................................... <br>Publisher: O'Reilly <br>Pub Date: July 2006 <br>Print ISBN-10: 0-596-52369-6 <br>Print ISBN-13: 978-0-59-652369-5 <br>Pages: 906 <br> <br> <br><br>Table of Contents | Index <br><br> Copyright <br> Dedication <br> Preface <br> Chapter 1. Strings <br> Recipe 1.1. Building a String from Parts <br> Recipe 1.2. Substituting Variables into Strings <br> Recipe 1.3. Substituting Variables into an Existing String <br> Recipe 1.4. Reversing a String by Words or Characters <br> Recipe 1.5. Representing Unprintable Characters <br> Recipe 1.6. Converting Between Characters and Values <br> Recipe 1.7. Converting Between Strings and Symbols <br> Recipe 1.8. Processing a String One Character at a Time <br> Recipe 1.9. Processing a String One Word at a Time <br> Recipe 1.10. Changing the Case of a String <br> Recipe 1.11. Managing Whitespace <br> Recipe 1.12. Testing Whether an Object Is String-Like <br> Recipe 1.13. Getting the Parts of a String You Want <br> Recipe 1.14. Handling International Encodings <br> Recipe 1.15. Word-Wrapping Lines of Text <br> Recipe 1.16. Generating a Succession of Strings <br> Recipe 1.17. Matching Strings with Regular Expressions <br> Recipe 1.18. Replacing Multiple Patterns in a Single Pass <br> Recipe 1.19. Validating an Email Address <br> Recipe 1.20. Classifying Text with a Bayesian Analyzer <br> Chapter 2. Numbers <br> Recipe 2.1. Parsing a Number from a String <br> Recipe 2.2. Comparing Floating-Point Numbers <br> Recipe 2.3. Representing Numbers to Arbitrary Precision <br> Recipe 2.4. Representing Rational Numbers <br> Recipe 2.5. Generating Random Numbers <br> Recipe 2.6. Converting Between Numeric Bases <br> Recipe 2.7. Taking Logarithms <br> Recipe 2.8. Finding Mean, Median, and Mode <br> Recipe 2.9. Converting Between Degrees and Radians <br> Recipe 2.10. Multiplying Matrices <br> Recipe 2.11. Solving a System of Linear Equations <br> Recipe 2.12. Using Complex Numbers <br> Recipe 2.13. Simulating a Subclass of Fixnum <br> Recipe 2.14. Doing Math with Roman Numbers <br> Recipe 2.15. Generating a Sequence of Numbers <br> Recipe 2.16. Generating Prime Numbers <br> Recipe 2.17. Checking a Credit Card Checksum <br> Chapter 3. Date and Time <br> Recipe 3.1. Finding Today's Date <br> Recipe 3.2. Parsing Dates, Precisely or Fuzzily <br> Recipe 3.3. Printing a Date <br> Recipe 3.4. Iterating Over Dates <br> Recipe 3.5. Doing Date Arithmetic <br> Recipe 3.6. Counting the Days Since an Arbitrary Date <br> Recipe 3.7. Converting Between Time Zones <br> Recipe 3.8. Checking Whether Daylight Saving Time Is in Effect <br> Recipe 3.9. Converting Between Time and DateTime Objects <br> Recipe 3.10. Finding the Day of the Week <br> Recipe 3.11. Handling Commercial Dates <br> Recipe 3.12. Running a Code Block Periodically <br> Recipe 3.13. Waiting a Certain Amount of Time <br> Recipe 3.14. Adding a Timeout to a Long-Running Operation <br> Chapter 4. Arrays <br> Recipe 4.1. Iterating Over an Array <br> Recipe 4.2. Rearranging Values Without Using Temporary Variables <br> Recipe 4.3. Stripping Duplicate Elements from an Array <br> Recipe 4.4. Reversing an Array <br> Recipe 4.5. Sorting an Array <br> Recipe 4.6. Ignoring Case When Sorting Strings <br> Recipe 4.7. Making Sure a Sorted Array Stays Sorted <br> Recipe 4.8. Summing the Items of an Array <br> Recipe 4.9. Sorting an Array by Frequency of Appearance <br> Recipe 4.10. Shuffling an Array <br> Recipe 4.11. Getting the N Smallest Items of an Array <br> Recipe 4.12. Building Up a Hash Using Injection <br> Recipe 4.13. Extracting Portions of Arrays <br> Recipe 4.14. Computing Set Operations on Arrays <br> Recipe 4.15. Partitioning or Classifying a Set <br> Chapter 5. Hashes <br> Recipe 5.1. Using Symbols as Hash Keys <br> Recipe 5.2. Creating a Hash with a Default Value <br> Recipe 5.3. Adding Elements to a Hash <br> Recipe 5.4. Removing Elements from a Hash <br> Recipe 5.5. Using an Array or Other Modifiable Object as a Hash Key <br> Recipe 5.6. Keeping Multiple Values for the Same Hash Key <br> Recipe 5.7. Iterating Over a Hash <br> Recipe 5.8. Iterating Over a Hash in Insertion Order <br> Recipe 5.9. Printing a Hash <br> Recipe 5.10. Inverting a Hash <br> Recipe 5.11. Choosing Randomly from a Weighted List <br> Recipe 5.12. Building a Histogram <br> Recipe 5.13. Remapping the Keys and Values of a Hash <br> Recipe 5.14. Extracting Portions of Hashes <br> Recipe 5.15. Searching a Hash with Regular Expressions <br> Chapter 6. Files and Directories <br> Recipe 6.1. Checking to See If a File Exists <br> Recipe 6.2. Checking Your Access to a File <br> Recipe 6.3. Changing the Permissions on a File <br> Recipe 6.4. Seeing When a File Was Last Used Problem <br> Recipe 6.5. Listing a Directory <br> Recipe 6.6. Reading the Contents of a File <br> Recipe 6.7. Writing to a File <br> Recipe 6.8. Writing to a Temporary File <br> Recipe 6.9. Picking a Random Line from a File <br> Recipe 6.10. Comparing Two Files <br> Recipe 6.11. Performing Random Access on "Read-Once" Input Streams <br> Recipe 6.12. Walking a Directory Tree <br> Recipe 6.13. Locking a File <br> Recipe 6.14. Backing Up to Versioned Filenames <br> Recipe 6.15. Pretending a String Is a File <br> Recipe 6.16. Redirecting Standard Input or Output <br> Recipe 6.17. Processing a Binary File <br> Recipe 6.18. Deleting a File <br> Recipe 6.19. Truncating a File <br> Recipe 6.20. Finding the Files You Want <br> Recipe 6.21. Finding and Changing the Current Working Directory <br> Chapter 7. Code Blocks and Iteration <br> Recipe 7.1. Creating and Invoking a Block <br> Recipe 7.2. Writing a Method That Accepts a Block <br> Recipe 7.3. Binding a Block Argument to a Variable <br> Recipe 7.4. Blocks as Closures: Using Outside Variables Within a Code Block <br> Recipe 7.5. Writing an Iterator Over a Data Structure <br> Recipe 7.6. Changing the Way an Object Iterates <br> Recipe 7.7. Writing Block Methods That Classify or Collect <br> Recipe 7.8. Stopping an Iteration <br> Recipe 7.9. Looping Through Multiple Iterables in Parallel <br> Recipe 7.10. Hiding Setup and Cleanup in a Block Method <br> Recipe 7.11. Coupling Systems Loosely with Callbacks <br> Chapter 8. Objects and Classes8 <br> Recipe 8.1. Managing Instance Data <br> Recipe 8.2. Managing Class Data <br> Recipe 8.3. Checking Class or Module Membership <br> Recipe 8.4. Writing an Inherited Class <br> Recipe 8.5. Overloading Methods <br> Recipe 8.6. Validating and Modifying Attribute Values <br> Recipe 8.7. Defining a Virtual Attribute <br> Recipe 8.8. Delegating Method Calls to Another Object <br> Recipe 8.9. Converting and Coercing Objects to Different Types <br> Recipe 8.10. Getting a Human-Readable Printout of Any Object <br> Recipe 8.11. Accepting or Passing a Variable Number of Arguments <br> Recipe 8.12. Simulating Keyword Arguments <br> Recipe 8.13. Calling a Superclass's Method <br> Recipe 8.14. Creating an Abstract Method <br> Recipe 8.15. Freezing an Object to Prevent Changes <br> Recipe 8.16. Making a Copy of an Object <br> Recipe 8.17. Declaring Constants <br> Recipe 8.18. Implementing Class and Singleton Methods <br> Recipe 8.19. Controlling Access by Making Methods Private <br> Chapter 9. Modules and Namespaces <br> Recipe 9.1. Simulating Multiple Inheritance with Mixins <br> Recipe 9.2. Extending Specific Objects with Modules <br> Recipe 9.3. Mixing in Class Methods <br> Recipe 9.4. Implementing Enumerable: Write One Method, Get 22 Free <br> Recipe 9.5. Avoiding Naming Collisions with Namespaces <br> Recipe 9.6. Automatically Loading Libraries as Needed <br> Recipe 9.7. Including Namespaces <br> Recipe 9.8. Initializing Instance Variables Defined by a Module <br> Recipe 9.9. Automatically Initializing Mixed-In Modules <br> Chapter 10. Reflection and Metaprogramming <br> Recipe 10.1. Finding an Object's Class and Superclass <br> Recipe 10.2. Listing an Object's Methods <br> Recipe 10.3. Listing Methods Unique to an Object <br> Recipe 10.4. Getting a Reference to a Method <br> Recipe 10.5. Fixing Bugs in Someone Else's Class <br> Recipe 10.6. Listening for Changes to a Class <br> Recipe 10.7. Checking Whether an Object Has Necessary Attributes <br> Recipe 10.8. Responding to Calls to Undefined Methods <br> Recipe 10.9. Automatically Initializing Instance Variables <br> Recipe 10.10. Avoiding Boilerplate Code with Metaprogramming <br> Recipe 10.11. Metaprogramming with String Evaluations <br> Recipe 10.12. Evaluating Code in an Earlier Context <br> Recipe 10.13. Undefining a Method <br> Recipe 10.14. Aliasing Methods <br> Recipe 10.15. Doing Aspect-Oriented Programming <br> Recipe 10.16. Enforcing Software Contracts <br> Chapter 11. XML and HTML <br> Recipe 11.1. Checking XML Well-Formedness <br> Recipe 11.2. Extracting Data from a Document's Tree Structure <br> Recipe 11.3. Extracting Data While Parsing a Document <br> Recipe 11.4. Navigating a Document with XPath <br> Recipe 11.5. Parsing Invalid Markup <br> Recipe 11.6. Converting an XML Document into a Hash <br> Recipe 11.7. Validating an XML Document <br> Recipe 11.8. Substituting XML Entities <br> Recipe 11.9. Creating and Modifying XML Documents <br> Recipe 11.10. Compressing Whitespace in an XML Document <br> Recipe 11.11. Guessing a Document's Encoding <br> Recipe 11.12. Converting from One Encoding to Another <br> Recipe 11.13. Extracting All the URLs from an HTML Document <br> Recipe 11.14. Transforming Plain Text to HTML <br> Recipe 11.15. Converting HTML Documents from the Web into Text <br> Recipe 11.16. A Simple Feed Aggregator <br> Chapter 12. Graphics and Other File Formats <br> Recipe 12.1. Thumbnailing Images <br> Recipe 12.2. Adding Text to an Image <br> Recipe 12.3. Converting One Image Format to Another <br> Recipe 12.4. Graphing Data <br> Recipe 12.5. Adding Graphical Context with Sparklines <br> Recipe 12.6. Strongly Encrypting Data <br> Recipe 12.7. Parsing Comma-Separated Data <br> Recipe 12.8. Parsing Not-Quite-Comma-Separated Data <br> Recipe 12.9. Generating and Parsing Excel Spreadsheets <br> Recipe 12.10. Compressing and Archiving Files with Gzip and Tar <br> Recipe 12.11. Reading and Writing ZIP Files <br> Recipe 12.12. Reading and Writing Configuration Files <br> Recipe 12.13. Generating PDF Files <br> Recipe 12.14. Representing Data as MIDI Music <br> Chapter 13. Databases and Persistence <br> Recipe 13.1. Serializing Data with YAML <br> Recipe 13.2. Serializing Data with Marshal <br> Recipe 13.3. Persisting Objects with Madeleine <br> Recipe 13.4. Indexing Unstructured Text with SimpleSearch <br> Recipe 13.5. Indexing Structured Text with Ferret <br> Recipe 13.6. Using Berkeley DB Databases <br> Recipe 13.7. Controlling MySQL on Unix <br> Recipe 13.8. Finding the Number of Rows Returned by a Query <br> Recipe 13.9. Talking Directly to a MySQL Database <br> Recipe 13.10. Talking Directly to a PostgreSQL Database <br> Recipe 13.11. Using Object Relational Mapping with ActiveRecord <br> Recipe 13.12. Using Object Relational Mapping with Og <br> Recipe 13.13. Building Queries Programmatically <br> Recipe 13.14. Validating Data with ActiveRecord <br> Recipe 13.15. Preventing SQL Injection Attacks <br> Recipe 13.16. Using Transactions in ActiveRecord <br> Recipe 13.17. Adding Hooks to Table Events <br> Recipe 13.18. Adding Taggability with a Database Mixin <br> Chapter 14. Internet Services <br> Recipe 14.1. Grabbing the Contents of a Web Page <br> Recipe 14.2. Making an HTTPS Web Request <br> Recipe 14.3. Customizing HTTP Request Headers <br> Recipe 14.4. Performing DNS Queries <br> Recipe 14.5. Sending Mail <br> Recipe 14.6. Reading Mail with IMAP <br> Recipe 14.7. Reading Mail with POP3 <br> Recipe 14.8. Being an FTP Client <br> Recipe 14.9. Being a Telnet Client <br> Recipe 14.10. Being an SSH Client <br> Recipe 14.11. Copying a File to Another Machine <br> Recipe 14.12. Being a BitTorrent Client <br> Recipe 14.13. Pinging a Machine <br> Recipe 14.14. Writing an Internet Server <br> Recipe 14.15. Parsing URLs <br> Recipe 14.16. Writing a CGI Script <br> Recipe 14.17. Setting Cookies and Other HTTP Response Headers <br> Recipe 14.18. Handling File Uploads via CGI <br> Recipe 14.19. Running Servlets with WEBrick <br> Recipe 14.20. A Real-World HTTP Client <br> Chapter 15. Web Development: Ruby on Rails <br> Recipe 15.1. Writing a Simple Rails Application to Show System Status <br> Recipe 15.2. Passing Data from the Controller to the View <br> Recipe 15.3. Creating a Layout for Your Header and Footer <br> Recipe 15.4. Redirecting to a Different Location <br> Recipe 15.5. Displaying Templates with Render <br> Recipe 15.6. Integrating a Database with Your Rails Application <br> Recipe 15.7. Understanding Pluralization Rules <br> Recipe 15.8. Creating a Login System <br> Recipe 15.9. Storing Hashed User Passwords in the Database <br> Recipe 15.10. Escaping HTML and JavaScript for Display <br> Recipe 15.11. Setting and Retrieving Session Information <br> Recipe 15.12. Setting and Retrieving Cookies <br> Recipe 15.13. Extracting Code into Helper Functions <br> Recipe 15.14. Refactoring the View into Partial Snippets of Views <br> Recipe 15.15. Adding DHTML Effects with script.aculo.us <br> Recipe 15.16. Generating Forms for Manipulating Model Objects <br> Recipe 15.17. Creating an Ajax Form <br> Recipe 15.18. Exposing Web Services on Your Web Site <br> Recipe 15.19. Sending Mail with Rails <br> Recipe 15.20. Automatically Sending Error Messages to Your Email <br> Recipe 15.21. Documenting Your Web Site <br> Recipe 15.22. Unit Testing Your Web Site <br> Recipe 15.23. Using breakpoint in Your Web Application <br> Chapter 16. Web Services and Distributed Programming <br> Recipe 16.1. Searching for Books on Amazon <br> Recipe 16.2. Finding Photos on Flickr <br> Recipe 16.3. Writing an XML-RPC Client <br> Recipe 16.4. Writing a SOAP Client <br> Recipe 16.5. Writing a SOAP Server <br> Recipe 16.6. Searching the Web with Google's SOAP Service <br> Recipe 16.7. Using a WSDL File to Make SOAP Calls Easier <br> Recipe 16.8. Charging a Credit Card <br> Recipe 16.9. Finding the Cost to Ship Packages via UPS or FedEx <br> Recipe 16.10. Sharing a Hash Between Any Number of Computers <br> Recipe 16.11. Implementing a Distributed Queue <br> Recipe 16.12. Creating a Shared "Whiteboard" <br> Recipe 16.13. Securing DRb Services with Access Control Lists <br> Recipe 16.14. Automatically Discovering DRb Services with Rinda <br> Recipe 16.15. Proxying Objects That Can't Be Distributed <br> Recipe 16.16. Storing Data on Distributed RAM with MemCached <br> Recipe 16.17. Caching Expensive Results with MemCached <br> Recipe 16.18. A Remote-Controlled Jukebox <br> Chapter 17. Testing, Debugging, Optimizing, and Documenting <br> Recipe 17.1. Running Code Only in Debug Mode <br> Recipe 17.2. Raising an Exception <br> Recipe 17.3. Handling an Exception <br> Recipe 17.4. Rerunning After an Exception <br> Recipe 17.5. Adding Logging to Your Application <br> Recipe 17.6. Creating and Understanding Tracebacks <br> Recipe 17.7. Writing Unit Tests <br> Recipe 17.8. Running Unit Tests <br> Recipe 17.9. Testing Code That Uses External Resources <br> Recipe 17.10. Using breakpoint to Inspect and Change the State of Your Application <br> Recipe 17.11. Documenting Your Application <br> Recipe 17.12. Profiling Your Application <br> Recipe 17.13. Benchmarking Competing Solutions <br> Recipe 17.14. Running Multiple Analysis Tools at Once <br> Recipe 17.15. Who's Calling That Method? A Call Graph Analyzer <br> Chapter 18. Packaging and Distributing Software <br> Recipe 18.1. Finding Libraries by Querying Gem Respositories <br> Recipe 18.2. Installing and Using a Gem <br> Recipe 18.3. Requiring a Specific Version of a Gem <br> Recipe 18.4. Uninstalling a Gem <br> Recipe 18.5. Reading Documentation for Installed Gems <br> Recipe 18.6. Packaging Your Code as a Gem <br> Recipe 18.7. Distributing Your Gems <br> Recipe 18.8. Installing and Creating Standalone Packages with setup.rb <br> Chapter 19. Automating Tasks with Rake <br> Recipe 19.1. Automatically Running Unit Tests <br> Recipe 19.2. Automatically Generating Documentation <br> Recipe 19.3. Cleaning Up Generated Files <br> Recipe 19.4. Automatically Building a Gem <br> Recipe 19.5. Gathering Statistics About Your Code <br> Recipe 19.6. Publishing Your Documentation <br> Recipe 19.7. Running Multiple Tasks in Parallel <br> Recipe 19.8. A Generic Project Rakefile <br> Chapter 20. Multitasking and Multithreading <br> Recipe 20.1. Running a Daemon Process on Unix <br> Recipe 20.2. Creating a Windows Service <br> Recipe 20.3. Doing Two Things at Once with Threads <br> Recipe 20.4. Synchronizing Access to an Object <br> Recipe 20.5. Terminating a Thread <br> Recipe 20.6. Running a Code Block on Many Objects Simultaneously <br> Recipe 20.7. Limiting Multithreading with a Thread Pool <br> Recipe 20.8. Driving an External Process with popen <br> Recipe 20.9. Capturing the Output and Error Streams from a Unix Shell Command <br> Recipe 20.10. Controlling a Process on Another Machine <br> Recipe 20.11. Avoiding Deadlock <br> Chapter 21. User Interface <br> Recipe 21.1. <br> Recipe 21.2. Getting Input One Line at a Time <br> Recipe 21.3. Getting Input One Character at a Time <br> Recipe 21.4. Parsing Command-Line Arguments <br> Recipe 21.5. Testing Whether a Program Is Running Interactively <br> Recipe 21.6. Setting Up and Tearing Down a Curses Program <br> Recipe 21.7. Clearing the Screen <br> Recipe 21.8. Determining Terminal Size <br> Recipe 21.9. Changing Text Color <br> Recipe 21.10. Reading a Password <br> Recipe 21.11. Allowing Input Editing with Readline <br> Recipe 21.12. Making Your Keyboard Lights Blink <br> Recipe 21.13. Creating a GUI Application with Tk <br> Recipe 21.14. Creating a GUI Application with wxRuby <br> Recipe 21.15. Creating a GUI Application with Ruby/GTK <br> Recipe 21.16. Creating a Mac OS X Application with RubyCocoa <br> Recipe 21.17. Using AppleScript to Get User Input <br> Chapter 22. Extending Ruby with Other Languages <br> Recipe 22.1. Writing a C Extension for Ruby <br> Recipe 22.2. Using a C Library from Ruby <br> Recipe 22.3. Calling a C Library Through SWIG <br> Recipe 22.4. Writing Inline C in Your Ruby Code <br> Recipe 22.5. Using Java Libraries with JRuby <br> Chapter 23. System Administration <br> Recipe 23.1. Scripting an External Program <br> Recipe 23.2. Managing Windows Services <br> Recipe 23.3. Running Code as Another User <br> Recipe 23.4. Running Periodic Tasks Without cron or at <br> Recipe 23.5. Deleting Files That Match a Regular Expression <br> Recipe 23.6. Renaming Files in Bulk <br> Recipe 23.7. Finding Duplicate Files <br> Recipe 23.8. Automating Backups <br> Recipe 23.9. Normalizing Ownership and Permissions in User Directories <br> Recipe 23.10. Killing All Processes for a Given User <br> About the Authors <br> Colophon <br> Index <br>

2008-05-12

网页开发人员参考大全 HTML CSS Javascript

网页开发人员参考大全 HTML CSS Javascript<br> The Web Programmer's Desk Reference <br>by Lazaro Issi Cohen and Joseph Issi Cohen ISBN:1593270119 <br>No Starch Press © 2004 (1102 pages) <br>Written for web programmers and designers, this reference alphabetically lists every HTML tag supported by Netscape Navigator and Internet Explorer, along with their attributes, event handlers, CSS and JavaScript style properties, and much more.<br><br>Table of Contents <br> The Web Programmer's Desk Reference <br> Introduction <br> Part I - Fundamentals <br> Chapter 1 - Cascading Style Sheets <br> Chapter 2 - Object-Oriented Programming—The Dom And The Node Tree <br> Chapter 3 - Events And Event Handlers <br> Chapter 4 - Javascript Core Language And Fundamentals <br> Part II - References <br> Chapter 5 - HTML Elements <br> Chapter 6 - HTML Attributes <br> Chapter 7 - Event Handlers <br> Chapter 8 - CSS Attributes And Javascript Style Properties <br> Chapter 9 - Microsoft Internet Explorer Behaviors <br> Chapter 10 - Microsoft Filters and Transitions <br> Chapter 11 - Javascript Properties <br> Chapter 12 - Javascript Methods <br> Chapter 13 - Javascript Collections <br> Chapter 14 - Javascript Objects <br> Chapter 15 - HTML + TIME Microsoft Technology <br> List of Figures <br> List of Tables <br>

2008-05-12

空空如也

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

TA关注的人

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