Monday, September 6, 2010

Thoughts on Children












Contents
Foreword
I. Advice on Bringing Up Children
Younger Children - 14
Older Children - 34
II. Jesus and Children
The Twelve-year-old Jesus in the Temple - 45
The Savior and Children - 51
Let the Children Come to Me - 61


Download
Another Layman Books
Continue Reading ...

The Effective Incident Response Team














Effective Incident Response Team, The
By Julie Lucas, Brian Moeller

Publisher : Addison Wesley
Pub Date : September 23, 2003
ISBN : 0-201-76175-0
Pages : 336


When an intruder, worm, virus, or automated attack succeeds in targeting a computer system, having specific controls and a response plan in place can greatly lessen losses. Accordingly, businesses are realizing that it is unwise to invest resources in preventing computer-related security incidents without equal consideration of how to detect and respond to such attacks and breaches.

The Effective Incident Response Team is the first complete guide to forming and managing a Computer Incident Response Team (CIRT). In this book, system and network administrators and managers will find comprehensive information on establishing a CIRT's focus and scope, complete with organizational and workflow strategies for maximizing available technical resources. The text is also a valuable resource for working teams, thanks to its many examples of day-to-day team operations, communications, forms, and legal references.

IT administrators and managers must be prepared for attacks on any platform, exploiting any vulnerability, at any time. The Effective Incident Response Team will guide readers through the critical decisions involved in forming a CIRT and serve as a valuable resource as the team evolves to meet the demands of ever-changing vulnerabilities.

Inside, readers will find information on:
* Formulating reactive or preventative operational strategy
* Forming, training, and marketing the CIRT
* Selecting penetration-testing, intrusion-detection, network-monitoring, and forensics tools
* Recognizing and responding to computer incidents and attacks, including unauthorized access, denial-of-service attacks, port scans, and viruses
* Tracking, storing, and counting incident reports and assessing the cost of an incident
* Working with law enforcement and the legal community
* Benefiting from shared resources
* Scrutinizing closed incidents to further prevention
* Offering services such as user-awareness training, vulnerability and risk assessments, penetration testing, and architectural reviews
* Communicating the CIRT's return on investment through management reporting


Copyright
Foreword
Preface
Some Notes of Thanks
Chapter 1. Welcome to the Information Age
A Brief History
What Does This Mean to My Organization?
Examples of Incident Response Teams
Some Statistics
Summary
Chapter 2. What's Your Mission?
Focus and Scope
Working with Law Enforcement
Operational Strategy
Services Offered
The Impotance of Credibility
Summary
Chapter 3. The Terminology Piece
What Is a Computer Incident?
An Incident Taxonomy
Common Vulnerability and Exposure (CVE) Project
Summary

Chapter 4. Computer Attacks
Consequences of Computer Attacks
Attack Vectors
Malicious Logic
Summary
Chapter 5. Forming the Puzzle
Putting the Team Together
Facilities
Products and Tools
Funding the Team
Training
Marketing the Team
Dealing with the Media
Summary
Chapter 6. Teamwork
External Team Members
Internal Teamwork
Summary
Chapter 7. Selecting the Products and Tools
Training as a Tool
Sound Security Practices
The Tools of the Trade
Using the Tools
Summary
Chapter 8. The Puzzle in Action
The Life Cycle of an Incident
Incident Reporting
Keeping Current
Writing Computer Security Advisories
Summary
Chapter 9. What Did That Incident Cost?
Statistics and Cases
Forms of Economic Impact
An Incident Cost Model
Summary
Chapter 10. The Legal Eagles
Working with the Legal Community
Needed—Case Law
Reporting Computer Crime
Summary
Chapter 11. Computer Forensics: An Evolving Discipline
The World of Forensics
Overview and Impotance of Computer Forensics
Summary
Chapter 12. Conclusions
Appendix A. Sample Incident Report Form
Appendix B. Federal Code Related to Cyber Crime
18 U.S.C. 1029. Fraud and Related Activity in Connection with Access Devices
18 U.S.C. 1030. Fraud and Related Activity in Connection with Computers: As amended October 11, 1996
18 U.S.C. 1362. Communication Lines, Stations, or Systems
Appendix C. Sample Frequently Asked Questions
Appendix D. Domain Name Extensions Used for Internet Addresses
Appendix E. Well-Known Port Numbers
Glossary
Bibliography
Books
Reports and Articles
Web Sites

Download
Another Computer Security Books
Continue Reading ...

The Art of Computer Programming, Volume 2: Seminumerical Algorithms (2rd Edition) ~ Donald E. Knuth












CONTENTS
Chapter 3-Random Numbers .........
3.1. Introduction ..............
3.2. Generating Uniform Random Numbers ......
3.2.1. The Linear Congruential Method ......
3.2.1.1. Choice of modulus .......
3.2.1.2. Choice of multiplier .......
3.2.1.3. Potency ..........
3.2.2. Other Methods ...........
3.3. Statistical Tests .............
3.3.1. General Test Procedures for Studying Random Data
3.3.2. Empirical Tests ...........
*3.3.3. Theoretical Tests ..........
3.3.4. The Spectral Test ..........
3.4. Other Types of Random Quantities .......
3.4.1. Numerical Distributions ........
3.4.2. Random Sampling and Shuffling ......
*3.5. What is a Random Sequence? .........
3.6. Summary ..............

Chapter 4-Arithmetic . . . . . . .
411: Positional Number Systems . . . .
4.2. Floating-Point Arithmetic . . .
4.2.1. Single-Precision Calculations . . .
4.2.2. Accuracy of Floating-Point Arithmetic
*4.2.3. Double-Precision Calculations . . .
4.2.4. Distribution of Floating-Point Numbers
4.3. Multiple-Precision Arithmetic . . . .
4.3.1. The Classical Algorithms . . , .
*4.3.2. Modular Arithmetic . . . , .
*4.3.3. How Fast Can We Multiply? . . .
4.4. Radix Conversion . . . . . . , .
4.5. Rational Arithmetic . . . . . .
4.5.1. Fractions . . . . . . . .
4.5.2. The Greatest Common Divisor . .
*4.5.3. Analysis of Euclid’s Algorithm . .
4.5.4. Factoring into Primes .

4.6. Polynomial Arithmetic . . . . . . .
4.6.1. Division of Polynomials . . . .
*4.6.2. Factorization of Polynomials . . . .
4.6.3. Evaluation of Powers . . .
4.6.4. Evaluation of Polynomials . . . .
‘4.7. Manipulation of Power Series . . . . .

Answers to Exercises .
Appendix A-Tables of Numerical Quantities ........
1. Fundamental Constants (decimal) ............ 659
2. Fundamental Constants (octal) ............ 660
3. Harmonic Numbers, Bernoulli Numbers, Fibonacci Numbers .... 661
Appendix B-Index to Notations . .
Index and Glossary . . . . . .

Download
Another The Core of Computer Science Books
Continue Reading ...

Programming For The Java Virtual Machine












Programming for the Java™ Virtual Machine
By Joshua Engel

Publisher : Addison Wesley
Pub Date : June 22, 1999
ISBN : 0-201-30972-6
Pages : 512


The core of Java technology, the Java virtual machine is an abstract computing machine that enables the Java platform to host applications on any computer or operating system without rewriting or recompiling. Anyone interested in designing a language or writing a compiler for the Java virtual machine must have an in-depth understanding of its binary class format and instruction set. If you are programming with the Java programming language, knowledge of the Java virtual machine will give you valuable insight into the Java platform's security capabilities and cross-platform portability. It will increase your understanding of the Java programming language, enabling you to improve the security and performance of your programs.

