Beschreibung der Redaktion:
Do you want to push Ruby to its limits? The Ruby Cookbook is the most comprehensive problem-solving guide to today's hottest programming language. It gives you hundreds of solutions to real-world problems, with clear explanations and thousands of lines of code you can use in your own projects. From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer. Beginners and advanced Rubyists alike will learn how to program with: * Strings and numbers * Arrays and hashes * Classes, modules, and namespaces * Reflection and metaprogramming * XML and HTML processing * Ruby on Rails (including Ajax integration) * Databases * Graphics * Internet services like email, SSH, and BitTorrent * Web services * Multitasking * Graphical and terminal interfaces If you need to write a web application, this book shows you how to get started with Rails. If you're a system administrator who needs to rename thousands of files, you'll see how to use Ruby for this and other everyday tasks. You'll learn how to read and write Excel spreadsheets, classify text with Bayesian filters, and create PDF files. We've even included a few silly tricks that were too cool to leave out, like how to blink the lights on your keyboard. The Ruby Cookbook is the most useful book yet written about Ruby. When you need to solve a problem, don't reinvent the wheel: look it up in the Cookbook.
From the contents:
Preface1. Strings1.1 Building a String from Parts1.2 Substituting Variables into Strings1.3 Substituting Variables into an Existing String1.4 Reversing a String by Words or Characters1.5 Representing Unprintable Characters1.6 Converting Between Characters and Values1.7 Converting Between Strings and Symbols1.8 Processing a String One Character at a Time1.9 Processing a String One Word at a Time1.10 Changing the Case of a String1.11 Managing Whitespace1.12 Testing Whether an Object Is String-Like1.13 Getting the Parts of a String You Want1.14 Handling International Encodings1.15 Word-Wrapping Lines of Text1.16 Generating a Succession of Strings1.17 Matching Strings with Regular Expressions1.18 Replacing Multiple Patterns in a Single Pass1.19 Validating an Email Address1.20 Classifying Text with a Bayesian Analyzer2. Numbers2.1 Parsing a Number from a String2.2 Comparing Floating-Point Numbers2.3 Representing Numbers to Arbitrary Precision2.4 Representing Rational Numbers2.5 Generating Random Numbers2.6 Converting Between Numeric Bases2.7 Taking Logarithms2.8 Finding Mean, Median, and Mode2.9 Converting Between Degrees and Radians2.10 Multiplying Matrices2.11 Solving a System of Linear Equations2.12 Using Complex Numbers2.13 Simulating a Subclass of Fixnum2.14 Doing Math with Roman Numbers2.15 Generating a Sequence of Numbers2.16 Generating Prime Numbers2.17 Checking a Credit Card Checksum3. Date and Time