Programmierung
Algorithmen in Python
Inhalt Algorithmen gehören zum Rüstzeug guter Entwickler und Programmierer. Dieses Buch stellt Ihnen eine Vielzahl an problemlösenden Techniken für den Programmieralltag vor und zeigt, wie Sie diese Techniken in Ihre Anwendungen implementieren. Dabei lernen Sie 32 Klassiker der Informatik kennen, vom einfachen Such-Algorithmus bis zu genetischen Algorithmen und neuronalen Netzen in der KI. Randvoll mit Codebeispielen in Python sowie Profitipps für Programmierer. Selbst wenn Ihnen einiges bekannt vorkommen wird, es warten zahlreiche Aha-Erlebnisse auf Sie. Ideal für alle, die ihre ersten Schritte in der Programmierung hinter sich haben und jetzt voll durchstarten wollen! - Programmieren trainieren mit bekannten und modernen Klassikern - Von der Suche bis zu k-Means, vom Dreizeiler bis zur dynamischen Programmierung und KI - Für Studium, Coding-Katas, Workouts oder in Eigeninitiative - Titel der amerikanischen Originalausgabe: "Classic Computer Science Problems in Python"
Hands-on Booting
Master the booting procedure of various operating systems with in-depth analysis of bootloaders and firmware. The primary focus is on the Linux booting procedure along with other popular operating systems such as Windows and Unix.Hands-on Booting begins by explaining what a bootloader is, starting with the Linux bootloader followed by bootloaders for Windows and Unix systems. Next, you’ll address the BIOS and UEFI firmware by installing multiple operating systems on one machine and booting them through the Linux bootloader. Further, you’ll see the kernel's role in the booting procedure of the operating system and the dependency between kernel, initramfs, and dracut. You’ll also cover systemd, examining its structure and how it mounts the user root filesystem. In the final section, the book explains troubleshooting methodologies such as debugging shells followed by live images and rescue mode.On completing this book, you will understand the booting process of major operating systems such as Linux, Windows, and Unix. You will also know how to fix the Linux booting issues through various boot modes.WHAT YOU WILL LEARN* Examine the BIOS and UEFI firmware * Understanding the Linux boot loader (GRUB)* Work with initramfs, dracut, and systemd* Fix can’t-boot issues on Linux WHO THIS BOOK IS FORLinux users, administrators, and developers.Yogesh has been with Red Hat for the past 10 years. He is presently working as a principal technical support engineer in the Linux kernel domain. He specializes in troubleshooting and tuning the performance issues of Linux enterprise servers. The Linux boot process is his forte and he regularly speaks at open source conferences and forums. He also conducts workshops on operating systems for engineering students.Chapter 1: IntroductionChapter Goal: Why should we learn booting? Why is it important?No of pages : 2Sub -Topics1. Why booting?2. What booting really is?3. What happens when you start your computer4. Supply goes to CPUChapter 2: Multi-BootChapter Goal: First stage of booting is firmware and boot loader. There are different firmware's and every OS vendor has their own boot loader. To make readers understand it better, in this chapter we will install different operating systems (windows, Linux, Unix etc.) on one machine and would boot them through Linux boot loader.No of pages: 75 pagesSub - Topics1. BIOS firmware2. Creating partition layout3. Installation sequence of different operating systems:a) Windows XPb) Solaris 2008c) PC-BSD 9.0d) Windows server 2k3e) Windows sevenf) Fedora 15g) Red Hat Enterprise Linux 74. Booting sequence of every operating system.5. Multi booting every operating system through Linux bootloader GRUB & through windows boot loaders (NTLDR / BCD)6. UEFI firmwarea. Why UEFI when we already have BIOS?b. Advantages of UEFI7. Creating GPT partition table8. Installation sequence of latest operating systems:a. Oracle Solaris 11b. Windows 10c. Fedora 31d. Red Hat Enterprise Linux 89. Booting sequence and flowchart of each and every OS.10. The 100 operating systems booting through one boot loader project.Chapter 3: GRUB BootloaderChapter Goal: This topic will cover the GRUB bootloader in much depth.No of pages : 40 pages.Sub - Topics:1.What is new in GRUB version 2? and why do we need it?2.GRUB 2’s structure on BIOS based system.3. GRUB 2’s structure on UEFI based system.4. Manual booting with GRUB 2.5. UEFI shell in detail.6. How to fix the corrupted GRUB.7. Some can’t boot scenarios (related to bootloader) and how to fix them.8. Secure Boot1. What is secure boot?2. Linux and secure boot?3. Shim bootloader of Ubuntu.4. How to add new keys to UEFI?5. How to sign kernel modules?Chapter 4: KernelChapter Goal: This chapter covers the kernel’s role in operating system’s booting sequence.No of pages: 15Sub - Topics:1. The kernel (vmlinuz) as an image file.2. Who and how vmlinuz file is extracted?3. Kernel will start the first process of Linux which is Systemd.Chapter 5: InitramfsChapter Goal: In order to understand the rest of booting sequence we need to understand the basics of initramfs, and why we need initramfs ?No of pages: 15Sub - Topics:1. Why Initramfs?2. Structure of Initramfs.3. How kernel extracts the initramfs in memory?4. How kernel mounts the initramfs as root?Chapter 6: DracutChapter Goal: Dracut is a tool which generates the initramfs. Initramfs is responsible for loading the appropriate modules which are necessary for successful booting.No of pages: Around 17Sub - Topics:1. How dracut makes initramfs image?2. How dracut choose modules to add in initramfs?3. How to customize the initramfs?4. Dracut command line options.5. How to blacklist or add modules in initramfs?Chapter 7: SystemdChapter Goal: The systemd process (first process of Linux) will be launched from initramfs. Once it launched its purpose is to mount the root filesystem and switch to it.No of pages: 55Sub - Topics:1. Structure of systemd.2. How does systemd reduces boot time?3. Booting flow of systemd inside initramfs.4. Plymouth5. Switching to new root filesystem.Chapter 8: Debugging ShellsChapter Goal: Systemd provide various shells to debug the cant boot issues. This topic will cover the booting flow to reach to these shells as well as how to use these shells to fix the cant boot issues.No of pages: 35Sub - Topics:1. Various dracut shells inside initramfs.2. Emergency shell.3. The default Rescue mode.4. Flowchart of so far booting sequence.Chapter 9: Live ImagesChapter Goal: The chapter will cover how does Live images of Operating System boots.No of pages: 4Sub-Topics:1. Filesystem used inside Live images.2. How does the live images boot.Chapter 10: Rescue ModeChapter Goal: Rescue mode plays a vital role in fixing the cant boot issues.No of pages: 15.
OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide
THIS OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 PROGRAMMER I STUDY GUIDE: EXAM 1Z0-815 AND THE PROGRAMMER II STUDY GUIDE: EXAM 1Z0-816 WERE PUBLISHED BEFORE ORACLE ANNOUNCED MAJOR CHANGES TO ITS OCP CERTIFICATION PROGRAM AND THE RELEASE OF THE NEW DEVELOPER 1Z0-819 EXAM.NO MATTER THE CHANGES, REST ASSURED BOTH OF THE PROGRAMMER I AND II STUDY GUIDES COVER EVERYTHING YOU NEED TO PREPARE FOR AND TAKE EXAM 1Z0-819. IF YOU’VE PURCHASED ONE OF THE PROGRAMMER STUDY GUIDES, PURCHASE THE OTHER ONE AND YOU’LL BE ALL SET.NOTE: The OCP Java SE 11 Programmer I Exam 1Z0-815 and Programmer II Exam 1Z0-816 have been retired (as of October 1, 2020), and Oracle has released a new Developer Exam 1Z0-819 to replace the previous exams. The Upgrade Exam 1Z0-817 remains the same.THE COMPLETELY-UPDATED PREPARATION GUIDE FOR THE NEW OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 PROGRAMMER II EXAM—COVERS EXAM 1Z0-816Java, a platform-independent, object-oriented programming language, is used primarily in mobile and desktop application development. It is a popular language for client-side cloud applications and the principal language used to develop Android applications. Oracle has recently updated its Java Programmer certification tracks for Oracle Certified Professional.OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide ensures that you are fully prepared for this difficult certification exam. Covering 100% of exam objectives, this in-depth study guide provides comprehensive coverage of the functional-programming knowledge necessary to succeed. Every exam topic is thoroughly and completely covered including exceptions and assertions, class design, generics and collections, threads, concurrency, IO and NIO, and more. Access to Sybex's superior online interactive learning environment and test bank—including self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms—provides everything you need to be fully prepared on exam day. This must-have guide:* Covers all exam objectives such as inheriting abstract classes and interfaces, advanced strings and localization, JDBC, and Object-Oriented design principles and patterns* Explains complex material and reinforces your comprehension and retention of important topics* Helps you master more advanced areas of functional programming* Demonstrates practical methods for building Java solutionsOCP Oracle Certified Professional Java SE 11 Programmer II Study Guide will prove invaluable for anyone seeking achievement of this challenging exam, as well as junior- to senior-level programmers who uses Java as their primary programming language.SCOTT SELIKOFF, OCA/OCP 8 AND OCP 11, has been a professional Java Enterprise architect for over 20 years. He is the founder of Selikoff Solutions, LLC, specializing in building custom mobile and server solutions for businesses in the tri-state New York City area. JEANNE BOYARSKY, OCA/OCP 8 AND OCP 11, is a Java Champion and has worked as a Java developer for a major bank for more than 18 years. She is a senior moderator at CodeRanch, and trains and mentors students of all levels, including the programming division of a FIRST robotics team.Introduction xxiAssessment Test xlivCHAPTER 1 JAVA FUNDAMENTALS 1Applying the final Modifier 2Declaring final Local Variables 3Adding final to Instance and static Variables 4Writing final Methods 5Marking Classes final 5Working with Enums 6Creating Simple Enums 6Using Enums in Switch Statements 8Adding Constructors, Fields, and Methods 9Creating Nested Classes 12Declaring an Inner Class 12Creating a static Nested Class 15Writing a Local Class 17Defining an Anonymous Class 18Reviewing Nested Classes 21Understanding Interface Members 22Relying on a default Interface Method 23Using static Interface Methods 27Introducing private Interface Methods 28Introducing private static Interface Methods 29Reviewing Interface Members 31Introducing Functional Programming 32Defining a Functional Interface 32Declaring a Functional Interface with Object Methods 34Implementing Functional Interfaces with Lambdas 36Writing Lambda Expressions 38Working with Lambda Variables 40Summary 43Exam Essentials 44Review Questions 46CHAPTER 2 ANNOTATIONS 59Introducing Annotations 60Understanding Metadata 60Purpose of Annotations 61Creating Custom Annotations 64Creating an Annotation 64Specifying a Required Element 65Providing an Optional Element 66Selecting an Element Type 67Applying Element Modifiers 67Adding a Constant Variable 68Reviewing Annotation Rules 68Applying Annotations 69Using Annotations in Declarations 69Mixing Required and Optional Elements 71Creating a value() Element 71Passing an Array of Values 73Declaring Annotation-Specific Annotations 74Limiting Usage with @Target 74Storing Annotations with @Retention 77Generating Javadoc with @Documented 77Inheriting Annotations with @Inherited 79Supporting Duplicates with @Repeatable 79Reviewing Annotation-Specific Annotations 81Using Common Annotations 83Marking Methods with @Override 83Declaring Interfaces with @FunctionalInterface 84Retiring Code with @Deprecated 85Ignoring Warnings with @SuppressWarnings 86Protecting Arguments with @SafeVarargs 88Reviewing Common Annotations 89Summary 91Exam Essentials 92Review Questions 94CHAPTER 3 GENERICS AND COLLECTIONS 105Using Method References 107Calling Static Methods 108Calling Instance Methods on a Particular Object 109Calling Instance Methods on a Parameter 109Calling Constructors 110Reviewing Method References 110Using Wrapper Classes 111Using the Diamond Operator 113Using Lists, Sets, Maps, and Queues 114Common Collections Methods 115Using the List Interface 119Using the Set Interface 124Using the Queue Interface 126Using the Map Interface 128Comparing Collection Types 135Sorting Data 137Creating a Comparable Class 137Comparing Data with a Comparator 141Comparing Comparable and Comparator 142Comparing Multiple Fields 143Sorting and Searching 145Working with Generics 147Generic Classes 148Generic Interfaces 151Raw Types 152Generic Methods 153Bounding Generic Types 154Putting It All Together 159Summary 161Exam Essentials 163Review Questions 164CHAPTER 4 FUNCTIONAL PROGRAMMING 175Working with Built-in Functional Interfaces 176Implementing Supplier 178Implementing Consumer and BiConsumer 179Implementing Predicate and BiPredicate 180Implementing Function and BiFunction 181Implementing UnaryOperator and BinaryOperator 183Checking Functional Interfaces 184Convenience Methods on Functional Interfaces 185Returning an Optional 187Creating an Optional 188Dealing with an Empty Optional 189Using Streams 191Understanding the Pipeline Flow 191Creating Stream Sources 194Using Common Terminal Operations 197Using Common Intermediate Operations 204Putting Together the Pipeline 209Working with Primitive Streams 213Creating Primitive Streams 214Mapping Streams 217Using Optional l with Primitive Streams 219Summarizing Statistics 220Learning the Functional Interfaces for Primitives 221Working with Advanced Stream Pipeline Concepts 224Linking Streams to the Underlying Data 224Chaining Optionals 224Collecting Results 227Summary 234Exam Essentials 236Review Questions 238CHAPTER 5 EXCEPTIONS, ASSERTIONS, AND LOCALIZATION 247Reviewing Exceptions 248Handling Exceptions 248Distinguishing between throw and throws 250Examining Exception Categories 250Inheriting Exception Classes 252Creating Custom Exceptions 253Declaring Exception Classes 253Adding Custom Constructors 253Printing Stack Traces 255Automating Resource Management 256Constructing Try-With-Resources Statements 256Learning the New Effectively Final Feature 259Understanding Suppressed Exceptions 261Declaring Assertions 264Validating Data with the assert Statement 264Enabling Assertions 266Disabling Assertions 267Applying Assertions 267Writing Assertions Correctly 268Working with Dates and Times 268Creating Dates and Times 269Formatting Dates and Times 271Supporting Internationalization and Localization 276Picking a Locale 276Localizing Numbers 279Localizing Dates 283Specifying a Locale Category 284Loading Properties with Resource Bundles 285Creating a Resource Bundle 286Picking a Resource Bundle 288Selecting Resource Bundle Values 289Formatting Messages 291Using the Properties Class 292Summary 293Exam Essentials 294Review Questions 295CHAPTER 6 MODULAR APPLICATIONS 309Reviewing Module Directives 310Comparing Types of Modules 311Named Modules 311Automatic Modules 312Unnamed Modules 315Comparing Module Types 315Analyzing JDK Dependencies 316Identifying Built-in Modules 316Using jdeps 318Migrating an Application 321Determining the Order 321Exploring a Bottom-Up Migration Strategy 322Exploring a Top-Down Migration Strategy 324Splitting a Big Project into Modules 325Failing to Compile with a Cyclic Dependency 326Creating a Service 328Declaring the Service Provider Interface 329Creating a Service Locator 330Invoking from a Consumer 332Adding a Service Provider 333Merging Service Locator and Consumer 334Reviewing Services 337Summary 337Exam Essentials 338Review Questions 339CHAPTER 7 CONCURRENCY 345Introducing Threads 347Distinguishing Thread Types 348Understanding Thread Concurrency 348Defining a Task with Runnable 349Creating a Thread 351Polling with Sleep 353Creating Threads with the Concurrency API 355Introducing the Single-Thread Executor 355Shutting Down a Thread Executor 356Submitting Tasks 357Waiting for Results 358Submitting Task Collections 362Scheduling Tasks 363Increasing Concurrency with Pools 366Writing Thread-Safe Code 367Understanding Thread-Safety 367Protecting Data with Atomic Classes 369Improving Access with Synchronized Blocks 371Synchronizing on Methods 373Understanding the Lock Framework 375Orchestrating Tasks with a CyclicBarrier 379Using Concurrent Collections 382Understanding Memory Consistency Errors 383Working with Concurrent Classes 383Obtaining Synchronized Collections 388Identifying Threading Problems 389Understanding Liveness 390Managing Race Conditions 393Working with Parallel Streams 394Creating Parallel Streams 395Performing a Parallel Decomposition 396Processing Parallel Reductions 398Avoiding Stateful Operations 403Summary 404Exam Essentials 405Review Questions 406CHAPTER 8 I/O 419Understanding Files and Directories 420Conceptualizing the File System 420Storing Data as Bytes 422Introducing the File Class 422Introducing I/O Streams 426Understanding I/O Stream Fundamentals 426Learning I/O Stream Nomenclature 427Common I/O Stream Operations 433Reading and Writing Data 433Closing the Stream 435Manipulating Input Streams 436Flushing Output Streams 438Reviewing Common I/O Stream Methods 439Working with I/O Stream Classes 440Reading and Writing Binary Data 440Buffering Binary Data 441Reading and Writing Character Data 443Buffering Character Data 444Serializing Data 445Printing Data 452Review of Stream Classes 457Interacting with Users 458Printing Data to the User 459Reading Input as a Stream 460Closing System Streams 460Acquiring Input with Console 461Summary 464Exam Essentials 464Review Questions 466CHAPTER 9 NIO.2 475Introducing NIO.2 476Introducing Path 477Creating Paths 478Understanding Common NIO.2 Features 483Interacting with Paths 486Viewing the Path with toString(), getNameCount(), and getName() 486Creating a New Path with subpath() 487Accessing Path Elements with getFileName(), getParent(), and getRoot() 488Checking Path Type with isAbsolute() and toAbsolutePath() 490Joining Paths with resolve() 491Deriving a Path with relativize() 491Cleaning Up a Path with normalize() 493Retrieving the File System Path with toRealPath() 493Reviewing Path Methods 494Operating on Files and Directories 495Checking for Existence with exists() 495Testing Uniqueness with isSameFile() 496Making Directories with createDirectory() and createDirectories() 497Copying Files with copy() 498Moving or Renaming Paths with move() 500Deleting a File with delete() and deleteIfExists() 500Reading and Writing Data with newBufferedReader() and newBufferedWriter() 501Reading a File with readAllLines() 502Reviewing Files Methods 502Managing File Attributes 503Discovering File Attributes 503Improving Attribute Access 506Applying Functional Programming 508Listing Directory Contents 508Traversing a Directory Tree 510Searching a Directory with find() 514Reading a File with lines() 515Comparing Legacy java.io.File and NIO.2 Methods 517Summary 518Exam Essentials 518Review Questions 520CHAPTER 10 JDBC 529Introducing Relational Databases and SQL 530Identifying the Structure of a Relational Database 532Writing Basic SQL Statements 533Introducing the Interfaces of JDBC 535Connecting to a Database 537Building a JDBC URL 537Getting a Database Connection 539Working with a PreparedStatement 542Obtaining a PreparedStatement 543Executing a PreparedStatement 543Working with Parameters 546Updating Multiple Times 549Getting Data from a ResultSet 551Reading a ResultSet 551Getting Data for a Column 555Using Bind Variables 556Calling a CallableStatement 557Calling a Procedure without Parameters 558Passing an IN Parameter 559Returning an OUT Parameter 559Working with an INOUT Parameter 560Comparing Callable Statement Parameters 560Closing Database Resources 561Summary 564Exam Essentials 564Review Questions 566CHAPTER 11 SECURITY 575Designing a Secure Object 576Limiting Accessibility 576Restricting Extensibility 577Creating Immutable Objects 578Cloning Objects 581Introducing Injection and Input Validation 583Preventing Injection with a PreparedStatement 583Invalidating Invalid Input with Validation 586Working with Confidential Information 588Guarding Sensitive Data from Output 589Protecting Data in Memory 589Limiting File Access 590Serializing and Deserializing Objects 591Specifying Which Fields to Serialize 591Customizing the Serialization Process 592Pre/Post-Serialization Processing 593Reviewing Serialization Methods 596Constructing Sensitive Objects 597Making Methods final 598Making Classes final 598Making the Constructor private 599Preventing Denial of Service Attacks 600Leaking Resources 600Reading Very Large Resources 600Including Potentially Large Resources 601Overflowing Numbers 601Wasting Data Structures 602Summary 603Exam Essentials 604Review Questions 605APPENDICES 611APPENDIX A THE UPGRADE EXAM 611Working with Local Variable Type Inference 612Type Inference of var 613Examples with var 614Review of var Rules 617Introducing Modules 617Exploring a Module 618Benefits of Modules 619Creating and Running a Modular Program 621Creating the Files 622Compiling Our First Module 623Running Our First Module 625Packaging Our First Module 627Updating Our Example for Multiple Modules 628Updating the Feeding Module 628Creating a Care Module 629Creating the Talks Module 631Creating the Staff Module 634Diving into the module-info File 635exports 635requires transitive 636provides, uses, and opens 639Discovering Modules 639The java Command 639The jar Command 643The jdeps Command 643The jmod Command 645Reviewing Command-Line Options 645Summary 648Exam Essentials 649Review Questions 650APPENDIX B ANSWERS TO REVIEW QUESTIONS 657Chapter 1: Java Fundamentals 658Chapter 2: Annotations 662Chapter 3: Generics and Collections 665Chapter 4: Functional Programming 669Chapter 5: Exceptions, Assertions, and Localization 672Chapter 6: Modular Applications 676Chapter 7: Concurrency 678Chapter 8: I/O 682Chapter 9: NIO.2 685Chapter 10: JDBC 689Chapter 11: Security 691Appendix A: The Upgrade Exam 693Index 697
Getting Started with Advanced C#
Understand and work with the most important features of advanced C# in different programming environments. This book teaches you the fundamental features of advanced C# and how to incorporate them in different programming techniques using Visual Studio 2019.The book is divided into two parts. Part I covers the fundamentals and essentials of advanced programming in C#. You will be introduced to delegates and events and then move on to lambda expressions. Part II teaches you how to implement these features in different programming techniques, starting with generic programming. After that, you will learn about thread programming and asynchronous programming, to benefit from a multi-threaded environment. Finally, you will learn database programming using ADO.NET to connect to a MySQL database and you will know how to exercise SQL statements and stored procedures through your C# applications.WHAT YOU WILL LEARN* Use delegates, events, and lambda expressions in advanced programming* Make your application flexible by utilizing generics* Create a fast application with multi-threading and asynchronous programming* Work in Visual Studio Community Edition, which is the most common IDE for using C#* Understand alternative implementations along with their pros and consWho This Book Is ForDevelopers and programmers who are already working in C#VASKARAN SARCAR obtained his Master of Engineering in software engineering from Jadavpur University, Kolkata (India) and an MCA from Vidyasagar University, Midnapore (India). He was a National Gate Scholar (2007-2009) and has more than 12 years of experience in education and the IT industry. Vaskaran devoted his early years (2005-2007) to teaching at various engineering colleges and later he joined HP India PPS R&D Hub Bangalore and worked there until August, 2019. At the time of his retirement from the IT industry, he was a senior software engineer and a team lead at HP. To follow his dream and passion, Vaskaran is now a full-time author. Other Apress books by Vaskaran include: Interactive Object-Oriented Programming in Java (second edition), Java Design Patterns (second edition), Design Patterns in C#, Interactive C#, Interactive Object-Oriented Programming in Java, and Java Design Patterns.INTRODUCTIONPART-ICHAPTER 1: DELEGATESSubtopics:· What is a delegate?· How to create and use delegates?· What is a multicast delegate (Chaining of Delegates) and its uses?· Adding and removing methods from a multicast delegate.· Covariance and contravariance in non-generic delegates.CHAPTER 2: EVENTSSubtopics:· Events overview* Creation of events and example of simple events* Subscribing single and multiple events* Passing data to events* Discussion on event accessorsCHAPTER 3: ANONYMOUS FUNCTION AND LAMBDA EXP.Subtopics:· A quick introduction to anonymous function and lambda expression.* Lambda’s with and without parameters* Types and scopes of a lambda expressionExpression syntaxes with exampleCHAPTER 4: LINQSubtopics:* LINQ overview* Different case studies with simple and complicated query expressions* Retrieving customized data from a query expression* Comparing a method call syntax and a query syntax. PART-IICHAPTER 5: GENERIC PROGRAMMINGSubtopics:* Generics overviewComparing a generic program with its counterpart-a non-generic program * Self-referenced generics* Use of ‘default’ in a generic programHow to put constraints in a generic program * Covariance and contravariance in the context of a generic programCHAPTER 6: DATABASE PROGRAMMINGSubtopics:· How to connect to a database· Exercise simple queries to database and retrieving results from the database.CHAPTER 7: THREAD PROGRAMMINGSubtopics:Threads overview * Different case studies with multithreaded programs* Use of ParameterizedThreadStart delegate in a multithreaded environment * Passing multiple parameters to a thread* Discussion on Synchronization and deadlock with examplesCHAPTER 8: ASYNCHRONOUS PROGRAMMINGSubtopics:Brief overview * Different techniques to implement an asynchronous program(e.g. using async/await, thread, thread pool etc)CHAPTER 9: DYNAMIC PROGRAMMINGSubtopics:* DLR overview* Dynamic type and its uses* Dynamic type checking* Runtime look up etc.
Homeoffice und mobiles Arbeiten im Team effektiv umsetzen
Produktives Arbeiten im Homeoffice erfordert neben richtiger Ausstattung, guter Sprach- und Datenkommunikation und Zugriff auf Daten auch die – durch IT-Tools unterstützten – passenden Führungs- und Arbeitsmethoden. Dieser Ratgeber bietet konkrete Anleitungen, um ohne IT-Fachkenntnisse das weltweite Arbeiten im Team schnell und pragmatisch möglich zu machen.Peter Bruhn ist Diplom-Wirtschaftsinformatiker (TU Darmstadt) und zweifacher Master of Science (Computer Science, University of Illinois (USA) und Informationswissenschaft, Hochschule Darmstadt). Bereits 2000 spezialisierte er sich als Berater bei McKinsey & Company auf die Digitale Transformation. Anschließend baute er als Senior Manager im Innovationsbereich der Deutschen Telekom AG neue Geschäftsmodelle u.a. für die Digital Business Unit auf. Als Vice President Group Digital Transformation übernahm Bruhn 2016 die Verantwortung für die Digitale Agenda der TAKKT AG in Europa und den USA.Peter Bruhn ist ein Vorreiter für mobiles Arbeiten und hat als Führungskraft jahrelange Erfahrung in der Führung verteilter Teams auf Distanz. Einleitung.- Hardware.- Konnektivität.- Software.- Anwendungen für die Team-Zusammenarbeit.- IT-Sicherheit und Datenschutz.- Fazit und Empfehlung
Agile Artificial Intelligence in Pharo
Cover classical algorithms commonly used as artificial intelligence techniques and program agile artificial intelligence applications using Pharo. This book takes a practical approach by presenting the implementation details to illustrate the numerous concepts it explains.Along the way, you’ll learn neural net fundamentals to set you up for practical examples such as the traveling salesman problem and cover genetic algorithms including a fun zoomorphic creature example. Furthermore, Practical Agile AI with Pharo finishes with a data classification application and two game applications including a Pong-like game and a Flappy Bird-like game. This book is informative and fun, giving you source code to play along with. You’ll be able to take this source code and apply it to your own projects.WHAT YOU WILL LEARN* Use neurons, neural networks, learning theory, and more* Work with genetic algorithms * Incorporate neural network principles when working towards neuroevolution * Include neural network fundamentals when building three Pharo-based applicationsWHO THIS BOOK IS FORCoders and data scientists who are experienced programmers and have at least some prior experience with AI or deep learning. They may be new to Pharo programming, but some prior experience with it would be helpful.ALEXANDRE BERGEL, PH.D., is an associate professor in the Department of Computer Science (DCC) at the University of Chile and is a member of the Intelligent Software Construction laboratory (ISCLab). His research interests include software engineering, software performance, software visualization, programming environment, and machine learning. He is interested in improving the way we build and maintain software. His current hypotheses are validated using rigorous empirical methodologies. To make his research artifacts useful not only to stack papers, he co-founded Object Profile.1: Introduction2: The Perceptron Model3: Artificial Neuron4: Neural Networks5: Theory on Learning6: Data Classification7: A Matrix Library8: Matrix-Based Neural Network9: Genetic Algorithm10: Genetic Algorithm in Action11: Traveling Salesman Problem12: Exiting a Maze13: Building Zoomorphic Creatures14: Evolving Zoomorphic Creature15: Neuroevolution16: Neuroevolution with NEAT17: The MiniMario Video GameLast Words (Afterword)
45 Elektronik-Projekte für den Raspberry Pi
Der Raspberry Pi stellt einen sehr preiswerten, aber doch vollwertigen Computer dar, an den auf einfache Weise verschiedenste Elektronik angeschlossen werden kann. Dieses Buch geht auf eine der Stärken des Raspberry Pi ein: die Kombination von Elektronik und Software.Nach einer kurzen Einführung zum Raspberry Pi wird auf die benötigte Software eingegangen. Im Anschluss wird das Linux-Betriebssystem kurz vorgestellt – gefolgt von einer Einführung in die Programmierung mit Bash, Python und JavaScript. Der Schwerpunkt liegt dabei auf Python. Die Erläuterungen sind in allen Fällen kurz und bündig und trotzdem so ausführlich, dass das Notwendigste besprochen wird, um die folgenden Projekte zu verstehen und individuell anzupassen.Dieses Buch beschreibt 45 spannende und interessante Projekte, wie zum Beispiel ein Wechselblinklicht, eine Motorregelung, Erzeugen und Verarbeiten analoger Signale, ein digitales Thermometer, ein Lichtmesser. Aber auch kompliziertere Projekte wie eine Motor-Geschwindigkeitsregelung, ein Webserver mit CGI (Common Gateway Interface) und Client-Server-Programme werden vorgestellt. Sie können dieses Buch als Projektbuch verwenden und die Projekte nachbauen, um sie dann in der Praxis einzusetzen. Durch die ausführliche Beschreibung mit Schaltplänen und Fotos gestaltet sich der Aufbau auf dem Steckbrett recht einfach.Sie können dieses Buch auch als Lehrbuch verwenden. Bei jedem Projekt wird erklärt, warum es auf diese Art und Weise ausgeführt ist. Sie lernen viel über den Raspberry Pi, Python und die verwendeten Bauteile, so dass Sie selbst die Projekte anpassen, nach eigenen Wünschen erweitern oder mehrere Projekte miteinander kombinieren können.Um Ihnen die Software-Installation zu erleichtern, hat der Autor das Betriebssystem und alle Programmbeispiele auf einer SD-Karte zusammengetragen. Passend zu den Projekten ist neben dieser SD-Karte auch ein Hardware-Starterkit bei Elektor erhältlich.Bert van Dam ist freiberuflicher Autor von Büchern, Kursen und Artikeln über PIC- und ARM Mikrocontroller, Arduino, Raspberry Pi, PCs, Künstliche Intelligenz und die Programmiersprachen JAL, C, Assembler, Python und Flowcode.
Programming with Node-RED
The Internet of Things (IoT) is becoming a major application area for embedded systems. As a result, more and more people are becoming interested in learning about embedded design and programming. Technical colleges and universities are moving away from legacy 8 and 16-bit microcontrollers and are introducing 32-bit embedded microcontrollers to their curriculums. Many IoT applications demand precision, high processing power, and low power consumption.Produced by IBM, Node-RED is an open-source visual editor for wiring the Internet of Things. Node-RED comes with a large number of nodes to handle a multitude of tasks. The required nodes are selected and joined together to perform a particular task. Node-RED is based on flow type programming where nodes are configured and joined together to form an application program. There are nodes for performing complex tasks, including web access, Twitter, E-mail, HTTP, Bluetooth, MQTT, controlling GPIO ports, etc. One particularly nice aspect of Node-RED is that the programmer does not need to learn how to write complex programs. For example, an email can be sent by simply joining nodes together and writing only a few lines of code.The aim of this book is to teach how Node-RED can be used in projects. The main hardware platform used with most of the projects in this book is Raspberry Pi 4. Chapters are included to show how Node-RED can be also be used with Arduino Uno, ESP32 DevKitC, and the ESP8266 NodeMCU microcontroller development boards.Prof. Dr. Dogan Ibrahim is a Fellow of the Institution of Electrical Engineers. He is the author of over 60 technical books, published by publishers including Wiley, Butterworth, and Newnes. He is the author of over 250 technical papers, published in journals, and presented in seminars and conferences.
C Programming with Arduino
Technology is constantly changing. New microcontrollers become available every year. The one thing that has stayed the same is the C programming language used to program these microcontrollers. If you would like to learn this standard language to program microcontrollers, then this e-book (pdf) is for you!Arduino is the hardware platform used to teach the C programming language as Arduino boards are available worldwide and contain the popular AVR microcontrollers from Atmel.Atmel Studio is used as the development environment for writing C programs for AVR microcontrollers. It is a full-featured integrated development environment (IDE) that uses the GCC C software tools for AVR microcontrollers and is free to download.At a glance:• Start learning to program from the very first chapter• No programming experience is necessary• Learn by doing - type and run the example programs• A fun way to learn the C programming language• Ideal for electronic hobbyists, students and engineers wanting to learn the C programming language in an embedded environment on AVR microcontrollers• Use the free full-featured Atmel Studio IDE software for Windows• Write C programs for 8-bit AVR microcontrollers as found on the Arduino Uno and MEGA boards• Example code runs on Arduino Uno and Arduino MEGA 2560 boards and can be adapted to run on other AVR microcontrollers or boards• Use the AVR Dragon programmer / debugger in conjunction with Atmel Studio to debug C programsWarwick A. Smith lives in South Africa and works as an Electronics Engineer and Embedded System Programmer. He is a bestselling author of the books C Programming for Embedded Microcontrollers, ARM Microcontroller Interfacing and Open Source Electronics on Linux.
Django Standalone Apps
Develop standalone Django apps to serve as the reusable building blocks for larger Django projects. This book explores best practices for publishing these apps, with special considerations for testing Django apps, and strategies for extracting existing functionality into a separate package.This jumpstart reference is divided into four distinct and sequential sections, all containing short, engaging chapters that can be read in a modular fashion, depending on your level of experience. The first section covers the structure and scope of standalone Django apps. The second section digs into questions about pulling code out of existing projects and into new standalone apps for reuse. The third section details additional, advanced technical best practices toward making standalone apps as broadly useful as possible. The fourth and final section covers strategies for managing a published Django app.Django Standalone Apps is the perfect resource for developers who have at least some prior experience working with Django web applications and want to simplify their deployments and share their knowledge as open source packages.WHAT YOU'LL LEARN* Scope a standalone Django app project for optimum usefulness* Extract code from existing projects to reuse* Test a standalone app outside of your Django project* Reuse your own code for increased delivery cadence and code quality* Review best practices for maintaining a Django app packageWHO THIS BOOK IS FORProfessional developers who work with Django. Deep expertise is not required or expected, but readers should have working familiarity with Django.Ben is cofounder of a web development consultancy and has been working professionally with Django for almost a decade. He has architected and led development on Django-based web applications including, custom content management systems, media platforms, and multi tenant back office solutions.He lives in the Rochester, NY, area, and graduated from the University of Virginia with a degree in Economics. Previously he managed the data and analytics services for a market research firm and was an IT strategy consultant for a global management consulting firm. His own standalone apps include Django Organizations, a long term project for managing multi user accounts in Django projects.Chapter 1: Defining the Scope of a Django Standalone AppChapter 2: Structuring Django Standalone AppsChapter 3: TestingChapter 4: Model MigrationsChapter 5: TemplatesChapter 6: Using Static FilesChapter 7: Namespacing in Your AppChapter 8: Creating a Basic PackageChapter 9: Scooping and Drawing BoundariesChapter 10: Separating Your AppChapter 11: Adding Your App Back InChapter 12: Handling App SettingsChapter 13: InternationalizationChapter 14: Managing Version CompatibilityChapter 15: Mixed Dependency SupportChapter 16: ModularityChapter 17: Better PackagingChapter: 18: LicensingChapter: 19: Documenting Your Standalone AppChapter 20: Additional TestingChapter 21: AutomatingChapter 22: Databases and other backend specific considerationsChapter 23: CollaboratingChapter 24: Using App Templates
Game Design und Produktion
Dieses Grundlagenlehrbuch für angehende Computerspieldesigner erläutert zunächst die allgemeinen Zusammenhänge des menschlichen Spielens. Dabei kommt es dem Autor auch darauf an, die Übergänge zu den neuen vernetzten Medien und den Gemeinschaften in den sogenannten virtuellen Räumen zu betrachten.Im weiteren Verlauf wird der Stand der Technik bezüglich der Produktion von Computerspielen beschrieben, wobei auf die Spielentwicklung (Game Design) ebenso eingegangen wird wie auf die Programmierung, Funktionsweisen und Jobprofile der Spieleindustrie. Hier liegt der Schwerpunkt auf allgemeinen Prinzipien, da die Computertechnologie einem sehr schnellen Wandel unterliegt.Das Buch verweist in Kästen und Anmerkungen auf einschlägige Literatur, Spiele und andere Medien und soll so zur Vertiefung des Gebiets anregen. Zudem gibt das Buch einen Überblick über Spielformen von Online- und Offline-Spielen und klärt Kernbegriffe des Aufbaus von Computerspielen. Anschaulich geschrieben, vermittelt dieses Lehrbuch wichtige Grundlagen des Designs und der Entwicklung von Computerspielen vor dem Hintergrund moderner spieltheoretischer Grundlagen.In der zweiten Auflage: Aktualisierung der Beispiele, neue Engines (Kapitel über die Unreal Engine), Technik, Technologie, Skills. Prof. Gunther Rehfeld lehrt am Department Medientechnik der HAW Hamburg und forscht zu Online-Computerspielen, Dramaturgie und aktivierenden Spielformaten.
Thinking in Pandas
Understand and implement big data analysis solutions in pandas with an emphasis on performance. This book strengthens your intuition for working with pandas, the Python data analysis library, by exploring its underlying implementation and data structures.Thinking in Pandas introduces the topic of big data and demonstrates concepts by looking at exciting and impactful projects that pandas helped to solve. From there, you will learn to assess your own projects by size and type to see if pandas is the appropriate library for your needs. Author Hannah Stepanek explains how to load and normalize data in pandas efficiently, and reviews some of the most commonly used loaders and several of their most powerful options. You will then learn how to access and transform data efficiently, what methods to avoid, and when to employ more advanced performance techniques. You will also go over basic data access and munging in pandas and the intuitive dictionary syntax. Choosing the right DataFrame format, working with multi-level DataFrames, and how pandas might be improved upon in the future are also covered.By the end of the book, you will have a solid understanding of how the pandas library works under the hood. Get ready to make confident decisions in your own projects by utilizing pandas—the right way.WHAT YOU WILL LEARN* Understand the underlying data structure of pandas and why it performs the way it does under certain circumstances* Discover how to use pandas to extract, transform, and load data correctly with an emphasis on performance* Choose the right DataFrame so that the data analysis is simple and efficient.* Improve performance of pandas operations with other Python librariesWHO THIS BOOK IS FORSoftware engineers with basic programming skills in Python keen on using pandas for a big data analysis project. Python software developers interested in big data.Hannah Stepanek is a software developer with a passion for performance and is an open source advocate. She has over seven years of industry experience programming in Python and spent about two of those years implementing a data analysis project using pandas.Hannah was born and raised in Corvallis, OR, and graduated from Oregon State University with a major in Electrical Computer Engineering. She enjoys engaging with the software community, often giving talks at local meetups as well as larger conferences. In early 2019, she spoke at PyCon US about the pandas library and at OpenCon Cascadia about the benefits of open source software. In her spare time she enjoys riding her horse Sophie and playing board games.
Modern Data Mining Algorithms in C++ and CUDA C
Discover a variety of data-mining algorithms that are useful for selecting small sets of important features from among unwieldy masses of candidates, or extracting useful features from measured variables.As a serious data miner you will often be faced with thousands of candidate features for your prediction or classification application, with most of the features being of little or no value. You’ll know that many of these features may be useful only in combination with certain other features while being practically worthless alone or in combination with most others. Some features may have enormous predictive power, but only within a small, specialized area of the feature space. The problems that plague modern data miners are endless. This book helps you solve this problem by presenting modern feature selection techniques and the code to implement them. Some of these techniques are:* Forward selection component analysis* Local feature selection* Linking features and a target with a hidden Markov model* Improvements on traditional stepwise selection* Nominal-to-ordinal conversionAll algorithms are intuitively justified and supported by the relevant equations and explanatory material. The author also presents and explains complete, highly commented source code.The example code is in C++ and CUDA C but Python or other code can be substituted; the algorithm is important, not the code that's used to write it.WHAT YOU WILL LEARN* Combine principal component analysis with forward and backward stepwise selection to identify a compact subset of a large collection of variables that captures the maximum possible variation within the entire set.* Identify features that may have predictive power over only a small subset of the feature domain. Such features can be profitably used by modern predictive models but may be missed by other feature selection methods.* Find an underlying hidden Markov model that controls the distributions of feature variables and the target simultaneously. The memory inherent in this method is especially valuable in high-noise applications such as prediction of financial markets.* Improve traditional stepwise selection in three ways: examine a collection of 'best-so-far' feature sets; test candidate features for inclusion with cross validation to automatically and effectively limit model complexity; and at each step estimate the probability that our results so far could be just the product of random good luck. We also estimate the probability that the improvement obtained by adding a new variable could have been just good luck. Take a potentially valuable nominal variable (a category or class membership) that is unsuitable for input to a prediction model, and assign to each category a sensible numeric value that can be used as a model input.WHO THIS BOOK IS FORIntermediate to advanced data science programmers and analysts.Timothy Masters has a PhD in statistics and is an experienced programmer. His dissertation was in image analysis. His career moved in the direction of signal processing, and for the last 25 years he's been involved in the development of automated trading systems in various financial markets.1) Introduction 72) Forward Selection Component Analysis 11A) Introduction to Forward Selection Component Analysis 12B) The Mathematics and Code Examples 16Maximizing the Explained Variance 18Code for the Variance Maximization Criterion 20Backward Refinement 24Multi-Threading Backward Refinement 28Orthogonalizing Ordered Components 36C) Putting It All Together 39Components From a Forward-Only Subset 44Components From a Backward Refined Subset 46D) An Example With Contrived Variables 483) Local Feature Selection 53A) Intuitive Overview of the Algorithm 54What This Algorithm Reports 60B) A Brief Detour: the Simplex Algorithm 62The Linear Programming Problem 63Interfacing to the Simplex Class 64A Little More Detail 67C) A More Rigorous Approach to LFS 69Intra-Class and Inter-Class Separation 73Computing the Weights 77Maximizing Inter-Class Separation 81Minimizing Intra-Class Separation 86Testing a Trial Beta 88A Quick Note on Threads 93D) CUDA Computation of Weights 94Integrating the CUDA Code Into the Algorithm 95Initializing the CUDA Hardware 97Computing Differences from the Current Case 100 Computing the Distance Matrix 102Computing the Minimum Distances 104Computing the Terms for the Weight Equation 112Transposing the Term Matrix 113Summing the Terms For the Weights 114Moving the Weights to the Host 116E) An Example of Local Feature Selection 117F) A Note on Run Time 1184) Memory in Time Series Features 119A) A Gentle Mathematical Overview 122The Forward Algorithm 123The Backward Algorithm 128Correct Alpha and Beta, For Those Who Care 131B) Some Mundane Computations 136Means and Covariances 136Densities 138The Multivariate Normal Density Function 139C) Starting Parameters 141 Outline of the Initialization Algorithm 141Perturbing Means 142Perturbing Covariances 143Perturbing Transition Probabilities 144A Note on Random Number Generators 145D) The Complete Optimization Algorithm 146Computing State Probabilities 147Updating the Means and Covariances 151Updating Initial and Transition Probabilities 153 E) Assessing HMM Memory in a Time Series 159F) Linking Features to a Target 164Linking HMM States to the Target 173A Contrived and Inappropriate Example 183A Sensible and Practical Example 1865) Stepwise Selection on Steroids 189A) The Feature Evaluation Model 192Code For the Foundation Model 193B) The Cross-Validated Performance Measure 198C) The Stepwise Algorithm 201Finding the First Variable 207Adding a Variable to an Existing Model 210D) Demonstrating the Algorithm Three Ways 2146) Nominal-to-Ordinal Conversion 217A) Implementation Overview 221B) Testing For a Legitimate Relationship 222C) An Example From Equity Price Changes 223D) Code for Nominal-to-Ordinal Conversion 227The Constructor 228Printing the Table of Counts 232Computing the Mapping Function 234Monte-Carlo Permutation Tests 2377) Index 353
Beginning Ring Programming
Gain a gentle introduction to the world of Ring programming with clarity as a first concern using a lot of practical examples. The first part lays the foundations of the language and its basic features (data types, control structures, functions, and classes). The unique way to rigorously structure Ring programs is also explained.Then, in the second part you’ll discover Ring inputs, outputs, and what is in between. You’ll use the basic constructs of computer logic (sequence, selection, and iteration) to build simple and complex logic flows. You’ll go over the common mistakes that lead to code complexity, by example, and cover several strategies to solve them (refactoring, code cleansing, and good variable naming). Then, you’ll see a visual illustration of how Ring deals with scopes at the local, object, and global levels.In part three, you’ll play with two artifacts vital to Ring programming: functions and objects. You’ll learn how they can be composed to solve a problem and how advanced programming paradigms, such as declarative and natural, are beautifully implemented on top of them. As part of the discussion, you’ll also work on game programming. You’ll learn how you design your game declaratively, in Ring code, just as if you were designing it in visual software.Finally, the author lays out how programming can be understood in a gamified context. You will be told the truth about how gaming can be a better metaphor to achieve mastery of Ring programming.This book is for those who are passionate about writing beautiful, expressive, and learnable code. It has been designed so you can enjoy a beginner-friendly set of knowledge about Ring, and benefit from a one-stop collection of lessons learned from real-world, customer-facing programming projects.WHAT YOU WILL LEARN* Get started with Ring and master its data types, I/O, functions, and classes* Carry out structural, object-oriented, functional, declarative, natural, and meta programming in Ring* Use the full power of Ring to refactor program code and develop clean program architectures* Quickly design professional-grade video games on top of the Ring game engineWHO THIS BOOK IS FORBeginners looking for a consistent and hackable programming environment with a strong flavor of learnability and expressiveness.Mansour Ayouni is one of the leading contributors to the new Ring programming language. He wrote his first BASIC computer statement, in the mid-80s, using only pen and paper, when he was 10 years old. It wasn’t in a California garage though nor under the lights of the prestigious Evil tour of Paris, but in the rural village of Regueb in the center of Tunisia (North Africa) where there was no electricity nor computers at all. Over the years, programming took him in an otherwise impossible international journey. From Tunisia, to Niger, to Canada, he contributed to the development of dozens of software products ranging from lawyer office management solutions to banking and nuclear waste management systems. During his career, he used to oversee programmers from three cultures and lead software teams in various companies such as Whitecape, Keyrus, and Webgenetics. Now, he is a member of the Ring core team and running Kalidia Consulting helping businesses make effective software. Chapter 1: Getting Started with RingChapter 2: Data Types in RingChapter 3: Ins of RingChapter 4: Outs of RingChapter 5: Ring AlgorithmsChapter 6: Juggling with ScopesChapter 7: Functions, Objects and BeyondChapter 8: Designing Games in RingChapter 9: A Gamified Foundation for Mastering RingAppendix A: A Dialogue with Mahmoud Fayed
Advanced Perl Programming
William "Bo" Rothwell's Advanced Perl Programming continues where his previous book left off, more or less, as it guides you through advanced techniques of the Perl programming language starting with command-line options, references, and arrays and hashes from advanced data types. Next, you'll learn about typeglobs for symbolic entries.Additionally, you'll see advanced subroutine handling, then packages and namespaces. Furthermore, you'll build advanced modules and install CPAN modules. Unlike Java and C++, modules have been around in Perl for a long time now. Along the way, you'll learn and use POD mark up language for Perl documentation.Moreover, you'll get a survey of the many advanced features and data structures of the current Perl programming language. You'll also get a survey of the new features of the latest Perl 5.x release. After reading and using this book, you'll have the tools, techniques, and source code to be an expert Perl programmer.WHAT YOU WILL LEARN* Carry out command-line parsing and extract scripts * Create references; return values from a reference; work with the ref Function and strict refs* Work with advanced Perl data types using arrays, hashes, and hash of hashes * Use Typeglobs for symbol table entries * Build modules and install CPAN modules* Write documentation for Perl using POD * Work with the newest features in Perl, including the smartmatch operator, yada yada, automated regex modifiers, the CORE namespace and moreWHO THIS BOOK IS FORThose with experience with Perl or who have read Rothwell's prior books, Beginning Perl Programming and Pro Perl Programming. At the impressionable age of 14, William "Bo" Rothwell crossed paths with a TRS-80 Micro Computer System (affectionately known as a “Trash 80”). Soon after the adults responsible for Bo made the mistake of leaving him alone with the TSR-80. He immediately dismantled it and held his first computer class, showing his friends what made this “computer thing” work. Since this experience, Bo’s passion for understanding how computers work and sharing this knowledge with others has resulting in a rewarding career in IT training. His experience includes Linux, Unix, DevOps tools, and programming languages such as Perl, Python, Tcl, and BASH.Chapter One Command Line Options1.1 Introducing Command Line Options1.2 Changing Input Record Separator1.3 Create a Loop Around Your Script1.4 Editing in Place1.5 Syntax Checking1.6 Pre-appending to @INC1.7 Including Modules1.8 Command Line Parsing1.9 Displaying Configuration Information1.10 Extracting Scripts from Messages1.11 Additional Resources1.12 Lab ExercisesChapter Two References2.1 What are References?2.2 Creating References2.3 Returning the Value from a Reference2.4 The ref Function2.5 Making Anonymous References2.6 References to Functions2.7 use strict ‘refs’2.8 Additional Resources2.9 Lab ExercisesChapter Three Advanced Data Types: Arrays3.1 Review: What You Should Already Know About Arrays3.2 What You Might Know About Arrays3.3 Arrays of Arrays3.4 Creating Arrays of Arrays3.5 Accessing Values in an Array of Arrays3.6 Adding a Sub Array (Row)3.7 Adding a column3.8 Printing an Array of Arrays3.9 Additional Resources3.10 Lab ExercisesChapter Four Advanced Data Types: Hashes4.1 Review: What You Should Already Know About Hashes4.2 What You Might Know About Hashes4.3 Hashes of Hashes4.4 Creating Hashes of Hashes4.5 Accessing Values in a Hash of Hashes4.6 Other Data Structures4.7 Additional Resources4.8 Lab ExercisesChapter Five Typeglobs5.1 Symbolic Tables5.2 Typeglobs5.3 Using typeglobs5.4 References vs. Typeglobs5.5 Avoiding Aliases to Entire Identifier5.6 Making constants5.7 Passing Filehandles into Functions5.8 Redefining a Function5.9 Temporarily Redefining a Function5.10 Additional Resources5.11 Lab ExercisesChapter Six Advanced Subroutine Handling6.1 Review: What You Should Already Know About Functions6.2 What You Might Know About Functions6.3 Making Persistent Function Variables6.4 Using the caller Function6.5 Passing Arguments by Reference6.6 Determining Functions Return Data6.7 Returning Multiple Values6.8 Exception Handling6.9 Constant Functions6.10 Prototypes6.11 Additional Resources6.12 Lab ExercisesChapter Seven Packages and Namespaces7.1 Scope7.2 Creating Namespaces with the package Command7.3 Fully Qualified Package Names7.4 Nested Packages7.5 use strict 'vars'7.6 Identifiers Not Affected by Packages7.7 Determine the Current Package7.8 Packages vs. my Variables7.9 Additional Resources7.10 Lab ExercisesChapter Eight Building Modules8.1 Introduction to Perl Modules8.2 Creating a Module8.3 BEGIN and END Blocks8.4 Symbol Tables in Modules8.5 Exporting Identifiers from Modules8.6 Private Identifiers8.7 Oking Symbols to Export from Modules8.8 Module Version Numbers8.9 use vs. require8.10 A Note About Library Files8.11 Additional Resources8.12 Lab ExercisesChapter Nine Installing CPAN Modules9.1 What is CPAN?9.2 Accessing CPAN9.3 CPAN Organization9.4 Installing a CPAN Module Manually9.5 Installing CPAN Modules Using the CPAN Module9.6 Using the Perl Package Manager to Install CPAN Modules9.7 Listing What Modules are Currently Installed9.8 Additional Resources9.9 Lab ExercisesChapter Ten POD10.1 Overview of POD10.2 POD Commands10.3 POD Text10.4 POD Verbatim10.5 POD Examples10.6 Common POD Problems10.7 POD Utilities10.8 Additional Resources10.9 Lab ExercisesChapter Eleven Advanced Features11.1 Perl development environments11.2 The power of the do statement11.3 autodie11.4 String variables as files11.5 File::Spec11.6 Proper use of soft references11.7 Install modules from CPAN without admin privileges11.8 Basic testing11.9 Advanced testing11.10 Using prove11.11 BenchmarkingChapter Twelve Advanced Data Structures12.1 Introduction to Benchmarking12.2 Use the Readonly module to create constants12.3 Make large numbers more readable12.4 Make use of Scalar::Util12.5 Make use of List::Util12.6 Make use of List::MoreUtils12.7 List formatting12.8 Understand slices12.9 Make use of Hash::Util12.10 Make use of Hash::MoreUtils12.11 Smart use of subscripts12.12 Understand the advantages and disadvantages of for, foreach, grep and map12.13 Know different sort techniques12.14 Avoid using memory to store large dataChapter Thirteen New Features12.1 Perl versions12.2 The latest/greatest?12.3 Changes by version12.4 The feature pragma12.5 Make use of the Smartmatch Operator12.6 The // operator12.7 The UNITCHECK block12.8 Yada yada12.9 The autodie pragma12.10 Using each, keys, values with arrays 12.11 New Regular Expression modifiers12.12 Non-destructive substation12.13 Automating Regular Expression modifiers12.14 New feature for given12.15 Change in use feature12.16 The CORE namespace12.17 Overriding Perl keywords
Beginning PyQt
Learn GUI application development from the ground up, taking a practical approach by building simple projects that teach the fundamentals of using PyQt. Each chapter gradually moves on to teach more advanced and diverse concepts to aid you in designing interesting applications using the latest version of PyQt.You’ll start by reviewing the beginning steps of GUI development from, using different projects in every chapter to teach new widgets or concepts that will help you to build better UIs. As you follow along, you will construct more elaborate GUIs, covering topics that include storing data using the clipboard, graphics and animation, support for SQL databases, and multithreading applications. Using this knowledge, you’ll be able to build a photo editor, games, a text editor, a working web browser and an assortment of other GUIs.Beginning PyQt will guide you through the process of creating UIs to help you bring your own ideas to life. Learn what is necessary to begin making your own applications and more with PyQt!WHAT YOU'LL LEARN* Create your own cross-platform GUIs with PyQt and Python* Use PyQt’s many widgets and apply them to building real applications* Build larger applications and break the steps into smaller parts for deeper understanding* Work with complex applications in PyQt, from animation to databases and moreWHO THIS BOOK IS FORIndividuals who already have a fundamental understanding of the Python programming language and are looking to either expand their skills in Python or have a project where they need to create a UI, but may have no prior experience or no idea how to begin.Joshua Willman began using Python in 2015, when his first task was to build neural networks using machine learning libraries, including Keras and Tensorflow, for image classification. While creating large image data sets for his research, he needed to build a GUI that would simplify the workload and labeling process, which introduced him to PyQt. He currently works as a Python Developer and Instructor, designing courses to help others learn about coding in Python for game development, AI and machine learning, and programming using microcontollers. More recently, he set up the site Red Huli to explore his and others’ interests in using Python and programming for creative purposes.BEGINNING PYQTChapter 1 - Charting the CourseChapter 2 - Getting StartedChapter 3 - Adding Functions Through ButtonsChapter 4 - Learning about LayoutChapter 5 - Menus, Toolbars,and MoreChapter 6 - Styling Your GUIsChapter 7 - Creating GUIs with Qt DesignerChapter 8 - Working with the ClipboardChapter 9 - Graphics and Animation in PyQtChapter 10 - Intro to Handling DatabasesChapter 11 - Asynchronous ProgrammingChapter 12 - Extra ProjectsAppendix A - Reference Guide for PyQtAppendix B - Python Refresher
Einführung in Java
Mit diesem Buch steigen Sie ohne Vorkenntnisse in Java und die objektorientierte Programmierung ein. Schritt für Schritt machen Sie sich mit der Sprache und ihren Konzepten vertraut. Sie lernen, in Algorithmen zu denken und Java sowie die vielen Werkzeuge Ihrer Plattform geschickt zu nutzen. Immer praxisnah und mit Gefühl für mögliche Verständnishürden: So werden auch professionelle Themen wie Testabdeckung, Multithreading und Servletentwicklung einsteigergerecht vermittelt. Schließlich schreiben Sie zeitgemäßen Code, der auch komplexe Software trägt. Ideal für Ausbildung, Studium und Beruf! Aus dem Inhalt: Die Entwicklungsumgebung einrichten und kennenlernenGrundkonzepte glasklar vorgestelltSprachmittel gründlich verstehenNeue Features einsetzenUnit Tests und Test Driven DesignDatenbanken anbindenIn Servlet-Technologie einsteigenEvents einsetzen und asynchron programmierenGUIs entwickelnGuten Code schreibenMit Dateien und Streams arbeitenIn die Entwicklung von Android-Apps einsteigen Materialien zum Buch ... 19 1. Einführung ... 21 1.1 ... Was ist Java? ... 22 1.2 ... Die Arbeitsumgebung installieren ... 28 1.3 ... Erste Schritte in NetBeans ... 30 1.4 ... Das erste Programm ... 32 1.5 ... In Algorithmen denken, in Java schreiben ... 41 1.6 ... Die Java-Klassenbibliothek ... 47 1.7 ... Dokumentieren als Gewohnheit -- Javadoc ... 50 1.8 ... JARs erstellen und ausführen ... 56 1.9 ... Mit dem Debugger arbeiten ... 61 1.10 ... Das erste eigene Projekt ... 66 1.11 ... Zusammenfassung ... 68 2. Variablen und Datentypen ... 69 2.1 ... Variablen ... 69 2.2 ... Primitivtypen ... 73 2.3 ... Objekttypen ... 87 2.4 ... Objekt-Wrapper zu Primitiven ... 91 2.5 ... Array-Typen ... 94 2.6 ... Zusammenfassung ... 96 3. Entscheidungen ... 97 3.1 ... Entweder-oder-Entscheidungen ... 97 3.2 ... Logische Verknüpfungen ... 104 3.3 ... Mehrfach verzweigen mit »switch« ... 110 3.4 ... Zusammenfassung ... 116 4. Wiederholungen ... 117 4.1 ... Bedingte Wiederholungen mit »while« ... 117 4.2 ... Abgezählte Wiederholungen -- die »for«-Schleife ... 121 4.3 ... Abbrechen und überspringen ... 123 4.4 ... Zusammenfassung ... 126 5. Klassen und Objekte ... 127 5.1 ... Klassen und Objekte ... 128 5.2 ... Access-Modifier ... 130 5.3 ... Felder ... 132 5.4 ... Methoden ... 133 5.5 ... Warum Objektorientierung? ... 142 5.6 ... Konstruktoren ... 144 5.7 ... Statische Felder und Methoden ... 148 5.8 ... Unveränderliche Werte ... 151 5.9 ... Spezielle Objektmethoden ... 154 5.10 ... Zusammenfassung ... 156 6. Objektorientierung ... 157 6.1 ... Vererbung ... 158 6.2 ... Interfaces und abstrakte Datentypen ... 171 6.3 ... Übung: Objektorientierte Modellierung ... 179 6.4 ... Innere Klassen ... 180 6.5 ... Enumerationen ... 187 6.6 ... Zusammenfassung ... 190 7. Unit Testing ... 191 7.1 ... Das JUnit-Framework ... 193 7.2 ... Fortgeschrittene Unit Tests ... 199 7.3 ... Besseres Design durch Testfälle ... 205 7.4 ... Zusammenfassung ... 208 8. Die Standardbibliothek ... 209 8.1 ... Zahlen ... 209 8.2 ... Strings ... 214 8.3 ... Reguläre Ausdrücke ... 224 8.4 ... Zeit und Datum ... 231 8.5 ... Internationalisierung und Lokalisierung ... 236 8.6 ... Zusammenfassung ... 244 9. Fehler und Ausnahmen ... 245 9.1 ... Exceptions werfen und behandeln ... 245 9.2 ... Verschiedene Arten von Exceptions ... 252 9.3 ... Invarianten, Vor- und Nachbedingungen ... 258 9.4 ... Zusammenfassung ... 260 10. Arrays und Collections ... 261 10.1 ... Arrays ... 261 10.2 ... Die for-each-Schleife ... 271 10.3 ... Variable Parameterlisten ... 271 10.4 ... Collections ... 273 10.5 ... Typisierte Collections -- Generics ... 278 10.6 ... Maps ... 288 10.7 ... Zusammenfassung ... 290 11. Lambda-Ausdrücke ... 291 11.1 ... Was sind Lambda-Ausdrücke? ... 292 11.2 ... Die Stream-API ... 304 11.3 ... Un-Werte als Objekte -- »Optional« ... 321 11.4 ... Eine Warnung zum Schluss ... 324 11.5 ... Zusammenfassung ... 325 12. Dateien, Streams und Reader ... 327 12.1 ... Dateien und Verzeichnisse ... 328 12.2 ... Reader, Writer und die »anderen« Streams ... 334 12.3 ... Objekte lesen und schreiben ... 346 12.4 ... Netzwerkkommunikation ... 349 12.5 ... Zusammenfassung ... 352 13. Multithreading ... 353 13.1 ... Threads und Runnables ... 354 13.2 ... Atomare Datentypen ... 361 13.3 ... Synchronisation ... 362 13.4 ... Fortgeschrittene Koordination zwischen Threads ... 370 13.5 ... Die Zukunft -- wortwörtlich ... 376 13.6 ... Das Speichermodell von Threads ... 381 13.7 ... Zusammenfassung ... 383 14. Servlets -- Java im Web ... 385 14.1 ... Einen Servlet-Container installieren ... 386 14.2 ... Die erste Servlet-Anwendung ... 392 14.3 ... Servlets programmieren ... 403 14.4 ... Java Server Pages ... 410 14.5 ... Langlebige Daten im Servlet -- Ablage in Session und Application ... 416 14.6 ... Fortgeschrittene Servlet-Konzepte -- Listener und Initialisierung ... 419 14.7 ... Zusammenfassung ... 422 15. Datenbanken und Entitäten ... 423 15.1 ... Was ist eine Datenbank? ... 424 15.2 ... Mit einer Datenbank über die JPA verbinden ... 431 15.3 ... Anwendung und Entitäten ... 436 15.4 ... Entitäten laden ... 439 15.5 ... Entitäten löschen ... 444 15.6 ... Beziehungen zu anderen Entitäten ... 445 15.7 ... Zusammenfassung ... 452 16. GUIs mit JavaFX ... 453 16.1 ... Einführung ... 453 16.2 ... Installation ... 454 16.3 ... Architektur von JavaFX ... 454 16.4 ... GUI-Komponenten ... 457 16.5 ... Layouts ... 468 16.6 ... GUI mit Java-API -- Urlaubsverwaltung ... 478 16.7 ... Event-Handling ... 482 16.8 ... JavaFX-Properties und Binding ... 489 16.9 ... Deklarative GUIs mit FXML ... 495 16.10 ... Layout mit CSS ... 501 16.11 ... Transformationen, Animationen und Effekte ... 505 16.12 ... Übungen ... 512 16.13 ... Zusammenfassung ... 513 17. Android ... 515 17.1 ... Einstieg in die Android-Entwicklung ... 515 17.2 ... Eine Benutzeroberfläche designen ... 528 17.3 ... Anwendungen mit mehreren Activities ... 535 17.4 ... Permissions und SystemServices ... 542 17.5 ... Apps im Play Store veröffentlichen ... 546 17.6 ... Zusammenfassung ... 546 18. Hinter den Kulissen ... 549 18.1 ... Klassenpfade und Classloading ... 549 18.2 ... Garbage Collection ... 556 18.3 ... Flexibel codieren mit der Reflection-API ... 563 18.4 ... Blick in die Zukunft ... 569 18.5 ... Zusammenfassung ... 572 19. Und dann? ... 573 19.1 ... Jakarta EE ... 574 19.2 ... Open-Source-Software ... 579 19.3 ... Ergänzende Technologien ... 580 19.4 ... Andere Sprachen ... 583 19.5 ... Programmieren Sie! ... 585 Anhang ... 587 A ... Java-Bibliotheken ... 589 B ... Lösungen zu den Übungsaufgaben ... 597 C ... Glossar ... 707 D ... Kommandozeilenparameter ... 723 Index ... 731
The Definitive Guide to Masonite
Build fast and effective applications using Masonite, a Python-based framework. This book covers creating a digital home assistant application, but it’s certainly not the only kind of application you could build. By working on this kind of project, you’ll cover the broad range of topics and requirements you’re likely to find as you establish your own web empire.You’ll see how Masonite is a developer-centric Python framework, which provides all the tools you’ll need to build powerful and maintainable web applications. After reading and using this book, you'll have the tools to make and deploy your own web ecommerce application from scratch using the Masonite framework.WHAT YOU WILL LEARN* Customize your request and response cycle with middleware, route groups, and headers* Add security into your application and protect against possible vulnerabilities* Create and control your application’s maintenance features from a terminal* Manage a database, so your teammates and environments will always be in sync* Represent relational database data with object-oriented programming techniques* Read and write from the file system* Process large datasets and slow operations in the background* Add real-time features and recurring tasks to your applicationWHO THIS BOOK IS FORWeb developers new to the Masonite framework. Some prior Python experience is helpful but is not required.Christopher Pitt is a developer and writer, working at SilverStripe. He usually works on application architecture, though sometimes you’ll find him building compilers or robots. He is also the author of several web development books and is a contributor on various open source projects such as AdonisJs and Masonite.1. Getting started2. Routing3. The Service Container4. Accepting data through forms5. Using a database6. Security7. Authentication8. Middleware9. Helpers10. Doing Work in the Background11. Adding Websockets with Pusher12. Testing13. Deploying
Datenvisualisierung - Grundlagen und Praxis
Professionelle Datenvisualisierung: So sprechen und überzeugen Ihre Daten* Herausragendes Grundlagenwerk zum Thema Datenvisualisierung * Einprägsam und anschaulich durch eine Vielzahl von guten und schlechten Beispielen* Hoher Praxisnutzen durch Tipps zu Diagrammtypen, dem Einsatz von Farben und Formen u.v.m.Wie wird Wissen, das in komplexen Datensätzen steckt, zugänglich? Durch professionelle Datenvisualisierung.Ob Data Scientist, Wissenschaftler, Analyst oder Berater oder einfach alle, die technische Dokumente oder Berichte erstellen müssen: Datenvisualisierung ist zu einer unverzichtbaren Kernkompetenz geworden.Claus O. Wilke bietet in seinem Grundlagenwerk eine systematische Einführung in die Prinzipien, Methoden und Konzepte der Datenvisualisierung - und das sehr praxisnah und anschaulich: durch solide Grundlagen und unzählige gute und schlechte Beispiele.Nach der Lektüre wissen Sie, was professionelle Abbildungen ausmacht:Welche Darstellungsmöglichkeiten gibt es? Wie entwickelt man ein aussagekräftiges Farbschema? Welcher Visualisierungstyp eignet sich am besten für die Geschichte, die Sie erzählen möchten?Wilkes Grundlagenwerk verzichtet bewusst auf Programmcode. Die beschriebenen Konzepte und Prinzipien können - ganz gleich mit welcher Visualisierungssoftware Sie arbeiten - angewendet werden. R-Nutzer finden den Code zu den Abbildungen auf GitHub.Claus O. Wilke ist Professor für Integrative Biology an der University of Texas in Austin, USA. Er hat an der Ruhr-Universität Bochum in theoretischer Physik promoviert. Claus ist Autor und Co-Autor von über 170 wissenschaftlichen Publikationen, die sich mit Themen aus den Bereichen Computational Biology, mathematische Modellierung, Bioinformatik, Evolutionsbiologie, Proteinbiochemie, Virologie und Statistik befassen. Er hat außerdem mehrere beliebte R-Pakete zur Datenvisualisierung wie cowplot und ggridges entwickelt und wirkt an der Entwicklung von ggplot2 mit.
Deep Learning - Grundlagen und Implementierung
Grundprinzipien und Konzepte neuronaler Netze systematisch und verständlich erklärt* Deep-Learning-Grundlagen für Data Scientists und Softwareentwickler mit Erfahrung im Machine Learning * Implementierung der Deep-Learning-Konzepte mit dem beliebten Framework PyTorch* Zahlreiche Codebeispiele in Python verdeutlichen die konkrete Umsetzung Dieses Buch vermittelt Ihnen das konzeptionelle und praktische Rüstzeug, um ein tiefes Verständnis für die Funktionsweise neuronaler Netze zu bekommen. Sie lernen die Grundprinzipien des Deep Learning kennen, zu deren Veranschaulichung Seth Weidman gut nachvollziehbare Konzeptmodelle entwickelt hat, die von Codebeispielen begleitet werden. Das Buch eignet sich für Data Scientists und Softwareentwickler mit Erfahrung im Machine Learning.Sie beginnen mit den Basics des Deep Learning und gelangen schnell zu den Details fortgeschrittener Architekturen, indem Sie deren Aufbau von Grund auf neu implementieren. Dabei lernen Sie mehrschichtige neuronale Netze wie Convolutional und Recurrent Neural Networks kennen. Diese neuronalen Netzwerkkonzepte setzen Sie dann mit dem beliebten Framework PyTorch praktisch um. Auf diese Weise bauen Sie ein fundiertes Wissen darüber auf, wie neuronale Netze mathematisch, rechnerisch und konzeptionell funktionieren.Seth Weidman ist Data Scientist. Er teilt seine Zeit auf zwischen der Lösung von Machine-Learning-Problemen bei Facebook und seinem Engagement für PyTorch. Zuvor war er im Bereich Machine Learning bei Trunk Club tätig und hat später Machine Learning und Deep Learning im Corporate Training Team von Metis unterrichtet. Seine Passion ist es, komplexe Konzepte einfach zu erklären.
Clean Code für Dummies
Clean Code ist eine wichtige Methode, um zu besserer Software zu kommen. Zu beachten sind Korrektheit, Verständlichkeit, Lesbarkeit und Ressourcenverbrauch. Programmieren ist aber mehr als ein Handwerk. Klarer Code ist auch Ausdruck klaren Denkens und beginnt damit schon vor der Niederschrift. Regeln sind wichtige Stützen, aber das eigenständige Denken, Entscheiden und Abwägen ersetzen sie nicht. Das Buch vermittelt handwerkliche Fertigkeiten und stellt das Programmieren in den Gesamtprozess der Softwareentwicklung. Jürgen Lampe ist IT-Berater in Eschborn in der Nähe von Frankfurt. Er hat Mathematik studiert, Prozessrechenanlagen programmiert und als Hochschullehrer an der TU Dresden gearbeitet. Über die Jahre hat er nie das Coden aufgegeben. Er kennt diverse Programmiersprachen - von Algol60 über PL/I und Pascal bis zu Java - und er kennt die Vor- und Nachteile verschiedener Programmierstile.Über den Autor 9EINLEITUNG 23Über dieses Buch 23Konventionen in diesem Buch 24Was Sie nicht lesen müssen 24Törichte Annahmen über die Leser 25Wie dieses Buch aufgebaut ist 26Symbole, die in diesem Buch verwendet werden 27Wie es weitergeht 28TEIL I: DAS CLEAN-CODE-PRINZIP 29KAPITEL 1 SOFTWARE IST CODE31Erwartungen an Software 31Probleme haben Ursachen 32Allgemeine Ursachen 32Hardwareentwicklung 33Nichts ohne Code 34Das Wichtigste in Kürze 35KAPITEL 2 DIMENSIONEN VON CODEQUALITÄT37Was bedeutet Qualität? 37Eigenschaften des Qualitätsbegriffs 37Qualitätsindikatoren 38Die Dimensionen von Codequalität 39Korrektheit des Codes 39Lesbarkeit und Wartbarkeit 40Leistungseigenschaften 40Weitere Dimensionen 41Das Qualitätsziel festlegen 41Beispiel: Der euklidische Algorithmus 42Das Wichtigste in Kürze 43KAPITEL 3 ALLES UNTER EINEN HUT – GUTE KOMPROMISSE FINDEN 45Warum gute Entscheidungen wichtig sind 45Es kommt drauf an 45Widersprüche überall 46Konflikte akzeptieren 47Entscheidungen systematisch treffen 48Konflikte erkennen 48Alternativen sammeln 48Kriterien finden 49Wahlmöglichkeiten bewerten 50Entscheiden 51Mit Augenmaß 51Das Wichtigste in Kürze 52KAPITEL 4 DIE EIGENSCHAFTEN SAUBEREN CODES55Des Clean Codes Kern 55Code als Ziel 56Professionalität 57Es geht immer weiter 58Code als Kommunikationsmittel zwischen Menschen 58Lesbarkeit 59Verständlichkeit 59Eleganz 60Gute Wartbarkeit 61Leichter durch Verständlichkeit 61Nicht ohne Test 61Zu guter Letzt 62Das Wichtigste in Kürze 63KAPITEL 5 IN DER PRAXIS: STOLPERSTEINE 65Clean Code ist schwer 65Reden wir über die Kosten 65Kurz- und mittelfristige Vorteile 66Langfristige Vorteile 66Bewertung 68Ändern bleibt schwierig 68Manchmal passt es nicht 69Frameworks 70Projektvorgaben 70Starre Abläufe 71Falsche Autoritäten 71Es liegt an Ihnen 73Das Wichtigste in Kürze 73TEIL II: AN HERAUSFORDERUNGEN WACHSEN 75KAPITEL 6 MEHR ALS HANDWERKSKUNST77Programmieren ist schwer 77Software professionell entwickeln 79Softwareentwicklung braucht Handwerk 80Handwerk allein reicht nicht 82Das Wichtigste in Kürze 83KAPITEL 7 ENTWICKELN IST (KREATIVE) WISSENSCHAFT 85Formalisiertes Wissen 85Was sind formale Theorien? 86Wann braucht es eine (neue) Theorie? 87Wie Sie zu einer Theorie kommen? 88Mentales Modell als Theorie 88Wenn es so einfach wäre: Viele Hürden 89Und dann auch noch der kleine Rest 90Konsequenzen 91Die Bedeutung des Entwicklers darf nicht unterschätzt werden 91Es werden verschiedene Qualifikationen gebraucht 92Auch die Theorie muss weiterentwickelt werden 93Das Wichtigste in Kürze 94KAPITEL 8 MODELLIERUNGSDILEMMA UND ENTSCHEIDUNGSMÜDIGKEIT 95Das Modellierungsdilemma 95Was macht ein Modell aus? 95Ein Modell für alle Anforderungen gesucht 96Und wenn es kein umfassendes Modell gibt? 98Entscheiden ermüdet 100Entwickeln heißt entscheiden 100Entscheidungskraft optimal nutzen 101Das Wichtigste in Kürze 103KAPITEL 9 FALLEN VERMEIDEN 105Erst mal loslegen 105Agil heißt nicht »kein Konzept« 105Abgrenzung ist alles 106Wenn es nicht anders geht 107Schön flexibel bleiben 108Flexible Programme 109Flexibilität bläht auf 109Die Sinnfrage 110Modularisierung übertreiben 111Davon verschwindet die Komplexität nicht 111Zerlegung will geübt sein 112Schon wieder: Kosten 113Wachsen im Korsett 113Das Wichtigste in Kürze 114TEIL III: SAUBEREN CODE SCHREIBEN 115KAPITEL 10 NAMEN SIND NICHT SCHALL UND RAUCH 117Benennungen 117Namen versus Bezeichner 118Namen versus Begriffe 118Woher nehmen? 120Lösungsdomäne 120Anwendungsdomäne 120Eigenschaften guter Namen 121Den Sinn vermitteln 121Nicht in die Irre führen 121Sinnvolle Unterschiede 122Verschlüsselungen vermeiden 123Verwendbarkeit 124Klassen und Methoden 125Die Qual der Sprachwahl 125Englisch 126Deutsch 126Keine Empfehlung 126Was zu tun ist 127Das Wichtigste in Kürze 127KAPITEL 11 REINE FORMFRAGE – FORMATIERUNG129Das Auge liest mit 129Vertikales Formatieren 131Codelänge 131Vorbild Zeitung 131Vertikale Abstände 132Vertikale Ordnung 134Horizontales Formatieren 135Zeilenlänge 135Horizontale Abstände 136Einrückungen 138Automatische Formatierung 139Vorteile 139Nachteile 140Das Wichtigste in Kürze 140KAPITEL 12 CODE ZUERST – SIND KOMMENTARE NÖTIG? 141Code allein reicht nicht 141Erklärung gesucht 141Das große Missverständnis: Code spricht nur den Computer an 142Kommentare – hilfreich oder störend? 142Kommentare lügen – oft 143Sinnvolle Kommentare 143Rechtshinweise 143Unerledigtes 143Klarstellungen und Warnungen 144Algorithmen 144Spezifikationen 144Pragmatisches 146Schlechte Kommentare 147Nichtssagendes 147Auskommentierter Code 148Unterschiedliche Sprachen 148Fehlender Bezug 148JavaDoc 149Dokumentationen 150Schönheit 151Das Wichtigste in Kürze 152KAPITEL 13 KLEINE SCHRITTE – SAUBERE METHODEN153Methoden 153Begriffliche Klärung 154Eigenschaften 154Der Inhalt 155Abstraktion 155Trennung von Bearbeitung und Abfrage 155Testen 156Die Größe 156Eine Aufgabe 156Zeilenzahl 157Schachtelungsstruktur 158Parameter 159Anzahl 160Stellung 162Parameter vermeiden 162Testen 163Flag-Parameter 163Resultate 164Rückgabewerte 164Rückgabewert null 165Ergebnisparameter 166Rückkehrcodes 167Seiteneffekte 167Auswahlanweisungen 168Alles fließt 170Das Wichtigste in Kürze 170KAPITEL 14 PASSEND SCHNEIDEN – SCHNITTSTELLEN 171Die Rolle von Schnittstellen 171Mehr als ein Interface 171Isoliert betrachtet 172Im Verbund 172Komponenten 173Interface Segregation 174Schlanke Schnittstellen 174Kohäsion 175Kombination 179Keine Missverständnisse 180Exakte Beschreibung 180Voraussetzungen aufführen 181Vollständige Definition 182Tests und Mocks 182Kein Code ohne Fremdcode 183Eine unsichtbare Grenze 184Abhängigkeiten isolieren 184Wie es gehen könnte 185Das Wichtigste in Kürze 189KAPITEL 15 OBJEKTE UND DATENSÄTZE UNTERSCHEIDEN191Was ist ein Objekt? 191Und ein Datensatz? 192Die Praxis 193Die Objekt-Datensatz-Antisymmetrie 194Java und Objektorientierung 194Prozeduraler Code 195Objektorientierter Code 197Schlussfolgerungen 199Das Gesetz von Demeter 199Internes intern halten 200Trotzdem kommunikativ sein 200Das gilt auch umgekehrt 202Aufrufketten 203Fazit 205Das Wichtigste in Kürze 205KAPITEL 16 WEGE IM DSCHUNGEL – REGELN 207Wiederholungen vermeiden 207Die Regel 207Motivation 208Umsetzung 209Schwierigkeiten 210Liefern, was verlangt wird 211Die Regel 211Motivation 212Umsetzung 212Schwierigkeiten 213Jedes für sich 213Die Regel 213Motivation 214Umsetzung 214Schwierigkeiten 214Die SOLID-Regeln 215Single Responsibility Principle – SRP 215Open Closed Principle – OCP 216Liskov Substitution Principle – LSP 217Interface Segregation Principle – ISP 217Dependency Inversion Principle – DIP 217Einfach besser 218Halte es einfach 218Geringste Überraschung 219Fazit 219Das Wichtigste in Kürze 219KAPITEL 17 FEHLER PASSIEREN – FEHLERBEHANDLUNG221Ausgangslage 221Fehlerarten 222Datenfehler 222Seltene Datenfehler 223Häufige Datenfehler 223Funktionsfehler 225Hardwarefehler 226Semantische Fehler 227Plausibilitätsprüfung 227Wertebereichs-Überschreitungen 229Keine Panik 231Das Wichtigste in Kürze 231KAPITEL 18 AUSNAHMEN REGELN – EXCEPTIONS 233Sinn und Zweck 233Checked und Unchecked Exceptions 234Kosten 235Werfen von Exceptions 235Generische Exceptions verwenden 235Spezielle Exceptions definieren 236Fangen von Exceptions 238Funktionsblöcke bestimmen 238Fachliche und technische Exceptions 239Verpacken von Exceptions 240Loggen von Exceptions 240Angemessenheit 241Das Wichtigste in Kürze 242KAPITEL 19 IMMER WEITER – NEUE SPRACHMITTEL243Wie beurteilen? 243Annotationen 245Funktion 246Anwendungsarten 246Risiken minimieren 248Lambda-Ausdrücke 248Klippen 248So vielleicht 250Streams 251Die Idee 252Anwendung 252Aber Vorsicht 253Fazit 254Spezialisierung 254Beschränkung 255Das Wichtigste in Kürze 256TEIL IV: WEGE ZUM ZIEL 257KAPITEL 20 MITEINANDER LERNEN – CODE REVIEWS 259Zweck 260Was nicht geht 260Das Potenzial 261Durchführung 262Erfolgsvoraussetzungen 262Vorbereitung 263Review-Rollen 265Review-Werkzeuge und Metriken 266Review-Bewertung 267Codequalität 267Review-Qualität 267Das Wichtigste in Kürze 268KAPITEL 21 AUS FEHLERN LERNEN 269Fehler macht jeder 269Fehler analysieren 270Fehlerursachen ermitteln 271Fehlerarten 272Priorisierung 272Denken Sie an … 273Erkenntnisse nutzen 275Code Reviews nutzen 275Ergebnisse dokumentieren 275Wiederholen: Erkenntnisse erneut erörtern 275Das Wichtigste in Kürze 276KAPITEL 22 ES GIBT IMMER WAS ZU TUN – REFACTORING 277Die Idee 277Die Praxis 278Vorbereitung 278Schritt für Schritt 280Im Großen und im Kleinen 280Ein Beispiel 281Das Wichtigste in Kürze 282TEIL V: DER TOP-TEN-TEIL 283KAPITEL 23 10 FEHLER, DIE SIE VERMEIDEN SOLLTEN 285Buch in Schrank stellen 285Nicht sofort anfangen 285Aufgeben 286Nicht streiten 286Schematisch anwenden 286Kompromisse verweigern 286Unrealistische Terminzusagen 287Überheblichkeit 287Denken, fertig zu sein 287Alles tierisch ernst nehmen 287KAPITEL 24 (MEHR ALS) 10 NÜTZLICHE QUELLEN ZUM AUFFRISCHEN UND VERTIEFEN 289Clean Code – das Buch und der Blog 289Clean Code Developer 290Software Craftsmanship 290Java Code Conventions 29097 Dinge, die jeder Programmierer wissen sollte 290The Pragmatic Bookshelf 291Prinzipien der Softwaretechnik 291Refactoring 291Code Reviews 291Codeanalyse 292Verzögerungskosten 292Project Oberon 292Stichwortverzeichnis 295
C++ für Dummies (8. Auflg.)
Die Programmierung mit C++ muss nicht schwer sein. Mit diesem Buch werden Sie schon ab dem ersten Kapitel eigene Programme schreiben und die C++-Syntax von der Pike auf lernen, verstehen und anwenden. Arnold Willemer erklärt Ihnen, wie Sie Code zu Modulen zusammenfassen, die Sie immer wieder verwenden können, und schon bald werden Sie wissen, wie man Variablen deklariert und mathematische Operationen ausführt. So ist dies das richtige Buch für Ihren Einstieg in C++. Arnold Willemer ist Programmierer und Administrator mit mehr als zwanzig Jahren Berufserfahrung. Er hat mehrere erfolgreiche Computer-Bücher geschrieben, die sich durch ihre Verständlichkeit und ihren lockeren Stil auszeichnen.EINLEITUNG 21Über dieses Buch 21Konventionen in diesem Buch 21Törichte Annahmen über den Leser 21Wie dieses Buch aufgebaut ist 22Symbole, die in diesem Buch verwendet werden 23Wie es weitergeht 24TEIL I: WIR PROGRAMMIEREN25KAPITEL 1 GRUNDGERÜST EINES PROGRAMMS27Die Funktion main() 27Kommentare 28Ausgabe für Anfänger 29Zahlenspielereien 30Übungen 31KAPITEL 2 VARIABLEN UND VERARBEITUNG33Variablendefinition 33Namensregeln 35Ganze Zahlen 36Wir rechnen 37Wertveränderungen 38Ganzzahlige Literale 41Zeichen 42Fließkommazahlen 45Symbolische Konstanten 46Aufzählungstyp enum 47Typen umtaufen 49Fallstricke beim Umgang mit Typen 49Überlauf 49Typkonvertierung und Casting 51Ganzzahlige Division 52Automatische Typbestimmung 53Zahlen ein- und ausgeben 53Ausgabestrom 53Formatierte Ausgabe 54Eingabestrom aus cin 54Übungen 55KAPITEL 3 ABFRAGE UND WIEDERHOLUNG57Verzweigungen 57Nur unter einer Bedingung: if 58Andernfalls: else 58Struktogramm 59Dangling else 61Fall für Fall: switch case 62Bedingter Ausdruck: Fragezeichen 64Boolesche Ausdrücke 65Variablen und Konstanten 65Operatoren 66Verknüpfung von booleschen Ausdrücken 67Immer diese Wiederholungen: Schleifen 71Kopfgesteuert: while 71Fußgesteuert: do… while 75Abgezählt: for 76Der Sprung als Feind der Struktur 79Der brutale Sprung: goto 80Schleifenausbruch: break 81Schleifenrücksprung: continue 82Beispiel: Größter gemeinsamer Teiler 83Mitmachbeispiel: Schleifende Hunde und Füchse 85Übungen 86TEIL II: DATENTYPEN UND -STRUKTUREN89KAPITEL 4 DAS ARRAY91Definition und Zugriff auf ein Array 91Grenzen und Größen 93Arrays lieben die for-Schleife 94Lottozahlen sollten zufällig sein 95Keine Doppelten beim Lotto 96Sortierte Lottozahlen 99Mehrere Dimensionen 102Beispiel: Bermuda 103Spielanleitung Bermuda 103Spielfeld anzeigen 103Die Schiffskoordinaten 105Übungen 106KAPITEL 5 ZEIGER UND DESSEN MÖGLICHKEITEN109Der Zeiger und die Adresse 109Arrays und Zeiger 112Zeigerarithmetik 113Wettrennen zwischen Index und Zeiger 114Klassische Zeichenketten 115Addition und Subtraktion 116Konstante Zeiger 116Der Zeiger auf gar nichts: void* 117Übungen 117KAPITEL 6 VARIABLENVERBUND STRUCT 119Ein Verbund mehrerer Variablen 119Arrays von Strukturen 121Zeiger auf Strukturen 121Beispiel: Bermuda 123Objekte dynamisch erzeugen und löschen: new und delete 124Der Befehl new 124Zur Laufzeit erzeugte Arrays 125Verkettete Listen 126TEIL III: FUNKTIONEN131KAPITEL 7 FUNKTIONEN IM EIGENBAU133Anweisungen zusammenfassen 133Funktionsparameter 135Ein Rückgabewert als Ergebnis 136Prototypen 137Noch ein paar Bemerkungen zu Parametern 138Zeiger als Parameter 138Arrays als Parameter 140Die Parameter der Funktion main 144Referenzparameter 145Parameter vorbelegen 146Variable Anzahl von Parametern 147Überladen von Funktionen 148Kurz und schnell: Inline-Funktionen 149KAPITEL 8 HILFREICHE BIBLIOTHEKSFUNKTIONEN151Zufall 151Mathematische Funktionen 153Zeitfunktionen 155KAPITEL 9 EINSATZ VON FUNKTIONEN 159Vermeidung doppelten Codes 159Top-down-Design am Beispiel Bermuda 159Vom Diagramm zum Listing 160Die Daten und die Parameter 160Initialisierung der Datenstrukturen 161Benutzereingabe 162Suche die Schiffe 162Eintrag im Spielfeld 165Ende des Spiels 165Globale, lokale und statische Variablen 166Globale Variablen 166Lokale Variablen 167Statische Variablen 167Rekursion: Selbstaufrufende Funktionen 168Fibonacci, die Kaninchen und der Goldene Schnitt 168Einbindungen 170Türme von Hanoi 171Rückruf erwünscht: Der Funktionszeiger als Parameter 173Anonym: Die Lambda-Funktion 175Übungen 176TEIL IV: ZEICHENKETTEN177KAPITEL 10 DIE STANDARDKLASSE STRING 179Zeichenkettenliterale 179Definieren und Zuweisen 180Zugriff auf einzelne Zeichen 181String-Funktionen 181Länge des Strings 181Verändern von String-Inhalten 181Suche und Informationen 182Umwandlung von Zahlen und Zeichenketten 183Vergleiche 185Ein- und Ausgabe von Strings 186Umwandlung von string in ein char-Array 187KAPITEL 11 DAS CHAR-ARRAY ALS ERBE VON C189Speichern im Array 189Der Zeiger auf char 191Die String-Bibliothek 192Strings in Zahlen konvertieren 193Zahlen in Strings konvertieren 194TEIL V: KLASSEN197KAPITEL 12 AM BEISPIEL ZU BRUCH GEHEN199Die Klasse Bruch 199Der Bruch hat eigene Funktionen 202Initialisierung durch Konstruktoren 205Konstruktor mit Parameter 207Destruktor 209Konstruktor und Destruktor bei Arrays 210Konvertierungskonstruktor 210Konvertierungsoperator 211Private Attribute 212Operatoren überladen 213Wir multiplizieren mit dem Stern 213Alle möglichen Operatoren 214Besonderheiten bei Inkrement und Dekrement 216Die Vergleichsoperatoren 217Ausgabeoperatoren und Freunde 218Der Indexoperator 220Der Aufrufoperator () 222Die Kopie von Zeigern in Klassen 222Der Zuweisungsoperator 223Kopierkonstruktor 224Statische Variablen und Funktionen in Klassen 226Statische Klassenattribute 226Statische Methoden 227Statische lokale Variable 228Konstante Parameter und Funktionen 229Übungen 230KAPITEL 13 VERERBUNG231Basisklasse 232Kompatibilität zur Basisklasse: »Ist ein« 234Zugriff nur für Erben: protected 234Zugriffsattribute der Vererbung 235Konstruktorenvererbung 237Kopierkonstruktor und Zuweisungsoperator 238Mehrfachvererbung 238Objektorientiertes Design für Bermuda 240Die Koordinate 240Das Schiff 241Die Flotte 242Das Spielfeld 245Die Spielklasse Bermuda mit Mehrfachvererbung 247Übungen 247KAPITEL 14 POLYMORPHIE UND VIRTUELLE FUNKTIONEN 249Die Mensa der Universität Norgaardholz 249Ein Objekt weiß, was es tut: Polymorphie 252Rückgriff auf die Basisklasse 253Eine abstrakte Suppe 254Die Mahlzeit als vollkommen abstrakte Klasse 255Virtueller Destruktor 256Polymorphie bei grafischen Oberflächen 257Übungen 258TEIL VI: FORTGESCHRITTENE PROGRAMMIERTECHNIKEN261KAPITEL 15 GROẞE PROGRAMMPROJEKTE263Aufteilung der Quelltexte 263Implementierung und Schnittstelle 263Doppelter Include 268Zusammenbinden der Objektdateien 269Projektsteuerung am Beispiel make 269Header-Dateien und Schnittstellen 271Deklaration und Definition 271Einbinden von Header-Dateien 273Bibliotheken 274Eigene Bibliotheken erzeugen 274Statische Bibliotheken einbinden 275Dynamische Bibliotheken 276Namensräume 278Definition eines Namensraums 278Zugriff 279Besondere Namensräume 280KAPITEL 16 KATASTROPHENSCHUTZ: FEHLER, AUSNAHMEN UND VORBEDINGUNGEN281Die klassische Fehlerbehandlung 281Ausnahmebehandlung 283try und catch 283Eigene Ausnahmen werfen 284Erstellen von Fehlerklassen 287Die Ausnahmen der Standardbibliotheken 288Vorbedingungen 290assert 290Der Compiler prüft 292KAPITEL 17 INTELLIGENTE SAMMELBEHÄLTER293Charakterlose Daten 293Generische Programmierung 295Template-Funktionen 296Template-Klassen 299Die Container-Klasse vector 302Dynamik 303Kapazität und Größe 305Grenzüberschreitung 306Iteratoren als Zeigerersatz 307Methoden des Vektors 309Die Container-Klasse deque 310Die Container-Klasse list 312Sortieren einer Liste: sort 313Eine Liste in eine andere einsortieren: merge 315Alles umdrehen: reverse 316Mengen-Container: set 317Löschen aus dem Set 317Suchen und Sortieren 318Sortierreihenfolge 318Der assoziative Container map 319Container-Adapter 321Der Container-Adapter stack 321Der Container-Adapter queue 322Iteratortypen 323Die Algorithmen der STL 324Suchen: find 325Sortieren 326Binäres Suchen 327Kopieren: copy 327Umdrehen: reverse 328Füllen: fill 329equal 329Funktionsobjekt als Parameter: find_if 329for_each 332Vereinigung und Durchschnitt 333Die Template-Klasse bitset 335TEIL VII: DAUERHAFTES ABLEGEN VON DATEN337KAPITEL 18 EIN- UND AUSGABE IN DATEIEN 339Formatierte Ausgabe im Datenstrom 339Ausgabestrom ausrichten 340Dateioperationen mit fstream 344Öffnen und Schließen 345Lesen und Schreiben sequenzieller Daten 346Binäre Daten blockweise verarbeiten 350Problembehandlung 353Exceptions 354Dateizugriffe nach ANSI-C 355KAPITEL 19 DATENBANKEN361Objektorientierter portabler Zugang: CppDB 363Installation 363Einbindung 363Verbindungsaufname zur Datenbank 364SQL-Befehle übergeben 365Auslesen mit SELECT 366Beispielhafte Person 366Datenbankbibliothek SQLite 369Einrichtung 369Programmieren mit SQLite 370Tabelle erzeugen und mit Daten füllen 371Auslesen der Daten 373TEIL VIII: GRAFISCHE FENSTERPROGRAMME GUI377KAPITEL 20 GRAFISCHE OBERFLÄCHEN379KAPITEL 21 C-API AM BEISPIEL WIN32381Hauptprogramm 382Die Fensterfunktion WndProc 382Mausverhalten 384Kontrollelemente 384Bermuda in Win32 385KAPITEL 22 OBJEKTORIENTIERT MIT WXWIDGETS391Installation von wxWidgets 391wxWidgets für Linux einrichten 392wxWidgets für Windows und Mac beschaffen 392Ein wxWidgets-Programm erstellen 393Code::Blocks unter Linux und Windows 394Ein minimales xwWidgets-Programm 395Grafik 396Grafische Kontroll- und Eingabeelemente 398Layout 400BoxSizer 400GridSizer 401FlexGridSizer 402Die Kombination mehrerer Layouts 402Bermuda in der wxWidgets-Version 403KAPITEL 23 QT409Geschichte eines portablen Frameworks 409Installation 410Linux 410Windows und Mac 410Ein Qt-Widgets-Projekt 410Der Qt-Designer 412TEIL IX: PROGRAMMIERUMGEBUNG415KAPITEL 24 COMPILER BESCHAFFEN UND EINRICHTEN417Der GNU-C++-Compiler 417Der GNU-C++-Compiler unter Linux 417Der GNU-C++-Compiler unter MS Windows 418Microsoft Visual Studio 418Projekt erstellen 419Windows Desktopassistent 421Code::Blocks 421Linux 422Windows 422Der Aufbau von Code::Blocks 422Ein Projekt anlegen 423Übersetzen und starten 424Eclipse als C++-Umgebung 424Anlegen eines Projekts 425Generieren und ausführen 425NetBeans 425Linux 426Windows 426Ein C++-Projekt erzeugen 427KAPITEL 25 PROGRAMMIERWERKZEUGE429Der Compiler und der Linker 429Compiler-Aufruf 429Compiler-Optionen 430Fehlermeldungen 431Der Präprozessor 432Einbinden von Dateien: #include 433Konstanten und Makros: #define 433Abfragen: #if 435Auf Fehlersuche mit dem Debugger 437Debuggen in der IDE 437Konsolen-Debug 438Versionsverwaltungen 439Arbeitsweise 439Subversion 441Git 443TEIL X: DER TOP-TEN-TEIL445KAPITEL 26 10 GRÜNDE, WARUM SIE C++ EINSETZEN WOLLEN 447Sie wollen native Programme schreiben 447Sie wollen sehr schlanke Programme schreiben 447Das Programm soll schnell starten 447Das Programm soll schnell laufen 447Das Programm soll direkt an eine API ankoppeln 448Sie wollen verhindern, dass jemand Ihren Source Codeaus der ausführbaren Datei rekonstruiert 448Sie müssen ganz dicht an die Maschine heran 448Sie mögen keine ideologischen Vorschriften 448Sie müssen sehr vertrackte Datenstrukturen auslesen 449Sie lieben das Hashtag-Zeichen 449KAPITEL 27 DIE 10 BELIEBTESTEN C++-FEHLER451Sie benutzen beim n-dimensionalen Array n als Index 451Ihre Schleife läuft ewig, weil Ihre Bedingung falsch formuliert ist 451Ihre Schleife läuft ewig, weil sich die Variable, die für die Bedingung geprüft wird, im Schleifenkorpus nie ändert 451Sie haben direkt hinter der Klammer von if/while/for ein Semikolon gesetzt 452Sie haben vergessen, den #include zu setzen, und wundern sich, warum die Bezeichner unbekannt sind 452Sie arbeiten mit deutschen Umlauten und verwenden kein unsigned char 452Sie haben delete aufgerufen, aber den Zeiger anschließend nicht auf nullptr gesetzt 452Sie verwenden häufiger new als delete 453Ihre Klasse enthält ein Zeigerattribut, aber es fehlt der Copy-Konstruktor und der Zuweisungsoperator 453Sie verwechseln es mit Java 453Stichwortverzeichnis 457
Spring Boot Persistence Best Practices
This book is a collection of developer code recipes and best practices for persisting data using Spring, particularly Spring Boot. The book is structured around practical recipes, where each recipe discusses a performance case or performance-related case, and almost every recipe has one or more applications. Mainly, when we try to accomplish something (e.g., read some data from the database), there are several approaches to do it, and, in order to choose the best way, you have to know the implied trades-off from a performance perspective. You’ll see that in the end, all these penalties slow down the application. Besides presenting the arguments that favor a certain choice, the application is written in Spring Boot style which is quite different than plain Hibernate.Persistence is an important set of techniques and technologies for accessing and using data, and this book demonstrates that data is mobile regardless of specific applications and contexts. In Java development, persistence is a key factor in enterprise, ecommerce, cloud and other transaction-oriented applications.After reading and using this book, you'll have the fundamentals to apply these persistence solutions into your own mission-critical enterprise Java applications that you build using Spring.WHAT YOU WILL LEARN* Shape *-to-many associations for best performances* Effectively exploit Spring Projections (DTO) * Learn best practices for batching inserts, updates and deletes * Effectively fetch parent and association in a single SELECT* Learn how to inspect Persistent Context content* Dissect pagination techniques (offset and keyset)* Handle queries, locking, schemas, Hibernate types, and moreWHO THIS BOOK IS FORAny Spring and Spring Boot developer that wants to squeeze the persistence layer performances.ANGHEL LEONARD is a Chief Technology Strategist with 20+ years of experience in the Java ecosystem. In daily work, he is focused on architecting and developing Java distributed applications that empower robust architectures, clean code, and high-performance. Also passionate about coaching, mentoring and technical leadership. He is the author of several books, videos and dozens of articles related to Java technologies.Chapter 1: AssociationsChapter 2: EntititesChapter 3: FetchingChapter 4: BatchingChapter 5: CollectionsChapter 6: Connections and TransactionsChapter 7: IdentifiersChapter 8: Calculating PropertiesChapter 9: MonitoringChapter 10: Configuring DataSource and Connection PoolChapter 11: AuditChapter 12: SchemasChapter 13: PaginationChapter 14: QueriesChapter 15: Locking16: Types and Hibernate TypesAppendix A: JPA FundamentalsAppendix B: Associations EfficiencyAppendix C: 5 SQL Performance Tips That Will Save Your DayAppendix D: How to Create Useful Database IndexesAppendix E: SQL PhenomenaAppendix F: Spring Transaction Isolation LevelAppendix G: Spring Transaction PropagationAppendix H: Understanding Flushing MechanismAppendix I: Second Level CacheAppendix J: ToolsAppendix K: Hibernate 6
Deep Learning mit TensorFlow, Keras und TensorFlow.js
Deep Learning - eine Schlüsseltechnologie der Künstlichen Intelligenz. Neuronale Netze bringen Höchstleistung, wenn sie zu Deep-Learning-Modellen verknüpft werden - vorausgesetzt, Sie machen es richtig. Große und gute Trainingsdaten beschaffen, geschickt implementieren ... lernen Sie hier, wie Sie die mächtige Technologie wirklich in Ihren Dienst nehmen. Unsere Autoren zeigen Ihnen sowohl die Arbeit mit Python und Keras als auch für den Browser mit JavaScript, HTML5 und TensorFlow.js. Aus dem Inhalt: Deep-Learning-GrundkonzepteInstallation der FrameworksVorgefertigte Modelle verwendenDatenanalyse und -vorbereitungConvolutional Networks, LSTM, RNN, Pooling ...Aufgaben eines Modells richtig festlegenEigene Modelle trainierenOverfitting und Underfitting vermeidenErgebnisse visualisieren 1. Einführung ... 15 1.1 ... Über dieses Buch ... 15 1.2 ... Ein Einblick in Deep Learning ... 17 1.3 ... Deep Learning im Alltag und in der Zukunft ... 19 2. Machine Learning und Deep Learning ... 33 2.1 ... Einführung ... 33 2.2 ... Lernansätze beim Machine Learning ... 38 2.3 ... Deep-Learning-Frameworks ... 44 2.4 ... Datenbeschaffung ... 46 2.5 ... Datasets ... 48 2.6 ... Zusammenfassung ... 65 3. Neuronale Netze ... 67 3.1 ... Aufbau und Prinzip ... 67 3.2 ... Lernprozess neuronaler Netze ... 73 3.3 ... Datenaufbereitung ... 81 3.4 ... Ein einfaches neuronales Netz ... 82 3.5 ... Netzarchitekturen ... 91 3.6 ... Bekannte Netze ... 98 3.7 ... Fallstricke beim Deep Learning ... 101 3.8 ... Zusammenfassung ... 106 4. Python und Machine-Learning-Bibliotheken ... 107 4.1 ... Installation von Python 3.7 mit Anaconda ... 108 4.2 ... Alternative Installationen von Python 3.7 ... 113 4.3 ... Programmierumgebungen ... 116 4.4 ... Jupyter Notebook ... 121 4.5 ... Python-Bibliotheken für das Machine Learning ... 126 4.6 ... Nützliche Routinen mit NumPy und Scikit-learn für ML ... 129 4.7 ... Ein zweites Machine-Learning-Beispiel ... 133 4.8 ... Zusammenfassung ... 137 5. TensorFlow: Installation und Grundlagen ... 139 5.1 ... Einführung ... 139 5.2 ... Installation ... 143 5.3 ... Google Colab: TensorFlow ohne Installation benutzen ... 153 5.4 ... Tensoren ... 154 5.5 ... Graphen ... 160 5.6 ... Benutzung der CPU und GPU ... 171 5.7 ... Erstes Beispiel: Eine lineare Regression ... 174 5.8 ... Von TensorFlow 1.x zu TensorFlow 2 ... 180 5.9 ... Zusammenfassung ... 183 6. Keras ... 185 6.1 ... Von Keras zu tf.keras ... 185 6.2 ... Erster Kontakt ... 189 6.3 ... Modelle trainieren ... 191 6.4 ... Modelle evaluieren ... 193 6.5 ... Modelle laden und exportieren ... 194 6.6 ... Keras Applications ... 197 6.7 ... Keras Callbacks ... 198 6.8 ... Projekt 1: Iris-Klassifikation mit Keras ... 200 6.9 ... Projekt 2: CNNs mit Fashion-MNIST ... 204 6.10 ... Projekt 3: Ein einfaches CNN mit dem CIFAR-10-Dataset ... 213 6.11 ... Projekt 4: Aktienkursvorhersage mit RNNs und LSTMs ... 220 6.12 ... Zusammenfassung ... 226 7. Netze und Metriken visualisieren ... 227 7.1 ... TensorBoard ... 228 7.2 ... TensorBoard.dev ... 246 7.3 ... Debugging mit TensorBoard (nur TF 1.x) ... 248 7.4 ... Der TensorBoard-Debugger mit Keras (nur TF 1.x) ... 257 7.5 ... Visualisierung mit Keras ... 259 7.6 ... Visualisierung von CNNs mit Quiver (nur mit Keras.io) ... 267 7.7 ... Interaktive Visualisierung mit Keras-Callbacks, Node.js und HTML5 selbst implementieren ... 271 7.8 ... Weitere Visualisierungsmöglichkeiten ... 281 8. TensorFlow.js ... 285 8.1 ... Anwendungsfälle ... 285 8.2 ... Installation von BrowserSync ... 288 8.3 ... Installation von TensorFlow.js ... 290 8.4 ... Konzepte ... 293 8.5 ... Ihr erstes Modell mit TensorFlow.js: Eine quadratische Regression ... 304 8.6 ... Laden und Speichern von Modellen ... 318 8.7 ... PoseNet-Modell mit TensorFlow.js ... 327 8.8 ... Eine intelligente Smart-Home-Komponente mit TensorFlow.js und Node.js ... 343 8.9 ... TensorFlow.js noch einfacher: ml5.js ... 356 9. Praxisbeispiele ... 361 9.1 ... Projekt 1: Verkehrszeichenerkennung mit Keras ... 363 9.2 ... Projekt 2: Intelligente Spurerkennung mit Keras und OpenCV ... 379 9.3 ... Projekt 3: Erkennung der Umgebung mit YOLO und TensorFlow.js bzw. ml5.js ... 392 9.4 ... Projekt 4: Haus oder Katze? Vorgefertigte Modelle mit Keras benutzen -- VGG-19 ... 403 9.5 ... Projekt 5: Buchstaben- und Ziffernerkennung mit dem Chars74K-Dataset und Datenaugmentierung ... 410 9.6 ... Projekt 6: Stimmungsanalyse mit Keras ... 418 9.7 ... Projekt 7: Sentiment-Analyse mit TensorFlow.js ... 425 9.8 ... Projekt 8: Benutzung von TensorFlow Hub ... 429 9.9 ... Projekt 9: Hyperparameter-Tuning mit TensorBoard ... 437 9.10 ... Projekt 10: CNN mit Fashion-MNIST und TensorFlow-Estimators (nur TF 1.x) ... 442 9.11 ... Allgemeine Tipps und Tricks ... 455 10. Ausblick ... 463 10.1 ... Deep Learning in der Cloud ... 463 10.2 ... Bildgenerierung mit Deep Learning ... 471 10.3 ... Musik mit Deep Learning ... 476 10.4 ... Videogenerierung mit Deep Learning ... 478 10.5 ... Deep Learning einfacher gemacht ... 480 11. Fazit ... 489 Index ... 492