The author employs a tutorial approach that provides a detailed look into the central workings of the technology and teaches the reader how to write real programs for the Java virtual machine. He describes methods for becoming a better programmer through an advanced understanding of the Java virtual machine and Java technology. Programming for the Java Virtual Machine offers comprehensive coverage of all the major elements of the Java virtual machine--classes and objects, control instructions, debugging, class loaders, compiling the Java programming language, performance issues, security, and threads and synchronization. The book provides an introduction to the Java Virtual Machine Specification (JVMS), with a collection of topics that help programmers understand the Java virtual machine and the JVMS better. In addition, the book features implementations of Prolog and Scheme, a language that runs on top of the Java virtual machine, generating Java virtual machine code as it runs and using a Java virtual machine class loader to load the generated code into the system.

You will find detailed information on such topics as:

*

The Java virtual machine verification algorithm
*

How Java virtual machine security works, and what it can and can't do
*

Using class loaders to incorporate code and dynamically generated code from the Internet, the Java Foundation Classes, database queries, and other languages
*

The mechanics of compiling the Java programming language for the Java virtual machine
*

Implementing other languages using the Java virtual machine, including Scheme, Prolog, Sather, Eiffel, and regular expressions

Copyright
Preface
Prerequisites
Books
Acknowledgments

Chapter 1. Introduction to the Java Virtual Machine
Section 1.1. Java Virtual Machine and Java
Section 1.2. What Is the Java Virtual Machine?
Section 1.3. Java Platform
Section 1.4. Organization of the Java Virtual Machine
Section 1.5. Garbage Collection
Section 1.6. JVM Implementations
Section 1.7. Versions of the Virtual Machine
Section 1.8. Future of the Java Virtual Machine

Chapter 2. Oolong
Section 2.1. Hello, World
Section 2.2. Structure of an Oolong Program
Section 2.3. Defining the Class
Section 2.4. Superclasses
Section 2.5. Declaring Fields
Section 2.6. Declaring Methods
Section 2.7. Interfaces

Chapter 3. Writing Methods
Section 3.1. Some Definitions
Section 3.2. Types
Section 3.3. Mnemonic Naming Conventions
Section 3.4. Testing Code Examples
Section 3.5. Returns
Section 3.6. Constants
Section 3.7. Local Variables
Section 3.8. Math
Section 3.9. Type Conversions
Section 3.10. Stack Manipulations
Section 3.11. Arrays of Numbers
Section 3.12. Just Biding Your Time

Chapter 4. Classes and Objects
Section 4.1. What Is an Object?
Section 4.2. Creating Objects
Section 4.3. Constructors
Section 4.4. Using Fields
Section 4.5. Invoking Methods on Objects
Section 4.6. Casting
Section 4.7. Casting, Fields, Methods, and Java
Section 4.8. Returning Objects
Section 4.9. Interfaces
Section 4.10. Static Fields and Methods
Section 4.11. Class Initialization
Section 4.12. Arrays

Chapter 5. Control Instructions
Section 5.1. Comparing Integers
Section 5.2. Comparing References
Section 5.3. Other Comparisons
Section 5.4. Switches
Section 5.5. Subroutines
Section 5.6. Exceptions
Section 5.7. A Gentler Way of Checking Type

Chapter 6. Verification Process
Section 6.1. How the Verification Algorithm Works
Section 6.2. Is It a Structurally Valid class File?
Section 6.3. Are All Constant References Correct?
Section 6.4. Are All the Instructions Valid?
Section 6.5. Will Each Instruction Always Find a Correctly Formed Stack and Local Variable Array?
Section 6.6. Do External References Check Out?
Section 6.7. Java Language and Verification Algorithm
Section 6.8. Other Safety Requirements
Section 6.9. Checking Verification

Chapter 7. Debugging
Section 7.1. Debugging Directives in Oolong
Section 7.2. Debugging Oolong Programs
Section 7.3. Runtime Tracing

Chapter 8. Class Loaders
Section 8.1. How Classes Are Loaded
Section 8.2. Loading Classes without a Class Loader
Section 8.3. Making Your Own Class Loader
Section 8.4. Working with Class Objects
Section 8.5. Reflection

Chapter 9. Inside a Java class File
Section 9.1. class File Header
Section 9.2. Constant Pool
Section 9.3. Class Information
Section 9.4. Fields and Methods
Section 9.5. Class Attributes
Section 9.6. Other Attributes

Chapter 10. Compiling Java
Section 10.1. Expressions and Statements
Section 10.2. Expression Types
Section 10.3. Compiling Statements and Expressions
Section 10.4. Local Variable Declarations
Section 10.5. Fields and Variables
Section 10.6. Creating New Objects
Section 10.7. Class Name Abbreviations
Section 10.8. Arithmetic Expressions
Section 10.9. Method Calls
Section 10.10. Expressions as Statements
Section 10.11. Ifs and Booleans
Section 10.12. Other Control Structures
Section 10.13. Returns
Section 10.14. Field Declarations
Section 10.15. Method Declarations
Section 10.16. Constructors
Section 10.17. Conclusion

Chapter 11. Compiling Other Languages
Section 11.1. Java Version 1.1
Section 11.2. Regular Expressions
Section 11.3. Iterators
Section 11.4. Parameterized Types
Section 11.5. Multiple Inheritance
Section 11.6. Conclusion

Chapter 12. Implementing Scheme
Section 12.1. Scheme Concepts
Section 12.2. Compiling Scheme into Bytecodes
Section 12.3. Compiling Lambda Expressions
Section 12.4. Example
Section 12.5. Scheme Library
Section 12.6. Optimizing Scheme

Chapter 13. Implementing Prolog
Section 13.1. Introduction to Prolog
Section 13.2. Implementation Basics
Section 13.3. Unification
Section 13.4. Rules as Programs
Section 13.5. Implementing Rules
Section 13.6. Compiling Facts
Section 13.7. Case Study

Chapter 14. Performance
Section 14.1. Fast Virtual Machines
Section 14.2. Bytecode Optimization Techniques
Section 14.3. Inlining

Chapter 15. Security and the Virtual Machine
Section 15.1. Java Platform and Need for Security
Section 15.2. Security Promises of the JVM
Section 15.3. Security Architecture and Security Policy
Section 15.4. Some Potential Attacks
Section 15.5. Conclusion

Chapter 16. Threads and Synchronization
Section 16.1. Threads
Section 16.2. Sharing State Between Threads
Section 16.3. Monitors and Object Locks
Section 16.4. Scheduling
Section 16.5. Conclusion

Appendix A. Tables
Section A.1. Instructions by Opcode
Section A.2. Instructions Alphabetically
Section A.3. Instructions by Category

Appendix B. Oolong Reference
Section B.1. Using the Oolong Assembler
Section B.2. Gnoloo
Section B.3. DumpClass
Section B.4. Oolong Language
Section B.5. Instructions

Appendix C. Answers to Selected Exercises
Further Reading
Java and the JVM
Newsgroup
Other Languages
Compilers

Download
Another Java books
Continue Reading ...

Saturday, September 4, 2010

OpenGL SuperBible 3rd Edition












OpenGL® SuperBible, Third Edition
By Richard S. Wright Jr., Benjamin Lipchak

Publisher : Sams Publishing
Pub Date : June 30, 2004
ISBN : 0-672-32601-9
Pages : 1200



