Computer programming / software engineering Books
John Wiley & Sons Inc Designing with Objects
Book SynopsisHere is a book that takes the sting out of learning object-oriented design patterns! Using vignettes from the fictional world of Harry Potter, author Avinash C. Kak provides a refreshing alternative to the typically abstract and dry object-oriented design literature. Designing with Objects is unique. It explains design patterns using the short-story medium instead of sterile examples. It is the third volume in a trilogy by Avinash C. Kak, following Programming with Objects (Wiley, 2003) and Scripting with Objects (Wiley, 2008). Designing with Objects confronts how difficult it is for students to learn complex patterns based on conventional scenarios that they may not be able to relate to. In contrast, it shows that stories from the fictional world of Harry Potter provide highly relatable and engaging models. After explaining core notions in a pattern and its typical use in real-world applications, each chapter shows how a pattern can be mapped to a Table of ContentsPREFACE xiv ACKNOWLEDGMENTS xix 1 Why Learn Design Patterns and Why Do So with Help from Harry Potter? 1 1.1 The OO Design Patterns “Bible” by GoF 2 1.2 But What Has Harry Potter Got to Do with OO Design Patterns? 4 1.3 Is Familiarity with Harry Potter a Requirement for Understanding This Book? 6 1.4 How the Pattern Explanations are Organized 7 1.5 The Terminology of Object-Oriented Programming 7 1.6 The UML Notation Used in the Class Diagrams 12 1.6.1 Association as a Relationship Between Classes 14 1.6.2 Aggregation and Composition as Relationships Between Classes 15 1.6.3 Representing Attributes 16 1.6.4 Representing Operations 17 I CREATIONAL PATTERNS 19 2 Abstract Factory 21 2.1 The Concept of a Factory in Software 21 2.2 Intent and Applicability 22 2.3 Introduction to the Abstract Factory Pattern 22 2.4 The Abstract Factory Pattern in Real-World Applications 23 2.5 Harry Potter Story Used to Illustrate the Abstract Factory Pattern 23 2.6 A Top Level View of the Pattern Demonstration 25 2.7 The Abstract Class Factory 27 2.8 The Helper Class FactoryStore 27 2.9 The Abstract Class Enchanted 30 2.10 The Concrete Classes for Magical Objects 31 2.11 The Concrete Factory Classes 32 2.12 The Client Class Diagon AlleyRetailer 34 2.13 Playing with the Code 36 3 Builder 38 3.1 Building Complex Objects 38 3.2 Intent and Applicability 39 3.3 Introduction to the Builder Pattern 39 3.4 The Builder Pattern in Real-World Applications 41 3.5 Harry Potter Story Used to Illustrate the Builder Pattern 42 3.6 A Top-Level View of the Pattern Demonstration 43 3.7 The Abstract Class PotionMaker 45 3.8 The Concrete Extensions of PotionMaker 46 3.9 The Director Class 52 3.10 The Potion Class 54 3.11 The Ingredient Class 55 3.12 The PotionMakingFeasibilityViolation Class 55 3.13 The Client Class 55 3.14 Playing with the Code 56 4 Factory Method 59 4.1 Revisiting the Concept of a Factory in Software 59 4.2 Intent and Applicability 60 4.3 Introduction to the Factory Method Pattern 60 4.4 The Factory Method Pattern in Real-World Applications 61 4.5 Harry Potter Story Used to Illustrate the Factory Method Pattern 62 4.6 A Top Level View of the Pattern Demonstration 63 4.7 The Enchanted Class Hierarchy 65 4.8 The ArtifactFactory Class Hierarchy and the Factory Methods Contained Therein 68 4.9 The Client Class 70 4.10 Playing with the Code 71 5 Prototype 73 5.1 Why Not Make New Objects by Copying Old Objects? 73 5.2 Intent and Applicability 74 5.3 Introduction to the Prototype Pattern 74 5.4 The Prototype Pattern in Real-World Applications 77 5.5 Harry Potter Story Used to Illustrate The Prototype Pattern 78 5.6 A Top Level View of the Pattern Demonstration 79 5.7 The Dragon Class 81 5.8 The PrototypeManagerAndDuplicator Class 84 5.9 The DragonAficionado Class 87 5.10 The UnknownDragonException Class 88 5.11 Playing with the Code 88 6 Singleton 90 6.1 Singular Objects 90 6.2 Intent and Applicability 90 6.3 Introduction to the Singleton Pattern 91 6.4 The Singleton Pattern in Real-World Applications 91 6.5 Harry Potter Story Used to Illustrate the Singleton Pattern 92 6.6 A Top Level View of the Pattern Demonstration 92 6.7 The MinisterForMagic Class 93 6.8 The TestSingleton Class 94 6.9 Variations on the Singleton Pattern 95 6.10 Playing with the Code 97 II STRUCTURAL PATTERNS 99 7 Adapter 101 7.1 Getting Things to Work Together 101 7.2 Intent and Applicability 102 7.3 Introduction to the Adapter Pattern 102 7.4 The Adapter Pattern in Real-World Applications 103 7.5 Harry Potter Story Used to Illustrate the Adapter Pattern 104 7.6 A Top Level View of the Pattern Demonstration 104 7.7 The Target Interface: TeachingDADA 106 7.8 The TeacherForDADA Class 107 7.9 The AdapterForSafeTeaching Class 108 7.10 The Client Class SchoolOfMagic 110 7.11 Object Adapter 111 7.12 Pluggable Adapter 113 7.13 Playing with the Code 119 8 Bridge 122 8.1 Concepts and Their Implementation 122 8.2 Intent and Applicability 123 8.3 Introduction to the Bridge Pattern 123 8.4 The Bridge Pattern in Real-World Applications 126 8.5 Harry Potter Story Used to Illustrate the Bridge Pattern 127 8.6 A Top Level View of the Pattern Demonstration 130 8.7 The Humanoid Class 130 8.8 The Dementor, Goblin, and HouseElf Classes 132 8.9 The Humanoid Imp Class 134 8.10 Implementation Classes for the Dementor, Goblin, and HouseElf Classes 137 8.11 The Client Class MinistryOfMagic 139 8.12 Playing with the Code 140 9 Composite 142 9.1 Relationships That Loop Back 142 9.2 Intent and Applicability 143 9.3 Introduction to the Composite Pattern 144 9.4 The Composite Pattern in Real-World Applications 145 9.5 Harry Potter Story Used to Illustrate the Composite Pattern 146 9.6 A Top Level View of the Pattern Demonstration 147 9.7 The WizardTraits Interface 148 9.8 The Wizard Class 149 9.9 The Auror Class 152 9.10 The Obliviator Class 153 9.11 The DepartmentHead Class 155 9.12 The Minister for Magic Class 156 9.13 The Client Class Test 158 9.14 Playing with the Code 159 10 Decorator 161 10.1 Onion as a Metaphor 161 10.2 Intent and Applicability 162 10.3 Introduction to the Decorator Pattern 162 10.4 The Decorator Pattern in Real-World Applications 164 10.5 Harry Potter Story Used to Illustrate the Decorator Pattern 165 10.6 A Top Level View of the Pattern Demonstration 168 10.7 The CoreMessageDeliveryClass Class 170 10.8 The Decorator Classes 170 10.9 The Client Class Test 172 10.10 Playing with the Code 173 11 Facade 175 11.1 Hiding Complexity 175 11.2 Intent and Applicability 175 11.3 Introduction to the Facade Pattern 176 11.4 The Facade Pattern in Real-World Applications 177 11.5 Harry Potter Story Used to Illustrate the Facade Pattern 177 11.6 A Top Level View of the Pattern Demonstration 179 11.7 The Abstract Root Class Facade 181 11.8 The Network Class 183 11.9 The Node, Link, and Path Classes 193 11.10 The Three Concrete Facade Classes 198 11.11 Testing the Demonstration Code 203 11.12 Playing with the Code 207 12 Flyweight 212 12.1 The Idea of Customized Duplications 212 12.2 Intent and Applicability 213 12.3 Introduction to the Flyweight Pattern 213 12.4 The Flyweight Pattern in Real-World Applications 214 12.5 Harry Potter Story Used to Illustrate the Flyweight Pattern 214 12.6 A Top Level View of the Pattern Demonstration 215 12.7 The HeadMasterPortrait Class 218 12.8 The FlyweightImageStore Class 218 12.9 The ImageManager Class 219 12.10 The PortraitBorderChoices Class 225 12.11 The ImageNotAvailableException Class 226 12.12 The PortraitMakerAssignment Class 226 12.13 Playing with the Code 228 12.14 Acknowledgment 229 13 Proxy 230 13.1 Is It Always Necessary to Have the Real Thing? 230 13.2 Intent and Applicability 230 13.3 Introduction to the Proxy Pattern 231 13.4 The Proxy Pattern in Real-World Applications 232 13.5 Harry Potter Story Used to Illustrate the Proxy Pattern 233 13.6 A Top Level View of the Pattern Demonstration 235 13.7 The Abstract Class Wizard 235 13.8 The DarkWizardTraits Interface 237 13.9 The DarkWizard Class 238 13.10 The DarkLord Class 242 13.11 The ClientClass Class 245 13.12 Playing with the Code 246 III BEHAVIORAL PATTERNS 249 14 Chain of Responsibility 253 14.1 Passing the Buck 253 14.2 Intent and Applicability 254 14.3 Introduction to the Chain of Responsibility Pattern 254 14.4 The Chain of Responsibility Pattern in Real-World Applications 255 14.5 Harry Potter Story Used to Illustrate the Chain of Responsibility Pattern 256 14.6 A Top Level View of the Pattern Demonstration 258 14.7 The Interface Class Violations 260 14.8 The Abstract Class Adjudicator 261 14.9 The Player Class 263 14.10 The Classes with the Authority to Resolve Violations 265 14.11 Testing the Code 268 14.12 Playing with the Code 269 15 Command 272 15.1 Actions Versus the Actors 272 15.2 Intent and Applicability 273 15.3 Introduction to the Command Pattern 274 15.4 The Command Pattern in Real-World Applications 274 15.5 Harry Potter Story Used to Illustrate the Command Pattern 276 15.6 A Top Level View of the Pattern Demonstration 277 15.7 The Command Interface 279 15.8 The MyPlaces Interface 279 15.9 The ProtectHarryPotter Class 279 15.10 The Wizard Class 282 15.11 The Squib Class 284 15.12 The Invoker Class 285 15.13 The UnableToProtectHarryPotterException Class 286 15.14 The Client Class 286 15.15 Playing with the Code 288 16 Interpreter 290 16.1 Parsing versus Interpretation 290 16.2 Intent and Applicability 292 16.3 Introduction to the Interpreter Pattern 292 16.4 The Interpreter Pattern in Real-World Applications 293 16.5 Harry Potter Story Used to Illustrate the Interpreter Pattern 294 16.6 A Parser Front-End for the Interpreter Pattern 296 16.7 A Top Level View of the Pattern Demonstration 304 16.8 The Driver Class 307 16.9 The Interpreter Sentence Class 310 16.10 The Worker Classes for Interpretation 312 16.11 The Utility Class ShowSyntaxTree 315 16.12 Playing with the Code 316 17 Iterator 321 17.1 Storing Object Collections and Interacting with Them 321 17.2 Intent and Applicability 323 17.3 Introduction to the Iterator Pattern 323 17.4 The Iterator Pattern in Real-World Applications 324 17.5 Harry Potter Story Used to Illustrate the Iterator Pattern 325 17.6 A Top Level View of the Pattern Demonstration 326 17.7 A Utility Interface for Demonstrating the Iterator Pattern 328 17.8 The Iterator Interface 330 17.9 The Fresher Class 330 17.10 The SortingHat Class 334 17.11 The MagicCollection Interface 344 17.12 The MagicList and MagicSet Classes 344 17.13 The Class Range 349 17.14 Playing with the Code 349 17.15 Credits 352 18 Mediator 353 18.1 The Role of Mediation in Collaborative Problem Solving 353 18.2 Intent and Applicability 354 18.3 Introduction to the Mediator Pattern 354 18.4 The Mediator Pattern in Real-World Applications 355 18.5 Harry Potter Story Used to Illustrate the Mediator Pattern 357 18.6 A Top Level View of the Pattern Demonstration 357 18.7 The Abstract Class Mediator 359 18.8 The Interface TrialElements 360 18.9 The MinistryOfMagicTrialMediator Class 361 18.10 The Witness Class 366 18.11 The Trial Interface 367 18.12 The HarryPotterTrial Class 367 18.13 Playing with the Code 369 19 Memento 371 19.1 Recalling the Past 371 19.2 Intent and Applicability 372 19.3 Introduction to the Memento Pattern 372 19.4 The Memento Pattern in Real-World Applications 374 19.5 Harry Potter Story Used to Illustrate the Memento Pattern 374 19.6 A Top Level View of the Pattern Demonstration 377 19.7 The HogwartsHappening Class and The Inner Memento Class 378 19.8 The Client Class 380 19.9 Playing with the Code 384 20 Observer 386 20.1 Subscription-Based Broadcasting 386 20.2 Intent and Applicability 387 20.3 Introduction to the Observer Pattern 387 20.4 The Observer Pattern in Real-World Applications 388 20.5 Harry Potter Story Used to Illustrate the Observer Pattern 389 20.6 A Top Level View of the Pattern Demonstration 391 20.7 The Observer Interface 391 20.8 The Observable Interface 393 20.9 The DarkLord Class 393 20.10 The DeathEater Class 396 20.11 The GodProcess Class 399 20.12 Playing with the Code 401 21 State 405 21.1 Contextual Dependence of Behaviors 405 21.2 Intent and Applicability 406 21.3 Introduction to the State Pattern 406 21.4 The State Pattern in Real-World Applications 406 21.5 Harry Potter Story Used to Illustrate the State Pattern 407 21.6 A Top Level View of the Pattern Demonstration 408 21.7 The DADA State Interface 410 21.8 The Year-by-Year Implementation Classes for the State 411 21.9 The TeachingDADA Class 417 21.10 The Hogwarts Class 418 21.11 Playing with the Code 419 22 Strategy 421 22.1 Strategies in the Pursuit of Goals 421 22.2 Intent and Applicability 422 22.3 Introduction to the Strategy Pattern 422 22.4 The Strategy Pattern in Real-World Applications 423 22.5 Harry Potter Story Used to Illustrate the Strategy Pattern 424 22.6 A Top Level View of the Pattern Demonstration 425 22.7 The Abstract Root Class for Strategies: StrategyAbstractRoot 428 22.8 The Concrete Strategy Classes 429 22.9 The Champion Class 432 22.10 The SecondTaskManager Class 434 22.11 Playing with the Code 436 23 Template Method 437 23.1 Customizable Recipes 437 23.2 Intent and Applicability 438 23.3 Introduction to the Template Method Pattern 438 23.4 The Template Method Pattern in Real-World Applications 440 23.5 Harry Potter Story Used to Illustrate the Template Method Pattern 441 23.6 A Top Level View of the Pattern Demonstration 442 23.7 The Abstract Root of Narrative Generation Classes 444 23.8 Concrete Classes for Narrative Generation 445 23.9 The Executable Class 449 23.10 Playing with the Code 450 24 Visitor 453 24.1 Hooks, Good and Evil 453 24.2 Intent and Applicability 454 24.3 Introduction to the Visitor Pattern 454 24.4 The Visitor Pattern in Real-World Applications 457 24.5 Harry Potter Story Used to Illustrate the Visitor Pattern 457 24.6 A Top Level View of the Pattern Demonstration 459 24.7 The Visitor Interface 460 24.8 Two Concrete Implementations of the Visitor Interface 462 24.9 A Re-Implementation of the Wizard Hierarchy of the Composite Pattern 463 24.10 The Executable Class Client 469 24.11 Playing with the Code 470 REFERENCES 473 INDEX 474
£66.56
John Wiley & Sons Inc Designing Distributed Control Systems
Book SynopsisDesigning Distributed Control Systems presents 80 patterns for designing distributed machine control system software architecture (forestry machinery, mining drills, elevators, etc.).Table of ContentsForeword xvii Acknowledgements xxi Chapter 1 Setting the Landscape 1 Chapter 2 The Domain of Distributed Control Systems 9 Chapter 3 Software Architecture and Quality 71 Chapter 4 About Patterns 79 Chapter 5 Pattern Language for Distributed Control Systems 93 Chapter 6 Patterns for Distribution 109 Chapter 7 Messaging Patterns 129 Chapter 8 Event-Handling Patterns 155 Chapter 9 Patterns for Control System Modes 173 Chapter 10 Patterns for Data Management 199 Chapter 11 Patterns to Handle Scarce Resources 227 Chapter 12 Patterns for Decoupling Software and Hardware 263 Chapter 13 Redundancy Patterns 277 Chapter 14 Patterns for System Start-Up 287 Chapter 15 Software Update Patterns 299 Chapter 16 Human–Machine Interface Patterns 311 Chapter 17 High-Level Services Patterns 349 Chapter 18 Fleet Management Patterns 371 Chapter 19 Patterns for System Configuration 379 Chapter 20 Applying Patterns 399 Chapter 21 Concluding Remarks 407 Appendix A Quality Attribute Table 409 Appendix B Patlets 415 Glossary 433 References 439 Index of Patterns 459 Index 465
£39.90
John Wiley & Sons Inc Java Programming Interviews Exposed
Book SynopsisIf you are a skilled Java programmer but are concerned about the Java coding interview process, this real-world guide can help you land your next position Java is a popular and powerful language that is a virtual requirement for businesses making use of IT in their daily operations.Table of ContentsIntroduction xi Part I: Navigating the Interview Process Chapter 1: Dissecting Interview Types 3 Looking at the Phone Screening Process 4 Reviewing Technical Tests 5 Handling Face-to-Face Interviews 7 Making the Decision 8 Summary 9 Chapter 2: Writing a Noticeable Resume 11 How to Write a Resume and Cover Letter 11 Writing a Cover Letter 14 Summary 15 Chapter 3: Technical Test and Interview Basics 17 Technical Written Tests 17 At-Computer Tests 18 Face-to-Face Technical Interviews 19 Summary 21 Chapter 4: Writing Core Algorithms 23 Looking at Big O Notation 23 Sorting Lists 24 Searching Lists 32 Summary 33 Chapter 5: Data Structures 35 Lists 35 The Relationship between Arrays and Lists 36 Trees 39 Maps 45 Sets 48 Summary 49 Chapter 6: Design Patterns 51 Investigating Example Patterns 51 Commonly Used Patterns 60 Summary 64 Chapter 7: Implementing Popular Interview Algorithms 65 Implementing FizzBuzz 65 Demonstrating the Fibonacci Sequence 67 Demonstrating Factorials 71 Implementing Library Functionality 72 Using Generics 80 Summary 83 Chapter 8: Java Basics 87 The Primitive Types 88 Using Objects 91 Java’s Arrays 98 Working with Strings 98 Understanding Generics 101 Autoboxing and Unboxing 107 Using Annotations 109 Naming Conventions 111 Classes 111 Variables and Methods 111 Constants 111 Handling Exceptions 112 Using the Standard Java Library 115 Looking Forward to Java 8 119 Summary 120 Chapter 9: Testing with JUnit 123 The JUnit Test Life Cycle 125 Best Practices for Using JUnit 127 Eliminating Dependencies with Mocks 138 Creating System Tests with Behavior-Driven Development 143 Summary 146 Chapter 10: Understanding the Java Vi rtual Machine 147 Garbage Collection 147 Memory Tuning 149 Interoperability between the JVM and the Java Language 152 Summary 157 Chapter 11: Concurrency 159 Using Threads 159 Working with Concurrency 165 Actors 169 Summary 174 Part III: Components and Frameworks Chapter 12: Integrating Java Applications with Databases 177 SQL: An Introduction 177 JDBC: Combining Java and the Database 191 Testing with In-Memory Databases 198 Summary 199 Chapter 13: Creating Web Applications 201 Tomcat and the Servlet API 201 Jetty 207 Play Framework 213 Summary 218 Chapter 14: Using HTT P and REST 221 The HTTP Methods 221 HTTP Clients 224 Creating HTTP Services Using REST 226 Summary 230 Chapter 15: Serialization 231 Reading and Writing Java Objects 231 Using XML 234 JSON 240 Summary 243 Chapter 16: The Spring Framework 245 Core Spring and the Application Context 245 Spring JDBC 255 Integration Testing 259 Spring MVC 262 Summary 269 Chapter 17: Using Hibernate 271 Using Hibernate Summary 284 Chapter 18: Useful Libraries 287 Removing Boilerplate Code with Apache Commons 287 Developing with Guava Collections 290 Using Joda Time 296 Summary 300 Chapter 19: Developing with Build Tools 301 Building Applications with Maven 301 Ant 309 Summary 311 Chapter 20: Android 313 Basics 314 Components 314 Intents 315 Activities 318 Broadcast Receivers 321 Services 322 User Interface 326 Persistence 333 Android Hardware 336 Summary 340 Appendix: Introducing Scala 341 Index 353
£24.79
John Wiley & Sons Inc Arduino Sketches
Book SynopsisMaster programming Arduino with this hands-on guide Arduino Sketches is a practical guide to programming the increasingly popular microcontroller that brings gadgets to life. Accessible to tech-lovers at any level, this book provides expert instruction on Arduino programming and hands-on practice to test your skills. You''ll find coverage of the various Arduino boards, detailed explanations of each standard library, and guidance on creating libraries from scratch plus practical examples that demonstrate the everyday use of the skills you''re learning. Work on increasingly advanced programming projects, and gain more control as you learn about hardware-specific libraries and how to build your own. Take full advantage of the Arduino API, and learn the tips and tricks that will broaden your skillset. The Arduino development board comes with an embedded processor and sockets that allow you to quickly attach peripherals without tools or solders. It''s easy to buildTable of ContentsIntroduction xxix Part I Introduction to Arduino 1 Chapter 1 Introduction to Arduino 3 Atmel AVR 5 The Arduino Project 7 The ATmega Series 8 The ATmega Series 8 The ATtiny Series 8 Other Series 9 The Different Arduinos 9 Arduino Uno 10 Arduino Leonardo 10 Arduino Ethernet 11 Arduino Mega 2560 11 Arduino Mini 13 Arduino Micro 13 Arduino Due 13 LilyPad Arduino 14 Arduino Pro 16 Arduino Robot 16 Arduino Esplora 18 Arduino Yún 18 Arduino Tre 19 Arduino Zero 19 Your Own Arduino? 20 Shields 20 What Is a Shield? 20 The Different Shields 21 Arduino Motor Shield 21 Arduino Wireless SD Shield 21 Arduino Ethernet Shield 21 Arduino WiFi Shield 22 Arduino GSM Shield 22 Your Own Shield 22 What Can You Do with an Arduino? 22 What You Will Need for This Book 23 Summary 24 Chapter 2 Programming for the Arduino 25 Installing Your Environment 26 Downloading the Software 27 Running the Software 28 Using Your Own IDE 29 Your First Program 29 Understanding Your First Sketch 33 Programming Basics 36 Variables and Data Types 36 Control Structures 38 if Statement 38 switch Case 39 while Loop 40 for Loop 41 Functions 42 Libraries 42 Summary 42 Chapter 3 Electronics Basics 45 Electronics 101 46 Voltage, Amperage, and Resistance 46 Voltage 47 Amperage 48 Resistance 48 Ohm’s Law 49 The Basic Components 49 Resistors 50 Different Resistor Values 50 Identifying Resistor Values 50 Using Resistors 52 Capacitors 53 Using Capacitors 54 Diodes 54 Different Types of Diodes 54 Using Diodes 55 Light-Emitting Diodes 55 Using LEDs 55 Transistors 56 Using Transistors 56 Breadboards 56 Inputs and Outputs 57 Connecting a Light-Emitting Diode 58 Calculation 58 Software 59 Hardware 60 What Now? 61 Summary 61 Part II Standard Libraries 63 Chapter 4 The Arduino Language 65 I/O Functions 65 Digital I/O 65 pinMode() 66 digitalRead() 66 digitalWrite() 67 Analog I/O 67 analogRead() 68 analogWrite() 68 Generating Audio Tones 69 tone() 69 noTone() 69 Reading Pulses 69 pulseIn() 70 Time Functions 70 delay() 70 delayMicroseconds() 71 millis() 71 micros() 71 Mathematical Functions 72 min() 72 max() 72 constrain() 73 abs() 73 map() 73 pow() 74 sqrt() 74 random() 74 Trigonometry 75 sin() 76 cos() 76 tan() 76 Constants 76 Interrupts 76 attachInterrupt() 77 detachInterrupt() 78 noInterrupts() 78 interrupts() 78 Summary 79 Chapter 5 Serial Communication 81 Introducing Serial Communication 82 UART Communications 84 Baud Rate 84 Data Bits 85 Parity 85 Stop Bits 86 Debugging and Output 86 Starting a Serial Connection 87 Writing Data 88 Sending Text 88 Sending Data 90 Reading Data 91 Starting Communications 91 Is Data Waiting? 91 Reading a Byte 92 Reading Multiple Bytes 92 Taking a Peek 93 Parsing Data 93 Cleaning Up 94 Example Program 95 SoftwareSerial 98 Summary 99 Chapter 6 EEPROM 101 Introducing EEPROM 101 The Different Memories on Arduino 103 The EEPROM Library 104 Reading and Writing Bytes 104 Reading and Writing Bits 105 Reading and Writing Strings 107 Reading and Writing Other Values 108 Example Program 110 Preparing EEPROM Storage 113 Adding Nonvolatile Memory 114 Summary 115 Chapter 7 SPI 117 Introducting SPI 118 SPI Bus 118 Comparison to RS-232 119 Confi guration 119 Communications 120 Arduino SPI 120 SPI Library 121 SPI on the Arduino Due 123 Example Program 125 Hardware 126 Sketch 128 Exercises 131 Summary 132 Chapter 8 Wire 133 Introducing Wire 134 Connecting I2C 135 I2C Protocol 135 Address 136 Communication 137 Communicating 138 Master Communications 139 Sending Information 139 Requesting Information 140 Slave Communications 141 Receiving Information 141 Sending Information 142 Example Program 142 Exercises 146 Traps and Pitfalls 147 Voltage Difference 147 Bus Speed 147 Shields with I2C 148 Summary 148 Chapter 9 Ethernet 149 Introduction 149 Ethernet 150 Ethernet Cables 151 Switches and Hubs 151 PoE 152 TCP/IP 152 MAC Address 153 IP Address 153 DNS 153 Port 153 Ethernet on Arduino 154 Importing the Ethernet Library 154 Starting Ethernet 155 Arduino as a Client 157 Sending and Receiving Data 158 Connecting to a Web Server 159 Example Program 161 Arduino as a Server 163 Serving Web Pages 164 Example Program 165 Sketch 165 Summary 167 Chapter 10 WiFi 169 Introduction 170 The WiFi Protocol 171 Topology 171 Network Parameters 172 Channels 172 Encryption 172 SSID 173 RSSI 173 Arduino WiFi 173 Importing the Library 174 Initialization 174 Status 175 Scanning Networks 176 Connecting and Configuring 177 Wireless Client 178 Wireless Server 179 Example Application 179 Hardware 181 Sketch 182 Exercises 189 Summary 190 Chapter 11 LiquidCrystal 191 Introduction 192 LiquidCrystal Library 194 Writing Text 195 Cursor Commands 196 Text Orientation 197 Scrolling 197 Custom Text 198 Example Program 199 Hardware 200 Software 201 Exercises 205 Summary 205 Chapter 12 SD 207 Introduction 208 SD Cards 211 Capacity 212 Speed 213 Using SD Cards with Arduino 213 Accepted SD Cards 214 Limitations 214 The SD Library 215 Importing the Library 215 Connecting a Card 215 Opening and Closing Files 216 Reading and Writing Files 217 Reading Files 217 Writing Files 218 Folder Operations 218 Card Operations 219 Advanced Usage 220 Example Program and Sketch 220 Summary 224 Chapter 13 TFT 225 Introduction 226 Technologies 227 TFT Library 228 Initialization 228 Screen Preparation 229 Text Operations 230 Basic Graphics 231 Coloring 232 Graphic Images 232 Example Application 233 Hardware 234 Sketch 234 Exercises 239 Summary 239 Chapter 14 Servo 241 Introduction to Servo Motors 242 Controlling Servo Motors 243 Connecting a Servo Motor 243 Moving Servo Motors 244 Disconnecting 245 Precision and Safety 246 Example Application 246 Schematic 248 Sketch 249 Exercises 250 Summary 251 Chapter 15 Stepper 253 Introducing Motors 254 Controlling a Stepper Motor 254 Hardware 255 Unipolar Versus Bipolar Stepper Motors 255 The Stepper Library 256 Example Project 257 Hardware 257 Sketch 258 Summary 260 Chapter 16 Firmata 261 Introducing Firmata 262 Firmata Library 262 Sending Messages 263 Receiving Messages 263 Callbacks 264 SysEx 266 Example Program 268 Summary 269 Chapter 17 GSM 271 Introducing GSM 272 Mobile Data Network 272 GSM 273 GPRS 274 EDGE 274 3 G 274 4 G and the Future 275 Modems 275 Arduino and GSM 276 Arduino GSM Library 276 GSM Class 278 SMS Class 279 VoiceCall Class 281 GPRS 282 Modem 284 Example Application 285 Summary 288 Part III Device-Specific Libraries 289 Chapter 18 Audio 291 Introducing Audio 292 Digital Sound Files 292 Music on the Arduino 294 Arduino Due 294 Digital to Analog Converters 295 Digital Audio to Analog 295 Creating Digital Audio 296 Storing Digital Audio 296 Playing Digital Audio 296 Example Program 298 Hardware 298 Sketch 300 Exercise 303 Summary 304 Chapter 19 Scheduler 305 Introducing Scheduling 306 Arduino Multitasking 307 Scheduler 308 Cooperative Multitasking 309 Noncooperative Functions 311 Example Program 313 Hardware 314 Sketch 316 Exercises 319 Summary 319 Chapter 20 USBHost 321 Introducing USBHost 322 USB Protocol 323 USB Devices 324 Keyboards 324 Mice 325 Hubs 325 Arduino Due 325 USBHost Library 327 Keyboards 327 Mice 329 Example Program 330 Hardware 331 Source Code 332 Summary 334 Chapter 21 Esplora 335 Introducing Esplora 336 The Arduino Esplora Library 337 RGB LED 337 Sensors 338 Buttons 339 Buzzer 340 TinkerKit 341 LCD Module 342 Example Program and Exercises 342 Summary 344 Chapter 22 Robot 345 Introducing Robot Library 346 Arduino Robot 348 Robot Library 349 Control Board 350 Robotic Controls 350 Sensor Reading 351 Personalizing Your Robot 353 LCD Screen 354 Music 356 Motor Board 357 Example Program and Exercises 358 Summary 360 Chapter 23 Bridge 361 Introducing Bridge Library 362 Bridge 363 Process 364 FileIO 366 YunServer 367 YunClient 368 Example Application 369 Hardware 369 Sketch 370 Exercises 373 Summary 373 Part IV User Libraries and Shields 375 Chapter 24 Importing Third-Party Libraries 377 Libraries 378 Finding Libraries 378 Importing a Library 379 Using an External Library 381 Example Application 384 Exercises 389 Summary 389 Chapter 25 Creating Your Own Shield 391 Creating a Shield 391 The Idea 392 The Required Hardware 392 The Required Software 393 Your First Shield 394 Step 1: The Breadboard 395 Step 2: The Schematic 398 Step 3: The PCB 402 Summary 404 Chapter 26 Creating Your Own Library 405 Libraries 405 Library Basics 406 Simple Libraries 406 Advanced Libraries 410 Adding Comments 413 Adding Examples 415 Read Me 415 Coding Style 416 Use CamelCase 416 Use English Words 416 Don’t Use External Libraries 417 Use Standard Names 417 Distributing Your Library 417 Closed Source Libraries 417 Example Library 418 The Library 418 Examples 424 README 427 Finishing Touches 428 Summary 428 Index 429
£25.64
John Wiley & Sons Inc Knowledge and Discourse Matters
Book SynopsisThis book provides a practical approach to harnessing knowledge in organizations. Its focus is on knowledge sharing, tacit knowing, and a view of knowledge as an accomplishment in social interaction. The aim of this book is to explore and show how the phenomena of trust, risk and identity, as contexts constructed by speakers themselves, influence and mediate knowledge sharing in organizational encounters. The research particularly reveals how tacit knowledge (knowing), affects the scope and directions of everyday conversation. The first part of the book presents a comprehensive critical appraisal and analysis of the field of organizational knowledge management, followed by an introduction to the theory and methodology of discourse analysis, and a view of tacit knowing drawn from studies in implicit learning. The second part reports the detailed analysis and findings of original field research, investigating how participants in regular organizational meetings, includinTable of ContentsList of Figures and Tables xv Foreword xvii Acknowledgments xxiii Introduction 1 PART ONE 7 1 The Nature of Knowledge 9 1.1 Knowledge: The Most Precious Asset and the Greatest Challenge 9 1.2 Why an Understanding of the Nature of Knowledge is Crucial 10 1.3 Ways of Defining Knowledge and the Rise of a Single Perspective 12 1.3.1 Knowledge: “Thing” or “Action”? 13 1.3.2 The Subjective versus Objective 14 1.3.3 Organizational versus Personal Knowledge 16 1.4 The Tacit–Explicit Conundrum 16 1.4.1 What Did Polanyi Really Say? 18 1.4.2 The Importance of Context: What Context and Whose Context? 19 1.4.3 A Preference for “Knowing” as Action 21 1.5 Frameworks of Meaning 22 1.6 A Hierarchy of Knowledge 23 1.7 Summary and Conclusions 24 Further Reading 25 2 The Constitution of Knowledge Management 27 2.1 Addressing Some Key Questions 27 2.2 The Origins of Knowledge Management 28 2.3 Multiple Perspectives and Limitless Boundaries 29 2.3.1 The Organization as a Body of Knowledge 30 2.3.2 Gulf between Practice and Academia 30 2.3.3 Knowledge Management from the Perspective of the Learning Organization 30 2.3.4 The Systemic Approach and Connections to Social Interaction 31 2.4 Is it a Passing Management Fad? 31 2.5 Technology as a Defining “Push Factor” 32 2.6 Should Knowledge be Managed? 34 2.7 Summary and Conclusions 35 Further Reading 36 3 Key Issues and Debates 37 3.1 Introduction 37 3.2 The Commodification and Reification of Knowledge 38 3.3 Determining Success or Failure 39 3.4 Measuring Knowledge Management Outcomes 41 3.5 Knowledge Management and Culture 42 3.6 Creating New Knowledge 43 3.7 Sharing Knowledge 45 3.8 Summary and Conclusions 48 Further Reading 50 4 Knowledge Management’s Theories 53 4.1 Finding Some New Directions 53 4.2 What Constitutes a Theory? 55 4.3 An Approach to Knowledge Management’s Theories: A Novel Taxonomy 56 4.4 The Personal versus Organizational Knowledge Question 60 4.5 The Personal versus Organizational Knowledge on the Social Action Axis 62 4.5.1 Personal Knowledge as the Unit of Analysis 62 4.5.2 Knowledge as Practice Contrasted with Knowledge as Possession 63 4.5.3 Connecting the “Organizational” with the “Personal”: Social, Situated, and Constructed 64 4.5.4 Knowledge, Activity Theory, and Activity Systems 65 4.5.5 The Phenomenological Perspective 66 4.5.6 “Know(ing) How” and “Know(ing) That” and Communities of Practice 67 4.5.7 Creative Abrasion 68 4.6 Reification of Knowledge: One Paradigm Dominates 69 4.6.1 “The Theory” and the Theorist as Bricoleur 69 4.6.2 Shuffling Ideas 71 4.6.3 Misinterpretation and Misrepresentation 71 4.6.4 More Troubling Observations on the Theory of the Knowledge]Creating Firm 73 4.7 Roundup of Some Other Perspectives in the “Knowledge as Object” Spectrum 74 4.8 The Issues Over the Inductionist Foundation of Theory 75 4.9 Summary and Conclusions 76 Further Reading 78 5 Social Constructionism and the Constructionist View of Knowledge 79 5.1 Introduction 79 5.2 Social Constructionism as a Way of Looking at the World 80 5.3 Simply Extending Existing Directions 81 5.4 The Social Constructionist View of Knowledge 83 5.5 The Debate Over Method 84 5.6 On Objectivity 86 5.7 Summary and Conclusions 87 Further Reading 88 6 Discourse as the Site of Knowledge Work 89 6.1 Introduction and the Turn to Talk 89 6.2 Introducing Discursive Psychology 91 6.2.1 Origins 91 6.2.2 Discursive Psychology’s Core Assumptions 91 6.2.3 Emerging Ideas 92 6.2.4 The Thorny Issue of Variation 93 6.3 Other Leading Paradigms in Discourse Analysis 94 6.3.1 Critical Discourse Analysis 94 6.3.2 Conversation Analysis 95 6.3.3 Membership Categorization Analysis 96 6.4 Topics of Study in Discourse Analysis 96 6.4.1 Discourse and Identity 97 6.4.2 Discourse and Gender 101 6.4.3 Discourse and Computer Mediated Communications 103 6.5 Sensemaking 107 6.6 Summary and Conclusions 109 Further Reading 110 7 The Implicit Formulation of Tacit Knowing and Resolving Matters of Relevance 113 7.1 Introduction: Questions and Connections 113 7.2 The Origins of the “Tacit Question” 115 7.3 The Values of Tacit Knowledge 117 7.4 A Disputed Phenomenon 118 7.5 Knowledge Management’s “Implicit Formulation” of Tacit Knowledge 119 7.6 The Implicit Learning Paradigm 120 7.6.1 The “Polanyi Connection” 121 7.6.2 The Challenge of Researching the Unspeakable: Research Paradigms in Implicit Learning 122 7.6.3 Unconscious and Natural 123 7.6.4 An Abstractionist Model 124 7.6.5 Automaticity and Influence 125 7.6.6 An Ancient Evolved System 126 7.6.7 Some Spanners in the Implicit Learning Theory Works 126 7.7 Comparing Knowledge Management’s Perspectives on the Tacit with the IL Formulation 128 7.8 Philosophy, Methodology, and Incommensurability 128 7.8.1 A Divergence of Approach 130 7.8.2 Reconciling Two Opposing Fields 131 7.9 Summary and Conclusions 132 Further Reading 134 8 Thematic Categories of Knowledge Sharing 135 8.1 Introduction 135 8.2 Identity 136 8.3 Trust 137 8.4 Risk 138 8.5 Context 139 8.6 A Final Problem to Resolve 140 8.7 Summary 141 Further Reading 141 9 The Case for Discourse as the Priority 143 9.1 Knowledge and Discourse Matters: Summarizing the Case 143 9.2 Changes in Direction? 146 9.3 Making it Work: Implications and Contributions 147 9.4 Conclusions 148 PART TWO 151 10 Introduction to Part Two 153 11 Methodology 155 11.1 Introduction 155 11.2 Locating the Present Study 156 11.3 A Brief Digress into the Positivist Account of Science 158 11.4 Research Method 159 11.4.1 An Explanation of the Method 159 11.4.2 Grounds for Criticism and the Issue of Measuring Quality 161 11.5 Research Design 163 11.5.1 Design 163 11.5.2 Research Data 168 11.5.3 Participants and Ethical Considerations 169 11.6 Points of Limitation 171 11.7 Summary and Indicative Research Questions 172 Further Reading 172 12 Trust as an Artifact of Knowledge Sharing 173 12.1 The Importance of Trust 173 12.2 Data 175 12.3 Casting the Characters and Setting the Scene for Action 176 12.4 Working up Trust Through Epistemic Superiority and Authenticity 178 12.4.1 Emerging Challenge 178 12.4.2 Competing Strategies for Conjuring Trust 180 12.4.3 Avoiding Direct Challenge by Reformulating the Problem 181 12.5 Risk and Competence as Contingent Factors to Trust 182 12.5.1 Calling on Witnesses to Work Up Persuasion 182 12.5.2 Two Competing Versions of the Same Witness Accounts 185 12.5.3 Issuing Challenges to Competency and Undermining Trust 185 12.6 Trust Breakdown Connects with Knowledge Sharing Breaches 186 12.6.1 Factual Accounting as a Warrant for Trust 186 12.6.2 A Breach in Knowledge Sharing Comes to the Fore 188 12.7 Knowledge, Trust, and Blame 189 12.7.1 Issuing the Call to Account 189 12.7.2 Managing Blame 191 12.7.3 Question over Competence or Simply not Sharing Knowledge? 191 12.8 Preliminary Reflections 193 Further Reading 194 13 Knowledge Sharing is a Risky Business 195 13.1 The Risky Business of Sharing Knowledge 195 13.2 Sequential and Rhetorical Organization: Group Norms and Reputation 196 13.3 High Stakes and Truth Telling 200 13.3.1 Stake and Authenticity 201 13.3.2 Authenticity and Challenge 202 13.3.3 Narrative and Consensus–Corroboration 206 13.4 Doing “Uber Authenticity” Through Vivid Narrative Accounting 209 13.4.1 Issuing a News Headline 209 13.4.2 Doing Being Ordinary 211 13.4.3 Whose Counting? Quantitative Accounting 213 13.5 Preliminary Reflections 214 Further Reading 216 14 Negotiating Positions of Authority 219 14.1 Knowledge Sharing Accomplished from a Subject Position 219 14.2 Context, Participants, and Expectations 221 14.3 Problems, Complexities, and Appeals to Common Sense 221 14.3.1 Invoking Positions of Authority 223 14.3.2 Formulating a Script for the Client 226 14.3.3 Influencing Effects of “the Script” 228 14.4 “Seasoned Exhibitionists” and Bombshells 229 14.4.1 Shifting the Position of Authority 230 14.4.2 Issuing a Bombshell and Working to Save Face 231 14.5 Preliminary Reflections 233 Further Reading 234 15 Building Identities as Expert in an Online Forum 235 15.1 Introduction 235 15.2 Data 235 15.3 The Trigger: More than a Request for Advice 236 15.4 Constructing “In]Groups” as Markers of Expert Status 237 15.5 Positioning and Group Membership 239 15.6 In]Group Rivalry 240 15.7 Consensus Patterns 242 15.8 Claims to Privileged Knowledge 243 15.8.1 Listing 244 15.8.2 Metaphors 244 15.9 Preliminary Reflections 245 Further Reading 246 16 On Matters of Context 247 16.1 The Importance of Contextual Particulars 247 16.2 Data 249 16.3 Shared Understanding 249 16.3.1 Displaying Knowing What’s on Others’ Minds 250 16.3.2 Gisting and Elaboration 252 16.4 Stance]Taking 255 16.4.1 Invoking the Context of Courtroom 255 16.4.2 Doing “them and us” 258 16.5 Doing Historicity 260 16.6 Preliminary Reflections 263 Postscript 264 Further Reading 264 17 Finding Meaning, Implications, and Future Directions 265 17.1 A Management Practice in Search of an Object 265 17.2 Finding Meaning 267 17.2.1 Constructing Live Issues and Concerns 267 17.2.2 Influencing Knowledge Sharing 271 17.2.3 The Corelational Nature of Invoked Concerns 274 17.2.4 A Tacit Accomplishment 276 17.3 Relating the Findings to Debates and Issues in Knowledge Management 278 17.3.1 The Central Concern of Knowledge Management with “How” and “What” 278 17.3.2 The “Relevance” Issue Concerning Discursive Psychology 279 17.3.3 A Theory of Language 280 17.3.4 A Different Conceptualization of Knowledge Sharing 280 17.3.5 A Different Approach to Core Issues in Knowledge Management 281 17.4 Future Directions 282 Appendix 285 Index to Glossary Terms 289 Bibliography 291 Subject Index 305
£86.36
John Wiley & Sons Inc Wearable Android
Book SynopsisSoftware Development/Mobile/Android/Wearable/Fitness Build Wearable Applications on the Android Wear and Google Fit Platforms This book covers wearable computing and wearable application development particularly for Android Wear (smartwatches) and Google Fit (fitness sensors). It provides relevant history, background and core concepts of wearable computing and ubiquitous computing, as a foundation for designing/developing applications for the Android Wear and Google Fit platforms. This book is intended for Android wearable enthusiasts, technologists and software developers. Gain insight into wearables in the modern consumer ecosystem of a multitude of devices, ubiquitous computing, cloud computing and intelligent personal assistants Learn the Android Wear and Google Fit APIs and jump-start hands-on development including: setting up an Android development environment suitable for Android Wear and Google Fit , setting up smartwatch and fitnesTable of ContentsAbout the Author xv About This Book xvii Acknowledgments xxiii Part I Wearable Computing: Introduction and Background 1 1 Wearables: Introduction 3 1.1 Wearable Computing 3 1.2 Wearable Computers and Technology 3 1.3 “Wearables” 4 1.4 The word: “Wearables” 4 1.5 Wearables and Smartphones 5 1.6 Wearable Light, Glanceable Interactions 5 1.7 Smartphone Dependency, Inconveniences 5 1.8 Wearable Interaction 6 1.9 User’s Real-world Context 6 1.10 Variety of Wearable Devices 6 1.10.1 Smart Watches 6 1.10.2 Fitness Sensors 7 1.10.3 Smart Jewelry 7 1.11 Android Wear and Google Fit 7 1.11.1 Device / Hardware Purchases 7 References and Further Reading 8 2 Wearable Computing Background and Theory 9 2.1 Wearable Computing History 9 2.1.1 Wearable Computing Pioneers 10 2.1.2 Academic Research at Various Universities 11 2.2 Internet of Things (IoT) and Wearables 11 2.2.1 Machine to Machine (M2M) 13 2.3 Wearables’ Mass Market Enablers 13 2.3.1 “ARM-ed” revolution 14 2.3.1.1 ARM alternatives 14 2.3.2 System on Chip (SoC) 14 2.3.3 Human Dependence on Computing 15 2.3.4 Smartphone extensions 15 2.3.5 Sensors 15 2.3.5.1 Micro-Electro-Mechanical Systems (MEMS) Sensors 16 2.4 Human–Computer Interface and Human–Computer Relationship 16 2.4.1 Human–Computer Interface: over the years 16 2.4.2 Human Computer Interaction (HCI): Demand and Suggest 17 2.4.2.1 Demand Paradigm 17 2.4.2.2 Suggest Paradigm 18 2.4.2.3 Demand or Suggest? 18 2.4.2.4 Demand and Suggest: A Healthy Balance 18 2.4.3 Evolution of the Human–Computer Relationship 18 2.5 A Multi-Device World 19 2.5.1 Spatial Scope of Computing: Devices near and Devices far 19 2.5.2 Body Area Network (BAN) 19 2.5.3 Personal Area Network (PAN) 20 2.5.4 Home Area Network (HAN) 21 2.5.5 Automobile Network 21 2.5.5.1 Controller Area Network (CAN) 21 2.5.6 Near-Me Area Network (NAN) 21 2.5.7 Campus Area Network 22 2.5.8 Metro Area Network 22 2.5.9 Wide Area Network 22 2.5.10 Internet 22 2.5.11 Interplanetary Network 23 2.6 Ubiquitous Computing 23 2.7 Collective, Synergistic Computing Value 23 2.7.1 Importance of the User Centricity and the User Context 23 2.7.2 Distributed Intelligent Personal Assistant 24 2.8 Bright and Cloudy: Cloud-based Intelligent Personal Agent 24 2.8.1 Google / Cloud-Based Intelligent Personal Agent 24 2.9 Leveraging Computer Vision 25 2.9.1 Enhanced Computer Vision / Subtle Change Amplification 25 2.10 IoT and Wearables: Unnatural and over the top? 26 2.10.1 Human History of Tool Use and Computation 27 2.10.2 Communication Networks in Nature 27 2.10.3 Consumption of Power: by computational systems, biological and artificial 28 2.11 Security and Privacy Issues 28 2.11.1 Use Awareness and complete end-to-end Transparency 29 2.11.2 User Control and Choice 30 2.11.3 User Access to Collected Data and Erasure capability 30 2.11.4 Device side, transit, and cloud side protection: Data Anonymization 30 2.11.5 Practical Considerations: User Centricity 30 2.11.5.1 OpenID 31 2.12 Miscellaneous 31 2.12.1 PhoneBloks: Waste Reduction 31 2.12.1.1 Project “Ara” 31 2.12.2 Google Cardboard: inexpensive Virtual Reality 32 References and Further Reading 32 Part II Foundation Android 35 3 Android Fundamentals / Hello Lollipop 37 3.1 Android: Introduction 37 3.2 Linux: “*nix” or Unix-like OS 38 3.2.1 Unix 38 3.2.2 Open Source 39 3.2.3 GNU / Free Software Foundation 39 3.2.3.1 Free as in Freedom: GNU Public License 40 3.2.4 Apache Software Foundation: Apache Software License 41 3.3 Linux: yesterday and today 41 3.4 Unix System Architecture 41 3.4.1 Unix Processes 42 3.4.1.1 Linux Processes 42 3.4.1.2 Android Processes 42 3.4.1.3 Process Tree 42 3.4.1.4 Unix Interprocess Communication (IPC) 43 3.4.1.5 Remote Procedure Calls (RPC) 44 3.4.2 Unix Kernel 44 3.4.2.1 Linux Kernel 44 3.5 Java 44 3.5.1 Java Origins 45 3.5.2 Java Platform: Language, JVM 45 3.5.3 Java memory: Heap, Stack, and native 45 3.5.4 Security Policy: Permissions 46 3.6 Apache Harmony 46 3.7 Android OS and platform 47 3.7.1 Android Kernel 47 3.7.2 Android Open Source Project (AOSP) 50 3.7.2.1 Android Framework 50 3.7.3 Android Development 50 3.7.3.1 Android SDK 51 3.7.3.2 Android NDK 51 3.7.4 Android Runtime Environment 51 3.7.4.1 Dalvik Virtual Machine 52 3.7.4.2 ART (Android Runtime) 52 3.7.4.3 Zygote 52 3.7.4.4 System Server: Android System Services 53 3.7.5 Android Interface Definition Language (AIDL) 53 3.8 Setting up your Android Development Environment 54 3.8.1 Installing Java SDK version 7 (JDK 1.7) from Sun Microsystems / Oracle 54 3.8.2 Installing Android SDK from Google 56 3.8.3 Installing Build Tools (gradle and ant) 63 3.8.4 Setting up environment variables (Java, Android SDK, gradle and ant) 63 3.8.5 Android (Lollipop) Development Device setup 64 3.8.5.1 Creating a new Android project (classic / ant) 65 3.8.5.2 Creating a new Android project (new / gradle) 71 3.8.6 Installing Android Studio “IDE” 72 3.8.7 Android Studio: Hello World App 76 3.8.8 Configuring Android Studio 81 3.9 Android “Classic” project tree and build system 82 3.10 Android “New” Build System 82 3.11 Managing Java Installations 83 3.11.1 Avoid sudo apt-get / rpm style installation 83 3.11.2 Maintain discrete Java JDK versions 83 3.11.3 Set JAVA_HOME in your .profile 84 3.11.4 Project-wise JAVA_HOME 84 3.11.5 IDE independent build 84 3.12 Managing Android SDK installation and updates 84 3.12.1 Update your Android SDK often 84 3.12.2 Target your App to the latest SDK / API level 85 3.12.3 Be sure to specify a minimum SDK / API level for your App 85 3.13 Code Samples: Android Lollipop 85 References and Further Reading 85 4 Android SDK 87 4.1 Software Components, in general 87 4.2 Android Application Development Model 88 4.2.1 DEX file format 88 4.2.2 APK file 88 4.2.3 Android Project Build Process 90 4.2.4 APK installation and execution 90 4.2.4.1 Application main thread / UI thread 91 4.3 Android SDK API 91 4.3.1 Android Application Manifest (AndroidManifest.xml) 92 4.3.2 Android API package Overview 92 4.4 Android’s Four Fundamental Components 93 4.4.1 Android Project Artifacts 94 4.5 Activity 94 4.5.1 Activity life cycle 96 4.6 Service 98 4.7 BroadcastReceiver 100 4.8 ContentProvider 100 4.9 Intent 101 4.9.1 Intent Action and Data 104 4.9.1.1 Intent Extras 104 4.9.1.2 Intent Flags 104 4.9.2 Explicit Intents 105 4.9.3 Implicit Intents 105 4.9.4 Intent Filter 105 4.9.5 Intent Resolution 106 4.9.6 Intent Use Cases 106 4.9.6.1 Starting Activities 106 4.9.6.2 Starting Services 106 4.9.6.3 Delivering Broadcasts 106 4.10 android package, sub-packages 107 4.11 dalvik package, sub-packages 107 4.12 java and javax package, sub-packages 108 4.13 org package, sub-packages 108 4.14 Sample code in this book 109 References and Further Reading 109 5 Android Device Discovery and Communication 111 5.1 Android Interconnectivity 111 5.2 Advertisement and Discovery 112 5.3 Bluetooth 112 5.3.1 Bluetooth Low Energy (LE) 112 5.3.2 Bluetooth Generic Attribute Profiles (GATT) 112 5.3.3 Android support for Bluetooth LE 113 5.4 Wi-Fi Peer-to-Peer (Wi-Fi Direct) 113 5.4.1 Android Wi-Fi Direct / P2P API 114 5.5 Zero Configuration Networking (zeroconf) 114 5.5.1 Android Network Service Discovery (NSD) 115 5.6 Near Field Communication (NFC) 115 5.7 Universal Serial Bus (USB) 116 5.7.1 USB On-The-Go (USB OTG) 116 References and Further Reading 116 Part III Android Wear Platform and SDK 119 6 Android Wear Platform 121 6.1 Android Wear 121 6.2 Android Wear Platform: Android Wear OS, Wear Devices, and Wear API 122 6.2.1 Android Wear OS 122 6.2.2 Android Wear Devices 122 6.2.3 Android Wear API and Wear Apps 123 6.3 Android Notifications and Android Wear 123 6.3.1 Android 5.0 (Lollipop) Notifications 124 6.4 Notification Settings and Control 126 6.4.1 Sound and Notification and Priority Notification 126 6.4.2 Notification Configuration and Control 129 6.4.3 Locked Screen and Notifications 131 6.4.3.1 Notification Access 134 6.4.4 Interruptions 135 6.5 App Notification Strategy 136 6.6 Google Now and Android Wear 137 6.7 Android Wear Devices: Getting Started 138 6.7.1 Android SDK Wear Platform updates 138 6.7.2 Procuring an Android Wear device 139 6.7.2.1 Using Android Emulator with Wear AVD 140 6.7.3 Pairing and Enabling Developer Mode 145 6.7.3.1 Unboxing your Wear device 145 6.7.3.2 Pairing your Handheld device with your Wear device 145 6.7.3.3 Enabling Developer Mode and Debugging Settings on your Wear device 150 6.7.3.4 Enabling Wear ADB Debugging and Debug over Bluetooth 153 6.8 Wear Debugging and Android SDK 155 6.8.1 Wear Debugging via USB 155 6.8.2 Wear Debugging via Bluetooth 158 6.9 Peeking under the hood of your Wear Device 161 6.10 Engaging your Android Wear device via Notifications 163 6.10.1 Engaging Android Wear via Notification Sync 163 6.10.2 Wear Extended Notifications 163 6.11 Android Wear Targeted Apps 165 6.12 Hello Wear World: Writing our first Wear App 165 References and Further Reading 168 7 Android Wear API 169 7.1 Google Services and Google Play Services 169 7.1.1 GoogleApiClient class 171 7.2 Android Wear Network 173 7.3 Android Wear API, in depth 173 7.3.1 Wear API: wearable package 174 7.3.1.1 Node interface 174 7.3.1.2 WearableListenerService 174 7.3.1.3 DataEvent 175 7.3.1.4 MessageEvent 175 7.3.2 Wearable class 176 7.3.3 NodeApi 177 7.3.4 DataApi 177 7.4 DataItem, DataMapItem, and DataMap 178 7.4.1 DataItem 178 7.4.2 DataMapItem 180 7.4.3 DataMap 180 7.5 PutDataRequest and PutDataMapRequest 180 7.5.1 PutDataRequest 180 7.5.2 PutDataMapRequest 180 7.6 Asset and DataItemAsset 182 7.6.1 Asset class 182 7.6.2 DataItemAsset interface 182 7.7 MessageApi 183 7.8 Wearable UI Library 184 7.9 Wear Interaction Design 185 7.10 Accessing Sensors 186 7.11 Production Wear Apps 187 References and Further Reading 187 Part IV Google Fit Platform and SDK 189 8 Google Fit Platform 191 8.1 Google Fit Platform Overview 191 8.2 Google Fit Core Concepts 192 8.3 Fit Data Types 192 8.4 Fit Data Store (Storage) 193 8.5 Sensors 193 8.6 Permissions, User Consent 194 8.6.1 Permission Groups, Fitness Scopes 194 8.6.1.1 Activity Scope 194 8.6.1.2 Body Scope 194 8.6.1.3 Location Scope 194 8.7 Google Fit: Developer Responsibilities 195 8.7.1 Developer Terms and Conditions 195 8.7.2 Developer Branding Guidelines 195 8.8 Procuring Sensor Peripherals 195 8.9 Hello Fit: hands-on example 195 8.9.1 Google Play Services library project, dependency 196 8.9.2 Using the SHA1 fingerprint of the keystore 198 8.9.3 Google Developer’s Console Activating Fit API 200 8.9.4 Creating the Android App 202 8.10 Google’s Fit App 211 8.11 Google Settings App 211 References and Further Reading 212 9 Google Fit API 213 9.1 Google Fit API 213 9.2 Google fit main package (com.google.android.gms.fitness) 213 9.2.1 Fitness class 214 9.2.2 FitnessActivities class 216 9.2.3 FitnessStatusCodes class 216 9.2.4 BleApi interface 217 9.2.5 SensorsApi 218 9.2.6 RecordingApi 219 9.2.7 SessionsApi 220 9.2.8 HistoryApi 221 9.2.9 ConfigApi 222 9.3 data sub-package 223 9.3.1 Device 223 9.3.2 BleDevice 223 9.3.3 DataSource 224 9.3.4 DataType 225 9.3.5 DataPoint 225 9.3.6 Field 227 9.3.7 Value 228 9.3.8 Subscription 228 9.3.9 DataSet 229 9.3.10 Session 230 9.3.11 Bucket 230 9.4 request sub-package 231 9.4.1 StartBleScanRequest 232 9.4.2 BleScanCallback 233 9.4.3 SensorRequest 233 9.4.4 DataSourcesRequest 233 9.4.5 OnDataPointListener 234 9.4.6 DataReadRequest 234 9.4.7 DataDeleteRequest 235 9.4.8 SessionInsertRequest 236 9.4.9 SessionReadRequest 236 9.4.10 DataTypeCreateRequest 236 9.5 result sub-package 236 9.5.1 BleDevicesResult 237 9.5.2 DataSourcesResult 238 9.5.3 ListSubscriptionsResult 238 9.5.4 DataReadResult 238 9.5.5 SessionReadResult 239 9.5.6 SessionStopResult 239 9.5.7 DataTypeResult 239 9.6 service sub-package 240 9.6.1 FitnessSensorService 242 9.6.2 FitnessSensorServiceRequest 242 9.6.3 SensorEventDispatcher interface 243 References and Further Reading 243 Part V Real-World Applications 245 10 Real-World Applications 247 10.1 Real-World Applications 247 10.2 Handheld Application Extension 247 10.3 Home Automation 247 10.3.1 Home Entertainment 248 10.3.2 Gaming 248 10.4 Wearables at the Workplace 248 10.5 Fitness, Health, and Medical 248 10.5.1 Predictive and Proactive Consumer Health 249 10.5.2 Wearables for Medical Professionals 249 10.5.3 Wearables and Remote Medical Diagnostics 249 10.6 Industrial Manufacturing 250 10.7 Civic, Government, and Democracy 250 References and Further Reading 250 Index 251
£51.26
John Wiley & Sons Inc Practical Microcontroller Engineering with ARM
Book SynopsisThe first microcontroller textbook to provide complete and systemic introductions to all components and materials related to the ARM Cortex-M4 microcontroller system, including hardware and software as well as practical applications with real examples.This book covers both the fundamentals, as well as practical techniques in designing and building microcontrollers in industrial and commercial applications. Examples included in this book have been compiled, built, and tested Includes Both ARM assembly and C codes Direct Register Access (DRA) model and the Software Driver (SD) model programming techniques and discussed If you are an instructor and adopted this book for your course, please email ieeeproposals@wiley.com to get access to theinstructor files for this book.Table of ContentsPreface xxix Acknowledgments xxxi Trademarks and Copyrights xxxiii Copyright Permissions xxxv About the Companion Website xxxix Chapter 1 Introduction to Microcontrollers and This Book 1 1.1 Microcontroller Configuration and Structure 2 1.2 The ARM® Cortex®M4 Microcontroller System 3 1.3 The TM4C123GH6PM Microcontroller Development Tools and Kits 4 1.4 Outstanding Features About This Book 5 1.5 Who This Book Is For 5 1.6 What This Book Covers 6 1.7 How This Book Is Organized and How to Use This Book 8 1.8 How to Use the Source Code and Sample Projects 9 1.9 Instructors and Customers Supports 11 Chapter 2 ARM® Microcontroller Architectures 13 2.1 Overview and Introduction 13 2.2 Introduction to ARM® Cortex®-M4 MCU 15 2.2.1 The Architecture of ARM® Cortex®-M4 MCU 17 2.3 The Memory Architecture 27 2.3.1 The Memory Map 28 2.3.2 The Stack Memory 29 2.3.3 The Program Models and States 32 2.3.4 The Memory Protection Unit (MPU) 33 2.4 The Nested Vectored Interrupt Controller (NVIC) Architecture 34 2.4.1 The Nested Vectored Interrupt Controller (NVIC) Features 35 2.4.2 Exception and Interrupt Sources 35 2.4.3 Exception Priority Levels and Mask Registers 35 2.4.4 Respond and Process Exceptions and Interrupts 36 2.4.5 Exception and Interrupt Vector Table 37 2.5 The Debug Architecture 37 2.6 Introduction to TivaTM C Series ARM® Cortex®-M4 MCU-TM4C123GH6PM 38 2.6.1 TM4C123GH6PM Microcontroller Overview 39 2.6.2 TM4C123GH6PM Microcontroller On-Chip Memory Map 40 2.6.3 TM4C123GH6PM Microcontroller General-Purpose Input–Output (GPIO) Module 44 2.6.4 TM4C123GH6PM Microcontroller System Controls 57 2.7 Introduction to TivaTM C Series LaunchPadTM TM4C123GXL Evaluation Board 72 2.8 Introduction to EduBASE ARM® Trainer 77 2.9 Chapter Summary 77 Homework 79 Chapter 3 ARM® Microcontroller Development Kits 83 3.1 Overview and Introduction 83 3.2 The Entire TivaTM TM4C123G-based Development System 84 3.3 Download and Install Development Suite and Specified Firmware 86 3.4 Introduction to the Integrated Development Environment—Keil® MDK μVersion5 87 3.4.1 The Keil® MDK-ARM® for the MDK-Cortex-M Family 88 3.4.2 General Development Flow with MDK-ARM® 89 3.4.3 Warming Up Keil® MDK Cortex-M Kit with Example Projects 91 3.4.4 The Functions of the Keil® MDK-ARM® μVersion®5 GUI 95 3.5 Embedded Software Development Procedure 127 3.6 The Keil® ARM® -MDK μVision5 Debugger and Debug Process 128 3.6.1 The ARM® μVision5 Debug Architecture 129 3.6.2 The ARM® Debug Adaptor and Debug Adaptor Driver 130 3.6.3 TivaTMCSeries LaunchPadTM Debug Adaptor and Debug Adaptor Driver 132 3.6.4 The ARM® μVersion5 Debug Process 133 3.6.5 The ARM® Trace Feature 134 3.6.6 The ARM® Instruction Set Simulator 136 3.6.7 The ARM® Programs Running from SRAM 137 3.6.8 ARM® Optimizations 139 3.7 The TivaWareTM for C Series Software Suite 140 3.7.1 The TivaWareTM C Series Software Package 142 3.7.2 TivaWareTM C Series for TM4C123G LaunchPadTM Evaluation Kit 145 3.8 The TivaWareTM for C Series Utilities and Other Supports 147 3.8.1 Additional Utilities Provided by TivaWareTM for C Series 148 3.9 Program Examples 151 3.10 Chapter Summary 152 Homework 152 Chapter 4 ARM® Microcontroller Software and Instruction Set 155 4.1 Overview and Introduction 155 4.2 Introduction to ARM® Cortex® -M4 Software Development Structure 156 4.3 Introduction to ARM® Cortex® -M4 Assembly Instruction Set 157 4.3.1 The ARM®Cortex®-M4 Assembly Language Syntax 158 4.3.2 The ARM® Cortex®-M4 Pseudo Instructions 160 4.3.3 The ARM® Cortex®-M4 Addressing Modes 161 4.3.4 The ARM® Cortex®-M4 Instruction Set Categories 172 4.4 ARM® Cortex®-M4 Software Development Procedures 196 4.5 Using C Language to Develop ARM® Cortex®-M4 Microcontroller Applications 197 4.5.1 The Standard Data Types Used in Intrinsic Functions 198 4.5.2 The CMSIS-Core-Specific Intrinsic Functions 200 4.5.3 The Keil® ARM® Compiler-Specific Intrinsic Functions 202 4.5.4 Inline Assembler 204 4.5.5 Idiom Recognition 205 4.5.6 C Programming Development Guideline and Procedure 206 4.5.7 The TivaWareTM Peripheral Driver Library 213 4.6 Chapter Summary 243 Homework 244 Chapter 5 ARM® Microcontroller Interrupts and Exceptions 261 5.1 Overview and Introduction 261 5.2 Exceptions and Interrupts in the ARM® Cortex®-M4 MCU System 263 5.2.1 Exception and Interrupt Types 265 5.2.2 Exceptions and Interrupts Management 265 5.2.3 Exception and Interrupt Processing 268 5.3 Exceptions and Interrupts in the TM4C123GH6PM Microcontroller System 273 5.3.1 Local Interrupt Configurations and Controls for GPIO Pins 273 5.3.2 Local Interrupt Configurations and Controls for GPIO Ports 276 5.3.3 Global Interrupt Configurations and Controls 281 5.3.4 The Vector Table and Vectors Used in the TM4C123GH6PM MCU 282 5.3.5 The GPIO Interrupt Handling and Processing Procedure 284 5.4 Developing GPIO Port Interrupt Projects to Handle GPIO Interrupts 285 5.4.1 Two Software Packages Used in the TM4C123GH6PM MCU System 286 5.4.2 Using DRA Programming Model to Handle GPIO Interrupts 290 5.4.3 Using CMSIS Core Macros for NVIC Registers to Handle GPIO Interrupts 294 5.4.4 Using TivaWareTM Peripheral Driver Library API Functions to Handle GPIO Interrupts 306 5.4.5 Using CMSIS Core Access Functions to Handle GPIO Interrupts 313 5.5 Comparison Among Four Interrupt Programming Methods 317 5.6 Chapter Summary 318 Homework 319 Chapter 6 ARM® Microcontroller Memory System 333 6.1 Overview and Introduction 333 6.2 Memory Architecture in the TM4C123GH6PM MCU System 334 6.2.1 Static Random Access Memory (SRAM) 336 6.2.2 Flash Memory 336 6.2.3 Flash Memory Protection Control 349 6.2.4 Internal Read-Only Memory (ROM) 351 6.2.5 Electrical Erased Programmable Read-Only Memory (EEPROM) 354 6.3 Memory Map in TM4C123GH6PM MCU System 361 6.4 Bit-Band Operations 362 6.4.1 The Mapping Relationship Between the Bit-Band Region and the Bit-Band Alias Region 365 6.4.2 The Advantages of Using the Bit-Band Operations 365 6.4.3 An Illustration Example of Using Bit-Band Alias Addresses 367 6.4.4 Bit-Band Operations for Different Data Sizes 369 6.4.5 Bit-Band Operations Built in C Programs 369 6.5 Memory Requirements and Memory Properties 370 6.5.1 Memory Requirements 371 6.5.2 Memory Access Attributes 372 6.5.3 Memory Endianness 373 6.6 Memory System Programming Methods 375 6.6.1 The API Functions Used for Flash Memory Programming 376 6.6.2 The API Functions Used for EEPROM Programming 378 6.7 Memory System Programming Projects 380 6.7.1 Flash Memory Programming 380 6.7.2 EEPROM Programming 401 6.7.3 Three Kinds of System Header Files in the TM4C123GH6PM MCU System 405 6.7.4 Build Example EEPROM Programming Projects 408 6.8 Chapter Summary 420 Homework 421 Chapter 7 ARM® Cortex®-M4 Parallel I/O Ports Programming 433 7.1 Overview and Introduction 433 7.2 GPIO Module Architecture and GPIO Port Configuration 434 7.3 GPIO Port Control Registers 437 7.3.1 GPIO Port Initialization and Configuration 438 7.4 On-Board Keypad Interface Programming Project 440 7.4.1 The Keypad Interfacing Programming Structure 441 7.4.2 Create the Keypad Interfacing Programming Project (Polling-Driven) 442 7.4.3 Set Up the Environment to Build and Run the Project 446 7.5 Analog-to-Digital Converter Programming Project 446 7.5.1 ADC Modules in the TM4C123GH6PM MCU System 446 7.5.2 ADC Module Architecture and Functional Block Diagram 447 7.5.3 ADC Module Components and Signal Descriptions 448 7.5.4 Analog-to-Digital Converter 470 7.5.5 Initialization and Configuration 473 7.5.6 Build the Analog-to-Digital Converter Programming Project 475 7.5.7 ADC Module API Functions Provided in the TivaWareTM Peripheral Driver Library 480 7.6 PWM-Controlled DC and Step Motors Programming Project 486 7.6.1 The PWM Principle and Implementations 487 7.6.2 PWM Modules in the TM4C123GH6PM MCU System 487 7.6.3 PWM Generator Functional Block Diagram 490 7.6.4 PWM Module Architecture and Functional Block Diagram 502 7.6.5 PWM Module Components and Signal Descriptions 509 7.6.6 PWM Module Initialization and Configuration 513 7.6.7 PWM Module Architecture in the EduBASE ARM® Trainer 515 7.6.8 Build an Example PWM Programming Project 516 7.7 The PWM API Functions in the TivaWareTM Peripheral Driver Library 521 7.7.1 PWM Modules and Generators Configuration and Set Up Control Functions 521 7.7.2 PWM Output Control Functions 523 7.7.3 PWM Interrupt and Fault Control Functions 523 7.8 Chapter Summary 525 Homework 527 Chapter 8 ARM® Cortex®-M4 Serial I/O Ports Programming 547 8.1 Overview and Introduction 547 8.2 GPIO Module Architecture and GPIO Port Configuration 548 8.3 Synchronous Serial Interface (SSI) 551 8.3.1 Asynchronous and Synchronous Communication Protocols and Data Framing 552 8.3.2 Synchronous Serial Interface Architecture and Functional Block Diagram 555 8.3.3 The Synchronous Data Transmission Format and Frame 556 8.3.4 SSI Module Components and Signal Descriptions 560 8.3.5 Build the On-Board LCD Interface Programming Project 572 8.3.6 Build On-Board 7-Segment LED Interface Programming Project 589 8.3.7 Build Digital-to-Analog Converter Programming Project 595 8.3.8 SSI API Functions Provided by TivaWareTM Peripheral Driver Library 604 8.4 Inter-Integrated Circuit (I2C) Interface 611 8.4.1 I2C Module Bus Configuration and Operational Status 612 8.4.2 I2C Module Architecture and Functional Block Diagram 613 8.4.3 I2C Module Data Transfer Format and Frame 614 8.4.4 I2C Module Operational Sequence 614 8.4.5 I2C Module Major Operational Components and Control Signals 618 8.4.6 I2C Module Running Speeds (Clock Rates) and Interrupts 620 8.4.7 I2C Interface Control Signals and GPIO I2C Control Registers 622 8.4.8 I2C Module Control Registers and Their Functions 623 8.4.9 I2C Module Initializations and Configurations 630 8.4.10 Build an Example I2C Module Project 631 8.4.10.1 The BQ32000 Real Time Clock (RTC) 631 8.4.10.2 The Interface Between the BQ32000 and EduBASE ARM® Trainer 633 8.4.10.3 Create a DRA Model I2C Project DRAI2C 634 8.4.10.4 Create the Source File DRAI2C 634 8.4.10.5 Set Up the Environment to Build and Run the Project 638 8.4.11 I2C API Functions Provided by TivaWareTM Peripheral Driver Library 639 8.4.11.1 Master Operations 639 8.4.11.2 I2C Module Status and Initialization API Functions 640 8.4.11.3 I2C Module Sending and Receiving Data API Functions 641 8.5 Universal Asynchronous Receivers/Transmitters (UARTs) 642 8.5.1 Asynchronous Serial Communication Protocols and Data Framing 642 8.5.2 Asynchronous Serial Interface Architecture and Functional Block Diagram 643 8.5.3 UART Module Operations and Control Registers 645 8.5.4 UART Module Control Signals and Related GPIO Pins 658 8.5.5 UART Module Initializations and Configurations 659 8.5.6 Build an Example UART Module Project 660 8.5.7 The UART API Functions Provided by the TivaWareTM Peripheral Driver Library 664 8.6 Chapter Summary 668 Homework 669 Chapter 9 ARM® Cortex®-M4 Timer and USB Programming 691 9.1 Overview and Introduction 691 9.2 General-Purpose Timers 692 9.2.1 The GPTM Architecture and Functional Block Diagram 693 9.2.2 The General-Purpose Timer Module Components 694 9.2.3 The General-Purpose Timer Module Operational Modes 695 9.2.4 The General-Purpose Timer Module Registers 704 9.2.5 The General-Purpose Timer Module GPIO-Related Control Signals 712 9.2.6 The General-Purpose Timer Module Initializations and Configurations 713 9.2.7 Build an Example General Purpose Timer Project 717 9.2.8 Popular Implementations on GPTM Modules 718 9.2.9 The API Functions Used for General-Purpose Timer Module 727 9.3 Watchdog Timers 732 9.3.1 The Watchdog Timer Architecture and Functional Block Diagram 734 9.3.2 The Watchdog Timer Operational Sequence and Timing Access 735 9.3.3 The Watchdog Timer Registers 735 9.3.4 The Watchdog Timer Module Initializations and Configurations 738 9.3.5 Build an Example Watchdog Timer Project 739 9.3.6 The API Functions Used for Watchdog Timer Modules 739 9.4 Universal Serial Bus (USB) Controller 743 9.4.1 The Hardware Configuration of the USB Devices 744 9.4.2 The USB Components and Operational Sequence 745 9.4.3 The Serial Interface Protocol of the USB Communications 747 9.4.4 The USB Interface Used in the Embedded System 748 9.4.5 The USB in the TM4C123GH6PM MCU System 749 9.4.6 The USB Registers 761 9.4.7 The USB Initializations and Configurations 774 9.4.8 A USB Implementation Example Project 775 9.4.9 The USB API Functions Provided by the TivaWareTM Peripheral Driver Library 780 9.4.10 Build a USB Implementation Example Project Using the API Functions 788 9.5 Chapter Summary 788 Homework 790 Chapter 10 ARM® Cortex®-M4 Other Peripherals Programming 805 10.1 Overview and Introduction 805 10.2 The Controller Area Network (CAN) 805 10.2.1 CAN Standard Frame 806 10.2.2 CAN Extended Frame 807 10.2.3 Detecting and Signaling Errors 808 10.2.4 The CAN Functional Block Diagram in the TM4C123GH6PM System 809 10.2.5 The CAN Components and Operational Procedures 810 10.2.6 The CAN Module Registers 823 10.2.7 The CAN Module Interfacing and External Control Signals 833 10.2.8 The CAN API Functions Provided by TivaWareTM Peripheral Driver Library 834 10.2.9 A CAN Module Implementation Example Project 838 10.3 The Quadrature Encoder Interface (QEI) 847 10.3.1 Introduction to Quadrature Encoder 847 10.3.2 The Working Principle of the Increment Rotary Encoder 849 10.3.3 The Increment Rotary Encoder Applied in the Closed-Loop Control System 850 10.3.4 The Increment Rotary Encoder Applied in the TM4C123GH6PM MCU System 851 10.3.5 The QEI Module Registers 852 10.3.6 The QEI Interfacing Signals and Related GPIO Pins 856 10.3.7 The QEI Initialization and Configuration Process 856 10.3.8 QEI API Functions Provided by the TivaWareTM Peripheral Driver Library 857 10.3.9 An Implementation of Using Rotary Encoder for a Closed-Loop Control System 860 10.4 The Continuous and Discrete PID Closed-Loop Control System 871 10.4.1 Identify the Dynamic Model for the Motor Plant 873 10.4.2 Design the PID Controller Using the MATLAB®Control System ToolboxTM 878 10.4.3 Simulate the PID Control System Using the MATLAB® SIMULINK® 881 10.4.4 Build the Control Software to Implement the PID Controller 883 10.5 The Fuzzy Logic Closed-Loop Control System 887 10.5.1 The Fuzzification Process 887 10.5.2 Design of Control Rules 889 10.5.3 The Defuzzification Process 889 10.5.4 Apply the Fuzzy Logic Controller to the DC Motor Control System 891 10.5.5 Build the Fuzzy Logic Control Project Fuzzy-Control 894 10.6 The Analog Comparators 899 10.6.1 The Analog Comparator Architecture and Functional Block Diagram 899 10.6.2 The Control Registers Used in the Analog Comparator Modules 899 10.6.3 The Voltage Reference Registers Used in the Analog Comparator Modules 900 10.6.4 The Interrupt Processing Registers Used in the Analog Comparator Modules 903 10.6.5 The Input and Output Control Signals Used in the Analog Comparators 903 10.6.6 The Initialization and Configuration Process for the Analog Comparator 904 10.6.7 Build a Project to Test the Functions of the Analog Comparator Module 904 10.6.8 Set Up the Environments to Build and Run the Project 907 10.7 Chapter Summary 908 Homework 909 Chapter 11 ARM® Floating Point Unit (FPU) 927 11.1 Overview and Introduction 927 11.2 Three Types of the Floating-Point Data 928 11.2.1 The Half-Precision Floating-Point Data 928 11.2.2 The Single-Precision Floating-Point Data 930 11.2.3 The Double-Precision Floating-Point Data 932 11.3 The FPU in the Cortex®-M4 MCU 934 11.3.1 The Architecture of the Floating-Point Registers 934 11.3.2 The FPU Operational Modes 937 11.4 Implementing the Floating-Point Unit 938 11.4.1 Floating-Point Support in CMSIS-Core 938 11.4.2 Floating-Point Programming in the TM4C123GH6PM MCU System 939 11.4.3 An FPU Example Project Using the Direct Register Access Model 942 11.5 Chapter Summary 946 Homework 946 Chapter 12 ARM® Memory Protection Unit (MPU) 951 12.1 Overview and Introduction 951 12.2 Implementation of the MPU 952 12.2.1 Memory Regions, Types, and Attributes 953 12.2.2 MPU Configuration and Control Registers 953 12.3 Initialization and Configuration of the MPU 959 12.4 Building A Practical Example MPU Project 960 12.4.1 Create a New DRA Model MPU Project DRAMPU 960 12.4.2 Set Up the Environment to Build and Run the Project 963 12.5 The API Functions Provided by the TivaWareTM Peripheral Driver Library 964 12.5.1 The MPU Set Up and Status API Functions 965 12.5.2 The MPU Enable and Disable API Functions 967 12.5.3 The MPU Interrupt Handler Control API Functions 968 12.6 Chapter Summary 969 Homework 970 Index 975 About the Author 987
£81.86
John Wiley & Sons Inc Beginning Visual Basic 2015
Book SynopsisLearn Visual Basic step by step and start programming right away Beginning Visual Basic 2015 is the ideal guide for new programmers, especially those learning their first language. This new edition has been updated to align with Visual Studio 2015, and also refocused to concentrate on key beginner topics.Table of ContentsINTRODUCTION xxvii CHAPTER 1: WELCOME TO VISUAL BASIC 2015 1 Implementing Event-Driven Programming 2 Installing Visual Basic 2015 3 The Visual Studio 2015 IDE 5 The Profi le Setup Page 5 The Menu 6 The Toolbars 8 Creating a Simple Application 9 Windows in the Visual Studio 2015 IDE 10 Modifi ed Hungarian Notation 17 The Code Editor 18 Using the Help System 22 Summary 23 CHAPTER 2: THE MICROSOFT .NET FRAMEWORK 25 The .NET Vision 25 This Sounds Like Java 26 Where Now? 27 Writing Software for Windows 27 The .NET Framework Classes 28 Executing Code 30 Common Language Runtime 31 Code Loading and Execution 31 Application Isolation 31 Security 32 Interoperability 33 Exception Handling 33 The Common Type System and Common Language Specification 33 Summary 34 CHAPTER 3: WRITING SOFTWARE 37 Information and Data 37 Algorithms 38 What Is a Programming Language? 39 Working with Variables 40 Comments and Whitespace 43 Comments 43 Whitespace 45 Data Types 45 Working with Numbers 45 Common Integer Math Operations 46 Integer Math Shorthand 49 The Problem with Integer Math 50 Floating-Point Math 50 Working with Strings 53 Using Dates 62 Boolean 69 Storing Variables 69 Binary 69 Bits and Bytes 70 Representing Values 70 Converting Values 72 Methods 74 Why Use Methods? 74 Methods You’ve Already Seen 75 Building a Method 78 Choosing Method Names 81 Scope 82 Summary 84 CHAPTER 4: CONTROLLING THE FLOW 87 Making Decisions 87 The If Statement 88 The Else Statement 90 Allowing Multiple Alternatives with ElseIf 90 Nested If Statements 92 Single-Line If Statement 92 Comparison Operators 92 String Comparison 101 Select Case 102 Case-Insensitive Select Case 106 Multiple Selections 108 The Case Else Statement 109 Different Data Types with Select Case 110 Loops 110 The For...Next Loop 110 The Do...Loop Loops 116 Nested Loops 120 Quitting Early 121 Quitting Do...Loops 123 Infinite Loops 124 Summary 125 CHAPTER 5: WORKING WITH DATA STRUCTURES 127 Understanding Arrays 128 Defining and Using Arrays 128 Using For Each...Next 131 Passing Arrays as Parameters 133 Sorting Arrays 136 Going Backward 137 Initializing Arrays with Values 138 Understanding Enumerations 139 Using Enumerations 140 Determining the State 143 Setting Invalid Values 146 Understanding Constants 146 Using Constants 146 Different Constant Types 148 Structures 148 Building Structures 149 Adding Properties to Structures 152 Working with ArrayLists 153 Using an ArrayList 153 Deleting from an ArrayList 158 Showing Items in the ArrayList 161 Working with Collections 162 Creating CustomerCollection 163 Adding an Item Property 164 Building Lookup Tables with Hashtable 166 Using Hashtables 166 Cleaning Up: Remove, RemoveAt, and Clear 169 Case Sensitivity 172 Advanced Array Manipulation 173 Dynamic Arrays 173 Using Preserve 175 Summary 176 CHAPTER 6: BUILDING WINDOWS APPLICATIONS 179 Responding to Events 180 Counting Characters 184 Counting Words 188 Creating More Complex Applications 191 Creating the Toolbar 192 Creating the Status Bar 195 Creating an Edit Box 196 Clearing the Edit Box 197 Responding to Toolbar Buttons 199 Using Multiple Forms 202 About Dialog 202 Summary 206 CHAPTER 7: DISPLAYING DIALOGS 209 The MessageBox 210 Available Icons for MessageBox 210 Available Buttons for MessageBox 211 Setting the Default Button 211 Miscellaneous Options 212 The Show Method Syntax 212 Example Message Boxes 214 The OpenFileDialog Control 218 The OpenFileDialog Control 218 The Properties of OpenFileDialog 218 OpenFileDialog Methods 220 Using the OpenFileDialog Control 221 The SaveDialog Control 226 The Properties of SaveFileDialog 226 SaveFileDialog Methods 227 Using the SaveFileDialog Control 227 The FontDialog Control 231 The Properties of FontDialog 231 The Methods of FontDialog 232 Using the FontDialog Control 232 The ColorDialog Control 235 The Properties of ColorDialog 236 Using the ColorDialog Control 237 The PrintDialog Control 238 The Properties of PrintDialog 239 Using the PrintDialog Control 240 The PrintDocument Class 240 The Properties of the PrintDocument Class 240 Printing a Document 241 The FolderBrowserDialog Control 248 The Properties of FolderBrowserDialog 248 Using the FolderBrowserDialog Control 249 Summary 252 CHAPTER 8: CREATING MENUS 255 Understanding Menu Features 255 Images 256 Access Keys 256 Shortcut Keys 256 Check Marks 256 The Properties Window 257 Creating Menus 259 Designing the Menus 259 Adding Toolbars and Controls 261 Coding Menus 263 Coding the View Menu and Toolbars 267 Testing Your Code 269 Context Menus 272 Creating Context Menus 272 Enabling and Disabling Menu Items and Toolbar Buttons 275 Summary 279 CHAPTER 9: DEBUGGING AND ERROR HANDLING 283 Major Error Types 284 Syntax Errors 284 Execution Errors 288 Logic Errors 288 Debugging 289 Creating a Sample Project 289 Setting Breakpoints 306 Debugging Using the Watch Window and QuickWatch Dialog Box 313 Debugging with the Autos Window 316 Debugging with the Locals Window 316 Error Handling 318 Using Structured Error Handling 319 Summary 321 CHAPTER 10: BUILDING OBJECTS 325 Understanding Objects 326 Encapsulation 327 Methods and Properties 327 Events 328 Visibility 328 What Is a Class? 329 Building Classes 330 Reusability 330 Designing an Object 332 State 332 Behavior 333 Storing State 333 Real Properties 336 Read/Write Properties 339 Auto-Implemented Properties 342 The IsMoving Method 343 Constructors 345 Inheritance 346 Adding New Methods and Properties 348 Adding a GetPowerToWeightRatio Method 350 Changing Defaults 352 Polymorphism: Scary Word, Simple Concept 354 Overriding More Methods 354 Inheriting from the Object Class 356 Objects and Structures 357 The Framework Classes 357 Namespaces 358 The Imports Statement 360 Creating Your Own Namespace 361 Inheritance in the .NET Framework 364 Summary 365 CHAPTER 11: ADVANCED OBJECT-ORIENTED TECHNIQUES 367 Building a Favorites Viewer 368 Internet Shortcuts and Favorites 368 Using Classes 371 Scanning Favorites 377 Viewing Favorites 384 An Alternative Favorite Viewer 386 Building a Favorites Tray 387 Displaying Favorites 388 Using Shared Properties and Methods 392 Using Shared Properties 392 Using Shared Methods 397 Understanding Object-Oriented Programming and Memory Management 398 Garbage Collection 400 Releasing Resources 400 Defragmentation and Compaction 401 Summary 402 CHAPTER 12: ACCESSING DATA USING STRUCTURED QUERY LANGUAGE 405 What You Need to Complete This Chapter’s Exercises 406 What Is a Database? 407 Database Tables 407 Primary and Foreign Keys 413 Queries 415 Understanding Basic SQL Syntax 415 Using SELECT Statement 416 Using the JOIN Statement 417 Using the UPDATE Statement 419 Using the DELETE Statement 419 Using the INSERT Statement 420 Using the SQL Comment 421 Executing Queries in SQL Server 421 Summary 425 CHAPTER 13: DATABASE PROGRAMMING WITH SQL SERVER AND ADO.NET 427 ADO.NET 428 ADO.NET Data Namespaces 428 The SqlConnection Class 429 Working with the Connection String Parameters 430 Opening and Closing the Connection 431 The SqlCommand Class 431 The SqlDataAdapter Class 434 The DataSet Class 438 DataView 438 The ADO.NET Classes in Action 440 Data Binding 450 BindingContext and CurrencyManager 450 Binding Controls 451 Binding Examples 452 Summary 480 CHAPTER 14: ASP.NET 483 Thin]Client Architecture 484 Web Forms versus Windows Forms 485 Windows Forms Advantages 485 Web Forms Advantages 485 Web Applications: The Basic Pieces 486 Web Servers 486 Browsers 486 HyperText Markup Language 487 JavaScript 487 Cascading Style Sheets 487 Active Server Pages 488 Benefits of ASP.NET Web Pages 488 Special Website Files 488 Development 489 Controls: The Toolbox 489 Building Websites 490 Creating a Web Form for Client] and Server]Side Processing 490 Website Locations with VS 2015 495 Performing Data Entry and Validation 498 Using the GridView to Build a Data]Driven Web Form 507 Summary 512 CHAPTER 15: DEPLOYING YOUR APPLICATION 515 What Is Deployment? 516 ClickOnce Deployment 516 XCOPY Deployment 521 Visual Studio 2015 Setup Application Options 522 Deploying Different Solutions 522 Private Assemblies 523 Shared Assemblies 523 Deploying Desktop Applications 524 Deploying Web Applications 524 Deploying XML Web Services 524 Useful Tools 525 Summary 525 CHAPTER 16: WINDOWS 8 APPS 529 Windows 8 Application Design Principles 530 Using Touch 530 Application Commands 531 Windows 8 Controls 532 Coding Windows 8 Apps with XAML 533 Creating Your First Windows 8 App 534 Application Layout 548 Application Views 548 Screen Sizes and Orientation 548 Summary 553 APPENDIX: EXERCISE SOLUTIONS 557 INDEX 569
£29.74
John Wiley & Sons Inc Professional Visual Studio 2017
Book SynopsisSkip the basics and delve right into Visual Studio 2017 advanced features and tools Professional Visual Studio 2017 is the industry-favorite guide to getting the most out of Microsoft's primary programming technology.Table of ContentsPart I: Integrated Development Environment Chapter 1: A Quick Tour 3 Getting Started 3 The Visual Studio IDE 11 Summary 18 Chapter 2: The Solution Explorer, Toolbox, and Properties 21 The Solution Explorer 22 The Toolbox 38 Properties 43 Summary 49 Chapter 3: Options and Customizations 51 The Start Page 52 Window Layout 53 The Editor Space 59 Other Options 65 Importing and Exporting Settings 72 Summary 75 Chapter 4: The Visual Studio Workspace 77 The Code Editor 77 Code Navigation 90 The Command Window 96 The Immediate Window 97 The Class View 98 The Error List 99 The Object Browser 99 Summary 100 Chapter 5: Find and Replace and Help 101 Quick Find/Replace 102 Find/Replace in Files 104 Accessing Help 110 Summary 113 Part II: Getting Started Chapter 6: Solutions, Projects, and Items 117 Solution Structure 118 Solution File Format 119 Solution Properties 120 Project Types 124 Project Files Format 126 Project Properties 127 C/C++ Code Analysis Tool 146 Web Application Project Properties 146 Web Site Projects 149 NuGet Packages 150 Summary 152 Chapter 7: Intellisense and Bookmarks 155 IntelliSense Explained 156 JavaScript IntelliSense 166 XAML IntelliSense 169 IntelliSense Options 170 Extended IntelliSense 173 Bookmarks and the Bookmark Window 175 Summary 177 Chapter 8: Code Snippets and Refactoring 179 Code Snippets Revealed 180 Accessing Refactoring Support 192 Refactoring Actions 192 Summary 201 Chapter 9: Server Explorer 203 Server Connections 204 Data Connections 215 SharePoint Connections 215 Summary 215 Part III: Digging Deeper Chapter 10: Unit Testing 219 Your First Test Case 220 Asserting the Facts 229 Initializing and Cleaning Up 232 Testing Context 233 Live Unit Testing 238 Advanced Unit Testing 239 IntelliTest 242 Summary 244 Chapter 11: Project and Item Templates 247 Creating Templates 247 Extending Templates 255 Starter Kits 262 Online Templates 263 Summary 264 Chapter 12: Managing Your Source Code 265 Source Control 266 Summary 272 Part IV: Desktop Applications Chapter 13: Windows Forms Applications 275 Getting Started 275 The Windows Form 276 Form Design Preferences 278 Adding and Positioning Controls 281 Container Controls 287 Docking and Anchoring Controls 290 Summary 291 Chapter 14: Windows Presentation Foundation (WPF) 293 What Is WPF? 294 Getting Started with WPF 295 The WPF Designer and XAML Editor 302 Styling Your Application 317 Windows Forms Interoperability 319 Debugging with the WPF Visualizer 324 Summary 326 Chapter 15: Universal Windows Platform Apps 327 What Is a Windows App? 328 Creating a Windows App 331 Windows Runtime Components 338 .NET Native Compilation 339 Summary 341 Part V: Web Applications Chapter 16: ASP.NET Web Forms 345 Web Application Versus Web Site Projects 346 Creating Web Projects 347 Designing Web Forms 354 Web Controls 366 Master Pages 372 Rich Client-Side Development 374 Summary 378 Chapter 17: ASP.NET MVC 379 Model View Controller 380 Getting Started with ASP.NET MVC 381 Choosing a Model 384 Controllers and Action Methods 385 Rendering a UI with Views 388 Advanced MVC 395 Summary 413 Chapter 18: .NET Core 415 What Is .NET Core? 416 Working with ASP.NET Core 418 NuGet Package Manager 424 Bower Package Manager 428 Summary 431 Chapter 19: Node.Js Development 433 Getting Started with Node.js 433 Node Package Manager 440 Task Runner Explorer 444 Summary 447 Chapter 20: Python Development 449 Getting Started with Python 450 Cookiecutter Extension 455 Summary 457 Part VI: Mobile Applications Chapter 21: Mobile Applications Using .Net 461 Using Xamarin 462 Creating a Xamarin Forms Project 463 Debugging Your Application 466 Summary 484 Chapter 22: Mobile Applications Using Javascript 485 What Is Apache Cordova? 486 Creating an Apache Cordova Project 487 Debugging in Apache Cordova 495 Summary 498 Part VII: Cloud Services Chapter 23: Windows Azure 501 The Windows Azure Platform 502 SQL Azure 511 Service Fabric 513 Azure Mobile App 515 Azure Virtual Machines 516 Summary 518 Chapter 24: Synchronization Services 519 Occasionally Connected Applications 520 Server Direct 520 Getting Started with Synchronization Services 524 Synchronization Services over N-Tiers 528 Summary 529 Chapter 25: Sharepoint 531 SharePoint Execution Models 532 Preparing the Development Environment 533 Creating a SharePoint Project 536 Running Your Application 545 Summary 547 Part VIII: Data Chapter 26: Visual Database Tools 551 Database Windows in Visual Studio 2017 552 Editing Data 559 Redgate Data Tools 560 Summary 569 Chapter 27: The ADO.NET Entity Framework 571 What Is the Entity Framework? 572 Getting Started 573 Creating an Entity Model 573 Querying the Entity Model 588 Advanced Functionality 595 Summary 596 Chapter 28: Data Warehouses and Lakes 597 What Is Apache Hadoop? 597 Data Lake Tools for Visual Studio 600 Summary 610 Chapter 29: Data Science and Analytics 611 What Is R? 612 R Tools for Visual Studio 612 Summary 622 Part IX: Debugging Chapter 30: Using The Debugging Windows 625 The Code Window 625 The Breakpoints Window 626 The Output Window 627 The Immediate Window 628 The Watch Windows 630 The Code Execution Windows 632 The Memory Windows 634 The Parallel Debugging Windows 637 Exceptions 640 Summary 643 Chapter 31: Debugging With Breakpoints 645 Breakpoints 645 Tracepoints 652 Execution Control 654 Edit and Continue 656 Summary 657 Part X: Build and Deployment Chapter 32: Upgrading With Visual Studio 2017 661 Upgrading from Recent Visual Studio Versions 662 Upgrading to .NET Framework 4.6.2 665 Summary 666 Chapter 33: Build Customization 669 General Build Options 669 Manual Dependencies 672 The Visual Basic Compile Page 673 C# Build Pages 679 MSBuild 681 Summary 687 Chapter 34: Obfuscation, Application Monitoring, and Management 689 The IL Disassembler 690 Decompilers 691 Obfuscating Your Code 693 Application Monitoring and Management 702 Summary 706 Chapter 35: Packaging and Deployment 707 Windows Installer XML Toolset 708 ClickOnce 716 Summary 723 Chapter 36: Web Application Deployment 725 Web Deployment 726 Web Project Installers 733 The Web Platform Installer 735 Summary 739 Chapter 37: Continuous Delivery 741 Nomenclature 742 Continuous Delivery Tools 743 Summary 750 Part XI: Visual Studio Editions Chapter 38: Visual Studio Enterprise: Code Quality 753 Dependency Verification 754 Exploring Code with Code Maps 758 Code Cloning 760 Summary 760 Chapter 39: Visual Studio Enterprise: Testing and Debugging 761 Automated Tests 762 IntelliTrace 769 IntelliTest 774 Summary 775 Chapter 40: Visual Studio Team Services 777 Getting Started with Git 778 Version Control 782 Work Item Tracking 784 Builds 787 Web Portal 789 Summary 790 Index 791
£45.00
John Wiley & Sons Inc Programming Interviews Exposed
Book SynopsisAce technical interviews with smart preparation Programming Interviews Exposed is the programmer's ideal first choice for technical interview preparation. Updated to reflect changing techniques and trends, this new fourth edition provides insider guidance on the unique interview process that today''s programmers face. Online coding contests are being used to screen candidate pools of thousands, take-home projects have become commonplace, and employers are even evaluating a candidate''s public code repositories at GitHuband with competition becoming increasingly fierce, programmers need to shape themselves into the ideal candidate well in advance of the interview. This book doesn''t just give you a collection of questions and answers, it walks you through the process of coming up with the solution so you learn the skills and techniques to shine on whatever problems you're given. This edition combines a thoroughly revised basis in classic questions involvinTable of ContentsPreface xxv Introduction xxix Chapter 1: Before the Search 1 Know Yourself 1 Know the Market 3 Basic Market Information 3 What About Outsourcing? 4 Develop Marketable Skills 5 Get Things Done 6 Manage Your Online Profile 7 Summary 8 Chapter 2: the Job Application Process 9 Finding and Contacting Companies 9 Finding Companies 9 Getting Referrals 10 Working with Headhunters 10 Contacting the Company Directly 11 Job Fairs 12 Technology-Driven Sites 12 The Interview Process 12 Screening Interviews 12 On-Site Interviews 13 Dress 14 A Recruiter’s Role 14 Offers and Negotiation 15 Dealing with Recruiter Pressures 15 Negotiating Your Salary 15 Accepting and Rejecting Offers 17 Summary 17 Chapter 3: the Phone Screen 19 Understanding Phone Screens 19 Phone Screens by Software Engineers 19 Phone Screens by Nontechnical People 20 How to Take a Phone Screen 21 Phone Screen Problems 22 Memory Allocation in c 22 Recursion Trade-Offs 22 Mobile Programming 23 FizzBuzz 23 Reversing a String 24 Removing Duplicates 25 Nested Parentheses 26 Summary 27 Chapter 4: Approaches to Programming Problems 29 The Process 29 The Scenario 29 The Problems 30 Which Languages to Use 30 Interactivity Is Key 31 Solving the Problems 32 The Basic Steps 32 When You Get Stuck 34 Analyzing Your Solution 34 Big-O O Analysis 35 How Big-O O Analysis Works 36 Best, Average, and Worst Cases 37 Optimizations and Big-O O Analysis 37 How to Do Big-O O Analysis 38 Which Algorithm Is Better? 38 Memory Footprint Analysis 39 Summary 40 Chapter 5: Linked Lists 41 Why Linked Lists? 41 Kinds of Linked Lists 42 Singly Linked Lists 42 Doubly Linked Lists 44 Circular Linked Lists 44 Basic Linked List Operations 44 Tracking the Head Element 44 Traversing a List 46 Inserting and Deleting Elements 46 Linked List Problems 48 Stack Implementation 48 Maintain Linked List Tail Pointer 54 Bugs in removeHead 60 Mth-to-Last Element of a Linked List 62 List Flattening 65 List Unflattening 68 Null or Cycle 70 Summary 73 Chapter 6: Trees and Graphs 75 Trees 75 Binary Trees 77 Binary Search Trees 78 Heaps 80 Common Searches 80 Breadth-First Search 80 Depth-First Search 81 Traversals 81 Graphs 82 Tree and Graph Problems 83 Height of a Tree 83 Preorder Traversal 84 Preorder Traversal, No Recursion 85 Lowest Common Ancestor 87 Binary Tree to Heap 88 Unbalanced Binary Search Tree 91 Six Degrees of Kevin Bacon 93 Summary 97 Chapter 7: Arrays and Strings 99 Arrays 99 C and C++ 100 Java 101 C# 102 JavaScript 102 Strings 102 C 103 C++ 104 Java 104 C# 105 JavaScript 105 Array and String Problems 105 Find the First Nonrepeated Character 106 Remove Specified Characters 109 Reverse Words 112 Integer/String Conversions 116 From String to Integer 116 From Integer to String 118 UTF-8 String Validation 121 Summary 124 Chapter 8: Recursion 125 Understanding Recursion 125 Recursion Problems 129 Binary Search 129 Permutations of a String 131 Combinations of a String 134 Telephone Words 137 Summary 142 Chapter 9: Sorting 143 Sorting Algorithms 143 Selection Sort 144 Insertion Sort 145 Quicksort 146 Merge Sort 148 Sorting Problems 149 The Best Sorting Algorithm 150 Stable Selection Sort 153 Multi-Key Sort 155 Make a Sort Stable 156 Optimized Quicksort 158 Pancake Sorting 161 Summary 163 Chapter 10: Concurrency 165 Basic Thread Concepts 165 Threads 165 System Threads versus User Threads 166 Monitors and Semaphores 166 Deadlocks 167 A Threading Example 168 Concurrency Problems 170 Busy Waiting 170 Producer/Consumer 172 The Dining Philosophers 175 Summary 179 Chapter 11: Object-oriented Programming 181 Fundamentals 181 Classes and Objects 181 Construction and Destruction 182 Inheritance and Polymorphism 183 Object-Oriented Programming Problems 184 Interfaces and Abstract Classes 184 Virtual Methods 186 Multiple Inheritance 188 Resource Management 189 Summary 191 Chapter 12: Design Patterns 193 What Are Design Patterns? 193 Why Use Design Patterns? 193 Design Patterns in Interviews 194 Common Design Patterns 194 Singleton 195 Builder 195 Iterator 197 Observer 197 Decorator 197 Design Pattern Problems 198 Singleton Implementation 198 Decorator versus Inheritance 201 Efficient Observer Updates 202 Summary 202 Chapter 13: Databases 203 Database Fundamentals 203 Relational Databases 203 SQL 204 NoSQL 208 Object Databases 209 Hybrid Key-Value/Column Databases 209 Database Transactions 210 Distributed Databases 211 Database Problems 212 Simple SQL 212 Company and Employee Database 212 Max, No Aggregates 215 Three-Valued Logic 216 School Schemata 218 Summary 222 Chapter 14: Graphics and Bit Manipulation 223 Graphics 223 Bit Manipulation 224 Binary Two’s Complement Notation 224 Bitwise Operators 225 Optimizing with Shifts 226 Graphics Problems 226 Eighth of a Circle 227 Rectangle Overlap 229 Bit Manipulation Problems 232 Big-Endian or Little-Endian 233 Number of Ones 235 Summary 237 Chapter 15: Data Science, Random Numbers, And Statistics 239 Probability and Statistics 240 Descriptive and Inferential Statistics 241 Confidence Intervals 242 Statistical Tests 242 Artificial Intelligence and Machine Learning 244 Random Number Generators 245 Data Science, Random Number and Statistical Problems 246 Irreproducible Results 247 Study More; Know Less 249 Roll the Dice 251 Calculate Pi 254 Summary 258 Chapter 16: Counting, Measuring, and Ordering Puzzles 259 Tackling Brainteasers 259 Beware of Assumptions 260 Don’t Be Intimidated 261 Beware of Simple Problems 262 Estimation Problems 262 Brainteaser Problems 263 Count Open Lockers 263 Three Switches 265 Bridge Crossing 266 Heavy Marble 269 Number of American Gas Stations 273 Summary 274 Chapter 17: Graphical and Spatial Puzzles 275 Draw It First 275 Graphical and Spatial Problems 276 Boat and Pier 276 Counting Cubes 278 The Fox and the Duck 282 Burning Fuses 283 Escaping the Train 286 Summary 287 Chapter 18: Knowledge-based Questions 289 Preparation 289 Problems 290 C++ versus Java 291 Friend Classes 292 Argument Passing 292 Macros and Inline Functions 294 Inheritance 295 Garbage Collection 296 32-Bit versus 64-Bit Applications 297 Network Performance 298 Web Application Security 298 Cryptography 301 Hash Tables versus Binary Search Trees 301 MapReduce 302 Summary 302 Chapter 19: Nontechnical Questions 303 Why Nontechnical Questions? 303 Questions 304 “What Do You Want to Do?” 304 “What Is Your Favorite Programming Language?” 305 “What Is Your Work Style?” 306 “What Can You Tell Me About Your Experience?” 306 “What Are Your Career Goals?” 306 “Why Are You Looking to Change Jobs?” 306 “What Salary Are You Expecting?” 307 “What Is Your Salary History?” 310 “Why Should We Hire You?” 310 “Why Do You Want to Work for This Company?” 311 “Do You Have Any Questions for Me?” 311 Summary 311 Appendix: Résumés 313 The Technical Résumé 313 A Poor Example 313 Sell Yourself 317 Keep It Short 317 List the Right Information 318 Be Clear and Concise 319 Relevant Information Only 320 Use Reverse Chronological Ordering 321 Always Proofread 321 An Improved Example 321 Managers and Senior Developers 323 Tailor the Résumé to the Position 329 Sample Résumé 329 Index 333
£21.25
John Wiley & Sons Inc C 7.0 AllinOne For Dummies
Book SynopsisSharpen your knowledge of C# C# know-how is a must if you want to be a professional Microsoft developer. It''s also good to know a little C# if you''re building tools for the web, mobile apps, or other development tasks. C# 7.0 All-in-One For Dummies offers a deep dive into C# for coders still learning the nuances of the valuable programming language. Pop it open to get an intro into coding with C#, how to design secure apps and databases, and even pointers on building web and mobile apps with C#. C# remains one of the most in-demand programming language skills. The language regularly ranks in the top five among most in-demand languages, typically along with Java/JavaScript, C++, and Python. A December 2016 ZDNet article noted ''If your employer is a Microsoft developer, you better know C#. Lucky for you, this approachable, all-in-one guide is here to help you do just thatwithout ever breaking a sweat! Includes coverage of the latest changes to C# Table of ContentsIntroduction 1 About This Book 1 Foolish Assumptions 2 Icons Used in This Book 2 Beyond the Book 3 Where to Go from Here 4 Book 1: The Basics of C# Programming 5 Chapter 1: Creating Your First C# Console Application 7 Getting a Handle on Computer Languages, C#, and .NET 7 Creating Your First Console Application 11 Making Your Console App Do Something 17 Reviewing Your Console Application 18 Introducing the Toolbox Trick 21 Chapter 2: Living with Variability — Declaring Value-Type Variables 23 Declaring a Variable 24 What’s an int? 25 Representing Fractions 27 Handling Floating-Point Variables 28 Using the Decimal Type: Is it an Integer or a Float? 31 Examining the bool Type: Is it Logical? 33 Checking Out Character Types 33 What’s a Value Type? 36 Comparing string and char 37 Calculating Leap Years: DateTime 38 Declaring Numeric Constants 40 Changing Types: The Cast 41 Letting the C# Compiler Infer Data Types 42 Chapter 3: Pulling Strings 45 The Union is Indivisible, and So are Strings 46 Performing Common Operations on a String 48 Comparing Strings 48 What If I Want to Switch Case? 53 Looping through a String 54 Searching Strings 55 Getting Input from the Command Line 57 Controlling Output Manually 62 Formatting Your Strings Precisely 68 StringBuilder: Manipulating Strings More Efficiently 73 Chapter 4: Smooth Operators 75 Performing Arithmetic 75 Performing Logical Comparisons — Is That Logical? 79 Matching Expression Types at TrackDownAMate.com 83 Chapter 5: Getting into the Program Flow 89 Branching Out with if and switch 90 Here We Go Loop-the-Loop 101 Looping a Specified Number of Times with for 112 Nesting Loops 115 Don’t goto Pieces 116 Chapter 6: Lining Up Your Ducks with Collections 119 The C# Array 120 Processing Arrays by Using foreach 126 Sorting Arrays of Data 128 Using var for Arrays 132 Loosening Up with C# Collections 133 Understanding Collection Syntax 134 Using Lists 136 Using Dictionaries 139 Array and Collection Initializers 141 Using Sets 142 On Not Using Old-Fashioned Collections 147 Chapter 7: Stepping through Collections 149 Iterating through a Directory of Files 149 Iterating foreach Collections: Iterators 157 Accessing Collections the Array Way: Indexers 160 Looping Around the Iterator Block 165 Chapter 8: Buying Generic 177 Writing a New Prescription: Generics 178 Classy Generics: Writing Your Own 179 Revising Generics 197 Chapter 9: Some Exceptional Exceptions 201 Using an Exceptional Error-Reporting Mechanism 202 Throwing Exceptions Yourself 207 Knowing What Exceptions are for 207 Can I Get an Exceptional Example? 208 Assigning Multiple catch Blocks 211 Planning Your Exception-Handling Strategy 214 Grabbing Your Last Chance to Catch an Exception 219 Throwing Expressions 220 Chapter 10: Creating Lists of Items with Enumerations 223 Seeing Enumerations in the Real World 224 Working with Enumerations 225 Creating Enumerated Flags 228 Defining Enumerated Switches 230 Book 2: Object-Oriented C# Programming 233 Chapter 1: Object-Oriented Programming — What’s it All About? 235 Object-Oriented Concept #1: Abstraction 235 Object-Oriented Concept #2: Classification 238 Why Classify? 238 Object-Oriented Concept #3: Usable Interfaces 239 Object-Oriented Concept #4: Access Control 240 How C# Supports Object-Oriented Concepts 241 Chapter 2: Showing Some Class 243 Defining a Class and an Object 244 Accessing the Members of an Object 246 An Object-Based Program Example 247 Discriminating between Objects 249 Can You Give Me References? 249 Classes That Contain Classes are the Happiest Classes in the World 252 Generating Static in Class Members 253 Defining const and readonly Data Members 255 Chapter 3: We Have Our Methods 257 Defining and Using a Method 257 A Method Example for Your Files 259 Having Arguments with Methods 267 Returning Values after Christmas 275 Returning Multiple Values Using Tuples 279 Chapter 4: Let Me Say This about this 283 Passing an Object to a Method 283 Defining Methods 285 Accessing the Current Object 290 Using Local Functions 298 Chapter 5: Holding a Class Responsible 301 Restricting Access to Class Members 301 Why You Should Worry about Access Control 306 Defining Class Properties 312 Getting Your Objects Off to a Good Start — Constructors 315 The C#-Provided Constructor 316 Replacing the Default Constructor 317 Using Expression-Bodied Members 324 Chapter 6: Inheritance: Is That All I Get? 329 Class Inheritance 330 Why You Need Inheritance 332 Inheriting from a BankAccount Class (a More Complex Example) 333 IS_A versus HAS_A — I’m So Confused_A 336 When to IS_A and When to HAS_A 340 Other Features That Support Inheritance 340 The object Class 344 Inheritance and the Constructor 345 The Updated BankAccount Class 350 Chapter 7: Poly-what-ism? 357 Overloading an Inherited Method 358 Polymorphism 366 The Class Business Card: ToString() 374 C# During Its Abstract Period 374 Sealing a Class 383 Chapter 8: Interfacing with the Interface 385 Introducing CAN_BE_USED_AS 385 Knowing What an Interface is 387 Using an Interface 391 Using the C# Predefined Interface Types 392 Looking at a Program That CAN_BE_USED_AS an Example 393 Unifying Class Hierarchies 401 Hiding Behind an Interface 403 Inheriting an Interface 406 Using Interfaces to Manage Change in Object-Oriented Programs 407 Chapter 9: Delegating Those Important Events 411 E.T., Phone Home — The Callback Problem 412 Defining a Delegate 412 Pass Me the Code, Please — Examples 414 A More Real-World Example 417 Shh! Keep it Quiet — Anonymous Methods 426 Stuff Happens — C# Events 427 Chapter 10: Can I Use Your Namespace in the Library? 435 Dividing a Single Program into Multiple Source Files 436 Dividing a Single Program into Multiple Assemblies 437 Putting Your Classes into Class Libraries 440 Going Beyond Public and Private: More Access Keywords 446 Putting Classes into Namespaces 452 Chapter 11: Improving Productivity with Named and Optional Parameters 459 Exploring Optional Parameters 460 Looking at Named Parameters 464 Dealing with Overload Resolution 465 Using Alternative Methods to Return Values 466 Chapter 12: Interacting with Structures 469 Comparing Structures to Classes 470 Creating Structures 472 Using Structures as Records 479 Book 3: Designing for C# 483 Chapter 1: Writing Secure Code 485 Designing Secure Software 486 Building Secure Windows Applications 488 Building Secure Web Forms Applications 493 Using System.Security 498 Chapter 2: Accessing Data 499 Getting to Know System.Data 500 How the Data Classes Fit into the Framework 502 Getting to Your Data 502 Using the System.Data Namespace 503 Chapter 3: Fishing the File Stream 521 Going Where the Fish are: The File Stream 521 StreamWriting for Old Walter 524 Pulling Them Out of the Stream: Using StreamReader 536 More Readers and Writers 540 Exploring More Streams than Lewis and Clark 542 Chapter 4: Accessing the Internet 543 Getting to Know System.Net 544 How Net Classes Fit into the Framework 545 Using the System.Net Namespace 547 Chapter 5: Creating Images 559 Getting to Know System.Drawing 560 How the Drawing Classes Fit into the Framework 563 Using the System.Drawing Namespace 564 Chapter 6: Programming Dynamically! 571 Shifting C# Toward Dynamic Typing 572 Employing Dynamic Programming Techniques 574 Putting Dynamic to Use 576 Running with the Dynamic Language Runtime 579 Book 4: A Tour of Visual Studio 583 Chapter 1: Getting Started with Visual Studio 585 Versioning the Versions 586 Installing Visual Studio 590 Breaking Down the Projects 592 Chapter 2: Using the Interface 597 Designing in the Designer 597 Paneling the Studio 605 Coding in the Code Editor 612 Using the Tools of the Trade 616 Using the Debugger as an Aid to Learning 618 Chapter 3: Customizing Visual Studio 623 Setting Options 624 Using Snippets 628 Hacking the Project Types 634 Book 5: Windows Development with WPF 641 Chapter 1: Introducing WPF 643 Understanding What WPF Can Do 643 Introducing XAML 645 Diving In! Creating Your First WPF Application 646 Chapter 2: Understanding the Basics of WPF 653 Using WPF to Lay Out Your Application 654 Arranging Elements with Layout Panels 655 Exploring Common XAML Controls 671 Chapter 3: Data Binding in WPF 681 Getting to Know Dependency Properties 681 Exploring the Binding Modes 682 Investigating the Binding Object 683 Editing, Validating, Converting, and Visualizing Your Data 687 Finding Out More about WPF Data Binding 704 Chapter 4: Practical WPF 705 Commanding Attention 705 Using Built-In Commands 708 Using Custom Commands 711 Using Routed Commands 716 Book 6: Web Development with ASP.NET 721 Chapter 1: Looking at How ASP.NET Works with C# 723 Breaking Down Web Applications 724 Questioning the Client 726 Dealing with Web Servers 730 Chapter 2: Building Web Applications 735 Working in Visual Studio 736 Developing with Style 749 Chapter 3: Controlling Your Development Experience 753 Showing Stuff to the User 754 Getting Some Input from the User 760 Data Binding 767 Styling Your Controls 775 Making Sure the Site is Accessible 777 Constructing User Controls 779 Chapter 4: Leveraging the .NET Framework 783 Surfing Web Streams 784 Securing ASP.NET 789 Managing Files 791 Baking Cookies 792 Tracing with TraceContext 796 Navigating with Site Maps 798 Index 801
£30.39
John Wiley & Sons Inc Introduction to Programming with C for Engineers
Book SynopsisA complete textbook and reference for engineers to learn the fundamentals of computer programming with modern C++ Introduction to Programming with C++ for Engineers is an original presentation teaching the fundamentals of computer programming and modern C++ to engineers and engineering students. Professor Cyganek, a highly regarded expert in his field, walks users through basics of data structures and algorithms with the help of a core subset of C++ and the Standard Library, progressing to the object-oriented domain and advanced C++ features, computer arithmetic, memory management and essentials of parallel programming, showing with real world examples how to complete tasks. He also guides users through the software development process, good programming practices, not shunning from explaining low-level features and the programming tools. Being a textbook, with the summarizing tables and diagrams the book becomes a highly useful reference for C++ programmers at all levels. IntroduTable of ContentsPreface xi Acknowledgments xiii Abbreviations xv About the Companion Website xvii 1 Introduction 1 1.1 Structure of the Book 5 1.2 Format Conventions 8 1.3 About the Code and Projects 9 2 Introduction to Programming 13 2.1 Hardware Model 13 2.2 Software Development Ecosystem 16 2.3 Software Development Steps 18 2.4 Representing and Running Algorithms 20 2.4.1 Representing Algorithms 21 2.4.2 Using Online Compilers 22 2.4.3 Structure of a C++ Program 24 2.4.4 Code Analysis 24 2.4.5 Building a Linux Executable 26 2.5 Example Project – Compound Interest Calculator 29 2.5.1 Compound Interest Analysis 29 2.5.2 Implementation of the Interest Calculator 30 2.5.3 Building and Running the Software 33 2.6 Example Project – Counting Occurrences of Characters in Text 34 2.6.1 Problem Analysis and Implementation 34 2.6.2 Running the C++ Code with the Online Compiler 35 2.6.3 Histogram Code, Explained 36 2.7 Summary 39 Questions and Exercises 39 3 C++ Basics 43 3.1 Constants and Variables – Built-In Data Types, Their Range, and Initialization 43 3.2 Example Project – Collecting Student Grades 53 3.3 Our Friend the Debugger 56 3.4 The Basic Data Structure – std::vector 59 3.5 Example Project – Implementing a Matrix as a Vector of Vectors 64 3.6 Special Vector to Store Text – std::string 67 3.7 Using the auto Keyword and decltype for Automatic Type Deduction 72 3.8 Common Standard Algorithms 75 3.9 Structures: Collecting Objects of Various Types 79 3.10 Fixed-Size Arrays 83 3.10.1 Multidimensional Fixed-Size Arrays 85 3.11 References 87 3.12 Pointers 90 3.12.1 Object Access with Pointers 90 3.13 Statements 95 3.13.1 Blocks of Statements and Access to Variables – The Role of Braces 95 3.13.2 C++ Statements 97 3.13.2.1 Conditional Statements 97 3.13.2.2 Loop Statements 103 3.13.2.3 Auxiliary Statements – continue and break 108 3.13.2.4 The goto Statement 110 3.13.2.5 Structural Exception Handling – The try-catch Statement 110 3.14 Functions 112 3.14.1 Anatomy of a Function in C++ 112 3.14.2 Passing Arguments to and from a Function 117 3.14.2.1 Argument Passing by Copy (Value Semantics) 118 3.14.2.2 Indirect Argument Passing by Reference 119 3.14.2.3 Passing by Pointer 121 3.14.3 Function Call Mechanism and Inline Functions 123 3.14.4 Recursive Functions and the Call Stack 125 3.14.5 Function Overloading – Resolving Visibility with Namespaces 126 3.14.6 Lambda Functions 128 3.14.7 More on Lambda Functions 132 3.14.8 Function Pointers 138 3.14.9 Functions in an Object-Oriented Framework 140 3.15 Example Project – Wrapping Objects in a Structure with a Constructor 142 3.15.1 EMatrix in an Object-Oriented Environment 145 3.15.2 Basic Operations with EMatrix 145 3.15.3 Input and Output Operations on EMatrix 147 3.15.4 Basic Mathematical Operations on EMatrix 148 3.15.5 Organizing the Project Files and Running the Application 150 3.15.6 Extending Matrix Initialization with a Simple Random Number Generator 153 3.16 Example Project – Representing Quadratic Equations 154 3.16.1 Definition of a Class to Represent Quadratic Polynomials 155 3.16.2 TQuadEq Member Implementation 162 3.16.3 TQuadEq in Action 165 3.17 Example Project – Tuples and Structured Bindings for Converting Roman Numerals 167 3.17.1 More on std::tuple and the Structured Binding 170 3.17.2 How to Write a Software Unit Test 173 3.17.3 Automating Unit Tests – Using the Standard Random Number Library 174 3.18 Example Project – Building a Currency Calculator Component 176 3.18.1 Currency Exchange Problem Analysis 177 3.18.2 CurrencyCalc Software Design 179 3.18.3 TCurrency Class Representing Currency Records 181 3.18.3.1 C++ Input/Output Manipulators 183 3.18.4 TCurrencyExchanger Class for Exchanging Currency 186 3.18.5 Putting It All Together – The Complete Currency Exchange Program 190 3.19 Operators 196 3.19.1 Summary of the C++ Operators 199 3.19.2 Further Notes on Operators 222 3.20 Summary 223 Questions and Exercises 224 4 Delving into Object-Oriented Programming 227 4.1 Basic Rules and Philosophy of Object-Oriented Design and Programming 227 4.2 Anatomy of a Class 231 4.2.1 Naming Conventions and Self-Documenting Code 233 4.3 Rules for Accessing Class Members 233 4.4 Example Project – TComplex Class for Operator Overloading 235 4.4.1 Definition of the TComplex Class 236 4.4.2 Definition of the TComplex Class Members 241 4.4.3 Test Functions for the TComplex Class 243 4.5 More on References 246 4.5.1 Right and Forward References 246 4.5.2 References vs. Pointers 251 4.5.3 Pitfalls with References 252 4.6 Example Project – Mastering Class Members with the TheCube Class 253 4.6.1 Automatic vs. Explicit Definition of the Constructors 254 4.6.2 TheCube Object Layout and Semantics 264 4.6.3 Shallow vs. Deep Copy Semantics 265 4.6.4 Move Constructor and Move Assignment Semantics 266 4.6.5 Implementation of the TheCube Streaming Operators 267 4.6.6 Validation of TheCube 269 4.7 Example Project – Moving EMatrix to the Class 272 4.7.1 Definition of the EMatrix Class 272 4.7.2 Implementation of the Class Streaming Operators 274 4.7.3 Implementation of the Arithmetic Operators 278 4.7.4 Testing Matrix Operations 279 4.8 Introduction to Templates and Generic Programming 281 4.8.1 Generalizing a Class with Templates 282 4.8.2 Template Specializations 286 4.8.3 Template Functions and Type Checking 287 4.8.4 Example Project – Designing Template Classes with TStack 289 4.8.4.1 Design and Implementation of the TStackFor Class 290 4.8.4.2 Testing TStack 293 4.8.5 Template Member Functions 294 4.9 Class Relations – “Know,” “Has-A,” and “Is-A” 297 4.10 Example Project – Extending Functionality Through Class Inheritance with TComplexQuadEq 304 4.11 Virtual Functions and Polymorphism 310 4.12 More on the Virtual Mechanism 316 4.13 The Curiously Recurring Template Pattern and Static Polymorphism 318 4.14 Mixin Classes 322 4.15 Example Project – The TLongNumberFor Class for Efficient Storage of Numbers of Any Length 323 4.15.1 Binary-Coded Decimal Representation 325 4.15.2 Endianness 326 4.15.3 Definition of the TLongNumberFor Class 326 4.15.3.1 Type-Converting Operations 329 4.15.3.2 TLongNumberFor Test Function 333 4.15.4 Designing Classes for PESEL IDs 335 4.15.4.1 Aggregating PESEL 336 4.15.4.2 Inherited PESEL 337 4.15.4.3 LongNumber Project Organization 338 4.15.5 Extending the Functionality of TLongNumberFor with the Proxy Pattern 340 4.15.5.1 Definition of the Proxy Class 341 4.15.5.2 Testing the Functionality of the TLongNumberFor Class with the Proxy Pattern 343 4.16 Strong Types 345 4.17 Summary 346 Questions and Exercises 346 5 Memory Management 349 5.1 Types of Data Storage 349 5.2 Dynamic Memory Allocation – How to Avoid Memory Leaks 349 5.2.1 Introduction to Smart Pointers and Resource Management 358 5.2.1.1 RAII and Stack Unwinding 359 5.3 Smart Pointers – An Overview with Examples 360 5.3.1 More on std::unique_ptr 360 5.3.1.1 Context for Using std::unique_ptr 360 5.3.1.2 Factory Method Design Pattern 374 5.3.1.3 Custom deletes for unique_ptr 376 5.3.1.4 Constructions to Avoid When Using unique_ptr 378 5.3.2 More on shared_ptr and weak_ptr 378 5.4 Summary 381 Questions and Exercises 381 6 Advanced Object-Oriented Programming 383 6.1 Functional Objects 383 6.2 Example Project – Extending the Currency Search in XML Files, and Using State Machine and Regular Expressions with the regex Library 389 6.2.1 Pattern Matching with the Regular Expression Library 390 6.2.2 State Machine Pattern 392 6.2.3 Implementing the Extended Class 393 6.2.4 Project Extension – Loading Currency Information from the Internet 399 6.2.5 Launching the Extended Version of CurrencyCalc 405 6.2.6 Building a Static Library and a Terminal Window Application 409 6.2.7 C++ Filesystem 410 6.2.8 User Interface 419 6.2.8.1 Definition of the CC_GUI Class 420 6.2.8.2 Definitions of Members of the CC_GUI Class and the Callback Mechanism 423 6.2.8.3 Launching the GUI-Based Application 430 6.3 System Clocks and Time Measurements 431 6.4 Time Measurement for Function Execution 435 6.5 Range Class 437 6.5.1 Functional Programming and the Ranges Library 442 6.6 Example Project – Parsing Expressions 443 6.6.1 Defining Language Expressions with Formal Grammar Rules 444 6.6.2 Design of the Expression-Processing Framework 446 6.6.3 The First Expression Interpreter 447 6.6.4 Building the Syntax Tree with the Composite Design Pattern 451 6.6.4.1 The Composite Design Pattern to Define the Nodes of a Tree 452 6.6.4.2 Implementation of the TNode Hierarchy and Cooperation with Visitors 453 6.6.4.3 Implementation of the ValueLeafNode Class 455 6.6.4.4 Implementation of the BinOperator Class 457 6.6.4.5 Implementation of the PlusOperator Class 458 6.6.4.6 Deep Copying Node Objects – The Prototyping Mechanism 459 6.6.5 Interpreter to Build a Syntax Tree 460 6.6.6 Stack for Smart Pointers 466 6.6.7 Traversing Trees with the Visitor Design Pattern 469 6.6.7.1 The Expression-Evaluating Visitor 472 6.6.7.2 The Expression-Printing Visitor 474 6.6.8 Testing the Interpreters 476 6.6.9 Representing Expressions on a Stack in Reverse Polish Notation 479 6.6.9.1 Reverse Polish Notation 479 6.6.9.2 Algorithm for Evaluating an RPN Expression 480 6.7 Summary 485 Questions and Exercises 485 7 Computer Arithmetic 489 7.1 Integer Value Representation 489 7.1.1 Base Conversion Algorithm 491 7.1.2 Hexadecimal and Octal Representations 492 7.1.3 Binary Addition 493 7.1.4 Negative Values and Subtraction 494 7.1.5 Arithmetic Control Flags 496 7.1.6 Representing Fractions 498 7.2 Binary Shift Operations 501 7.3 Example Project – Software Model for Fixed-Point Representations 503 7.3.1 Fixed-Point Numbers and Their Arithmetic 503 7.3.2 Definition of the FxFor Class 504 7.3.3 Selected Methods of the FxFor Class 510 7.3.4 Applications of FxFor 516 7.4 Floating-Point Representations 519 7.4.1 Number Representation in Floating-Point Format 520 7.4.2 Distribution of Floating-Point Numbers and the Computational Consequences 524 7.4.3 Real-Value Approximation Error with Floating-Point Representations 527 7.4.4 The IEEE 754 Standard for Floating-Point Arithmetic 530 7.4.5 The Standard FP Operation Model 537 7.4.6 Computations That Are Conscious of Numerical Errors 537 7.4.7 Example Project – Evaluating the Summation Algorithms 539 7.4.8 Example Project – The Newton Method of Finding the Roots of a Function 544 7.4.8.1 Function to Compute Square Roots Based on Newton’s Iteration 548 7.5 Summary 550 Questions and Exercises 551 8 Basics of Parallel Programming 553 8.1 Basic Concepts of Parallel Computations 553 8.2 Adding Parallelism to the Standard Algorithms 556 8.3 Launching Asynchronous Tasks 559 8.4 Parallelization with the OpenMP Library 561 8.4.1 Launching a Team of Threads and Providing Exclusive Access Protection 562 8.4.2 Loop Parallelization and Reduction Operations 564 8.4.3 Massive Data Parallelization 567 8.5 Summary 575 Questions and Exercises 575 Appendix 577 A.1 Preprocessor Directives 577 A.2 Short Introduction to C 582 A.2.1 Built‐in Arrays 583 A.2.1.1 Multidimensional Fixed-Size Arrays 585 A.2.2 Passing Arrays to Functions – The Main Function 586 A.2.3 C Structures 590 A.2.4 C Functions and Input/Output 591 A.2.5 Unions 592 A.2.6 Memory and String Operations 593 A.2.7 Binding C and C++ Code 599 A.3 Linking and Binary Organization of C/C++ Objects 599 A.4 Graphical User and Web Interfaces for C++ Projects 601 A.5 Converting Bin, Oct, Dec, and Hex Values with FixBinCalc 603 A.6 Programming Toolchain 604 A.6.1 Project-Generating Tool (CMake) 604 A.6.2 Source Version Control and Repositories 609 A.6.3 Profiler 610 A.7 Software Testing 612 A.8 Summary 616 Questions and Exercises 616 Bibliography 619 Index 623
£77.85
John Wiley & Sons Inc Python Machine Learning
Book SynopsisPython makes machine learning easy for beginners and experienced developers With computing power increasing exponentially and costs decreasing at the same time, there is no better time to learn machine learning using Python. Machine learning tasks that once required enormous processing power are now possible on desktop machines. However, machine learning is not for the faint of heartit requires a good foundation in statistics, as well as programming knowledge. Python Machine Learning will help coders of all levels master one of the most in-demand programming skillsets in use today. Readers will get started by following fundamental topics such as an introduction to Machine Learning and Data Science. For each learning algorithm, readers will use a real-life scenario to show how Python is used to solve the problem at hand. Python data sciencemanipulating data and data visualizationData cleansingUnderstanding Machine learning algorithmsSupervised learning algorithmsUnsupervised learnTable of ContentsIntroduction xxiii Chapter 1 Introduction to Machine Learning 1 What Is Machine Learning? 2 What Problems Will Machine Learning Be Solving in This Book? 3 Classification 4 Regression 4 Clustering 5 Types of Machine Learning Algorithms 5 Supervised Learning 5 Unsupervised Learning 7 Getting the Tools 8 Obtaining Anaconda 8 Installing Anaconda 9 Running Jupyter Notebook for Mac 9 Running Jupyter Notebook for Windows 10 Creating a New Notebook 11 Naming the Notebook 12 Adding and Removing Cells 13 Running a Cell 14 Restarting the Kernel 16 Exporting Your Notebook 16 Getting Help 17 Chapter 2 Extending Python Using NumPy 19 What Is NumPy? 19 Creating NumPy Arrays 20 Array Indexing 22 Boolean Indexing 22 Slicing Arrays 23 NumPy Slice Is a Reference 25 Reshaping Arrays 26 Array Math 27 Dot Product 29 Matrix 30 Cumulative Sum 31 NumPy Sorting 32 Array Assignment 34 Copying by Reference 34 Copying by View (Shallow Copy) 36 Copying by Value (Deep Copy) 37 Chapter 3 Manipulating Tabular Data Using Pandas 39 What Is Pandas? 39 Pandas Series 40 Creating a Series Using a Specified Index 41 Accessing Elements in a Series 41 Specifying a Datetime Range as the Index of a Series 42 Date Ranges 43 Pandas DataFrame 45 Creating a DataFrame 45 Specifying the Index in a DataFrame 46 Generating Descriptive Statistics on the DataFrame 47 Extracting from DataFrames 49 Selecting the First and Last Five Rows 49 Selecting a Specific Column in a DataFrame 50 Slicing Based on Row Number 50 Slicing Based on Row and Column Numbers 51 Slicing Based on Labels 52 Selecting a Single Cell in a DataFrame 54 Selecting Based on Cell Value 54 Transforming DataFrames 54 Checking to See If a Result Is a DataFrame or Series 55 Sorting Data in a DataFrame 55 Sorting by Index 55 Sorting by Value 56 Applying Functions to a DataFrame 57 Adding and Removing Rows and Columns in a DataFrame 60 Adding a Column 61 Removing Rows 61 Removing Columns 62 Generating a Crosstab 63 Chapter 4 Data Visualization Using matplotlib 67 What Is matplotlib? 67 Plotting Line Charts 68 Adding Title and Labels 69 Styling 69 Plotting Multiple Lines in the Same Chart 71 Adding a Legend 72 Plotting Bar Charts 73 Adding Another Bar to the Chart 74 Changing the Tick Marks 75 Plotting Pie Charts 77 Exploding the Slices 78 Displaying Custom Colors 79 Rotating the Pie Chart 80 Displaying a Legend 81 Saving the Chart 82 Plotting Scatter Plots 83 Combining Plots 83 Subplots 84 Plotting Using Seaborn 85 Displaying Categorical Plots 86 Displaying Lmplots 88 Displaying Swarmplots 90 Chapter 5 Getting Started with Scikit-learn for Machine Learning 93 Introduction to Scikit-learn 93 Getting Datasets 94 Using the Scikit-learn Dataset 94 Using the Kaggle Dataset 97 Using the UCI (University of California, Irvine) Machine Learning Repository 97 Generating Your Own Dataset 98 Linearly Distributed Dataset 98 Clustered Dataset 98 Clustered Dataset Distributed in Circular Fashion 100 Getting Started with Scikit-learn 100 Using the LinearRegression Class for Fitting the Model 101 Making Predictions 102 Plotting the Linear Regression Line 102 Getting the Gradient and Intercept of the Linear Regression Line 103 Examining the Performance of the Model by Calculating the Residual Sum of Squares 104 Evaluating the Model Using a Test Dataset 105 Persisting the Model 106 Data Cleansing 107 Cleaning Rows with NaNs 108 Replacing NaN with the Mean of the Column 109 Removing Rows 109 Removing Duplicate Rows 110 Normalizing Columns 112 Removing Outliers 113 Tukey Fences 113 Z-Score 116 Chapter 6 Supervised Learning—Linear Regression 119 Types of Linear Regression 119 Linear Regression 120 Using the Boston Dataset 120 Data Cleansing 125 Feature Selection 126 Multiple Regression 128 Training the Model 131 Getting the Intercept and Coefficients 133 Plotting the 3D Hyperplane 133 Polynomial Regression 135 Formula for Polynomial Regression 138 Polynomial Regression in Scikit-learn 138 Understanding Bias and Variance 141 Using Polynomial Multiple Regression on the Boston Dataset 144 Plotting the 3D Hyperplane 146 Chapter 7 Supervised Learning—Classification Using Logistic Regression 151 What Is Logistic Regression? 151 Understanding Odds 153 Logit Function 153 Sigmoid Curve 154 Using the Breast Cancer Wisconsin (Diagnostic) Data Set 156 Examining the Relationship Between Features 156 Plotting the Features in 2D 157 Plotting in 3D 158 Training Using One Feature 161 Finding the Intercept and Coefficient 162 Plotting the Sigmoid Curve 162 Making Predictions 163 Training the Model Using All Features 164 Testing the Model 166 Getting the Confusion Matrix 166 Computing Accuracy, Recall, Precision, and Other Metrics 168 Receiver Operating Characteristic (ROC) Curve 171 Plotting the ROC and Finding the Area Under the Curve (AUC) 174 Chapter 8 Supervised Learning—Classification Using Support Vector Machines 177 What Is a Support Vector Machine? 177 Maximum Separability 178 Support Vectors 179 Formula for the Hyperplane 180 Using Scikit-learn for SVM 181 Plotting the Hyperplane and the Margins 184 Making Predictions 185 Kernel Trick 186 Adding a Third Dimension 187 Plotting the 3D Hyperplane 189 Types of Kernels 191 C 194 Radial Basis Function (RBF) Kernel 196 Gamma 197 Polynomial Kernel 199 Using SVM for Real-Life Problems 200 Chapter 9 Supervised Learning—Classification Using K-Nearest Neighbors (KNN) 205 What Is K-Nearest Neighbors? 205 Implementing KNN in Python 206 Plotting the Points 206 Calculating the Distance Between the Points 207 Implementing KNN 208 Making Predictions 209 Visualizing Different Values of K 209 Using Scikit-Learn’s KNeighborsClassifier Class for KNN 211 Exploring Different Values of K 213 Cross-Validation 216 Parameter-Tuning K 217 Finding the Optimal K 218 Chapter 10 Unsupervised Learning—Clustering Using K-Means 221 What Is Unsupervised Learning? 221 Unsupervised Learning Using K-Means 222 How Clustering in K-Means Works 222 Implementing K-Means in Python 225 Using K-Means in Scikit-learn 230 Evaluating Cluster Size Using the Silhouette Coefficient 232 Calculating the Silhouette Coefficient 233 Finding the Optimal K 234 Using K-Means to Solve Real-Life Problems 236 Importing the Data 237 Cleaning the Data 237 Plotting the Scatter Plot 238 Clustering Using K-Means 239 Finding the Optimal Size Classes 240 Chapter 11 Using Azure Machine Learning Studio 243 What Is Microsoft Azure Machine Learning Studio? 243 An Example Using the Titanic Experiment 244 Using Microsoft Azure Machine Learning Studio 246 Uploading Your Dataset 247 Creating an Experiment 248 Filtering the Data and Making Fields Categorical 252 Removing the Missing Data 254 Splitting the Data for Training and Testing 254 Training a Model 256 Comparing Against Other Algorithms 258 Evaluating Machine Learning Algorithms 260 Publishing the Learning Model as a Web Service 261 Publishing the Experiment 261 Testing the Web Service 263 Programmatically Accessing the Web Service 263 Chapter 12 Deploying Machine Learning Models 269 Deploying ML 269 Case Study 270 Loading the Data 271 Cleaning the Data 271 Examining the Correlation Between the Features 273 Plotting the Correlation Between Features 274 Evaluating the Algorithms 277 Logistic Regression 277 K-Nearest Neighbors 277 Support Vector Machines 278 Selecting the Best Performing Algorithm 279 Training and Saving the Model 279 Deploying the Model 280 Testing the Model 282 Creating the Client Application to Use the Model 283 Index 285
£26.40
John Wiley & Sons Inc Practical Java Programming for IoT AI and
Book SynopsisLearn practical uses for some of the hottest tech applications trending among technology professionals We are living in an era of digital revolution. On the horizon, many emerging digital technologies are being developed at a breathtaking speed. Whether we like it or not, whether we are ready or not, digital technologies are going to penetrate more and more, deeper and deeper, into every aspect of our lives. This is going to fundamentally change how we live, how we work, and how we socialize. Java, as a modern high-level programming language, is an excellent tool for helping us to learn these digital technologies, as well as to develop digital applications, such as IoT, AI, Cybersecurity, Blockchain and more. Practical Java Programming uses Java as a tool to help you learn these new digital technologies and to be better prepared for the future changes. Gives you a brief overview for getting started with Java ProgrammingDives into how you can apply your new knowledge to some of thTable of ContentsPreface xix Introduction xxi Part I 1Chapter 1 Introduction to Java 3 1.1 What is Java? 3 1.2 Versions of Java 5 1.3 Java Architecture 7 1.4 Editions of Java 8 1.5 The Java Spring Framework 9 1.6 Advantages and Disadvantages of Java 10 1.6.1 Advantages 10 1.6.2 Disadvantages 11 1.7 Java Certification 11 1.8 Summary 12 1.9 Chapter Review Questions 12 Chapter 2 Getting Started with Java Programming 13 2.1 Downloading and Installing Java 13 2.2 Java IDEs 17 2.3 Java Hello World Program 20 2.4 Java Online Compilers 25 2.5 Java Online Code Converters 31 2.6 Java Free Online Courses and Tutorials 31 2.7 Java Version Control 36 2.8 Summary 37 2.9 Chapter Review Questions 38 Part II 39 Chapter 3 Basic Java Programming 41 3.1 Introduction 42 3.2 Variables 42 3.2.1 Constants 44 3.2.2 The String and StringBuffer Types 45 3.2.3 The VAR Variable Type 46 3.3 Operators 47 3.4 Reserved Words 48 3.5 Input and Output 48 3.6 Loops and Selections 51 3.7 Arrays, Matrices, and ArrayLists 54 3.8 Reading and Writing Files 58 3.9 Methods 60 3.10 Object-Oriented Programming 62 3.10.1 Classes and Objects 62 3.10.2 Instantiation 63 3.10.3 Encapsulation 63 3.10.4 Inheritance 63 3.10.5 Overriding and Overloading 63 3.10.6 Polymorphism 63 3.10.7 Object Accessibility 64 3.10.8 Anonymous Inner Classes 64 3.11 Multithreading 68 3.11.1 The Life Cycle of a Thread 73 3.11.2 Thread Priorities 76 3.11.3 Thread Scheduling 76 3.11.4 Thread Synchronization 77 3.12 Date, Time, Timer, and Sleep Methods 78 3.13 Executing System Commands 83 3.14 Packages and Programming on a Large Scale 86 3.15 Software Engineering 88 3.15.1 The Software Development Cycle 89 3.15.2 Indentation 90 3.15.3 Comments 91 3.15.4 Naming Conventions 92 3.16 Deploying Java Applications 93 3.16.1 Using a Windows Batch File 93 3.16.2 Using an Executable JAR File 94 3.16.3 Using Microsoft Visual Studio 95 3.16.4 Java Application Installations 96 3.17 Summary 98 3.18 Chapter Review Questions 98 Chapter 4 Java Programming for Windows Applications 99 4.1 Introduction 99 4.2 Java Swing Applications 100 4.2.1 For More Information 105 4.3 JavaFX Applications 105 4.3.1 JavaFX Window 106 4.3.2 Creating a Label and Button in JavaFX 108 4.3.3 JavaFX Charts 110 4.3.4 Handling Logins in JavaFX 112 4.3.5 Creating an Image Viewer in JavaFX 115 4.3.6 Creating a JavaFX Web Viewer 117 4.3.7 Creating a Menu in JavaFX 118 4.3.8 Creating a JavaFX File Chooser 120 4.3.9 JavaFX Tutorials 122 4.4 Deploying JavaFX Applications 125 4.5 Summary 127 4.6 Chapter Review Questions 127 Chapter 5 Java Programming for Networking Applications 129 5.1 Introduction 129 5.1.1 Local Area Network and Wide Area Network 132 5.1.2 The Cisco Three-Tier Enterprise Network Architecture 132 5.1.3 Key Network Components 133 5.1.4 Traditional Networks vs. Software-Defined Networking 134 5.2 Java Network Information Programming 136 5.3 Java Socket Programming 143 5.3.1 Java UDP Client-Server Programming 143 5.3.2 Java TCP Client-Server Programming 146 5.3.3 Java Multithreaded EchoServer Programming 148 5.4 Java HTTP Programming 151 5.4.1 A Java HTTP/HTTPS Client 151 5.4.2 A Java HTTP Server 158 5.4.3 Java Multithreaded HTTP Server 159 5.5 Java Email SMTP Programming 164 5.6 Java RMI Client-Server Programming 168 5.7 Getting Started with SDN 172 5.7.1 Getting Started with OpenFlow 172 5.7.2 Getting Started with Floodlight 181 5.7.3 Getting Started with OpenDaylight 181 5.8 Java Network Programming Resources 181 5.9 Summary 182 5.10 Chapter Review Questions 182 Chapter 6 Java Programming for Mobile Applications 183 6.1 Introduction 183 6.2 Android Studio 184 6.3 The Hello World App 186 6.4 The Button and TextView Apps 192 6.5 The Sensor App 196 6.6 Deploying Android Apps 200 6.7 The Activity Life Cycle of an Android App 202 6.8 MIT App Inventor 204 Speech Recognition App 204 Translation App 208 6.9 5G 213 6.9.1 Millimeter Waves 217 6.9.2 Small Cells 217 6.9.3 Massive MIMO 217 6.9.4 Beamforming 218 6.9.5 Full Duplex 218 6.9.6 Future 6G and 7G 218 6.10 Summary 219 6.11 Chapter Review Questions 219 Part III 221 Chapter 7 Java Programming for IoT Applications 223 7.1 What is the Internet of Things? 223 7.2 IoT Communication Protocols 227 7.2.1 MQTT 228 7.2.2 CoAP 229 7.2.3 XMPP 229 7.2.4 SOAP 229 7.2.5 REST 229 7.3 IoT Platforms 230 7.4 IoT Security 230 7.5 Why Java? 230 7.6 Java IoT with Raspberry Pi 231 7.6.1 Raspberry Pi Setup 232 7.6.2 Java GPIO Examples 237 7.6.3 Running Python Programs from Java 244 7.6.4 Java PWM Example 246 7.6.5 Java PIR and LED Example 248 7.6.6 Java I2C Example 251 7.6.7 Java ADC Examples 255 7.6.8 Java Digital Sensor Examples 259 7.6.9 Java MQTT Example 263 7.6.10 Java REST Example 266 7.7 An Oracle Java ME Embedded Client 270 7.8 Other Java IoT Uses 271 7.8.1 Eclipse Open IoT Stack for Java 271 7.8.2 IBM Watson IoT for Java 271 7.8.3 Amazon IoT for Java 272 7.8.4 Microsoft Azure IoT for Java 272 7.9 Summary 273 7.10 Chapter Review Questions 273 Chapter 8 Java Programming for AI Applications 275 8.1 What is Artificial Intelligence? 275 8.1.1 History of AI 277 8.1.2 Cloud AI vs. Edge AI 279 8.2 Neural Networks 280 8.2.1 The Perceptron 280 8.2.2 MultiLayered Perceptron/Backpropagation/Feedforward 284 8.3 Machine Learning 286 8.4 Deep Learning 288 8.5 Java AI Libraries 292 8.6 Java Examples for Neural Networks 293 8.6.1 Java Perceptron Example 293 8.6.2 Java Neural Network Backpropagation Example 296 8.7 Java Examples for Machine Learning 300 8.8 Java Examples for Deep Learning 303 8.9 TensorFlow for Java 309 8.10 AI Resources 313 8.11 Summary 313 8.12 Chapter Review Questions 314 Chapter 9 Java Programming for Cybersecurity Applications 315 9.1 What is Cybersecurity? 315 9.2 What is Encryption? 316 9.2.1 Private Key Encryption 317 9.2.2 Public Key Encryption 319 9.3 Hash Functions and Message Digests 321 9.4 Digital Signatures 323 9.5 Digital Certificates 325 9.6 Case Study 1: Secure Email 327 9.7 Case Study 2: Secure Web 328 9.8 Java Private Key Encryption Example 329 9.9 Java Public Key Encryption Example 330 9.10 Java Digital Signature/Message Digest Example 332 9.11 Java Digital Certificate Example 338 9.12 Other Java Examples 342 9.13 Summary 345 9.14 Chapter Review Questions 346 Chapter 10 Java Programming for Blockchain Applications 347 10.1 What is Blockchain? 347 10.2 How Do You Validate a Blockchain? 349 10.3 How Do You Mine the Blocks? 350 10.4 How Does Blockchain Work? 350 10.5 Uses of Blockchain 352 10.5.1 Bitcoin 353 10.5.2 Smart Contracts 358 10.5.3 Healthcare 358 10.5.4 Manufacture and Supply Chains 359 10.5.5 Internet of Things 359 10.5.6 Government 360 10.6 Issues with Blockchain 360 10.7 Java Blockchain Examples 361 10.8 Java Blockchain Transaction Examples 367 10.9 Java BitcoinJ Example 373 10.9.1 The Testnet 375 10.10 Java Web3j Examples 375 10.11 Java EthereumJ Examples 378 10.12 Java Ethereum Smart Contract Example 380 10.13 Go Further: Choosing a Blockchain Platform 386 10.14 Summary 387 10.15 Chapter Review Questions 388 Chapter 11 Java Programming for Big Data Applications 389 11.1 What is Big Data? 389 11.2 Sources of Big Data 390 11.3 The Three Vs of Big Data 391 11.4 Benefits of Big Data 392 11.5 What is Hadoop? 392 11.6 Key Components of Hadoop 393 11.6.1 HDFS 393 11.6.2 MapReduce 394 11.6.3 Hadoop Common 395 11.6.4 Hadoop YARN 395 11.6.5 Overview of a Hadoop Cluster 395 11.7 Implementing Hadoop on a Raspberry Pi Cluster 396 11.7.1 Raspberry Pi Installation and Configuration 397 11.7.2 Hadoop Installation and Configuration 397 Prepare the Hadoop User Account and Group 398 Configure SSH 398 Download and Install Hadoop 398 Configure Environment Variables 399 Configure Hadoop 399 Start and Stop Hadoop Services 401 Test Hadoop 401 Hadoop on a Web Browser 403 11.8 Java Hadoop Example 406 11.9 Summary 412 11.10 Chapter Review Questions 412 Appendix A Java Documentation and Archiving Tools and Online Resources 413 Javadoc Tutorial 413 JAR Tutorial 418 Useful Java Resources 420 Appendix B Apache Maven Tutorial 423 Downloading Maven 423 Creating a Maven Project 424 Compiling and Building the Maven Project 428 Running the Maven Project 428 Appendix C Git and GitHub Tutorial 431 Terms and Definitions 440 Cheat Sheet 442 Index 445
£24.79
John Wiley & Sons Inc Data Structures
Book SynopsisTable of ContentsPreface iii Chapter 1 Object-Oriented Programming and Class Hierarchies 1 1.1 Abstract Data Types (ADTs), Interfaces, and the Java API 2 Interfaces 2 The implements Clause 5 Declaring a Variable of an Interface Type 6 Exercises for Section 1.1 6 1.2 Introduction to OOP 7 A Superclass and Subclass Example 8 Use of this. 9 Initializing Data Fields in a Subclass 10 The No-Parameter Constructor 11 Protected Visibility for Superclass Data Fields 11 Is-a versus Has-a Relationships 12 Exercises for Section 1.2 12 1.3 Method Overriding, Method Overloading, and Polymorphism 13 Method Overriding 13 Method Overloading 15 Polymorphism 17 Methods with Class Parameters 17 Exercises for Section 1.3 18 1.4 Abstract Classes 19 Referencing Actual Objects 21 Initializing Data Fields in an Abstract Class 21 Abstract Class Number and the Java Wrapper Classes 21 Summary of Features of Actual Classes, Abstract Classes, and Interfaces 22 Implementing Multiple Interfaces 23 Extending an Interface 23 Exercises for Section 1.4 24 1.5 Class Object and Casting 24 The Method toString 24 Operations Determined by Type of Reference Variable 25 Casting in a Class Hierarchy 26 Using instanceof to Guard a Casting Operation 27 The Class Class 29 Exercises for Section 1.5 29 1.6 A Java Inheritance Example—The Exception Class Hierarchy 30 Division by Zero 30 Array Index Out of Bounds 30 Null Pointer 31 The Exception Class Hierarchy 31 The Class Throwable 31 Checked and Unchecked Exceptions 32 Handling Exceptions to Recover from Errors 34 Using try−catch to Recover from an Error 35 Throwing an Exception When Recovery Is Not Obvious 35 Exercises for Section 1.6 36 1.7 Packages and Visibility 37 Packages 37 The No−Package−Declared Environment 37 Package Visibility 38 Visibility Supports Encapsulation 38 Exercises for Section 1.7 39 1.8 A Shape Class Hierarchy 40 Case Study: Processing Geometric Figures 40 Exercises for Section 1.8 46 Chapter Review 46 Java Constructs Introduced in This Chapter 47 Java API Classes Introduced in This Chapter 47 User-Defined Interfaces and Classes in This Chapter 47 Quick-Check Exercises 47 Review Questions 48 Programming Projects 49 Answers to Quick-Check Exercises 51 Chapter 2 Lists and the Collections Framework 53 2.1 Algorithm Efficiency and Big-O 54 Big-O Notation 56 Formal Definition of Big-O 57 Summary of Notation 60 Comparing Performance 60 The Power of O(log n) Algorithms 62 Algorithms with Exponential and Factorial Growth Rates 62 Exercises for Section 2.1 63 2.2 The List Interface and ArrayList Class 63 The ArrayList Class 65 Generic Collections 67 Exercises for Section 2.2 69 2.3 Applications of ArrayList 70 A Phone Directory Application 71 Exercises for Section 2.3 72 2.4 Implementation of an ArrayList Class 72 The Constructor for Class KWArrayList 73 The add(E anEntry) Method 74 The add(int index, E anEntry) Method 75 The set and get Methods 76 The remove Method 76 The reallocate Method 77 Performance of the KWArrayList Algorithms 77 Exercises for Section 2.4 77 2.5 Single-Linked Lists 78 A List Node 80 Connecting Nodes 81 A Single-Linked List Class 81 Inserting a Node in a List 82 Removing a Node 83 Completing the KWSingleLinkedList Class 84 The get and set Methods 85 The add Methods 85 Exercises for Section 2.5 86 2.6 Double-Linked Lists and Circular Lists 87 The Node Class 88 Inserting into a Double-Linked List 88 Removing from a Double-Linked List 89 A Double-Linked List Class 90 Circular Lists 90 Exercises for Section 2.6 91 2.7 The LinkedList Class and the Iterator, ListIterator, and Iterable Interfaces 91 The LinkedList Class 91 The Iterator 92 The Iterator Interface 93 The Enhanced for Loop 95 The ListIterator Interface 95 Comparison of Iterator and ListIterator 97 Conversion between a ListIterator and an Index 97 The Iterable Interface 97 Exercises for Section 2.7 98 2.8 Application of the LinkedList Class 98 Case Study: Maintaining an Ordered List 99 Exercises for Section 2.8 105 2.9 Implementation of a Double-Linked List Class 105 Implementing the KWLinkedList Methods 106 A Class That Implements the ListIterator Interface 107 The Constructor 108 The hasNext and next Methods 108 The hasPrevious and previous Methods 109 The add Method 110 Inner Classes: Static and Nonstatic 112 Exercises for Section 2.9 113 2.10 The Collections Framework Design 114 The Collection Interface 114 Common Features of Collections 114 The AbstractCollection, AbstractList, and AbstractSequentialList Classes 116 The List and RandomAccess Interfaces (Advanced) 116 Exercises for Section 2.10 117 Chapter Review 117 Java API Interfaces and Classes Introduced in This Chapter 118 User-Defined Interfaces and Classes in this Chapter 119 Quick-Check Exercises 119 Review Questions 119 Programming Projects 120 Answers to Quick-Check Exercises 122 Chapter 3 Testing and Debugging 123 3.1 Types of Testing 124 Preparations for Testing 126 Testing Tips for Program Systems 126 Exercises for Section 3.1 127 3.2 Specifying the Tests 127 Testing Boundary Conditions 127 Exercises for Section 3.2 128 3.3 Stubs and Drivers 129 Stubs 129 Preconditions and Postconditions 129 Drivers 130 Exercises for Section 3.3 130 3.4 The JUnit5 Platform 130 Exercises for Section 3.4 135 3.5 Test-Driven Development 136 Exercises for Section 3.5 140 3.6 Testing Interactive Programs in JUnit 140 ByteArrayInputStream 141 ByteArrayOutputStream 141 Exercises for Section 3.6 142 3.7 Debugging a Program 143 Using a Debugger 144 The IntelliJ and Eclipse Debuggers 144 Exercises for Section 3.7 147 Chapter Review 148 Java API Classes Introduced in This Chapter 149 User-Defined Interfaces and Classes in This Chapter 149 Quick-Check Exercises 149 Review Questions 149 Programming Projects 149 Answers to Quick-Check Exercises 151 Chapter 4 Stacks, Queues, and Deques 152 4.1 Stack Abstract Data Type 153 Specification of the Stack Abstract Data Type 153 Exercises for Section 4.1 155 4.2 Stack Applications 156 Case Study: Finding Palindromes 156 Exercises for Section 4.2 160 4.3 Implementing a Stack 160 Implementing a Stack with an ArrayList Component 160 Implementing a Stack as a Linked Data Structure 162 Comparison of Stack Implementations 163 Exercises for Section 4.3 164 4.4 Additional Stack Applications 164 Case Study: Evaluating Postfix Expressions 165 Case Study: Converting from Infix to Postfix 170 Case Study: Converting Expressions with Parentheses 178 Tying the Case Studies Together 181 Exercises for Section 4.4 181 4.5 Queue Abstract Data Type 182 A Print Queue 182 The Unsuitability of a “Print Stack” 183 A Queue of Customers 183 Using a Queue for Traversing a Multi-Branch Data Structure 183 Specification for a Queue Interface 184 Class LinkedList Implements the Queue Interface 184 Exercises for Section 4.5 185 4.6 Queue Applications 186 Case Study: Maintaining a Queue 186 Exercises for Section 4.6 191 4.7 Implementing the Queue Interface 192 Using a Double-Linked List to Implement the Queue Interface 192 Using a Single-Linked List to Implement the Queue Interface 192 Using a Circular Array to Implement the Queue Interface 194 Overview of the Design 194 Implementing ArrayQueue 196 Increasing Queue Capacity 198 Implementing Class ArrayQueue.Iter 199 Comparing the Three Implementations 200 Exercises for Section 4.7 201 4.8 The Deque Interface 201 Classes that Implement Deque 202 Using a Deque as a Queue 203 Using a Deque as a Stack 203 Exercises for Section 4.8 204 Chapter Review 205 Java API Classes Introduced in This Chapter 205 User-Defined Interfaces and Classes in This Chapter 205 Quick-Check Exercises 206 Review Questions 207 Programming Projects 208 Answers to Quick-Check Exercises 211 Chapter 5 Recursion 213 5.1 Recursive Thinking 214 Steps to Design a Recursive Algorithm 216 Proving that a Recursive Method Is Correct 218 Tracing a Recursive Method 218 The Run-Time Stack and Activation Frames 219 Exercises for Section 5.1 220 5.2 Recursive Definitions of Mathematical Formulas 221 Tail Recursion versus Iteration 225 Efficiency of Recursion 225 Exercises for Section 5.2 228 5.3 Recursive Array Search 229 Design of a Recursive Linear Search Algorithm 229 Implementation of Linear Search 230 Design of a Binary Search Algorithm 231 Efficiency of Binary Search 232 The Comparable Interface 233 Implementation of Binary Search 233 Testing Binary Search 235 Method Arrays.binarySearch 236 Exercises for Section 5.3 236 5.4 Recursive Data Structures 236 Recursive Definition of a Linked List 237 Class LinkedListRec 237 Method size 237 Method toString 238 Method replace 238 Method add 239 Removing a List Node 239 Exercises for Section 5.4 240 5.5 Problem Solving with Recursion 241 Case Study: Towers of Hanoi 241 Case Study: Counting Cells in a Blob 246 Exercises for Section 5.5 250 5.6 Backtracking 250 Case Study: Finding a Path through a Maze 251 Exercises for Section 5.6 255 Chapter Review 255 User-Defined Classes in This Chapter 256 Quick-Check Exercises 256 Review Questions 256 Programming Projects 257 Answers to Quick-Check Exercises 258 Chapter 6 Trees 259 6.1 Tree Terminology and Applications 260 Tree Terminology 260 Binary Trees 261 Some Types of Binary Trees 262 General Trees 265 Exercises for Section 6.1 266 6.2 Tree Traversals 267 Visualizing Tree Traversals 268 Traversals of Binary Search Trees and Expression Trees 268 Exercises for Section 6.2 269 6.3 Implementing a BinaryTree Class 270 The Node Class 270 The BinaryTree Class 271 The Constructors 272 The getLeftSubtree and getRightSubtree Methods 273 The isLeaf Method 274 The toString Method 274 The Recursive toString Method 274 Exercises for Section 6.3 276 6.4 Lambda Expressions and Functional Interfaces 277 Functional Interfaces 278 A General Preorder Traversal Method 281 Using preOrderTraverse 282 Exercises for Section 6.4 282 6.5 Binary Search Trees 283 Overview of a Binary Search Tree 283 Performance 284 Interface SearchTree 284 The BinarySearchTree Class 285 Implementing the find Methods 286 Insertion into a Binary Search Tree 287 Implementing the add Methods 287 Removal from a Binary Search Tree 289 Implementing the delete Methods 291 Method findLargestChild 293 Testing a Binary Search Tree 294 Case Study: Writing an Index for a Term Paper 294 Exercises for Section 6.5 297 6.6 Heaps and Priority Queues 298 Inserting an Item into a Heap 298 Removing an Item from a Heap 299 Implementing a Heap 299 Performance of the Heap 302 Priority Queues 302 The PriorityQueue Class 303 The offer Method 305 The poll Method 306 The Other Methods 307 Exercises for Section 6.6 307 6.7 Huffman Trees 308 Case Study: Building a Custom Huffman Tree 309 Exercises for Section 6.7 315 Chapter Review 316 Java API Interfaces and Classes Introduced in This Chapter 317 User-Defined Interfaces and Classes in This Chapter 317 Quick-Check Exercises 317 Review Questions 318 Programming Projects 318 Answers to Quick-Check Exercises 321 Chapter 7 Sets and Maps 322 7.1 Sets and the Set Interface 323 The Set Abstraction 323 The Set Interface and Methods 325 Using Method of to Initialize a Collection 327 Comparison of Lists and Sets 327 Exercises for Section 7.1 328 7.2 Maps and the Map Interface 329 The Map Hierarchy 330 The Map Interface 330 Creating a Map 331 Exercises for Section 7.2 333 7.3 Hash Tables 333 Hash Codes and Index Calculation 334 Methods for Generating Hash Codes 335 Open Addressing 335 Table Wraparound and Search Termination 336 Traversing a Hash Table 338 Deleting an Item Using Open Addressing 338 Reducing Collisions by Expanding the Table Size 338 Algorithm for rehashing 339 Reducing Collisions Using Quadratic Probing 339 Problems with Quadratic Probing 340 Chaining 340 Performance of Hash Tables 341 Performance of Open Addressing versus Chaining 341 Performance of Hash Tables versus Sorted Arrays and Binary Search Trees 342 Storage Requirements for Hash Tables, Sorted Arrays, and Trees 342 Storage requirements for Open Addressing and Chaining 343 Exercises for Section 7.3 343 7.4 Implementing the Hash Table 345 Interface KWHashMap 345 Class Entry 345 Class HashtableOpen 346 Class HashtableChain 351 Testing the Hash Table Implementations 354 Exercises for Section 7.4 355 7.5 Implementation Considerations for Maps and Sets 355 Methods hashCode and equals 355 Implementing HashSetOpen 356 Writing HashSetOpen as an Adapter Class 356 Implementing the Java Map and Set Interfaces 357 Interface Map.Entry and Class AbstractMap.SimpleEntry 357 Creating a Set View of a Map 358 Method entrySet and Classes EntrySet and SetIterator 358 Classes TreeMap and TreeSet 359 Exercises for Section 7.5 360 7.6 Additional Applications of Maps 360 Case Study: Implementing a Cell Phone Contact list 360 Case Study: Completing the Huffman Coding Problem 362 Encoding the Huffman Tree 366 Exercises for Section 7.6 367 7.7 Navigable Sets and Maps 367 Application of a NavigableMap 369 Exercises for Section 7.7 371 7.8 Skip-Lists 371 Skip-List Structure 372 Searching a Skip-List 372 Performance of a Skip-List Search 373 Inserting into a Skip-List 373 Increasing the Height of a Skip-List 374 Implementing a Skip-List 374 SkipList Methods for Search and Retrieval 375 Method put for Inserting into a Skip-List 376 Constants and Methods for Computing Random Level 378 Performance of a Skip-List 378 Testing Class Skip-List 379 Exercises for Section 7.8 379 Chapter Review 380 Java API Interfaces and Classes Introduced in This Chapter 381 User-Defined Interfaces and Classes in This Chapter 381 Quick-Check Exercises 381 Review Questions 382 Programming Projects 383 Answers to Quick-Check Exercises 384 Chapter 8 Sorting 385 8.1 Using Java Sorting Methods 386 Collections.sort Methods 389 Method List.sort 389 Exercises for Section 8.1 390 8.2 Selection Sort 390 Analysis of Selection Sort 391 Implementation of Selection Sort 392 Exercises for Section 8.2 393 8.3 Insertion Sort 393 Analysis of Insertion Sort 395 Implementation of Insertion Sort 395 Exercises for Section 8.3 396 8.4 Comparison of Quadratic Sorts 397 Comparisons versus Exchanges 398 Exercises for Section 8.4 398 8.5 Shell Sort: A Better Insertion Sort 398 Analysis of Shell Sort 400 Implementation of Shell Sort 400 Exercises for Section 8.5 401 8.6 Merge Sort 402 Analysis of Merge 403 Implementation of Merge 403 Design of Merge Sort 404 Trace of Merge Sort Algorithm 404 Analysis of Merge Sort 405 Implementation of Merge Sort 406 Exercises for Section 8.6 406 8.7 Timsort 407 Merging Adjacent Runs 410 Performance of Timsort 410 Implementation of Timsort 411 Exercises for Section 8.7 414 8.8 Heapsort 414 First Version of a Heapsort Algorithm 414 Analysis of Revised Heapsort Algorithm 416 Implementation of Heapsort 417 Exercises for Section 8.8 418 8.9 Quicksort 418 Algorithm for Quicksort 419 Analysis of Quicksort 420 Implementation of Quicksort 420 Algorithm for Partitioning 421 Implementation of partition 422 A Revised partition Algorithm 424 Implementation of Revised partition Method 425 Exercises for Section 8.9 426 8.10 Testing the Sort Algorithms 427 Exercises for Section 8.10 428 8.11 The Dutch National Flag Problem (Optional Topic) 428 Case Study: The Problem of the Dutch National Flag 429 Exercises for Section 8.11 431 Chapter Review 432 Java Classes Introduced in This Chapter 432 User-Defined Classes in This Chapter 432 Quick-Check Exercises 433 Review Questions 433 Programming Projects 433 Answers to Quick-Check Exercises 434 Chapter 9 Self-Balancing Search Trees 435 9.1 Tree Balance and Rotation 436 Why Balance Is Important 436 Rotation 436 Algorithm for Rotation 437 Implementing Rotation 438 Exercises for Section 9.1 440 9.2 AVL Trees 440 Balancing a Left–Left Tree 440 Balancing a Left–Right Tree 441 Four Kinds of Critically Unbalanced Trees 442 Implementing an AVL Tree 444 The AVLNode Class 445 Inserting into an AVL Tree 446 add Starter Method 447 Recursive add Method 447 Initial Algorithm for rebalanceLeft 448 The Effect of Rotations on Balance 448 Revised Algorithm for rebalanceLeft 449 Method rebalanceLeft 449 The decrementBalance Method 450 Removal from an AVL Tree 451 Performance of the AVL Tree 452 Exercises for Section 9.2 452 9.3 Red–Black Trees 453 Insertion into a Red–Black Tree 453 Implementation of Red–Black Tree Class 458 Algorithm for Red–Black Tree Insertion 458 The add Starter Method 460 The Recursive add Method 461 Removal from a Red–Black Tree 462 Performance of a Red–Black Tree 462 The TreeMap and TreeSet Classes 463 Exercises for Section 9.3 463 9.4 2–3 Trees 464 Searching a 2–3 Tree 465 Inserting an Item into a 2–3 Tree 465 Inserting into a 2-Node Leaf 465 Inserting into a 3-Node Leaf with a 2-Node Parent 466 Inserting into a 3-Node Leaf with a 3-Node Parent 466 Analysis of 2–3 Trees and Comparison with Balanced Binary Trees 468 Removal from a 2–3 Tree 469 Exercises for Section 9.4 470 9.5 B-Trees and 2–3–4 Trees 470 B-Trees 471 Implementing the B-Tree 472 Code for the insert Method 474 The insertIntoNode Method 475 The splitNode Method 476 Removal from a B-Tree 478 B+ Trees 479 2–3–4 Trees 480 Relating 2–3–4 Trees to Red–Black Trees 481 Exercises for Section 9.5 482 Chapter Review 483 Java Classes Introduced in This Chapter 484 User-Defined Interfaces and Classes in This Chapter 484 Quick-Check Exercises 485 Review Questions 486 Programming Projects 486 Answers to Quick-Check Exercises 489 Chapter 10 Graphs 492 10.1 Graph Terminology 493 Visual Representation of Graphs 493 Directed and Undirected Graphs 494 Paths and Cycles 494 Relationship between Graphs and Trees 496 Graph Applications 496 Exercises for Section 10.1 497 10.2 The Graph ADT and Edge Class 497 Representing Vertices and Edges 498 Exercises for Section 10.2 499 10.3 Implementing the Graph ADT 499 Adjacency List 499 Adjacency Matrix 501 Overview of the Hierarchy 501 Declaring the Graph Interface 502 The ListGraph Class 503 Comparing Implementations 506 Exercises for Section 10.3 507 10.4 Traversals of Graphs 508 Breadth-First Search 508 Depth-First Search 513 Exercises for Section 10.4 519 10.5 Applications of Graph Traversals 519 Case Study: Shortest Path through a Maze 519 Case Study: Topological Sort of a Graph 523 Exercises for Section 10.5 526 10.6 Algorithms Using Weighted Graphs 526 Finding the Shortest Path from a Vertex to All Other Vertices 526 Analysis of Dijkstra’s Algorithm 528 Minimum Spanning Trees 530 Exercises for Section 10.6 533 10.7 A Heuristic Algorithm A* to Find the Best Path 534 A* (A-Star) an Improvement of Dijkstra’s Algorithm 535 Exercises for Section 10.7 541 Chapter Review 541 User-Defined Classes and Interfaces in This Chapter 542 Quick-Check Exercises 542 Review Questions 543 Programming Projects 543 Answers to Quick-Check Exercises 545 Appendix A Introduction to Java A-1 A.1 The Java Environment and Classes A-2 The Java Virtual Machine A-3 The Java Compiler A-3 Classes and Objects A-3 The Java API A-3 The import Statement A-4 Method main A-4 Execution of a Java Program A-5 Use of jshell A-5 Exercises for Section A.1 A-6 A.2 Primitive Data Types and Reference Variables A-6 Primitive Data Types A-6 Primitive-Type Variables A-8 Primitive-Type Constants A-8 Operators A-8 Postfix and Prefix Increment A-10 Type Compatibility and Conversion A-10 Referencing Objects A-11 Creating Objects A-11 Exercises for Section A.2 A-12 A.3 Java Control Statements A-13 Sequence and Compound Statements A-13 Selection and Repetition Control A-13 Nested if Statements A-15 The switch Statement A-16 Exercises for Section A.3 A-17 A.4 Methods and Class Math A-17 The Instance Methods println and print A-18 Call-by-Value Arguments A-18 The Class Math A-18 Escape Sequences A-19 Exercises for Section A.4 A-20 A.5 The String, StringBuilder, StringBuffer, and StringJoiner Classes A-21 The String Class A-21 Strings Are Immutable A-23 The Garbage Collector A-24 Comparing Objects A-24 The String.format Method A-25 The Formatter Class A-26 The String.split Method A-27 Introduction to Regular Expressions A-27 Matching One of a Group of Characters A-27 Qualifiers A-27 Defined Character Groups A-28 Unicode Character Class Support A-29 The StringBuilder and StringBuffer Classes A-29 StringJoiner Class A-31 Exercises for Section A.5 A-32 A.6 Wrapper Classes for Primitive Types A-33 Exercises for Section A.6 A-34 A.7 Defining Your Own Classes A-35 Private Data Fields, Public Methods A-38 Constructors A-39 The No-Parameter Constructor A-39 Modifier and Accessor Methods A-40 Use of this. in a Method A-40 The Method toString A-40 The Method equals A-41 Declaring Local Variables in Class Person A-42 An Application that Uses Class Person A-42 Objects as Arguments A-43 Classes as Components of Other Classes A-44 Java Documentation Style for Classes and Methods A-44 Exercises for Section A.7 A-47 A.8 Arrays A-47 Data Field length A-49 Method Arrays.copyOf A-50 Method System.arrayCopy A-50 Array Data Fields A-51 Array Results and Arguments A-52 Arrays of Arrays A-52 Exercises for Section A.8 A-55 A.9 Enumeration Types A-56 Using Enumeration Types A-57 Assigning Values to Enumeration Types A-58 Exercises for Section A.9 A-58 A.10 I/O Using Streams, Class Scanner, and Class JOptionPane A-58 The Scanner A-59 Using a Scanner to Read from a File A-61 Exceptions A-61 Tokenized Input A-61 Extracting Tokens Using Scanner.findInLine A-62 Using a BufferedReader to Read from an Input Stream A-62 Output Streams A-62 Passing Arguments to Method main A-63 Closing Streams A-63 Try with Resources A-63 A Complete File-Processing Application A-64 Input/Output Using Class JOptionPane A-65 Converting Numeric Strings to Numbers A-66 GUI Menus Using Method showOptionDialog A-66 Exercises for Section A.10 A-67 A.11 Catching Exceptions A-67 Catching and Handling Exceptions A-68 Exercises for Section A.11 A-74 A.12 Throwing Exceptions A-74 The throws Clause A-74 The throw Statement A-75 Exercises for Section A.12 A-78 Appendix Review A-79 Java Constructs Introduced in This Appendix A-81 Java API Classes Introduced in This Appendix A-81 User‐Defined Interfaces and Classes in This Appendix A-82 Quick‐Check Exercises A-82 Review Questions A-82 Programming Projects A-83 Answer to Quick‐Check Exercises A-84 Appendix B Overview of UML A-85 B.1 The Class Diagram A-85 Representing Classes and Interfaces A-86 Generalization A-87 Inner or Nested Classes A-88 Aggregation and Composition A-88 B.2 Object Diagrams A-89 Glossary G-1 Index I-1
£113.95
John Wiley & Sons Inc Job Ready Java
Book SynopsisPrepare yourself to take on new and exciting Java programming challenges with this one-stop resource Job Ready Javadelivers a comprehensive and foundational approach to Java that is immediately applicable to real-world environments. Based on thehighly regarded and effectiveSoftware Guild Java Bootcamp: Object Oriented Programming course, this book teaches youthebasic and advanced Java concepts you will need at any entry-level Java position. With the Pulling It Together sections, you'll combine and integrate the concepts and lessons taught by the book, while also benefiting from: A thorough introductionto getting set up with Java, including how towrite, compile, and run Java programs withor withoutaJava IDEPractical discussions of the basics oftheJavalanguage, including syntax, program flow, and code organizationA walkthrough the fundamentals of Object-Oriented Programming including Classes, Objects, Interfaces, and Inheritance,and how to leverage OOPin Javato create elegant code.ExplorTable of ContentsAbout the Authors v About the Technical Writer vii About the Technical Editors vii Acknowledgments ix Introduction xxv Part I: Getting Set Up 1 Lesson 1: Installing Java 2 The Java Universe 3 The Java Development Kit 3 The Java Virtual Machine 4 The Java Runtime Environment 5 Installing OpenJDK 5 Installing OpenJDK on Microsoft Windows 6 Checking for an Existing JDK on Windows 6 Installing OpenJDK 7 Verifying the Installation 10 Installing OpenJDK on macOS 13 Checking for an Existing JDK on macOS 13 Installing OpenJDK 13 Verifying the Installation 17 Creating Your First Java Program 17 Writing the Program 18 Compiling and Running the Program 19 Dealing with Syntax Errors 21 Using the Compiler and Java Virtual Machine 22 Summary 22 Lesson 2: Installing a Development Environment: NetBeans 24 Getting Started 25 Understanding the Value of an IDE 25 Using the Source Code Editor 25 Using the Build Automation Tools 26 Using the Debugger 26 Installing NetBeans 27 Using an Installer 27 Installing on Windows 28 Installing on macOS 32 Installing Binaries 37 Installing Binaries on Windows 40 Adding the JDK 42 Running NetBeans 44 Summary 45 Lesson 3: Using an Integrated Development Environment 46 Using an IDE 47 Creating a New Project 48 Coding the “Hello, World!” Program 53 Compiling the Code in NetBeans 57 Running the Program 59 Using the Debugging Tools 60 Compilation and Syntax Errors 61 Runtime and Logic Errors 63 Understanding Source Control 67 Summary 69 Part II: Basics of Object Oriented Programming 70 Lesson 4: Using Program Statements and Variables 71 Approach 72 Concepts 73 Computers 73 Data vs. Information 73 Programs and Programming 74 Models and Metaphors 74 Objects 74 Specifications 75 Syntax vs. Semantics 75 Language Building Blocks 75 Comments 75 Single-Line Comments 76 Multiline Comments 76 Doc Comments 77 Using Comments 78 Identifiers 79 Data Types 80 Statically Typed Languages 81 Type Conversion 81 Literals 82 Variables 82 Constants 84 Operators and Expressions 84 Three Flavors of Operators 85 Operator Precedence 88 Pulling It All Together: Mathematical Expressions and Operators 89 Summary 93 Exercises 93 Exercise 1: ABeginning.java 94 Exercise 2: ProjectGutenberg.java 95 Exercise 3: CommentingCode.java 97 Exercise 4: AllTheMath.java 98 Exercise 5: BucketsOfFun.java 100 Lesson 5: Collecting and Parsing Input from the User 103 Console Input and Output 104 Adder Version 1 104 Adder Version 2 106 Declaring and Initializing Our Variables 106 Setting Up a Scanner Object 106 Understanding the Command Line 107 Getting the Values from the User 108 Going from Strings to Integers 108 Adding the Numbers Together 109 Using Loops to Gather User Input 111 Parsing Data 112 Dealing with Bad Numbers: NumberFormatException 113 Scanner Problems 115 Summary 121 Exercises 121 Exercise 1: Quest for the User Input 121 Exercise 2: Don’t Forget to Store It 123 Exercise 3: Passing the Turing Test 124 Exercise 4: Healthy Hearts 125 Exercise 5: Mini Mad Libs 126 Lesson 6: Pulling It All Together: Building a Useful Program 127 Planning the Program 128 Identifying the Variables 128 Planning the Steps 128 Creating the Code 129 Declaring the Variables 129 Getting Input 130 Converting the Strings 131 Calculating the Area and Perimeter 132 Calculating the Cost 133 Displaying the Results 133 Running the Program 135 Summary 135 Exercises 136 Exercise 1: Mapping Instructions to Code 136 Exercise 2: Adding Prompts for Costs 136 Exercise 3: Adding Multiple Windows 136 Exercise 4: Adding Validation 137 Lesson 7: Controlling Program Flow 138 What Can Our Code Do? 139 Decisions and Boolean Expressions 139 if Statements 139 if-else Statements 142 Chaining if-else Statements 144 Evaluating Multiple Conditions 146 Conditional-And and Conditional-Or Operators 147 Exclusive-Or 149 Ternary or Conditional Operator 150 switch Statement 151 Falling Through with a switch Statement 153 Comparing for Equal Strings 155 Summary 158 Exercises 159 Exercise 1: What Month is It? 159 Exercise 2: Guess Me 159 Exercise 3: Birthstones 160 Exercise 4: Trivia Night 161 Exercise 5: Space Rustlers 162 Exercise 6: Picky Eater 163 Exercise 7: Field Day 165 Lesson 8: Looping Program Flow 167 Loops 167 Using while Loops 168 Initializing the while Loop 171 Incrementing the while Loop 171 Breaking a Loop 172 Using do-while Loops 174 Making do-while Shine 176 Using for Loops 179 Initializing the for Loop 181 Terminating the for Loop 181 Incrementing a for Loop 181 Summary 184 Exercises 184 Exercise 1: Surfacing in BewareTheKraken.java 185 Exercise 2: Do or Do Not 185 Exercise 3: Guess Me Finally 186 Exercise 4: for and Twenty Blackbirds 187 Exercise 5: Spring Forward, Fall Back 188 Exercise 6: for Times 189 Exercise 7: for Times for 189 Exercise 8: Nesting for Loops 190 Exercise 9: Traditional Fizz Buzz 191 Lesson 9: Understanding Flowcharts and Algorithms 193 Flowchart Basics 194 Sequences 194 Branches 195 Loops 196 Flowcharting 197 Flowchart Example 197 Summary 198 Exercises 200 Exercise 1: A Guessing Game 200 A Possible Flowcharting Solution 201 The Guessing Game Flowchart 201 The Guessing Game Code 203 Lesson 10: Adding Randomness to Your Programs 207 Initializing the Random Object 208 Including the Random Class 208 Seeding Random Numbers 208 Generating Random Integers 209 Generating Random Doubles 210 Revisiting the Number Guessing Game 212 Other Random Options 215 Summary 215 Exercises 215 Exercise 1: A Little Chaos 216 Exercise 2: Opinionator—Making Random Choices 217 Exercise 3: High Roller 219 Exercise 4: Coin Flipper 220 Exercise 5: Guess Me More 220 Exercise 6: Fortune Cookie 221 Lesson 11: Debugging 222 Creating a File to Debug 222 Setting Breakpoints 224 Stepping through Code 226 Running the Debugger 226 Examining Variables 229 The Console and the Debugger 232 Summary 234 Exercises 234 Exercise 1: Odd Odd Numbers 234 Exercise 2: A Simple Question of If 235 Lesson 12: Adding Methods 237 Why Methods? 238 Defining Methods 238 Method Signature 239 Method Naming Conventions 239 Return Values 240 Using Return Values 241 Input Parameters 242 Matching Number of Parameters 244 Matching Parameter Types 245 Passing Parameters 246 Method Forms 248 No Return Value, No Parameters 248 Return Value, No Parameters 248 No Return Value, One or More Parameters 249 Return Value, One or More Parameters 249 The staticKeyword 249 Pulling It All Together 250 Identifying the Similarities 252 Identifying the Differences 252 Creating the Method 252 Setting the Name 252 Determining Parameters 253 Setting a Return Type 253 Our Basic Definition 253 Our Method Body 254 Using the Method 255 Scope 257 Debugging and Step Into 259 Setting a Breakpoint in a Method 260 Stepping into Code 262 Debugging and Scope 265 Summary 265 Exercises 265 Exercise 1: Method to the Madness 266 Exercise 2: Return to Sender 267 Exercise 3: MatchWork 268 Exercise 4: Barely Controlled Chaos 269 Lesson 13: Organizing with Arrays 272 What is an Array? 273 Types of Arrays 274 Element vs. Index 275 Declaring Arrays 276 Single-Dimensional Arrays 276 Rectangular Arrays 276 Jagged Arrays 277 Initializing Arrays 277 Initializing a Single-Dimensional Array 278 Initializing a Rectangular Array 279 Initializing a Jagged Array 280 Accessing Array Elements 281 Accessing Elements in a Single-Dimensional Array 281 Accessing Elements in a Multidimensional Array 283 Accessing Elements in a Jagged Array 284 Iterating through Arrays 284 Iterating through Multidimensional and Jagged Arrays 286 Sum the Elements of an Array 288 Looping Back to Front, with a Twist 289 Printing Pairs of Elements 290 Changing the Size of an Array 291 Dealing with Errors 293 Summary 293 Exercises 294 Exercise 1: A Rainbow 294 Exercise 2: Still Positive 295 Exercise 3: Fruit Basket 296 Exercise 4: Simple Combination 297 Exercise 5: Hidden Nuts 297 Exercise 6: Summative Sums 298 Part III: Fundamentals of Classes and Objects 299 Lesson 14: Object-Oriented Concepts 300 Abstraction 301 Object Orientation 301 Types 302 Public Interface/Private Implementation 302 Encapsulation and Data Hiding 303 Single Responsibility Principle and Cohesion 303 Delegation 304 Summary 304 Lesson 15: Creating Classes and Types 305 Creating New Types 305 Classes vs. Objects 307 Properties, Accessors, and Mutators 307 Dot Operator 308 this Keyword 309 Methods/Behaviors 309 Constructors 309 Object Instantiation and Method Invocation 311 Static Keyword 312 Static and the Main Method 313 Static and Constant Values 313 Static and Utility Methods 314 Pulling It All Together 315 Creating a New Class 316 Going Static 320 When to Go Static 323 Existing Static Methods 325 Summary 325 Exercises 326 Exercise 1: Class Modeling 327 Exercise 2: Refactoring 328 Exercise 3: A Multiclass Problem 330 Lesson 16: Managing Storage and Memory 331 Programs and Memory 331 The Stack 332 The Heap 334 Garbage Collection 338 Reference and Null Values 339 Summary 341 Lesson 17: Exploring Interfaces, Composition, and Inheritance 342 How Do These Tools Help? 343 Interfaces 344 Composition and Inheritance 345 Composition 345 Inheritance 346 Using Interfaces, Composition, and Inheritance 346 Summary 347 Lesson 18: Diving into Interfaces 348 What is an Interface? 349 Declaring an Interface 349 Implementing an Interface 350 Interface Restrictions 352 Implementing Multiple Interfaces 352 Extending an Interface 354 Interfaces and Polymorphism 356 Summary 357 Lesson 19: Diving into Composition 358 What is Composition? 359 Book without Composition 359 Book with Composition 360 Summary 362 Exercises 362 Exercise 1: Classroom Composition 362 Exercise 2: Cookbook 363 Lesson 20: Diving into Inheritance 365 Everything Extends Object 366 Terminology 366 Access Control 367 Inheritance 368 Code Reuse through Inheritance 371 Method Overloading 371 Method Overriding 373 Constructors 375 Polymorphism 380 Calling Methods Polymorphically 382 Abstract Base Classes 383 Summary 383 Exercises 383 Exercise 1: Working with Shape 384 Lesson 21: Understanding Collections 385 Collections in Java 385 Javadoc 386 Collections Framework Structure 387 Interface vs. Implementation 389 Iterator 390 Commonly Used Interfaces in the Collections Framework 390 Quick Look at List 390 ArrayList 390 Stack 391 Quick Look at Set 391 HashSet 391 TreeSet 392 Quick Look at Map 392 HashMap 392 TreeMap 392 Summary 393 Lesson 22: Introduction to Lists 394 List 394 Types of Lists 395 ArrayList 395 LinkedList 395 Stack 397 Understanding Generics 397 Using Lists 398 Instantiating a List 398 Adding Items to a List 401 Accessing Items in a List 402 Inserting Items into a List 403 Removing Items from a List 403 Enhanced Approaches to Access List Items 405 The Enhanced for Loop and Lists 406 Visiting Each Element: Iterators 407 Creating an Iterator 407 Using the Iterator 408 Summary 410 Exercises 410 Exercise 1: Three Threes 410 Exercise 2: Mixed-Up Animals 411 Lesson 23: Exploring Maps 412 Map Interface 412 HashMap 413 Creating and Adding Entries to a Map 413 Instantiating a Map 413 Adding Data to a Map 414 Manipulating with Entries in a Map 415 Looking Up Values in a Map 415 Replacing Data in a Map 417 Removing Values from a Map 417 Getting Keys and Listing Mapped Values in a Map 417 Listing All the Keys 417 Listing All the Values Key by Key 420 Listing All the Values: Value Collection 421 Summary 423 Exercises 423 Exercise 1: State Capitals 423 Exercise 2: A Reusable User I/O Class 424 Exercise 3: Student Quiz Scores 427 Lesson 24: Using Simple File Input and Output 429 Data Storage and Representation 430 File Format, Marshaling, and Unmarshaling 431 Student Class 432 File Format Example 433 Marshaling and Unmarshaling Approach 433 Simple File I/O 434 Writing to a File 435 Exceptions 436 The OutFile.txt File 437 Reading from a File 438 Summary 440 Exercises 440 Exercise 1: Creating State Capitals 441 Exercise 2: Hashing the State Capitals 442 Exercise 3: A State Guessing Game 442 Exercise 4: Objectifying States 443 Lesson 25: Applying Application Design 446 CRUD Applications 447 Using a Tiered Design 448 The Basic Tiers 448 The Model-View-Controller Pattern 448 Packages 449 Software Development Lifecycle Overview 450 Waterfall 450 Iterative Development 451 Agile Development 451 Project Lifecycle 452 Phase 1: Inception 452 Phase 2: Elaboration 452 Phase 3: Construction 453 Phase 4: Transition 453 Iterations 453 Summary 454 Lesson 26: Handling Exceptions 455 Exception Handling 456 Catch or Specify Requirement 459 Exception Types 459 Handling (Catching) Exceptions 459 try Block 459 catch Block 461 finally Block 462 Specifying and Throwing Exceptions 464 Exception Translation and Encapsulation 465 Summary 466 Exercises 466 Exercise 1: Keep On Asking 466 Exercise 2: Arrays Gone Bad 466 Exercise 3: Exiting Gracefully 468 Lesson 27: Pulling It All Together: Building the Class Roster App 469 Application Requirements and Use Cases 470 Understanding the Application Structure 470 Interface Relationships 471 Composition Relationships 472 Inheritance Relationships 472 Classes and Interfaces in Our Application 472 MVC Rules of the Game 473 Construction Approach 473 Setting Up the Class Roster Application Shell 474 Creating the Menu System 477 UserIO and UserIOConsoleImpl 478 ClassRosterController 482 App 483 ClassRosterView 484 ClassRosterController 485 Adding a Student Use Case 487 Student (DTO) 487 ClassRosterDao and ClassRoster-DaoFileImpl 488 ClassRosterDao 488 ClassRosterDaoFileImpl 490 ClassRosterView 491 ClassRosterController 493 Viewing All Students Use Case 494 ClassRosterDaoFileImpl 494 ClassRosterView 495 ClassRosterController 496 Getting a Student Use Case 497 ClassRosterDaoFileImpl 498 ClassRosterView 498 ClassRosterController 499 Removing a Student Use Case 501 ClassRosterDaoFileImpl 501 ClassRosterView 501 ClassRosterController 502 Handling Unknown Command and Exiting 504 ClassRosterView 504 ClassRosterController 504 Working with Dependency Injection 506 Implementation 507 ClassRosterController 507 ClassRosterView 508 App 508 Handling Application Exceptions 509 ClassRosterDaoException 509 Adding File Persistence 512 ClassRosterDaoFileImpl 512 Constants 512 unmarshalStudent 513 loadRoster 514 marshalStudent 516 writeRoster 517 addStudent 518 getAllStudents 519 getStudent 520 removeStudent 520 ClassRosterDao 521 ClassRosterView 522 ClassRosterController 522 Create roster.txt 525 Summary 527 Exercises 527 Exercise 1: DVD Library Update 527 Exercise 2: Electronic Address Book 528 Part IV: Intermediate Java 531 Lesson 28: Exploring the Service Layer 532 The Role of the Service Layer 532 Service Layer Exceptions 534 Service Layer API Design 534 New Business Rules 534 Create a Student 535 Define the Method Signature 535 Define the Return Type 535 Define the Errors That Might Occur in This Method 535 Service Layer Methods for Getting Students 536 Get All Students 536 Get a Single Student 537 Remove a Student 537 Summary 537 Lesson 29: Pulling It All Together: Coding the Class Roster Service Layer 538 Create a Service Layer Interface 539 Create New Exceptions 542 ClassRosterDuplicateIdException 542 ClassRosterDataValidation Exception 543 Refactor/Rename ClassRoster-DaoException 543 Create the Service Layer Implementation 546 Constructor and DAO Member 547 Validating Student Data 547 Create Student 548 Get All Students 549 Get One Student 549 Remove Student 550 Modify the Controller 550 Replace Member Field 551 Modify Constructor 551 Replace Calls to DAO Methods with Calls to the Service Layer Method 551 Modify the App 553 Add the Audit Log Feature 554 Audit DAO Interface and Implementation 554 Modify the Service Layer 556 Add Member Field 556 Modify the Constructor 556 Modify createStudent 556 Modify removeStudent 557 Modify App 558 Summary 559 Lesson 30: Doing Unit Testing 560 Unit Testing 561 Types of Unit Testing 561 Black-Box vs. Glass-Box Testing 562 Stateful vs. Stateless Components 562 Test-Driven Development and Red/Green/Refactor 562 Test Stubs 563 JUnit 563 Test Setup and Teardown 563 Annotations 564 Asserts 564 Given/When/Then 564 Stateless Unit Testing 565 What Makes a Good Unit Test? 565 Designing a Test Plan 565 Happy Llama Test Plan 567 Implementing Unit Tests 568 Creating the Test Class 568 Writing Happy Llama Tests 569 Running JUnit Tests 571 Summary 575 Lesson 31: Testing Stateful Code 577 Unit Testing Stateful Code 578 Separating Production and Test Data 579 Adding hashCode and equals to Student 580 Adding toString to Student 582 Creating the Test Class 583 The Set Up and Tear Down Methods 584 Arrange/Act/Assert for Stateful Code 585 Class Roster DAO Test Design 586 Add Student 586 Get Student 588 ClassRosterDaoTest: Adding and Getting a Student 589 Get All Students 590 ClassRosterDaoTest: Adding and Getting All Students 590 Remove Student 592 ClassRosterDaoTest: Adding and Removing Students 592 Unit Testing the Service Layer 594 Planning the Test Design 595 Creating the Test Class 595 Creating the DAO Stubs 596 ClassRosterAuditDaoStubImpl 597 ClassRosterDaoStubImpl 597 Test Setup 599 Test Implementation 600 testCreateValidStudent 600 testCreateStudentDuplicateId 601 testCreateStudentInvalidData 602 testGetAllStudents 603 testGetStudent 603 testRemoveStudent 604 Summary 605 Exercises 605 Exercise 1: Testing the Address Book App 605 Exercise 2: Testing the DVD Library 606 Lesson 32: Including Magic Numbers and Enums 607 Magic Numbers 608 Enums 608 Creating Enums for Fixed Constants 609 Using Enums 609 Getting Values from an Enum 611 Enum Members 612 Summary 616 Exercises 616 Exercise 1: How Many Days until Friday? 617 Exercise 2: Playing Cards 617 Lesson 33: Manipulating Dates and Times 618 ISO Calendar 619 Human Time and Machine Time 619 Local and Zoned Classes 619 Periods and Duration 620 Working with LocalDate Objects 620 Creating LocalDates 620 Converting Dates to and from Strings 622 Formatting Dates 623 Using Localization 625 Getting the Time with LocalDateTime 626 Working with Date Calculations 628 Calculating Dates in the Future and Past 628 Calculating the Time between Two Dates 630 Working with Legacy Dates 632 Converting Date Objects 632 Converting a GregorianCalendar Object 633 Summary 635 Exercises 635 Exercise 1: Birthday Calculator 635 Exercise 2: It’s The End of the World as We Know It 636 Exercise 3: Tracking Your Time 636 Lesson 34: Using the BigDecimal Class 638 Exploring BigDecimal 639 Constructing BigDecimals 639 Understanding Scale 641 Understanding Rounding Modes 641 Working with BigDecimal 642 Setting Scale 642 Setting Scale without Rounding Mode 643 Rounding BigDecimals 643 Doing Calculations with BigDecimals 645 Dividing BigDecimals 646 Summary 648 Exercises 648 Exercise 1: Interest Calculator 648 Exercise 2: Car Lot Service Layer 649 Lesson 35: Working with Lambdas and Streams 653 Using Aggregate Operations 654 Understanding Pipelines and Streams 654 Streams vs. Iteration 655 Exploring Lambdas 655 Working with Stream and Lambda Syntax 655 The forEach() Stream Method 656 The filter Stream Method 660 The map Stream Method 661 The collect Stream Method 663 Further Syntax 664 Summary 665 Exercises 665 Exercise 1: Only the Young 665 Exercise 2: DVD Library Update 666 Part V: Advanced Java 667 Lesson 36: Working with the Spring Framework 668 Dependency Injection and Programming to Interfaces 669 Why Spring? 670 Understanding the Spring Approach 670 Plain Old Java Objects 671 Templates 671 Pulling It All Together: Spring DI in Action 673 Spring DI with XML 674 XML Configuration File 675 Update the App Class 676 Spring DI with Annotations 677 Class Annotations 678 Summary 681 Lesson 37: Introducing Maven 682 What is Maven? 683 Project Object Model 683 Project Identification 685 Dependencies 685 Build Settings 686 Dependency Management 686 Maven Lifecycle 687 Summary 687 Lesson 38: Pulling It All Together: Building the Class Roster with Spring 689 Include the Spring Libraries 690 How Do I Know What My Dependency Entry Should Be? 691 Add Spring Configuration Files 692 Convert the App Class to Use Spring 693 Defining Beans 694 Modifying the App Class 696 Convert the Unit Tests to Use Spring 697 Defining Beans 698 Modifying the Test Class Constructor 699 Exception Conditions 700 Summary 701 Exercises 701 Exercise 1: DVD Library 701 Part VI: Appendices 702 Appendix A: Code Checklist 703 Functionality 703 Style 703 Appendix B: Java concepts Study List 705 Variables 705 Methods 705 Arrays 706 Making Decisions 706 Loops 706 Java/JVM 706 Objects 707 Interfaces 708 Inheritance 708 N-Tier Design 708 Collections 709 Exceptions 709 Lambdas/Streams 709 Spring Core 709 Appendix C: Agile Approach Checklist for Console CRUD Applications 710 Assumptions 710 Requirement Steps 711 Design Steps 711 Construction Steps 712 Index 714
£26.34
John Wiley & Sons Inc Agile 2
Book SynopsisAgile is broken. Most Agile transformations struggle. According to an Allied Market Research study, 63% of respondents stated the failure of agile implementation in their organizations. The problems with Agile start at the top of most organizations with executive leadership not getting what agile is or even knowing the difference between success and failure in agile. Agile transformation is a journey, and most of that journey consists of people learning and trying new approaches in their own work. An agile organization can make use of coaches and training to improve their chances of success. But even then, failure remains because many Agile ideas are oversimplifications or interpreted in an extreme way, and many elements essential for success are missing. Coupled with other ideas that have been dogmatically forced on teams, such as agile team rooms, and an overall inertia and resistance to change in the Agile community, the Agile movement is ripe for change since its birth twenty years ago. Agile 2 represents the work of fifteen experienced Agile experts, distilled into Agile 2: The Next Iteration of Agile by seven members of the team. Agile 2 values these pairs of attributes when properly balanced: thoughtfulness and prescription; outcomes and outputs, individuals and teams; business and technical understanding; individual empowerment and good leadership; adaptability and planning. With a new set of Agile principles to take Agile forward over the next 20 years, Agile 2 is applicable beyond software and hardware to all parts of an agile organization including Agile HR, Agile Finance, and so on. Like the original Agile, Agile 2, is just a set of ideas - powerful ideas. To undertake any endeavor, a single set of ideas is not enough. But a single set of ideas can be a powerful guide.Table of ContentsAbout the Authors vii Acknowledgments xi Foreword xv Preface xix 1 How Did We Get Here? 1 2 Specific Problems 21 3 Leadership: The Core Issue 49 4 Ingredients That Are Needed 69 5 Kinds of Leadership Needed 121 6 What Effective Collaboration Looks Like 157 7 It’s All About the Product 181 8 Product Design and Agile 2 191 9 Moving Fast Requires Real-Time Risk Management 205 10 A Transformation is a Journey 245 11 DevOps and Agile 2 275 12 Agile 2 at Scale 299 13 System Engineering and Agile 2 335 14 Agile 2 in Service Domains 363 15 Conclusion 383 Index 391
£19.54
John Wiley & Sons Inc PatternOriented Software Architecture For Dummies
Book SynopsisImplement programming best practices from the ground up Imagine how much easier it would be to solve a programming problem, if you had access to the best practices from all the top experts in the field, and you could follow the best design patterns that have evolved through the years. Well, now you can.Table of ContentsIntroduction 1 Part I: Introducing Software Architecture and Patterns 7 Chapter 1: Software Architecture Basics 9 Chapter 2: Where Do Architectures Come From? 25 Chapter 3: What Do Software Architectures Look Like? 37 Chapter 4: Software Pattern Basics 55 Chapter 5: Seeing How Patterns Are Made and Used 73 Part II: Putting Patterns to Work 83 Chapter 6: Making Sense of Patterns 85 Chapter 7: Building Your Own Pattern Catalog 95 Chapter 8: Choosing a Pattern 103 Part III: Creating Your Application Architecture 115 Chapter 9: Building Functionality in Layers 117 Chapter 10: Piping Your Data through Filters 137 Chapter 11: Sharing Knowledge and Results on a Blackboard 151 Chapter 12: Coordinating Communication through a Broker 171 Chapter 13: Structuring Your Interactive Application with Model-View-Controller 189 Chapter 14: Layering Interactive Agents with Presentation-Abstraction-Control 209 Chapter 15: Putting Key Functions in a Microkernel 229 Chapter 16: Refl ecting and Adapting 245 Part IV: Designing with Other POSA Patterns 263 Chapter 17: Decomposing the System’s Structure 265 Chapter 18: Making a Component the Master 271 Chapter 19: Controlling Access 277 Chapter 20: Managing the System 285 Chapter 21: Enhancing Interprocess Communication 295 Chapter 22: Counting the Number of References 309 Part V: The Part of Tens 319 Chapter 23: Ten Patterns You Should Know 321 Chapter 24 Ten Places to Look for Patterns 327 Chapter 25: Ten Ways to Get Involved with the Pattern Community 333 Index 339
£18.69
John Wiley & Sons Inc Game and Graphics Programming for iOS and Android
Book SynopsisDevelop graphically sophisticated apps and games today! The smart phone app market is progressively growing, and there is new market gap to fill that requires more graphically sophisticated applications and games. Game and Graphics Programming for iOS and Android with OpenGL ES 2.Table of ContentsINTRODUCTION xvii CHAPTER 1: GETTING STARTED 1 Software Requirements 2 For iOS Developers 2 For Android Developers 2 Downloading the Book’s SDK 4 Importing Projects 5 For iOS Developers 5 For Android Developers 5 The Template 7 Summary 8 CHAPTER 2: SETTING UP YOUR GRAPHIC PROJECTIONS 9 The Three Basic Types of Projections 10 Orthographic 2D Projection 11 Program and Project Initialization 12 Vertex and Fragment Shader 14 Linking a Shader Program 17 The Drawing Code 19 Orthographic Projection 23 Getting Orthographic 23 Perspective Projection 26 Summary 27 CHAPTER 3: DEALING WITH COMPLEX GEOMETRY 29 The Wavefront File Format 29 Cube.obj 30 Cube.mtl 31 Preparing the OBJ Viewer Code 31 Loading an OBJ 32 Building the Shaders 35 The Vertex Shader 35 The Fragment Shader 36 Vertex Buffer Object 36 Storing the Vertex Data 37 Building the Vertex Data Array VBO 38 Building the Element Array VBO 39 Building the VAO 40 Rendering Momo 42 Handling Touche 44 Per-Vertex Lighting 46 Vertex Shader Light Calculation 46 Modifying the Fragment Shader 47 More Uniforms 48 Making Momo Furrier 50 Loading the Texture 50 Adjusting the Vertex Data 51 Adding UV Support to the Vertex Shader 52 Adding Texture Support to Your Fragment Shader 53 Binding the Texture 53 Summary 54 CHAPTER 4: BUILDING A SCENE 57 Handling Multiple Objects 58 The Code Structure 58 Loading and Drawing the Scene 59 The Shaders Code 63 The Different Object Types 64 The Drawing Sequence 64 Fixing the Scene 65 Uber Shader 65 Using Your Uber Shader 66 Render Loop Objects Categorization 69 Double-Sided 71 Per-PixelLighting 73 Making the Vertex Shader Even Fatter 73 Getting the Fragment Shader More Uber 74 Wrapping Up the Implementation 76 Summary 79 CHAPTER 5: OPTIMIZATION 81 The Base App 82 Triangles to Triangle Strips 82 Building Triangle Strips 83 Texture Optimization 84 Adding 16-Bit Texture Conversion 85 PVR Texture Compression 86 Faking Details 87 Bump Mapping Implementation 87 Precision Qualifiers Optimization 88 The Normal Map Lighting Calculation 90 Adding Specularity 91 Geometry and Shaders LOD 92 Texture Atlas 93 Managing States in Software 94 Automatic Shader Optimization 94 Summary 95 CHAPTER 6: REAL-TIME PHYSICS 97 Types of Physical Objects 98 Physics Shapes 98 Using Bullet 100 Hello Physics 100 Collision Callbacks, Triggers, and Contacts 105 Contact-Added Callback 105 Near Callback 107 Contact Points 108 2D Physics 110 More Shapes! 110 Building the Physical Objects 113 Camera Tracking 114 User Interactions 116 The Game Logic 117 3D Physics 120 The Bullet File Format 120 3D Pinball Game 122 Summary 127 CHAPTER 7: CAMERA 129 Touch and Go! 130 The Camera Frustum 132 How to Build the Frustum 133 Frustum Clipping Implementation 134 More Clipping Functions 135 Camera Fly Mode 136 First-Person Camera with Collision Detection 140 3D Camera Tracking 143 Third-Person Camera with Collision 145 Summary 149 CHAPTER 8: PATHFINDING 151 Recast and Detour 151 Navigation 152 Creating the Navigation Mesh 153 3D Physics Picking 155 Player’s Auto Drive 159 Visualizing the Way Points 161 Catch Me If You Can! 163 Know Your Enemy 165 Game State Logic 167 Summary 170 CHAPTER 9: AUDIO AND OTHER COOL GAME PROGRAMMING STUFF 171 OpenAL 172 OGG Vorbis 173 Hello World OpenAL Style 174 Initializing OpenAL 174 Static In-Memory Sound Playback 175 Positional Sound Source 176 Piano Game 178 Loading a Static and Streamed Sound 178 Color Picking 182 Piano Game Logic 185 Final Adjustments 188 Rolling Ball Game 190 GFX Shaders 190 Linking the Positional Sound Sources 191 Accelerometer-Driven Camera 195 Cheap FX 198 Game Logic and Tweaks 200 Summary 205 CHAPTER 10: ADVANCED LIGHTING 207 Types of Lamps 208 Let There Be Light 208 Directional Lamp Shader 211 Struct as Uniforms 214 Point Light 217 Point Light Shader Code 218 Light Attenuation 221 Point Light with Attenuation Code 222 The Attenuation Uniforms 223 Spherical Point Light 224 Tweaking the Point Light Code 225 Spot Light 227 Spot Light Shader Code 229 Multiple Lights 231 Making the Shader Program Dynamic 233 Summary 234 CHAPTER 11: ADVANCED FX 237 Render to Texture 238 Post-Processing Effects 238 First Rendering Pass 241 Second Pass 242 Fullscreen Pass and Blur Shader 243 Projected Texture 246 Projector Shader 249 Projected Real-Time Shadows 250 Casting Shadows Using the Depth Texture 253 A Few More Words about the Frame Buffer Object 254 Particles 255 Summary 257 CHAPTER 12: SKELETAL ANIMATION 259 Traditional vs. Modern Animation Systems 260 The MD5 File Format 261 Loading an MD5 Mesh 261 Animating the Mesh 264 LERP 266 SLERP 267 Blending Animation 267 Additive Blending 269 Summary 271 INDEX 273
£23.99
John Wiley & Sons Inc Numerical Calculations in Clifford Algebra
Book SynopsisNUMERICAL CALCULATIONS IN CLIFFORD ALGEBRA An intuitive combination of the theory of Clifford algebra with numerous worked and computed examples and calculations Numerical Calculations in Clifford Algebra: A Practical Guide for Engineers and Scientists is an accessible and practical introduction to Clifford algebra, with comprehensive coverage of the theory and calculations. The book offers many worked and computed examples at a variety of levels of complexity and over a range of different applications making extensive use of diagrams to maintain clarity. The author introduces and documents the Clifford Numerical Suite, developed to overcome the limitations of existing computational packages and to enable the rapid creation and deployment of sophisticated and efficient code. Applications of the suite include Fourier transforms for arrays of any types of Clifford numbers and the solution of linear systems in which the coefficients are Clifford numbers of paTable of ContentsList of Figures xv List of Tables xix Preface xxi Part I Entities and Operations 1 1 Introduction 3 1.1 Operations 3 1.2 History 4 1.3 Alternative Forms 5 1.4 Naming 6 1.5 Structure 7 1.5.1 Algebraic 7 1.5.2 Numeric 8 1.6 Entities 11 References 12 2 Input 13 2.1 Syntax 13 2.2 Constants 14 2.2.1 Specific Types 14 2.2.2 General 16 2.3 Variables 19 2.3.1 Checking and Converting 19 Reference 23 3 Output 25 3.1 Tree Format 26 3.2 Numeric Formats 29 3.2.1 Default Format 29 3.2.2 Defined Format 31 3.3 Extended Formats 32 3.3.1 Rounding 32 3.3.2 Parts of Coefficients 33 3.4 Selected Components 35 3.5 Primitive Formats 36 3.6 Recovered Values 38 4 Unary Operations 41 4.1 Theory 41 4.1.1 Negation 41 4.1.2 Involution 41 4.1.3 Pair Exchange 42 4.1.4 Reversion 43 4.1.5 Clifford Conjugation 44 4.1.6 Supplementation and Pseudo-scalar 44 4.2 Practice 45 4.2.1 Example Code 45 4.2.2 Example Output 47 5 Binary Operations 49 5.1 Geometric Origins 49 5.1.1 Outer Multiplication 49 5.1.2 Orthogonal Components 52 5.1.3 Inner Multiplication 53 5.1.4 Names 54 5.2 Multiplication of Units 55 5.2.1 Progressive and Regressive Multiplication 55 5.2.2 Outer, Inner, and Central Multiplication 57 5.2.3 Multiplication By Scalars 58 5.3 Central Multiplication 59 5.3.1 Primal Units 60 5.3.2 Evolved and Other Units 61 5.3.3 Numbers 62 5.4 Practice 63 5.4.1 Example Code 63 5.4.2 Example Output 65 5.4.3 Multiplication Tables 65 References 70 6 Vectors and Geometry 71 6.1 Theory 71 6.1.1 Magnitude 71 6.1.2 Inverse 72 6.1.3 Reflection 72 6.1.4 Projection 73 6.1.5 Rotation 73 6.2 Practice 74 6.2.1 Example Code 74 6.2.2 Example Output 76 7 Quaternions 79 7.1 Theory 79 7.1.1 Magnitude 80 7.1.2 Inverse 80 7.1.3 Reflection and Projection 80 7.1.4 Rotation 81 7.1.5 Intersection 82 7.1.6 Factorisation 82 7.2 Practice 83 7.2.1 Example Code 83 7.2.2 Example Output 86 References 87 8 Pauli Matrices 89 8.1 Theory 89 8.1.1 Recovery of Components 90 8.1.2 Magnitude 90 8.1.3 Inverse 91 8.1.4 Reflection, Projection, and Rotation 91 8.2 Practice 91 8.2.1 Example Code 91 8.2.2 Example Output 94 Reference 95 9 Bicomplex Numbers 97 9.1 Theory 97 9.1.1 Conjugate 98 9.1.2 Magnitude 98 9.1.3 Inverse 98 9.1.4 Reflection, Projection, and Rotation 99 9.2 Practice 99 9.2.1 Example Code 99 9.2.2 Example Output 101 Reference 102 10 Electromagnetic Fields 103 10.1 Theory 103 10.1.1 Time and Frequency 103 10.1.2 Electromagnetic Entities 104 10.1.3 Dirac Operators 105 10.1.4 Maxwell’s Equations 105 10.1.5 Simplified Notation 105 10.1.6 Magnitude 106 10.1.7 Inverse 106 10.1.8 Reflection 107 10.1.9 Projection 107 10.1.10 Rotation 107 10.2 Practice 107 10.2.1 Example Code 107 10.2.2 Example Output 110 10.3 Field Arithmetic 112 10.3.1 Extensions Based on Quaternions 112 10.3.2 Inverses 113 10.3.3 Example Code 115 10.3.4 Example Output 117 References 118 11 Arrays of Clifford Numbers 119 11.1 Theory 119 11.2 Practice 120 11.2.1 Example Code 120 11.2.2 Example Output 123 Reference 125 12 Power Series 127 12.1 Theory 127 12.1.1 User Defined 127 12.1.2 Predefined 128 12.1.3 Convergence 129 12.1.4 Factorisation 130 12.1.5 Squaring 131 12.2 Practice 131 12.2.1 User Defined 131 12.2.2 Predefined 133 12.2.2.1 Standard Convergence 136 12.2.2.2 Extended Convergence 141 12.2.2.3 Doubly Extended Convergence 146 References 148 13 Matrices of Clifford Numbers 149 13.1 Background 149 13.2 Inversion 150 13.3 Practice 152 13.3.1 Example Code 152 13.3.2 Example Output 155 Reference 159 Part II Customisation 161 14 Memory 163 14.1 Memory Usage 163 14.2 Examples 165 14.2.1 Memory Tree Sparsity 165 14.2.2 Memory Expansion 170 14.2.3 Memory Recycling 171 14.2.3.1 Explicit and Implicit 171 14.2.3.2 Implicit and Nested 173 Reference 175 15 Errors 177 15.1 User Errors 177 15.1.1 Syntax Errors and Messages 180 15.2 System Errors 181 15.3 Recovery 182 15.4 Beneficial Usage 185 Reference 191 16 Extension 193 16.1 Accumulation 193 16.2 Multiplication 195 16.3 Transformation 197 16.4 Filtration 198 Part III Application 203 17 Verification 205 17.1 Identities 205 17.2 Tests 205 17.2.1 Example Code 205 17.2.2 Example Output 208 Reference 214 18 Lines Not Parallel 215 18.1 Theory 215 18.1.1 Common Plane 215 18.1.1.1 Inner Product 216 18.1.1.2 Outer Product 217 18.1.1.3 Geometrical Interpretation 217 18.1.2 No Plane in Common 218 18.1.2.1 Inner Product 219 18.1.2.2 Solution 219 18.2 Practice 220 18.2.1 Example Code 220 18.2.2 Example Output 223 Reference 224 19 Perspective Projection 225 19.1 Theory 225 19.2 Practice 225 19.2.1 Example Code 225 19.2.2 Example Output 229 Reference 230 20 Linear Systems 231 20.1 Theory 231 20.2 Practice 233 20.2.1 Example Code 233 20.2.2 Example Output 235 References 235 21 Fast Fourier Transform 237 21.1 Theory 237 21.2 Practice 238 21.2.1 Example Code 238 21.2.2 Example Output 243 References 244 22 Hertzian Dipole 245 22.1 Theory 245 22.2 Practice 246 22.2.1 Example Code 246 22.2.2 Example Output 251 Reference 253 23 Finite Difference Time Domain 255 23.1 Theory 255 23.1.1 Analytical Solution 255 23.1.2 Series Solution 256 23.1.3 Analytical Example 257 23.1.4 Numerical Derivatives 257 23.2 Practice 259 23.2.1 Example Code 259 23.2.2 Example Output 265 References 270 24 Cauchy Extension 271 24.1 Background 271 24.2 Theory 272 24.2.1 Two Dimensions 272 24.2.2 Three Dimensions 272 24.2.3 Singularity 273 24.2.4 The Taming Function 273 24.2.5 Construction 274 24.3 Practice 276 24.3.1 Example Code 276 24.3.2 Example Output 281 References 284 25 Electromagnetic Scattering 285 25.1 Background 285 25.2 Theory 286 25.3 Practice 288 25.3.1 Example Code 288 25.3.2 Example Output 289 References 293 Part IV Programming 295 26 Interfaces 297 26.1 Configuration and Observation 297 26.1.1 Management 297 26.1.2 Printing 298 26.2 Simple Entities 300 26.2.1 Units 300 26.2.2 Components 300 26.2.3 Numbers 302 26.2.3.1 Establishing and Recovering Values 302 26.2.3.2 Functions 303 26.2.3.3 Addition and Subtraction 304 26.2.3.4 Multiplication 304 26.2.3.5 Geometric 305 26.2.3.6 Filtering 305 26.3 Higher Entities 306 26.3.1 Vectors 306 26.3.2 Bicomplex Numbers 307 26.3.3 Quaternions 307 26.3.4 Pauli Matrices 308 26.3.5 Electromagnetic Fields 308 26.4 Multiple Entities 309 26.4.1 Arrays 309 26.4.2 Fast Fourier Transforms 309 26.4.3 Series 310 26.4.4 Matrices 310 Reference 311 27 Descriptions 313 27.1 Arguments 313 27.2 Data types 313 27.3 Formats 315 27.4 Manual Pages 316 27.4.1 A–e 316 27.4.2 F–j 342 27.4.3 K–o 369 27.4.4 P–t 387 27.4.5 U–z 468 27.5 Quick Reference 477 Reference 487 A Key to Example Code and Results 489 Index 493
£90.25
John Wiley & Sons Inc Programming Language Fundamentals
Book Synopsis
£71.55
O'Reilly Media Getting Started with Netduino
Book SynopsisLearn how to build electronics projects with Netduino, the popular platform that's capturing the imagination of makers and hobbyists worldwide. This easy-to-follow, hands-on book provides everything you need to start experimenting with Netduino and the open source .NET Micro Framework.
£14.39
O'Reilly Media Virtualization A Managers Guide
Book SynopsisIf you're contemplating the use of virtualization in any area of your network operations, this concise book presents a clear picture of the concepts involved.
£14.39
O'Reilly Media Make LEGO and Arduino Projects
Book SynopsisMake amazing robots and gadgets by combining two of the hottest DIY technologies: the venerable LEGO and the upstart Arduino. With this book, you'll focus on six projects, each more challenging and informative than the next. In each project, you'll explore different ways that Arduino adds functionality to LEGO Mindstorms.
£22.39
O'Reilly Media MapReduce Design Patterns
Book SynopsisThis handy guide brings together a unique collection of valuable MapReduce patterns that will save you time and effort regardless of the domain, language, or development framework you're using.
£28.79
O'Reilly Media Basic Arduino Projects
Book SynopsisThis companion book to MakerShed's Ultimate Arduino Microcontroller Pack provides 26 clearly explained projects that you can build with this top-selling kit right away--including multicolor flashing lights, timers, tools for testing circuits, sound effects, motor control, and sensor devices.
£14.39
Association for Computing Machinery Code Nation
Book SynopsisExplores the rise of software development as a social, cultural, and technical phenomenon in American history. The book emphasizes the technical and business challenges that software developers faced when building applications for CP/M, MS-DOS, UNIX, Microsoft Windows, the Apple Macintosh, and other emerging platforms.Table of Contents Acknowledgments How important is programming? Four computing mythologies FORTRAN, Logo, and the Tower of Babel Advocating computer literacy Four million BASIC programmers Power users, tinkerers, and gurus Hackers and cyberpunks Computer magazines and historical research Developing for MS-DOS: authors and entrepreneurs C programming nation: from Tiny C to Microsoft Windows "Evangelism is sales done right": PCs and commercial programming culture Afterword: programming in the Internet age Index
£46.80
Association for Computing Machinery Theories of Programming
Book SynopsisSir Tony Hoare has had an enormous influence on computer science, from the Quicksort algorithm to the science of software development, concurrency and program verification. This book presents the essence of his various works - the quest for effective abstractions - both in his own words as well as chapters written by leading experts in the field.
£46.80
Morgan & Claypool Publishers Theories of Programming
Book SynopsisSir Tony Hoare has had an enormous influence on computer science, from the Quicksort algorithm to the science of software development, concurrency and program verification. This book presents the essence of his various works - the quest for effective abstractions - both in his own words as well as chapters written by leading experts in the field.
£32.25
Association of Computing Machinery,U.S. Edsger Wybe Dijkstra
Book SynopsisEdsger Wybe Dijkstra (1930-2002) was one of the most influential researchers in the history of computer science, making fundamental contributions to both the theory and practice of computing. In this book, 31 computer scientists present and discuss Dijkstra’s numerous contributions to computing science and assess their impact.
£69.30
Association of Computing Machinery,U.S. Edsger Wybe Dijkstra
Book SynopsisEdsger Wybe Dijkstra (1930-2002) was one of the most influential researchers in the history of computer science, making fundamental contributions to both the theory and practice of computing. In this book, 31 computer scientists present and discuss Dijkstra’s numerous contributions to computing science and assess their impact.
£99.90
O'Reilly Media Maker Pro
Book SynopsisMaker Pro is a book of essays by more than a dozen prominent and up-and-coming professional makers (Maker Pros). Each essay includes advice and stories on topics such as starting a kit-making business, taking a hardware project open-source, and plenty of encouragement to "quit your day job."
£14.39
O'Reilly Media Raspberry Pi and AVR Projects
Book SynopsisWritten for intermediate to seasoned Raspberry Pi users, this book explores four projects from around the world, explained by their makers. These projects cover five major categories in the digital maker space: music, light, games, home automation, and the Internet of Things.
£16.99
Apress Pro Linux High Availability Clustering
Table of Contents High Availability Clustering and Its Architecture Configuring Storage Configuring the Membership Layer Understanding Pacemaker Architecture and Management Configuring Essential Cluster Settings Clustering Resources Clustering Storage Performing Daily Cluster Management Tasks Creating an Open Source SAN Use Case: Creating a Solution for Xen/KVM High Availability Use Case: Configuring a Load-Balanced Mail Front End with a Database Back End
£67.49
APress Building Chatbots with Python
Book Synopsis Build your own chatbot using Python and open source tools. This book begins with an introduction to chatbots where you will gain vital information on their architecture. You will then dive straight into natural language processing with the natural language toolkit (NLTK) for building a custom language processing platform for your chatbot. With this foundation, you will take a look at different natural language processing techniques so that you can choose the right one for you. The next stage is to learn to build a chatbot using the API.ai platform and define its intents and entities. During this example, you will learn to enable communication with your bot and also take a look at key points of its integration and deployment. The final chapter of Building Chatbots with Python teaches you how to build, train, and deploy your very own chatbot. Using open source libraries and machine learning techniques you will learnTable of ContentsChapter 1: Introducing Chatbots Chapter Goal: Make the user get familiar with Chatbots.Sub -Topics1. Do’s and Don'ts in Chatbots2. What are the limitations of chatbots and how we should solve them?3. What are different kind of chatbots ? Where do they fit in ?Chapter 2: Natural Language ProcessingChapter Goal: Be able to do custom natural language processing platform for your chatbotsSub - Topics 1. Installation of NLTK and methods in natural language processing.2. POS Tagging, Stemming, Lemmetization, 3. Logical SemanticsChapter 3: Chatbot DevelopmentChapter Goal: Building a chatbot and defining its data constraintsSub - Topics: 1. Using api.ai platform to create a chatbot2. Feeding data and defining Intents and entitiesChapter 4: Chatbot CommunicationChapter Goal: Enabling communication with the bot to make the bot respond to your queries.Sub - Topics: 1. Making our chatbot respond to our queries2. Integration and DeploymentChapter 5: Build-Train-DeployChapter Goal: To build, train and deploy a chatbot of your own Sub - Topics: 1. Getting acclimatize to use open source libraries to train your data2. Defining Intents and entities on your data3. Using ML algorithms to predict the intent and take action based on that4. Using your code in a web app to make a conversational agent.5. Deploy your app on your own server with AWS
£42.49
APress Pro .NET Benchmarking
Book Synopsis Use this in-depth guide to correctly design benchmarks, measure key performance metrics of .NET applications, and analyze results. This book presents dozens of case studies to help you understand complicated benchmarking topics. You will avoid common pitfalls, control the accuracy of your measurements, and improve performance of your software. Author Andrey Akinshin has maintained BenchmarkDotNet (the most popular .NET library for benchmarking) for five years and covers common mistakes that developers usually make in their benchmarks. This book includes not only .NET-specific content but also essential knowledge about performance measurements which can be applied to any language or platform (common benchmarking methodology, statistics, and low-level features of modern hardware). What You''ll Learn Be aware of the best practices for writing benchmarks and performance testsTable of Contents 1. Introducing Benchmarking 2. Common Benchmarking Pitfalls 3. How Environment Affects Performance 4. Statistics for Performance Engineers 5. Performance Analysis and Performance Testing 6. Diagnostics Tools 7. CPU-Bound Benchmarks 8. Memory-Bound Benchmarks 9. Hardware and Software Timers
£46.74
APress NSXT Logical Routing
Book SynopsisThis book is a one-stop guide for IT professionals with a background in traditional and software-defined networks looking to expand or hone their skill set and has been developed through a combination of extensive research and testing in both development and production environments. It provides reliable information on a fundamental component of NSX-T, logical routing.A comprehensive understanding of this capability will help IT professionals with design, implementation, troubleshooting, and enhancements.The book starts with an introduction to the foundational components of the NSX-T platform and how NSX-T fits into the software-defined data center. The focus then moves to tunnel endpoints, which is a critical aspect of the NSX-T platform, and the differences between overlays and underlays are explained. Once the basics are covered, it provides a detailed description of how NSX-T components communicate.Next, the book introduces logical routing and its components Table of ContentsChapter 1: Introduction The Modern-Day Software-Defined Data Center Software-Defined Datacenter Architecture VMware NSX-T: SDDC Networking The Basics of NSX-T Summary Chapter 2: Tunnel Endpoints Overlay Networking NSX-T Transport Node Communication Transport Node Types What Is a Tunnel Endpoint? Tunnel Endpoint Communication Routed Transport VLANs Tunnel Endpoint Configuration Tunnel Endpoint Failure Summary Chapter 3: Remote Tunnel Endpoints A Solution for Multiple Sites NSX-T Federation Components Summary Chapter 4: Logical Routing What Is Logical Routing? NSX-T Logical Components Logical Routing Architecture Packet Flow Within the NSX-T Fabric Summary Chapter 5: Data Plane Availability Edge Cluster Deployment Considerations Edge Failure Types Bidirectional Forwarding Detection (BFD) Equal Cost Multipathing (ECMP) Summary Chapter 6: Datacenter Routing Chapter Objectives Communication with the Physical Network NSX-T and BGP NSX-T and OSPF NSX-T and Static Routing Deterministic Peering Bidirectional Forwarding Detection (BFD) Unicast Reverse Path Forwarding (uRPF) Summary
£46.74
APress C 10 Quick Syntax Reference
Book SynopsisDiscover what's new in C# and .NET for Windows programming. This book isa condensed code and syntax reference to the C# programming language, updated with the latest features of version 10 for .NET 6.You'll review the essential C# 10 and earlier syntax, not previously covered, in a well-organized format that can be used as a handy reference. Specifically, unions, generic attributes, CallerArgumentExpression, params span, Records,Init only setters,Top-level statements,Pattern matching enhancements,Native sized integers,Function pointers and more. You'll find a concise reference to the C# language syntax: short, simple, and focused code examples; a well laid out table of contents; and a comprehensive index allowing easy review. You won't find any technical jargon, bloated samples, drawn-out history lessons, or witty stories. What you will find is a language reference that is to the point and highly accessible.The book is a must-have for any C# programmer. What You Will LearnEmploy nuTable of Contents1. Hello World2. Compile and Run3. Variables4. Operators5. Strings6. Arrays7. Conditionals8. Loops9. Methods10. Class11. Inheritance12. Redefining Members13. Access Levels14. Static15. Properties16. Indexers17. Interfaces18. Abstract19. Namespaces20. Enum21. Exception Handling22. Operator Overloading23. Custom Conversions24. Struct25. Preprocessors26. Delegates27. Events28. Generics29. Constants30. Asynchronous Methods
£25.19
APress Pro Freeware and Open Source Solutions for
Book SynopsisThis book will point the way to numerous free, low-cost, and open-source software solutions that could provide viable alternatives to their paid counterparts. Pro Freeware and Open Source Solutions for Business is now in its Second Edition; it has been thoroughly revised and updated. This book covers the most up-to-date software versions. Software described in the First Edition that is no longer available has been replaced with comparable titles when possible.The book starts with an office productivity tool known as OfficeLibre and goes on to explain CRM and compression software. You will then learn about desktop publishing, illustration, 3D modeling, and photo editing software. As we progress further, you will learn more about audio-video capture and editing software along with Openshot, an easy-to-use free video editor. You will also learn about available project planning and time tracking software, and much more. By the end of the book, you will have also gained knowledge about security programs, as well as how to use Linux on Windows and MacOS.With the challenging economic times we find ourselves in, this book may be more important than ever to help small business owners eliminate and reduce costs, and keep more money in their business. .What You Will Learn Understand the important differences between freeware and open-source software. Discern which paid commercial software the free version replaces (when applicable). Gain insight into how organizations and municipalities around the world adopting open-source software to save money on licensing fees. Who This Book Is ForPrimarily small business owners, solo entrepreneurs or freelancers on a budget, and cost efficiency experts.Table of ContentsChapter 1: Office Productivity, Note Taking, Accounting, and PDF Creation LibreOffice: The Powerful Free Office Suite LibreOffice Modules Writer Calc Impress Base Draw LibreOffice Support Google Docs: Create Documents and Collaborate Online Google Docs Google Sheets Google Slides Google Forms More Google Docs Support Google Keep: Create, Sync, and Share Notes Feature Highlights Google Keep Support Zim: Open-Source Note Taking Feature Highlights Zim Support GnuCash: Open-Source Accounting Software Feature Highlights GnuCash Support Manager: Free Small Business Accounting Software Feature Highlights Manager Support PDF reDirect: Basic PDF Creation Freeware Feature Highlights PDF reDirect Support Chapter Summary Chapter 2: Point-of-Sale, CRM, Backup, and Compression Software Imongo (Free Version): A Point-of-Sale Utility for the Small Shop or Boutique Feature Highlights Imonggo Support POS/Cash Register: Turn Your Old PC Into a Cash Register Feature Highlights POS/Cash Register Support Bitrx24 (Free Option): Basic CRM for Small Business Feature Highlights Bitrx24 Support FBackup (Free Option): A Free Basic Backup Utility Feature Highlights FBackup Support ZZip: An Open-Source Alternative to WinZip Feature Highlights 7Zip Support Chapter Summary Chapter 3: Desktop Publishing, Illustration, Painting, and 3D Modeling Google Docs: Easy, Basic Desktop Publishing Feature Highlights Google Docs Support Scribus: The Powerful, Professional, Open-Source Desktop Publishing Program Feature Highlights Design Capabilities Scribus Support Vectr:A Free, Basic On-line Vector Drawing Program Feature Highlights Design Capabilities Vectr Support Inkscape: Pro-Quality Open-Source Vector Drawing Software Feature Highlights Graphics Creation Inkscape Support Krita: The Powerful Open Source Digital Drawing and Painting Program Feature Highlights Document Creation Brush Presets Krita Support FreeCAD: Open-Source Parametric 3D Modeling Software Feature Highlights Drafting Capabilities FreeCAD Support Blender: The Ultimate Open-Source 3D Creation Software Feature Highlights Rendering Capabilities Blender Support Chapter Summary Chapter 4: Photo Editing Software PhotoScape: An Easy-to-Use Photo Editor for Beginners Feature Highlights Tools Filters Objects PhotoScape Support Paint.NET: Basic Image Editing for Windows Feature Highlights Editing Capabilities Graphics Creation Paint.NET Support GIMP: The Premier Open-Source Image Editor Feature Highlights Editing Capabilities Graphics Creation GIMP Support Pixlr: Web-Based and Mobile Device Photo Editing Feature Highlights Editing Capabilities darktable: An Open-Source Photography Workflow Program Feature Highlights Editing Capabilities darktable Support FotoSketcher: Automatically Turn Photos Into Digital Art Feature Highlights Editing Capabilities FotoSketcher Support Support Chapter Summary Chapter 5: Audio-Video Capture, Conversion, and Editing Software fre:ac: (Free Audio Converter)An Open-Source Audio Converter and CD Ripper Feature Highlights fre:ac Support AudacityⓇ: A Powerful Open-Source Audio Editor Feature Highlights Editing Capabilities AudacityⓇ Support MPEG Streamclip: A Handy Free Video Conversion Tool Feature Highlights Editing Capabilities MPEG Streamclip Support VirtualDub: Open-Source Video Processing for Windows Feature Highlights Editing Capabilities VirtualDubSupport OpenShot: A Simple, Powerful Free Video Editor Feature Highlights Editing Capabilities OpenShot Support Kdenlive: Open-Source Video Editing From Basic to Pro Feature Highlights Editing Capabilities Kdenlive Support Chapter Summary Chapter 6: Project Planning, Inventory Management, and Time Tracking Software ProjectLibre An Open Source Alternative to Microsoft Project Feature Highlights ProjectLibre Support monday.com: Free Basic Project Management Software Feature Highlights monday.com Support ABC Inventory: A Free Option for Small and Mid-Sized Business Feature Highlights ABC Inventory Support Homebase: Free Online Scheduling and HR Software Feature Highlights Homebase Support Chapter Summary Chapter 7: Website Creation Software and Web Browsers WordPress: Free, Open-Source Tool and Content Management System Feature HighlightsMulti-Use and Multi-BloggingWordPress Support Wix: Build a Basic Site for Free Feature HighlightsWix Support AVG Secure Browser:Browse More Securely and Privately Feature Highlights FireFox: The Browser that Respects Privacy Feature Highlights Chapter Summary Chapter 8: Content Management Solutions Drupal: An Open-Source, Community Based Alternative Feature Highlights Drupal Support ConcreteCMS (Formerly concrete5): An Open Source Content Management System Feature Highlights Concrete CMS Support GetSimple CMS: A Simple, Open-Source Content Management System Feature Highlights GetSimple CMS Support Chapter Summary Chapter 9: Security Programs Advanced IP Scanner: Free Scanner for IP Addresses Feature Highlights Advanced IP Scanner Support Keepass: A Free and Open-Source Password Manager Feature HighlightsKeepass Support tcpdump: A Powerful Command Line Packet Analyzer Feature Highlightstcpdump Support Avira: Powerful, Free Antivirus Protection for Personal PCs and Macs Feature Highlights Avira Support ClamAV: An Open-Source Cross Platform Anti-Virus ProgramFeature HighlightsClamAV SupportSignal (Formerly Open Whisper Systems): Open-Source Security for Mobile DevicesFeature HighlightsSignal SupportChapter Summary Chapter 10: Linux: The Free Alternative to Windows and Mac OS What is Linux?A Brief History of LinuxThe Advantages of Using LinuxUbuntu: Powering Millions of Laptop and Desktop Computers Around the WorldEase of UseUbuntu Dashboard and DesktopDownloading and Installing UbuntuUbuntu Software and Software CenterRunning Windows Applications on WINESecurityAccessory CompatibilityUbuntu Support Zorin OS: Especially for Newcomers to Linux The Look Changer Downloading and Installing Zorin OS Zorin OS Support Linux Mint: A Modern, Elegant Operating System Downloading and Installing Linux MintLinux Mint Support Chapter Summary
£37.99
APress Emerging Metaverse XR and Video Multimedia Technologies
Book SynopsisImprove the video multimedia services you work on or develop using tools from video service technologies such as Netflix, Disney+, YouTube, and Skype. This book introduces you to the core technologies that enable Metaverse XR (eXtended Reality) services and advanced video multimedia streaming services.First, you''ll find out about the current and future trends in Metaverse and video streaming services. XR is a combination of technologies that include MR, AR, VR, voice recognition systems, haptic and 3D-motion UIs, as well as head mounted displays) like Microsoft Hololens 2 and Oculus Quest 2. You''ll review metaverse services XR applications and learn more about the core XR feature extraction technologies. With XR capabilities mastered, you can move into the main technologies for video streaming services like Netflix, Disney+, and YouTube. You''ll also about video formats, such as H.264, MPEG-4 AVC, H.265, MPEG-5, and MPEG-DATable of ContentsChapter 1. Introduction to Metaverse and Video Streaming Technology and Services Metaverse XR (eXtended Reality) Technology Introduction Metaverse XR Products and Business Video Streaming Technology Introduction Video Streaming Services and Business Part-1: Metaverse XR Technologies Chapter 2. Metaverse XR Components XR, MR (Mixed Reality), AR (Augmented Reality) & VR (Virtual Reality) XR System Components & Workflow STT (Speech to Text) voice recognition technology Haptic & 3D-Motion UIs (User Interfaces) HMDs (Head Mounted Displays) Unity and Lua Programming Languages XR cloud cooperative computation and offloading Chapter 3. XR Feature Extraction Technologies (SIFT, SURF, FAST, BRIEF, ORB, BRISK & AI) XR Feature Detection & Description Technology XR System Processing & Feature Extraction SIFT (Scale Invariant Feature Transform) SURF (Speed-Up Robust Feature) FAST (Features from Accelerated Segment Test) BRIEF (Binary Robust Independent Elementary Features) ORB (Oriented FAST and Rotated BRIEF) BRISK (Binary Robust Invariant Scalable Keypoints) AI (Artificial Intelligence) Technologies Part-2: Video Streaming Technologies Chapter 4. Netflix, Disney+, YouTube, and Skype Video Technologies Netflix Disney+ YouTube Skype H.264/MPEG-4 AVC H.265/MPEG-5 H.266 Future Standards Futuristic Holography Technologies and Products (WayRay, SeeReal, RealView Imaging) Chapter 5. Video Streaming and MPEG-DASH Streaming Video Network Technology Push vs. Pull Media Streaming Video Frames (I, P, B Frames) & GOP (Group of Pictures) HTTP (Hypertext Transfer Protocol) MDP (Multimedia Presentation Description) MPEG-DASH (Moving Picture Experts Group - Dynamic Adaptive Streaming over HTTP) Chapter 6. CDN Video Streaming Technology CDN (Content Delivery Network) Introduction CDN Market CDN Technologies & Hierarchical Content Delivery & Mobile CDN Disney+ CDN Structure Netflix Open Connect CDN CDN AWS (Amazon Web Services) Cloud Support Chapter 7. Emerging Technologies What’s Next How to Future Proof Your Efforts Audience: Intermediate
£46.74
APress Blockchain Essentials
Book SynopsisThis book will teach you the core concepts of blockchain technology in a concise manner through straightforward, concrete examples using a range of programming languages, including Python and Solidity. The 50 programs presented in this book are all you need to gain a firm understanding of blockchain and how to implement it. The book begins with an introduction to the fundamentals of blockchain technology, followed by a review of its types, framework, applications and challenges. Moving ahead, you will learn basic blockchain programming with hash functions, authentication code, and Merkle trees. You will then dive into the basics of bitcoin, including wallets, digital keys, transactions, digital signatures, and more. This is followed by a crash course on Ethereum programming, its network, and ecosystem. As you progress through the book, you will also learn about Hyperledger and put your newly-gained knowledge to work through case studies and example applications. After reading this boTable of ContentsChapter 1: Introduction to Blockchain.- Chapter 2: Essentials of Blockchain Programming.- Chapter 3: The Bitcoin.- Chapter 4: Ethereum Blockchain.- Chapter 5: Hyperledger.- Chapter 6: Case Studies using Blockchain.- Chapter 7: Beyond Blockchain.
£42.49
O'Reilly Media Programming Chrome Apps
Book SynopsisWith this practical book, you'll learn how to build Google's unique apps to behave just like native apps so they can interact with hardware devices, access external files, and send notifications. Chrome Apps run on any platform that supports the Chrome browser - including OS X, Windows, Linux, as well as Android and iOS
£25.59
O'Reilly Media Building Tools with GitHub
Book SynopsisThis practical guide shows you how to build your own software tools for customizing the GitHub workflow. Each hands-on chapter is a compelling story that walks you through the tradeoffs and considerations for building applications on top of various GitHub technologies.
£25.59
O'Reilly Media Programming Beyond Practices
Book SynopsisWriting code is the easy part of your work as a software developer. This practical book lets you explore the other 90%-everything from requirements discovery and rapid prototyping to business analysis and designing for maintainability.
£19.19
O'Reilly Media Customizing Chef
Book SynopsisLearn how to customize Chef by examining the internal structure this configuration management tool and navigating its source code. This practical book also shows you how to integrate external tooling with Chef via the API, and takes a look at more advanced customization.
£25.59
O'Reilly Media RealWorld Software Development
Book SynopsisExplore the latest Java-based software development techniques and methodologies through the project-based approach in this practical guide. Unlike books that use abstract examples and lots of theory, Real-World Software Development shows you how to develop several relevant projects while learning best practices along the way.
£35.99
O'Reilly Media Managing Kubernetes
Book SynopsisWith this practical book, site reliability and DevOps engineers will learn how to build, operate, manage, and upgrade a Kubernetes cluster—whether it resides on cloud infrastructure or on-premises.
£28.79
O'Reilly Media Learning Dapr
Book SynopsisGet the authoritative guide on Dapr, the new distributed programming model that works with existing and new programming languages alike. Written by the model's creators, this introduction shows you how Dapr not only unifies stateless, stateful, and actor programming models but also runs everywherein the cloud or on the edge.
£39.74