Clinton - Ruby Phrasebook [programming] (AW, 2008).pdf
(
1559 KB
)
Pobierz
64299580 UNPDF
CONTENTS AT A GLANCE
1 Converting Between Types
5
2 Working with Strings
19
3 Working with Collections
35
4 Working with Objects
49
5 Working with Pipes
61
6 Working with Files
69
7 Manipulating Text
77
8 Ruby One-Liners
83
9 Processing XML
91
10 Rapid Applications Development
with GUI Toolkits
107
11 Simple CGI Forms
127
12 Connecting to Databases
143
13 Working with Networking and
Sockets
151
14 Working with Threads
163
15 Documenting Your Ruby
175
16 Working with Ruby Packages
185
Ruby
PHRASEBOOK
ESSENTIAL CODE AND COMMANDS
Jason Clinton
Upper Saddle River, NJ
•
Boston
•
Indianapolis
•
San Francisco
New York
•
Toronto
•
Montreal
•
London
•
Munich
•
Paris
•
Madrid
Cape Town
•
Sydney
•
Tokyo
•
Singapore
•
Mexico City
Ruby Phrasebook
Copyright © 2009 by Pearson Education, Inc.
All rights reserved. No part of this book shall be reproduced,
stored in a retrieval system, or transmitted by any means,
electronic, mechanical, photocopying, recording, or otherwise,
without written permission from the publisher. No patent
liability is assumed with respect to the use of the information
contained herein. Although every precaution has been taken in
the preparation of this book, the publisher and author assume
no responsibility for errors or omissions. Nor is any liability
assumed for damages resulting from the use of the information
contained herein.
ISBN-13: 978-0-672-32897-8
ISBN-10: 0-672-32897-6
Library of Congress Cataloging-in-Publication Data:
2005938020
Printed in the United States of America
First Printing August 2008
Trademarks
All terms mentioned in this book that are known to be trade-
marks or service marks have been appropriately capitalized.
Pearson Education, Inc. cannot attest to the accuracy of this
information. Use of a term in this book should not be regarded
as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete
and as accurate as possible, but no warranty or fitness is
implied. The information provided is on an “as is” basis.
The author and the publisher shall have neither liability nor
responsibility to any person or entity with respect to any loss or
damages arising from the information contained in this book.
Bulk Sales
Pearson Education, Inc. offers excellent discounts on this book
when ordered in quantity for bulk purchases or special sales.
For more information, please contact
U.S. Corporate and Government Sales
1-800-382-3419
corpsales@pearsontechgroup.com
For sales outside of the U.S., please contact
International Sales
international@pearson.com
Editor-in-Chief
Mark Taub
Development
Editor
Michael Thurston
Managing Editor
Patrick Kanouse
Project Editor
Jennifer Gallant
Copy Editor
Geneil Breeze/
Krista Hansing
Indexer
Tim Wright
Proofreader
Carla Lewis/
Leslie Joseph
Technical Editor
Robert Evans
Publishing
Coordinator
Vanessa Evans
Multimedia
Developer
Dan Scherf
Book Designer
Gary Adair
Table of Contents
Introduction
1
Audience
1
How to Use This Book
2
Conventions
2
Acknowledgments
4
1 Converting Between Types 5
Number from a String 6
Number to Formatted String 7
String to Array and Back Again 10
String to Regular Expression and Back Again 12
Array to Hash and Back Again 13
Array to Set and Back Again 15
Floating-Point, Integer, and Rational Numbers 15
2 Working with Strings 19
Searching Strings 20
Searching Strings with Regular Expressions 21
Replacing Substrings 23
Replacing Substrings using SprintF 24
Replacing Substrings using Regu 26
Working with Unicode 26
Sanitizing Input 27
Working with Line Endings 28
Processing Large Strings 30
Comparing Strings 31
Checksumming a String (MD5 or Otherwise) 31
Encrypting a String
32
Plik z chomika:
walbo48
Inne pliki z tego folderu:
Cole - Planetary Science - Science of Planets Around Stars (IOP, 2002).pdf
(8299 KB)
Einstein's Space-Time - An Intro to Special and General Relativity - R. Ferraro (Springer, 2007) WW.pdf
(8617 KB)
Frolov - Black Hole Physics - Basic Concepts and New Developments (Kluwer, 1997).pdf
(26556 KB)
Falcke - The Galactic Black Hole (IOP, 2003).pdf
(19940 KB)
Elements of Space Technology - R. Meyer (AP, 1999) WW.djvu
(2924 KB)
Inne foldery tego chomika:
ksiazki
Schematy spawarek
Amaterske Radio_2009.rar
))) Przyśpiewki weselne
@Excel
Zgłoś jeśli
naruszono regulamin