OpenGL SuperBible, Third Edition is a comprehensive, hands-on guide for Mac and Windows programmers who need to know how to program with the new version of OpenGL. This book will help readers master and expand their knowledge of 3D graphics programming and OpenGL implementation. Seasoned OpenGL programmers will also find this learning tool serves as a reference that can be used time and again. This book explains how to draw lines, points, and polygons in space; move around in a virtual world; utilize raster graphics and image processing in OpenGL. In addition readers learn how to use fog and blending special effects; explore the use of OpenGL extensions; use shaders to create procedural textures; write vertex programs for dynamic special effects.

Copyright
About the Authors
Acknowledgments
We Want to Hear from You!
Introduction
What's in This Book
Conventions Used in This Book
About the Companion CD
Dare to Dream in 3D!
Part I. Classic OpenGL
Chapter 1. Introduction to 3D Graphics and OpenGL
What's This All About?
A Brief History of Computer Graphics
A Survey of 3D Effects
Common Uses for 3D Graphics
Basic 3D Programming Principles
Summary
Chapter 2. Using OpenGL
What Is OpenGL?
How Does OpenGL Work?
OpenGL: An API, Not a Language
API Specifics
Platform Independence
Animation with OpenGL and GLUT
The OpenGL State Machine
OpenGL Errors
Identifying the Version
Getting a Clue with glHint
Using Extensions
Summary
Reference
Chapter 3. Drawing in Space: Geometric Primitives and Buffers
Drawing Points in 3D
Setting Up a 3D Canvas
A 3D Point: The Vertex
Draw Something!
Setting the Point Size
Drawing Lines in 3D
Drawing Triangles in 3D
Building Solid Objects
Other Primitives
Other Buffer Tricks
Summary
Reference
Chapter 4. Geometric Transformations: The Pipeline
Is This the Dreaded Math Chapter?
Understanding Transformations
The Matrix: Mathematical Currency for 3D Graphics
Using Projections
Advanced Matrix Manipulation
Moving Around in OpenGL Using Cameras and Actors
Bringing It All Together
Summary
Reference
Chapter 5. Color, Materials, and Lighting: The Basics
What Is Color?
PC Color Hardware
PC Display Modes
Using Color in OpenGL
Color in the Real World
Materials in the Real World
Adding Light to a Scene
Using a Light Source
Lighting Effects
Putting It All Together
Shadows
Summary
Reference
Chapter 6. More on Colors and Materials
Blending
Fog
Accumulation Buffer
Other Color Operations
Summary
Reference
Chapter 7. Imaging with OpenGL
Bitmaps
Pixel Packing
Pixmaps
More Fun with Pixels
The Imaging "Subset"
Summary
Reference
Chapter 8. Texture Mapping: The Basics
Loading Textures
Mapping Textures to Geometry
A Simple 2D Example
Texture Environment
Texture Parameters
Texture Objects
Summary
Reference
Chapter 9. Texture Mapping: Beyond the Basics
Secondary Color
Anisotropic Filtering
Texture Compression
Texture Coordinate Generation
Multitexture
Texture Combiners
Summary
Reference
Chapter 10. Curves and Surfaces
Built-in Surfaces
Bézier Curves and Surfaces
NURBS
Tessellation
Summary
Reference
Chapter 11. It's All About the Pipeline: Faster Geometry Throughput
Model Assembly 101
Display Lists
Measuring Performance
Vertex Arrays
Summary
Reference
Chapter 12. Interactive Graphics
Selection
A Feedback Example
Summary
Reference
Part II. OpenGL Everywhere
Chapter 13. Wiggle: OpenGL on Windows
OpenGL Implementations on Windows
Basic Windows Rendering
Putting It All Together
Windows Palettes
OpenGL and Windows Fonts
Full-Screen Rendering
Multithreaded Rendering
OpenGL and WGL Extensions
Summary
Reference
Chapter 14. OpenGL on MacOS X
The Basics
Using the AGL and Carbon APIs
Using the Cocoa API
Summary
Reference
Chapter 15. GLX: OpenGL on Linux
The Basics
The OpenGL Extension for the X Window System
Creating Bitmap Fonts for OpenGL
Offscreen Rendering
Using the Motif Library
Summary
Reference
Part III. OpenGL: The Next Generation
Chapter 16. Buffer Objects: It's Your Video Memory; You Manage It!
First, You Need Vertex Arrays
Migration to Buffer Objects
Loading Data into Buffer Objects
A Few Loose Ends
Summary
Reference
Chapter 17. Occlusion Queries: Why Do More Work Than You Need To?
The World Before Occlusion Queries
Bounding Boxes
Querying the Query Object
Summary
Reference
Chapter 18. Depth Textures and Shadows
Be That Light
A New Kind of Texture
Draw the Shadows First?!
And Then There Was Light
Two Out of Three Ain't Bad
A Few Words About Polygon Offset
Summary
Reference
Chapter 19. Programmable Pipeline: This Isn't Your Father's OpenGL
Out with the Old
In with the New
Introduction to Shader Extensions
Summary
Chapter 20. Low-Level Shading: Coding to the Metal
Managing Low-Level Shaders
Instruction Sets
Variable Types
Input and Output Modifiers
Resource Consumption and Queries
Shader Options
Summary
Reference
Chapter 21. High-Level Shading: The Real Slim Shader
Managing High-Level Shaders
Variables
Expressions
Control Flow
Summary
Reference
Chapter 22. Vertex Shading: Do-It-Yourself Transform, Lighting, and Texgen
Getting Your Feet Wet
Diffuse Lighting
Specular Lighting
Improved Specular Lighting
Per-Vertex Fog
Per-Vertex Point Size
Customized Vertex Transformation
Vertex Blending
Summary
Chapter 23. Fragment Shading: Empower Your Pixel Processing
Color Conversion
Image Processing
Lighting
Procedural Texture Mapping
Summary
Appendix A. Further Reading
Other Good OpenGL Books
3D Graphics Books
Web Sites
Appendix B. Glossary
Appendix C. OpenGL ES
Reduction of Data Types
Totally Gone
Greatly Reduced Functionality
Conclusion
CD-ROM
What's on the CD-ROM
Windows Installation Instructions
License Agreement
Index

Download
Another OpenGL Books
Another Mac
Continue Reading ...

Microsoft Visual C++ .NET 2003 Kick Start













Publisher : Sams Publishing
Pub Date : December 09, 2003
ISBN : 0-672-32600-0
Pages : 448


Microsoft Visual C++ .NET 2003 Kick Start is targeted toward developers interested in making the jump to .NET, working programmers already familiar with another programming language or the previous version of VS. Visual C++ .NET 2003 Kick Start speeds through basic concepts and focuses on practical examples and benefits of moving to VC++ .NET. This book explains how VC++ code interacts with the .NET Framework, the extra capabilities of VC++ compared to VB.NET and C# in .NET code interoperability, how to use Windows Forms (a new feature for VC++ .NET in the 2003 edition), and how to migrate from Visual Studio 6 and COM. The author covers the use of managed and unmanaged Visual C++ code, using both types for most examples. Full of code examples, tips, and professional insights, this book provides maximum learning with minimum investment of time and effort.

