Ruby Cookbook 2nd Edition by Lucas Carlson,Richardson Leonard – Ebook PDF Instant Download/Delivery:9781449373719,1449373712
Full download Ruby Cookbook 2nd Edition after payment
Product details:
ISBN 10:1449373712
ISBN 13:9781449373719
Author:Lucas Carlson,Richardson Leonard
Why spend time on coding problems that others have already solved when you could be making real progress on your Ruby project? This updated cookbook provides more than 350 recipes for solving common problems, on topics ranging from basic data structures, classes, and objects, to web development, distributed programming, and multithreading.Revised for Ruby 2.1, each recipe includes a discussion on why and how the solution works. You’ll find recipes suitable for all skill levels, from Ruby newbies to experts who need an occasional reference. With Ruby Cookbook, you’ll not only save time, but keep your brain percolating with new ideas as well.Recipes cover:Data structures including strings, numbers, date and time, arrays, hashes, files and directoriesUsing Ruby’s code blocks, also known as closuresOOP features such as classes, methods, objects, and modulesXML and HTML, databases and persistence, and graphics and other formatsWeb development with Rails and SinatraInternet services, web services, and distributed programmingSoftware testing, debugging, packaging, and distributingMultitasking, multithreading, and extending Ruby with other languages
Ruby Cookbook 2nd Table of contents:
Chapter 1. Ruby 2.1
1.1 What’s Different Between Ruby 1.8 and 2.1?
Problem
Solution
1.2 YARV (Yet Another Ruby VM) Bytecode Interpreter
Problem
Solution
Discussion
See Also
1.3 Syntax Changes
Problem
Solution
See Also
1.4 Keyword Arguments
Problem
Solution
Discussion
1.5 Performance Enhancements
Problem
Solution
See Also
1.6 Refinements
Problem
Solution
Discussion
1.7 Debugging with DTrace and TracePoint
Problem
Solution
Discussion
See Also
1.8 Module Prepending
Problem
Solution
Discussion
See Also
1.9 New Methods
Problem
Solution
See Also
1.10 New Classes
Problem
Solution
See Also
1.11 New Standard Libraries
Problem
Solution
See Also
1.12 What’s Next?
Problem
Solution
See Also
Chapter 2. Strings
2.1 Building a String from Parts
Problem
Solution
Discussion
2.2 Substituting Variables into Strings
Problem
Solution
Discussion
See Also
2.3 Substituting Variables into an Existing String
Problem
Solution
Discussion
See Also
2.4 Reversing a String by Words or Characters
Problem
Solution
Discussion
See Also
2.5 Representing Unprintable Characters
Problem
Solution
Discussion
2.6 Converting Between Characters and Values
Problem
Solution
Discussion
See Also
2.7 Converting Between Strings and Symbols
Problem
Solution
Discussion
See Also
2.8 Processing a String One Character at a Time
Problem
Solution
Discussion
See Also
2.9 Processing a String One Word at a Time
Problem
Solution
Discussion
See Also
2.10 Changing the Case of a String
Problem
Solution
Discussion
See Also
2.11 Managing Whitespace
Problem
Solution
Discussion
2.12 Testing Whether an Object Is String-Like
Problem
Solution
Discussion
See Also
2.13 Getting the Parts of a String You Want
Problem
Solution
Discussion
See Also
2.14 Word-Wrapping Lines of Text
Problem
Solution
Discussion
See Also
2.15 Generating a Succession of Strings
Problem
Solution
Discussion
See Also
2.16 Matching Strings with Regular Expressions
Problem
Solution
Discussion
See Also
2.17 Replacing Multiple Patterns in a Single Pass
Problem
Solution
Discussion
See Also
2.18 Validating an Email Address
Problem
Solution
Discussion
See Also
2.19 Classifying Text with a Bayesian Analyzer
Problem
Solution
Discussion
See Also
Chapter 3. Numbers
3.1 Parsing a Number from a String
Problem
Solution
Discussion
See Also
3.2 Comparing Floating-Point Numbers
Problem
Solution
Discussion
See Also
3.3 Representing Numbers to Arbitrary Precision
Problem
Solution
Discussion
See Also
3.4 Representing Rational Numbers
Problem
Solution
Discussion
See Also
3.5 Generating Random Numbers
Problem
Solution
Discussion
See Also
3.6 Converting Between Numeric Bases
Problem
Solution
Discussion
See Also
3.7 Taking Logarithms
Problem
Solution
Discussion
See Also
3.8 Finding Mean, Median, and Mode
Problem
Solution
Discussion
See Also
3.9 Converting Between Degrees and Radians
Problem
Solution
Discussion
See Also
3.10 Multiplying Matrices
Problem
Solution
Discussion
See Also
3.11 Solving a System of Linear Equations
Problem
Solution
Discussion
See Also
3.12 Using Complex Numbers
Problem
Solution
Discussion
See Also
3.13 Simulating a Subclass of Fixnum
Problem
Solution
Discussion
See Also
3.14 Doing Math with Roman Numbers
Problem
Solution
Discussion
See Also
3.15 Generating a Sequence of Numbers
Problem
Solution
Discussion
See Also
3.16 Generating Prime Numbers
Problem
Solution
Discussion
See Also
3.17 Checking a Credit Card Checksum
Problem
Solution
Discussion
See Also
Chapter 4. Date and Time
4.1 Finding Today’s Date
Problem
Solution
Discussion
See Also
4.2 Parsing Dates, Precisely or Fuzzily
Problem
Solution
Discussion
See Also
4.3 Printing a Date
Problem
Solution
Discussion
See Also
4.4 Iterating Over Dates
Problem
Solution
Discussion
See Also
4.5 Doing Date Arithmetic
Problem
Solution
Discussion
See Also
4.6 Counting the Days Since an Arbitrary Date
Problem
Solution
Discussion
See Also
4.7 Converting Between Time Zones
Problem
Solution
Discussion
See Also
4.8 Checking Whether Daylight Saving Time Is in Effect
Problem
Solution
Discussion
See Also
4.9 Converting Between Time and DateTime Objects
Problem
Solution
Discussion
See Also
4.10 Finding the Day of the Week
Problem
Solution
Discussion
See Also
4.11 Handling Commercial Dates
Problem
Solution
Discussion
See Also
4.12 Running a Code Block Periodically
Problem
Solution
Discussion
See Also
4.13 Waiting a Certain Amount of Time
Problem
Solution
Discussion
See Also
4.14 Adding a Timeout to a Long-Running Operation
Problem
Solution
Discussion
See Also
Chapter 5. Arrays
5.1 Iterating Over an Array
Problem
Solution
Discussion
See Also
5.2 Rearranging Values Without Using Temporary Variables
Problem
Solution
Discussion
5.3 Stripping Duplicate Elements from an Array
Problem
Solution
Discussion
5.4 Reversing an Array
Problem
Solution
Discussion
See Also
5.5 Sorting an Array
Problem
Solution
Discussion
See Also
5.6 Ignoring Case When Sorting Strings
Problem
Solution
Discussion
See Also
5.7 Making Sure a Sorted Array Stays Sorted
Problem
Solution
Discussion
See Also
5.8 Summing the Items of an Array
Problem
Solution
Discussion
See Also
5.9 Sorting an Array by Frequency of Appearance
Problem
Solution
Discussion
See Also
5.10 Shuffling an Array
Problem
Solution
Discussion
See Also
5.11 Getting the N Smallest Items of an Array
Problem
Solution
Discussion
See Also
5.12 Building a Hash from an Array
Problem
Solution
Discussion
References
5.13 Extracting Portions of Arrays
Problem
Solution
Discussion
See Also
5.14 Computing Set Operations on Arrays
Problem
Solution
Discussion
See Also
5.15 Partitioning or Classifying a Set
Problem
Solution
Discussion
Chapter 6. Hashes
6.1 Using Symbols as Hash Keys
Problem
Solution
Discussion
See Also
6.2 Creating a Hash with a Default Value
Problem
Solution
Discussion
See Also
6.3 Adding Elements to a Hash
Problem
Solution
Discussion
See Also
6.4 Removing Elements from a Hash
Problem
Solution
Discussion
See Also
6.5 Using an Array or Other Modifiable Object as a Hash Key
Problem
Solution
Discussion
See Also
6.6 Keeping Multiple Values for the Same Hash Key
Problem
Solution
Discussion
See Also
6.7 Iterating Over a Hash
Problem
Solution
Discussion
See Also
6.8 Iterating Over a Hash in Insertion Order
Problem
Solution
Discussion
See Also
6.9 Printing a Hash
Problem
Solution
Discussion
See Also
6.10 Inverting a Hash
Problem
Solution
Discussion
See Also
6.11 Choosing Randomly from a Weighted List
Problem
Solution
Discussion
See Also
6.12 Building a Histogram
Problem
Solution
Discussion
See Also
6.13 Remapping the Keys and Values of a Hash
Problem
Solution
Discussion
See Also
6.14 Extracting Portions of Hashes
Problem
Solution
Discussion
See Also
6.15 Searching a Hash with Regular Expressions
Problem
Solution
Discussion
Chapter 7. Files and Directories
7.1 Checking to See If a File Exists
Problem
Solution
Discussion
See Also
7.2 Checking Your Access to a File
Problem
Solution
Discussion
setuid and setgid Scripts
See Also
7.3 Changing the Permissions on a File
Problem
Solution
Discussion
See Also
7.4 Seeing When a File Was Last Used
Problem
Solution
Discussion
See Also
7.5 Listing a Directory
Problem
Solution
Discussion
See Also
7.6 Reading the Contents of a File
Problem
Solution
Discussion
See Also
7.7 Writing to a File
Problem
Solution
Discussion
Buffered I/O
See Also
7.8 Writing to a Temporary File
Problem
Solution
Discussion
7.9 Picking a Random Line from a File
Problem
Solution
Discussion
See Also
7.10 Comparing Two Files
Problem
Solution
Discussion
See Also
7.11 Performing Random Access on “Read-Once” Input Streams
Problem
Solution
Discussion
See Also
7.12 Walking a Directory Tree
Problem
Solution
Discussion
See Also
7.13 Locking a File
Problem
Solution
Discussion
Nonblocking Locks
See Also
7.14 Backing Up to Versioned Filenames
Problem
Solution
Discussion
See Also
7.15 Pretending a String Is a File
Problem
Solution
Discussion
See Also
7.16 Redirecting Standard Input or Output
Problem
Solution
Discussion
See Also
7.17 Processing a Binary File
Problem
Solution
Discussion
An MP3 Example
See Also
7.18 Deleting a File
Problem
Solution
Discussion
7.19 Truncating a File
Problem
Solution
Discussion
7.20 Finding the Files You Want
Problem
Solution
Discussion
See Also
7.21 Finding and Changing the Current Working Directory
Problem
Solution
Discussion
See Also
Chapter 8. Code Blocks and Iteration
8.1 Creating and Invoking a Block
Problem
Solution
Discussion
See Also
8.2 Writing a Method That Accepts a Block
Problem
Solution
Discussion
See Also
8.3 Binding a Block Argument to a Variable
Problem
Solution
Discussion
See Also
8.4 Blocks as Closures: Using Outside Variables Within a Code Block
Problem
Solution
Discussion
8.5 Writing an Iterator Over a Data Structure
Problem
Solution
Discussion
See Also
8.6 Changing the Way an Object Iterates
Problem
Discussion
Discussion
See Also
8.7 Writing Block Methods That Classify or Collect
Problem
Solution
Discussion
See Also
8.8 Stopping an Iteration
Problem
Solution
Discussion
See Also
8.9 Looping Through Multiple Iterables in Parallel
Problem
Solution
Discussion
See Also
8.10 Hiding Setup and Cleanup in a Block Method
Problem
Solution
Discussion
See Also
8.11 Coupling Systems Loosely with Callbacks
Problem
Solution
Discussion
Chapter 9. Objects and Classes
9.1 Managing Instance Data
Problem
Solution
Discussion
See Also
9.2 Managing Class Data
Problem
Solution
Discussion
See Also
9.3 Checking Class or Module Membership
Problem
Solution
Discussion
See Also
9.4 Writing an Inherited Class
Problem
Solution
Discussion
See Also
9.5 Overloading Methods
Problem
Solution
Discussion
See Also
9.6 Validating and Modifying Attribute Values
Problem
Solution
Discussion
See Also
9.7 Defining a Virtual Attribute
Problem
Solution
Discussion
See Also
9.8 Delegating Method Calls to Another Object
Problem
Solution
Discussion
See Also
9.9 Converting and Coercing Objects to Different Types
Problem
Solution
Discussion
See Also
9.10 Getting a Human-Readable Printout of Any Object
Problem
Solution
Discussion
9.11 Accepting or Passing a Variable Number of Arguments
Problem
Solution
Discussion
9.12 Using Keyword Arguments
Problem
Solution
Discussion
See Also
9.13 Calling a Superclass’s Method
Problem
Solution
Discussion
9.14 Creating an Abstract Method
Problem
Solution
Discussion
9.15 Freezing an Object to Prevent Changes
Problem
Solution
Discussion
See Also
9.16 Making a Copy of an Object
Problem
Solution
Discussion
See Also
9.17 Declaring Constants
Problem
Solution
Discussion
See Also
9.18 Implementing Class and Singleton Methods
Problem
Solution
Discussion
9.19 Controlling Access by Making Methods Private
Problem
Solution
Discussion
See Also
Chapter 10. Modules and Namespaces
10.1 Simulating Multiple Inheritance with Mixins
Problem
Solution
Discussion
See Also
10.2 Extending Specific Objects with Modules
Problem
Solution
Discussion
See Also
10.3 Mixing in Class Methods
Problem
Solution
Discussion
See Also
10.4 Implementing Enumerable: Write One Method, Get 48 Free
Problem
Solution
Discussion
See Also
10.5 Avoiding Naming Collisions with Namespaces
Problem
Solution
Discussion
See Also
10.6 Automatically Loading Libraries as Needed
Problem
Solution
Discussion
10.7 Including Namespaces
Problem
Solution
Discussion
See Also
10.8 Initializing Instance Variables Defined by a Module
Problem
Solution
Discussion
See Also
10.9 Automatically Initializing Mixed-in Modules
Problem
Solution
Discussion
See Also
10.10 Prepending Modules
Problem
Solution
Discussion
Chapter 11. Reflection and Metaprogramming
11.1 Finding an Object’s Class and Superclass
Problem
Solution
Discussion
See Also
11.2 Listing an Object’s Methods
Problem
Solution
Discussion
See Also
11.3 Listing Methods Unique to an Object
Problem
Solution
Discussion
See Also
11.4 Getting a Reference to a Method
Problem
Solution
Discussion
See Also
11.5 Fixing Bugs in Someone Else’s Class
Problem
Solutions
Discussion
See Also
11.6 Listening for Changes to a Class
Problem
Solution
Discussion
See Also
11.7 Checking Whether an Object Has Necessary Attributes
Problem
Solution
Discussion
See Also
11.8 Responding to Calls to Undefined Methods
Problem
Solution
Discussion
See Also
11.9 Automatically Initializing Instance Variables
Problem
Solution
Discussion
11.10 Avoiding Boilerplate Code with Metaprogramming
Problem
Solution
Discussion
See Also
11.11 Metaprogramming with String Evaluations
Problem
Solution
Discussion
11.12 Evaluating Code in an Earlier Context
Problem
Solution
Discussion
See Also
11.13 Undefining a Method
Problem
Solution
Discussion
See Also
11.14 Aliasing Methods
Problem
Solution
Discussion
See Also
11.15 Doing Aspect-Oriented Programming
Problem
Solution
Discussion
See Also
11.16 Enforcing Software Contracts
Problem
Solution
Discussion
See Also
Chapter 12. XML and HTML
12.1 Checking That XML Is Well Formed
Problem
Solution
Discussion
See Also
12.2 Extracting Data from a Document’s Tree Structure
Problem
Solution
Discussion
See Also
12.3 Extracting Data While Parsing a Document
Problem
Solution
Discussion
See Also
12.4 Navigating a Document with XPath
Problem
Solution
Discussion
See Also
12.5 Converting an XML Document into a Hash
Problem
Solution
Discussion
See Also
12.6 Validating an XML Document
Problem
Solution
Discussion
See Also
12.7 Substituting XML Entities
Problem
Solution
Discussion
See Also
12.8 Creating and Modifying XML Documents
Problem
Solution
Discussion
See Also
12.9 Compressing Whitespace in an XML Document
Problem
Solution
Discussion
See Also
12.10 Guessing a Document’s Encoding
Problem
Solution
Discussion
See Also
12.11 Converting from One Encoding to Another
Problem
Solution
Discussion
See Also
12.12 Extracting All the URLs from an HTML Document
Problem
Solution
Discussion
See Also
12.13 Transforming Plain Text to HTML
Problem
Solution
Discussion
See Also
12.14 Converting HTML Documents from the Web into Text
Problem
Solution
Discussion
See Also
12.15 Creating a Simple Feed Aggregator
Problem
Solution
See Also
Chapter 13. Graphics and Other File Formats
13.1 Thumbnailing Images
Problem
Solution
Discussion
See Also
13.2 Adding Text to an Image
Problem
Solution
Discussion
See Also
13.3 Converting One Image Format to Another
Problem
Solution
Discussion
See Also
13.4 Graphing Data
Problem
Solution
Discussion
See Also
13.5 Adding Graphical Context with Sparklines
Problem
Solution
Discussion
See Also
13.6 Symmetrically Encrypting Data
Problem
Solution
Discussion
See Also
13.7 Parsing Comma-Separated Data
Problem
Solution
Discussion
See Also
13.8 Parsing Not-Quite-Comma-Separated Data
Problem
Solution
Discussion
See Also
13.9 Generating and Parsing Excel Spreadsheets
Problem
Solution
Discussion
See Also
13.10 Compressing and Archiving Files with Gzip and Tar
Problem
Solution
Discussion
See Also
13.11 Reading and Writing ZIP Files
Problem
Solution
Discussion
See Also
13.12 Reading and Writing Configuration Files
Problem
Solution
Discussion
See Also
13.13 Generating PDF Files
Problem
Solution
Discussion
See Also
13.14 Representing Data as MIDI Music
Problem
Solution
Discussion
See Also
Chapter 14. Databases and Persistence
14.1 Serializing Data with YAML
Problem
Solution
Discussion
See Also
14.2 Serializing Data with Marshal
Problem
Solution
Discussion
See Also
14.3 Persisting Objects with Madeleine
Problem
Solution
Discussion
See Also
14.4 Indexing Unstructured Text with SimpleSearch
Problem
Solution
Discussion
See Also
14.5 Indexing Structured Text with Ferret
Problem
Discussion
Discussion
See Also
14.6 Using Berkeley DB Databases
Problem
Solution
Discussion
See Also
14.7 Controlling MySQL on Unix
Problem
Solution
Discussion
See Also
14.8 Finding the Number of Rows Returned by a Query
Problem
Solution
Discussion
See Also
14.9 Talking Directly to a MySQL Database
Problem
Solution
Discussion
See Also
14.10 Talking Directly to a PostgreSQL Database
Problem
Solution
Discussion
See Also
14.11 Using Object Relational Mapping with ActiveRecord
Problem
Solution
Discussion
See Also
14.12 Building Queries Programmatically
Problem
Solution
Discussion
See Also
14.13 Validating Data with ActiveRecord
Problem
Solution
Discussion
See Also
14.14 Preventing SQL Injection Attacks
Problem
Solution
Discussion
See Also
14.15 Using Transactions in ActiveRecord
Problem
Solution
Discussion
See Also
14.16 Adding Hooks to Table Events
Problem
Solution
Discussion
See Also
14.17 Adding Taggability with a Database Mixin
Problem
Solution
Discussion
See Also
Chapter 15. Internet Services
15.1 Grabbing the Contents of a Web Page
Problem
Solution
Discussion
See Also
15.2 Making an HTTPS Web Request
Problem
Solution
Discussion
See Also
15.3 Customizing HTTP Request Headers
Problem
Solution
Discussion
See Also
15.4 Performing DNS Queries
Problem
Solution
Discussion
See Also
15.5 Sending Mail
Problem
Solution
Discussion
See Also
15.6 Reading Mail with IMAP
Problem
Solution
Discussion
See Also
15.7 Reading Mail with POP3
Problem
Solution
Discussion
See Also
15.8 Being an FTP Client
Problem
Solution
Discussion
See Also
15.9 Being a Telnet Client
Problem
Solution
Discussion
See Also
15.10 Being an SSH Client
Problem
Solution
Discussion
See Also
15.11 Copying a File to Another Machine
Problem
Solution
Discussion
15.12 Being a BitTorrent Client
Problem
Solution
Discussion
See Also
15.13 Pinging a Machine
Problem
Solution
Discussion
15.14 Writing an Internet Server
Problem
Solution
Discussion
See Also
15.15 Parsing URLs
Problem
Solution
Discussion
See Also
15.16 Writing a CGI Script
Problem
Solution
Discussion
See Also
15.17 Setting Cookies and Other HTTP Response Headers
Problem
Solution
Discussion
See Also
15.18 Handling File Uploads via CGI
Problem
Solution
Discussion
See Also
15.19 Running Servlets with WEBrick
Problem
Solution
Discussion
See Also
15.20 Creating a Real-World HTTP Client
Problem
Solution
Discussion
See Also
Chapter 16. Web Development: Ruby on Rails
16.1 Writing a Simple Rails Application to Show System Status
Problem
Solution
Discussion
See Also
16.2 Passing Data from the Controller to the View
Problem
Solution
Discussion
16.3 Creating a Layout for Your Header and Footer
Problem
Solution
Discussion
See Also
16.4 Redirecting to a Different Location
Problem
Solution
Discussion
See Also
16.5 Displaying Templates with Render
Problem
Solution
Discussion
See Also
16.6 Integrating a Database with Your Rails Application
Problem
Solution
Discussion
See Also
16.7 Understanding Pluralization Rules
Problem
Solution
Discussion
See Also
16.8 Creating a Login System
Problem
Solution
Discussion
See Also
16.9 Storing Hashed User Passwords in the Database
Problem
Solution
Discussion
See Also
16.10 Escaping HTML and JavaScript for Display
Problem
Solution
Discussion
See Also
16.11 Setting and Retrieving Session Information
Problem
Solution
Discussion
See Also
16.12 Setting and Retrieving Cookies
Problem
Solution
Discussion
See Also
16.13 Extracting Code into Helper Functions
Problem
Solution
Discussion
See Also
16.14 Refactoring the View into Partial Snippets of Views
Problem
Solution
Discussion
See Also
16.15 Adding Dynamic Effects with script.aculo.us
Problem
Solution
Discussion
See Also
16.16 Generating Forms for Manipulating Model Objects
Problem
Solution
Discussion
See Also
16.17 Creating an Ajax Form
Problem
Solution
Discussion
16.18 Exposing Web Services on Your Website
Problem
Solution
Discussion
See Also
16.19 Sending Mail with Rails
Problem
Solution
Discussion
See Also
16.20 Automatically Sending Error Messages to Your Email
Problem
Solution
Discussion
See Also
16.21 Documenting Your Website
Problem
Solution
Discussion
See Also
16.22 Unit-Testing Your Website
Problem
Solution
Discussion
See Also
16.23 Using breakpoint in Your Web Application
Problem
Solution
Discussion
See Also
Chapter 17. Web Development: Sinatra
17.1 Developing a Minimalistic Web-Services–Based Application
Problem
Solution
Discussion
See Also
17.2 Writing a Simple Sinatra Application to Show System Status
Problem
Solution
Discussion
See Also
17.3 Creating a Layout for Your Header and Footer
Problem
Solution
Discussion
See Also
17.4 Passing Data from the Controller to the View
Problem
Solution
Discussion
See Also
17.5 Redirecting to a Different Location
Problem
Solution
Discussion
See Also
17.6 Integrating a Database with Your Sinatra Application
Problem
Solution
Discussion
See Also
17.7 Setting Status Codes and Headers
Problem
Solution
Discussion
See Also
17.8 Setting and Retrieving Session Information
Problem
Solution
Discussion
See Also
17.9 Setting and Retrieving Cookies
Problem
Solution
Discussion
See Also
17.10 Sending Mail with Sinatra
Problem
Solution
Discussion
See Also
17.11 Building RESTful Web Services on Your Website
Problem
Solution
Discussion
See Also
17.12 Creating RESTful JavaScript Clients for Your Web Services
Problem
Solution
Discussion
See Also
Chapter 18. Web Services and Distributed Programming
18.1 Searching for Books on Amazon
Problem
Solution
Discussion
See Also
18.2 Finding Photos on Flickr
Problem
Solution
Discussion
See Also
18.3 Writing an XML-RPC Client
Problem
Solution
Discussion
See Also
18.4 Writing a SOAP Client
Problem
Solution
Discussion
See Also
18.5 Writing a SOAP Server
Problem
Solution
Discussion
See Also
18.6 Charging a Credit Card
Problem
Solution
Discussion
See Also
18.7 Finding the Cost to Ship Packages via UPS or FedEx
Problem
Solution
Discussion
See Also
18.8 Sharing a Hash Between Any Number of Computers
Problem
Solution
Discussion
See Also
18.9 Implementing a Distributed Queue
Problem
Solution
Discussion
See Also
18.10 Creating a Shared “Whiteboard”
Problem
Solution
Discussion
18.11 Securing DRb Services with Access Control Lists
Problem
Solution
Discussion
See Also
18.12 Automatically Discovering DRb Services with Rinda
Problem
Solution
Discussion
See Also
18.13 Proxying Objects That Can’t Be Distributed
Problem
Solution
Discussion
See Also
18.14 Storing Data on Distributed RAM with MemCached
Problem
Solution
Discussion
See Also
18.15 Caching Expensive Results with MemCached
Problem
Solution
Discussion
See Also
18.16 A Remote-Controlled Jukebox
See Also
Chapter 19. Testing, Debugging, Optimizing, and Documenting
19.1 Running Code Only in Debug Mode
Problem
Solution
Discussion
See Also
19.2 Raising an Exception
Problem
Solution
Discussion
See Also
19.3 Handling an Exception
Problem
Solution
Discussion
See Also
19.4 Retrying After an Exception
Problem
Solution
Discussion
See Also
19.5 Adding Logging to Your Application
Problem
Solution
Discussion
See Also
19.6 Creating and Understanding Tracebacks
Problem
Solution
Discussion
See Also
19.7 Writing Unit Tests
Problem
Solution
Discussion
See Also
19.8 Running Unit Tests
Problem
Solution
Discussion
See Also
19.9 Testing Code That Uses External Resources
Problem
Solution
Discussion
See Also
19.10 Using debug to Inspect and Change the State of Your Application
Problem
Solution
Discussion
See Also
19.11 Documenting Your Application
Problem
Solution
Discussion
See Also
19.12 Profiling Your Application
Problem
Solution
Discussion
See Also
19.13 Benchmarking Competing Solutions
Problem
Solution
Discussion
See Also
19.14 Running Multiple Analysis Tools at Once
Problem
Solution
Discussion
Chapter 20. Packaging and Distributing Software
20.1 Finding Libraries by Querying Gem Respositories
Problem
Solution
Discussion
See Also
20.2 Installing and Using a Gem
Problem
Solution
Discussion
See Also
20.3 Requiring a Specific Version of a Gem
Problem
Solution
Discussion
See Also
20.4 Uninstalling a Gem
Problem
Solution
Discussion
20.5 Reading Documentation for Installed Gems
Problem
Solution
Discussion
See Also
20.6 Packaging Your Code as a Gem
Problem
Solution
Discussion
See Also
20.7 Distributing Your Gems
Problem
Solution
Discussion
See Also
20.8 Installing and Creating Standalone Packages with setup.rb
Problem
Solution
Discussion
See Also
Chapter 21. Automating Tasks with Rake
21.1 Automatically Running Unit Tests
Problem
Solution
Discussion
See Also
21.2 Automatically Generating Documentation
Problem
Solution
Discussion
See Also
21.3 Cleaning Up Generated Files
Problem
Solution
Discussion
See Also
21.4 Automatically Building a Gem
Problem
Solution
Discussion
See Also
21.5 Gathering Statistics About Your Code
Problem
Solution
Discussion
See Also
21.6 Publishing Your Documentation
Problem
Solution
Discussion
See Also
21.7 Running Multiple Tasks in Parallel
Problem
Solution
Discussion
See Also
21.8 Creating a Generic Project Rakefile
Problem
Solution
See Also
Chapter 22. Multitasking and Multithreading
22.1 Running a Daemon Process on Unix
Problem
Solution
Discussion
See Also
22.2 Creating a Windows Service
Problem
Solution
Discussion
See Also
22.3 Doing Two Things at Once with Threads
Problem
Solution
Discussion
22.4 Synchronizing Access to an Object
Problem
Solution
Discussion
See Also
22.5 Terminating a Thread
Problem
Solution
Discussion
22.6 Running a Code Block on Many Objects Simultaneously
Problem
Solution
Discussion
See Also
22.7 Limiting Multithreading with a Thread Pool
Problem
Solution
Discussion
See Also
22.8 Driving an External Process with popen
Problem
Solution
Discussion
See Also
22.9 Capturing the Output and Error Streams from a Unix Shell Command
Problem
Solution
Discussion
See Also
22.10 Controlling a Process on Another Machine
Problem
Solution
Discussion
See Also
22.11 Avoiding Deadlock
Problem
Solution
Discussion
See Also
Chapter 23. User Interface
23.1 Resources
23.2 Getting Input One Line at a Time
Problem
Solution
Discussion
See Also
23.3 Getting Input One Character at a Time
Problem
Solution
Discussion
See Also
23.4 Parsing Command-Line Arguments
Problem
Solution
Discussion
See Also
23.5 Testing Whether a Program Is Running Interactively
Problem
Solution
Discussion
23.6 Setting Up and Tearing Down a Curses Program
Problem
Solution
Discussion
See Also
23.7 Clearing the Screen
Problem
Solution
Discussion
23.8 Determining Terminal Size
Problem
Solution
Discussion
See Also
23.9 Changing Text Color
Problem
Solution
Discussion
See Also
23.10 Reading a Password
Problem
Solution
Discussion
See Also
23.11 Allowing Input Editing with Readline
Problem
Solution
Discussion
See Also
23.12 Making Your Keyboard Lights Blink
Problem
Solution
Discussion
See Also
23.13 Creating a GUI Application with Tk
Problem
Solution
Discussion
See Also
23.14 Creating a GUI Application with wxRuby
Problem
Solution
Discussion
See Also
23.15 Creating a GUI Application with Ruby/GTK
Problem
Solution
Discussion
See Also
23.16 Using AppleScript to Get User Input
Problem
Solution
Discussion
See Also
Chapter 24. Extending Ruby with Other Languages
24.1 Writing a C Extension for Ruby
Problem
Solution
Discussion
See Also
24.2 Using a C Library from Ruby
Problem
Solution
Discussion
See Also
24.3 Calling a C Library Through SWIG
Problem
Solution
Discussion
See Also
24.4 Writing Inline C in Your Ruby Code
Problem
Solution
Discussion
See Also
24.5 Using Java Libraries with JRuby
Problem
Solution
Discussion
See Also
Chapter 25. System Administration
25.1 Scripting an External Program
Problem
Solution
Discussion
See Also
25.2 Managing Windows Services
Problem
Solution
Discussion
See Also
25.3 Running Code as Another User
Problem
Solution
Discussion
See Also
25.4 Running Periodic Tasks Without cron or at
Problem
Solution
Discussion
See Also
25.5 Deleting Files That Match a Regular Expression
Problem
Solution
Discussion
See Also
25.6 Renaming Files in Bulk
Problem
Solution
Discussion
See Also
25.7 Finding Duplicate Files
Problem
Solution
Discussion
See Also
25.8 Automating Backups
Problem
Solution
Discussion
See Also
25.9 Normalizing Ownership and Permissions in User Directories
Problem
Solution
Discussion
See Also
25.10 Killing All Processes for a Given User
Problem
Solution
Discussion
See Also
25.11 Using Puppet for DevOps System Administration
Problem
Solution
Discussion
See Also
People also search for Ruby Cookbook 2nd :
freeze by ruby cookbook
little ruby’s cookbook
max and ruby cookbook
ruby cookbook 2nd edition pdf
ruby tandoh cookbook
Tags:
Lucas Carlson,Richardson Leonard,Ruby,Cookbook