Cargando…

Ruby phrasebook : essential code and commands /

Ruby Phrasebook Jason Clinton Essential Code and Commands Ruby Phrasebook gives you the code you need to quickly and effectively work with Ruby, one of the fastest-growing languages in the world thanks to popular new Ruby technologies like Ruby on Rails. Concise and Accessible Easy to carry and easy...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Clinton, Jason
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Upper Saddle River, N.J. : Addison-Wesley/Pearson, Ã2009.
Colección:Developer's library.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • 1. Converting Between Types
  • Number from a String
  • Number to Formatted String
  • String to Array and Back Again
  • String to Regular Expression and Back Again
  • Array to Hash and Back Again
  • Array to Set and Back Again
  • Floating-Point, Integer, and Rational Numbers
  • 2. Working with Strings
  • Searching Strings
  • Searching Strings with Regular Expressions
  • Replacing Substrings
  • Replacing Substrings using SprintF
  • Replacing Substrings using Regu
  • Working with Unicode
  • Sanitizing Input
  • Working with Line Endings
  • Processing Large Strings
  • Comparing Strings
  • Checksumming a String (MD5 or Otherwise)
  • Encrypting a String
  • 3. Working with Collections
  • Slicing an Array
  • Iterating over an Array
  • Creating Enumerable Classes
  • Sorting an Array
  • Iterating over Nested Arrays
  • Modifying All the Values in an Array
  • Sorting Nested Arrays
  • Building a Hash from a Config File
  • Sorting a Hash by Key or Value
  • Eliminating Duplicate Data from Arrays (Sets)
  • Working with Nested Sets
  • 4. Working with Objects
  • Inspecting Objects and Classes
  • String Presentation of Objects
  • Ruby-Style Polymorphisms ("Duck Typing")
  • Comparing Objects
  • Serializing Objects
  • Duplication
  • Protecting an Object Instance
  • Garbage Collecting
  • Using Symbols
  • 5. Working with Pipes
  • Determining Interactive Standard Pipes
  • Synchronizing STDERR with STDOUT
  • Capturing the Output of a Child Process
  • Implementing a Progress Bar
  • Creating a Secured Password Prompt
  • 6. Working with Files
  • Opening and Closing Files
  • Searching and Seeking Large File Contents
  • When to Use Binary Mode (Win32)
  • Obtaining an Exclusive Lock
  • Copying, Moving, and Deleting Files
  • 7. Manipulating Text
  • Parsing an LDIF
  • Parsing a Simple Config File
  • Interpolating One Text File
  • Sorting the Contents of a File
  • Processing a passwd File
  • 8. Ruby One-Liners
  • Simple Search
  • Counting Lines in a File
  • Head or Tail of a File
  • MD5 or SHA1 Hash
  • Simple HTTP Fetch
  • Simple TCP Connect
  • Escaping HTML
  • Deleting Empty Directories
  • Adding Users from a Text File
  • Delete All the Files Just Extracted
  • 9. Processing XML
  • Opening an XML File
  • Accessing an Element (Node)
  • Getting a List of Attributes
  • Adding an Element
  • Changing an Element's Enclosed Text
  • Deleting an Element
  • Adding an Attribute
  • Changing an Attribute
  • Deleting an Attribute
  • Escaping Characters for XML
  • Transforming Using XSLT
  • Validating Your XML
  • A Simple RSS Parser
  • 10. Rapid Applications Development with GUI Toolkits
  • A Simple GTK+ Hello World
  • Using Glade
  • A Simple Qt Hello World
  • Attaching a Signal Handler to a Qt Widget Slot
  • Using Qt Designer
  • Attaching Signal Handlers to Qt Designer Generated Code
  • 11. Simple CGI Forms
  • Processing a Web Form
  • Returning Tabled Results
  • Escaping Input
  • Locking Down Ruby
  • Receiving an Uploaded File
  • Representing Data Graphically
  • 12. Connecting to Databases
  • Opening (and Closing) a MySQL Database Connection
  • Creating a Table
  • Getting a List of Tables
  • Adding Rows to a Table
  • Iterating Over Queried Rows
  • Deleting Rows
  • Deleting a Table
  • 13. Working with Networking and Sockets
  • Connecting to a TCP Socket
  • Running a TCP Server on a Socket
  • Serializing Objects with YAML
  • Network Objects with Distributed Ruby
  • Using Net::HTTP
  • Using Webrick
  • 14. Working with Threads
  • Creating a Thread
  • Using a Timer
  • Killing a Thread
  • Synchronizing Thread Communication
  • Multithreaded Exception Gathering
  • 15. Documenting Your Ruby
  • Documenting Ruby Code
  • Typographic Conventions Used
  • Overriding Method Signatures in Documentation
  • Hiding a Module, Class, or Method
  • Providing Program Usage Help
  • Generating HTML Documentation
  • Generating and Installing Documentation for ri
  • 16. Working with Ruby Packages
  • Installing a Module
  • Removing a Module
  • Searching for a Module
  • Updating Modules
  • Examining a Module
  • Packaging Your Module with Hoe
  • Creating a Simple Test Case
  • Distributing Your Module on RubyForge
  • Making Rakefile Standalone.