Copyright
About the Author
Acknowledgments
We Want to Hear from You!
Introduction
Who Should Read This Book
How This Book Is Organized
Conventions Used in This Book
Source Code for This Book
Chapter 1. C++, Visual C++, and Managed C++: What's the Difference?
Differences Between Visual C++ and C++
Managed and Unmanaged Code
Managed and Unmanaged Data
Properties
In Brief
Chapter 2. Creating Test Harnesses and Starter Applications
Application Types You Can Create with Visual C++
What Is a Test Harness?
Creating an Unmanaged C++ Application
Testing an Unmanaged Class with an Unmanaged Test Harness
Creating a Managed C++ Application
Testing a Managed Class with a Managed Test Harness
In Brief
Chapter 3. The .NET Base Class Libraries
Libraries Shared Across Languages
Namespaces in C++
The System Namespace
Other Useful Namespaces
In Brief
Chapter 4. Building Simple User Interfaces with Windows Forms
A Managed C++ Windows Forms Application
Using the Toolbox to Build the User Interface
Anchoring, Docking, and Other Properties of Controls
Writing Event Handlers
Using a DataGrid, DataView, and DataFilter
Creating a Multiple-Form Interface
In Brief
Chapter 5. Writing a Class Library in Unmanaged C++
The Role of a Class Library in a Layered Application
Creating a Class Library
Calling the Library from Other Applications
Advantages and Disadvantages of Writing an Unmanaged Class Library
In Brief
Chapter 6. Writing a Class Library in Managed C++
Advantages and Disadvantages of a Managed Class Library
Building a Managed Class Library
Using the Class Library from Managed Code
Calling the Library from Another Managed Language
Managed and Unmanaged Data in a Managed Library
It Just Works (IJW) Interoperability and the Mixed DLL Problem
Mixing Your Own Managed and Unmanaged Code
In Brief
Chapter 7. Building DLLs in Unmanaged C++
What Is a DLL?
Creating a DLL
How to Use a DLL from Unmanaged C++
How to Use an Unmanaged DLL from Managed C++
How to Use an Unmanaged DLL from C#
In Brief
Chapter 8. Writing COM Components in C++
COM Components and Their Place in Software Development
Using ATL to Create an Unmanaged COM Component
Using a COM Component from Unmanaged C++
Using a COM Component from Managed C++
Exposing a Managed Class Library as a COM Component
In Brief
Chapter 9. Using Existing COM Components in C++
Automation Concepts
Using Word as a Spell Checker from Unmanaged C++
Using Word as a Spell Checker from Managed C++
In Brief
Chapter 10. Writing and Consuming a Web Service
Web Service Fundamentals
Writing a Web Service in Managed C++
Consuming a Web Service in Managed C++
Discovering Web Services
Writing a Web Service in Unmanaged C++
Calling a Web Service from Unmanaged C++
In Brief
Chapter 11. Writing a Data Layer in Managed C++
Database Concepts
The ADO.NET Class Library
Filling a DataSet and Binding to a Control on a Form
Using a Data Reader for Quick One-Way Access
Updating the Database with a Data Set
Data Sets and XML
Filling a Database from XML
In Brief
Chapter 12. Writing a Windows Service
What Is a Windows Service?
Creating a Simple Windows Service in Managed C++
Debugging a Service
In Brief
Chapter 13. Strengthening Your Managed Applications with Security and Encryption
Understanding Encryption Techniques and Technologies
Encrypting Information
Decrypting Information
Role-Based Security
In Brief
Chapter 14. Moving Layers to Different Machines with .NET Remoting
Writing a Class That Will Be Available Through Remoting
Writing a Remoting Client
Hosting the Remoted Object and Configuring the Client
Communication Over Remoting
Choosing Lifetime and Lifecycle Options Appropriately
In Brief
Chapter 15. Building Advanced User Interfaces in Managed C++
Extending Windows Controls
Using Drag and Drop
Using GDI+
Internationalizing and Localizing a Windows Application
In Brief
Index

Download
Another C++ Books
Another .NET Books
Continue Reading ...

Microsoft Visual C# .NET 2003 Kick Start















By Steven Holzner

Publisher : Sams Publishing
Pub Date : June 24, 2003
ISBN : 0-672-32547-0
Pages : 624


Microsoft Visual C# .NET 2003 Kick Start is a rapid-progression tutorial that presents the C# language to working programmers who are already familiar with another programming language or tool. This book speeds through basic concepts and focuses on practical examples showing the advantages of C# .NET 2003 in ASP programming, application design and creation, and .NET Web Services development. While Microsoft Visual C# .NET 2003 Kick Start assumes no knowledge of C# or the .NET Framework, it skips the handholding and basic programming instruction associated with entry-level tutorials. Full of code examples, tips, and profession insights, this book is about maximum payoff with minimum effort for the working programmer who wants to use Visual C# .NET 2003 now.

Copyright
About the Author
Acknowledgments
Foreword
We Want to Hear from You!
Introduction
What's in This Book
Conventions Used in This Book
What You'll Need
C# Online Resources
Chapter 1. Essential C#
Creating Our First C# Program
The .NET Framework in Overview
Visual C# .NET
Data Types
Variables
Constants
Enumerations
Arrays
Type Conversions in C#
Comments in C#
Creating Expressions and Statements
Using the C# Operators
Operator Precedence
The if Statement
The switch Statement
Preprocessor Directives
In Brief
Chapter 2. Basic C# Programming
Loops
Creating Methods
Exception Handling
Working with Strings
Working with Regular Expressions
In Brief
Chapter 3. C# Object-Oriented Programming
Creating Classes
Creating Objects
Using Access Modifiers
Creating Fields and Using Initializers
Creating Methods
Creating Properties
Read-only Properties
Creating Constructors
Creating Structs
Creating Static Members
Creating Static Fields
Creating Static Properties
Creating Destructors and Handling Garbage Collection
Overloading Methods
Overloading Operators
Creating Namespaces
In Brief
Chapter 4. Handling Inheritance and Delegates
Working with Inheritance
Overriding Virtual Methods
Creating Abstract Classes
Working with Polymorphism
Boxing and Unboxing Types
Protecting Nested Classes
Using Interfaces
Working with Delegates
Handling Events with Delegates
In Brief
Chapter 5. Working with Streams in C#
Working with Directories
Working with Files
Working with Streams
Serializing Objects
In Brief
Chapter 6. Understanding Collections and Indexers
Using Collections
Using Arrays
Using Array Lists
Using Queues
Using Stacks
Using Hash Tables
Creating Your Own Collections
In Brief
Chapter 7. Creating C# Windows Applications
Creating a Windows Application
Basic Windows Programming Skills
Using Basic Windows Controls
Using Advanced Controls
Creating Multi-Window Applications
In Brief
Chapter 8. Creating C# Web Applications
Introducing Web Applications
Creating a Web Application
Basic Web Programming Skills
Using Basic Web Server Controls
Using Advanced Web Server Controls
In Brief
Chapter 9. Using ADO.NET and Databases
Connections, Data Adapters, and Datasets
Creating a Data Application
Working with Relational Databases
Using Multiple Tables in a Single Dataset
Working with Data Views
Handling Data Binding
Implementing Simple Data Binding
Implementing Complex Binding
Navigating Through Datasets Using Bound Controls
Working with SQL Parameters
In Brief
Chapter 10. Handling Databases in C# Code
Using Data Objects
Using Connection, Command, and Data Adapter Objects
Using the DataSet Class
Creating a Dataset in Code
Filling Datasets with Local Data
Reading Data Cell by Cell
Using Data Readers
Creating a Data Relation in Code
In Brief
Chapter 11. Creating User Controls and Web User Controls
Creating User Controls
Creating Web User Controls
In Brief
Chapter 12. Creating Windows Services, Web Services, and Deploying Applications
Creating Windows Services
Creating Web Services
Deploying Your Applications
In Brief
Chapter 13. Understanding C# Assemblies and Security
All About Assemblies
Creating an Assembly
Storing Multiple Modules in an Assembly
Working with DLLs in the IDE
Creating Shared Assemblies
Implementing Security in C#
In Brief
Chapter 14. Using Attributes and Reflection
Handling Metadata in C#
Built-in Attributes
Creating Custom Attributes
Using Reflection
Accessing Metadata
Discovering and Examining Types
Using Late Binding
Using Reflection Emit
In Brief
Chapter 15. Using Multithreading and Remoting
Working with Multiple Threads
Creating and Starting Multiple Threads
Sleeping, Aborting, Suspending, Resuming, and Joining Threads
Synchronizing Threads
Remoting: Passing Types and Objects Across Boundaries
Using SOAP for Remoting
In Brief
And That's It
Index

