Jump to content

Nytro

Administrators
  • Posts

    18713
  • Joined

  • Last visited

  • Days Won

    701

Everything posted by Nytro

  1. In mare pe stumbleupon, postez si aici ce gasesc interesant. Acum am gasit o lista de carti online gratuite, dar nu are rost sa le postez pe toate, fac o selectie cu ce mi se pare mai interesant.
  2. Survive The Deep End: Zend Framework Welcome to Surviving The Deep End, a free book about Zend Framework for the PHP programming language. The book was written to guide readers through the metaphorical "Deep End". It's the place you find yourself in when you complete a few tutorials and scan through the Reference Guide, where you are buried in knowledge up to your neck but without a clue about how to bind it all together effectively into an application. This take on the Zend Framework offers a survival guide, boosting your understanding of the framework and how it all fits together by following the development of a single application from start to finish. I'll even throw in a few bad jokes for free. The book is a work in progress and will soon be available to read online or download and print as PDF. In fact, every individual chapter can be downloaded individually or read online as soon as it's published. There will be no final version of the book - it's not like Zend will cease releasing new Zend Framework versions tomorrow! There will be a print edition in the near future when I figure out how that should work. Surviving The Deep End is a free book. I rely on guilt, extortion, bad jokes, and teary eyed pleas for assistance to raise donations. That and Google ads on every page. Donations will be used to pay for the server (we're hosted on Slicehost) and the next Macbook Pro I intend purchasing later this year. To keep up to date on the book's progress please visit or subscribe to my blog or follow TheDeepEnd on Twitter. Table of Contents 1. Introduction 1.1. The Zend Framework 1.2. About This Book 1.2.1. Obtaining The Source Code For Chapters 1.3. Me, Me, Me! 1.4. You, You, You! 2. The Architecture of Zend Framework Applications 2.1. Introduction 2.2. The Model-View-Controller 2.2.1. The View 2.2.2. The Controller 2.2.3. The Model 2.3. In Review 2.4. Conclusion 3. The Model 3.1. Introduction 3.2. Clarifying The Model 3.3. In Programming, Fat Models Are Preferable To Size Zero Models 3.4. The Fat Stupid Ugly Controller 3.5. Controllers Are Not The Data Police 3.6. Conclusion 4. Installing The Zend Framework 4.1. Introduction 4.2. Before You Install The Framework 4.3. Getting The Zend Framework 4.3.1. Download As Compressed Archive File 4.3.2. Checkout From Subversion 4.3.3. Download As A Linux Distribution Package 4.3.4. Nightly Build Download 4.4. Post Installation 5. A Not So Simple Hello World Tutorial 5.1. Introduction 5.2. Step 1: Creating A New Local Domain 5.3. Step 2: Creating A Project Directory Structure 5.4. Step 3: Implement Application Bootstrapping 5.5. Step 4: The Only Way In, The Index File 5.6. Step 5: Adding A Default Controller and View 5.7. Conclusion 6. Standardise The Bootstrap Class With Zend_Application 6.1. Introduction 6.2. Step 1: Editing the ZFExt_Bootstrap Class 6.3. Step 2: Editing The Index and htaccess Files 6.4. Step 3: Adding The Application Configuration File 6.5. Step 4: Handling Setting Of Standard Component Defaults 6.6. Step 5: Fixing ZFExt_Bootstrap 6.7. Step 6: Integrating Application Configuration Into Resource Methods 6.8. Step 7: Optimising Autoloading Code 6.9. Allowing Zend_Loader_Autoload Load Namespaced Classes 6.10. Conclusion 7. Handling Application Errors Gracefully 7.1. Introduction 7.2. The ErrorController and Error View 7.3. Well, That Didn't Work... 7.4. Not All Errors Are Equal 7.5. Conclusion 8. Developing A Blogging Application 8.1. Introduction 8.2. Planning 8.3. Incremental Development and YAGNI 8.4. Checking Our Toolbox 8.5. This Is Not The Reference Guide 9. Implementing The Domain Model: Entries and Authors 9.1. Introduction 9.2. The Domain Model and Database Access Patterns 9.3. Exploring The Domain Objects 9.4. Exploring The Entry Data Mapper 9.5. Assessing Implementation Tools 9.5.1. Domain Objects 9.5.2. Validation And Filtering Rules 9.5.3. Database Access 9.6. Implementation 9.6.1. Adding Unit Tests For Execution 9.6.2. The Domain Objects 9.6.3. The Data Mappers 9.6.4. Lazy Loading Domain Objects 9.6.5. Preventing Duplicate Entities With An Identity Map 9.7. Conclusion 10. Setting The Design With Zend_View, Zend_Layout, HTML 5 and Yahoo! User Interface Library 10.1. Introduction 10.2. Zend_View: Object Oriented Templating 10.2.1. Layouts 10.2.2. Partials 10.2.3. View Helpers 10.2.4. Placeholders 10.2.5. Short Tags vs Full Tags 10.3. The ZFBlog Application Setup 10.4. Creating An Index Page With HTML 5 10.5. Extracting Static Markup Into A Layout 10.6. Replacing Changeable Elements With Placeholders 10.7. Improving HTML 5 Support With Custom View Helpers 10.8. Adding A Link To A Custom Stylesheet 10.9. Customising The Style 10.10. Conclusion A. Creating A Local Domain Using Apache Virtual Hosts A.1. Introduction A.2. Configuring Apache With Virtual Hosts A.3. Configuring Local HOSTS File A.4. Conclusion B. Performance Optimisation For Zend Framework Applications B.1. Introduction B.2. Avoid Premature Optimisation B.3. Measuring Performance B.3.1. Memory and CPU Measurement B.3.2. Requests Per Second B.4. Pinpointing The Cause Of Poor Performance B.4.1. Code Profiling B.4.2. Database Operations Analysis B.5. General PHP Optimisation B.5.1. Opcode Caching B.5.2. Realpath Cache B.6. General Zend Framework Optimisation B.6.1. Class Loading Optimisation B.6.2. Configuring Default Caches B.6.3. Cache At The Right Level B.6.4. Minimising Include Paths B.7. HTTP Server Optimisation B.7.1. Optimising Apache's Configuration B.7.2. Avoiding Apache Completely B.8. Conclusion C. Copyright Information C.1. Copyright C.2. Licensing Online: http://www.survivethedeepend.com/zendframeworkbook/en/1.0
  3. Practical PHP Programming Table of Contents Practical_PHP_Programming:Preface 1. Practical_PHP_Programming:Introducing PHP 2. Practical_PHP_Programming:Simple variables and operators 3. Practical_PHP_Programming:Functions 4. Practical_PHP_Programming:Arrays 5. Practical_PHP_Programming:Object-oriented programming 6. Practical_PHP_Programming:HTML forms 7. Practical_PHP_Programming:Working with files 8. Practical_PHP_Programming:Databases 9. Practical_PHP_Programming:Cookies and sessions 10. Practical_PHP_Programming:Multimedia 11. Practical_PHP_Programming:XML and XSLT 12. Practical_PHP_Programming:Output buffering 13. Practical_PHP_Programming:Java and COM 14. Practical_PHP_Programming:Networks 15. Practical_PHP_Programming:Miscellaneous topics 16. Practical_PHP_Programming:Security concerns 17. Practical_PHP_Programming:Performance 18. Practical_PHP_Programming:Writing PHP 19. Practical_PHP_Programming:Writing extensions 20. Practical_PHP_Programming:Alternative PHP uses 21. Practical_PHP_Programming:Practical PHP 22. Practical_PHP_Programming:Bringing it to a close 23. Practical_PHP_Programming:The future of PHP 24. Practical_PHP_Programming:Choosing an ISP 25. Practical_PHP_Programming:Glossary 26. flash designer programmer Online: http://www.ipbwiki.com/Practical_PHP_Programming%3aTable_Of_Contents
  4. Nytro

    Perl & LWP

    Perl & LWP by Sean M. Burke "Fetching web pages, Parsing HTML, Writing Spiders, & More" Table of Contents Click to enlarge the blesboks. CLICK THEM! * Introduction to the 2007 online edition of Perl & LWP * Foreword * Preface * Search! * Chapter 1: Introduction to Web Automation * Chapter 2: Web Basics * Chapter 3: The LWP Class Model * Chapter 4: URLs * Chapter 5: Forms * Chapter 6: Simple HTML Processing with Regular Expressions * Chapter 7: HTML Processing with Tokens * Chapter 8: Tokenizing Walkthrough * Chapter 9: HTML Processing with Trees * Chapter 10: Modifying HTML with Trees * Chapter 11: Cookies, Authentication, and Advanced Requests * Chapter 12: Spiders * Appendix A: LWP Modules * Appendix B: HTTP Status Codes * Appendix C: Common MIME Types * Appendix D: Language Tags * Appendix E: Common Content Encodings * Appendix F: ASCII Table * Appendix G: User's View of Object-Oriented Modules * Index * Colophon * Copyright Page Online: http://lwp.interglacial.com/index.html
  5. Learning Perl the Hard Way by Allen B. Downey Do we really need another Perl book? Well obviously I think so, and here's why: * I want a book for people who already know how to program in another language, but don't know Perl. * I want a book that gets through the basics as quickly as possible. I'm sick of reading about the precedence of operators; I want to know how to do the fun stuff. * I want a book that emphasizes good programming style in Perl. Many of the Perl programs I have seen are written in a quick-and-dirty style; I wanted to see if the style I have developed in other languages can translate. * In many Perl books, object-oriented programming is treated as an optional feature for advanced programming. I wanted to bring it closer to the center of focus (although I am anything but an object-oriented bigot). In presenting Perl features, I tried to find examples that are interesting in their own right, and that encourage the reader to explore Perl's features. This book is a work in progress. I have some ideas about what will go into the next few chapters, but I am open to suggestions. I am looking for interesting programming projects that highlight some of the moderately advances features of Perl, like inter-process communication, the Perl/tk interface, or one of the infinite number of modules on CPAN. Learning Perl the Hard Way is a free book available under the GNU Free Documentation License. Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material. Printable versions of the book are available in PDF and gzipped Postscript. The LaTeX source code (with figures and a Makefile) will be available soon. Download: http://www.greenteapress.com/perl/perl.pdf Sursa: Learning Perl the Hard Way
  6. Nytro

    Extreme Perl

    Extreme Perl Extreme Perl is a book about Extreme Programming using the programming language Perl. This site contains the entire book. Please send me your suggestions, questions, etc. to comments at extremeperl.org. You may also want to join the Extreme Perl Group at Yahoo! Groups to discuss Extreme Programming with Perl. The book is available in HTML, PDF, or A4 PDF. Contents: Preface The Problem Extreme Programming Perl Release Planning Iteration Planning Pair Programming Tracking Acceptance Testing Coding Style Logistics Test Driven Design Continuous Design Unit Testing Refactoring It's a SMOP Praise: There is a part of Extreme Programming which celebrates excellence in programming in service to a customer, someone who needs computation but doesn't have the skill/patience/mania necessary to program. I'm always looking for win-wins. Gratuitous virtuosity is a win for the programmer, but a lose for the customer, because they end up with a program that no one (sometimes not even the original author) can touch without causing damage. What I like most about your book is that it presents some pretty pointy hat programming techniques, but uses them to create power for a customer, XP-style. -- Kent Beck Great book - very useful information and examples. It inspired me to review our processes yet again. -- Chris Hutchinson It is one of the best resources I have struck to introduce Extreme Programming to newbies. I have found that most references to Extreme Programming are not overly helpful when you are trying to get started down the XP path. -- Lance Wicks I rarely recommend techie books, but this is one you really have to read. I've been programming for something like 35 years, and I learned a lot from this book. If you write software, you should read this book. One thing that is compelling is that I've known the author for perhaps 20 years. He is one of the most thoughtful and intelligent technologists I know, and I respect whatever he says out of reflex. If there is one thing about the book that I must caution you about, it is that it is terrifying. Rob is doing things (not discussing theoretical concepts, but actually doing them) that I fear I can never achieve. I wish I could take the next step, and try to adopt some of his practices, but it may never happen. That said, I learned a LOT just reading the book. I expect that you will, too. Give it a try, even if you know nothing about extreme programming or Perl. I didn't! -- Jon Bondy Download: http://www.extremeperl.org/f/extremeperl.pdf Sursa: Extreme Perl - Home
  7. The Objective-C Programming Language Introduction The Objective-C language is a simple computer language designed to enable sophisticated object-oriented programming. Objective-C is defined as a small but powerful set of extensions to the standard ANSI C language. Its additions to C are mostly based on Smalltalk, one of the first object-oriented programming languages. Objective-C is designed to give C full object-oriented programming capabilities, and to do so in a simple and straightforward way. Most object-oriented development environments consist of several parts: * An object-oriented programming language * A library of objects * A suite of development tools * A runtime environment This document is about the first component of the development environment—the programming language. It fully describes the version of the Objective-C language released in Mac OS X v10.6 and iOS 4.0. This document also provides a foundation for learning about the second component, the Objective-C application frameworks—collectively known as Cocoa. The runtime environment is described in a separate document, Objective-C Runtime Programming Guide. Who Should Read This Document The document is intended for readers who might be interested in: * Programming in Objective-C * Finding out about the basis for the Cocoa application frameworks This document both introduces the object-oriented model that Objective-C is based upon and fully documents the language. It concentrates on the Objective-C extensions to C, not on the C language itself. Because this isn’t a document about C, it assumes some prior acquaintance with that language. Object-oriented programming in Objective-C is, however, sufficiently different from procedural programming in ANSI C that you won’t be hampered if you’re not an experienced C programmer. Organization of This Document The following chapters cover all the features Objective-C adds to standard C. * “Objects, Classes, and Messaging” * “Defining a Class” * “Allocating and Initializing Objects” * “Protocols” * “Declared Properties” * “Categories and Extensions” * “Associative References” * “Fast Enumeration” * “Enabling Static Behavior” * “Selectors” * “Exception Handling” * “Threading” A glossary at the end of this document provides definitions of terms specific to Objective-C and object-oriented programming. Online: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html
  8. Nytro

    C# Essentials

    C# Essentials The C# Essentials online book contains 28 chapters of detailed information intended to provide everything necessary to gain Table of Contents 1. About C# Essentials 2. The C# Language and Environment * A Brief History of Computer Programming Languages * What exactly is C#? * The Common Language Infrastructure (CLI) * Common Intermediate Language (CIL) * Virtual Execution System (VES) * Common Type System (CTS) & Common Language Specification (CLS) * The Framework (Base Class and Framework Class Libraries) * Non Microsoft Implementations of the CLI 3. A Simple C# Console Application * Options for Installing a C# Environment * C# Source File Naming Conventions * Creating a Sample C# Program * Compiling C# Code From the Command Line * Executing a Compiled C# Program 4. Creating a Simple C# GUI Application with Visual Studio * Installing Visual Studio with C# Support * Creating a new Visual Studio C# Project * Adding Components to the Windows Form * Changing Component Names * Changing Component Properties * Adding Behavior to a Visual Studio C# Application 5. C# Variables and Constants * What is a C# Variable? * What is a C# Constant? * C# Integer Variable Types * C# Floating Point Variables * The C# Decimal Variable Type * C# Boolean Variable Type * C# Character Variable Type * C# String Variables * Casting Variable Types in C# 6. C# Operators and Expressions * What is an Expression? * The Basic Assignment Operator * C# Arithmetic Operators * C# Operator Precedence * Compound Assignment Operators * Increment and Decrement Operators * Comparison Operators * Boolean Logical Operators * The Ternary Operator 7. C# Flow Control Using if and else * Using the if Statement * Using if ... else .. Statements * Using if ... else if .. Statements 8. The C# switch Statement * Why Use a switch Statement? * Using the switch Statement Syntax * A switch Statement Example * Explaining the Example * Using goto in a C# switch Statement * Using continue in a C# switch Statement 9. C# Looping - The for Statement * The C# for Loop * C# Loop Variable Scope * Creating an Infinite for Loop * Breaking Out of a for Loop * Nested for Loops * Breaking From Nested Loops * Continuing for Loops 10. C# Looping with do and while Statements * The C# while Loop * C# do ... while loops * Breaking from Loops * The continue Statement 11. C# Object Oriented Programming * What is an Object? * What is a Class? * Declaring a C# Class * Creating C# Class Members * Static, Read-only and Const Data Members * Instantiating an Object from a C# Class * Accessing C# Object Members * Adding Methods to a C# Class * C# Constructors and Finalizers 12. C# Inheritance * What is Inheritance? * An Example of Inheritance * Creating a Subclass in C# * Passing Arguments to the Base Class Constructor 13. Understanding C# Abstract Classes * What is a C# Abstract Class? * Abstract Members * Declaring a C# Abstract Class * Deriving from an Abstract Class * The Difference Between abstract and virtual Members 14. Introducing C# Arrays * Creating Arrays in C# * Declaring a Multidimensional Array * Accessing Array Values * Getting the Length of an Array * Sorting and Manipulating C# Arrays 15. C# List and ArrayList Collections * What are C# Collection Classes * Creating C# List Collections - List<T> and ArrayList * Adding Items to Lists * Accessing List Items * Removing Items From Lists * Inserting Items into a C# List * Sorting Lists in C# * Finding Items in a C# List or ArrayList * Obtaining Information About a List * Clearing and Trimming C# Lists 16. Working with Strings in C# * Creating Strings in C# * Obtaining the Length of a C# String * Treating Strings as Arrays * Concatenating Strings in C# * Comparing Strings in C# * Changing String Case * Splitting a C# String into Multiple Parts * Trimming and Padding C# Strings * C# String Replacement 17. Formatting Strings in C# * The Syntax of the String.Format() Method * A Simple C# String Format Example * Using Format Controls * As Simple Format Control Example * The C# String.Format() Format Controls 18. Working with Dates and Times in C# * Creating a C# Date Time Objects * Getting the Current System Time and Date * Adding or Subtracting from Dates and Times * Retrieving Parts of a Date and Time * Formating Dates and Times in C# 19. C# and Windows Forms * Creating a New Form * Changing the Form Name * Changing the Form Title * Changing the Form Background Color * Changing The Form Background Image * Configuring the Minimize, Maximize and Close Buttons * Setting Minimum and Maximum Form Sizes * Specifying the Position of a Form on the Display * Changing the Form Border * Stopping a Form from Appearing the Windows Taskbar * Creating a Transparent Form 20. Designing Forms in C# and Visual Studio * Visual Basic Forms and Controls * Double Clicking the Control in the Toolbox * Dragging a Dropping Controls onto the Form * Drawing a Control on the Form * Positioning and Sizing Controls Using the Grid * Positioning Controls Using Snap Lines * Selecting Multiple Controls * Aligning and Sizing Groups of Controls * Setting Properties on a Group of Controls * Anchoring and Autosizing Form Controls * Setting Tab Order in a Form 21. Understanding C# GUI Events * Event Triggers * Wiring Up Events in Visual Studio * Compile and Running the Application * Setting Up a C# Timer Event 22. C# Events and Event Parameters * The Anatomy of an Event Handler * A C# EventArgs Example * C# EventArg Object Properties * Identifying which Mouse Button was Clicked 23. Hiding and Showing Forms in C# * Creating a C# Application Containing Multiple Forms * Understanding Modal and Non-modal Forms * Writing C# Code to Display a Non-Modal Form * Writing C# Code to Display a Modal Form * Hiding Forms in C# * Closing Forms in C# 24. Creating Top-Level Menus in C# * Creating a Top-Level Menu * Deleting and Moving Menu Items * Assigning Keyboard Shortcuts to Menu Items * Programming Menu Items in C# 25. Creating Context Menus in C# * Adding Context Menus to a C# Form * Associating a Component with a Context Menu * Programming C# Context Menu Options * Compiling and Running the Application 26. Building a Toolbar with C# and Visual Studio * Creating a Toolbar * Adding Tooltip Text to Toolbar Controls * Programming Toolbar Controls * Changing the Toolbar Position 27. Drawing Graphics in C# * Persistent Graphics * Creating a Graphics Object * Creating a Pen In C# * Drawing Lines in C# * Drawing Squares and Rectangles in C# * Drawing Ellipses and Circles in C# * Drawing Text with C# 28. Using Bitmaps for Persistent Graphics in C# * Why Use Bitmaps for Graphics Persistence in C#? * Creating a Bitmap * Instantiating a Bitmap and Creating a Graphics Object * Drawing onto the Bitmap * Rendering a Bitmap Image on a Control * Changing the Background Color of a Bitmap Online: http://www.techotopia.com/index.php/C_Sharp_Essentials
  9. Mercurial: The Definitive Guide by Bryan O'Sullivan Welcome to Mercurial: The Definitive Guide This is the online home of the book “Mercurial: The Definitive Guide”. It was published in 2009 by O'Reilly Media. Mercurial is a fast, lightweight source control management system designed for easy and efficient handling of very large distributed projects. My book tells you what it is, why you should care, and how you can use it effectively. # 2009-05-071. How did we get here? # 2009-05-072. A tour of Mercurial: the basics # 2009-05-073. A tour of Mercurial: merging work # 2009-05-074. Behind the scenes # 2009-05-075. Mercurial in daily use # 2009-05-076. Collaborating with other people # 2009-05-077. File names and pattern matching # 2009-05-078. Managing releases and branchy development # 2009-05-079. Finding and fixing mistakes # 2009-05-0710. Handling repository events with hooks # 2009-05-0711. Customizing the output of Mercurial # 2009-05-0712. Managing change with Mercurial Queues # 2009-05-0713. Advanced uses of Mercurial Queues # 2009-05-0714. Adding functionality with extensions # 2009-04-28A. Migrating to Mercurial # 2009-05-04B. Mercurial Queues reference # 2009-03-30C. Installing Mercurial from source # 2009-03-30D. Open Publication License Online: http://hgbook.red-bean.com/read/
  10. Programming in Lua The book is a detailed and authoritative introduction to all aspects of Lua programming, by Lua's chief architect. The first edition was aimed at Lua 5.0 and remains largely relevant. (See the errata.) If you find this online version useful, please consider buying a copy of the second edition, which updates the text to Lua 5.1 and brings substantial new material. This helps to support the Lua project. For the official definition of the Lua language, see the reference manual. Contents * Preface * Audience * Other Resources * A Few Typographical Conventions * About the Book * Acknowledgments * * Part I · The Language * 1 - Getting Started o 1.1 - Chunks o 1.2 - Global Variables o 1.3 - Some Lexical Conventions o 1.4 - The Stand-Alone Interpreter * 2 - Types and Values o 2.1 - Nil o 2.2 - Booleans o 2.3 - Numbers o 2.4 - Strings o 2.5 - Tables o 2.6 - Functions o 2.7 - Userdata and Threads * 3 - Expressions o 3.1 - Arithmetic Operators o 3.2 - Relational Operators o 3.3 - Logical Operators o 3.4 - Concatenation o 3.5 - Precedence o 3.6 - Table Constructors * 4 - Statements o 4.1 - Assignment o 4.2 - Local Variables and Blocks o 4.3 - Control Structures + 4.3.1 - if then else + 4.3.2 - while + 4.3.3 - repeat + 4.3.4 - Numeric for + 4.3.5 - Generic for o 4.4 - break and return * 5 - Functions o 5.1 - Multiple Results o 5.2 - Variable Number of Arguments o 5.3 - Named Arguments * 6 - More about Functions o 6.1 - Closures o 6.2 - Non-Global Functions o 6.3 - Proper Tail Calls * 7 - Iterators and the Generic for o 7.1 - Iterators and Closures o 7.2 - The Semantics of the Generic for o 7.3 - Stateless Iterators o 7.4 - Iterators with Complex State o 7.5 - True Iterators * 8 - Compilation, Execution, and Errors o 8.1 - The require Function o 8.2 - C Packages o 8.3 - Errors o 8.4 - Error Handling and Exceptions o 8.5 - Error Messages and Tracebacks * 9 - Coroutines o 9.1 - Coroutine Basics o 9.2 - Pipes and Filters o 9.3 - Coroutines as Iterators o 9.4 - Non-Preemptive Multithreading * 10 - Complete Examples o 10.1 - Data Description o 10.2 - Markov Chain Algorithm * * Part II · Tables and Objects * 11 - Data Structures o 11.1 - Arrays o 11.2 - Matrices and Multi-Dimensional Arrays o 11.3 - Linked Lists o 11.4 - Queues and Double Queues o 11.5 - Sets and Bags o 11.6 - String Buffers * 12 - Data Files and Persistence o 12.1 - Serialization + 12.1.1 - Saving Tables without Cycles + 12.1.2 - Saving Tables with Cycles * 13 - Metatables and Metamethods o 13.1 - Arithmetic Metamethods o 13.2 - Relational Metamethods o 13.3 - Library-Defined Metamethods o 13.4 - Table-Access Metamethods + 13.4.1 - The __index Metamethod + 13.4.2 - The __newindex Metamethod + 13.4.3 - Tables with Default Values + 13.4.4 - Tracking Table Accesses + 13.4.5 - Read-Only Tables * 14 - The Environment o 14.1 - Accessing Global Variables with Dynamic Names o 14.2 - Declaring Global Variables o 14.3 - Non-Global Environments * 15 - Packages o 15.1 - The Basic Approach o 15.2 - Privacy o 15.3 - Packages and Files o 15.4 - Using the Global Table o 15.5 - Other Facilities * 16 - Object-Oriented Programming o 16.1 - Classes o 16.2 - Inheritance o 16.3 - Multiple Inheritance o 16.4 - Privacy o 16.5 - The Single-Method Approach * 17 - Weak Tables o 17.1 - Memoize Functions o 17.2 - Object Attributes o 17.3 - Revisiting Tables with Default Values * Part III · The Standard Libraries * 18 - The Mathematical Library * 19 - The Table Library o 19.1 - Array Size o 19.2 - Insert and Remove o 19.3 - Sort * 20 - The String Library o 20.1 - Pattern-Matching Functions o 20.2 - Patterns o 20.3 - Captures o 20.4 - Tricks of the Trade * 21 - The I/O Library o 21.1 - The Simple I/O Model o 21.2 - The Complete I/O Model + 21.2.1 - A Small Performance Trick + 21.2.2 - Binary Files o 21.3 - Other Operations on Files * 22 - The Operating System Library o 22.1 - Date and Time o 22.2 - Other System Calls * 23 - The Debug Library o 23.1 - Introspective Facilities + 23.1.1 - Accessing Local Variables + 23.1.2 - Accessing Upvalues o 23.2 - Hooks o 23.3 - Profiles * Part IV · The C API * 24 - An Overview of the C API o 24.1 - A First Example o 24.2 - The Stack + 24.2.1 - Pushing Elements + 24.2.2 - Querying Elements + 24.2.3 - Other Stack Operations o 24.3 - Error Handling with the C API + 24.3.1 - Error Handling in Application Code + 24.3.2 - Error Handling in Library Code * 25 - Extending your Application o 25.1 - Table Manipulation o 25.2 - Calling Lua Functions o 25.3 - A Generic Call Function * 26 - Calling C from Lua o 26.1 - C Functions o 26.2 - C Libraries * 27 - Techniques for Writing C Functions o 27.1 - Array Manipulation o 27.2 - String Manipulation o 27.3 - Storing State in C Functions + 27.3.1 - The Registry + 27.3.2 - References + 27.3.3 - Upvalues * 28 - User-Defined Types in C o 28.1 - Userdata o 28.2 - Metatables o 28.3 - Object-Oriented Access o 28.4 - Array Access o 28.5 - Light Userdata * 29 - Managing Resources o 29.1 - A Directory Iterator o 29.2 - An XML Parser Online: http://www.lua.org/pil/
  11. Practical Common Lisp This page, and the pages it links to, contain text of the Common Lisp book Practical Common Lisp published by Apress These pages now contain the final text as it appears in the book. If you find errors in these pages, please send email to book@gigamonkeys.com. These pages will remain online in perpetuity—I hope they will serve as a useful introduction to Common Lisp for folks who are curious about Lisp but maybe not yet curious enough to shell out big bucks for a dead-tree book and a good Common Lisp tutorial for folks who want to get down to real coding right away. However, don't let that stop you from buying the printed version available from Apress at your favorite local or online bookseller. For the complete bookstore browsing experience, you can read the letter to the reader that appears on the back cover of the treeware edition of the book. 1. Introduction: Why Lisp? 2. Lather, Rinse, Repeat: A Tour of the REPL 3. Practical: A Simple Database 4. Syntax and Semantics 5. Functions 6. Variables 7. Macros: Standard Control Constructs 8. Macros: Defining Your Own 9. Practical: Building a Unit Test Framework 10. Numbers, Characters, and Strings 11. Collections 12. They Called It LISP for a Reason: List Processing 13. Beyond Lists: Other Uses for Cons Cells 14. Files and File I/O 15. Practical: A Portable Pathname Library 16. Object Reorientation: Generic Functions 17. Object Reorientation: Classes 18. A Few FORMAT Recipes 19. Beyond Exception Handling: Conditions and Restarts 20. The Special Operators 21. Programming in the Large: Packages and Symbols 22. LOOP for Black Belts 23. Practical: A Spam Filter 24. Practical: Parsing Binary Files 25. Practical: An ID3 Parser 26. Practical: Web Programming with AllegroServe 27. Practical: An MP3 Database 28. Practical: A Shoutcast Server 29. Practical: An MP3 Browser 30. Practical: An HTML Generation Library, the Interpreter 31. Practical: An HTML Generation Library, the Compiler 32. Conclusion: What's Next? Online: http://www.gigamonkeys.com/book/
  12. jQuery Fundamentals By Rebecca Murphey http://github.com/rmurphey/jqfundamentals With contributions by James Padolsey, Paul Irish, and others. See the GitHub repository for a complete history of contributions. Copyright © 2011 Licensed by Rebecca Murphey under the Creative Commons Attribution-Share Alike 3.0 United States license. You are free to copy, distribute, transmit, and remix this work, provided you attribute the work to Rebecca Murphey as the original author and reference the GitHub repository for the work. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. Any of the above conditions can be waived if you get permission from the copyright holder. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to the license. Contents * Chapter 1: Welcome * Chapter 2: JavaScript Basics * Chapter 3: jQuery Basics * Chapter 4: jQuery Core * Chapter 5: Events * Chapter 6: Effects * Chapter 7: Ajax * Chapter 8: Plugins * Chapter 9: Performance Best Practices * Chapter 10: Code Organization * Chapter 11: Custom Events List of Examples * Example 1.1: An example of inline JavaScript * Example 1.2: An example of including external JavaScript * Example 1.3: Example of an example * Example 2.1: A simple variable declaration * Example 2.2: Whitespace has no meaning outside of quotation marks * Example 2.3: Parentheses indicate precedence * Example 2.4: Tabs enhance readability, but have no special meaning * Example 2.5: Concatenation * Example 2.6: Multiplication and division * Example 2.7: Incrementing and decrementing * Example 2.8: Addition vs. concatenation * Example 2.9: Forcing a string to act as a number * Example 2.10: Forcing a string to act as a number (using the unary-plus operator) * Example 2.11: Logical AND and OR operators * Example 2.12: Comparison operators * Example 2.13: Flow control * Example 2.14: Values that evaluate to true * Example 2.15: Values that evaluate to false * Example 2.16: The ternary operator * Example 2.17: A switch statement * Example 2.18: Loops * Example 2.19: A typical for loop * Example 2.20: A typical while loop * Example 2.21: A while loop with a combined conditional and incrementer * Example 2.22: A do-while loop * Example 2.23: Stopping a loop * Example 2.24: Skipping to the next iteration of a loop * Example 2.25: A simple array * Example 2.26: Accessing array items by index * Example 2.27: Testing the size of an array * Example 2.28: Changing the value of an array item * Example 2.29: Adding elements to an array * Example 2.30: Working with arrays * Example 2.31: Creating an "object literal" * Example 2.32: Function Declaration * Example 2.33: Named Function Expression * Example 2.34: A simple function * Example 2.35: A function that returns a value * Example 2.36: A function that returns another function * Example 2.37: A self-executing anonymous function * Example 2.38: Passing an anonymous function as an argument * Example 2.39: Passing a named function as an argument * Example 2.40: Testing the type of various variables * Example 2.41: A function invoked using Function.call * Example 2.42: A function created using Function.bind * Example 2.43: A function being attached to an object at runtime * Example 2.44: Functions have access to variables defined in the same scope * Example 2.45: Code outside the scope in which a variable was defined does not have access to the variable * Example 2.46: Variables with the same name can exist in different scopes with different values * Example 2.47: Functions can "see" changes in variable values after the function is defined * Example 2.48: Scope insanity * Example 2.49: How to lock in the value of i? * Example 2.50: Locking in the value of i with a closure * Example 2.51: Using a closure to access inner and outer object instances simultaneously * Example 3.1: A $(document).ready() block * Example 3.2: Shorthand for $(document).ready() * Example 3.3: Passing a named function instead of an anonymous function * Example 3.4: Selecting elements by ID * Example 3.5: Selecting elements by class name * Example 3.6: Selecting elements by attribute * Example 3.7: Selecting elements by compound CSS selector * Example 3.8: Pseudo-selectors * Example 3.9: Testing whether a selection contains elements * Example 3.10: Storing selections in a variable * Example 3.11: Refining selections * Example 3.12: Using form-related pseduo-selectors * Example 3.13: Chaining * Example 3.14: Formatting chained code * Example 3.15: Restoring your original selection using $.fn.end * Example 3.16: The $.fn.html method used as a setter * Example 3.17: The html method used as a getter * Example 3.18: Getting CSS properties * Example 3.19: Setting CSS properties * Example 3.20: Working with classes * Example 3.21: Basic dimensions methods * Example 3.22: Setting attributes * Example 3.23: Getting attributes * Example 3.24: Moving around the DOM using traversal methods * Example 3.25: Iterating over a selection * Example 3.26: Changing the HTML of an element * Example 3.27: Moving elements using different approaches * Example 3.28: Making a copy of an element * Example 3.29: Creating new elements * Example 3.30: Creating a new element with an attribute object * Example 3.31: Getting a new element on to the page * Example 3.32: Creating and adding an element to the page at the same time * Example 3.33: Manipulating a single attribute * Example 3.34: Manipulating multiple attributes * Example 3.35: Using a function to determine an attribute's new value * Example 4.1: Checking the type of an arbitrary value * Example 4.2: Storing and retrieving data related to an element * Example 4.3: Storing a relationship between elements using $.fn.data * Example 4.4: Putting jQuery into no-conflict mode * Example 4.5: Using the $ inside a self-executing anonymous function * Example 5.1: Event binding using a convenience method * Example 5.2: Event biding using the $.fn.bind method * Example 5.3: Event binding using the $.fn.bind method with data * Example 5.4: Switching handlers using the $.fn.one method * Example 5.5: Unbinding all click handlers on a selection * Example 5.6: Unbinding a particular click handler * Example 5.7: Namespacing events * Example 5.8: Binding Multiple Events * Example 6.1: A basic use of a built-in effect * Example 6.2: Setting the duration of an effect * Example 6.3: Augmenting jQuery.fx.speeds with custom speed definitions * Example 6.4: Running code when an animation is complete * Example 6.5: Run a callback even if there were no elements to animate * Example 6.6: Custom effects with $.fn.animate * Example 6.7: Per-property easing * Example 7.1: Using the core $.ajax method * Example 7.2: Using jQuery's Ajax convenience methods * Example 7.3: Using $.fn.load to populate an element * Example 7.4: Using $.fn.load to populate an element based on a selector * Example 7.5: Turning form data into a query string * Example 7.6: Creating an array of objects containing form data * Example 7.7: Using YQL and JSONP * Example 7.8: Setting up a loading indicator using Ajax Events * Example 8.1: Creating a plugin to add and remove a class on hover * Example 8.2: The Mike Alsup jQuery Plugin Development Pattern * Example 8.3: A simple, stateful plugin using the jQuery UI widget factory * Example 8.4: Passing options to a widget * Example 8.5: Setting default options for a widget * Example 8.6: Creating widget methods * Example 8.7: Calling methods on a plugin instance * Example 8.8: Responding when an option is set * Example 8.9: Providing callbacks for user extension * Example 8.10: Binding to widget events * Example 8.11: Adding a destroy method to a widget * Example 10.1: An object literal * Example 10.2: Using an object literal for a jQuery feature * Example 10.3: The module pattern * Example 10.4: Using the module pattern for a jQuery feature * Example 10.5: Using RequireJS: A simple example * Example 10.6: A simple JavaScript file with dependencies * Example 10.7: Defining a RequireJS module that has no dependencies * Example 10.8: Defining a RequireJS module with dependencies * Example 10.9: Defining a RequireJS module that returns a function Online: http://jqfundamentals.com/book/index.html
  13. Eloquent JavaScript A Modern Introduction to Programming by Marijn Haverbeke Eloquent JavaScript is a book providing an introduction to the JavaScript programming language and programming in general. A concise and balanced mix of principles and pragmatics. I loved the tutorial-style game-like program development. This book rekindled my earliest joys of programming. Plus, JavaScript! —Brendan Eich, the man who gave us JavaScript The book exists in two forms. It was originally written and published in digital form, which includes interactive examples and a mechanism for playing with all the example code. This version is released under an open license. I have published a revised version of the book on paper. The structure of this version remained largely the same, but the whole text has been thorougly edited and updated. You can order from Amazon here. There is still an interactive coding environment for this version, as a seperate page. Errata are here. Contents 1. Introduction 2. Basic JavaScript: values, variables, and control flow 3. Functions 4. Data structures: Objects and Arrays 5. Error Handling 6. Functional Programming 7. Searching 8. Object-oriented Programming 9. Modularity 10. Regular Expressions 11. Web programming: A crash course 12. The Document-Object Model 13. Browser Events 14. HTTP requests Appendices 1. More (obscure) control structures 2. Binary Heaps Alphabetic index of terms Cover page Online: http://eloquentjavascript.net/print.html Sursa: Contents -- Eloquent JavaScript
  14. Introduction to Programming Using Java Introduction to Programming Using Java, Fifth Edition Version 5.0, December 2006 Version 5.1.2, with minor corrections and updates, June 2010 (Version 5 Final Release) Author: David J. Eck (eck@hws.edu) WELCOME TO the fifth edition of Introduction to Programming Using Java, a free, on-line textbook on introductory programming, which uses Java as the language of instruction. This book is directed mainly towards beginning programmers, although it might also be useful for experienced programmers who want to learn something about Java. It is certainly not meant to provide complete coverage of the Java language. The fifth edition covers Java 5.0 and can also be used with later versions of Java. You will find many Java applets on the web pages that make up this book, and many of those applets require Java 5.0 or higher to function. Earlier editions, which covered earlier versions of Java, are still available; see the preface for links. You can download Introduction to Programming Using Java for use on your own computer. PDF and print versions are also available. Links can be found at the bottom of this page hort Table of Contents: * Full Table of Contents * Preface * Chapter 1: Overview: The Mental Landscape * Chapter 2: Programming in the Small I: Names and Things * Chapter 3: Programming in the Small II: Control * Chapter 4: Programming in the Large I: Subroutines * Chapter 5: Programming in the Large II: Objects and Classes * Chapter 6: Introduction to GUI Programming * Chapter 7: Arrays * Chapter 8: Correctness and Robustness * Chapter 9: Linked Data Structures and Recursion * Chapter 10: Generic Programming and Collection Classes * Chapter 11: Files and Networking * Chapter 12: Advanced GUI Programming * Source Code for All Examples in this Book * News and Errata Download: http://math.hws.edu/eck/cs124/downloads/javanotes5-linked.pdf Sursa, carte online: Javanotes 5.1.2 -- Title Page
  15. Dive Into HTML5 by Mark Pilgrim with illustrations from the Public Domain Dive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. The final manuscript has been published on paper by O’Reilly, under the Google Press imprint. Buy the printed Work — artfully titled “HTML5: Up & Running” — and be the first in your Community to receive it. Your kind and sincere Feedback is always welcome. The Work shall remain online under the CC-BY-3.0 License. Table of Contents 1. Introduction: Five Things You Should Know About HTML50 2. A Quite Biased History of HTML51 3. Detecting HTML5 Features: It’s Elementary, My Dear Watson2 4. What Does It All Mean?3 5. Let’s Call It a Draw(ing Surface)4 6. Video in a Flash (Without That Other Thing)5 7. You Are Here (And So Is Everybody Else)6 8. A Place To Put Your Stuff7 9. Let’s Take This Offline8 10. A Form of Madness9 11. “Distributed,” “Extensibility,” And Other Fancy Words10 12. Manipulating History for Fun & Profit11 13. The All-In-One Almost-Alphabetical No-Bullshit Guide to Detecting EverythingA 14. HTML5 Peeks, Pokes and PointersB Download, capitole: http://diveintohtml5.org/
  16. Learn You a Haskell Learn You a Haskell for Great Good! 1. Introduction * About this tutorial * So what's Haskell? * What you need to dive in 2. Starting Out * Ready, set, go! * Baby's first functions * An intro to lists * Texas ranges * I'm a list comprehension * Tuples 3. Types and Typeclasses * Believe the type * Type variables * Typeclasses 101 4. Syntax in Functions * Pattern matching * Guards, guards! * Where!? * Let it be * Case expressions 5. Recursion * Hello recursion! * Maximum awesome * A few more recursive functions * Quick, sort! * Thinking recursively 6. Higher Order Functions * Curried functions * Some higher-orderism is in order * Maps and filters * Lambdas * Only folds and horses * Function application with $ * Function composition 7. Modules * Loading modules * Data.List * Data.Char * Data.Map * Data.Set * Making our own modules 8. Making Our Own Types and Typeclasses * Algebraic data types intro * Record syntax * Type parameters * Derived instances * Type synonyms * Recursive data structures * Typeclasses 102 * A yes-no typeclass * The Functor typeclass * Kinds and some type-foo 9. Input and Output * Hello, world! * Files and streams * Command line arguments * Randomness * Bytestrings * Exceptions 10. Functionally Solving Problems * Reverse Polish notation calculator * Heathrow to London 11. Functors, Applicative Functors and Monoids * Functors redux * Applicative functors * The newtype keyword * Monoids 12. A Fistful of Monads * Getting our feet wet with Maybe * The Monad type class * Walk the line * do notation * The list monad * Monad laws 13. For a Few Monads More * Writer? I hardly know her! * Reader? Ugh, not this joke again. * Tasteful stateful computations * Error error on the wall * Some useful monadic functions * Making monads 14. Zippers * Taking a walk * A trail of breadcrumbs * Focusing on lists * A very simple file system * Watch your step Download, capitole: http://learnyouahaskell.com/chapters
  17. Introduction to Design Patterns in C++ with Qt4 Alan Ezust Paul Ezust Abstract C++ is taught "The Qt way", with an emphasis on design patterns, and re-use of open source libraries and tools. By the end of the book, the reader should have a deep understanding of both the language and libraries, as well the design patterns used in developing software with them. Table of Contents Preface Acknowledgments Rationale for the Book I. Introduction to C++ and Qt 4 1. C++ Introduction 1.1. Overview of C++ 1.2. A Brief History of C++ 1.3. C++ First Example 1.4. Input and Output 1.4.1. Exercises: Input and Output 1.5. qmake, Project Files, and Makefile 1.5.1. #include: Finding Header Files 1.6. Getting Help Online 1.7. Strings 1.8. Streams 1.9. File Streams 1.9.1. Exercises: File Streams 1.10. Qt dialogs for user input/output 1.10.1. Exercises: Qt dialogs for user input/output 1.11. Identifiers, Types, and Literals 1.11.1. Exercises: Identifiers, Types, and Literals 1.12. C++ Simple Types 1.12.1. main, and Command Line Arguments 1.12.2. Arithmetic 1.12.3. Exercises: C++ Simple Types 1.13. The Keyword const 1.14. Pointers and Memory access 1.14.1. The Unary Operators & and * 1.14.2. Operators new and delete 1.14.3. Exercises: Pointers and Memory access 1.15. Reference Variables 1.16. const* and *const 1.17. Review Questions 1.17.1. Points of Departure 2. Top of the class 2.1. First, there was struct 2.2. Class definitions 2.3. Member Access Specifiers 2.4. Encapsulation 2.5. Qt Creator - An IDE for Qt Programming 2.6. Introduction to UML 2.6.1. UML Relationships 2.7. Friends of a Class 2.8. Constructors 2.9. Destructors 2.10. The Keyword static 2.11. Class Declarations and Defintions 2.12. Copy Constructors and Assignment Operators 2.13. Conversions 2.14. const Member Functions 2.15. Subobjects 2.16. Exercise: Classes 2.17. Review Questions 3. Introduction to Qt 3.1. Style Guidelines, Naming Conventions 3.1.1. Points of Departure 3.2. The Qt Core Module 3.2.1. Streams and Dates 3.2.2. Exercises: The Qt Core Module 3.3. Review Questions 3.3.1. Points of Departure 4. Lists 4.1. Introduction to Containers 4.2. Iterators 4.2.1. QStringList and iteration 4.3. Relationships 4.4. Exercise: Relationships 4.5. Review Questions 5. Functions 5.1. Function Declarations 5.2. Overloading Functions 5.2.1. Exercises: Overloading Functions 5.3. Default (Optional) Arguments 5.4. Operator Overloading 5.4.1. Exercises: Operator Overloading 5.5. Parameter Passing by Value 5.6. Parameter Passing by Reference 5.7. References to const 5.8. Function Return Values 5.9. Returning References from Functions 5.10. Overloading on const 5.10.1. Exercises: Overloading on const 5.11. inline Functions 5.11.1. Inlining versus Macro Expansion 5.12. Functions with Variable-length Argument Lists 5.13. Exercise: Encryption 5.14. Review Questions 6. Inheritance and Polymorphism 6.1. Simple Derivation 6.1.1. Inheritance Client Code Example 6.2. Derivation with Polymorphism 6.2.1. Exercises: Derivation with Polymorphism 6.3. Derivation from an Abstract Base Class 6.4. Inheritance Design 6.5. Overloading, Hiding, and Overriding 6.6. Constructors, Destructors, and Copy Assignment Operators 6.7. Processing Command-Line Arguments 6.7.1. Derivation and ArgumentList 6.8. Exercises: Inheritance and Polymorphism 6.9. Review Questions 6.9.1. Points of Departure II. Higher Level Programming 7. Libraries 7.1. Code Containers 7.2. Building and Reusing Libraries 7.2.1. Organizing Libraries: Dependency Management 7.2.2. Installing Libraries 7.2.2.1. Points of Departure 7.3. Installing Libraries: A Lab Exercise 7.4. Frameworks and Components 7.5. Review Questions 8. Introduction to Design patterns 8.1. Anti-patterns 8.2. The Iterator Pattern 8.2.1. Directories and Files: QDir and QFileInfo 8.2.2. Customizing FileVisitor using Inheritance 8.2.3. Exercises: The Iterator Pattern 8.2.4. QDirIterator and the Iterator pattern 8.3. Review Questions 9. QObject 9.1. QObject's Child Managment 9.1.1. Exercises: QObject's Child Managment 9.2. Parents and Children 9.2.1. Finding Children 9.3. QApplication and the Event Loop 9.3.1. Layouts: A First Look 9.3.2. Connecting to slots 9.3.3. Signals and Slots 9.3.3.1. Exercises: Signals and Slots 9.4. Q_OBJECT and moc: A checklist 9.4.1. Points of Departure 9.5. Values and Objects 9.6. Exercises: QObject 9.7. tr() and Internationalization. 9.8. Review Questions 10. Generics and Containers 10.1. Generics and Templates 10.1.1. Function Templates 10.1.1.1. Exercises: Function Templates 10.1.2. Class Templates 10.1.3. Exercises: Generics and Templates 10.2. Containers 10.3. Managed Containers, Composites and Aggregates 10.3.1. Exercises: Managed Containers, Composites and Aggregates 10.4. Generics, Algorithms, and Operators 10.4.1. Exercises: Generics, Algorithms, and Operators 10.5. Serializer Pattern 10.5.1. Exercises: Serializer Pattern 10.6. Sorted Map example 10.7. Flyweight pattern: Implicitly Shared Classes 10.7.1. Points of Departure 10.7.2. Exercises: Flyweight pattern: Implicitly Shared Classes 10.8. Exercise: QSet and QMap 10.9. Review Questions 11. Qt GUI Widgets 11.1. Widget Categories 11.2. QMainWindow and QSettings 11.2.1. QSettings: Saving and Restoring Application State 11.3. Dialogs 11.3.1. Input Dialogs and Widgets 11.3.2. Exercises: Dialogs 11.4. Images and Resources 11.5. Layout of Widgets 11.5.1. Spacing, Stretching, and Struts 11.5.2. Moving Widgets across Layouts 11.5.3. Exercises: Layout of Widgets 11.6. QActions, QMenus, and QMenuBars 11.6.1. QActions, QToolbars, and QActionGroups 11.6.1.1. Points of Departure 11.6.2. Exercises: QActions, QMenus, and QMenuBars 11.6.3. Exercise: CardGame GUI 11.7. Regions and QDockWidgets 11.8. Views of a QStringList 11.8.1. Exercises: Views of a QStringList 11.9. Qt Designer 11.10. Review Questions 11.10.1. Points of Departure 12. Concurrency 12.1. QProcess and Process Control 12.1.1. Processes and Environment 12.1.2. Qonsole: Writing an Xterm in Qt 12.1.3. Qonsole with Keyboard Events 12.1.4. Exercises: QProcess and Process Control 12.2. Threads and QThread 12.2.1. QPixmap and QThread Animation Example: Movie Player 12.2.2. Movie Player with QTimer 12.2.3. Multiple Threads, Queues, and Loggers Example: Giant 12.2.4. Thread Safety and QObjects 12.2.5. Exercises: Threads and QThread 12.3. Summary: QProcess and QThread 12.4. Review Questions 13. Models and Views 13.1. M-V-C: What about the Controller? 13.2. Qt 4 Models and Views 13.2.1. QStandardItemModel and Multiple Views 13.3. Table Models 13.4. Tree Models 13.4.1. Extended Tree Widget Items 13.4.1.1. Exercises: Extended Tree Widget Items 13.5. Form Models and Views 13.5.1. Form Models 13.5.2. Designer Forms and QDataWidgetMapper 13.5.2.1. Points of Departure 13.5.2.2. Exercises: Designer Forms and QDataWidgetMapper 13.6. Review Questions 14. Validation and Regular Expressions 14.1. Validators 14.2. Regular Expressions 14.2.1. Regular Expression Syntax 14.2.2. Regular Expressions: Phone Number Recognition 14.2.3. Exercises: Regular Expressions 14.3. Regular Expression Validation 14.4. Exercises: Validation and Regular Expressions 14.5. Review Questions 15. Parsing XML 15.1. The Qt XML Module 15.2. Event-Driven parsing 15.3. XML, Tree Structures, and DOM 15.3.1. Iterator Pattern: DOM Tree Walking 15.3.2. Generation of XML with DOM 15.3.3. Exercises: XML, Tree Structures, and DOM 15.4. Review Questions 16. Meta Objects, Properties, and Reflective Programming 16.1. QMetaObject - The Meta Object pattern 16.2. Type Identification and qobject_cast 16.3. Q_PROPERTY Macro - Describing QObject Properties 16.4. QVariant Class: Accessing Properties 16.5. DataObject: An Extension of QObject 16.6. Review Questions 17. More Design Patterns 17.1. Creational Patterns 17.1.1. Abstract Factory 17.1.2. Abstract Factories and Libraries 17.1.3. qApp and Singleton pattern 17.1.4. Creation Rules and Friend Functions 17.1.5. Benefits of Using Factories 17.1.6. Exercises: Creational Patterns 17.2. Memento Pattern 17.2.1. Exporting to XML 17.2.2. Importing Objects with an Abstract Factory 17.3. The Façade Pattern 17.4. Review Questions 17.4.1. Points of Departure 18. Database Programming 18.1. Intro to MySQL 18.2. Connecting to MySQL from Qt 18.3. Queries and Result Sets 18.4. Long Running Threads and the Command Pattern 18.5. Database Models III. C++ Language Reference 19. Types and Expressions 19.1. Operators 19.1.1. Table of Operators 19.2. Evaluation of Logical Expressions 19.3. Enumerations 19.4. Signed and Unsigned Integral Types 19.4.1. Exercises: Signed and Unsigned Integral Types 19.5. Standard Expression Conversions 19.5.1. Exercises: Standard Expression Conversions 19.6. Explicit Conversions 19.7. Safer ANSI C++ Typecast operators 19.7.1. static_cast and const_cast 19.7.1.1. Exercises: static_cast and const_cast 19.7.2. reinterpret_cast 19.7.3. Why not use C-style casts? 19.8. Overloading special operators 19.8.1. Conversion Operators 19.8.2. Vectors and operator[] 19.8.3. The Function-Call operator() 19.9. Runtime Type Identification (RTTI) 19.9.1. typeid operator 19.10. Member Selection operators 19.11. Exercises: Types and Expressions 19.12. Review Questions 20. Scope and Storage Class 20.1. Declarations and Definitions 20.2. Identifier Scope 20.2.1. Default Scope of Identifiers - A Summary 20.2.2. File Scope versus Block Scope and operator:: 20.2.2.1. Exercises: File Scope versus Block Scope and operator:: 20.3. Storage Class 20.3.1. Globals, static, and QObject 20.3.1.1. Globals and const 20.3.2. Exercises: Storage Class 20.4. Namespaces 20.4.1. Anonymous Namespaces 20.4.2. Open Namespaces 20.4.3. namespace, static objects and extern 20.5. Review Questions 21. Statements and Control Structures 21.1. Statements 21.2. Selection Statements 21.2.1. Exercises: Selection Statements 21.3. Iteration 21.3.1. Exercises: Iteration 21.4. Review Questions 22. Memory Access 22.1. Pointer Pathology 22.2. Further Pointer Pathology with Heap Memory 22.3. Memory Access Summary 22.4. Introduction to Arrays 22.5. Pointer Arithmetic 22.6. Arrays, Functions, and Return Values 22.7. Different kinds of arrays 22.8. Valid Pointer Operations 22.9. What happens if new fails? 22.9.1. set_new_handler() : Another Approach To new Failures 22.9.2. Using set_new_handler and bad_alloc 22.9.3. Checking for null: new(nothrow) 22.10. Chapter Summary 22.11. Review Questions 23. Inheritance in Detail 23.1. virtual pointers, virtual tables 23.2. Polymorphism and virtual destructors 23.3. Multiple Inheritance 23.3.1. Multiple Inheritance Syntax 23.3.2. Multiple Inheritance with Abstract Interfaces 23.3.2.1. Points of Departure 23.3.3. Resolving Multiple Inheritance Conflicts 23.3.3.1. virtual Inheritance 23.3.3.2. virtual Base Classes 23.4. public, protected, and private derivation 23.5. Review Questions IV. Programming Assignments 24. MP3 jukebox Assignments 24.1. Phonon Setup 24.2. Playlist 24.3. Playlists 24.4. Source Selector 24.5. Star Delegates 24.6. Filtering Views 24.7. File Tree SideBar 24.8. AutoDJ A. C++ Reserved keywords B. Standard Headers C. The Development Environment C.1. make and Makefile C.2. The Preprocessor: For #including Files C.3. Understanding the Linker C.3.1. Common Linker Error Messages C.4. Debugging C.4.1. Building a Debuggable Target C.4.1.1. Exercises: Building a Debuggable Target C.4.2. gdb Quickstart C.4.3. Finding Memory Errors C.5. Qt Assistant and Designer C.6. Open Source development tools, Libraries, IDEs. D. Alan's quickstart guide to Debian for programmers. D.1. The apt system D.2. update-alternatives E. C++/Qt Setup E.1. C++/Qt Setup: Open Source Platforms E.2. C++/Qt Setup: Win32 E.3. C++/Qt Setup: Mac OSX F. Errata Bibliography Index Download, capitole: http://cartan.cas.suffolk.edu/oopdocbook/opensource/index.html
  18. Data Structures and Algorithms Annotated Reference with Examples This book written by Granville Barnett and Luca Del Tongo is part of an effort to provide all developers with a core understanding of algorithms that operate on various common, and uncommon data structures. Download: http://dotnetslackers.com/Community/files/folders/30283/download.aspx Sursa: Data Structures and Algorithms: Annotated Reference with Examples CHRISTMAS - DotNetSlackers Community
  19. Linux Device Drivers, Third Edition By Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman February 2005 Pages: 636 Open Book Content Title Pages License/Copyright Table of Contents About the Author/Colophon Preface Chapter 1: An Introduction to Device Drivers Chapter 2: Building and Running Modules Chapter 3: Char Drivers Chapter 4: Debugging Techniques Chapter 5: Concurrency and Race Conditions Chapter 6: Advanced Char Driver Operations Chapter 7: Time, Delays, and Deferred Work Chapter 8: Allocating Memory Chapter 9: Communicating with Hardware Chapter 10: Interrupt Handling Chapter 11: Data Types in the Kernel Chapter 12: PCI Drivers Chapter 13: USB Drivers Chapter 14: The Linux Device Model Chapter 15: Memory Mapping and DMA Chapter 16: Block Drivers Chapter 17: Network Drivers Chapter 18: TTY Drivers Bibliography Index Download, capitole: http://oreilly.com/catalog/linuxdrive3/book/index.csp
  20. Let's Build a Compiler by Jack Crenshaw * Part 1: INTRODUCTION * Part 2: EXPRESSION PARSING * Part 3: MORE EXPRESSIONS * Part 4 INTERPRETERS * Part 5: CONTROL CONSTRUCTS * Part 6: BOOLEAN EXPRESSIONS * Part 7: LEXICAL SCANNING * Part 8: A LITTLE PHILOSOPHY * Part 9: A TOP VIEW * Part 10: INTRODUCING "TINY" * Part 11: LEXICAL SCAN REVISITED * Part 12: MISCELLANY * Part 13: PROCEDURES * Part 14: TYPES * Part 15: BACK TO THE FUTURE * Part 16: UNIT CONSTRUCTION Download the tutorial: http://compilers.iecc.com/crenshaw/tutorfinal.pdf Sursa: Let's Build a Compiler
  21. Windows 7 Kernel Architecture Changes - api-ms-win-core files Windows 7 introduces a new set of dll files containing exported functions of many well-known WIN32 APIs. All these filenames begins with 'api-ms-win-core' prefix, followed by the functions category name. For example, api-ms-win-core-localregistry-l1-1-0.dll contains the exported names for all Registry functions, api-ms-win-core-file-l1-1-0.dll contains the exported names for all file-related functions, api-ms-win-core-localization-l1-1-0.dll contains the exported names for all localization functions, and so on. If you look deeply into these files, you'll see that all these files are very small, and the functions in them doen't do anything, and simply returns a 'TRUE' value. Just for example, here's the assembly language content of RegDeleteValueW function in api-ms-win-core-localregistry-l1-1-0.dll: 084010CE 33C0 xor eax, eax 084010D0 40 inc eax 084010D1 C20800 ret 0008 By looking in dependency walker utility, we can see that advapi32.dll, kernel32.dll, and other system dll files, are now statically linked to these empty api-ms-win-core files. Moreover, if we look in the assembly language output of many API functions, we can see that they simply call their corresponding function in one of these api-ms-win-core Dlls. Just for example, RegDeleteValueW in advapi32.dll, simply contains a jump to the RegDeleteValueW in API-MS-Win-Core-LocalRegistry-L1-1-0.dll: ADVAPI32!RegDeleteValueW: 77C6F301 8BFF mov edi, edi 77C6F303 55 push ebp 77C6F304 8BEC mov ebp, esp 77C6F306 5D pop ebp 77C6F307 EB05 jmp 77C6F30E . . . 77C6F30E FF25B414C677 Jmp dword ptr [77C614B4] <-- [77C614B4] Points the import entry of API-MS-Win-Core-LocalRegistry-L1-1-0.RegDeleteValueW So if RegDeleteValueW in ADVAPI32 and other functions simply jumps to empty functions, how is it possible that these functions still works properly ? The answer is pretty simple: When Windows loads the dll files, all the import entries of these api-ms-win-core Dlls are replaced with a call to a real function in Windows kernel. So here's our RegDeleteValueW example again: when loading a program into WinDbg, we can see that the jmp call now points to kernel32!RegDeleteValueW function. That's because during the loading of advapi32.dll, Windows automatically replace the import entry of API-MS-Win-Core-LocalRegistry-L1-1-0.RegDeleteValueW to the function address of RegDeleteValueW in kernel32. 75e5f301 8bff mov edi,edi 75e5f303 55 push ebp 75e5f304 8bec mov ebp,esp 75e5f306 5d pop ebp 75e5f307 eb05 jmp ADVAPI32!RegDeleteValueW+0xd (75e5f30e) . . . 75e5f30e ff25b414e575 jmp dword ptr [ADVAPI32+0x14b4 (75e514b4)] ds:0023:75e514b4= {kernel32!RegDeleteValueW (758bd5af)} Another new dll: kernelbase.dll In addition to the new API-MS-Win-Core dll files, there is also another new dll: kernelbase.dll In previous versions of Windows, most of the kernel32 functions called to their corresponding functions in ntdll.dll. In Windows 7, most of the kernel functions call to their corresponding functions in kernelbase.dll, and the kernelbase dll is the one that makes the calls to ntdll.dll Effects on existing applications - compatibility issues. Most of the existing applications should not be affected by this kernel change, because all standard API calls still works the same as in previous versions of Windows. However, there are some diagnostic/debugging applications that rely on the calls chain inside the Windows kernel. These kind of applications may not work properly in Windows 7. My own utilities, RegFromApp and ProcessActivityView failed to work under Windows 7 because of these changes, and that what led me to discover the kernel changes of Windows 7. These utilities problems already fixed and now they works properly in Windows 7. API-MS-Win-Core List Finally, here's the list of all core dll files added to Windows 7 and the functions list that each one of them contain. I used my own DLL Export Viewer utility to generate the list. Sursa si tabelul: http://nirsoft.net/articles/windows_7_kernel_architecture_changes.html
  22. Free Feature-rich PHP Mailer Swift Mailer integrates into any web app written in PHP 5, offering a flexible and elegant object-oriented approach to sending emails with a multitude of features. Send emails using SMTP, sendmail, postfix or a custom Transport implementation of your own Support servers that require username & password and/or encryption Protect from header injection attacks without stripping request data content Send MIME compliant HTML/multipart emails Use event-driven plugins to customize the library Handle large attachments and inline/embedded images with low memory use Download: http://swiftmailer.org/downloads/get/Swift-4.0.6.tar.gz Sursa: Powerful component based mailing library for PHP – Swift Mailer
  23. Nytro

    CSS 3.0 Maker

    CSS 3.0 Maker Interesant zic eu http://www.css3maker.com/
  24. Mozilla JavaScript Guide Quick Table of Contents About this Guide JavaScript Overview Values, Variables, and Literals Expressions and Operators Regular Expressions Statements Functions Working with Objects Predefined Core Objects Details of the object model Inheritance revisited Iterators and generators Closures LiveConnect Overview Processing XML with E4X Expanded Table of Contents About this Guide 1. New features in JavaScript versions 2. What you should already know 3. JavaScript versions 4. Where to find JavaScript information 5. Tips for learning JavaScript 5.1. An interactive interpreter 5.2. Firebug 6. Document conventions JavaScript Overview 1. What is JavaScript? 2. JavaScript and Java 3. JavaScript and the ECMAScript Specification 3.1. Relationship between JavaScript Versions and ECMAScript Editions 3.2. JavaScript Documentation versus the ECMAScript Specification 3.3. JavaScript and ECMAScript Terminology Values, Variables, and Literals 1. Values 1.1. Data Type Conversion 2. Variables 2.1. Declaring Variables 2.2. Evaluating Variables 2.3. Variable Scope 2.4. Global Variables 2.5. See Also 3. Constants 4. Literals 4.1. Array Literals 4.1.1. Extra Commas in Array Literals 4.2. Boolean Literals 4.3. Integers 4.4. Floating-Point Literals 4.5. Object Literals 4.6. String Literals 4.6.1. Using Special Characters in Strings 4.6.2. Escaping Characters 5. Unicode 5.1. Unicode compatibility with ASCII and ISO 5.2. Unicode Escape Sequences 5.3. Unicode characters in JavaScript files 5.4. Displaying characters with Unicode Expressions and Operators 1. Expressions 2. Operators 2.1. Assignment Operators 2.2. Comparison Operators 2.3. Arithmetic Operators 2.4. Bitwise Operators 2.4.1. Bitwise Logical Operators 2.4.2. Bitwise Shift Operators 2.5. Logical Operators 2.5.1. Short-Circuit Evaluation 2.6. String Operators 2.7. Special Operators 2.7.1. conditional operator 2.7.2. comma operator 2.7.3. delete 2.7.4. in 2.7.5. instanceof 2.7.6. new 2.7.7. this 2.7.8. typeof 2.7.9. void 2.8. Operator Precedence Regular Expressions 1. Creating a Regular Expression 2. Writing a Regular Expression Pattern 2.1. Using Simple Patterns 2.2. Using Special Characters 2.3. Using Parentheses 3. Working with Regular Expressions 3.1. Using Parenthesized Substring Matches 3.2. Advanced Searching With Flags 4. Examples 4.1. Changing the Order in an Input String 4.2. Using Special Characters to Verify Input Statements 1. Block Statement 2. Conditional Statements 2.1. if...else Statement 2.2. switch Statement 3. Loop Statements 3.1. for Statement 3.2. do...while Statement 3.3. while Statement 3.4. label Statement 3.5. break Statement 3.6. continue Statement 4. Object Manipulation Statements 4.1. for...in Statement 4.2. for each...in Statement 4.3. with Statement 5. Comments 6. Exception Handling Statements 6.1. Exception Types 6.2. throw Statement 6.3. try...catch Statement 6.3.1. The catch Block 6.3.2. The finally Block 6.3.3. Nesting try...catch Statements 6.4. Utilizing Error objects Functions 1. Defining Functions 2. Calling Functions 3. Using the arguments object 3.1. JavaScript 1.3 and earlier 4. Predefined Functions 4.1. eval Function 4.2. isFinite Function 4.3. isNaN Function 4.4. parseInt and parseFloat Functions 4.5. Number and String Functions 4.6. escape and unescape Functions Working with Objects 1. Objects and Properties 2. Enumerating all properties of an object 3. Creating New Objects 3.1. Using Object Initializers 3.2. Using a Constructor Function 3.3. Indexing Object Properties 3.4. Defining Properties for an Object Type 3.5. Defining Methods 3.6. Using this for Object References 3.7. Defining Getters and Setters 3.7.1. Obsolete syntaxes 3.7.2. Summary 3.7.3. See also 3.8. Deleting Properties 4. See also Predefined Core Objects 1. Array Object 1.1. Creating an Array 1.2. Populating an Array 1.3. Referring to Array Elements 1.4. Understanding length 1.5. Iterating over arrays 1.6. Array Methods 1.7. Two-Dimensional Arrays 1.8. Arrays and Regular Expressions 1.9. Working with Array-like objects 1.10. Array comprehensions 2. Boolean Object 3. Date Object 3.1. Methods of the Date Object 3.2. Using the Date Object: an Example 4. Function Object 5. Math Object 6. Number Object 7. RegExp Object 8. String Object Details of the object model 1. Class-based vs. prototype-based languages 1.1. Defining a class 1.2. Subclasses and inheritance 1.3. Adding and removing properties 1.4. Summary of differences 2. The employee example 3. Creating the hierarchy 4. Object properties 4.1. Inheriting properties 4.2. Adding properties 5. More flexible constructors 6. Property inheritance revisited 6.1. Local versus inherited values 6.2. Determining instance relationships 6.3. Global information in constructors 6.4. No multiple inheritance Inheritance revisited 1. Example 2. prototype and Object.getPrototypeOf Iterators and generators 1. Iterators 2. Defining custom iterators 3. Generators: a better way to build Iterators 4. Advanced generators 5. Generator expressions Closures 1. Practical closures 2. Emulating private methods with closures 3. Creating closures in loops: A common mistake 4. Performance considerations LiveConnect Overview 1. Working with Wrappers 2. JavaScript to Java Communication 2.1. The Packages Object 2.2. Working with Java Arrays 2.3. Package and Class References 2.4. Arguments of Type char 2.5. Handling Java Exceptions in JavaScript 3. Java to JavaScript Communication 3.1. Locating the LiveConnect classes 3.2. Using the LiveConnect classes with the JDK 3.3. Using the LiveConnect Classes 3.3.1. Accessing JavaScript with JSObject 3.3.2. Handling JavaScript Exceptions in Java 3.3.3. Backward Compatibility 4. Data Type Conversions 4.1. JavaScript to Java Conversions 4.1.1. Number Values 4.1.2. Boolean Values 4.1.3. String Values 4.1.4. Undefined Values 4.1.5. Null Values 4.1.6. JavaArray and JavaObject objects 4.1.7. JavaClass objects 4.1.8. Other JavaScript objects 4.2. Java to JavaScript Conversions Processing XML with E4X 1. Compatibility issues 2. Creating an XML object 3. Working with attributes 4. Working with XML objects 5. Working with XMLLists 6. Searching and filtering 7. Handling namespaces 7.1. Default 7.2. Non-default 8. Using Generators/Iterators with E4X 9. See also Tutorial: https://developer.mozilla.org/en/JavaScript/Guide
  25. JavaScript Garden JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes, subtle bugs, as well as performance issues and bad practices that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language. JavaScript Garden does not aim to teach you JavaScript. Former knowledge of the language is strongly recommended in order to understand the topics covered in this guide. In order to learn the basics of the language, please head over to the excellent guide on the Mozilla Developer Network. The Authors This guide is the work of two lovely Stack Overflow users, Ivo Wetzel (Writing) and Zhang Yi Jiang (Design). Contributors Caio Romão (Spelling corrections) Andreas Blixt (Language corrections) Hosting JavaScript Garden is hosted on GitHub, but Cramer Development supports us with a mirror at JavaScriptGarden.info. License JavaScript Garden is published under the MIT license and hosted on GitHub. If you find errors or typos please file an issue or a pull request on the repository. You can also find us in the JavaScript room on Stack Overflow chat. Objects Object Usage and Properties Everything in JavaScript acts like an object, with the only two exceptions being null and undefined. false.toString() // 'false' [1, 2, 3].toString(); // '1,2,3' function Foo(){} Foo.bar = 1; Foo.bar; // 1 A common misconception is that number literals cannot be used as objects. That is because a flaw in JavaScript's parser tries to parse the dot notation on a number as a floating point literal. 2.toString(); // raises SyntaxError There are a couple of workarounds which can be used in order make number literals act as objects too. 2..toString(); // the second point is correctly recognized 2 .toString(); // note the space left to the dot (2).toString(); // 2 is evaluated first Objects as a Data Type Objects in JavaScript can also be used as a Hashmap, they mainly consist of named properties mapping to values. Using a object literal - {} notation - it is possible to create a plain object. This new object inherits from Object.prototype and has no own properties defined on it. var foo = {}; // a new empty object // a new object with a property called 'test' with value 12 var bar = {test: 12}; Accessing Properties The properties of an object can be accessed in two ways, via either the dot notation, or the square bracket notation. var foo = {name: 'Kitten'} foo.name; // kitten foo['name']; // kitten var get = 'name'; foo[get]; // kitten foo.1234; // SyntaxError foo['1234']; // works Both notations are identical in their workings, with the only difference being that the square bracket notation allows for dynamic setting of properties, as well as the use of property names that would otherwise lead to a syntax error. Deleting Properties The only way to actually remove a property from an object is to use the delete operator; setting the property to undefined or null only remove the value associated with the property, but not the key. var obj = { bar: 1, foo: 2, baz: 3 }; obj.bar = undefined; obj.foo = null; delete obj.baz; for(var i in obj) { if (obj.hasOwnProperty(i)) { console.log(i, '' + obj[i]); } } The above outputs both bar undefined and foo null - only baz was removed and is therefore missing from the output. Notation of Keys var test = { 'case': 'I am a keyword so I must be notated as a string', delete: 'I am a keyword too so me' // raises SyntaxError }; Object properties can be both notated as plain characters and as strings. Due to another mis-design in JavaScript's parser, the above will throw a SyntaxError prior to ECMAScript 5. This error arises from the fact that delete is a keyword; therefore, it must be notated as a string literal to ensure that it will be correctly interpreted by older JavaScript engines. Articol frumos aranjat aici: http://bonsaiden.github.com/JavaScript-Garden/
×
×
  • Create New...