Programmierung
Parallele und verteilte Anwendungen in Java
Für Nutzer ist es selbstverständlich, dass sie mehrere Programme gleichzeitig verwenden können oder dass Programme so komplex sind, dass sie auf mehrere Rechner zugreifen müssen. Aber wie werden solche Anwendungen programmiert?Das vorliegende Standardwerk zu Parallelität und Verteilung behandelt als Lehrbuch zwei eng miteinander verknüpfte Basisthemen der Informatik: die Programmierung paralleler (nebenläufiger) und verteilter Anwendungen.Das Lehrbuch wendet sich an Studierende der Informatik, ingenieurwissenschaftliche Studiengänge mit Grundkenntnissen in Java (Objektorientierung) sowie Softwareentwickler.Es werden zunächst anhand zahlreicher Beispiele grundlegende Synchronisationskonzepte für die Programmierung paralleler Abläufe präsentiert.Neben den "klassischen" Synchronisationsmechanismen von Java werden auch die Konzepte aus der Java-Concurrency-Klassenbibliothek vorgestellt.Weiteres Basiswissen etwa über grafische Benutzeroberflächen, das MVC-Entwurfsmuster oder Rechnernetze, wird im Buch anschaulich und praxisnah vermittelt.Aus dem Inhalt:• Grundlegende Synchronisationskonzepte• Fortgeschrittene Synchronisationskonzepte• Parallelität und grafische Benutzeroberflächen• Anwendungen mit Sockets• Anwendungen mit RMI• Webbasierte Anwendungen mit Servlets und JSP
Rust
Grundlagen und fortgeschrittene Techniken.Dieses Buch vermittelt Anwendungsentwicklern Theorie und Praxis der Sprache Rust und zeigt, wo sie gewinnbringend in neuen Projekten verwendet und wie sie sich in bestehende Projekte gut integrieren lässt.Es illustriert alle Inhalte mit zahlreichen Rust-Beispielen. Nach einer Einführung in die Grundlagen, Nebenläufigkeit und das Testen mit Rust kommt der praktische Teil.Anhand einer Webapplikation und ihrer Aufteilung in Microservices werden die Vorteile und Eigenheiten der Sprache Rust anschaulich vermittelt. Systemnahe Programmierung, die Kommunikation mit Sprachen wie Java, aber auch die Verwendung von WebAssembly werden ebenfalls betrachtet.Nach der Lektüre dieses Buchs können Sie produktiv in Rust programmieren und haben neben den Grundlagen ein gutes Verständnis für typische Anwendungsbereiche der Sprache wie WebAssembly, Systemnahe Programmierung oder Einbindung in bestehende Umgebungen über Language Bindings.
R - kurz & gut
Die praktische Kurzeinführung und Referenz für die Statistik-Software R* Konkurrenzlos günstig und kompakt* Für Studium, Wissenschaft und die Datenanalyse in Unternehmen* Deckt den kompletten Datenzyklus ab: Datenerzeugung, das Einlesen und Speichern, Bearbeiten und Aufbereiten der Daten, die graphische Darstellung und die statistische AuswertungIn Zeiten von Data Mining und künstlicher Intelligenz ist die Verarbeitung großer Datenmengen ein Thema, dessen Bedeutung enorm zugenommen hat. Die beliebte Open-Source-Software R ist eine Programmiersprache und Arbeitsumgebung, die auf die numerische und graphische Datenanalyse spezialisiert ist. Dieses Buch hat das Ziel, Sie schnell und effizient mit R vertraut zu machen und Ihnen die prinzipielle Funktionsweise und die Möglichkeiten, die diese Sprache bietet, zu vermitteln.R – kurz & gut richtet sich an diejenigen, die sich bereits mit statistischen Grundbegriffen auskennen und möglichst schnell mit R produktiv starten möchten. Das Buch bietet eine Einführung in die Arbeit mit der Entwicklungsumgebung und vermittelt einen Überblick über die R-Syntax. Eine kompakte Referenz der zentralen statistischen und programmatischen Funktionen, die zum Basispaket von R gehören, ermöglichen Ihnen ein schnelles Nachschlagen.Jörg Staudemeyer ist IT-Consultant im Ruhestand, aber weiterhin aktiv als Berater und Autor. Während seiner langjährigen Beratertätigkeit im Kontext kommerzieller Großprojekte hatte er Gelegenheit, Erfahrungen in diversen Bereichen der Informationstechnik, insbesondere aber im Java-Umfeld zu sammeln. Ralf C. Staudemeyer ist Professor für IT-Sicherheit an der Hochschule Schmalkalden. Er verfügt über langjährige internationale Erfahrung in Forschung, Lehre und Anwendung. Seine Forschungsschwerpunkte liegen in den Bereichen Computernetzwerke, Maschinelles Lernen, IT-Sicherheit und Datenschutz.
C# 10 - kurz & gut
Konkurrenzlos knapp, aber vollständig: Alle Sprachfeatures von C# 10* Schneller Einstieg in C# 10 für erfahrene Programmierer:innen* Das handliche Format macht das Buch zum idealen Begleiter für alle, die mit C# programmieren* Auch in der Neuauflage eine zuverlässige Referenz der renommierten Autoren Joseph und Ben AlbahariIdeal für vielbeschäftigte Programmierer:innen, die eine knappe und zugleich verständliche Beschreibung von C# 10 und LINQ suchen: C# 10 – kurz & gut gibt Ihnen genau das Wissen an die Hand, das Sie benötigen, um schnell effektiv mit C# 10 arbeiten zu können.Wer schon mit Java, C++ oder einer früheren Version von C# vertraut ist, trifft mit C# 10 – kurz & gut die optimale Wahl: Kein anderes Buch und keine Online-Ressource bietet so viel Inhalt auf so wenig Raum. Konzentriert auf das Wesentliche und sehr praxisorientiert, behandelt dieses Taschenbuch mehr Themen als viele der großen C#-Kompendien. So deckt es auch fortgeschrittene Themen ab wie das Überladen von Operatoren, Typ-Constraints, Iteratoren, nullbare Typen, Closures und asynchrone Funktionen.Diese aktualisierte 7. Auflage wurde um die wichtigsten neuen Features der C#-Version 10 ergänzt.Joseph Albahari entwirft Enterprise-Anwendungen auf .NET und auf anderen Plattformen und hat in der Telekommunikation sowie im Gesundheits- und im Bildungswesen gearbeitet. Neben einer Reihe von O'Reilly-Büchern hat er auch LINQPad, das beliebten Query-Tool für LINQ, geschrieben. Ben Albahari ist Mitbegründer von Auditionist, einer Casting-Website für Schauspieler in Großbritannien. Er war fünf Jahre lang Programm-Manager bei Microsoft, wo er an mehreren Projekten arbeitete, darunter am .NET Compact Framework und an ADO.NET. Er ist Mitbegründer von Genamics, einem Tools-Anbieter für C#- und J++-Programmierer, der Software für DNA- und Proteinsequenz-Analysen entwickelt. Bei einer Reihe von O'Reilly-Büchern zu C# war er Co-Autor.
Clean Craftsmanship
* Aus der Feder des legendären Softwareentwicklers Robert C. Martin (»Uncle Bob«), Autor des Bestsellers Clean Code * Standards und ethische Grundsätze für die Entwicklung von zuverlässiger und vertrauenswürdiger Software * Mit fünf Kerndisziplinen zu besserem und nachhaltigerem Code: Test-Driven Development (TDD), Refactoring, einfaches Design, kollaborative Entwicklung und Akzeptanztests Software Craftsmanship ist kein Beruf, sondern eine Berufung. Der legendäre Softwareentwickler Robert C. Martin (»Uncle Bob«) gibt Ihnen mit diesem Buch einen pragmatischen und praktischen Leitfaden für die Praktiken an die Hand, die für die Softwareentwicklung essenziell sind. Uncle Bob erläutert die Methoden, Standards und ethischen Grundsätze, die es Ihnen ermöglichen, robusten und effektiven Code zu schreiben, auf den Sie stolz sein können. Er erörtert wichtige Standards für die Softwareentwicklung, zeigt auf, wie sich die Erwartungen, die andere an Entwickler stellen, von ihren eigenen unterscheiden, und hilft Ihnen dabei, beide Vorstellungen in Einklang zu bringen. Zum Abschluss geht er auf die Berufsethik für die professionelle Programmierung ein und erläutert die Prinzipien, denen alle Entwickler folgen sollten, um sicheren, nachhaltigen und wartbaren Code zu gewährleisten. Mit den Methoden und Konzepten aus diesem Buch können sowohl Programmierer als auch ihre Manager konsequent Code liefern, der Vertrauen schafft, statt es zu untergraben - bei Usern und gleichermaßen der gesamten Gesellschaft, die auf Software angewiesen ist. Aus dem Inhalt * Auf dem Weg zum »Polarstern« der Software Craftsmanship: wissen, wie man gut programmiert * Praktische Anleitungen zur Anwendung von fünf Kerndisziplinen: testgetriebene Entwicklung (TDD), Refactoring, einfaches Design, kollaborative Entwicklung und Akzeptanztests * Wie Entwickler und Teams Produktivität, Qualität und Courage fördern können * Die wahre Bedeutung von Integrität und Teamarbeit sowie zehn spezifische Grundsätze, denen jeder professionelle Softwareentwickler folgen sollte »Zum richtigen Zeitpunkt eine Erinnerung an die ständig zunehmende Komplexität unserer programmatischen Welt und daran, dass wir es dem Vermächtnis der Menschheit - und uns selbst - schuldig sind, ethische Entwicklung zu betreiben.« - Aus dem Vorwort von Stacia Heimgartner Viscardi, CST & Agile Mentorin Robert C. Martin (»Uncle Bob«) ist bereits seit 1970 als Programmierer tätig. Neben seiner Beraterfirma Uncle Bob Consulting, LLC gründete er gemeinsam mit seinem Sohn Micah Martin auch das Unternehmen The Clean Coders, LLC. Er hat zahlreiche Artikel in verschiedenen Zeitschriften veröffentlicht und hält regelmäßig Vorträge auf internationalen Konferenzen. Zu seinen bekanntesten Büchern zählen Clean Code, Clean Coder und Clean Architecture.
Java Design Patterns
Use the step-by-step approach of this book to learn and implement design patterns in real-world applications. It focuses on classical design patterns with Java 17 and Eclipse (2021-09). In addition to Gang of Four (GoF) design patterns, the book covers popular and alternative design patterns and includes criticisms of design patterns in a chapter on anti-patterns.The book is divided into four parts. Part one covers the SOLID design principles and the Simple Factory pattern. Part two covers the 23 (GoF) design patterns, including the creational patterns, structural patterns, and behavioral patterns. Part three covers alternative design patterns, including the Null Object pattern, and the model-view-controller (MVC) pattern. Part four covers criticisms of design patterns with a quick overview of anti-patterns. It also includes a chapter on FAQs on design patterns.The book also includes a chapter on FAQs on design patterns. Each pattern is explained with real-world examples and the pros and cons of each of the design patterns are discussed. The book concludes with FAQs that can help you prepare for a job interview.WHAT YOU WILL LEARN* Know the SOLID design principles in depth* Implement the 23 design patterns from the GoFApply the Null Object pattern, Simple Factory pattern, and the MVC pattern* Know the criticism of design patterns * Understand the anti-patterns* Verify your understanding through Q&A sessions* Select an alternative to these patterns by comparing their pros and consWHO THIS BOOK IS FORSoftware developers, architects, and programmersVASKARAN SARCAR obtained his Master of Engineering degree in software engineering from Jadavpur University, Kolkata (India), and an MCA from Vidyasagar University, Midnapore (India). He has more than 12 years of experience in education and the IT industry. He devoted his early years (2005-2007) to teaching at various engineering colleges, and later he joined HP India PPS R&D Hub Bangalore. He worked there until August 2019. At the time of his retirement from HP, he was a Senior Software Engineer and Team Lead at HP. To follow his dream and passion, he is now an independent full-time author. He has written more than 10 books on Java and C# such as Design Patterns in C# (2nd edition), Getting Started with Advanced C#, Interactive C#, Interactive Object-Oriented Programming in Java (2nd edition), and Java Design Patterns (2nd edition).Part-I: FoundationChapter 1: SOLID PrinciplesChapter Goal: To discuss all the 5 fundamental design principles-SRP, OCP, LSP, ISP, and DIPSub - Topics SRP, OCP, LSP, ISP, and DIPChapter 2: Simple Factory PatternChapter Goal: To discuss the simple factory pattern a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output. It is the foundation for the factory method pattern and abstract factory pattern in Part II.Part-II: Gang of Four Design Patterns2.A: Creational PatternsChapter 3: Factory Method PatternChapter Goal: To discuss the factory method pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 4: Abstract Factory PatternChapter Goal: To discuss the abstract factory pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 5: Prototype PatternChapter Goal: To discuss the prototype pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 6: Builder PatternChapter Goal: To discuss the builder pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 7: Singleton PatternChapter Goal: To discuss the singleton pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.2.B: Structural PatternsChapter 8: Proxy PatternChapter Goal: To discuss the proxy pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 9: Decorator PatternChapter Goal: To discuss the decorator pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 10: Adapter PatternChapter Goal: To discuss the adapter pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 11: Facade PatternChapter Goal: To discuss the facade pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 12: Flyweight PatternChapter Goal: To discuss the flyweight pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 13: Composite PatternChapter Goal: To discuss the composite pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 14: Bridge PatternChapter Goal: To discuss the bridge pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.2.C: Behavioral PatternsChapter 15: Visitor PatternChapter Goal: To discuss the visitor pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 16: Observer PatternChapter Goal: To discuss the observer pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 17: Strategy PatternChapter Goal: To discuss the strategy pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 18: Template Method PatternChapter Goal: To discuss the template method pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 19: Command PatternChapter Goal: To discuss the command pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 20: Iterator PatternChapter Goal: To discuss the iterator pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 21: Memento PatternChapter Goal: To discuss the memento pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 22: State PatternChapter Goal: To discuss the state pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 23: Mediator PatternChapter Goal: To discuss the mediator pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 24: Chain of Responsibility PatternChapter Goal: To discuss the chain of responsibility pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 25: Interpreter PatternChapter Goal: To discuss the interpreter pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Part-II: Additional Design PatternsChapter 26: Null Object PatternChapter Goal: To discuss the null object pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Chapter 27: MVC PatternChapter Goal: To discuss the MVC pattern with the GoF definition and the core concept behind that with a real-life example and a computer world example. The chapter ends with a concrete implementation and its corresponding output.Part-III: Final talks on Design PatternsChapter 28: Criticism to Design PatternsChapter Goal: To discuss the criticism to design patternsChapter 29: Brief overview of Anti-PatternsChapter Goal: To discuss the anti-patternsChapter 30: FAQChapter Goal: This chapter will consist of the frequently asked questions to help readers with a quick revision. This chapter will also clear the doubts that may arise among similar patterns.
Beginning Programming All-in-One For Dummies
LET THERE BE CODE!Beginning Programming All-in-One For Dummies offers one guide packed with 7 books to teach you programming across multiple languages. Coding can seem complex and convoluted, but Dummies makes it simple and easy to understand. You’ll learn all about the principles of programming, algorithms, data structures, debugging programs, unique applications of programming and more while learning about some of the most popular programming languages used today. Move confidently forward in your computer science coursework or straight into the workforce. You’ll come away with a rock-solid foundation in the programming basics, using data, coding for the web, and building killer apps.* Learn the basics of coding, including writing and compiling code, using algorithms, and data structures* Get comfortable with the syntax of several different programming languages* Wrap your mind around interesting programming opportunities such as conducting biological experiments within a computer or programming a video game engine* Develop cross-platform applications for desktop and mobile devicesThis essential guide takes the complexity and convolution out of programming for beginners and arms you with the knowledge you need to follow where the code takes you. WALLACE WANG specializes in making complex topics understandable. His assorted For Dummies tech books have sold nearly half a million copies. He has a master’s degree in computer science along with side hustles in stand-up comedy and screenwriting because life is too short to focus on just one thing.INTRODUCTION 1About This Book 1Foolish Assumptions 2Icons Used in This Book 2Beyond the Book 3Where to Go from Here 3BOOK 1: GETTING STARTED WITH PROGRAMMING 5CHAPTER 1: GETTING STARTED PROGRAMMING A COMPUTER 7How Computer Programming Works 8Identifying the problem 8Defining the steps 9The History of Computer Programming 10Talking to a processor in machine language 11Using assembly language as a shortcut to machine language 12Hiding the details of a computer with a high-level language 15Combining the best of both worlds with the C programming language 15Weighing the pros and cons of programming languages 16Figuring Out Programming 18Desire beats technical training every time 19Picking a computer and an operating system 19Writing programs with an editor 21Converting source code with an assembler or compiler 23Translating source code with an interpreter 25Combining a compiler with an interpreter to create p-code 25Taking the time to understand 26CHAPTER 2: DIFFERENT METHODS FOR WRITING PROGRAMS 29Spaghetti Programming 31Structured Programming 34The three parts of structured programming 34Top-down programming 36Event-Driven Programming 38Designing a user interface 41Writing event handlers 42Writing your program 44Object-Oriented Programming 44Isolating data 46Simplifying modifications 47Using Protocol-Oriented Programming 49Design Patterns 50CHAPTER 3: TYPES OF PROGRAMMING LANGUAGES 53Your First Language 54BASICally disrespected 55Visual programming with Scratch 56Programming robots with LEGO Mindstorms 57Learning object-oriented programming with Alice 57Programming a killer robot 58Curly-Bracket Languages 60Learning programming with C 60Adding object-oriented programming with C++ 62Gaining true portability with Java 63Programming more safely with C# 64Choosing a curly-bracket language 66Artificial Intelligence Languages 67Scripting Languages 71Automating a program 72Customizing a program 73Transferring data among multiple programs 74Creating stand-alone programs 74Database Programming Languages 75Comparing Programming Languages 76CHAPTER 4: PROGRAMMING TOOLS 77Choosing a Compiler 78Defining your needs for a compiler 79Evaluating the technical features of a compiler 80Finding an Interpreter 84Compiling to a Virtual Machine 86Writing a Program with an Editor 88Stand-alone editors 88Integrated development environments 90Fixing a Program with a Debugger 91Stepping line-by-line 92Watching variables 95Saving Time with Third-Party Components 96Optimizing a Program with a Profiler 97Managing Source Code 97Creating a Help File 99Installing a Program 99Dissecting Programs with a Disassembler 99BOOK 2: PROGRAMMING BASICS 101CHAPTER 1: HOW PROGRAMS WORK 103Using Keywords as Building Blocks 105Organizing a Program 108Dividing a Program into Subprograms 109Dividing a Program into Objects 113Creating a User Interface 115CHAPTER 2: VARIABLES, DATA TYPES, AND CONSTANTS 119Declaring Variables 120Variable naming conventions 121Creating variables in a command 122Declaring the data type of a variable 124Using Different Data Types 126Storing Data in a Variable 130Retrieving Data from a Variable 132Using Constant Values 133Defining the Scope of a Variable 135Handling global variables with care 136Restricting scope to a module 137Isolating variables in a subprogram 138Passing data among subprograms 139CHAPTER 3: MANIPULATING DATA 141Storing Data with the Assignment Operator 142Using Math to Manipulate Numbers 143Organizing equations with operator precedence 144Using built-in math functions 146Manipulating Strings 147Finding Strings with Regular Expressions 148Pattern-matching with the single character (.) wildcard 149Pattern-matching for specific characters 149Pattern-matching with the multiple-character (*) and plus (+) wildcards 150Pattern-matching with ranges 151Using Comparison Operators 153Using Boolean Operators 156Using the Not operator 156Using the And operator 157Using the Or operator 158Using the Xor operator 159Converting Data Types 160CHAPTER 4: MAKING DECISIONS BY BRANCHING 163Picking One Choice with the IF-THEN Statement 164Picking Two Choices with the IF-THEN-ELSE Statement 166Picking Three or More Choices with the IF-THEN-ELSEIF Statement 168Checking a condition for each set of commands 168Offering three or more choices 170Playing with Multiple Boolean Operators 171Making Multiple Choices with the SELECT CASE Statement 174Matching multiple values in a SELECT CASE statement 177Checking a range of values 178Comparing values 179CHAPTER 5: REPEATING COMMANDS BY LOOPING 181Looping a Fixed Number of Times with the FOR-NEXT Loop 182Using a FOR-NEXT loop variable 183Counting by a different range 185Counting by different increments 186Counting backward 187Counting over arrays and other items 188Looping Zero or More Times with the WHILE Loop 189Looping at Least Once with the DO Loop 192Playing with Nested Loops 193Prematurely Exiting from a Loop 195Checking Your Loops 195CHAPTER 6: BREAKING A LARGE PROGRAM INTO SUBPROGRAMS 197Creating and Using Subprograms 199Creating a subprogram 200“Calling” a subprogram 201Passing Parameters 203Passing parameters by reference 206Storing values in a subprogram name 210Repeating a Subprogram with Recursion 212CHAPTER 7: BREAKING A LARGE PROGRAM INTO OBJECTS 215How Object-Oriented Programming Works 216Encapsulation Isolates Data and Subprograms 219Shielding data inside an object 221Grouping methods inside of an object 221Protecting code from other programmers 222Sharing Code with Inheritance 223Polymorphism: Modifying Code without Changing Its Name 226Design Patterns 228Object-Oriented Languages 230Hybrid languages 231Pure languages 231Disadvantages of object-oriented programming 232Real-Life Programming Examples 233Defining an object with a class 233Creating an object from a class 236Running methods stored in an object 236Inheriting an object 238Using method overloading to rewrite an inherited subprogram 239CHAPTER 8: READING AND SAVING FILES 243Storing Data in Text Files 243Creating a text file 246Reading a text file 247Storing Fixed-Size Data in Random-Access Files 250Writing data 251Reading data 252Storing Varying-Size Data in Untyped Files 253Writing data 254Reading data 255Using Database Files 257Looking at the structure of a database 257Connecting to a database 259CHAPTER 9: DOCUMENTING YOUR PROGRAM 263Adding Comments to Source Code 264Identifying the two types of comments 265Describing code and algorithms 268Documentation 270Debugging 271Writing Software Documentation 272Documentation types 272Documentation tools 274Help files 275CHAPTER 10: PRINCIPLES OF USER INTERFACE DESIGN 277The Evolution of User Interfaces 278Command-line interface 278Menus 278Graphical user interface 280Elements of a User Interface 281Displaying commands to a user interface 281Giving data to the user interface 284Showing information back to the user 288Organizing a user interface 290Designing a User Interface 291Know the user 291Hide/disable unusable options 292Tolerate mistakes 293Be consistent 294Give the user freedom to customize the user interface 295Make navigation easy 295CHAPTER 11: DEBUGGING AND TESTING 297Common Types of Programming Errors 297Debugging with Comments and Print Statements 300Breakpoints, Stepping, and Watching 302Stepping through code 304Watching variables 305Testing Code 306Unit tests 307Integration tests 308User interface testing 309BOOK 3: DATA STRUCTURES 311CHAPTER 1: STRUCTURES AND ARRAYS 313Using Structures 314Storing data 315Retrieving data 315Using an Array 316Defining the size 317Storing data 320Retrieving data 321Working with Resizable Arrays 321BASIC 322C# 323Swift 323Working with Multidimensional Arrays 323Creating a multidimensional array 324Storing and retrieving data 325Using Structures with Arrays 325Drawbacks of Arrays 327Data types 328Searching and sorting 328Adding and deleting 329Identifying the location of data in an array 330CHAPTER 2: SETS AND LINKED LISTS 333Using Sets 334Adding and deleting data in a set 335Checking for membership 336Avoiding duplicate data 337Manipulating two sets 337Using Linked Lists 342Creating a linked list 343Modifying a linked list 344Creating a double linked list 345Drawbacks of Sets and Linked Lists 346Problems with pointers 347Problems with accessing data 347CHAPTER 3: COLLECTIONS AND DICTIONARIES 351Using a Collection 352Adding data to a collection 352Deleting data from a collection 354Identifying data with keys 355Searching and retrieving data 356Using Dictionaries 358Adding data to a dictionary 358Searching and retrieving data from a dictionary 359Understanding Hash Tables 360Converting keys with a hash function 360Hash function collisions 362CHAPTER 4: STACKS, QUEUES, AND DEQUES 367Using Stacks 368Adding data to a stack 369Removing data from a stack 370Counting and searching a stack 371Using Queues 372Adding data to a queue 373Removing data from a queue 374Counting and searching a queue 375Using Deques 376CHAPTER 5: GRAPHS AND TREES 381Understanding Graphs 383Types of graphs 384Uses for graphs 385Creating Trees 386Ordered trees 387Binary trees 388B-trees 389Taking Action on Trees 390Traversing a tree to search for data 390Adding new data 392Deleting data 393Pruning and grafting sub-trees 394BOOK 4: ALGORITHMS 397CHAPTER 1: SORTING ALGORITHMS 399Using Bubble Sort 400Using Selection Sort 402Using Insertion Sort 403Using Shell Sort 405Using Heap Sort 406Using Merge Sort 410Using Quick Sort 411Comparing Sorting Algorithms 412CHAPTER 2: SEARCHING ALGORITHMS 415Sequential Search 416Backward or forward searching 417Block searching 418Binary searching 419Interpolation searching 420Using Indexes 422Creating an index 422Clustered and unclustered indexes 423Problems with indexes 424Adversarial Search 424Depth versus time 426Alpha-beta pruning 426Looking up a library of good moves 427CHAPTER 3: STRING SEARCHING 429Sequential Text Search 430The Boyer-Moore algorithm 431The Rabin–Karp algorithm 431The Shift Or algorithm 433The finite automaton algorithm 435Searching with Regular Expressions 436Searching for single character patterns 436Searching for multiple character patterns 437Searching for alternate patterns 438Searching Phonetically 438CHAPTER 4: DATA COMPRESSION ALGORITHMS 441Lossless Data Compression Algorithms 442Run-length encoding 442The Burrows–Wheeler transform algorithm 442Dictionary encoding 445Lossy Data Compression 449CHAPTER 5: ENCRYPTION ALGORITHMS 451How Encryption Works 451The Basics of Encryption 453Stream ciphers 456Block ciphers 457Symmetric/Asymmetric Encryption Algorithms 459Cracking Encryption 463Brute-force attacks 463Dictionary attacks 464Plaintext and ciphertext attacks 466BOOK 5: WEB PROGRAMMING 469CHAPTER 1: HYPERTEXT MARKUP LANGUAGE 471The Structure of an HTML Document 472Creating a title 472Creating the body text 472Aligning text 474Emphasizing text 475Adding color 476Changing the font size 477Adding comments 478Adding Graphics 478Defining the Background 479Creating Hyperlinks 480Defining an anchor point 480Linking to an anchor point 480Making Tables 481Defining a table 481Defining a table heading 482Creating table rows and data 483Displaying a table caption, header, and footer 484CHAPTER 2: CSS 487The Structure of a Stylesheet 488Creating Style Classes 489Separating Styles in Files 491Cascading Stylesheets 493CHAPTER 3: JAVASCRIPT 495The Structure of a JavaScript Program 496Creating Comments 497Declaring Variables 498Using Operators 498Increment and decrement operators 500Assignment operators 501Branching Statements 501Looping Statements 503Creating Functions 504Using Arrays 505Designing User Interfaces 505Creating dialog boxes 505Creating windows 507CHAPTER 4: PHP 509Examining the Structure of a PHP Program 510Creating Comments 510Declaring Variables 511Using Operators 512Increment and decrement operators 513Assignment operators 515Branching Statements 515Looping Statements 517Creating Functions 518Using Arrays 519Creating Objects 520CHAPTER 5: RUBY 523The Structure of a Ruby Program 524Creating Comments 524Declaring Variables 525Using Operators 526Branching Statements 528Looping Statements 530Creating Functions 531Using Data Structures 532Creating Objects 534BOOK 6: PROGRAMMING LANGUAGE SYNTAX 537CHAPTER 1: C AND C++ 539Looking at the Structure of a C/C++ Program 540Creating Comments 541Declaring Variables 542Declaring string data types 542Declaring integer data types 543Declaring floating-point data types 544Declaring Boolean values 545Using Operators 545Increment and decrement operators 546Assignment operators 548Branching Statements 548Looping Statements 550Creating Functions 551Data Structures 553Creating a structure 553Creating enumerations 554Creating an array 554Using Objects 555CHAPTER 2: JAVA AND C# 557Looking at the Structure of a Java/C# Program 558Creating Comments 559Declaring Variables 559Declaring string data types 560Declaring integer data types 560Declaring floating-point data types 561Declaring Boolean variables 562Using Operators 562Increment and decrement operators 564Assignment operators 564Branching Statements 565Looping Statements 568Creating Functions 569Data Structures 571Creating a C# structure 571Creating an array 572Creating a Java linked list 573Creating C# data structures 574Using Objects 574CHAPTER 3: PERL AND PYTHON 577Reviewing the Structure of a Perl or Python Program 578Creating Comments 579Defining Variables 580Using Operators 580Increment and decrement operators 582Assignment operators 583Branching Statements 584Looping Statements 586Creating Functions 588Making Data Structures 588Perl data structures 589Python data structures 590Using Objects 592CHAPTER 4: KOTLIN 595Looking at the Structure of a Kotlin Program 596Creating Comments 596Declaring Variables 597Declaring string data types 597Declaring integer data types 598Declaring floating-point data types 599Declaring Boolean values 599Declaring Constants 600Using Operators 600Branching Statements 601Looping Statements 605Creating Functions 606Creating Data Structures 608Creating a list 609Creating an array 610Creating a set 610Creating Objects 611CHAPTER 5: SWIFT AND SWIFTUI 613Considering the Structure of a Swift Program 614Understanding SwiftUI 614Creating a SwiftUI user interface 616Understanding SwiftUI state variables 616Creating Comments 618Declaring Variables 618Declaring string data types 619Declaring integer data types 620Declaring decimal data types 620Declaring Boolean values 621Declaring Constants 621Using Operators 622Branching Statements 623Looping Statements 627Creating Functions 628Data Structures 630Creating an array 630Creating a dictionary 632Creating a set 633Creating Objects 634CHAPTER 6: FLUTTER AND DART 637Working with Flutter 638Understanding the structure of a Flutter program 638Working with widgets in Flutter 639Aligning widgets in rows and columns 642Understanding the Dart Language 645Creating comments 645Declaring variables 646Using operators 646Using branching statements 649Using looping statements 650Creating functions 652Creating data structures 653Using objects 656BOOK 7: APPLICATIONS 657CHAPTER 1: DATABASE MANAGEMENT 659Understanding the Basics of Databases 659Free-form databases 660Flat-file databases 661Relational databases 663Manipulating Data 667Writing database commands 669The SQL language 670Data integrity 671Data mining 672Database Programming 672CHAPTER 2: BIOINFORMATICS 675The Basics of Bioinformatics 676Representing molecules 676Manipulating molecules in a computer 677Database Searches 679Bioinformatics Programming 681CHAPTER 3: COMPUTER SECURITY 685Stopping Malware 686Viruses 687Worms 687Trojan horses 688Spyware 689Distributed denial-of-service attacks 690Stopping Hackers 691Intrusion detection systems 692Rootkit detectors 693Forensics 694Secure Computing 695Patching as an afterthought 695Security in coding 696Security by design 697CHAPTER 4: ARTIFICIAL INTELLIGENCE 699Problem Solving 700Game-playing 701Natural language processing 702Speech recognition 704Image recognition 705Machine Learning 706Bayesian probability 707Neural networks 707Applications of Artificial Intelligence 710CHAPTER 5: MOBILE AND WEARABLE COMPUTING 711Understanding the Different Generations of Computing 712Giving Data to the User 714Getting Data from the User 716Tracking Motion and Location 717Tracking Real-Time Health Data 718Looking to the Future of Augmented Reality and Wearable Computers 718CHAPTER 6: GAME ENGINES 721Understanding Game Engines 722Picking a Game Engine 723Programming a Game Engine 724Exploring the Future Uses of Game Engines 726Filmmaking 726Architecture and engineering simulations 727Marketing and advertising 728CHAPTER 7: THE FUTURE OF COMPUTER PROGRAMMING 731Picking a Programming Language 732Picking an Operating System 733Doing Cross-Platform Programming 735The portability of C 735Cross-platform languages 736Virtual machines 737Software as a service 738Data science 739Website programming 740Macro programming 740Robotics programming 741Blockchain programming 742Defining Your Future in Programming 743Teaching yourself other languages 743Combining other interests besides programming 744Getting experience and knowledge 744Index 747
Einstieg in SQL (3. Auflage)
Die 3. aktualisierte und überarbeitete Auflage. Jetzt vorbestellen!Den leichten Einstieg in SQL und die Modellierung von Daten finden Sie hier! Schritt für Schritt führt Sie dieser Leitfaden durch die SQL-Kommandos und macht Sie mit allen wichtigen Befehlen vertraut. Auf diesem Fundament aufbauend lernen Sie, wie Sie Ihre Daten richtig modellieren, verknüpfen und bearbeiten. Mit diesen Anleitungen wird die Datenmodellierung mit SQL einfach und unkompliziert: So schaffen Sie Ordnung und sorgen für performante Abfragen.Aus dem Inhalt: Eine kurze Einführung in Tabellen und SQLGrundfunktionen der Tabellenabfrage: SELECT und WHEREZeilen einfügen, ändern und löschen: INSERT, UPDATE und DELETETabellen anlegen: CREATE TABLEMengenoperationenDatenbanken modellieren und optimierenDatenmodelle in Tabellen überführenBeziehungen zwischen Tabellen: JOINsTransaktionenSkalarfunktionen und BedingungslogikSpaltenwerte gruppieren: GROUP BYAbfragen in virtuellen Tabellen speichern: VIEWsLeseprobe (PDF-Link)Autor: Michael Laube arbeitet schon seit vielen Jahren mit relationalen Datenbanken und SQL. Mit dieser Erfahrung aus der Praxis zeigt er Ihnen, was alles in der Abfragesprache steckt und wie Sie Probleme bei der Datenbankentwicklung elegant lösen.
Let's code Python (2. Auflage)
Programmieren lernen mit PythonPython macht Spaß! Steige einfach ohne Vorkenntnisse ein und lerne programmieren. Schritt für Schritt, mit eigenen kleinen Programmen und Spielen, selbst gebauten Kreaturen, Grafik und mehreren Leveln. Das Buch und die besonders übersichtliche Entwicklungsumgebung TigerJython bieten Jugendlichen wie Erwachsenen viele Hilfen beim Lernen. Neue Sprachelemente werden ausführlich vorgestellt, mit farbigen Hervorhebungen und Erklärungen direkt am Code.Aus dem Inhalt: Installation und erste SchritteQuiz, Vokabeltrainer, Würfel-PokerEin Grafik-Framework benutzenDateien bearbeiten und speichernMathematische Graphen und DiagrammeSpiele nachprogrammieren: Breakout, Tic Tac Toe und mehrSelbst gebaute KreaturenMulti-Level-SpieleLeseprobe (PDF)Autor: Hauke Fehr programmiert seit über 30 Jahren mit verschiedenen Sprachen für verschiedene Zwecke. Die Wissenvermittlung liegt ihm dabei besonders am Herzen.
C++ mit Visual Studio 2022 und Windows Forms-Anwendungen
Dieses Buch stellt C++ umfassend dar. Zahlreiche Beispiele veranschaulichen die Theorie. Dabei werden die Neuerungen von C++11, C++14 und C++17 von Anfang an integriert und ihre Vorteile gezeigt. Im Unterschied zu den allermeisten anderen C++-Büchern werden Windows-Programme mit einer grafischen Benutzeroberfläche entwickelt.Dieses Buch ist ein Lehrbuch, das sich an Studenten von Fachhochschulen und Universitäten richtet. Da es keine Vorkenntnisse voraussetzt, ist es auch zum Selbststudium geeignet. Es entstand aus zahlreichen Vorlesungen und Firmenseminaren. Der Aufbau, die Beispiele und Übungsaufgaben sind erprobt und bewährt.Und es ist gleichzeitig auch ein Fachbuch, das erfahrene C++-Programmierer auf den Stand von C++17 bringt. Es zeigt, wie die zahlreichen Neuerungen selbst elementare Programmiertechniken einfacher und sicherer machen. Dazu kommen neue Konzepte, die bessere und effizientere Lösungen als noch vor einigen Jahren ermöglichen. Viele dieser neuen Möglichkeiten sind in der industriellen Praxis noch nicht verbreitet.Übungsaufgaben ermöglichen dem Leser, das Gelernte zu vertiefen. Lösungen stehen auf www.rkaiser.de zum Download bereit.Dieses Buch erscheint in zwei weitgehend identischen Ausgaben:• In der vorliegenden Ausgabe werden Programme mit einer grafischen Benutzeroberfläche geschrieben, in denen alle Ein- und Aus-gaben über eine Windows-Benutzeroberfläche erfolgen.• In der anderen Ausgabe „C++ mit Visual Studio 2019“ (ISBN 978-3-662-594759) werden C++-Programme ohne eine grafische Benutzeroberfläche geschrieben. Alle Ein- und Ausgaben erfolgen mit cin und cout über die Konsole.Nach seinem Mathematikstudium an der Universität Tübingen war RICHARD KAISER einige Jahre in der Lehrerausbildung tätig, Trainer in der Industrie, Software-Entwickler (vor allem für technische Anwendungen) und Leiter der Software-Abteilung. Seit 1991 ist er Professor an der Dualen Hochschule Baden-Württemberg (Lörrach), wo er vor allem Vorlesungen über Programmiersprachen (C/C++/C#) und Mathematik hält. In den letzten Jahren hat er viele Seminare über C++ und C# für Firmen durchgeführt.Die Entwicklungsumgebung.- Steuerelemente für die Benutzeroberfläche.- Elementare Datentypen und Anweisungen in C und C++.- Sie Stringklassen string und wstring.- Arrays und Container.- Einfache selbstdefinierte Datentypen.- Zeiger, Strings und dynamisch erzeugte Variablen.- Überladene Funktionen und Operatoren.- Objektorientierte Programmierung.- Namensbereiche.- Exception-Handling.- Containerklassen der C++-Standardbibliothek.- Dateibearbeitung mit den Stream-Klassen.- Funktionsobjekte und Lambda-Ausdrücke.- Templates und STL.- C++11 Smart Pointer: shared_ptr, unique_ptr und weak_ptr.- Literatur.- Index.
Let's code Python
Python macht Spaß! Steige einfach in die Programmierung ein: Mit eigenen kleinen Programmen und Spielen, selbst gebauten Kreaturen, Grafik und mehreren Leveln. Mit der Entwicklungsumgebung TigerJython ist es besonders einfach, zügig loszulegen. Sie bietet viele Hilfen eigens für Anfänger und für den Fall, dass du mal einen Fehler finden musst. Ohne Vorkenntnisse lernst du Python in überschaubaren Projekten kennen. Neue Sprachelemente werden ausführlich vorgestellt, mit farbigen Hervorhebungen und Erklärungen direkt am Code. Aus dem Inhalt: Installation und erste SchritteQuiz, Vokabeltrainer, Würfel-PokerFehler finden leicht gemachtEin Grafik-Framework benutzenEin Roboter, der zeichnen kannDateien bearbeiten und speichernMathematische Graphen und DiagrammeSpiele nachprogrammieren: Breakout, Tic Tac Toe und mehrSelbst gebaute KreaturenMulti-Level-Spiele Liebe Leserin, lieber Leser, ... 2 Materialien zum Buch ... 13 1. Programme schreiben -- wie geht das? ... 15 2. Wie funktionieren Computer überhaupt? ... 19 Innenleben eines PCs ... 19 Eingabe, Verarbeitung, Ausgabe ... 20 Bits und Bytes ... 22 Prozessortakt -- wie schnell läuft mein PC? ... 24 3. Python -- die Programmiersprache ... 25 Maschinensprache -- die Muttersprache des Prozessors ... 25 Interpreter und Compiler ... 26 Python -- einfach und universell ... 27 Jython -- was ist das? ... 28 TigerJython -- deine Lernumgebung ... 29 4. TigerJython installieren -- einfacher geht's nicht ... 31 Installation unter Windows ... 31 Installation auf dem Mac ... 33 Installation unter Linux ... 35 5. Die ersten Schritte -- Python im Dialog ... 37 Direkte Befehle -- die Konsole ... 38 Ausgabe mit Zahlen ... 38 Die Syntax muss stimmen ... 43 Zeichenketten statt Zahlen ... 44 6. Variablen -- jetzt wird es flexibel ... 47 Variablennamen ... 49 Der »input«-Befehl -- Eingaben zum Verarbeiten ... 51 7. Programme schreiben -- es geht los! ... 55 Ein Programm in TigerJython eingeben ... 55 Das allererste Programm: Ein Zahlenzaubertrick ... 56 Zweites Programm: Ein Umrechner ... 58 Programme speichern ... 60 Eingabe, Verarbeitung, Ausgabe -- diesmal mit Text ... 61 Rechner mit Rest ... 62 Das magische Quadrat ... 64 Variation: Magisches Quadrat mit fester Summe ... 67 8. Bedingungen -- was passiert, wenn ...? ... 71 »if«-Abfragen in Python ... 72 »if« mit »else« ... 75 Mehrere Bedingungen verknüpfen ... 77 »elif« -- »else if« ... 78 »if« -- »else« im Überblick ... 80 Wahr und falsch beim Verknüpfen ... 82 Programm: Eintrittsprüfung ... 83 9. Befehle und Module ... 85 Was sind Module? ... 85 Das Modul »math« ... 86 Das Modul »random« ... 90 Roulette ... 91 Programm: Entscheidungshilfe ... 92 10. Schleifen -- Wiederholungen machen Programme stark ... 95 Die Zählschleife mit »repeat« ... 96 Würfeln ohne Ende ... 98 Schleifen verschachteln ... 102 Die »while«-Schleife ... 103 Würfelpoker ... 105 Klassisches Zahlenraten ... 107 Das kleine Einmaleins ... 111 Mehr Möglichkeiten für »while«-Schleifen ... 116 Primzahlentester ... 118 Das Probeverfahren ... 118 Das Schachrätsel ... 123 Zins und Zinseszins ... 125 11. Listig -- mit Listen arbeiten ... 127 Zeichenketten sind Listen ... 127 Listen in Python ... 130 Wochentag nachschlagen ... 132 Listen per Programm erzeugen ... 133 Die »for«-Schleife mit einer Liste ... 134 Mehr Befehle, Methoden und Funktionen für Listen ... 137 Ein Lottozahlen-Tipp ... 140 Das Lottospiel: Selbst tippen und gewinnen ... 144 Mehrdimensionale Listen ... 148 Zusammenfassung: Listen ... 151 12. Die Schildkröte -- ein grafischer Roboter ... 153 Die Schildkröte steuern ... 154 Weitere Turtle-Befehle ... 161 Grafik mit Koordinaten ... 165 Funktionsgraphen programmieren ... 167 Zufallsbilder erstellen ... 169 Variationen: Zufallsmuster ... 171 Eingebaute Funktionen nutzen ... 173 13. Funktionen selber schreiben ... 175 Was sind Funktionen noch mal genau? ... 175 Eigene Funktionen schreiben ... 176 Eigene Funktion »zahlwort« ... 180 Ein eigenes Modul erstellen ... 184 Zeichnen mit Funktionen ... 186 Rekursive Funktionen ... 188 14. Sound programmieren ... 193 Sound in Python abspielen ... 193 Was sind denn eigentlich Klangdateien? ... 193 WAV-Dateien abspielen ... 195 MP3-Dateien abspielen ... 196 Eigene Musik machen ... 196 Sprachsynthese -- lass den Computer sprechen! ... 198 15. Objekte programmieren ... 201 Was sind Objekte? ... 202 Objekte in Python ... 202 Klassen und Instanzen ... 205 Objekte für alles ... 210 16. Eigene Objekte definieren ... 213 Die Funktion »__init__« ... 214 Eigene Methoden definieren ... 217 Die Funktion »__str__« ... 218 Ableitung und Vererbung -- ein Supertoaster ... 221 17. gamegrid -- Spiele bauen mit Objekten ... 225 Ein Spielfeld erzeugen ... 226 Actor -- jetzt kommen die Figuren ins Spiel ... 230 Der Fisch soll leben ... 232 Spielfiguren mit Eigenleben ... 234 Das Spielfeld kontrolliert den Takt ... 237 Die Steuerungsleiste in gamegrid ... 242 18. Steuerung und Ereignisse in gamegrid ... 245 Erweiterung der Spielidee ... 249 Kollision -- Interaktion zwischen Spielfiguren ... 251 Klang hinzufügen ... 256 Ein Spiel braucht Gegner ... 257 19. Breakball -- ein neues Spiel ... 265 Das Spielprinzip ... 265 Elemente des Programms ... 266 Erster Schritt: Spielfeld und Ball ... 266 Zweiter Schritt: Das Brett ... 271 Dritter Schritt: Die Blöcke ... 275 Die Spielsteuerung ... 280 20. Space Attack -- ein Klassiker ... 287 Das Spielprinzip ... 287 Technik: Was brauchen wir? ... 287 Das Spielfeld ... 288 Das Raumschiff ... 288 Jetzt wird geschossen ... 290 Die Aliens ... 294 Erweiterungen ... 304 Weiterer Ausbau: Deine Aufgabe ... 307 21. Flappy Ball -- geschicktes Hüpfen ... 309 Die Spielidee ... 309 Benötigte Elemente ... 309 Das Spielfeld ... 310 Der Ball ... 310 Die Ballsteuerung mit der Maus ... 312 Die Balken als Spielgegner ... 315 Das Spiel erweitern und verbessern ... 321 Weitere Ideen ... 323 22. Tic Tac Toe -- Brettspiele mit gamegrid ... 325 Das Spielprinzip ... 325 Welche Elemente werden benötigt? ... 326 Das Spielfeld ... 326 Auf die Maus reagieren ... 328 Die Spielverwaltung ... 331 Ein Objekt für die Spieldaten ... 332 Erweiterungen von Tic Tac Toe ... 340 Der Computer als Gegner ... 340 Am einfachsten: Die Zufallsmethode ... 341 Cleverer: Die doppelte Prüfmethode ... 345 Echte KI: Die Minimax-Methode ... 349 23. Wie geht es weiter? ... 351 Mit TigerJython weitermachen ... 352 Andere Python-Systeme ... 354 Andere Programmiersprachen? ... 355 Index ... 357
STM32 - Das umfassende Praxisbuch (2. Auflg.)
ARM-Microcontroller programmieren für Embedded Systems - Das umfassende PraxisbuchMit diesem Buch erhalten Sie einen umfassenden Praxiseinstieg für die Softwareentwicklung für Embedded Systems mit der ARM-Mikrocontrollerfamilie STM32F4xx der Firma STMicroelectronics (STM). Für die Programmierung wird die Sprache C eingesetzt.Der Autor behandelt die wichtigsten Peripherie-Komponenten, dazu gehören digitale und analoge I/O-Ports (GPIOs), Timer und Counter, serielle Schnittstellen (USARTs/UARTs, SPI und I2C), ADCs und DACs, RTC (Echtzeit-Uhr) sowie Direct Memory Access (DMA).Die Programmierung dieser Komponenten zeigt der Autor anhand einfacher praktischer Anwendungsbeispiele wie z.B. die Abfrage von Uhrzeit und Datum von einer externen RTC (über I2C) sowie deren Anzeige über SPI auf einfachen Displays. Dabei entsteht im Verlauf des Buchs eine Bibliothek, deren Funktionen für eigene Projekte auf einfache Weise eingesetzt werden können.Als Entwicklungsumgebung wird STM32CubeIDE von STM verwendet. Außerdem kommt das Evaluierungsboard NUCLEO-64 für den STM32F446 zum Einsatz. Der Autor legt Wert darauf, alles »bare-metal« zu programmieren und verzichtet darauf, die HAL-Bibliothek einzusetzen. Diese Vorgehensweise erleichtert Ihnen auch den Umstieg auf Mikrocontroller anderer Hersteller. Grundlegende Kenntnisse der Programmiersprache C werden vorausgesetzt. Dennoch wird auf einige Aspekte eingegangen, die in der Bare-metal-Programmierung von Mikrocontrollern möglicherweise wichtiger sind als in der Entwicklung herkömmlicher PC-basierter Software.Aus dem Inhalt: Typische GPIO-Anwendungen (Input/Output/Alternative Funktionen)Timer: Systick/Basic/General Purpose/Advanced Control TimerPWM: Dimmen von LEDs mit TimernA/D- und D/A-WandlungSerielle Kommunikation mit UARTs/USARTs/I2C/SPIPorterweiterung mit I2C (PCF8574)/Ansteuerung von LC-Displays7-Segment-Anzeigen über SPI (MAX7219)Einsatz einer externen Echtzeituhr (RTC) DS3231 über I2CAutor: Ralf Jesse ist Diplom-Ingenieur der Elektrotechnik mit mehr als 30 Jahren beruflicher Praxis im Einsatz von Mikroprozessoren und -controllern. Nach ersten Erfahrungen als Entwicklungsingenieur in einem Maschinenbau-Unternehmen folgten mehr als 20 Jahre als Software-Ingenieur in einem großen japanischen Konzern.
STM32
Programmierung der wichtigsten Peripherie-Komponenten des STM32F4xx-Chips Digitale und analoge I/O-Ports (GPIOs), Timer und Counter, serielle Schnittstellen (USARTs/UARTs, SPI und I2C), ADCs und DACs, Direct Memory Access (DMA) Zahlreiche praktische Anwendungsbeispiele Dieses Buch bietet einen umfassenden Praxiseinstieg in die Softwareentwicklung für Embedded Systems mit der ARM-Mikrocontrollerfamilie STM32F4xx der Firma STMicroelectronics (STM). Für die Programmierung wird die Sprache C eingesetzt. Der Autor behandelt die wichtigsten Peripherie-Komponenten, dazu gehören digitale und analoge I/O-Ports (GPIOs), Timer und Counter, serielle Schnittstellen (USARTs/UARTs, SPI und I2C), ADCs und DACs, RTC (Echtzeit-Uhr) sowie Direct Memory Access (DMA). Anhand einfacher Beispiele zeigt der Autor den praktischen Einsatz dieser Komponenten. Hierzu zählen die Abfrage von Uhrzeit und Datum von einer externen RTC (über I2C) sowie deren Anzeige über SPI auf einfachen Displays. Im Verlauf des Buchs entsteht so eine Bibliothek, deren Funktionen für eigene Projekte auf einfache Weise eingesetzt werden können. Die Beispiele werden auf dem Evaluierungsboard NUCLEO-64 mit dem STM32F446 unter Einsatz der STM32CubeIDE-Entwicklungsumgebung entwickelt und getestet. Grundlegende Kenntnisse der Programmiersprache C werden vorausgesetzt. Alle Beispiele folgen dem MISRA-C-Standard, dessen Anwendung in der Automobilindustrie vorgeschrieben ist. Dieser wird in einem separaten Kapitel vorgestellt und sorgt für gut verständlichen und somit leicht zu pflegenden Code. Der Fokus liegt auf der »baremetal«-Programmierung, was den Umstieg auf Mikrocontroller anderer Hersteller erleichtert. Auf den Einsatz der HAL-Bibliothek wird ausdrücklich verzichtet. Aus dem Inhalt: Typische GPIO-Anwendungen (Input/Output/Alternative Funktionen) Timer: Systick/Basic/General Purpose/Advanced Control Timer PWM: Dimmen von LEDs mit Timern A/D- und D/A-Wandlung Serielle Kommunikation mit UARTs/USARTs/I2C/SPI Porterweiterung mit I2C (PCF8574)/Ansteuerung von LC-Displays 7-Segment-Anzeigen über SPI (MAX7219) Einsatz einer externen Echtzeituhr (RTC) DS3231 über I2C Ralf Jesse ist Diplom-Ingenieur der Elektrotechnik mit mehr als 30 Jahren beruflicher Praxis im Einsatz von Mikroprozessoren und -controllern. Nach ersten Erfahrungen als Entwicklungsingenieur in einem Maschinenbau-Unternehmen folgten mehr als 20 Jahre als Software-Ingenieur in einem großen japanischen Konzern.
Python Challenges
Augment your knowledge of Python with this entertaining learning guide, which features 100 exercises and programming puzzles and solutions. Python Challenges will help prepare you for your next exam or a job interview, and covers numerous practical topics such as strings, data structures, recursion, arrays, and more.Each topic is addressed in its own separate chapter, starting with an introduction to the basics and followed by 10 to 15 exercises of various degrees of difficulty, helping you to improve your programming skills effectively. Detailed sample solutions, including the algorithms used for all tasks, are included to maximize your understanding of each area. Author MICHAEL INDEN also describes alternative solutions and analyzes possible pitfalls and typical errors.Three appendices round out the book: the first covers the Python command line interpreter, which is often helpful for trying out the code snippets and examples in the book, followed by an overview of Pytest for unit testing and checking the solutions. The last explains the O notation for estimating performance.After reading this book, you'll be prepared to take the next step in your career or tackle your next personal project. All source code is freely available for download via the Apress website.WHAT YOU WILL LEARNImprove your Python knowledge by solving enjoyable but challenging programming puzzles * Solve mathematical problems, recursions, strings, arrays and more* Manage data processing and data structures like lists, sets, maps* Handle advanced recursion as well as binary trees, sorting and searching* Gamify key fundamentals for fun and easier reinforcementWHO THIS BOOK IS FOR:Programmers, software developers who are either professionals or makers, as well as students and teachers. At least some prior experience with the Python programming is recommended.Michael Inden is an Oracle-certified Java developer with over 20 years of professional experience designing complex software systems for international companies. There, he has worked in various roles such as SW developer, SW architect, consultant, team leader, CTO, head of academy, and trainer. Currently, he is working as a freelancer.His special interests are creating high-quality applications with ergonomic GUIs, developing and solving programming puzzles, and coaching. He likes to pass on his knowledge and has led various courses and talks, both internally and externally, as well as at conferences such as JAX/W-JAX, JAX London, and Oracle Code One.Besides, he is also an author of technical books. His german books, among others "Der Weg zum Java-Profi", Java Challenge", "Python Challenge" are all published by dpunkt.verlag.1. Introduction.- Part I - Fundamentals.- 2. Mathematical Problems.- 3. Recursion.- 4. Strings.- 5. Basic Data Structures: Lists, Sets, and Dictionaries.- 6. Arrays.- Part II - More Advanced and Tricky Topics.- 7. Recursion Advanced.- 8. Binary Trees.- 9. Searching and Sorting.- 10. Conclusion and Supplementary Material.- Part III - Appendices.- Appendix A. Short Introduction to Pytest.- Appendix B. Short Introduction to Decorators.- Appendix C. Quick Start O-Notation.- Appendix D. Short Introduction to Python 3.10.- Bibliography.
Payara Micro Revealed
Develop, configure, and deploy Java cloud-native applications using Payara Micro. This book demystifies Java cloud-native application development using standard Microprofile APIs and covers Payara-specific features such as automatic clustering and application initialization performance improvements. You will learn how to improve startup performance by taking advantage of class data sharing, and configure cloud-native applications via standard development tools such as Maven and Gradle. The book also clarifies how to develop functionality necessary in a cloud environment, such as health checks and request tracing, using MicroProfile APIs.The book begins by showing how to develop microservices using RESTful web services, followed by how to create microservice clients using MicroProfile and the REST client API. Dependency Injection via Jakarta Context and Dependency Injection (CDI) is also covered. Various approaches to application configuration are covered as well, including property files, environment variables, and system properties. You will learn to configure fault tolerance and high availability, generate system and custom application metrics, and generate health checks to automatically improve overall application health. You will know how to trace the flow of a request across service boundaries with OpenTracing. You will be able to make future maintenance easily through generating documentation, including how to automatically update documentation as your code is updated. Additionally, you will learn how to secure cloud applications and to automatically cluster applications and improve application startup performance.WHAT YOU WILL LEARN* Develop microservices using standard Java APIs* Implement cloud functionality such as request tracing and health checks* Deploy applications as thin archives and as uber archives* Configure applications via Maven and Gradle* Generate custom metrics for capacity planning and proactive discovery of issues* Implement features in support of high availability and fault tolerance* Secure your applications with Jason Web Tokens* Take advantage of Payara’s own cloud platform for easy deploymentWHO THIS BOOK IS FORJava developers who wish to develop cloud-native applications and microservices, and Java EE application developers who wish to transition to developing cloud-native applications that are lightweight and easily deployedDAVID HEFFELFINGER is an independent consultant at Ensode Technology, LLC (ensode.com). He has authored several books on Jakarta EE and related technologies. He is a frequent speaker at tech conferences such as JavaOne and Oracle Code One. David has served on the JavaOne content committee on multiple occasions. He was named one of 39 Java leaders and experts to follow on Twitter, where you can find him under the handle @ensode.1. Jakarta EE, MicroProfile, Payara, and the Cloud2. Developing Microservices using Payara Micro3. Developing Microservice Clients4. Contexts and Dependency Injection5. Application Configuration6. Metrics7. High Availability and Fault Tolerance8. Health Checks9. Request Tracing10. Documenting Web Services11. Security with Jason Web Tokens12. Payara Micro Specific Features13. Payara Cloud
Develop and Operate Your LoRaWAN IoT Nodes
LoRaWAN has developed excellently as a communication solution in the IoT. The Things Network (TTN) has contributed to this. The Things Network was upgraded to The Things Stack Community Edition (TTS (CE)). The TTN V2 clusters were closed towards the end of 2021.In this book, I will show you the necessary steps to operate LoRaWAN nodes using TTS (CE) and maybe extend the network of gateways with an own gateway. Meanwhile, there are even LoRaWAN gateways suitable for mobile use with which you can connect to the TTN server via your cell phone.I present several commercial LoRaWAN nodes and new, low-cost and battery-powered hardware for building autonomous LoRaWAN nodes.Registering LoRaWAN nodes and gateways in the TTS (CE), providing the collected data via MQTT and visualization via Node-RED, Cayenne, Thingspeak, and Datacake enable complex IoT projects and completely new applications at very low cost.This book will enable you to provide and visualize data collected with battery-powered sensors (LoRaWAN nodes) wirelessly on the Internet. You will learn the basics for smart city and IoT applications that enable, for example, the measurement of air quality, water levels, snow depths, the determination of free parking spaces (smart parking), and the intelligent control of street lighting (smart lighting), among others.Dr. Claus Kühnel studied information technology at the Technical University of Dresden. He has developed embedded systems for laboratory diagnostic devices, among others. In this interdisciplinary field he came in touch with the maker scene. Passionate about new technologies around microcontrollers, he is the author of numerous articles and books on microcontroller hardware and software in Germany and abroad.
Cryptography and Cryptanalysis in Java
Here is your in-depth guide to cryptography and cryptanalysis in Java. This book includes challenging cryptographic solutions that are implemented in Java 17 and Jakarta EE 10. It provides a robust introduction to Java 17's new features and updates, a roadmap for Jakarta EE 10 security mechanisms, a unique presentation of the "hot points" (advantages and disadvantages) from the Java Cryptography Architecture (JCA), and more.The book dives into the classical simple cryptosystems that form the basis of modern cryptography, with fully working solutions (encryption/decryption operations). Pseudo-random generators are discussed as well as real-life implementations. Hash functions are covered along with practical cryptanalysis methods and attacks, asymmetric and symmetric encryption systems, signature and identification schemes.The book wraps up with a presentation of lattice-based cryptography and the NTRU framework library. Modern encryption schemes for cloud and big data environments (homomorphic encryption and searchable encryption) also are included. After reading and using this book, you will be proficient with crypto algorithms and know how to apply them to problems you may encounter.WHAT YOU WILL LEARN* Develop programming skills for writing cryptography algorithms in Java* Dive into security schemes and modules using Java* Explore “good” vs “bad” cryptography based on processing execution times and reliability* Play with pseudo-random generators, hash functions, etc.* Leverage lattice-based cryptography methods, the NTRU framework library, and moreWHO THIS BOOK IS FORThose who want to learn and leverage cryptography and cryptanalysis using Java. Some prior Java and/or algorithm programming exposure is highly recommended.STEFANIA LOREDANA NITA, PhD, is a software developer at the Institute of Computer Science of the Romanian Academy and a PhD with her thesis on advanced cryptographic schemes using searchable encryption and homomorphic encryption. She has served more than two years as an assistant lecturer at the University of Bucharest where she taught courses on subjects such as advanced programming techniques, simulation methods, and operating systems. She has authored and co-authored more than 15 work papers for conferences and journals, and has authored two books on he Haskell programming language. She is a lead guest editor for special issues on information security and cryptography such as advanced cryptography and its future: searchable and homomorphic encryption. She holds an MSc in software engineering and two BSc in computer science and mathematics.MARIUS IULIAN MIHAILESCU, PhD is CEO at Dapyx Solution Ltd., a company based in Bucharest, Romania. He is involved in information security- and cryptography-related research projects. He is a lead guest editor for applied cryptography journals and a reviewer for multiple publications with information security and cryptography profiles. He authored and co-authored more than 30 articles for conference proceedings, 25 articles in journals, and three books. For more than six years he has served as a lecturer at well-known national and international universities (University of Bucharest, “Titu Maiorescu” University, Kadir Has University in, Istanbul, Turkey). He has taught courses on programming languages (C#, Java, C++, Haskell), and object-oriented system analysis and design with UML, graphs, databases, cryptography, and information security. He served for three years as IT officer at Royal Caribbean Cruises Ltd. where he dealt with IT infrastructure, data security, and satellite communications systems. He received his PhD in 2014 and his thesis was on applied cryptography over biometric data. He holds two MSc in information security and software engineering.Chapter 01 – IntroductionChapter 02 – JDK 17: Java 17 New FeaturesChapter 03 – Road to Jakarta EE10 and Security MechanismsChapter 04 – Java Cryptography Architecture (java.security.*)Chapter 05 – Classical Cryptography5.1. Some Simple Cryptosystems5.1.1. Shift Cipher (Caesar)5.1.2. Substitution Cipher5.1.3. Affine Cipher5.1.4. Vigenere Cipher5.1.5. Hill Cipher5.1.6. Transposition Cipher5.1.7. Columnar Transposition Cipher5.1.8. Rail Fence Cipher5.1.9. Stream Ciphers5.2. Cryptanalysis5.2.1. Cryptanalysis of Caesar5.2.2. Cryptanalysis of Affine Cipher5.2.3. Cryptanalysis of Substitution Cipher5.2.4. Cryptanalysis of Vigenere Cipher5.2.5. Known Plaintext Attack on the Hill CipherChapter 06. Formal Techniques for Cryptography6.1. Galois Fields6.2. Elliptic CurvesChapter 07. Pseudo-random GeneratorsChapter 08. Hash Functions8.1. MessageDigest Java Class8.2. Common Hash Functions8.2.1. SHA-3 Keccak Hash Functions8.2.2. SHA-2 Cryptography Hash Functions Family8.2.2.1. SHA-5128.2.2.2. SHA-384 8.2.2.3. SHA-2568.2.2.4. SHA-2248.2.3. MD Hash Functions8.2.3.1. MD28.2.3.2. MD48.2.3.3. MD5 8.2.3.4. MD68.2.4. RIPEMD8.2.5. SWIFT8.2.6. WHIRLPOOL8.2.7. BLAKE8.2.8. Collisions Hash Functions 8.2.9. Birthday AttackChapter 09 – Symmetric Encryption Algorithms9.1. Case Study: The Data Encryption Standard (DES)9.1.1. Linear and Differential Cryptanalysis for DES9.2. Advanced Encryption Standard (AES)Chapter 10 – Asymmetric Encryption Schemes10.1. RSA10.2. El Gamal10.3. Merkle-Hellman Knapsack System10.4. McEliece SystemChapter 11 – Signature Schemes11.1. Digital Signature Standard11.2. El Gamal Signature 11.3. Undeniable SignaturesChapter 12 – Identification SchemesChapter 13 – Lattice-based Cryptography and NTRUChapter 14 – Modern/Advanced Encryption Schemes14.1. Homomorphic Encryption14.2. Searchable EncryptionChapter 15 – Cryptography Tools
The Definitive Guide to Security in Jakarta EE
Refer to this definitive and authoritative book to understand the Jakarta EE Security Spec, with Jakarta Authentication & Authorization as its underlying official foundation. Jakarta EE Security implementations are discussed, such as Soteria and Open Liberty, along with the build-in modules and Jakarta EE Security third-party modules, such as Payara Yubikey & OIDC, and OmniFaces JWT-Auth.The book discusses Jakarta EE Security in relation to SE underpinnings and provides a detailed explanation of how client-cert authentication over HTTPS takes place, how certifications work, and how LDAP-like names are mapped to caller/user names. General (web) security best practices are presented, such as not storing passwords in plaintext, using HTTPS, sanitizing inputs to DB queries, encoding output, and explanations of various (web) attacks and common vulnerabilities are included.Practical examples of securing applications discuss common needs such as letting users explicitly log in, sign up, verify email safely, explicitly log in to access protected pages, and go direct to the log in page. Common issues are covered such as abandoning an authentication dialog halfway and later accessing protected pages again.WHAT YOU WILL LEARN* Know what Jakarta/Java EE security includes and how to get started learning and using this technology for today's and tomorrow's enterprise Java applications* Secure applications: traditional server-side web apps built with JSF (Faces) as well as applications based on client-side frameworks (such as Angular) and JAX-RS* Work with the daunting number of security APIs in Jakarta EE* Understand how EE security evolvedWHO THIS BOOK IS FORJava developers using Jakarta EE and writing applications that need to be secured (every application). Basic knowledge of Servlets and CDI is assumed. Library writers and component providers who wish to provide additional authentication mechanisms for Jakarta EE also will find the book useful.ARJAN TIJMS was a JSF (JSR 372) and Security API (JSR 375) EG member, and is currently project lead for a number of Jakarta projects, including Jakarta- Security, Authentication, Authorization, and Faces and Expression Language. He is the co-creator of the popular OmniFaces library for JSF that was a 2015 Duke’s Choice Award winner, and is the author of two books: The Definitive Guide to JSF- and Pro CDI 2 in Java EE 8. Arjan holds an MSc degree in computer science from the University of Leiden, The Netherlands. He has been involved with Jakarta EE Security since 2010, has created a set of tests that most well-known vendors use (IBM, Oracle, Red Hat) to improve their offerings, was part of the JSR 375 (EE Security) EG, and has been the main architect of the security API and its initial RI implementation Soteria. Arjan has also written and certified the MicroProfile JWT implementation for Payara. He was mentored by Sun's (later Oracle's) security expert Ron Monzillo. He wrote a large series of blog posts about EE Security that have attracted a lot of views.WERNER KEIL is a cloud architect, Eclipse RCP, and a microservice expert for a large bank. He helps Global 500 Enterprises across industries and leading IT vendors. He worked for over 30 years as an IT manager, PM, coach, and SW architect and consultant for the finance, mobile, media, transport, and public sectors. Werner develops enterprise systems using Java, Java/Jakarta EE, Oracle, IBM, Spring or Microsoft technologies, JavaScript, Node, Angular, and dynamic or functional languages. He is a Committer at Apache Foundation, and Eclipse Foundation, a Babel Language Champion, UOMo Project Lead, and active member of the Java Community Process in JSRs such as 321 (Trusted Java), 344 (JSF 2.2), 354 (Money, also Maintenance Lead), 358/364 (JCP.next), 362 (Portlet 3), 363 (Unit-API 1), 365 (CDI 2), 366 (Java EE 8), 375 (Java EE Security), 380 (Bean Validation 2), and 385 (Unit-API 2, also Spec Lead), and was the longest serving Individual Member of the Executive Committee for nine years in a row until 2017. Werner is currently the Community representative in the Jakarta EE Specification Committee. He was among the first five Jakarta EE Ambassadors when it was founded as Java EE Guardians, and is a member of its Leadership Council.TEO BAIS is a Software Development Manager, Scrum Master, and Programmer who contributes to the prosperity of the (software) community in several ways. He is the founder and leader of Utrecht Java User Group, which counts over 2600 members and has hosted over 45 events and amazing speakers (among others, James Gosling, Uncle Bob, and over 20 Java Champions), and is running 3 programs: Devoxx4kids, Speaker Incubator and uJCP. Teo served JSR-385 (JSR of the Year 2019) as an EG Member and was nominated as JCP Participant of the Year in 2019. Teo Bais enjoys sharing his knowledge as a public speaker to help others achieve their goals in career and life.1: Security History2: Jakarta EE Foundations3: Jakarta Authentication4: Jakarta Authorization5: Jakarta Security6: Java SE Underpinnings7: EE Implementations8: MicroProfile JWTAppendix A: Spring SecurityAppendix B: Apache ShiroAppendix C: Identity Management
Deep Natural Language Processing
Einstieg in Word Embedding, Sequence-to-Sequence-Modelle und Transformer mit PythonDas Buch bietet eine leicht verständliche Einführung in Machine-Learning-Algorithmen im Allgemeinen und in die Verarbeitung von Textdaten mit Deep-Learning-Verfahren im Besonderen. Es veranschaulicht die theoretischen Konzepte bewährter und neuerer NLP-Ansätze und führt in die praktische Umsetzung ein.Im Fokus stehen insbesondere folgende Verfahren:Vektorisierung von Wörtern mit Word EmbeddingVerarbeitung von Texten mit rekurrenten und konvolutionalen neuronalen Netzen.Aufbau von Sequence-to-Sequence-Modellen zur Übersetzung und für Textzusammenfassungen.Arbeit mit der Transformers-Bibliothek und Hugging Face.Anhand praktischer Anwendungen (Klassizierung von Texten, Rechtschreibkorrektur, Übersetzung, Frage-Antwort-System) wird gezeigt, wie sich Textdaten vorbereiten und effektive Lernmodelle mit Bibliotheken wie Transformers, TensorFlow/Keras und Scikit-Learn aufbauen, trainieren und produktiv einsetzen lassen.Über den Autor:Dr. Jochen Hirschle ist IT-Trainer und Consultant für Machine Learning und Deep Learning in Braunschweig. Er ist erfahrener Programmierer in Python und Java und war als Wissenschaftler und Dozent an den Universitäten in Köln, Innsbruck und Frankfurt tätig. Er kennt die Fallstricke der statistischen Datenanalyse und die Tricks maschinellen Lernens aus seiner langjährigen Praxis und er weiß, wie sich komplexe Sachverhalte einfach erklären lassen.Leseprobe (PDF-Link)
C# und .NET 6 - Grundlagen, Profiwissen und Rezepte
Dieser komplett überarbeitete Klassiker der C#-/.NET-Programmierung bietet Ihnen Know-how und zahlreiche Rezepte, mit denen Sie häufig auftretende Probleme meistern. Einsteiger erhalten ein umfangreiches Tutorial zu den Grundlagen der C# 10-Programmierung mit Visual Studio 2022, dem Profi liefert es fortgeschrittene Programmiertechniken zu allen wesentlichen Einsatzgebieten der Programmierung mit .NET 6. Zum sofortigen Ausprobieren finden Sie am Ende eines jeden Kapitels hochwertige Lösungen für nahezu jedes Problem. Das Buch gliedert sich in einen Grundlagenteil zur Programmierung, eine Einführung in die Desktop-Programmierung (WPF, MAUI (Multi-platform App UI), einen Technologieteil zu fortgeschrittenen Themen sowie einen komplett neuen Teil zur Web-Programmierung (ASP.NET Core, MVC, Razor, Web-API, Blazor). Es ist der ideale Begleiter für Ihre tägliche Arbeit und zugleich – dank der erfrischenden und unterhaltsamen Darstellung – eine spannende Lektüre, die Lust macht, Projekte auch in der Freizeit umzusetzen.Aus dem Inhalt:Grundlagen der SpracheOOP-KonzepteArrays, Strings, FunktionenEinführung in LINQNeuerungen in C#Einführung in WPFWPF Controls, WPF-DatenbindungAsynchrone Programmierung & Task Parallel LibraryDebugging, Fehlersuche und -behandlungEntity Framework CoreWebanwendungen und APIs mit ASP.NET CoreSingle-Page Applications (SPAs mit BlazorAusblick auf .NET MAUI Leseprobe (PDF)Autoren: Jürgen Kotz arbeitet seit über 20 Jahren als freiberuflicher Trainer, Berater, Entwickler und Autor. Mit .NET beschäftigt er sich seit der ersten Beta-Version. Mit seiner Firma PrimeTime Software in München entwickelt er .NET-Projekte und führt Schulungen in diesem Umfeld durch. Seine Hauptthemen sind dabei die Entwicklung von REST- bzw. SOAP-basierten Services und der Datenzugriff mittels Entity Framework. Darüber hinaus hat er zahlreiche Fachbücher und -artikel geschrieben. Christian Wenz arbeitet als Berater, Trainer und Autor mit Schwerpunkt auf Webtechnologien und ist Autor oder Co-Autor von über 100 Computerbüchern. Er schreibt regelmäßig Beiträge für verschiedene IT-Magazine und hält Vorträge auf Konferenzen rund um den Globus. In seiner täglichen Arbeit ist er einer der Gründer der Webagentur Arrabiata Solutions mit Büros in München und London.
Git Schnelleinstieg
Mit diesem Buch erhalten Sie einen schnellen und praxisbezogenen Einstieg in Git. Der Autor behandelt die gängigen Befehle, die Sie beim täglichen Arbeiten mit Git brauchen. Sie lernen anhand eines Projekts, welche Befehle es gibt, wie diese arbeiten und wie Sie auftretende Probleme lösen können. Neben alltäglichen Funktionen finden Sie auch seltener gebrauchte Kommandos, die aber ebenfalls wichtig sind.Im zweiten Teil des Buchs werden fortgeschrittene Themen behandelt. Der Schwerpunkt liegt auf dem Einsatz von Git in Teams, darunter etwa das Hosten verteilter Repositories mit GitHub und GitLab. Ein weiteres Kapitel behandelt die Workflows, die je nach Anzahl der beteiligten Personen, Branches und Repositories eines Projekts variieren.Darüber hinaus gibt Ihnen der Autor hilfreiche Informationen für den Umstieg von Subversion. Ein Kapitel zu häufig gestellten Fragen rundet diesen Praxiseinstieg ab.Das Buch richtet sich an Einsteiger, aber auch Leser mit grundlegender Erfahrung können hier noch viel lernen. So gelingt es Ihnen, Git in Kürze in der Praxis einzusetzen.Sujeevan Vijayakumaran ist seit über einem Jahrzehnt begeisterter Git-Nutzer und berät seit 2020 als Solutions Architect für GitLab Kunden bei der technologischen Umsetzung von DevOps.
LabVIEW für Dummies
Ganz unverhofft müssen Sie sich mit LabVIEW beschäftigen? Dieses Buch hilft Ihnen dabei sich in diesem grafischen Programmiersystem zurechtzufinden. Die Autorinnen erklären Ihnen die Grundlagen von grafischer Programmierung und erläutern was Virtuelle Instrumente (VIs) sind. Sie führen Sie in die Arbeit in Projekten mit LabVIEW ein, zeigen Ihnen was Sie bei der Fehlersuche beachten sollten, wie Sie Datentypen und Datenstrukturen verwenden und vieles mehr. Dabei kommt auch das klassische Programmieren nicht zu kurz und so werden Sie sich schneller als Sie denken in LabVIEW zurechtfinden. Corinna Meiwald studierte bis 2017 Bio- und Nanotechnologie, schloss das Studium mit dem Master ab und arbeitet seitdem als Softwareentwicklerin und Projektleiterin in der Prüfmittelentwicklung.Melanie von der Crone hat ebenso einen Master in Bio- und Nanotechnologie und arbeitet seit ihrem Studienabschluss für Siku/Wiking Modellwelt.ÜBER DIE AUTOREN9Melanie von der Crone 9Corinna Meiwald 9Idee zum Buch 9EINLEITUNG 19Über dieses Buch 19Konventionen in diesem Buch 19Was Sie nicht lesen müssen 20Törichte Annahme über den Leser 20Wie dieses Buch aufgebaut ist 21Symbole, die in diesem Buch verwendet werden 22Wie es weitergeht 22TEIL I: DIE ENTWICKLUNGSUMGEBUNG IN LABVIEW 23KAPITEL 1: LABVIEW – DIE ETWAS ANDERE ART DER PROGRAMMIERUNG25Datenflussprinzip 26Benutzeroberfläche 28Frontpanel und dessen Elemente 30Menüleiste vom Frontpanel 30Starten, Beenden, Pausieren 31Beschriftungen 32Ausrichten der Elemente 32Hilfen 33Blockdiagramm 34Menüleiste im Blockdiagramm 35Debugging 35Clean_Up Diagram 36Connector Pane 36Werkzeuge und Paletten 36Tools Palette 37Controls Palette 39Functions Palette 42Kontextmenü 43Kontextmenü im Frontpanel 44Kontextmenü im Blockdiagramm 48Drähte im Blockdiagramm 50Einstellung von Programmeigenschaften 51Regeln für die Programmierung in LabVIEW 60Übungen zu LabVIEW 60Lösungen zu LabVIEW 61KAPITEL 2: BLACK JACK 163Struktogramme 63Anweisungsblock 64Schleifen 64Fallunterscheidungen 65Beispiel für ein Struktogramm 65Black Jack-Regeln 66Spielablauf 68Struktogramm für Black Jack 69KAPITEL 3: WENN DER UMFANG ZUNIMMT: ARBEITEN IN PROJEKTEN73Was ist ein Projekt in LabVIEW? 73Hierarchien 76LabVIEW Librarys (Bibliotheken) 77Abhängigkeiten (Dependencies) in Projekten 79Fehler beim Starten eines VIs (LOAD WARNING SUMMARY) 84Build-Spezifikationen 86Übungen 87Lösungen 88TEIL II: GRUNDLAGEN DER PROGRAMMIERUNG 89KAPITEL 4: DATENTYPEN IN LABVIEW UND WOFÜR SIE VERWENDET WERDEN91Grundlagen zur Zahlendarstellung 92Numerische Datentypen 95Vorzeichenlose Ganzzahlen (U8, U16, U32, U64) 96Vorzeichenbehaftete Ganzzahlen (I8, I16, I32, I64) 97Überlauf und Unterlauf 98Gleitpunktzahlen 99Numerische Elemente in LabVIEW 102Boolesche Daten 104Strings & Pfade 107String 107Pfade 110Rings und Enums 113Bilder und Farben 117Picture 117Color Box 117Variant 120Arrays 122Cluster 128Custom Control (CC) 131Zugriffe auf Datentypen in LabVIEW 135Property Nodes 136Invoke Nodes 139Variable in LabVIEW 140Übungen 146Lösungen 147Erstellen eines Custom Controls für Black Jack 148KAPITEL 5: FUNKTIONEN, VIS UND VIM149Einfache numerische Funktionen 151Coercion Dot 155Vergleichsfunktionen 156Boolesche Funktionen 157And und Nand 157Or, Nor, Exclusive Or und Not Exclusive Or 158Not 160Compound Arithmetic 1602D Picture-Funktionen 161Variant-Funktionen 165To Variant 165Set Variant Attribute 166Get Variant Attribute 168String- und Pfadfunktionen 169String Length 170Concatenate Strings 170String Subset 171Formatbezeichner für Strings 172Build & Strip Path 178Array-Funktionen 179Initialize Array 179Index Array 180Shuffle 1D Array.vim 183Delete From Array 183Build Array 185Transpose 2D Array 187Sort 1D Array.vim 188Reverse 1D Array 189Insert Into Array 190Cluster-Funktionen 194Unbundle (By Name) 195Bundle (By Name) 197Veränderung von Daten im Cluster 199Konvertierung von Datentypen 200Konvertierung numerischer Datentypen 200Konvertierung von Strings 204Black Jack 211Funktion zum Karten mischen 211Funktionen für den Vorgang des Kartenziehens 211Funktionen für die Bewertung des Spiels 212KAPITEL 6: DAS PROGRAMM BEKOMMT EINE STRUKTUR 217Schleifen 217For-Schleife 218While-Schleife 222Entscheidungsstrukturen 224Select/Auswahl 224Case-Struktur 226Tunnel & Shift Register 231Indexing Enabled (Indexing)/Indexing Disabled (Last Value) 232Leerer Tunnel & USE DEFAULT IF UNWIRED 233Concatenating Tunnel 233Conditional Tunnel 235Shift Register 237Unterprogramm (SubVI) 242Sequenz 247Ereignisstruktur 250Timing-Funktionen 254Tick Count (ms) 255High Resolution Relative Seconds.vi 256Wait (ms) 257Wait Until Next ms Multiple 258Unterschied zwischen Wait (ms) und Wait Until Next ms Multiple 259State Machine (Zustandsautomat) 260Grundlagen zur State Machine (Zustandsautomat) 260Realisierung einer State Machine in LabVIEW 261Übungen zu Schleifen, Shift Register und Timing 263Übungen zu For-Schleifen 263Übungen zu While-Schleifen 264Übungen zu Shift Registern 265Übungen zu Timing 266Aufgaben zu Automaten 266Lösungen zu den Übungsaufgaben 266State Machine beim Black Jack 270Die For-Schleife bei Black Jack 275Die Ereignisstruktur bei Black Jack 275Der CROUPIER‘S GAME-Case bei Black Jack 280KAPITEL 7: BLACK JACK 2283Programmbeschreibung 283VI Analyzer-Toolkit 291Analyze VIs 293KAPITEL 8: WENN GAR NICHTS FUNKTIONIERT: DEBUGGING UND ERRORHANDLING301Fehler zur Erstellungszeit 301Ausführungsfehler 303Highlight Execution 303Sonden-Werkzeug 304Verbindungswerte speichern 305Setzen von Breakpoints 306Programmcode schrittweise ausführen (Single Stepping) 307Fehlerbehandlung in LabVIEW 309Fehler-Cluster 309Fehler-Ring 311Simple Error Handler.vi 314Clear Errors.vi 315Case-Struktur mit Error 315Übungen 316Lösungen 316TEIL III: DATENVERARBEITUNG UND ANSTEUERUNGKAPITEL 9: DATENVERARBEITUNG319Verarbeitung von Dateien in LabVIEW 319Öffnen und Schließen von Dateien 321Open/Create/Replace File 321Close File 325Textdateien 325Read (from) Text File 326Write (to) Text File 327Tabellenkalkulation 329Write Delimited Spreadsheet.vi 329Read Delimited Spreadsheet.vi 332Diagramme und Graphen 334Waveform Chart und Waveform Graph 335XY Graph 343Intensity Chart∖Graph 345Formula Node 347Übungsaufgaben zu Datenverarbeitung 351Files 351Textdateien 351Tabellenkalkulation 351Diagramme und Graphen 351Formula Node 352Lösungen zu Datenverarbeitung 353Files 353Textdateien 353Tabellenkalkulation 355Diagramme und Graphen 355Formula Node 356KAPITEL 10: HARDWARESTEUERUNG357National Instruments Measurement and Automation Explorer (NI MAX) 357VISA 363Treiber einbinden 366TEIL IV: TOP-TEN PART 371KAPITEL 11: ZEHN GÄNGIGE SCHNITZER BEIM PROGRAMMIEREN IN LABVIEW373Beschriftung 376Wire verläuft unter Element 377Initialisierung 378Property Nodes 378Dokumentation 378Icon 379Kommentare 379Coercion Dot 379Wire verläuft von rechts nach links 380Buntes Frontpanel 380Abbildungsverzeichnis 381Stichwortverzeichnis 393
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
AN EFFECTIVE AND PRACTICAL STUDY AID TO THE NEW OCP JAVA SE 17 DEVELOPER CERTIFICATION EXAMIn the OCP Oracle Certified Professional Java SE 17 Developer Study Guide: Exam 1Z0-829, you'll find accessible and essential test prep material for the in-demand and practical OCP Java SE 17 Developer certification. Providing comprehensive coverage of all OCP Java SE 17 exam objectives and competencies, the Study Guide offers you access to all the skills and knowledge you'll need to succeed on the test and in the field as a new or experienced Java developer.This book provides material on records, sealed classes, text blocks, dates, streams, controlling program flow, using the Java object-oriented approach, handling exceptions, working with arrays and collections, and more. You'll also get:* Intuitively organized information that aligns with the competencies tested on the exam and those required by real-world Java developers* Opportunities to practice and develop skills that remain in high demand in the IT industry* Access to the Sybex online learning center, with chapter review questions, full-length practice exams, hundreds of electronic flashcards, and a glossary of key termsPerfect for anyone prepping for the brand-new OCP Java SE 17 credential, OCP Oracle Certified Professional Java SE 17 Developer Study Guide: Exam 1Z0-829 is also a can't-miss reference for practicing and aspiring Java developers seeking to learn or reinforce their foundational skills in Java programming and improve their performance on the job.ABOUT THE AUTHORSSCOTT SELIKOFF has been a professional Java Enterprise architect for over 20 years. He currently works as a Staff Software Engineer at Google, specializing in Architecture and Cloud Services. He is a Leader of the Garden State Java User Group, helping to facilitate discussions and exchange of ideas within the community. JEANNE BOYARSKY is a Java Champion and has worked as a Java developer for a major bank for more than 20 years. She is a senior moderator at CodeRanch, and trains and mentors students of all levels, including the programming department of a FIRST robotics team. Introduction xxiiiAssessment Test xlvCHAPTER 1 BUILDING BLOCKS 1Learning about the Environment 2Major Components of Java 2Downloading a JDK 3Understanding the Class Structure 4Fields and Methods 4Comments 5Classes and Source Files 7Writing a main() Method 8Creating a main() Method 8Passing Parameters to a Java Program 9Understanding Package Declarations and Imports 11Packages 12Wildcards 13Redundant Imports 13Naming Conflicts 15Creating a New Package 16Compiling and Running Code with Packages 16Compiling to Another Directory 18Compiling with JAR Files 20Creating a JAR File 20Ordering Elements in a Class 21Creating Objects 23Calling Constructors 23Reading and Writing Member Fields 24Executing Instance Initializer Blocks 24Following the Order of Initialization 25Understanding Data Types 26Using Primitive Types 27Using Reference Types 29Distinguishing between Primitives and Reference Types 30Creating Wrapper Classes 31Defining Text Blocks 32Declaring Variables 34Identifying Identifiers 35Declaring Multiple Variables 36Initializing Variables 38Creating Local Variables 38Passing Constructor and Method Parameters 40Defining Instance and Class Variables 41Inferring the Type with var 41Managing Variable Scope 45Limiting Scope 45Tracing Scope 46Applying Scope to Classes 47Reviewing Scope 48Destroying Objects 48Understanding Garbage Collection 48Tracing Eligibility 49Summary 51Exam Essentials 52Review Questions 54CHAPTER 2 OPERATORS 65Understanding Java Operators 66Types of Operators 66Operator Precedence 67Applying Unary Operators 69Complement and Negation Operators 70Increment and Decrement Operators 71Working with Binary Arithmetic Operators 72Arithmetic Operators 72Numeric Promotion 75Assigning Values 77Assignment Operator 77Casting Values 77Compound Assignment Operators 81Return Value of Assignment Operators 82Comparing Values 83Equality Operators 83Relational Operators 84Logical Operators 87Conditional Operators 88Making Decisions with the Ternary Operator 90Summary 92Exam Essentials 92Review Questions 94CHAPTER 3 MAKING DECISIONS 101Creating Decision- Making Statements 102Statements and Blocks 102The if Statement 103The else Statement 104Shortening Code with Pattern Matching 106Applying switch Statements 110The switch Statement 110The switch Expression 115Writing while Loops 121The while Statement 121The do/while Statement 123Infinite Loops 123Constructing for Loops 124The for Loop 124The for- each Loop 129Controlling Flow with Branching 131Nested Loops 131Adding Optional Labels 132The break Statement 133The continue Statement 135The return Statement 137Unreachable Code 138Reviewing Branching 139Summary 139Exam Essentials 140Review Questions 142CHAPTER 4 CORE APIS 155Creating and Manipulating Strings 156Concatenating 157Important String Methods 158Method Chaining 169Using the StringBuilder Class 170Mutability and Chaining 171Creating a StringBuilder 172Important StringBuilder Methods 172Understanding Equality 175Comparing equals() and == 175The String Pool 176Understanding Arrays 178Creating an Array of Primitives 179Creating an Array with Reference Variables 180Using an Array 182Sorting 183Searching 184Comparing 185Using Methods with Varargs 187Working with Multidimensional Arrays 188Calculating with Math APIs 190Finding the Minimum and Maximum 190Rounding Numbers 191Determining the Ceiling and Floor 191Calculating Exponents 192Generating Random Numbers 192Working with Dates and Times 192Creating Dates and Times 193Manipulating Dates and Times 197Working with Periods 199Working with Durations 202Period vs. Duration 204Working with Instants 205Accounting for Daylight Saving Time 206Summary 208Exam Essentials 209Review Questions 210CHAPTER 5 METHODS 219Designing Methods 220Access Modifiers 221Optional Specifiers 222Return Type 224Method Name 226Parameter List 226Method Signature 227Exception List 227Method Body 228Declaring Local and Instance Variables 228Local Variable Modifiers 229Effectively Final Variables 230Instance Variable Modifiers 231Working with Varargs 232Creating Methods with Varargs 232Calling Methods with Varargs 233Accessing Elements of a Vararg 234Using Varargs with Other Method Parameters 234Applying Access Modifiers 235Private Access 235Package Access 236Protected Access 237Public Access 242Reviewing Access Modifiers 242Accessing static Data 243Designing static Methods and Variables 243Accessing a static Variable or Method 244Class vs. Instance Membership 245Static Variable Modifiers 248Static Initializers 250Static Imports 251Passing Data among Methods 253Passing Objects 253Returning Objects 255Autoboxing and Unboxing Variables 256Overloading Methods 258Reference Types 259Primitives 260Autoboxing 261Arrays 261Varargs 261Putting It All Together 262Summary 263Exam Essentials 264Review Questions 265CHAPTER 6 CLASS DESIGN 275Understanding Inheritance 276Declaring a Subclass 276Class Modifiers 278Single vs. Multiple Inheritance 279Inheriting Object 279Creating Classes 281Extending a Class 281Applying Class Access Modifiers 282Accessing the this Reference 283Calling the super Reference 284Declaring Constructors 286Creating a Constructor 286The Default Constructor 287Calling Overloaded Constructors with this() 289Calling Parent Constructors with super() 292Initializing Objects 297Initializing Classes 297Initializing final Fields 298Initializing Instances 300Inheriting Members 304Overriding a Method 305Redeclaring private Methods 311Hiding Static Methods 311Hiding Variables 313Writing final Methods 314Creating Abstract Classes 315Introducing Abstract Classes 315Declaring Abstract Methods 317Creating a Concrete Class 318Creating Constructors in Abstract Classes 320Spotting Invalid Declarations 321Creating Immutable Objects 323Declaring an Immutable Class 323Performing a Defensive Copy 325Summary 326Exam Essentials 327Review Questions 330CHAPTER 7 BEYOND CLASSES 345Implementing Interfaces 346Declaring and Using an Interface 346Extending an Interface 348Inheriting an Interface 349Inserting Implicit Modifiers 351Declaring Concrete Interface Methods 353Working with Enums 361Creating Simple Enums 361Using Enums in switch Statements 363Adding Constructors, Fields, and Methods 364Sealing Classes 367Declaring a Sealed Class 367Compiling Sealed Classes 368Specifying the Subclass Modifier 369Omitting the permits Clause 370Sealing Interfaces 372Reviewing Sealed Class Rules 372Encapsulating Data with Records 373Understanding Encapsulation 374Applying Records 375Understanding Record Immutability 377Declaring Constructors 378Customizing Records 381Creating Nested Classes 382Declaring an Inner Class 382Creating a static Nested Class 386Writing a Local Class 387Defining an Anonymous Class 389Reviewing Nested Classes 391Understanding Polymorphism 392Object vs. Reference 393Casting Objects 395The instanceof Operator 397Polymorphism and Method Overriding 397Overriding vs. Hiding Members 399Summary 401Exam Essentials 402Review Questions 404CHAPTER 8 LAMBDAS AND FUNCTIONAL INTERFACES 419Writing Simple Lambdas 420Looking at a Lambda Example 420Learning Lambda Syntax 422Coding Functional Interfaces 426Defining a Functional Interface 426Adding Object Methods 427Using Method References 429Calling static Methods 430Calling Instance Methods on a Particular Object 430Calling Instance Methods on a Parameter 432Calling Constructors 433Reviewing Method References 433Working with Built- in Functional Interfaces 434Implementing Supplier 435Implementing Consumer and BiConsumer 436Implementing Predicate and BiPredicate 438Implementing Function and BiFunction 439Implementing UnaryOperator and BinaryOperator 440Checking Functional Interfaces 441Using Convenience Methods on Functional Interfaces 442Learning the Functional Interfaces for Primitives 443Working with Variables in Lambdas 445Listing Parameters 446Using Local Variables inside a Lambda Body 448Referencing Variables from the Lambda Body 449Summary 450Exam Essentials 451Review Questions 452CHAPTER 9 COLLECTIONS AND GENERICS 463Using Common Collection APIs 464Using the Diamond Operator 465Adding Data 466Removing Data 466Counting Elements 467Clearing the Collection 467Check Contents 468Removing with Conditions 468Iterating 469Determining Equality 470Using the List Interface 471Comparing List Implementations 472Creating a List with a Factory 472Creating a List with a Constructor 473Working with List Methods 474Converting from List to an Array 476Using the Set Interface 477Comparing Set Implementations 477Working with Set Methods 478Using the Queue and Deque Interfaces 479Comparing Deque Implementations 480Working with Queue and Deque Methods 480Using the Map Interface 483Comparing Map Implementations 484Working with Map Methods 484Calling Basic Methods 486Iterating through a Map 487Getting Values Safely 487Replacing Values 488Putting if Absent 488Merging Data 488Comparing Collection Types 490Sorting Data 492Creating a Comparable Class 492Comparing Data with a Comparator 496Comparing Comparable and Comparator 497Comparing Multiple Fields 498Sorting and Searching 500Sorting a List 503Working with Generics 503Creating Generic Classes 504Understanding Type Erasure 506Implementing Generic Interfaces 509Writing Generic Methods 510Creating a Generic Record 512Bounding Generic Types 512Putting It All Together 517Summary 519Exam Essentials 520Review Questions 521CHAPTER 10 STREAMS 531Returning an Optional 532Creating an Optional 533Dealing with an Empty Optional 534Using Streams 536Understanding the Pipeline Flow 536Creating Stream Sources 539Using Common Terminal Operations 541Using Common Intermediate Operations 549Putting Together the Pipeline 553Working with Primitive Streams 557Creating Primitive Streams 557Mapping Streams 560Using Optional with Primitive Streams 562Summarizing Statistics 564Working with Advanced Stream Pipeline Concepts 565Linking Streams to the Underlying Data 565Chaining Optionals 566Using a Spliterator 569Collecting Results 570Summary 578Exam Essentials 579Review Questions 581CHAPTER 11 EXCEPTIONS AND LOCALIZATION 591Understanding Exceptions 592The Role of Exceptions 592Understanding Exception Types 593Throwing an Exception 596Calling Methods That Throw Exceptions 598Overriding Methods with Exceptions 599Printing an Exception 600Recognizing Exception Classes 600RuntimeException Classes 601Checked Exception Classes 604Error Classes 605Handling Exceptions 605Using try and catch Statements 606Chaining catch Blocks 607Applying a Multi- catch Block 609Adding a finally Block 611Automating Resource Management 615Introducing Try- with- Resources 615Basics of Try- with- Resources 616Applying Effectively Final 620Understanding Suppressed Exceptions 621Formatting Values 624Formatting Numbers 624Formatting Dates and Times 625Customizing the Date/Time Format 626Supporting Internationalization and Localization 629Picking a Locale 630Localizing Numbers 632Localizing Dates 637Specifying a Locale Category 638Loading Properties with Resource Bundles 639Creating a Resource Bundle 640Picking a Resource Bundle 641Selecting Resource Bundle Values 643Formatting Messages 645Using the Properties Class 645Summary 646Exam Essentials 647Review Questions 648CHAPTER 12 MODULES 661Introducing Modules 662Exploring a Module 663Benefits of Modules 664Creating and Running a Modular Program 664Creating the Files 665Compiling Our First Module 666Running Our First Module 668Packaging Our First Module 669Updating Our Example for Multiple Modules 669Updating the Feeding Module 670Creating a Care Module 670Creating the Talks Module 672Creating the Staff Module 674Diving into the Module Declaration 675Exporting a Package 676Requiring a Module Transitively 677Opening a Package 679Creating a Service 680Declaring the Service Provider Interface 681Creating a Service Locator 682Invoking from a Consumer 684Adding a Service Provider 685Reviewing Directives and Services 686Discovering Modules 687Identifying Built- in Modules 688Getting Details with java 690Describing with jar 693Learning about Dependencies with jdeps 693Using the -- jdk- internals Flag 695Using Module Files with jmod 696Creating Java Runtimes with jlink 696Reviewing Command- Line Options 697Comparing Types of Modules 700Named Modules 701Automatic Modules 701Unnamed Modules 704Reviewing Module Types 704Migrating an Application 704Determining the Order 705Exploring a Bottom- Up Migration Strategy 706Exploring a Top- Down Migration Strategy 707Splitting a Big Project into Modules 709Failing to Compile with a Cyclic Dependency 709Summary 711Exam Essentials 712Review Questions 713CHAPTER 13 CONCURRENCY 721Introducing Threads 722Understanding Thread Concurrency 723Creating a Thread 724Distinguishing Thread Types 725Managing a Thread’s Life Cycle 727Polling with Sleep 727Interrupting a Thread 729Creating Threads with the Concurrency API 730Introducing the Single- Thread Executor 730Shutting Down a Thread Executor 731Submitting Tasks 732Waiting for Results 733Scheduling Tasks 737Increasing Concurrency with Pools 739Writing Thread- Safe Code 740Understanding Thread- Safety 740Accessing Data with volatile 741Protecting Data with Atomic Classes 742Improving Access with Synchronized Blocks 744Synchronizing on Methods 746Understanding the Lock Framework 747Orchestrating Tasks with a CyclicBarrier 751Using Concurrent Collections 754Understanding Memory Consistency Errors 754Working with Concurrent Classes 755Obtaining Synchronized Collections 757Identifying Threading Problems 758Understanding Liveness 758Managing Race Conditions 761Working with Parallel Streams 761Creating Parallel Streams 762Performing a Parallel Decomposition 762Processing Parallel Reductions 764Summary 770Exam Essentials 770Review Questions 772CHAPTER 14 I/O 785Referencing Files and Directories 786Conceptualizing the File System 786Creating a File or Path 789Operating on File and Path 793Using Shared Functionality 793Handling Methods That Declare IOException 797Providing NIO.2 Optional Parameters 797Interacting with NIO.2 Paths 799Creating, Moving, and Deleting Files and Directories 805Comparing Files with isSameFile() and mismatch() 809Introducing I/O Streams 811Understanding I/O Stream Fundamentals 811Learning I/O Stream Nomenclature 812Reading and Writing Files 817Using I/O Streams 817Enhancing with Files 820Combining with newBufferedReader() and newBufferedWriter() 822Reviewing Common Read and Write Methods 823Serializing Data 824Applying the Serializable Interface 825Marking Data transient 827Ensuring That a Class Is Serializable 827Storing Data with ObjectOutputStream and ObjectInputStream 828Understanding the Deserialization Creation Process 830Interacting with Users 832Printing Data to the User 832Reading Input as an I/O Stream 833Closing System Streams 833Acquiring Input with Console 834Working with Advanced APIs 837Manipulating Input Streams 838Discovering File Attributes 840Traversing a Directory Tree 843Searching a Directory 847Review of Key APIs 848Summary 850Exam Essentials 851Review Questions 852CHAPTER 15 JDBC 863Introducing Relational Databases and SQL 864Identifying the Structure of a Relational Database 866Writing Basic SQL Statements 867Introducing the Interfaces of JDBC 868Connecting to a Database 870Building a JDBC URL 870Getting a Database Connection 871Working with a PreparedStatement 873Obtaining a PreparedStatement 874Executing a PreparedStatement 875Working with Parameters 878Updating Multiple Records 881Getting Data from a ResultSet 882Reading a ResultSet 882Getting Data for a Column 885Using Bind Variables 887Calling a CallableStatement 887Calling a Procedure without Parameters 888Passing an IN Parameter 889Returning an OUT Parameter 889Working with an INOUT Parameter 890Comparing Callable Statement Parameters 891Using Additional Options 891Controlling Data with Transactions 892Committing and Rolling Back 892Bookmarking with Savepoints 894Reviewing Transaction APIs 895Closing Database Resources 895Summary 897Exam Essentials 898Review Questions 900Appendix Answers to the Review Questions 909Chapter 1: Building Blocks 910Chapter 2: Operators 913Chapter 3: Making Decisions 916Chapter 4: Core APIs 921Chapter 5: Methods 924Chapter 6: Class Design 927Chapter 7: Beyond Classes 932Chapter 8: Lambdas and Functional Interfaces 936Chapter 9: Collections and Generics 939Chapter 10: Streams 942Chapter 11: Exceptions and Localization 945Chapter 12: Modules 949Chapter 13: Concurrency 951Chapter 14: I/o 955Chapter 15: Jdbc 959Index 963
Modern Data Engineering with Apache Spark
Leverage Apache Spark within a modern data engineering ecosystem. This hands-on guide will teach you how to write fully functional applications, follow industry best practices, and learn the rationale behind these decisions. With Apache Spark as the foundation, you will follow a step-by-step journey beginning with the basics of data ingestion, processing, and transformation, and ending up with an entire local data platform running Apache Spark, Apache Zeppelin, Apache Kafka, Redis, MySQL, Minio (S3), and Apache Airflow.Apache Spark applications solve a wide range of data problems from traditional data loading and processing to rich SQL-based analysis as well as complex machine learning workloads and even near real-time processing of streaming data. Spark fits well as a central foundation for any data engineering workload. This book will teach you to write interactive Spark applications using Apache Zeppelin notebooks, write and compile reusable applications and modules, and fully test both batch and streaming. You will also learn to containerize your applications using Docker and run and deploy your Spark applications using a variety of tools such as Apache Airflow, Docker and Kubernetes.Reading this book will empower you to take advantage of Apache Spark to optimize your data pipelines and teach you to craft modular and testable Spark applications. You will create and deploy mission-critical streaming spark applications in a low-stress environment that paves the way for your own path to production.WHAT YOU WILL LEARN* Simplify data transformation with Spark Pipelines and Spark SQL* Bridge data engineering with machine learning* Architect modular data pipeline applications* Build reusable application components and libraries* Containerize your Spark applications for consistency and reliability* Use Docker and Kubernetes to deploy your Spark applications* Speed up application experimentation using Apache Zeppelin and Docker* Understand serializable structured data and data contracts * Harness effective strategies for optimizing data in your data lakes* Build end-to-end Spark structured streaming applications using Redis and Apache Kafka* Embrace testing for your batch and streaming applications* Deploy and monitor your Spark applications WHO THIS BOOK IS FORProfessional software engineers who want to take their current skills and apply them to new and exciting opportunities within the data ecosystem, practicing data engineers who are looking for a guiding light while traversing the many challenges of moving from batch to streaming modes, data architects who wish to provide clear and concise direction for how best to harness and use Apache Spark within their organization, and those interested in the ins and outs of becoming a modern data engineer in today's fast-paced and data-hungry worldSCOTT HAINES is a full stack engineer with a current focus on real-time, highly available, trustworthy analytics systems. He works at Twilio as a Principal Software Engineer on the Voice Insights team, where he helps drive Spark adoption, creates streaming pipeline architectures, and helps to architect and build out a massive stream and batch processing platform.Prior to Twilio, Scott worked writing the backend Java APIs for Yahoo Games as well as the real-time game ranking and ratings engine (built on Storm) to provide personalized recommendations and page views for 10 million customers. He finished his tenure at Yahoo working for Flurry Analytics where he wrote the alerts and notifications system for mobile devices. PART I. THE FUNDAMENTALS OF DATA ENGINEERING WITH SPARK1. Introduction to Modern Data Engineering2. Getting Started with Apache Spark3. Working with Data4. Transforming Data with Spark SQL and the DataFrame API5. Bridging Spark SQL with JDBC6. Data Discovery and the Spark SQL Catalog7. Data Pipelines & Structured Spark ApplicationsPART II. THE STREAMING PIPELINE ECOSYSTEM8. Workflow Orchestration with Apache Airflow9. A Gentle Introduction to Stream Processing10. Patterns for Writing Structured Streaming Applications11. Apache Kafka & Spark Structured Streaming12. Analytical Processing & InsightsPART III. ADVANCED TECHNIQUES13. Advanced Analytics with Spark Stateful Structured Streaming14. Deploying Mission Critical Spark Applications on Spark Standalone15. Deploying Mission Critical Spark Applications on Kubernetes