Download
Another C# Books
Another .NET Books
Continue Reading ...

Friday, September 3, 2010

Micro JAVA Game Development












Table of Content
Table of Content .................................................................................................................. i
Copyright.............................................................................................................................. i
Trademarks..................................................................................................................... i
Warning and Disclaimer................................................................................................. i
Credits............................................................................................................................. ii
Dedication ...................................................................................................................... iii
About the Author................................................................................................................ iii
Acknowledgments ............................................................................................................. iii
Chapter 1. Introduction (or Everything I Wanted to Know About Micro Java Gaming
But Was Afraid to Ask)....................................................................................................... 1
A New Era of Gaming.................................................................................................... 1
This Book's Mission ....................................................................................................... 3
A Bit About Game Design............................................................................................. 6
Show Me the Money: Micro Game Business Models............................................. 16
Summary ....................................................................................................................... 18
Part I: Small Devices ................................................................................................19
Chapter 2. The Mobile World.......................................................................................... 20
A New Era of Gaming.................................................................................................. 20
High-End Java Devices: Set-Top Boxes, Phones, Consoles................................ 22
Personal Digital Assistants (PDAs) ........................................................................... 24
Mobile Phones and Pagers ........................................................................................ 31
Low-End Java Devices: Smart Cards and Embedded Chips................................ 40
Summary ....................................................................................................................... 41
Chapter 3. Big Games, Small Screens ......................................................................... 42
Your Competition ......................................................................................................... 42
WAP Games ................................................................................................................. 43
i-mode Games .............................................................................................................. 54
SMS Games.................................................................................................................. 55
J2ME MIDP Games..................................................................................................... 57
J2ME Palm Games...................................................................................................... 65
iAppli Games................................................................................................................. 67
What Are You Waiting For?........................................................................................ 74
Part II: Before, Between, and Beyond J2ME........................................................75
Chapter 4. Wireless Standards: How Data Goes To And Fro................................... 76
Wireless Networks ....................................................................................................... 76
The Wireless Application Protocol (WAP)................................................................ 78
Server-Side WAP......................................................................................................... 95
Handheld Device Markup Language (HDML)........................................................ 102
WAP 2.0 and xHTML Basic...................................................................................... 105
Summary ..................................................................................................................... 106
Chapter 5. Let's Talk: Instant Wireless Messaging................................................... 107
Messaging And Gaming............................................................................................ 107
Short Message Service (SMS)................................................................................. 108
Actually Sending SMS Messages............................................................................ 112
SMS and J2ME........................................................................................................... 113
Multimedia Messaging Service (MMS) ................................................................... 115
Summary ..................................................................................................................... 117
Chapter 6. Wireless in Asia: i-mode and cHTML ...................................................... 118
Using i-mode............................................................................................................... 118
Compact HTML (cHTML).......................................................................................... 119
Development Tools.................................................................................................... 125
Testing and Emulators .............................................................................................. 125
Summary ..................................................................................................................... 128
Chapter 7. The Wireless Landscape........................................................................... 129
Bluetooth ..................................................................................................................... 129
Mobile Positioning...................................................................................................... 131
m-Commerce .............................................................................................................. 135
Voice and Telephony................................................................................................. 137
Unified Messaging (UM)............................................................................................ 138
Summary ..................................................................................................................... 138
Part III: The Java 2 Micro Edition..........................................................................140
Chapter 8. J2ME Overview........................................................................................... 141
The Trinity of Java Platforms.................................................................................... 141
It's a Small World After All ........................................................................................ 142
Profiles and Configurations ...................................................................................... 143
Connected in a Limited Way: The CLDC ............................................................... 147
The Mobile Profile ...................................................................................................... 148
Summary ..................................................................................................................... 149
Chapter 9. Creating a MIDlet........................................................................................ 150
Command-Line MIDlet Development...................................................................... 150
Development Environments ..................................................................................... 152
Lifecycle of a MIDlet .................................................................................................. 156
Displaying Stuff........................................................................................................... 157
Menus and Commands............................................................................................. 161
Creating Help and About Alert Screens.................................................................. 164
Global Properties ....................................................................................................... 168
Summary ..................................................................................................................... 169
Chapter 10. Making the Most of Limited Resources................................................. 171
The Limitations ........................................................................................................... 171
Memory Limitations.................................................................................................... 172
Displays ....................................................................................................................... 174
Breaking Through the Limitations............................................................................ 175
Summary ..................................................................................................................... 176
Chapter 11. Making the Most of It: Optimizations ..................................................... 177
A Limited World .......................................................................................................... 177
Making Code Optimal................................................................................................ 177
Code Size Reductions............................................................................................... 178
Speeding Up the Code.............................................................................................. 182
Using Less Memory................................................................................................... 185
Power Consumption .................................................................................................. 187
Summary ..................................................................................................................... 187
Chapter 12. Multithreaded Game Programming........................................................ 188
Threads........................................................................................................................ 188
Extending the Thread Object.................................................................................. 189
Implementing the Runnable Interface................................................................... 190
Thread Priorities......................................................................................................... 192
Thread States ............................................................................................................. 192
Synchronizations and Deadlocks ............................................................................ 192
wait() and notify()............................................................................................ 193
Timers .......................................................................................................................... 194
Making Threads Better.............................................................................................. 195
Summary ..................................................................................................................... 196
Part IV: Let the Games Begin! ..............................................................................198
Chapter 13. High-Level Graphical User Interfaces ................................................... 199
The Screen Class..................................................................................................... 199
Forms and Alerts........................................................................................................ 200
Lists .............................................................................................................................. 200
Text Boxes .................................................................................................................. 204
Items............................................................................................................................ 205
Tickers ......................................................................................................................... 212
Additional Libraries .................................................................................................... 212
Summary ..................................................................................................................... 213
Chapter 14. Working with Graphics: Low-Level Graphical User Interfaces .......... 214
The Canvas Class..................................................................................................... 214
Painting on the Screen.............................................................................................. 217
Drawing Images ......................................................................................................... 223
Summary ..................................................................................................................... 226
Chapter 15. Entering the Land of Sprites ................................................................... 227
Sprites......................................................................................................................... 227
Image Files.................................................................................................................. 231
Collision Detection ..................................................................................................... 233
Creating Child Sprites ............................................................................................... 235
Image Transparency.................................................................................................. 236
Summary ..................................................................................................................... 239
Chapter 16. Managing Your Sprites ............................................................................ 240
Networked Game Components................................................................................ 240
Advanced Collision Detection .................................................................................. 242
The Sprite Manager ................................................................................................... 245
Summary ..................................................................................................................... 248
Chapter 17. Sprite Movement....................................................................................... 249
Floating-Point in J2ME.............................................................................................. 249
Game Initialization ..................................................................................................... 255
Movement.................................................................................................................... 256
Piecing It All Together ............................................................................................... 258
Summary ..................................................................................................................... 261
Chapter 18. J2ME Audio Basics .................................................................................. 262
Sounds Are (Barely) Possible! ................................................................................. 262
Summary ..................................................................................................................... 263
Chapter 19. Be Persistent: MIDP Data Storage ........................................................ 265
RecordStore Overview .......................................................................................... 265
RecordStore in Practice ........................................................................................ 266
More RecordStore Joy .......................................................................................... 273
Summary ..................................................................................................................... 278
Chapter 20. Connecting Out: Wireless Networking .................................................. 279
J2ME Networking Overview ..................................................................................... 279
MIDP Networking ....................................................................................................... 281
Setting Up Your Game Server ................................................................................. 285
Data Format ................................................................................................................ 286
Making a Multiplayer Car Racing Game................................................................. 289
Summary ..................................................................................................................... 315
Part V: J2ME Extensions .......................................................................................316
Chapter 21. PersonalJava, Connected Device Configuration, and Other Micro Java
Blends .............................................................................................................................. 317
Connected Device Configuration (CDC) ................................................................ 317
PersonalJava .............................................................................................................. 318
PDA Profile.................................................................................................................. 323
Java Game Profile ..................................................................................................... 324
The J2ME Multimedia Profile ................................................................................... 324
Summary ..................................................................................................................... 325
Chapter 22. iAppli: Micro Java with a Twist................................................................ 326
The Architecture of It All............................................................................................ 326
iAppli: Like MIDP, But Not Quite.............................................................................. 330
Developing iApplis ..................................................................................................... 341
Summary ..................................................................................................................... 343
Chapter 23. Siemens Game API.................................................................................. 345
Getting Set Up ............................................................................................................ 345
The Game SDK Overview ........................................................................................ 348
Images and Sprites.................................................................................................... 348
Graphic Objects.......................................................................................................... 350
Sprites......................................................................................................................... 350
TiledBackground .................................................................................................. 353
Flashing ....................................................................................................................... 356
Good Vibrations.......................................................................................................... 357
Music, Sweet Music ................................................................................................... 357
GSM Functions........................................................................................................... 360
Input Output ................................................................................................................ 361
Summary ..................................................................................................................... 362
Part VI: Micro Racer................................................................................................364
Chapter 24. Micro Racer: Putting It All Together....................................................... 365
The Bad News ............................................................................................................ 365
The Good News ......................................................................................................... 366
Putting Together the Pieces ..................................................................................... 366
One Game Running Everywhere............................................................................. 383
Summary ..................................................................................................................... 385
Part VII: Appendixes ...............................................................................................386
Appendix A. Low-Level GUI Classes .......................................................................... 387
Game Classes ............................................................................................................ 387
javax.microedition.lcdui.AlertType..................................................... 388
javax.microedition.lcdui.Command.......................................................... 389
javax.microedition.lcdui.Display.......................................................... 389
javax.microedition.lcdui.Displayable ................................................ 389
javax.microedition.lcdui.Canvas ............................................................ 389
javax.microedition.lcdui.Screen ............................................................ 390
javax.microedition.lcdui.Alert............................................................... 390
javax.microedition.lcdui.Form................................................................. 390
javax.microedition.lcdui.List................................................................. 390
javax.microedition.lcdui.TextBox.......................................................... 391
javax.microedition.lcdui.Font................................................................. 391
javax.microedition.lcdui.Graphics ....................................................... 392
javax.microedition.lcdui.Image............................................................... 392
javax.microedition.lcdui.Item................................................................. 393
javax.microedition.lcdui.ChoiceGroup ................................................ 393
javax.microedition.lcdui.DateField..................................................... 393
javax.microedition.lcdui.Gauge............................................................... 393
javax.microedition.lcdui.ImageItem..................................................... 394
javax.microedition.lcdui.StringItem................................................... 394
javax.microedition.lcdui.TextField..................................................... 394
javax.microedition.lcdui.Ticker ............................................................ 394
Appendix B. MIDP 1.1 ................................................................................................... 395
Main Packages........................................................................................................... 395
java.io Class Hierarchy ...................................................................................... 395
java.io Interface Hierarchy ................................................................................ 396
java.lang Class Hierarchy ................................................................................. 396
java.lang Interface Hierarchy............................................................................ 397
java.util Class Hierarchy ................................................................................. 397
java.util Interface Hierarchy............................................................................ 397
javax.microedition.io Class Hierarchy..................................................... 397
javax.microedition.io Interface Hierarchy............................................... 397
javax.microedition.lcdui Class Hierarchy.............................................. 398
javax.microedition.lcdui Interface Hierarchy........................................ 398
javax.microedition.midlet Class Hierarchy ........................................... 398
javax.microedition.rms Class Hierarchy .................................................. 398
javax.microedition.rms Interface Hierarchy ............................................ 398
Appendix C. Siemens Game API................................................................................. 400
Game Classes ............................................................................................................ 400
Siemens GSM Classes ............................................................................................. 402
Input/Output Classes ................................................................................................. 402
Appendix D. The iAppli API........................................................................................... 404
Packages..................................................................................................................... 404
com.nttdocomo.io Interfaces............................................................................ 404
com.nttdocomo.io Interfaces............................................................................ 404
com.nttdocomo.lang ........................................................................................... 405
com.nttdocomo.net.............................................................................................. 405
com.nttdocomo.ui................................................................................................ 405
com.nttdocomo.ui Interfaces............................................................................ 406
com.nttdocomo.util ........................................................................................... 407
com.nttdocomo.util Interfaces ....................................................................... 407
IApplication.......................................................................................................... 408

