Tải bản đầy đủ (.pdf) (364 trang)

Sage Beginner''''s Guide ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (10.24 MB, 364 trang )

www.it-ebooks.info
Sage
Beginner's Guide
Unlock the full potenal of Sage for simplifying and
automang mathemacal compung
Craig Finch
BIRMINGHAM - MUMBAI
www.it-ebooks.info
Sage
Beginner's Guide
Copyright © 2011 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmied in any form or by any means, without the prior wrien permission of the
publisher, except in the case of brief quotaons embedded in crical arcles or reviews.
Every eort has been made in the preparaon of this book to ensure the accuracy of the
informaon presented. However, the informaon contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers
and distributors will be held liable for any damages caused or alleged to be caused directly or
indirectly by this book.
Packt Publishing has endeavored to provide trademark informaon about all of the
companies and products menoned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this informaon.
First published: May 2011
Producon Reference: 1250411
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-849514-46-0
www.packtpub.com
Cover Image by Ed Maclean ()


www.it-ebooks.info
Credits
Author
Craig Finch
Reviewers
Dr. David Kirkby
Minh Nguyen
Acquision Editor
Usha Iyer
Development Editor
Hyacintha D'Souza
Technical Editor
Ajay Shanker
Indexers
Tejal Daruwale
Rekha Nair
Project Coordinator
Joel Goveya
Proofreaders
Aaron Nash
Mario Cecere
Graphics
Nilesh Mohite
Producon Coordinator
Adline Swetha Jesuthas
Cover Work
Adline Swetha Jesuthas
www.it-ebooks.info
About the Author
Craig Finch is a Ph. D. Candidate in the Modeling and Simulaon program at the University

of Central Florida (UCF). He earned a Bachelor of Science degree from the University
of Illinois at Urbana-Champaign and a Master of Science degree from UCF, both in
electrical engineering. Craig worked as a design engineer for TriQuint Semiconductor, and
currently works as a research assistant in the Hybrid Systems Lab at the UCF NanoScience
Technology Center. Craig's professional goal is to develop tools for computaonal science
and engineering and use them to solve dicult problems. In parcular, he is interested
in developing tools to help biologists study living systems. Craig is commied to using,
developing, and promong open-source soware. He provides documentaon and "how-to"
examples on his blog at .
I would like to thank my advisers, Dr. J. Hickman and Dr. Tom Clarke, for
giving me the opportunity to pursue my doctorate. I would also like to
thank my parents for buying the Apple IIGS computer that started it all.
www.it-ebooks.info
About the Reviewers
Dr. David Kirkby is a chartered engineer living in Essex, England. David has a B.Sc. in
Electrical and Electronic Engineering, an M.Sc. in Microwaves and OptoElectronics, and a
Ph.D. in Medical Physics. Despite David's Ph.D. being in Medical Physics, it was primarily an
engineering project, measuring the opcal properes of human ssue, with a mixture of
Monte Carlo modeling, radio frequency design, and laser opcs. David was awarded his Ph.D.
in 1999 from University College London.
Although not a mathemacian, Dr. Kirkby has made extensive use of mathemacal soware.
Most of his experience has been with MathemacaTM from Wolfram Research, although he
has used both MATLAB
TM
and Simulink
TM
too.
David is the author of a number of open-source projects, including soware for modeling
transmission lines using nite dierence (
design of

Yagi-Uda antennas ( which can use a genec algorithm
for opmizaon, as well as soware for data collecon and analysis from electronic test
equipment. David once wrote a web-based interface to MathemacaTM (http://witm.
sourceforge.net/
) which allows MathemacaTM to be used from a personal computer,
PDA or smartphone.
Soon aer the Sage project was started by Professor William Stein, Dr. Kirkby joined the
development of Sage. He primarily worked on the successful port of Sage to the Solaris and
OpenSolaris operang systems and encourages other developers to write portable code,
conforming to POSIX standard, avoiding GNUisms.
Professionally, David's skill sets include computer modeling, radio frequency design,
analogue circuit design, electromagnec compability and opcs—both free space
and integrated. David has also been a Solaris system administrator for the University of
Washington where the Sage project is based.
When not working on wring soware, David enjoys playing chess, gardening, and
spending me with his wife Lin and dog Smudge.
Readers wishing to contact Dr. Kirkby can do so via his website
irkby.
co.uk/
where details of his consulng services may be found.
www.it-ebooks.info
Minh Nguyen has been a contributor to the Sage project since December 2007. Over the
years, he has worked on various aspects of Sage ranging from the standard documentaon and
modules such as cryptography, number theory, and graph theory to the Sage build system. He
regularly maintains the Sage website and works on book projects that aim to provide in-depth
documentaon on using Sage to study cryptography and mathemacs. More of his ranngs
can be found at .
www.it-ebooks.info
www.PacktPub.com
Support les, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support les and downloads related to
your book.
Did you know that Packt oers eBook versions of every book published, with PDF and ePub
les available? You can upgrade to the eBook version at
www.PacktPub.com and as a print
book customer, you are entled to a discount on the eBook copy. Get in touch with us at
for more details.
At
www.PacktPub.com, you can also read a collecon of free technical arcles, sign up for a
range of free newsleers and receive exclusive discounts and oers on Packt books and eBooks.

Do you need instant soluons to your IT quesons? PacktLib is Packt's online digital book
library. Here, you can access, read and search across Packt's enre library of books.
Why Subscribe?
 Fully searchable across every book published by Packt
 Copy & paste, print and bookmark content
 On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine enrely free books. Simply use your login credenals for
immediate access.
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface 1
Chapter 1: What Can You Do with Sage? 9
Geng started 9
Using Sage as a powerful calculator 12
Symbolic mathemacs 14
Linear algebra 17

Solving an ordinary dierenal equaon 18
More advanced graphics 19
Visualising a three-dimensional surface 20
Typeseng mathemacal expressions 21
A praccal example: analysing experimental data 22
Time for acon – ng the standard curve 22
Time for acon – plong experimental data 24
Time for acon – ng a growth model 25
Summary 26
Chapter 2: Installing Sage 29
Before you begin 29
Installing a binary version of Sage on Windows 30
Downloading VMware Player 30
Installing VMWare Player 30
Downloading and extracng Sage 30
Launching the virtual machine 31
Start Sage 32
Installing a binary version of Sage on OS X 33
Downloading Sage 34
Installing Sage 34
Starng Sage 34
www.it-ebooks.info
Table of Contents
[ ii ]
Installing a binary version of Sage on GNU/Linux 35
Downloading and decompressing Sage 35
Running Sage from your user account 36
Installing for mulple users 37
Building Sage from source 38
Prerequisites 38

Downloading and decompressing source tarball 39
Building Sage 39
Installaon 39
Summary 39
Chapter 3: Geng Started with Sage 41
How to get help with Sage 41
Starng Sage from the command line 42
Using the interacve shell 43
Time for acon – doing calculaons on the command line 43
Geng help 45
Command history 46
Tab compleon 47
Interacvely tracing execuon 48
Using the notebook interface 48
Starng the notebook interface 49
Time for acon – doing calculaons with the notebook interface 52
Geng help in the notebook interface 54
Working with cells 54
Working with code 55
Closing the notebook interface 55
Displaying results of calculaons 56
Operators and variables 56
Arithmec operators 57
Numerical types 58
Integers and raonal numbers 58
Real numbers 59
Complex numbers 60
Symbolic expressions 60
Dening variables on rings 61
Combining types in expressions 62

Strings 62
Time for acon – using strings 62
Callable symbolic expressions 63
Time for acon – dening callable symbolic expressions 64
Automacally typeseng expressions 65
www.it-ebooks.info
Table of Contents
[ iii ]
Funcons 66
Time for acon – calling funcons 66
Built-in funcons 68
Numerical approximaons 68
The reset and restore funcons 69
Dening your own funcons 70
Time for acon – dening and using your own funcons 70
Funcons with keyword arguments 72
Time for acon – dening a funcon with keyword arguments 72
Objects 73
Time for acon – working with objects 74
Geng help with objects 75
Summary 77
Chapter 4: Introducing Python and Sage 79
Python 2 and Python 3 79
Wring code for Sage 80
Long lines of code 81
Running scripts 81
Sequence types: lists, tuples, and strings 82
Time for acon – creang lists 82
Geng and seng items in lists 85
Time for acon – accessing items in a list 85

List funcons and methods 87
Tuples: read-only lists 87
Time for acon – returning mulple values from a funcon 87
Strings 89
Time for acon – working with strings 90
Other sequence types 92
For loops 92
Time for acon – iterang over lists 92
Time for acon – compung a soluon to the diusion equaon 94
List comprehensions 99
Time for acon – using a list comprehension 99
While loops and text le I/O 101
Time for acon – saving data in a text le 101
Time for acon – reading data from a text le 103
While loops 105
Parsing strings and extracng data 105
Alternave approach to reading from a text le 106
If statements and condional expressions 107
Storing data in a diconary 108
www.it-ebooks.info
Table of Contents
[ iv ]
Time for acon – dening and accessing diconaries 108
Lambda forms 110
Time for acon – using lambda to create an anonymous funcon 110
Summary 111
Chapter 5: Vectors, Matrices, and Linear Algebra 113
Vectors and vector spaces 113
Time for acon – working with vectors 114
Creang a vector space 115

Creang and manipulang vectors 116
Time for acon – manipulang elements of vectors 116
Vector operators and methods 117
Matrices and matrix spaces 118
Time for acon – solving a system of linear equaons 118
Creang matrices and matrix spaces 120
Accessing and manipulang matrices 120
Time for acon – accessing elements and parts of a matrix 120
Manipulang matrices 122
Time for acon – manipulang matrices 122
Matrix algebra 124
Time for acon – matrix algebra 124
Other matrix methods 125
Time for acon – trying other matrix methods 126
Eigenvalues and eigenvectors 127
Time for acon – compung eigenvalues and eigenvectors 127
Decomposing matrices 129
Time for acon – compung the QR factorizaon 129
Time for acon – compung the singular value decomposion 131
An introducon to NumPy 133
Time for acon – creang NumPy arrays 133
Creang NumPy arrays 134
NumPy types 135
Indexing and selecon with NumPy arrays 136
Time for acon – working with NumPy arrays 136
NumPy matrices 137
Time for acon – creang matrices in NumPy 137
Learning more about NumPy 139
Summary 139
Chapter 6: Plong with Sage 141

Confusion alert: Sage plots and matplotlib 141
Plong in two dimensions 141
www.it-ebooks.info
Table of Contents
[ v ]
Plong symbolic expressions with Sage 142
Time for acon – plong symbolic expressions 142
Time for acon – plong a funcon with a pole 144
Time for acon – plong a parametric funcon 146
Time for acon – making a polar plot 147
Time for acon – plong a vector eld 149
Plong data in Sage 150
Time for acon – making a scaer plot 150
Time for acon – plong a list 151
Using graphics primives 153
Time for acon – plong with graphics primives 153
Using matplotlib 155
Time for acon – plong funcons with matplotlib 155
Using matplotlib to "tweak" a Sage plot 157
Time for acon – geng the matplotlib gure object 158
Time for acon – improving polar plots 159
Plong data with matplotlib 161
Time for acon – making a bar chart 161
Time for acon – making a pie chart 163
Time for acon – plong a histogram 164
Plong in three dimensions 165
Time for acon – make an interacve 3D plot 166
Higher quality output 167
Parametric 3D plong 168
Time for acon – parametric plots in 3D 168

Contour plots 169
Time for acon – making some contour plots 169
Summary 171
Chapter 7: Making Symbolic Mathemacs Easy 173
Using the notebook interface 174
Dening symbolic expressions 174
Time for acon – dening callable symbolic expressions 174
Relaonal expressions 176
Time for acon – dening relaonal expressions 176
Time for acon – relaonal expressions with assumpons 178
Manipulang expressions 179
Time for acon – manipulang expressions 179
Manipulang raonal funcons 180
Time for acon – working with raonal funcons 181
Substuons 182
www.it-ebooks.info
Table of Contents
[ vi ]
Time for acon – substung symbols in expressions 182
Expanding and factoring polynomials 184
Time for acon – expanding and factoring polynomials 184
Manipulang trigonometric expressions 186
Time for acon – manipulang trigonometric expressions 186
Logarithms, raonal funcons, and radicals 187
Time for acon – simplifying expressions 187
Solving equaons and nding roots 190
Time for acon – solving equaons 190
Finding roots 191
Time for acon – nding roots 191
Dierenal and integral calculus 193

Time for acon – calculang limits 193
Derivaves 195
Time for acon – calculang derivaves 195
Integrals 198
Time for acon – calculang integrals 198
Series and summaons 199
Time for acon – compung sums of series 199
Taylor series 200
Time for acon – nding Taylor series 200
Laplace transforms 202
Time for acon – compung Laplace transforms 202
Solving ordinary dierenal equaons 204
Time for acon – solving an ordinary dierenal equaon 204
Summary 206
Chapter 8: Solving Problems Numerically 207
Sage and NumPy 208
Solving equaons and nding roots numerically 208
Time for acon – nding roots of a polynomial 208
Finding minima and maxima of funcons 210
Time for acon – minimizing a funcon of one variable 210
Funcons of more than one variable 211
Time for acon – minimizing a funcon of several variables 211
Numerical approximaon of derivaves 213
Time for acon – approximang derivaves with dierences 213
Compung gradients 215
Time for acon – compung gradients 215
Numerical integraon 217
Time for acon – numerical integraon 217
www.it-ebooks.info
Table of Contents

[ vii ]
Numerical integraon with NumPy 219
Time for acon – numerical integraon with NumPy 219
Discrete Fourier transforms 220
Time for acon – compung discrete Fourier transforms 220
Window funcons 223
Time for acon – plong window funcons 223
Solving ordinary dierenal equaons 224
Time for acon – solving a rst-order ODE 224
Solving a system of ODEs 226
Time for acon – solving a higher-order ODE 226
Solving the system using the GNU Scienc Library 229
Time for acon – alternave method of solving a system of ODEs 229
Numerical opmizaon 231
Time for acon – linear programming 231
Fing a funcon to a noisy data set 233
Time for acon – least squares ng 233
Constrained opmizaon 235
Time for acon – a constrained opmizaon problem 235
Probability 236
Time for acon – accessing probability distribuon funcons 236
Summary 238
Chapter 9: Learning Advanced Python Programming 241
How to write good soware 242
Object-oriented programming 243
Time for acon – dening a class that represents a tank 244
Making our tanks move 249
Time for acon – making the tanks move 249
Creang a module for our classes 253
Time for acon – creang your rst module 253

Expanding our simulaon to other kinds of vehicles 258
Time for acon – creang a vehicle base class 258
Creang a package for our simulaon 263
Time for acon – creang a combat simulaon package 263
Potenal pialls when working with classes and instances 268
Time for acon – using class and instance aributes 269
Time for acon – more about class and instance aributes 270
Creang empty classes and funcons 272
Time for acon – creang empty classes and funcons 272
Handling errors gracefully 273
Time for acon – raising and handling excepons 274
www.it-ebooks.info
Table of Contents
[ viii ]
Excepon types 278
Creang your own excepon types 279
Time for acon – creang custom excepon types 279
Unit tesng 284
Time for acon – creang unit tests for the Tank class 284
Strategies for unit tesng 288
Summary 289
Chapter 10: Where to go from here 291
Typeseng equaons with LaTeX 291
Installing LaTeX 292
Time for acon – PDF output from the notebook interface 293
The view funcon in the interacve shell 297
LaTeX mark-up in the notebook interface 297
Time for acon – working with LaTeX markup in the notebook interface 297
Time for acon – pung it all together 300
Speeding up execuon 304

Time for acon – detecng collisions between spheres 304
Time for acon – detecng collisions: command-line version 307
Tips for measuring runmes 309
Opmizing our algorithm 309
Time for acon – faster collision detecon 309
Opmizing with NumPy 311
Time for acon – using NumPy 311
More about NumPy 314
Opmizing with Cython 314
Time for acon – opmizing collision detecon with Cython 314
Calling Sage from Python 316
Time for acon – calling Sage from a Python script 316
Introducing Python decorators 319
Time for acon – introducing the Python decorator 319
Making interacve graphics 322
Time for acon – making interacve controls 322
Using interacve controls 328
Time for acon – an interacve example 328
Summary 330
Index 333
www.it-ebooks.info
Preface
Results maer, whether you are a mathemacian, scienst, or engineer. The me that you
spend doing tedious mathemacal calculaons could be spent in more producve ways. Sage
is an open-source mathemacal soware system that helps you perform many mathemacal
tasks. There is no reason to compute integrals or perform algebraic manipulaons by hand
when soware can perform these tasks more quickly and accurately (unless you are a
student who is learning these procedures for the rst me). Students can also benet from
mathemacal soware. The ability to plot funcons and manipulate symbolic expressions
easily can improve your understanding of mathemacal concepts. Likewise, it is largely

unnecessary to write your own rounes for numerical mathemacs in low-level languages
such as FORTRAN or C++. Mathemacal soware systems like Sage have highly opmized
funcons that implement common numerical operaons like integraon, solving ordinary
dierenal equaons, and solving systems of equaons.
Sage is a collecon of nearly 100 mathemacal soware packages, which are listed at
When possible, exisng tools
are integrated into Sage, rather than duplicang their funconality. The enre collecon of
tools can be downloaded and installed as a binary distribuon or compiled from source code.
The Python language provides a unied interface to all of the packages. Python is a high-
level, interpreted, object-oriented programming language that is already well established
in the research community. Users can interact with Sage through an interacve command-
line interface or a graphical notebook interface. Sage can also be used as a Python library or
embedded in LaTeX documents. Sage is "ocially" available for recent versions of OS X, Linux,
Solaris, and Open Solaris. It runs on Windows with the help of a virtual machine and it can
be used on other plaorms, with varying degrees of support. A current list of all the available
plaorms can be found at />www.it-ebooks.info
Preface
[ 2 ]
The mission statement of the Sage project is:
Creating a viable, free, open source alternative to Magma, Maple,
Mathematica, and Matlab.
If you are familiar with any of these commercial mathemacal soware systems, then you
already have a good idea what Sage does. Sage oers several advantages over its commercial
competors. Sage is free, open-source soware, released under the GNU Public License
version 2 or higher (GPLv2+). There is no cost to download and install Sage, whether you
want to put it on your personal computer, install it in a university teaching lab, or deploy
it on every workstaon in a company. This advantage is especially important in developing
countries. The GPL license also means that Sage is free, as in "freedom." There are no
restricons on how or where you use the soware, the license can never be revoked, and
there is no annual maintenance fee. Another advantage is that you have access to every

line of source code, so you can see how every calculaon is performed, and track exactly
what changes are made from one version to the next. Unlike commercial soware, the bug
list for Sage is public, and it can be accessed at Users are
encouraged to parcipate in the development of Sage by reporng and xing bugs, and
contribung new capabilies. With bugs and source code open for public review, you can
have a high degree of condence that Sage will produce correct results.
This book is wrien for people who are new to Sage, and perhaps new to mathemacal
soware altogether. For this reason, the examples in the book emphasize undergraduate-level
mathemacs such as calculus, linear algebra, and ordinary dierenal equaons. However,
Sage is capable of performing advanced mathemacs, and it has been cited in over 80
mathemacal publicaons. A full list can be found at
/>publications.html
. To benet from this book, you should have some fundamental
knowledge of computer programming, but the Python language will be introduced as needed
throughout the book. The next chapter will take you through some examples that showcase a
small subset of Sage's capabilies.
What this book covers
Chapter 1, What can You do with Sage? covers how Sage can be used for: making simple
numerical calculaons; performing symbolic calculaons, solving systems of equaons and
ordinary dierenal equaons; making plots in two and three dimensions; and analyzing
experimental data and ng models.
Chapter 2, Installing Sage covers how to install a binary version of Sage on Windows and
install a binary version of Sage on OS X; install a binary version of Sage on GNU/Linux;
compile Sage from source.
www.it-ebooks.info
Preface
[ 3 ]
Chapter 3, Geng Started with Sage covers using the interacve shell; using the notebook
interface; learning more about operators and variables; dening and using callable symbolic
expressions; calling funcons and making simple plots; dening your own funcons; and

working with objects in Sage.
Chapter 4, Introducing Python and Sage covers how to: use lists and tuples to store
sequenal data; iterate with loops; construct logical tests with "if" statements; read and
write data les; and store heterogeneous data in diconaries.
Chapter 5, Vectors, Matrices, and Linear Algebra covers how to create and manipulate vector
and matrix objects; how Sage can take the tedious work out of linear algebra; learning about
matrix methods for compung eigenvalues, inverses, and decomposions; and geng
started with NumPy arrays and matrices for numerical calculaons.
Chapter 6, Plong with Sage covers how to plot funcons of one variable; making various
types of specialized 2D plots such as polar plots and scaer plots; using matplotlib to
precisely format 2D plots and charts; and making interacve 3D plots of funcons of two
variables.
Chapter 7, Making Symbolic Mathemacs Easy covers how to create symbolic funcons
and expressions, and learn to manipulate them; solve equaons and systems of equaons
exactly, and nd symbolic roots; automate calculus operaons like limits, derivaves, and
integrals; create innite series and summaons to approximate funcons; perform Laplace
transforms; and nd exact soluons to ordinary dierenal equaons.
Chapter 8, Solving Problems Numerically covers how to nd the roots of an equaon;
compute integrals and derivaves numerically; nd minima and maxima of funcons;
compute discrete Fourier transforms, and apply window funcons; numerically solve an
ordinary dierenal equaon (ODE), and systems of ODEs; use opmizaon techniques
to t curves and nd minima; and explore the probability tools in Sage.
Chapter 9, Learning Advanced Python Programming covers how to dene your own classes;
use inheritance to expand the usefulness of your classes; organize your class denions in
module les; bundle module les into packages; handle errors gracefully with excepons;
dene your own excepons for custom error handling; and use unit tests to make sure your
package is working correctly.
Chapter 10, Where to go from here covers how to export equaons as PNG and PDF
les; export vector graphics and typeset mathemacal expressions for inclusion in LaTeX
documents; use LaTeX to document Sage worksheets; speed up collision detecon using

NumPy vector operaons; create a Python script that uses Sage funconality; and create
interacve graphical examples in the notebook interface.
www.it-ebooks.info
Preface
[ 4 ]
What you need for this book
Required:
 Sage
 If using Windows, VMWare Player or VirtualBox is also required.
 Recommended, but not strictly necessary: LaTeX
 Oponal, for building Sage from source on Linux: GCC, g++, make, m4, perl,
ranlib, readline, and tar
 Oponal, for building Sage from source on OS X: XCode
 A web browser is required to use the notebook interface
Who this book is for
If you are an engineer, scienst, mathemacian, or student, this book is for you. To get the
most from Sage by using the Python programming language, we'll give you the basics of the
language to get you started. For this, it will be helpful if you have some experience with basic
programming concepts.
Conventions
In this book, you will nd several headings appearing frequently.
To give clear instrucons of how to complete a procedure or task, we use:
Time for action – heading
1. Acon 1
2. Acon 2
3. Acon 3
Instrucons oen need some extra explanaon so that they make sense, so they are
followed with:
What just happened?
This heading explains the working of tasks or instrucons that you have just completed.

www.it-ebooks.info
Preface
[ 5 ]
You will also nd some other learning aids in the book, including:
Pop quiz – heading
These are short mulple choice quesons intended to help you test your own understanding.
Have a go hero – heading
These set praccal challenges and give you ideas for experimenng with what you have
learned.
You will also nd a number of styles of text that disnguish between dierent kinds of
informaon. Here are some examples of these styles, and an explanaon of their meaning.
Code words in text are shown as follows: "We can use the
help funcon to learn more
about it."
A block of code is set as follows:
print('This is a string')
print(1.0)
print(sqrt)
Any command-line input or output is wrien as follows:
sage: R = 250e3
sage: C = 4e-6
sage: tau = R * C
sage: tau
New terms and important words are shown in bold. Words that you see on the screen, in
menus or dialog boxes for example, appear in the text like this: "clicking the Next buon
moves you to the next screen".
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
www.it-ebooks.info
Preface

[ 6 ]
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to
develop tles that you really get the most out of.
To send us general feedback, simply send an e-mail to
, and
menon the book tle via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in
the SUGGEST A TITLE form on
www.packtpub.com or e-mail
If there is a topic that you have experse in and you are interested in either wring or
contribung to a book, see our author guide on
www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help
you to get the most from your purchase.
Downloading the example code
You can download the example code les for all Packt books you have purchased from your
account at . If you purchased this book elsewhere, you can
visit and register to have the les e-mailed directly
to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you nd a mistake in one of our books—maybe a mistake in the text or the code—
we would be grateful if you would report this to us. By doing so, you can save other readers
from frustraon and help us improve subsequent versions of this book. If you nd any
errata, please report them by vising selecng
your book, clicking on the errata submission form link, and entering the details of your
errata. Once your errata are veried, your submission will be accepted and the errata will

be uploaded on our website, or added to any list of exisng errata, under the Errata secon
of that tle. Any exisng errata can be viewed by selecng your tle from
http://www.
packtpub.com/support
.
www.it-ebooks.info
Preface
[ 7 ]
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt,
we take the protecon of our copyright and licenses very seriously. If you come across any
illegal copies of our works, in any form, on the Internet, please provide us with the locaon
address or website name immediately so that we can pursue a remedy.
Please contact us at
with a link to the suspected pirated material.
We appreciate your help in protecng our authors, and our ability to bring you valuable
content.
Questions
You can contact us at if you are having a problem with any
aspect of the book, and we will do our best to address it.
www.it-ebooks.info
www.it-ebooks.info

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×