Download
Another J2ME Books
Continue Reading ...

LDAP programming With Java












Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
PART I INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
CHAPTER 1 WHAT CAN YOU FIND IN A DIRECTORY? . . . . . . . . . . 3
What Is a Directory?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
What’s That Phone Number? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Directory Clients for an Online Phone Book . . . . . . . . . . . . . . . . 7
Is He Really Who He Says He Is?. . . . . . . . . . . . . . . . . . . . . . . . . 10
Working Together. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Computers, Printers, Toasters . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
CHAPTER 2 THE LINGUA FRANCA OF DIRECTORIES IS LDAP . . . . 19
A Brief History of Electronic Directories . . . . . . . . . . . . . . . . . . . 19
I Heard It through the Grapevine . . . . . . . . . . . . . . . . . . . 19
Directories for the Internet . . . . . . . . . . . . . . . . . . . . . . . . 20
Directories for a Single Network:
Proprietary Solutions. . . . . . . . . . . . . . . . . . . . . . . . . . . 20
X.500: The “Heavyweight” Directory Service . . . . . . . . . 21
From Humble Beginnings . . . . . . . . . . . . . . . . . . . . . . . . . 22
Future Directions for LDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
The LDAP Information and Naming Models:
How Directories Are Organized . . . . . . . . . . . . . . . . . . . . . . . 26
The LDAP Information Model . . . . . . . . . . . . . . . . . . . . . 26
The LDAP Naming Model . . . . . . . . . . . . . . . . . . . . . . . . 30
LDAP Spoken Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Many Roads to Rome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Directory SDK for C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Directory SDK for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Java Naming and Directory Interface . . . . . . . . . . . . . . . . 35
CHAPTER 3 MAY WE INTRODUCE—
DIRECTORY SDK FOR JAVA. . . . . . . . . . . . . . . . . . . . . . 37
What Directory SDK for Java Can Do for You . . . . . . . . . . . . . . 37
Freedom from Protocol Handling . . . . . . . . . . . . . . . . . . . 37
The Use of Standard Java Objects for Returning
and Processing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Utility Classes for Handling LDAP-Specific Entities. . . . . 38
Full Access to All LDAP Services. . . . . . . . . . . . . . . . . . . . 38
Flexible Authentication Models . . . . . . . . . . . . . . . . . . . . 39
Write Once, Run Anywhere . . . . . . . . . . . . . . . . . . . . . . . 39
Multilayered Functionality . . . . . . . . . . . . . . . . . . . . . . . . 39
A Platform for Directory-Enabled Applications . . . . . . . . 39
What Else Can the SDK Do for Me? . . . . . . . . . . . . . . . . . . . . . . 40
Dynamic Organizational Chart. . . . . . . . . . . . . . . . . . . . . 40
Directory-Linking Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Access Control for Existing or New Applications . . . . . . 43
Installation and Setup of the SDK . . . . . . . . . . . . . . . . . . . . . . . . 45
Staying Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Installing the SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
PART II GETTING STARTED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
CHAPTER 4 SETTING UP YOUR OWN DIRECTORY . . . . . . . . . . . . . 51
Downloading and Installing Netscape Directory Server . . . . . . . 51
Before You Download and Install the Software . . . . . . . . 51
Downloading Netscape Directory Server . . . . . . . . . . . . . 52
Installing Netscape Directory Server . . . . . . . . . . . . . . . . . 52
Setting Up the Sample Database . . . . . . . . . . . . . . . . . . . . 55
Using the Command-Line Tools with Your New Directory . . . . 57
Finding Entries with LDAPSearch . . . . . . . . . . . . . . . . . . . 57
Adding Entries to the Directory . . . . . . . . . . . . . . . . . . . . 59
Understanding LDIF: How to Describe a
Directory Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Object Classes: Determining What Information
Makes Up an Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Choosing a Distinguished Name:
Where Do You Want to Add the Entry? . . . . . . . . . . . . 64
Examples of Defining and Adding Entries . . . . . . . . . . . . 64
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
CHAPTER 5 SEARCHING WITH THE SDK . . . . . . . . . . . . . . . . . . . . . 67
Our First Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Host Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Base DN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Search Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Our First Search Program . . . . . . . . . . . . . . . . . . . . . . . . . 74
Using Search Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Handling Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Attributes in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
I Want Only One Record and I Have the DN . . . . . . . . . . . . . . . 85
Searching and Comparing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
More on Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Sorting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Authenticating for Searches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Improving Directory Search Performance . . . . . . . . . . . . . . . . . . 103
Use Indexed Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Specify an Object Class to Get Only Entries
of the Desired Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Retrieve Only Attributes You Need . . . . . . . . . . . . . . . . . 104
Keep the DN Handy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Use compare Where It Makes Sense . . . . . . . . . . . . . . . . . 105
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
CHAPTER 6 CREATING AND MAINTAINING INFORMATION . . . . . 107
Before We Can Update: Authentication Basics . . . . . . . . . . . . . . 107
Adding an Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Summary of Steps to Add a New Entry. . . . . . . . . . . . . . . 111
Inserting Records from a Data File . . . . . . . . . . . . . . . . . . 113
Adding an Organizational Unit . . . . . . . . . . . . . . . . . . . . . 116
Processing Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Modifying an Existing Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Summary of Steps to Modify an Existing Entry . . . . . . . . 118
Adding an Attribute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Modifying an Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Removing an Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Updating Multivalued Attributes . . . . . . . . . . . . . . . . . . . 120
Storing Binary Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Storing Preferences and State. . . . . . . . . . . . . . . . . . . . . . . 135
Deleting an Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Renaming an Entry: Modifying the RDN . . . . . . . . . . . . . . . . . . 151
Managing Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Adding a User to a Group . . . . . . . . . . . . . . . . . . . . . . . . . 161
Removing a User from a Group . . . . . . . . . . . . . . . . . . . . 161
Using the LDAPIsMember Bean. . . . . . . . . . . . . . . . . . . . . . 162
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
CHAPTER 7 SECURING THE DATA. . . . . . . . . . . . . . . . . . . . . . . . . . . 165
No Standards for Access Control. . . . . . . . . . . . . . . . . . . . . . . . . 165
Setting Up an Access Control List . . . . . . . . . . . . . . . . . . . . . . . . 166
Viewing Access Control Lists through LDAP . . . . . . . . . . . . . . . 172
Modifying Access Control Lists through LDAP . . . . . . . . . . . . . 175
Authenticating to the Directory . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Using Password-Based Authentication. . . . . . . . . . . . . . . . . . . . . 177
Communicating over Secure Sockets Layer . . . . . . . . . . . . . . . . . 178
Using Certificate-Based Authentication . . . . . . . . . . . . . . . . . . . . 181
Using SASL Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Authenticating with SASL in LDAP . . . . . . . . . . . . . . . . . 183
Callbacks in SASL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
The SASL Framework Classes. . . . . . . . . . . . . . . . . . . . . . 186
Preparing to Use an Existing Mechanism . . . . . . . . . . . . . 189
Your Own SaslClient and ClientFactory . . . . . . . . . . 190
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
PART III GETTING DOWN AND DIRTY . . . . . . . . . . . . . . . . . . . . 197
CHAPTER 8 MORE POWER TO THE BROWSER:
AN APPLET THAT SPEAKS LDAP. . . . . . . . . . . . . . . . . . 199
What’s So Different about an Applet? . . . . . . . . . . . . . . . . . . . . . 199
Certificates and Signed Applets . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Writing LDAP Applets for Netscape Navigator . . . . . . . . . . . . . 204
Requesting Connection Privileges . . . . . . . . . . . . . . . . . . . 204
Packaging Your Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Generating a Test Certificate . . . . . . . . . . . . . . . . . . . . . . . 209
Signing Your Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Testing Your Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Using the Codebase as a Principal . . . . . . . . . . . . . . . . . . . 215
Writing LDAP Applets for Microsoft Internet
Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Requesting Connection Privileges . . . . . . . . . . . . . . . . . . . 216
Packaging Your Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Generating a Test Certificate . . . . . . . . . . . . . . . . . . . . . . . 218
Signing Your Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Creating a Web Page for the Applet . . . . . . . . . . . . . . . . . . . . . . . 221
Writing LDAP Applets for Java Plug-In Software . . . . . . . . . . . . 221
Packaging Your Applet . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Generating a Key Pair and Self-signed Certificate. . . . . . . 222
Signing Your Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Setting Up the End User’s System . . . . . . . . . . . . . . . . . . . 225
A Directory Viewer Applet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
A Simple Example for Java Plug-In Software . . . . . . . . . . 229
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
CHAPTER 9 SCRIPTING LDAP: JAVASCRIPT AND JAVA . . . . . . . . . 243
Accessing Java Applets from JavaScript. . . . . . . . . . . . . . . . . . . . 243
Accessing Java Objects from JavaScript. . . . . . . . . . . . . . . . . . . . 250
JavaScript Gotchas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Handling Java Exceptions in JavaScript . . . . . . . . . . . . . . 255
Handling Arrays of Strings . . . . . . . . . . . . . . . . . . . . . . . . 262
Requesting Privileges and Signing Your
JavaScript Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Accessing the LDAP Classes from JScript
in Internet Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
CHAPTER 10 DON’T REDO IT, REUSE IT: LDAP JAVABEANS . . . . . . 267
Invisible LDAP JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
LDAPBasePropertySupport. . . . . . . . . . . . . . . . . . . . . . . . 269
LDAPSimpleAuth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
LDAPGetEntries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Directory-Based Authentication in JavaScript . . . . . . . . . 287
Using PropertyChangeEvent Notifications . . . . . . . . . . . 289
Graphical LDAP JavaBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
A Directory Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
A Directory Lister . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
CHAPTER 11 MAKE YOUR APPLICATION
LOCATION-INDEPENDENT . . . . . . . . . . . . . . . . . . . . . . 341
The Teex Multicharacter-Set Text Editor. . . . . . . . . . . . . . . . . . . 342
The Teex JavaBean. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
A Class for User Preferences . . . . . . . . . . . . . . . . . . . . . . . 344
Storing Preferences as Attributes in User Entries . . . . . . . 353
Saving Preferences as an Object in the Directory . . . . . . . 365
Using Directory Structure to Model Attributes. . . . . . . . . 369
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
CHAPTER 12 MODELING RELATIONSHIPS. . . . . . . . . . . . . . . . . . . . . 377
Mirroring an Organizational Structure . . . . . . . . . . . . . . . . . . . . 377
Attributes as Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Parsing the Reporting Relationships
in a Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
An Alternative Strategy for Management
Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
An Organizational Chart Tree Component . . . . . . . . . . . 396
A More Traditional Organizational Chart
Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Inspecting Properties of an Entry . . . . . . . . . . . . . . . . . . . 408
Connecting the Property Table and the Directory
Viewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
CHAPTER 13 SERVLETS AND LDAP. . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Overview of Servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Uses of LDAP in Servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Designing the LDAP Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Location of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Our Phone Book Servlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Phone Book Lookups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Accessibility with a Simple Browser . . . . . . . . . . . . . . . . . 427
Utilizing the Corporate LDAP Directory . . . . . . . . . . . . . 428
Customizability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Search Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Intranet and Extranet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
User Self-administration . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Connection Pooling and Data Caching. . . . . . . . . . . . . . . 429
Accessibility over SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Connection-Pooling Class . . . . . . . . . . . . . . . . . . . . . . . . . 429
Servlet Request-Response Model . . . . . . . . . . . . . . . . . . . 439
Setting Up and Using the Servlet . . . . . . . . . . . . . . . . . . . . . . . . . 484
Tips for Servlet Developers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
PART IV BEYOND THE BASICS. . . . . . . . . . . . . . . . . . . . . . . . . . . 487
CHAPTER 14 OPTIONS AND CONSTRAINTS . . . . . . . . . . . . . . . . . . . 489
How Do They Affect Me? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
A View into Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
TimeLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Referrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
BindProc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
ReBindProc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
HopLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
Constraints for Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
ServerTimeLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Dereference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
MaxResults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
BatchSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
MaxBackLog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
CHAPTER 15 ODDS AND ENDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
LDAP URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
An IETF Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
Using LDAP URLs in Java. . . . . . . . . . . . . . . . . . . . . . . . . 501
Not Your Average URL . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
A Rose by Any Other Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
When What You Read Is Not What You Wrote . . . . . . . . . . . . . 505
Sometimes One Thread Is Not Enough . . . . . . . . . . . . . . . . . . . . 507
Don’t Step on My Settings . . . . . . . . . . . . . . . . . . . . . . . . . 510
A Cloned Connection Is a Safe Connection . . . . . . . . . . . 512
Performance, and How to Get It . . . . . . . . . . . . . . . . . . . . . . . . . 514
Breaking Up Is Hard to Do: Avoid
Unnecessary Connections . . . . . . . . . . . . . . . . . . . . . . . 514
Pool the Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
Fewer But Better Searches . . . . . . . . . . . . . . . . . . . . . . . . . 516
To Cache or Not to Cache . . . . . . . . . . . . . . . . . . . . . . . . . 516
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
CHAPTER 16 ADVANCED TOPICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
Information about Information: Managing the Schema . . . . . . . 519
Programmatic Access through the Schema Classes. . . . . . 519
A Pretty Printer for Schema Contents . . . . . . . . . . . . . . . . 524
Controls: An Essential Extension. . . . . . . . . . . . . . . . . . . . . . . . . 534
Too Much Data: A Virtual List View . . . . . . . . . . . . . . . . 535
Call Me When You’re Ready: Persistent Search . . . . . . . . 554
Password Expiration Notification. . . . . . . . . . . . . . . . . . . 557
Trust Me: The Proxied Authorization Control . . . . . . . . . 559
Your Very Own Controls: Using the BER Package. . . . . . 561
When the Data Lives Elsewhere: Managing Referrals. . . . . . . . . 572
Catching and Processing Referral Exceptions. . . . . . . . . . 572
Automatic Referrals: Anonymous or under
Client Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
The manageDsaIT Control . . . . . . . . . . . . . . . . . . . . . . . . . 575
LDAPBind for Complete Client Control. . . . . . . . . . . . . . . 575
And Now for Something Completely Different:
Extended Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Aiming for 24×7: Failover and Reconnecting . . . . . . . . . . . . . . . 579
Transparent Reconnection. . . . . . . . . . . . . . . . . . . . . . . . . 580
Controlling the Result Queue: The Connection Backlog . . . . . . 580
Down to the Wire: Using the Asynchronous Interface . . . . . . . . 581
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
PART V APPENDICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
APPENDIX A MORE TO LEARN ABOUT LDAP . . . . . . . . . . . . . . . . . . 591
Going to the Source: Internet Standards . . . . . . . . . . . . . . . . . . . 591
Where to Get RFCs and Internet Drafts . . . . . . . . . . . . . . 591
LDAP RFCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
LDAP Internet Drafts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
X.500 Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
Books about LDAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
LDAP Concepts and Deployment . . . . . . . . . . . . . . . . . . . 601
LDAP Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
X.500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
LDAP Information on the Internet. . . . . . . . . . . . . . . . . . . . . . . . 602
LDAP FAQs and Presentations . . . . . . . . . . . . . . . . . . . . . 602
LDAP Client SDKs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
LDAP Server Vendors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603
Add-On Products for LDAP Directories . . . . . . . . . . . . . . 603
Collections of LDAP Documents and Links . . . . . . . . . . . 604
X.500 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
Newsgroups Where LDAP Is Spoken. . . . . . . . . . . . . . . . . . . . . . 605
LDAP in Your Inbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
LDAP Servers at Your Disposal . . . . . . . . . . . . . . . . . . . . . . . . . . 606
APPENDIX B CLASSES OF THE LDAP SDK . . . . . . . . . . . . . . . . . . . . . 607
The netscape.ldap Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
LDAPConnection and Connection Management. . . . . . . . 607
Basic LDAP Message and Data Encapsulation . . . . . . . . . 612
Handling Messages from the Server . . . . . . . . . . . . . . . . . 618
Authentication and Reauthentication . . . . . . . . . . . . . . . . 619
Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
Client-Side Sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
Schema Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
Miscellaneous Utility Classes . . . . . . . . . . . . . . . . . . . . . . 631
The netscape.ldap.util Package . . . . . . . . . . . . . . . . . . . . . . . 633
DNs and RDNs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
LDIF Reader Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Connection Pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
APPENDIX C LDAP UTILITY CLASSES ON THE CD-ROM. . . . . . . . . . 639
The table Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
The util Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
APPENDIX D COMMON LDAP SCHEMA ELEMENTS. . . . . . . . . . . . . 657
Object Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
Abstract Object Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 658
Structural Object Classes. . . . . . . . . . . . . . . . . . . . . . . . . . 658
Auxiliary Object Classes . . . . . . . . . . . . . . . . . . . . . . . . . . 661
Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
Attribute Syntaxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
Attribute Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
APPENDIX E LDAP ERROR CODES . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

Download
Another Java Books
Continue Reading ...

Related Posts with Thumbnails

Put Your Ads Here!

Recent Posts