Programmierung
Java Challenge
Ihr persönlicher Java-Coach !* Ihr Java-Trainingsbuch mit Musterlösungen* Lernen Sie Tipps und Kniffe vom Java-Experten kennen* Erweitern Sie Ihr Java-Knowhow in praxisrelevanten BereichenDieses Buch bietet Ihnen ein breit gefächertes Spektrumvon über 100 Übungsaufgaben und Programmierpuzzlesinklusive Lösungen zum Knobeln und Erweitern IhrerKenntnisse zu unterschiedlichen praxisrelevantenThemengebieten wie Arrays, Datenstrukturen, Rekursion,Date and Time API usw.Jedes Themengebiet wird in einem eigenen Kapitelbehandelt, das zunächst mit einer Einführung in dieGrundlagen beginnt. Danach finden sich zumeist10 bis 15 Übungsaufgaben verschiedenerSchwierigkeitsgrade, sodass von Anfänger bisFortgeschrittenen immer etwas dabei ist undsich die Programmierkenntnisse effektiv verbessernlassen. Dabei helfen am Kapitelabschluss insbesonderedetaillierte Musterlösungen inklusive der genutztenAlgorithmen zu allen Aufgaben. Vielfach werdenzudem alternative Lösungswege aufgezeigt, aberauch mögliche Fallstricke und typische Fehlerthematisiert.Abgerundet wird das Buch durch zwei Anhänge.Einer gibt einen Überblick in wesentliche Neuerungenvon Java 8. Der zweite beschäftigt sich mit derJShell, die zum Ausprobieren der Codeschnipselund Beispiele des Buchs oftmals hilfreich ist.Dipl.-Inform. Michael Inden ist Oracle-zertifizierter Java-Entwickler. Nach seinem Studium in Oldenburg hat er bei diversen internationalen Firmen in verschiedenen Rollen etwa als Softwareentwickler und -architekt, als Consultant, Teamleiter, CTO und Leiter Academy sowie Trainer gearbeitet. Zurzeit ist er freiberuflich in Zürich tätig.Michael Inden hat über zwanzig Jahre Berufserfahrung beim Entwurf komplexer Softwaresysteme gesammelt, an diversen Fortbildungen und mehreren Java-One-Konferenzen teilgenommen. Sein besonderes Interesse gilt dem Design qualitativ hochwertiger Applikationen mit ergonomischen GUIs sowie dem Coaching. Sein Wissen gibt er gerne als Trainer in internen und externen Schulungen und auf Konferenzen weiter, etwa bei der Java User Group Switzerland, bei der JAX/W-JAX, ch.open und den IT-Tagen.
String Algorithms in C
Implement practical data structures and algorithms for text search and discover how it is used inside other larger applications. This unique in-depth guide explains string algorithms using the C programming language. String Algorithms in C teaches you the following algorithms and how to use them: classical exact search algorithms; tries and compact tries; suffix trees and arrays; approximative pattern searches; and more.In this book, author Thomas Mailund provides a library with all the algorithms and applicable source code that you can use in your own programs. There are implementations of all the algorithms presented in this book so there are plenty of examples.You’ll understand that string algorithms are used in various applications such as image processing, computer vision, text analytics processing from data science to web applications, information retrieval from databases, network security, and much more.WHAT YOU WILL LEARNUse classical exact search algorithms including naive search, borders/border search, Knuth-Morris-Pratt, and Boyer-Moor with or without Horspool * Search in trees, use tries and compact tries, and work with the Aho-Carasick algorithmProcess suffix trees including the use and development of McCreight’s algorithm * Work with suffix arrays including binary searches; sorting naive constructions; suffix tree construction; skew algorithms; and the Borrows-Wheeler transform (BWT)Deal with enhanced suffix arrays including longest common prefix (LCP) * Carry out approximative pattern searches among suffix trees and approximative BWT searches WHO THIS BOOK IS FORThose with at least some prior programming experience with C or Assembly and have at least prior experience with programming algorithms.Thomas Mailund is an associate professor in bioinformatics at Aarhus University, Denmark. He has a background in math and computer science, including experience programming and teaching in the C and R programming languages. For the last decade, his main focus has been on genetics and evolutionary studies, particularly comparative genomics, speciation, and gene flow between emerging species. 1. Introduction.-2. Classical Algorithms for Exact Search3. Suffix Trees4. Suffix Arrays5. Approximate Search6. ConclusionsAppendix A: VectorsAppendix B: ListsAppendix C: Queues
Exploring C++20
Discover everything you need to know about C++ in a logical progression of small lessons that you can work through as quickly or as slowly as you need. This book divides C++ up into bite-sized chunks that will help you learn the language one step at a time. Fully updated to include C++20, it assumes no familiarity with C++ or any other C-based language.Exploring C++20 acknowledges that C++ can be a complicated language, so rather than baffle you with complex chapters explaining functions, classes, and statements in isolation you’ll focus on how to achieve results. By learning a little bit of this and a little of that you’ll soon have amassed enough knowledge to be writing non-trivial programs and will have built a solid foundation of experience that puts those previously baffling concepts into context.In this fully-revised third edition of Exploring C++, you’ll learn how to use the standard library early in the book. Next, you’ll work with operators, objects, and data-sources in increasingly realistic situations. Finally, you’ll start putting the pieces together to create sophisticated programs of your own design confident that you’ve built a firm base of experience from which to grow.WHAT YOU WILL LEARN* Grasp the basics, including compound statements, modules, and moreWork with custom types and see how to use them * Write useful algorithms, functions, and more* Discover the latest C++ 20 features, including concepts, modules, and ranges* Apply your skills to projects that include a fixed-point numbers and body-mass index applicationsCarry out generic programming and apply it in a practical project * Exploit multiple inheritance, traits/policies, overloaded functions, and metaprogrammingWHO THIS BOOK IS FORExperienced programmers who may have little or no experience with C++ who want an accelerated learning guide to C++20 so they can hit the ground running.Ray Lischner has a bachelor's degree in computer science from Caltech and a master's in computer science from Oregon State University. He worked as a software developer for a dozen years, at big and small companies across the US, using PL/I, C, C++, Delphi, Smalltalk, and various assembly languages on both large and small systems. He has been self-employed as a consultant, trainer, and author for the last ten years. Ray taught computer science at Oregon State University for several years and specialized in teaching introductory computer programming. He taught courses in C and C++ and software engineering.Part I: The Basics.-1. Honing your tools.-2. Reading C++ Code.-3. Integer Expressions.-4. Strings.-5. Simple Input.-6. Error Messages.-7. For Loops.-8. Formatted Output.-9. Arrays and Vectors.-10. Algorithms and Ranges.-11. Increment and Decrement.-12. Conditions and Logic.-13. Compound Statements.-14. Introduction to File I/O.-15. The Map Data Structure.-16. Type Synonyms.-17. Characters.-18. Character Categories.-19. Case-Folding.-20. Writing Functions.-21. Function Arguments.-22. Using Ranges.-23. Using Iterators.-24. Unnamed Functioins.-25. Overloading Function Names.-26. Big and Little Numbers.-27. Very Big and Very Little Numbers.-28. Documentation.- 29. Project 1: Body-Mass IndexPart II: Custom Types.-30. Custom Types.-31. Overloading Operators.-32. Custom I/O Operators.-33. Assignment and Initialization.-34. Writing Classes.- 35. More About Member Functions.-36. Access Levels.-37. Understanding Object-Oriented Programming.-38. Inheritance.-39. Virtual Functions.-40. Classes and Types.-41. Declarations and Definitions.- 42. Modules.-43. Old-Fashioned "Modules".-44. Function Objects.-45. Useful Algorithms.-46. More About Iterators.-47. Ranges, Views and Adaptors.-48. Exceptions.-49. More Operators.-50. Project 2: Fixed-Point Numbers.-Part III: Generic Programming.-51. Function Templates.-52. Class Templates.-53. Template Specialization.-54. Partial Template Specialization.-55. Template Constraints.-56. Names and Namespaces.-57. Containers.-58. Locales and Facets.-59. International Characters.-60. TextI/O.-61. Project3: Currency Type.-Part IV: Real Programming.-62. Pointers.-63. Regular Expressions.-64. Moving Data with Rvalue References.-65. Smart Pointers.-66. Files and File Names.-67. Working with Bits.-68. Enumerations.-69. Multiple Inheritance.-70. Concepts, Traits and Policies.-71. Names, Namespaces, and Templates.-72. Overloaded Functions and Operators.-73. Programming at Compile Time.-74. Project 4: Calculator.
Practical Numerical C Programming
Master the C code appropriate for numerical methods and computational modeling, including syntax, loops, subroutines, and files. Then, this hands-on book dives into financial applications using regression models, product moment correlation coefficients, and asset pricing.Next, Practical Numerical C Programming covers applications for engineering/business such as supermarket stock reordering simulation as well as flight information boards at airports and controlling a power plant. Finally, the book concludes with some physics including building simulation models for energy and pendulum motion. Along the way, you’ll learn center-of-mass calculations, Brownian motion, and more.After reading and using this book, you'll come away with pragmatic case studies of actual applications using C code at work. Source code is freely available and includes the latest C20 standard release.WHAT YOU WILL LEARN* Apply regression techniques to find the pattern for depreciation of the value of cars over a period of years* Work with the product moment correlation coefficient technique to illustrate the accuracy (or otherwise) of regression techniques* Use the past stock values of an asset to predict what its future values may be using Monte Carlo methods* Simulate the buying of supermarket stock by shoppers and check the remaining stock: if it is too low print a message to reorder the stock* Create a file of arrivals for an airport and send data to the airport’s display boards to show the current situation for the incoming flights* Simulate the patterns of particles moving in gases or solids WHO THIS BOOK IS FORProgrammers and computational modelers with at least some prior experience with programming in C as well as programming in general.Philip Joyce has 28 years experience as a software engineer – working on control of steel production, control of oil refineries, communications software (pre-Internet), office products (server software), and computer control of airports. Programming in Assembler, COBOL, Coral66, C, and C++. Mentor to new graduates in the company. He also has a MSc in computational physics (including augmented matrix techniques and Monte Carlo techniques using Fortran) - Salford University 1996. Chartered scientist, chartered physicist, member of the Institute of Physics (member of the higher education group).Chapter 1 Review of CReview of C and SDK with reference to the topics in this book.Reminds the reader of C syntax.Use loops, subroutines, file access.Create typical programs in C using SDK ExercisesPART 1 – FINANCIAL APPLICATIONSChapter 2 Regression:Use regression techniques to find the pattern for depreciation of the value of cars over a period of years.Program written will create graphical displays to illustrate the topic.ExercisesChapter 3 Product Moment Correlation Coefficient (PMCC):Use this technique to illustrate the accuracy (or otherwise) of regression techniques.ExercisesChapter 4 : Asset PricingUse the past stock values of an Asset to predict what its future values may be using Monte Carlo methods.Graphics displays to illustrate the topic.ExercisesPART 2 – ENGINEERING/INDUSTRIAL/COMMERCIAL APPLICATIONSChapter 5: Supermarket Stock Reordering SimulationCreate a file of stock for a supermarket. Simulate the buying of stock by shoppers. Check the remaining stock. If it is too low print a message to reorder the stock.ExercisesChapter 6: Flight Information Boards at AirportsCreate a file of arrivals for an airport. Send data to the airport’s display boards to show the current situation for the incoming flights. Update a flight and refresh the information to the display boards.ExercisesChapter 6 : Power Plant ControlProgram receives messages about pressures, temperatures, flow rates etc for a power plant. The program checks for values outside safety ranges and acts upon any problem values by sending messages to both the gauges and the managers responsible for them.ExercisesPART 3 – PHYSICS APPLICATIONSChapter 8 Potential Energy and Kinetic Energy SimulationUse formulas for Potential Energy and Kinetic Energy to show how one falls at the same rate as the other rises.ExercisesChapter 9 Pendulum Simulation Use formulas for the motion of a pendulum to create a graph to illustrate the mathematical relationship on a graph .ExercisesChapter 10: Centre of Mass CalculationCalculate the centre of mass of unusually-shaped objects.ExercisesChapter 11 : Brownian MotionSimulate the patterns of particles moving in gases or solids.Graphical displays to illustrate the topic.ExercisesChapter 12 Vacancy Model of Atoms Moving in SolidsDemonstrate the Vacancy Model of atoms moving in solids where they can move into empty sites within the solid. Graphical displays will show the movement of the atoms within a 2D site.ExercisesAPPENDICESA. C Programming Code GuideB. Answers to exercisesThese could be contained in an included CD which could also contain some data files the students could use in their examples
Raspberry Pi Full Stack
This book will take you on a whirlwind tour of full-stack web application development using Raspberry Pi. You will learn how to build an application from the ground up.You will gain experience and know-how of technologies including:- The Linux operating system and command line.- The Python programming language.- The Raspberry Pi General Purpose Input Output pins (GPIOs).- The Nginx web server.- Flask Python web application microframework.- JQuery and CSS for creating user interfaces.- Dealing with time zones.- Creating charts with Plotly and Google Charts.- Data logging with Google Sheet.- Developing applets with IFTTT.- Securing your application with SSL.- Receiving SMS notifications to your phone using Twilio.This book will also teach you how to set up a remote wireless Arduino sensor node and collect data from it. Your Raspberry Pi web application will be able to process Arduino node data in the same way it processes data from its onboard sensor.Raspberry Pi Full Stack will teach you many skills essential to building Web and Internet of Things applications.The application you will build in this project is a platform that you can extend upon. This is just the start of what you can do with a Raspberry Pi and the software and hardware components that you will learn about.This book is supported by the author via a dedicated discussion space.Dr. Peter Dalmaris is an educator, an electrical engineer and Maker. Creator of online video courses on DIY electronics andauthor of several technical books. As a Chief Tech Explorer since 2013 at Tech Explorations, the company he founded in Sydney, Australia, Peter's mission is to explore technology and help educate the world.
OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide
THIS OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 DEVELOPER COMPLETE STUDY GUIDE WAS PUBLISHED BEFORE ORACLE ANNOUNCED MAJOR CHANGES TO ITS OCP CERTIFICATION PROGRAM AND THE RELEASE OF THE NEW DEVELOPER 1Z0-819 EXAM. NO MATTER THE CHANGES, REST ASSURED THIS STUDY GUIDE COVERS EVERYTHING YOU NEED TO PREPARE FOR AND TAKE THE EXAM.NOTE: The OCP Java SE 11 Programmer I Exam 1Z0-815 and Programmer II Exam 1Z0-816 have been retired (as of October 1, 2020), and Oracle has released a new Developer Exam 1Z0-819 to replace the previous exams. The Upgrade Exam 1Z0-817 remains the same.THIS IS THE MOST COMPREHENSIVE PREP GUIDE AVAILABLE FOR THE OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 DEVELOPER CERTIFICATION—IT COVERS EXAM 1Z0-819 AND THE UPGRADE EXAM 1Z0-817 (AS WELL AS THE RETIRED PROGRAMMER I EXAM 1Z0-815 AND PROGRAMMER II EXAM 1Z0-816)!Java is widely-used for backend cloud applications, Software as a Service applications (SAAS), and is the principal language used to develop Android applications. This object-oriented programming language is designed to run on all platforms that support Java without the need for recompilation. Oracle Java Programmer certification is highly valued by employers throughout the technology industry.The OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide in an indispensable resource for anyone preparing for the certification exam. This fully up-to-date guide covers 100% of exam objectives for Exam 1Z0-819 and Upgrade Exam 1Z0-817 (in addition to the previous Exam 1Z0-815 and Exam 1Z0-816). In-depth chapters present clear, comprehensive coverage of the functional-programming knowledge necessary to succeed. Each chapter clarifies complex material while reinforcing your understanding of vital exam topics. Also included is access to Sybex's superior online interactive learning environment and test bank that includes self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms. The ultimate study aid for the challenging OCP exams, this popular guide:* Helps you master the changes in depth, difficultly, and new module topics of the latest OCP exams* Covers all exam objectives such as Java arrays, primitive data types, string APIs, objects and classes, operators and decision constructs, and applying encapsulation* Allows developers to catch up on all of the newest Java material like lambda expressions, streams, concurrency, annotations, generics, and modules* Provides practical methods for building Java applications, handling exceptions, programming through interfaces, secure coding in Java SE, and more* Enables you to gain the information, understanding, and practice you need to pass the OCP examsThe OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide is a must-have book for certification candidates needing to pass these challenging exams, as well as junior- to senior-level developers who use Java as their primary programming language.JEANNE BOYARSKY, OCA/OCP 8 AND OCP 11, is a Java Champion and has worked as a Java developer for a major bank for more than 18 years. She is a senior moderator at CodeRanch, and trains and mentors students of all levels, including the programming division of a FIRST robotics team.SCOTT SELIKOFF, OCA/OCP 8 AND OCP 11, has been a professional Java Enterprise architect for over 20 years. He is the founder of Selikoff Solutions, LLC, specializing in building custom mobile and server solutions for businesses in the tri-state New York City area.Introduction xxixAssessment Tests lixPART I EXAM 1Z0-815, OCP JAVA SE 11 PROGRAMMER I 1Chapter 1 Welcome to Java 3Chapter 2 Java Building Blocks 37Chapter 3 Operators 81Chapter 4 Making Decisions 115Chapter 5 Core Java APIs 163Chapter 6 Lambdas and Functional Interfaces 223Chapter 7 Methods and Encapsulation 249Chapter 8 Class Design 297Chapter 9 Advanced Class Design 365Chapter 10 Exceptions 403Chapter 11 Modules 453PART II EXAM 1Z0-816, OCP JAVA SE 11 PROGRAMMER II EXAM 1Z0-817, UPGRADE OCP JAVA SE 11 493Chapter 12 Java Fundamentals 495Chapter 13 Annotations 553Chapter 14 Generics and Collections 599Chapter 15 Functional Programming 669Chapter 16 Exceptions, Assertions, and Localization 741Chapter 17 Modular Applications 803Chapter 18 Concurrency 839Chapter 19 I/O 913Chapter 20 NIO.2 969Chapter 21 JDBC 1023Chapter 22 Security 1069APPENDIX ANSWERS TO REVIEW QUESTIONS 1105Index 1177
Ganzheitliche Businessmodell-Transformation
In diesem Buch wird der regelkreisorientierte Changemanagementprozess zur Implementierung eines digitalen Businessmodells über das ganzheitliche Organisation 4.0-MITO-Konfigurationsmanagement beschrieben. Die inhaltliche Kapitelstruktur dieses MITO-Buches mit der Beschreibung der unterschiedlichen Transformations-Gestaltungssichten orientiert sich an dem übergeordneten betrieblichen Regelkreisprinzip innerhalb der in Abbildung 1 gezeigten MITO-Modellsegmente. Wobei das Managementsegment (M) noch vorgabeseitig in das prozessbezogene Führungssegment und rückmeldeseitig in das sachbezogene Leitungssegment unterteilt ist. Das darauf aufsetzende MITO-Businessmodell ergänzt die 5 Modellsegmente um das nachgelagerte Kunden- und vorgelagerte Lieferantensegment und integriert in die MITO-Modelldarstellung das hierarchische Prozessebenenmodell für die Konzeption des prozessorientierten Ziel-, Führungs- und Leitungssystems.Hartmut F. Binner war von 1978 - 2009 hauptamtlicher Professor an der Hochschule Hannover im Fachbereich Maschinenbau. Im Rahmen seiner Doktorarbeit entwickelte er die Swimlane-Darstellung, heute wesentliches BPMN 2.0-Strukturelement.Von 1999 - 2003 war er Präsident des REFA e.V., von 2007-2017 Vorstandsvorsitzender der Gesellschaft für Organisation.Innerhalb der letzten 20 Jahre schrieb er Beiträge in über 500 Zeitschriften und mehr als 18 Grundlagenwerke zum Thema Organisations- und Prozessgestaltung. Seit Dezember 2015 ist er der Vice Chairman der iTA (IT Automotive Service Partner e.V.).
SwiftUI For Dummies
THE SIMPLEST WAY TO CREATE WORLD-CLASS APPSHave a unique app idea but worried you don’t quite have the coding skills to build it? Good news: You can stop fretting about someone beating you to market with the same idea and start work right now using SwiftUI. SwiftUI is a gateway app development framework that has become one of the best ways for fledgling developers to get iOS apps off the ground without having to become a coding expert overnight.SwiftUI For Dummies makes that process even faster, providing a friendly introduction to the SwiftUI and Swift programming language and helping you feel right at home creating and building with playgrounds. The book also covers the frameworks and APIs that make it so easy to create smooth, intuitive interfaces—just dive right in and have fun!* Combine projects into workspaces * Employ Xcode editing tools * Use constants and variables * Test your code on iOS Simulator Time is of the essence, and with SwiftUI For Dummies, it’s also on your side. Get going with this friendly guide today, and you’ll be celebrating the successful launch of your app way before you thought possible!WEI-MENG LEE (Singapore) is founder of Developer Learning Solutions, a firm specializing in hands-on training for software developers. He teaches courses in mobile development, blockchain, machine learning, and AI. He is author of a number of books, including Beginning Swift Programming (Wiley).INTRODUCTION 1About This Book 1Foolish Assumptions 2Icons Used in This Book 2Beyond the Book 3Where to Go from Here 3PART 1: GETTING STARTED WITH SWIFT AND SWIFTUI 5CHAPTER 1: INTRODUCING SWIFTUI 7Understanding What SwiftUI Is 7Getting the Tools 11Hello, SwiftUI 12Automatically previewing your user interface using the canvas 14Working with Live Preview 18Generating different previews 19The Gory Details 21Info plist 22AppDelegate swift 22SceneDelegate swift 23CHAPTER 2: BASICS OF THE SWIFT PROGRAMMING LANGUAGE 25Basic Swift Syntax 26Constants 26Variables 27Strings 27Comments 27Basic Data Types 28Integers 28Floating-point numbers 29Booleans 29Tuples 30Arrays 30Retrieving elements from an array 31Inserting elements into an array 31Modifying elements in an array 31Appending elements to an array 31Removing elements from an array 32Dictionaries 32Retrieving elements from a dictionary 32Modifying an item in a dictionary 33Removing an item from a dictionary 33Optional Types 33Working with implicitly unwrapped optionals 35Using optional binding 36Unwrapping optionals using “?” 36Using the nil coalescing operator 37Functions 38Understanding input parameters 38Returning a value 39Flow Control 39If-Else statement 40Ternary conditional operator 40Switch statement 40Looping 41For-In loop 42While loop 42Repeat-While loop 42Control transfer statements 42Range operators 43Structures 43Memberwise initializers 44Structures as value types 45Classes 47Defining a class 47Understanding properties 47Using methods in classes 49Trying out the self property 50Closures 51Understanding closures 51Using functions as closures 52Assigning closures to variables 52Writing closures inline 53Understanding type inference 53Using shorthand argument names 54Working with the operator function 54Using trailing closures 55Protocols 55Defining and using a protocol 56Conforming to a protocol 56Using the Codable protocol 57Using the some keyword 59PART 2: UNDERSTANDING THE BASICS OF SWIFTUI 61CHAPTER 3: GETTING STARTED WITH THE BASICS OF SWIFTUI 63Taking a Look at SwiftUI Views 63Conforming to the View protocol 64Using modifiers 66Stacking modifiers 66Using the Inspector 67Displaying an Image 70Using modifiers on the Image view 72Resizing images 73Displaying a Button 75Customizing the button 76Adding actions 77Stacking the Views 78VStack 79HStack 80Putting on the Finishing Touches 85CHAPTER 4: HANDLING USER INPUTS AND CUSTOM VIEWS 87Looking at Input Views 87TextField 88SecureField 92Toggle 93Slider 94Stepper 98Picker 100Composing Custom Views 103Composing the custom view 104Using the custom view 111CHAPTER 5: DISPLAYING LISTS OF ITEMS 113Using the List View to Display Items 113Customizing the rows 114Adding rows programmatically 116Alternative way to generate rows in a List view 119Displaying the List within a NavigationView 120Making the items tappable 121Adding rows 123Using the Identifiable protocol 125Deleting rows 126Editing rows 128Moving rows 130Displaying Sections 133Displaying sections from a dictionary 134Changing the style of the List view 136Previewing in Light and Dark Modes 138During runtime 138During design time 139CHAPTER 6: CREATING NAVIGATION AND TABBED APPLICATIONS 143Creating Navigation Apps 144Working with the two key views in navigation-style apps 145Navigating to a page 148Navigating programmatically 149Creating a news reader application 151Creating Tabbed Applications 167Using the TabView 168Selecting TabViews programmatically 169CHAPTER 7: FORMATTING YOUR USER INTERFACE 173Laying Out Views Using Stacks 173VStack 174HStack 186ZStack 190Using Container Views 195Form and Section 198Group 200Divider 203PART 3: EXPLORING WITH SWIFTUI IN MORE DETAIL 205CHAPTER 8: UNDERSTANDING STATE MANAGEMENT IN SWIFTUI 207Using a Property Wrapper 207Maintaining State Using State Variables 209Binding State Variables 213Managing State from External Objects 218Using the ObservableObject protocol and @Published 219Using the @ObservedObject 221Sharing Objects 223Accessing Built-in Environment Variables 228Defining your own environment keys 230Using your own environment keys 231CHAPTER 9: USING LEGACY UIKIT VIEWS AND VIEW CONTROLLERS IN SWIFTUI 235Using UIKit in SwiftUI 236Understanding the UIKit View Controller life cycle 237Understanding the SwiftUI view life cycle 239Using the UIViewRepresentable Protocol for UIKit Views 247ActivityIndicator 248WebView 251Using the UIViewControllerRepresentable Protocol for UIKit View Controllers 253Creating the ImagePickerViewController 254Handling events using coordinators 256Defining the methods in the Coordinator class 258Using the updated ImagePickerViewController 260PART 4: PERFORMING ANIMATIONS AND DRAWINGS 263CHAPTER 10: DRAWINGS AND SPECIAL EFFECTS 265Drawing Using the Five Built-in Shapes 266Rectangles 266Rounded rectangles 270Circles 273Capsules 274Ellipses 275Clipping with the Basic Shapes 277Drawing Custom Shapes 281Drawing lines 283Filling the shape 284Drawing a border 286Drawing an arc 287Combining fill and stroke 289Using Special Effects in SwiftUI 292Blend modes 292Blurs 297Saturation 298CHAPTER 11: PERFORMING ANIMATIONS IN SWIFTUI 299Understanding How to Animate 299Specifying the type of animation 303Repeating the animation 303Stopping the animation 304Performing Your Own Animation 307Rotating in 2D 307Rotating in 3D 309Creating a Custom Progress Indicator 314Indeterminate progress indicator 314Determinate progress indicator 318CHAPTER 12: CREATING A COMPLETE PROJECT 323Understanding What the App Does 323Building the Project 325Creating the layouts 325Defining the news sources and observable objects 328Fetching the data 330Displaying the news headlines 331Displaying the images 334Displaying the news 336Creating the share sheet 338Creating the preferences view 339Persisting the user’s preferences 344Deploying the App 346PART 5: THE PART OF TENS 351CHAPTER 13: TEN SWIFTUI TIPS AND TRICKS 353Resuming Live Preview 353Implementing Localization 354Combining Text Views 358Creating Custom Modifiers 360Displaying Multiple Alerts 362Enabling Debug Preview 363Previewing Using Different Devices 364Dark Mode Only Works On NavigationView 368Extracting Subviews 370Displaying a Context Menu 373CHAPTER 14: TEN GREAT SWIFTUI RESOURCES 375Apple 375SwiftUI by Example 376100 Days of SwiftUI 376Gosh Darn SwiftUI 376SwiftUI Hub 376Awesome SwiftUI 377raywenderlich com 377Swift Talk 377About SwiftUI 377Stack Overflow 378Appendix: Code Snippets for Common Swiftui Views 379Index 387
Control Your Home with Raspberry Pi
Ever since the Raspberry Pi was introduced, it has been used by enthusiasts to automate their homes. The Raspberry Pi is a powerful computer in a small package, with lots of interfacing options to control various devices. This book shows you how you can automate your home with a Raspberry Pi. You'll learn how to use various wireless protocols for home automation, such as Bluetooth, 433.92 MHz radio waves, Z-Wave, and Zigbee. Soon you'll automate your home with Python, Node-RED, and Home Assistant, and you'll even be able to speak to your home automation system. All this is done securely, with a modular system, completely open-source, without relying on third-party services. You're in control of your home, and no one else. At the end of this book, you can install and configure your Raspberry Pi as a highly flexible home automation gateway for protocols of your choice, and link various services with MQTT to make it your own system. This DIY (do it yourself) approach is a bit more laborious than just installing an off-the-shelf home automation system, but in the process, you can learn a lot, and in the end, you know exactly what's running your house and how to tweak it. This is why you were interested in the Raspberry Pi in the first place, right? - Turn your Raspberry Pi into a reliable gateway for various home automation protocols. - Make your home automation setup reproducible with Docker Compose. Secure all your network communication with TLS. - Create a video surveillance system for your home. - Automate your home with Python, Node-RED, Home Assistant and AppDaemon. - Securely access your home automation dashboard from remote locations. - Use fully offline voice commands in your own language. Koen Vervloesem has been writing for over 20 years on Linux, open-source software, security, home automation, AI, and programming. He holds a Master's degree in Computer Science Engineering, a Master's degree in Philosophy and an LPIC-3 303 Security certificate. He is editor-in-chief of the Dutch MagPi magazine and is a board member of the Belgian privacy activist organization, the Ministry of Privacy.
Beginning Jakarta EE Web Development
Start building Java-based web applications now, even if you’re a complete newcomer to Java. Comprehensive and example-driven, this book is all you need to develop dynamic Java-based web applications using JSP, connect to databases with JSF, and put them into action using the popular open source Java web server, Apache Tomcat.Beginning Jakarta EE Web Development is a comprehensive introduction to building Java-based web applications using JSP, JSF, MySQL, and the Apache Tomcat web application server. Other APIs including JSON, JSTL, and XML parser are covered along the way.Key concepts are made easy to grasp with numerous working examples and a walk-through of the development of a complete ecommerce project. This book is written for professionals by practicing Java web application professionals and experts.WHAT YOU WILL LEARN* Build Java-based web applications using JSP and JSF with Eclipse Jakarta EE* Configure your database with MySQL* Define XML documents for your applications* Use the Apache MyFaces APIs to create JSF applications* Integrate and implement JSF and JSP together* Build an online ecommerce web application WHO THIS BOOK IS FORProgrammers new to programming in Java and programming in general.Luciano Manelli earned a PhD in computer science from the IT department, University of Bari - Aldo Moro. His PhD focused on grid computing and formal methods, and he published the results in international publications. Luciano obtained several certificates in the IT sector, and, in 2014, began working for the Port Network Authority of the Ionian Sea – Port of Taranto, after working for 13 years for InfoCamere SCpA. He has worked mainly in the design, analysis, and development of large software systems; research and development; testing; and production with roles of increasing responsibility in several areas over the years. Luciano has developed a great capability to make decisions in a technical and business context and is mainly interested in project management and business process management. In his current position, he deals with port community systems and software innovation. Additionally, he has written several IT books and is a contract professor at the Polytechnic of Bari (foundations of computer science), and at the University of Bari - Aldo Moro (programming for web, computer science, and computer lab).Giulio Zambon's first love was physics, but he decided to dedicate himself to software development more than 30 years ago: back when computers were still made of transistors and core memories, programs were punched on cards, and Fortran only had arithmetic IFs. Over the years, he learned a dozen computer languages and worked with all sorts of operating systems. His specific interests were in telecom and real-time systems, and he managed several projects to their successful completion. In 2001 Giulio founded his own company offering computer telephony integration (CTI) services, and he used JSP and Tomcat exclusively to develop the web side of the service platform. Back in Australia after many years in Europe, he now dedicates himself to writing software to generate and solve numeric puzzles.1. Introducing Jakarta Server Pages (JSP) and Apache Tomcat2. JSP Elements3. JSP Application Architectures4. JSP in Action5. JSON, XML-based JSL and JSP6. JSP and Databases7. Jakarta Server Faces (JSF)8. JSF and EshopA. Eclipse IDE/FrameworkNOTES from Author on Revision Plan:I'd like to propose a revision of the Beginning Jakarta EE Web Development book and I would change the structure of the book to make it more modern and implementable:1) I would prefer to start the reading of a book for beginners step by step avoiding the copy&paste operations of complex code (i.e. Listing 1-1. pag 6);2) It's a good idea the theory&practice used in the book, so I would delete the appendices and Chapter9, inserting part of them directly in the main text;3) I would avoid so many areas of software development (there are a lot of xml /tipology of tags applications): I think is better focus on the eshop application;4) I would use more graphical tools, like Eclipse using autocompilation or automatic generation tools (for example of beans) in order to maximize learning and to minimize the copy&paste operations of the code.5) I will update it.Thank you,LM
Delphi Quick Syntax Reference
The Delphi Quick Syntax Reference is a succinct code and syntax reference guide to Delphi. It presents the fundamental knowledge to get newcomers started with the language and provides a refresher to seasoned or returning Delphi developers.It covers all the new features added by Embarcadero during the last few years. Delphi celebrates 25 years in 2020 and, alongside the free community version that was introduced a couple of years ago, this syntax guide is a great way to get into the language.WHAT YOU WILL LEARN* Quickly use and learn Delphi* Compile, build and run a Delphi program* Master Delphi strings, variables, constants, and operators and how to apply them* Use conditions, loops, procedures, and functions in Delphi * Apply object-oriented programming in Delphi WHO THIS BOOK IS FORReturning or current Delphi developers: The book is a resource for reference for this group of developers especially for the new features that were introduced in the language over the last couple of years. Newcomers to the language: These developers will learn the fundamentals of the language in a very condensed and effective text that accelerates learning. John Kouraklis started exploring computers when he was 16 and since then has followed all the way from Turbo Pascal to Delphi and Delphi Tokyo as a hobby initially and as a profession for most of his adult life. He has developed a wide range of applications, from financial software to reverse engineering tools, including an application for professional gamblers.He is part of the Delphi community and participates in online communities, forums, and many other events. For example, he is active on Delphi Praxis, which is perhaps the biggest English-speaking online forum about Delphi. John also has a personal website where he posts articles regularly. Lastly, he has written two books about Delphi published by Apress.Chapter 1: Introduction to DelphiChapter 2: Anatomy of a Delphi programChapter 3: Compiling, Building and Running a program (including cross platform environments)Chapter 3: Variables, Constants and OperatorsChapter 4: StringsChapter 5: Conditionals and LoopsChapter 6: Procedures and FunctionsChapter 7: OOP in DelphiChapter 8: Enhancements (Anonymous Methods, etc.)
Bite-Size Python
INTRODUCE CHILDREN TO THE POPULAR PYTHON PROGRAMMING LANGUAGE THROUGH RELATABLE EXAMPLES AND FUN PROJECTS!Python has now surpassed Java as the most commonly used programming language. As the language rises in popularity, this complete guide can teach basic Python concepts to kids with its simple, friendly format. Bite-Size Python: An Introduction to Python Programming provides children with a foundation in the Python language. This unique book shares knowledge through easy-to-understand examples, fast exercises, and fun projects!As children learn, their parents, caregivers, and instructors can also join in their discoveries. Bite-Size Python is ideal for those who are new to programming, giving kids ages 9 and up a beginners’ approach to learning one of the most important programming languages.* Gives an overview of Python* Provides exciting programming projects* Offers instruction on how to download and install Python* Presents key programming language concepts* Simplifies technical definitionsWith this playful guide to learning Python, readers can try out activities on their computers for a hands-on learning experience. The artwork in Bite-Size Python represents children of various backgrounds, so any child who picks up this book will be empowered to learn and young readers will love showing their projects to friends and family!APRIL SPEIGHT is a Python developer with a passion for helping beginners get started with programming. She believes that by providing programming instruction that is equal parts approachable, relatable, and fun she can truly foster a welcoming learning experience. Considered a true creator at heart, April enjoys programming AI assistants and chat bots, creating experiences with mixed reality, and discovering new ways to teach technical concepts to nontechnical audiences. Curious about what she's currently learning or creating? Follow her on Twitter @VogueandCode. 1 What is Python? 32 Install Python 93 IDLE 154 Variables 235 Numbers 396 Strings 517 Conditionals and Control Flow 698 Lists 839 for Loops 9710 while Loops 11711 Functions 13312 Dictionaries 16113 Modules 18714 Next Steps 205Appendix 213Index 219
C++ mit Visual Studio 2019
C++ hat sich in den letzten Jahren rasant entwickelt: C++11, C++14, C++17 und C++20 haben viele Verbesserungen und neue Möglichkeiten gebracht. Vieles, was vor 10 Jahren noch gut und empfehlenswert war, kann heute besser und sicherer gemacht werden.Dieses Buch stellt C++ mit Visual Studio 2019 auf dem Stand von Mai 2020 umfassend dar. Das ist nicht nur der Umfang von C++17, sondern auch schon ein Teil von C++20.Es entstand aus zahlreichen Vorlesungen und Firmenseminaren. Dementsprechend richtet es sich einerseits an STUDIERENDE, die C++ lernen wollen. Der Aufbau, die vielen Beispiele und Übungsaufgaben sind erprobt und bewährt. Es eignet sich zum Selbststudium und als Lehrbuch für Vorlesungen an Fachhochschulen und Universitäten.Dieses Buch zeigt aber ebenso PROFESSIONELLEN SOFTWARE-ENTWICKLERN mit einer jahrelangen C++-Praxis den aktuellen Stand der Technik. Viele der Spracherweiterungen machen elementare Programmiertechniken einfacher und sicherer. Dazu kommen neue Konzepte, die bessere und effizientere Lösungen als noch vor einigen Jahren ermöglichen.Dieses Buch erscheint in zwei weitgehend identischen Ausgaben:– IN DER VORLIEGENDEN AUSGABE werden Programme ohne eine graphische Benutzeroberfläche geschrieben. Alle Ein- und Ausgaben erfolgen mit cin und cout über die Konsole.– IN DER ANDEREN AUSGABE „C++ mit Visual Studio 2019 und Windows-Forms-Anwendungen“ werden Programme geschrieben, in denen alle Ein- und Ausgaben über eine Windows-Benutzeroberfläche erfolgen.Nach seinem Mathematikstudium an der Universität Tübingen war Richard Kaiser in der Lehrerausbildung tätig, Trainer in der Industrie, Software-Entwickler und -Abteilungsleiter. Als Professor an der Dualen Hochschule Baden-Württemberg hat er Vorlesungen über C, C++, C# und Mathematik gehalten und zahlreiche Firmenseminare über C++ und C# 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.- ObjektorientierteProgrammierung.- 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.
C++20 Quick Syntax Reference
This quick C++ 20 guide is a condensed code and syntax reference to the popular programming language, fully updated for C++20. It presents the essential C++20 code syntax in a well-organized format that can be used as a handy reference.This edition covers topics including designated initializers, lambdas and lambda captures, the spaceship operator, pack expressions, string literals as template parameters, atomic smart pointers, and contracts. It also covers library changes including extended futures, latches and barriers, task blocks, and text formatting.In the C++20 Quick Syntax Reference, you will find short, simple, and focused code examples. This book includes a well-laid-out table of contents and a comprehensive index allowing for easy review. You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point, and highly accessible. The book is packed with useful information and is a must-have for any C++ programmer.WHAT YOU'LL LEARN* Discover the key C++20 features* Work with concepts to constrain template arguments* Use modules as a replacement for header files* Take advantage of the three-way comparison operator* Create immediate functions using the consteval keyword* Make use of constexpr, constinit and designated initializersWHO THIS BOOK IS FORExperienced C++ programmers. Additionally, this is a concise, easily-digested introduction for other programmers new to C++.Mikael Olsson is a professional web entrepreneur, programmer, and author. He works for an R&D company in Finland where he specializes in software development. In his spare time he writes books and creates websites that summarize various fields of interest. The books he writes are focused on teaching their subject in the most efficient way possible, by explaining only what is relevant and practical without any unnecessary repetition or theory. 1. HelloWorld2. Compile and Run3. Variables4. Operators5. Pointers6. References7. Arrays8. String9. Conditionals10. Loops11. Functions12. Class13. Constructor14. Inheritance15. Overriding16. Access Levels17. Static18. Enum19. Struct and Union20. Operator Overloading21. Custom Conversions22. Namespaces23. Constants24. Preprocessor25. Exception Handling26. Type Conversions27. Smart Pointers28. Templates29. Headers
Grundkurs Machine Learning
Maschinelles Lernen – alle Grundlagen! Paul Wilmott ist für seine erhellende und unterhaltsame Darstellung angewandter Mathematik bekannt. Von der linearen Regression bis zu Neuronalen Netzwerken führt er Sie durch alle Verfahren, und zwar komplett Software-unabhängig. Der Vorteil dabei: Jeder Schritt ist schwarz auf weiß zu sehen, kein Framework kann etwas „verstecken“, es geht immer um die Sache selbst. Mit vielen Beispielen, Grafiken und Schritt-für-Schritt-Kästen. Für alle, die wirklich verstehen wollen, wie Maschinen lernen. Aus dem Inhalt: Lineare Regressionk-Nearest NeighborsNaive Bayes-Klassifikatorenk-Means-AlgorithmusSupport Vector MachinesLogistische RegressionSelbstorganisierende KartenEntscheidungsbäumeReinforcement LearningNeuronale Netze Vorwort ... 13 1. Einführung ... 17 1.1 ... Maschinelles Lernen ... 18 1.2 ... Lernen ist der Schlüssel ... 19 1.3 ... Ein wenig Geschichte ... 20 1.4 ... Schlüsselmethodiken in diesem Buch ... 22 1.5 ... Klassische mathematische Modellierung ... 26 1.6 ... Maschinelles Lernen ist anders ... 28 1.7 ... Einfachheit führt zu Komplexität ... 29 1.8 ... Weiterführende Literatur ... 33 2. Allgemeines ... 35 2.1 ... Jargon und Notation ... 35 2.2 ... Skalierung ... 37 2.3 ... Distanzmessung ... 38 2.4 ... Fluch der Dimensionalität ... 39 2.5 ... Hauptkomponentenanalyse ... 39 2.6 ... Maximum-Likelihood-Schätzung ... 40 2.7 ... Konfusionsmatrix ... 44 2.8 ... Kostenfunktion ... 47 2.9 ... Gradientenabstieg ... 52 2.10 ... Training, Testen und Validieren ... 54 2.11 ... Bias und Varianz ... 57 2.12 ... Lagrange-Multiplikatoren ... 63 2.13 ... Mehrfachklassen ... 65 2.14 ... Informationstheorie und Entropie ... 67 2.15 ... Verarbeitung natürlicher Sprache (NLP) ... 70 2.16 ... Bayes-Theorem ... 72 2.17 ... Was nun? ... 73 2.18 ... Weiterführende Literatur ... 74 3. K-nächste Nachbarn ... 75 3.1 ... Wofür können wir die Methode verwenden? ... 75 3.2 ... Wie die Methode funktioniert ... 76 3.3 ... Der Algorithmus ... 78 3.4 ... Probleme mit KNN ... 78 3.5 ... Beispiel: Körpergröße und -gewicht ... 79 3.6 ... Regression ... 83 3.7 ... Weiterführende Literatur ... 85 4. K-Means Clustering ... 87 4.1 ... Wofür können wir die Methode verwenden? ... 87 4.2 ... Was macht K-Means Clustering? ... 89 4.3 ... Scree-Plots ... 93 4.4 ... Beispiel: Kriminalität in England, 13 Dimensionen ... 94 4.5 ... Beispiel: Volatiliät ... 98 4.6 ... Beispiel: Zinssatz und Inflation ... 100 4.7 ... Beispiel: Zinssätze, Inflation und BIP-Wachstum ... 103 4.8 ... Ein paar Kommentare ... 104 4.9 ... Weiterführende Literatur ... 105 5. Naiver Bayes-Klassifikator ... 107 5.1 ... Wofür können wir ihn verwenden? ... 107 5.2 ... Verwendung des Bayes-Theorems ... 108 5.3 ... Anwendung des NBK ... 108 5.4 ... In Symbolen ... 110 5.5 ... Beispiel: Politische Reden ... 111 5.6 ... Weiterführende Literatur ... 114 6. Regressionsmethoden ... 115 6.1 ... Wofür können wir sie verwenden? ... 115 6.2 ... Mehrdimensionale lineare Regression ... 116 6.3 ... Logistische Regression ... 117 6.4 ... Beispiel: Noch einmal politische Reden ... 119 6.5 ... Weitere Regressionsmethoden ... 121 6.6 ... Weiterführende Literatur ... 122 7. Support-Vektor-Maschinen ... 123 7.1 ... Wofür können wir sie verwenden? ... 123 7.2 ... Harte Ränder ... 123 7.3 ... Beispiel: Iris (Schwertlilie) ... 126 7.4 ... Lagrange-Multiplier-Version ... 128 7.5 ... Weiche Ränder ... 130 7.6 ... Kernel-Trick ... 132 7.7 ... Weiterführende Literatur ... 136 8. Selbstorganisierende Karten ... 137 8.1 ... Wofür können wir sie verwenden? ... 137 8.2 ... Die Methode ... 138 8.3 ... Der Lernalgorithmus ... 140 8.4 ... Beispiel: Gruppierung von Aktien ... 142 8.5 ... Beispiel: Abstimmungen im Unterhaus ... 147 8.6 ... Weiterführende Literatur ... 149 9. Entscheidungsbäume ... 151 9.1 ... Wofür können wir sie verwenden? ... 151 9.2 ... Beispiel: Zeitschriftenabo ... 153 9.3 ... Entropie ... 158 9.4 ... Überanpassung und Abbruchregeln ... 161 9.5 ... Zuschneiden ... 162 9.6 ... Numerische Merkmale/Attribute ... 162 9.7 ... Regression ... 164 9.8 ... Ausblick ... 171 9.9 ... Bagging und Random Forest ... 171 9.10 ... Weiterführende Literatur ... 172 10. Neuronale Netze ... 173 10.1 ... Wofür können wir sie verwenden? ... 173 10.2 ... Ein sehr einfaches Netzwerk ... 173 10.3 ... Universelles Approximations-Theorem ... 174 10.4 ... Ein noch einfacheres Netzwerk ... 176 10.5 ... Die mathematische Manipulation im Detail ... 177 10.6 ... Häufige Aktivierungsfunktionen ... 181 10.7 ... Das Ziel ... 182 10.8 ... Beispiel: Approximation einer Funktion ... 183 10.9 ... Kostenfunktion ... 184 10.10 ... Backpropagation ... 185 10.11 ... Beispiel: Buchstabenerkennung ... 188 10.12 ... Training und Testen ... 190 10.13 ... Mehr Architekturen ... 194 10.14 ... Deep Learning ... 196 10.15 ... Weiterführende Literatur ... 197 11. Verstärkendes Lernen ... 199 11.1 ... Wofür können wir es verwenden? ... 199 11.2 ... Geländeausfahrt mit Ihrem Lamborghini 400 GT ... 200 11.3 ... Jargon ... 202 11.4 ... Ein erster Blick auf Blackjack ... 203 11.5 ... Der klassische Markow-Entscheidungsprozess für Tic-Tac-Toe ... 204 11.6 ... Noch mehr Jargon ... 206 11.7 ... Beispiel: Der mehrarmige Bandit ... 207 11.8 ... Etwas anspruchsvoller 1: Bekannte Umgebung ... 211 11.9 ... Beispiel: Ein Labyrinth ... 214 11.10 ... Notation zu Wertefunktionen ... 218 11.11 ... Die Bellman-Gleichung ... 220 11.12 ... Optimale Policy ... 221 11.13 ... Die Bedeutung der Wahrscheinlichkeit ... 222 11.14 ... Etwas anspruchsvoller 2: Modell-frei ... 223 11.15 ... Monte Carlo Policy Evaluation ... 224 11.16 ... Temporal-Difference-Lernen ... 227 11.17 ... Vor- und Nachteile: MC versus TD ... 228 11.18 ... Finden der optimalen Policy ... 229 11.19 ... Sarsa ... 230 11.20 ... Q-Lernen ... 232 11.21 ... Beispiel: Blackjack ... 233 11.22 ... Große Zustandsräume ... 245 11.23 ... Weiterführende Literatur ... 245 Datensätze ... 247 Epilog ... 251 Index ... 253
Einstieg in C++
Mit diesem Buch gelingt Ihnen der Einstieg in die C++-Entwicklung mühelos. Anschauliche Erklärungen, praxisnahe Beispiele und Übungen begleiten Sie von den ersten Schritten bis zum fertigen Programm. Sie lernen alle wichtigen Themen wie Vererbung, Objektorientierung, Polymorphie, GUI-Entwicklung und Datenbanken. Kenntnisse in C oder einer anderen Sprache werden nicht vorausgesetzt. Aus dem Inhalt: SprachgrundlagenReferenzen und PointerObjektorientierte ProgrammierungVererbung und PolymorphieModerne Bibliotheken: chrono, random, thread, filesystemArbeiten mit ContainernGUI-Entwicklung mit QtDatenbanken mit SQLite verwalten Materialien zum Buch ... 17 1. Eine erste Einführung ... 19 1.1 ... Was machen wir mit C++? ... 19 1.2 ... Was benötige ich zum Programmieren? ... 20 1.3 ... Die Entwicklung von C++ ... 20 1.4 ... So sieht das erste Programm aus ... 21 1.5 ... Kommentieren Sie Ihre Programme ... 22 2. Arbeiten mit Zahlen und Operatoren ... 25 2.1 ... Wie speichere ich Zahlen? ... 25 2.2 ... Rechnen mit Operatoren ... 27 2.3 ... Fehler suchen ... 29 2.4 ... Wie können Daten eingegeben werden? ... 31 2.5 ... Zahlen formatieren mit Manipulatoren ... 33 2.6 ... Zuweisungen kürzer schreiben ... 34 2.7 ... Übung ... 36 2.8 ... Mehr über die Speicherung von Zahlen ... 37 2.9 ... Feste Werte in Konstanten speichern ... 41 2.10 ... Konstanten in Enumerationen zusammenfassen ... 42 2.11 ... Zahlensysteme ... 43 2.12 ... Initialisierung ... 45 2.13 ... Wie erzeuge ich zufällige Zahlen? ... 47 2.14 ... Übung ... 48 3. Mehrere Zweige in einem Programm ... 49 3.1 ... Zwei Zweige mit »if« und »else« ... 49 3.2 ... Bedingungen benötigen Vergleiche ... 51 3.3 ... Mehr als zwei Zweige ... 53 3.4 ... Wie kann ich Bedingungen kombinieren? ... 55 3.5 ... Zweige zusammenfassen mit »switch« und »case« ... 57 3.6 ... Was ist mit dem Rest? ... 58 3.7 ... Welcher Operator hat Vorrang? ... 59 3.8 ... Übungen ... 60 3.9 ... Wie speichere ich Wahrheitswerte? ... 63 3.10 ... Die Kurzform: der bedingte Ausdruck ... 65 4. Teile von Programmen wiederholen ... 67 4.1 ... Regelmäßige Wiederholungen mit »for« ... 67 4.2 ... Wiederholungen für einen Bereich ... 70 4.3 ... Bedingte Wiederholungen mit »do-while« ... 71 4.4 ... Besser vorher prüfen mit »while« ... 72 4.5 ... Wiederholungen abbrechen oder fortsetzen ... 73 4.6 ... Die Wiederholung der Wiederholung ... 75 4.7 ... Übungen ... 76 5. Programme aufteilen in Funktionen ... 79 5.1 ... So schreibe ich eine eigene Funktion ... 79 5.2 ... Wie übergebe ich Daten? ... 81 5.3 ... Wie erhalte ich ein Ergebnis zurück? ... 87 5.4 ... Mehr Ordnung im Programm ... 88 5.5 ... Statische Variablen behalten ihren Wert ... 90 5.6 ... Fehler suchen ... 91 5.7 ... Übungen ... 92 5.8 ... Standardwerte vorgeben ... 93 5.9 ... Beliebig viele Parameter ... 94 5.10 ... Funktionen mehrfach definieren ... 96 5.11 ... Funktionen, die sich selbst aufrufen ... 98 5.12 ... Anonyme Funktionen ... 99 5.13 ... Funktionen als Parameter ... 105 6. Große Datenmengen speichern in Feldern ... 109 6.1 ... Wie werden Felder unterschieden? ... 109 6.2 ... Einfache Felder mit fester Größe ... 110 6.3 ... Intelligente Felder mit fester Größe ... 111 6.4 ... Ausnahmen behandeln ... 113 6.5 ... Einfache und intelligente Zeiger ... 115 6.6 ... Intelligente Felder mit variabler Größe ... 122 6.7 ... Felder initialisieren ... 124 6.8 ... Felder als Parameter ... 125 6.9 ... Daten in mehreren Dimensionen speichern ... 127 6.10 ... Übungen ... 131 7. Arbeiten mit Zeichen und Texten ... 133 7.1 ... Einzelne Zeichen ... 133 7.2 ... Einfache Zeichenketten ... 134 7.3 ... Intelligente Zeichenketten: Strings ... 137 7.4 ... Wie wandle ich Zahlen in Strings um? ... 143 7.5 ... Wie verarbeite ich Eingaben? ... 144 7.6 ... Felder von Zeichenketten ... 147 7.7 ... Suchen und Ersetzen ... 149 7.8 ... Übungen ... 154 8. Daten in Strukturen zusammenfassen ... 157 8.1 ... Wie speichere ich zusammengehörige Daten? ... 157 8.2 ... Besser einen Typ definieren ... 159 8.3 ... Strukturen und Felder ... 161 8.4 ... Strukturen und Funktionen ... 165 8.5 ... Eine Hierarchie von Strukturen ... 170 8.6 ... Übung ... 172 9. Vorhandene Funktionen nutzen ... 175 9.1 ... Umgang mit Datum und Uhrzeit ... 175 9.2 ... Bessere zufällige Zahlen ... 181 9.3 ... Mehrere Threads zur gleichen Zeit ... 184 9.4 ... Nützliche mathematische Funktionen ... 193 9.5 ... Übungen ... 202 9.6 ... Rechnen mit komplexen Zahlen ... 203 9.7 ... Daten mit dem Betriebssystem austauschen ... 210 9.8 ... Zugriff auf Dateien und Verzeichnisse ... 219 10. Eigene Klassen entwerfen ... 237 10.1 ... Klassen umfassen Eigenschaften und Methoden ... 237 10.2 ... Schützen Sie die Daten ... 240 10.3 ... Wie erzeuge und lösche ich Objekte? ... 244 10.4 ... Statische Elemente einer Klasse ... 248 10.5 ... Wie überlade ich Operatoren? ... 252 10.6 ... Objekte und Felder ... 256 10.7 ... Objekte ausgeben ... 260 10.8 ... Eigenschaften können Objekte sein ... 262 10.9 ... Übungen ... 264 11. Vererbung und Polymorphie ... 269 11.1 ... Basisklasse und abgeleitete Klassen ... 269 11.2 ... Welche Elemente sind an welcher Stelle erreichbar? ... 276 11.3 ... Konstruktoren in abgeleiteten Klassen ... 277 11.4 ... Was bedeutet Polymorphie? ... 281 11.5 ... Erben von mehreren Klassen ... 284 12. Datenströme verarbeiten ... 289 12.1 ... Sequenzielles Schreiben und Lesen ... 289 12.2 ... Schreiben und Lesen an beliebiger Stelle ... 296 12.3 ... Wie leiten Sie Datenströme? ... 305 12.4 ... Wie ist das CSV-Format zum Austausch aufgebaut? ... 308 12.5 ... Übung ... 315 13. Container sind vielfältige Datenstrukturen ... 319 13.1 ... Wie durchlaufe ich Container? ... 320 13.2 ... Intelligente Felder mit fester Größe ... 322 13.3 ... Intelligente Felder mit variabler Größe ... 326 13.4 ... Eine Warteschlange mit zwei Enden ... 330 13.5 ... Daten in Listen verketten ... 334 13.6 ... Drei einfache Container ... 344 13.7 ... Zwei nützliche Typen ... 351 13.8 ... Eine Menge von Elementen ... 355 13.9 ... Schlüssel und Werte in einer Map ... 362 13.10 ... Algorithmen für Bereiche ... 369 13.11 ... Mengenlehre ... 374 13.12 ... Eine Menge von Bits ... 378 14. Mehr zu eigenen Klassen ... 383 14.1 ... Objekte initialisieren, kopieren und erzeugen ... 383 14.2 ... Klassen können Freunde haben ... 386 14.3 ... Namen müssen eindeutig sein ... 389 14.4 ... Fehler behandeln mit Ausnahmen ... 392 14.5 ... Innere Klassen ... 400 14.6 ... Templates sind Vorlagen ... 402 15. Präprozessor-Anweisungen ... 409 15.1 ... Einbinden von Dateien ... 409 15.2 ... Definitionen und Makros ... 410 15.3 ... Definitionen und Verzweigungen ... 412 15.4 ... Eine Systemweiche ... 414 16. Grafische Benutzeroberflächen mit der Qt-Bibliothek ... 417 16.1 ... Die erste GUI-Anwendung ... 418 16.2 ... Ein einfacher Kopfrechentrainer ... 429 16.3 ... Ein erweiterter Kopfrechentrainer ... 434 16.4 ... Weitere Widgets ... 441 17. Datenbanken mit SQLite verwalten ... 449 17.1 ... Der Aufbau einer Datenbank ... 449 17.2 ... Wie erzeuge ich Datenbank und Tabelle? ... 450 17.3 ... Wie speichere ich Daten in einer Tabelle? ... 455 17.4 ... So zeige ich alle Daten einer Tabelle an ... 457 17.5 ... Wie wähle ich bestimmte Daten aus? ... 460 17.6 ... Der Benutzer wählt Daten aus ... 464 17.7 ... Daten sollten sortiert werden ... 465 17.8 ... Wie ändere ich Daten? ... 466 17.9 ... Vorsicht beim Löschen von Daten ... 468 17.10 ... Eine Datenbank mit mehreren Tabellen ... 469 17.11 ... Projekt Vokabeln ... 476 17.12 ... Übung ... 497 Anhang ... 501 A ... Installationen ... 501 B ... Hilfestellungen und Übersichten ... 525 Index ... 531
Clean Agile. Die Essenz der agilen Softwareentwicklung
* LERNEN SIE AUS UNCLE BOBS JAHRZEHNTELANGER ERFAHRUNG, WORAUF ES BEI DER AGILEN SOFTWAREENTWICKLUNG WIRKLICH ANKOMMT* DIE URSPRÜNGLICHEN AGILEN WERTE UND PRINZIPIEN KURZ UND PRÄGNANT FÜR DEN PRAXISEINSATZ ERLÄUTERT* VON DEN UNTERNEHMERISCHEN ASPEKTEN ÜBER DIE KOMMUNIKATION IM TEAM BIS ZU DEN TECHNISCHEN PRAKTIKEN WIE TEST-DRIVEN DEVELOPMENT (TDD), EINFACHES DESIGN UND PAIR PROGRAMMINGFast 20 Jahre nach der Veröffentlichung des agilen Manifests ruft der legendäre Softwareentwickler Robert C. Martin (»Uncle Bob«) dazu auf, sich wieder auf die ursprünglichen Werte und Prinzipien zurückzubesinnen, die den eigentlichen Kern der agilen Softwareentwicklung ausmachen und die für die Praxis von zentraler Bedeutung sind. Mit Clean Agile lässt er alle an seiner jahrzehntelangen Erfahrung teilhaben und räumt mit Missverständnissen und Fehlinterpretationen auf, die im Laufe der Jahre entstanden sind. Dabei wendet er sich gleichermaßen an Programmierer und Nicht-Programmierer.Uncle Bob macht deutlich, was agile Softwareentwicklung eigentlich ist, war und immer sein sollte: ein einfaches Konzept, das kleinen Softwareteams hilft, kleine Projekte zu managen - denn daraus setzen sich letztendlich alle großen Projekte zusammen. Dabei konzentriert er sich insbesondere auf die Praktiken des Extreme Programmings (XP), ohne sich in technischen Details zu verlieren.Egal, ob Sie Entwickler, Tester, Projektmanager oder Auftraggeber sind - dieses Buch zeigt Ihnen, worauf es bei der Umsetzung agiler Methoden wirklich ankommt.AUS DEM INHALT:* Ursprünge der agilen Softwareentwicklung* Agile Werte und Prinzipien* Der richtige Einsatz von Scrum* Agile Transformation* Extreme Programming* Unternehmensbezogene Praktiken: User Stories, Velocity, kleine Releases und Akzeptanztests* Teambezogene Praktiken: gemeinsame Eigentümerschaft, kontinuierliche Integration und Stand-up-Meetings* Technische Praktiken: TDD, Refactoring, einfaches Design und Pair Programming* Zertifizierung und Coaching* Software CraftsmanshipSTIMMEN ZUM BUCH:»Bobs Frustration spiegelt sich in jedem Satz des Buchs wider - und das zu Recht. Der Zustand, in dem sich die Welt der agilen Softwareentwicklung befindet, ist nichts im Vergleich zu dem, was sie eigentlich sein könnte. Das Buch beschreibt, auf was man sich aus Bobs Sicht konzentrieren sollte, um das zu erreichen, was sein könnte. Und er hat es schon erreicht, deshalb lohnt es sich, ihm zuzuhören.«- Kent Beck»Uncle Bob ist einer der klügsten Menschen, die ich kenne, und seine Begeisterung für Programmierung kennt keine Grenzen. Wenn es jemandem gelingt, agile Softwareentwicklung zu entmystifizieren, dann ihm.«- Jerry FitzpatrickRobert 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.
Beginning C
Learn how to program using C, beginning from first principles and progressing through step-by-step examples to become a competent, C-language programmer. All you need are this book and any of the widely available C compilers, and you'll soon be writing real C programs.You’ll discover that C is a foundation language that every programmer ought to know. Beginning C is written by renowned author Ivor Horton and expert programmer German Gonzalez-Morris. This book increases your programming expertise by guiding you through the development of fully working C applications that use what you've learned in a practical context. You’ll also be able to strike out on your own by trying the exercises included at the end of each chapter. At the end of the book you'll be confident in your skills with all facets of the widely-used and powerful C language.WHAT YOU WILL LEARN* Discover the C programming languageProgram using C starting with first steps, then making decisions * Use loops, arrays, strings, text, pointers, functions, I/O, and moreCode applications with strings and text * Structure your programs efficientlyWork with data, files, facilities, and moreWHO THIS BOOK IS FORThose new to C programming who may or may not have some prior programming experience.GERMAN GONZALEZ-MORRIS is a software architect/engineer working with C/C++, Java, and different application containers, in particular, with WebLogic Server. He has developed different applications including JEE/Spring/Python. His areas of expertise also include OOP, design patterns, Spring Core/MVC, and microservices.IVOR HORTON is self-employed in consultancy and writes programming tutorials. He worked for IBM for many years and holds a bachelor's degree, with honors, in mathematics. Horton's experience at IBM includes programming in most languages (such as assembler and high-level languages on a variety of machines), real-time programming, and designing and implementing real-time closed-loop industrial control systems. He has extensive experience teaching programming to engineers and scientists (Fortran, PL/1, APL, etc.). Horton is an expert in mechanical, process, and electronic CAD systems; mechanical CAM systems; and DNC/CNC systems.1. Programming in C2. First Steps in Programming3. Making Decisions4. Loops5. Arrays6. Applications with Strings and Text7. Pointers8. Structuring Your Programs9. More on Functions10. Essential Input and Output Operations11. Structuring Data12. Working with Files13. Supporting Facilities14. Advanced and Specialized TopicsA. Computer ArithmeticB. ASCII Character Code DefinitionsC. Reserved Words in CD. Input and Output Format SpecificationsE. Standard Library Headers
Advanced Python Development
This book builds on basic Python tutorials to explain various Python language features that aren’t routinely covered: from reusable console scripts that play double duty as micro-services by leveraging entry points, to using asyncio efficiently to collate data from a large number of sources. Along the way, it covers type-hint based linting, low-overhead testing and other automated quality checking to demonstrate a robust real-world development process.Some powerful aspects of Python are often documented with contrived examples that explain the feature as a standalone example only. By following the design and build of a real-world application example from prototype to production quality you'll see not only how the various pieces of functionality work but how they integrate as part of the larger system design process. In addition, you'll benefit from the kind of useful asides and library recommendations that are a staple of conference Q&A sessions at Python conferences as well as discussions of modern Python best practice and techniques to better produce clear code that is easily maintainable.Advanced Python Development is intended for developers who can already write simple programs in Python and want to understand when it’s appropriate to use new and advanced language features and to do so in a confident manner. It is especially of use to developers looking to progress to a more senior level and to very experienced developers who have thus far used older versions of Python.WHAT YOU'LL LEARN* Understand asynchronous programming* Examine developing plugin architectures* Work with type annotations* Review testing techniques* Explore packaging and dependency managementWHO THIS BOOK IS FORDevelopers at the mid to senior level who already have Python experience.Matthew Wilkes is a European software developer who has worked with Python on web projects for the last fifteen years. As well as developing software, he has long experience in mentoring Python developers in a commercial setting.He is also very involved in open source software, with commits to many popularframeworks. His contributions in that space are focused on the details of database and security interactions of web frameworks.Chapter 1: Prototyping and EnvironmentsChapter Goal: Create a prototype script to read a single sensor valueNo of pages 25Sub -Topics1 Introduce the example of collating data from a large number of othermachines1.1 Possible usecases of this pattern include log aggregation, servermonitoring, IoT, monitoring of customer servers, etc1.2 We’ll use raspberry pis with a mix of server monitoring andvery basic sensors like temperature sensors. There’ll be no IoTspecific setup or detail, it’s just that this is easier for people tofollow along with without inventing another system beingmonitored.1.3 There’ll be plenty of extra context here for how to apply theongoing example if you do already have a system that needsmonitoring.2 Prototyping using jupyter and nbconvert3 Use pipenv to set up dependency environment3.1 Note that by introducing pipenv before setuptools we’repreempting the confusion about the right way to do dependencyand environment management.Chapter 2: Testing, Checking and LintingChapter Goal: Progress the prototype to a series of reliable functions thatcan be testedNo of pages: 30Sub - Topics1 Testing with PyTest (especially fixtures and MUT style)2 Type hinting and checking with mypy3 Linting with flake8 and autoformatting with black4 pre-commit and commit hooks5 GitHub CI integration for easier contributionsChapter 3: Packaging ScriptsChapter Goal: Create an installable package that gives a single script toread the sensor valueNo of pages : 30Sub - Topics:1 setup.py and setuptools when it comes to packaging (not pip /setup.py for environment management, that’s in chapter 1)2 Namespace packages3 Console entrypoint4 argparseHelpful aside: Package name conflicts, installing from GitHub releases,release hashing, wheelsChapter 4: From Script to LibraryChapter Goal: Extend the package to allow reading of multiple sensorsthrough the command lineNo of pages: 20Sub - Topics:1. Abstract Base Classes2. Second sensor value3. argparse subcommandsChapter 5: Alternative InterfacesChapter Goal: Make the script functionality available as a HTTPmicroserviceNo of pages : 40Sub - Topics:1 Simple API servers using flask2 Plugin architecture using entrypoints3 Dynamic dispatch4 Serialisation considerations with custom classes (like units from pintspackage)Chapter 6: Speeding Things UpChapter Goal: Discuss optimisation strategies, what the tradeoffs betweenasync and different types of caching are. We’ll use cachinghere, but async laterNo of pages : 25Sub - Topics:1 asyncio vs lru_cache vs redis vs sqlite etc2 Use of timeit3 File operations using context managersChapter 7: Aggregation ProcessChapter Goal: Create a new package, read configuration files, do a basicHTTP loopNo of pages : 25Sub - Topics:1 cookiecutter2 Config files (configparser vs json vs yaml)3 Requests library4 More depth in pytest usageChapter 8: Asynchronous ProgrammingChapter Goal: Understand the event loop, especially async for loops,demonstrate how it’s a good fit for the aggregation processNo of pages : 40Sub - Topics:1 Defining asynchronous functions2 Using the event loop3 Syntactic sugar for loops and iterators4 Async tasks vs await5 async executorsChapter 9: Asynchronous DatabasesChapter Goal: Understand async executors, using sqlalchemy and JSONBNo of pages : 30Sub - Topics:1 sqlalchemy (and why pandas isn’t a good fit here)2 JSONB format and schemaless3 aiofile, asyncpg and usability/speed tradeoffsChapter 10: Viewing the DataChapter Goal: Creating Jupyter notebooks and using matplotlibNo of pages : 35Sub - Topics:1 Calling async functions from Jupyter Notebooks2 Binding function calls to ipywidgets for interactive reports3 Examples of matplotlib4 GeoJSONChapter 11: Fault ToleranceChapter Goal: Extending ABC interfaces and efficient use of iterables forlarge HTTP responsesNo of pages : 20Sub - Topics:1 Using __subclasshook__ effectively2 Chunked responses vs framing3 JSON deserialisation of partial data and efficient data transferChapter 12: Callbacks and Data AnalysisChapter Goal: Using generators, iterators and coroutines for dataanalysis, async timeoutsNo of pages : 30Sub - Topics:1 Iterator based filtering2 Coroutine based plugins, for example a coroutine that pulls historicaldata and compares it to the current value to decide if an alarm shouldbe raised3 waitfor and executor timeout considerations
Modern C++ for Absolute Beginners
Learn the C++ programming language in a structured, straightforward, and friendly manner. This book teaches the basics of the modern C++ programming language, C++ Standard Library, and modern C++ standards. No previous programming experience is required.C++ is a language like no other, surprising in its complexity, yet wonderfully sleek and elegant in so many ways. It is also a language that cannot be learned by guessing, one that is easy to get wrong and challenging to get right. To overcome this, each section is filled with real-world examples that gradually increase in complexity. Modern C++ for Absolute Beginners teaches more than just programming in C++20. It provides a solid C++ foundation to build upon.The author takes you through the C++ programming language, the Standard Library, and the C++11 to C++20 standard basics. Each chapter is accompanied by the right amount of theory and plenty of source code examples.You will work with C++20 features and standards, yet you will also compare and take a look into previous versions of C++. You will do so with plenty of relevant source code examples.WHAT YOU WILL LEARN* Work with the basics of C++: types, operators, variables, constants, expressions, references, functions, classes, I/O, smart pointers, polymorphism, and more * Set up the Visual Studio environment on Windows and GCC on Linux, where you can write your own code* Declare and define functions, classes, and objects, and organize code into namespaces* Discover object-oriented programming: classes and objects, encapsulation, inheritance, polymorphism, and more using the most advanced C++ features* Employ best practices in organizing source code and controlling program workflow* Get familiar with C++ language dos and donts, and more* Master the basics of lambdas, inheritance, polymorphism, smart pointers, templates, modules, contracts, concepts, and moreWHO THIS BOOK IS FORBeginner or novice programmers who wish to learn C++ programming. No prior programming experience is required.Slobodan Dmitrovic is a C++ software developer with a strong interest in software architecture, modern C++, research and development, and training.1. Introduction2. What is C++?3. C++ Compilers4. Our First Program5. Types6. Exercises7. Operators8. Standard Input9. Exercises10. Arrays11. Pointers12. References13. Introduction to Strings14. Automatic Type Deduction15. Exercises16. Statements17. Constants18. Functions19. Exercises20. Scope and Lifetime21. Exercises22. Classes - Part I23. Exercises24. Classes – Part II25. The static Specifier26. Templates27. Enumerations28. Organizing code29. Exercises30. Conversions31. Exceptions32. Smart Pointers33. C++ Standard Library and Friends34. C++ Standards35. C++1136. C++1437. C++1738. C++20
From Chaos to Concept
THIS BOOK IS WRITTEN FOR PRODUCT DESIGN, SOFTWARE DEVELOPMENT, GRAPHIC DESIGN, AND UX PROFESSIONALS WITH A FOCUS ON CREATING MEASURABLY BETTER USER EXPERIENCES.If you want to design solutions to meet business goals and delight your users, you can look to this resource which covers the following areas:* Creating and documenting goals, strategies, objectives, and tactics* Defining or refining personas based on your measurable objectives (OKRs)* Creating and iterating on scenarios based your prioritized personas* A team approach to defining the product and roadmap to address critical use cases* Team based divergent ideation and solution exploration* Team based convergent solution definition* Wireframing potential solutions for rapid research and iteration* Using quantitative and qualitative methods to understand usage and test with users* Exploring approaches to taxonomy and information architecture* Using psychology and human factors to drive your design decisions* Developing performant, accessible, maintainable experiences* Using analytics to measure the results and inform the next iteration* How this process differs based on the size of the company or team that is employing itKEVIN C. BRAUN is a UX design leader, speaker, educator, and author. He is the founder of Braun Interactive, a design consultancy located in the heart of the Silicon Valley. Kevin has over 24 years of software design and development experience. In that time he has worked to improve user experiences with world-class companies including Google, Samsung, Rolex, Hyundai, Michael Kors, MIT, Harvard, Cisco Systems, Keurig, and Vermont Teddy Bear. He has also worked with industry leaders in healthcare, insurance, automotive, mobile devices, and consumer goods. Introduction: The Golden Butter Knife xvCH 1: MAKE IT USEFUL 1What are We Trying to Do and How Will We Know If We Did It? 1CH 2: MAKE IT USABLE 31Who are We Designing This For?—Personas/User Segments 31What Do They Need?—Scenarios 38When Will We Design and Build It?: The Product Roadmap 42CH 3: MAKE IT BEAUTIFUL 59Scannability, Readability, Comprehension 62Using the Inverted Pyramid Model for Content 63Alignment and the Grid 65Visual Hierarchy 67Composition 69Scope 74The Golden Triangle 74The F, Z, and Other Gaze Patterns 76Gestalt Patterns 77Color 86Thematic Appropriateness 88Data Visualization 90Further Reading 94CH 4: MAKE IT FUNCTIONAL 95Framework-itis and Code Bloat 98Testing across Platforms, Browsers, and Devices 99Accessibility 102Further Reading 105CH 5: MAKE IT MEASURABLE 107FaUX 107Analytics 110Conversions and Micro Conversions 111Be Curious and Analytical 113Google Analytics 115Mouseflow 115Reverse Path Analysis to Understand Failure 117Being Misled by Your Data 118Fear of Change 119Ease the Fear of Change with A/B Testing 120Some Helpful Tools of the Trade 121Further Reading 122CH 6: MAKE IT BETTER 123Planning Your Iterations 123Research 124Analysis 125Findings 126Recommendations 128Prioritization 130Effort 132Further Reading 133CH 7: MAKE THESE METHODS WORK FOR YOU 135Starting with a Greenfield Project or at a Startup 135Understanding the Market 136What Comes Next? 154Working within an Established Company 168Conclusion 176Index 179
Advanced R 4 Data Programming and the Cloud
Program for data analysis using R and learn practical skills to make your work more efficient. This revised book explores how to automate running code and the creation of reports to share your results, as well as writing functions and packages. It includes key R 4 features such as a new color palette for charts, an enhanced reference counting system, and normalization of matrix and array types where matrix objects now formally inherit from the array class, eliminating inconsistencies.Advanced R 4 Data Programming and the Cloud is not designed to teach advanced R programming nor to teach the theory behind statistical procedures. Rather, it is designed to be a practical guide moving beyond merely using R; it shows you how to program in R to automate tasks.This book will teach you how to manipulate data in modern R structures and includes connecting R to databases such as PostgreSQL, cloud services such as Amazon Web Services (AWS), and digital dashboards such as Shiny. Each chapter also includes a detailed bibliography with references to research articles and other resources that cover relevant conceptual and theoretical topics.WHAT YOU WILL LEARN* Write and document R functions using R 4* Make an R package and share it via GitHub or privately* Add tests to R code to ensure it works as intended* Use R to talk directly to databases and do complex data management* Run R in the Amazon cloud* Deploy a Shiny digital dashboard* Generate presentation-ready tables and reports using RWHO THIS BOOK IS FORWorking professionals, researchers, and students who are familiar with R and basic statistical techniques such as linear regression and who want to learn how to take their R coding and programming to the next level.MATT WILEY leads institutional effectiveness, research, and assessment at Victoria College, facilitating strategic and unit planning, data-informed decision making, and state/regional/federal accountability. As a tenured, associate professor of mathematics, he won awards in both mathematics education (California) and student engagement (Texas). Matt earned degrees in computer science, business, and pure mathematics from the University of California and Texas A&M systems.Outside academia, he co-authors books about the popular R programming language and was managing partner of a statistical consultancy for almost a decade. He has programming experience with R, SQL, C++, Ruby, Fortran, and JavaScript.A programmer, a published author, a mathematician, and a transformational leader, Matt has always melded his passion for writing with his joy of logical problem solving and data science. From the boardroom to the classroom, he enjoys finding dynamic ways to partner with interdisciplinary and diverse teams to make complex ideas and projects understandable and solvable.JOSHUA F. WILEY is a lecturer in the Turner Institute for Brain and Mental Health and School of Psychological Sciences at Monash University. He earned his PhD from the University of California, Los Angeles and completed his post-doctoral training in primary care and prevention. His research uses advanced quantitative methods to understand the dynamics between psychosocial factors, sleep and other health behaviours in relation to psychological and physical health. He develops or co-develops a number of R packages including varian, a package to conduct Bayesian scale-location structural equation models, MplusAutomation, a popular package that links R to the commercial Mplus software, extraoperators for faster logical operations, multilevelTools for diagnostics, effect sizes, and easy display of multilevel / mixed effects models results, and miscellaneous functions to explore data or speed up analysis in JWileymisc.PROGRAMMING1.Programming Basics2.Programming Utilities3.Loops, flow control, and *apply functions4.Writing Functions5.Writing Classes and Methods6.Writing a PackageDATA MANAGEMENT7.Data Management using data.table8.Data Munging With data.table9.Other Tools for Data Management10.Reading Big Data(bases)CLOUD COMPUTING11.Getting a Cloud12.Ubuntu for Windows Users13.Every Cloud has a Shiny lining…14.Shiny Dashboard Sampler15.Dynamic Reports and the CloudReferences (backmatter)
Python für Dummies
Python ist eine der beliebtesten und vielseitigsten Programmiersprachen überhaupt. Für viele Entwickler führt deshalb kein Weg an Python vorbei. Schöpfen Sie mit diesem Buch aus dem reichen Erfahrungsschatz zweier langjähriger Softwareentwickler. Sie lernen zunächst die Syntax der Sprache und vertiefen dann das Erlernte anhand von konkreten Aufgabenstellungen. Für den Blick über den Tellerrand sorgen Kapitel zu Programmierparadigmen, Code-Qualität, Test-Ansätzen und Dokumentation. Jede Menge Tipps und Tricks und ein breites Spektrum an Beispielen lassen Sie zu einem wahren Python-Profi werden. Johannes Hofmeister lebt in Heidelberg. Am Psychologischen Institut der Universität Heidelberg erforscht er zur Zeit, was Code verständlich macht. Als Softwareentwickler und Berater hat er in großen und kleinen Unternehmen C#, Java und JavaScript eingesetzt, aber am liebsten liest und schreibt er Python-Code.Horst Schneider lebt in Mannheim und arbeitet seit mehr als zehn Jahren als Softwareentwickler. Sein Schwerpunkt ist die Anwendungsentwicklung in verschiedenen Sprachen, von Java über C# bis zu JavaScript und Python. Aktuell arbeitet er als Coach und Berater im Raum Heidelberg und löst vielfältige Probleme - vorzugsweise mit Python.Über die Autoren 11EINLEITUNG 23Törichte Annahmen über den Leser 23Wie Sie dieses Buch nutzen können 23Was Sie nicht lesen müssen 24Wie dieses Buch aufgebaut ist 24Symbole, die in diesem Buch verwendet werden 25Konventionen in diesem Buch 26TEIL I: LANGWEILIGE EINMALLEKTÜRE 27KAPITEL 1 ORIENTIERUNG29Motivation 29Was ist Python? 29Warum sollte ich Python lernen? 29Was ist an Python so besonders? 30Seit wann gibt es Python? 30Warum ist Python weniger verbreitet als andere Sprachen? 31Welche Sprachfeatures bringt Python mit? 31Ist Python eine Skript- oder eine Programmiersprache? 32Ich habe gehört, dass Python langsam ist Stimmt das? 32Anwendungsgebiete 33Wer verwendet Python? 33Kann man mit Python Geld verdienen? 33Was kann ich mit Python machen? 33Sollte ich nicht doch lieber eine andere Sprache lernen? 34KAPITEL 2 IM KRIECHGANG – DIE INSTALLATION35Windows 35Schritt 1 – Herunterladen 36Schritt 2 – Installieren 37Schritt 3 – Läuft’s? 39macOS 40Schritt 1 – Herunterladen 40Schritt 2 – Installieren 41Schritt 3 – Läuft’s? 44Alternative: Homebrew 44Linux 45Einer für alle 46KAPITEL 3 DER SCHLANGE BEINE MACHEN – PYTHON AUSFÜHREN49Der REPL 49Editor oder IDE? 50TEIL II: PYTHON SPRECHEN LERNEN 53KAPITEL 4 HIC FORUM EST – SCHNELLKURS55Vogelperspektive 56Das kleinste Python-Programm der Welt 59Zeichenketten und Bildschirmausgabe 60Rechnen mit Python 63Variablen 66Wahrheitswerte und bedingte Ausführung 69Boolesche Logik in Python 69Truthy und Falsy 71Wenn – Dann – Sonst 72Listen und Schleifen 74Funktionen und Module 77Funktionen definieren und aufrufen 78Module nutzen 79Fehlerbehandlung 80KAPITEL 5 DATEN STRUKTURIEREN85Listen 86Listen anlegen 86Was steckt drin? 86Listen verändern 88Listen sortieren 89Absteigend oder aufsteigend sortieren? 90Tupel 91Einpacken 91Entpacken 92Tupel verändern 94Tupel sortieren 95Wann Sie Listen und wann Tupel verwenden sollten 95Dictionarys 96Dictionarys anlegen 97Was steckt drin? 98Dictionarys verändern 99Sets 100Sets anlegen 101Was steckt drin? 101Sets verändern 102Mengenlehre 104KAPITEL 6 DATEN TRANSFORMIEREN109Iteration 109Comprehensions 112Syntax 112List Comprehensions 114Dictionary Comprehensions 115Set Comprehensions 116Generator Expressions 117Slicing 120Ein einziges Element 121Mehrere Elemente 122Schrittweise Auswahl 122Beispiel: IBAN validieren 123Iteration ohne Index 125FAQ – Leben ohne Index 127Nur ein Element 128Nummerierung 128Listen zusammenführen 129Listen zerteilen 129Dictionarys erzeugen 130Dictionarys iterieren 131Verschachtelte Iteration 131KAPITEL 7 MIT DER AUẞENWELT KOMMUNIZIEREN133Selbstgespräche führen 134Text ausgeben 134Text einlesen 135Textausgabe steuern 136Längere Texte zusammenbasteln 137Texte formatieren 137Textkodierung 140Kommandozeilenparameter 140Textdateien einlesen 142Im Ganzen lesen 142Zeilenweise lesen 143Textdateien schreiben 146Dateimodi: Behalten oder neu machen? 146Im Ganzen schreiben 147Zeilenweise schreiben 148Vollständiges Beispiel 149Alles fließt 150Bin∖xc3∖xa4rdaten lesen 152Im Ganzen lesen 153Häppchenweise lesen 154Binärdaten schreiben 158TEIL III: MIT PYTHON PROBLEME LÖSEN 161KAPITEL 8 WAS PYTHON SCHON KANN163Built-ins 163Built-ins für den REPL 165Umwandlungsfunktionen 166Mathematische Funktionen 171Mengen aggregieren 172Daten transformieren 173Module und Pakete 175Module importieren 176Direktimporte 176Aus Paketen importieren 177Namenskonflikte verhindern 177Import mit Wildcard – Alle für einen 178Die Standardbibliothek 179Im Lieferumfang enthalten sind 180os – Welches Betriebssystem läuft? 180random und secrets – Zufall 183imaplib – E-Mails versenden 184urllib und json – Web 186Minisprachen 187Datum- und Zeitangaben 187Strings formatieren 192KAPITEL 9 WAS PYTHON (NOCH) NICHT KANN197Pip installieren 197Pakete installieren 198Installierte Pakete ansehen 199Spezifische Versionen installieren 199Pakete entfernen 200KAPITEL 10 WAS SIE PYTHON BEIBRINGEN KÖNNEN201Eigene Module 201Eigene Module anlegen 202Eigene Pakete 202Eigene Skripte 204Hintergrund: Wie Module geladen werden 206Wo sucht Python Module? 206Module Laden 207TEIL IV: PYTHON ALS HANDWERK 209KAPITEL 11 FUNKTIONALE PROGRAMMIERUNG211Anatomie einer Funktion 212Definition 212Aufruf 212Namen und Konzepte 213Effekte und Nebeneffekte 213Positionale Argumente 214Benannte Argumente 215Regeln für Funktionsaufrufe aufstellen 216Optionale Argumente 219Variable Argumente mit *args und **kwargs 222Argumente entpacken 225Funktionen haben »Bürgerrechte« 226Funktionen zusammenstecken 227Arbeitsteilung 229Funktionen, die Funktionen erzeugen 232Dekoratoren 233Generatoren 235KAPITEL 12 OBJEKTORIENTIERTE PROGRAMMIERUNG239Anatomie eines Objekts 240Objekte 241Klassen und Konstruktoren 241Attribute und Methoden 242Instanzen 246Operatoren 248Beziehungen 252Vererbung – Objekte als Familie 253Komposition – Objekte im Team 263In Objekten denken 270Was ist eigentlich objektorientierte Programmierung? 271Wie man gute Objekte designt 273KAPITEL 13 AUSNAHMEN279Ausnahmen behandeln 281Eigene Ausnahmen auslösen 282Ausnahmen als Signale nutzen 283Beispiel: Hotels buchen 285KAPITEL 14 TESTEN 295Wenn Ihr Programm nicht tut, was es soll 296Eigenschaften von Python 296Fehlerklassen (oder: Was alles schief gehen kann) 298Wo und wie Tests helfen können 300Python bei der Arbeit zuschauen 301Debuggen mit print 301Bedingungen prüfen mit assert 302Den Programmfluss kontrollierbar machen 303Unit-Tests schreiben mit dem unittest-Modul 305Unit-Tests erstellen und ausführen 306Bestehende Komponenten testen 309TEIL V: BRÖTCHEN (ODER LORBEEREN) MIT PYTHON VERDIENEN 313KAPITEL 15 CODE-QUALITÄT315Werkzeuge 316Programmstil überprüfen mit Pycodestyle 317Code reformatieren 319Programmierfehler erkennen mit Pyflakes 321Dokumentation überprüfen mit Pydocstyle 323Sicherheitsrisiken finden mit Bandit 326Integrierte Code-Audits 328Modulare Audits mit Flake8 329Das Schweizer Taschenmesser: Pylint 333Chancen und Grenzen 335Listen to your tools 335Was Werkzeuge nicht leisten können 337KAPITEL 16 WEBANWENDUNGEN ENTWICKELN 339Python und das Web 339Die Qual der Wahl 340Django 340Was macht Django? 341Wie Django HTTP-Anfragen verarbeitet 342Ein Beispielprojekt 343Schritt 1 – Setup 344Schritt 2 – Die erste Seite 344Schritt 3 – Ein Modell 348Schritt 4 – Die Django-Verwaltung 350Schritt 5 – Eine eigene View 353Schritt 6 – HTML rendern 354Zusammenfassung 355KAPITEL 17 DATEN AUFBEREITEN, VISUALISIEREN UND AUSWERTEN357Setup 358Szenario: Minigolf 358Datensatz 359Schritt 0 – Fragen 361Schritt 1 – Daten einlesen 362Schritt 2 – Data Frames untersuchen 362Schritt 3 – Series-Objekte betrachten 364Schritt 4 – Beschreibende Statistiken ausgeben 365Schritt 5 – Filtern und Bereinigen 367Schritt 6 – Auswerten 369Schritt 7 – Visualisieren 371Schritt 8 – Schließende Statistik 372Zusammenfassung 373TEIL VI: DER TOP-TEN-TEIL 375KAPITEL 18 ZEHN GUTE BIBLIOTHEKEN377Die Standardbibliothek 377Requests 377BeautifulSoup 378Scrapy 378Selenium 379Cryptography 379Pypdftk 380Flask 380OpenCV 380NLTK 381KAPITEL 19 ZEHN DINGE, DIE WIR AUSGELASSEN HABEN383Python 2.7 383Interoperabilität mit C 384Python Bytecode disassemblieren 384Debugging 385Logging 385GUIs 386Nebenläufige Ausführung 387Typ-Annotationen 387Dataclasses 388Walross-Operator 389Stichwortverzeichnis 393
Android Application Development All-in-One For Dummies
CONQUER THE WORLD OF ANDROID APP DEVELOPMENTAndroid has taken over the mobile and TV markets and become unstoppable! Android offers a vast stage for developers to serve millions—and rake in the profits—with diverse and wide-ranging app ideas. Whether you're a raw recruit or a veteran programmer, you can get in on the action and become a master of the Android programming universe with the new edition of Android Application Development For Dummies All-in-One. In addition to receiving guidance on mobile and TV development, you'll find overviews of native code, watch, car, Android wear, and other device development.This friendly, easy-to-follow book kicks off by offering a fundamental understanding of Android's major technical ideas, including functional programming techniques. It moves on to show you how to work effectively in Studio, program cool new features, and test your app to make sure it's ready to release to a waiting world. You'll also have an opportunity to brush up on your Kotlin and develop your marketing savvy. There are millions of potential customers out there, and you want to stand out from the crowd!* Understand new features and enhancements* Get development best-practices* Know your Android hardware* Access online materialsWith a market share like Android's, the stakes couldn't be higher. Android Application Development For Dummies All-in-One levels the field and gives you the tools you need to take on the world.BARRY BURD, PHD, is a veteran author and educator. At the University of Illinois, he was five times elected to the university-wide List of Teachers Ranked as Excellent by their Students. He has written several books on Java and Android development. JOHN PAUL MUELLER has produced 115 books and more than 600 articles on topics ranging from functional programming techniques to application development using C++. INTRODUCTION 1How to Use This Book 1Conventions Used in This Book 2Foolish Assumptions 2Icons Used in This Book 3Beyond the Book 4Where to Go from Here 4BOOK 1: GETTING STARTED WITH ANDROID APPLICATION DEVELOPMENT 5CHAPTER 1: ALL ABOUT ANDROID 7The Consumer Perspective 8The Versions of Android 9The Developer Perspective 12Java and Kotlin 12XML 14Linux 16The Business Perspective 18CHAPTER 2: INSTALLING THE SOFTWARE TOOLS 19Setting Up the Software 20Considering the requirements 20Downloading the software 21Installing Android Studio 23Installing offline tools 25Launching the Android Studio IDE 28In Windows 29On a Mac 29In Linux 30In Chrome OS 30Using the Android Studio Setup Wizard 30Fattening Up the Android SDK 32The more things stay the same, the more they change 32Installing new versions (and older versions) of Android 33Creating an Android virtual device 35A third-party emulator 39CHAPTER 3: CREATING AN ANDROID APP 43Creating Your First App 43Starting the IDE and creating your first app 45Launching your first app 50Running Your App 52You Can Download All the Code 55Troubleshooting Common IDE Errors 58Error message: Failed to find target 58Error running ‘app’: No target device found 58Error message: Android Virtual Device may be incompatible with your configuration 58You lose contact with the Android Debug Bridge (ADB) 59You don’t like whatever AVD opens automatically 59The emulator stalls during startup 60Error message: The user data image is used by another emulator 61Error message: Unknown virtual device name 63The emulator displays a “process isn’t responding” dialog box 63Changes to your app don’t appear in the emulator 64Testing Apps on a Real Device 64CHAPTER 4: EXAMINING A BASIC ANDROID APP 67A Project’s Files 68The MainActivity.kt file 71The onCreate() method 72Using other templates 73The res Branch 76The res/drawable branch 77The res/layout branch 77The res/menu branch 78The res/mipmap branch 79The res/values branch 80Other Files in an Android Project 82The build.gradle file 82The AndroidManifest.xml file 85The R.java file 87The assets folder 89The android.jar archive 90The APK file 91What Did I Agree To? 93What’s in a name? 93Choosing a language 95Your app’s API levels 95CHAPTER 5: CONJURING AND EMBELLISHING AN ANDROID APP 101Dragging, Dropping, and Otherwise Tweaking an App 102Creating the “look” 102Coding the behavior 112A Bit of Debugging 118Try it! 118Discovering the secrets of Logcat 123Using the debugger 126CHAPTER 6: IMPROVING YOUR APP 131Improving the Layout 131Changing the layout 132Creating a reusable layout 139Reusing a layout 142Starting Another Activity 145Localizing Your App 151Responding to Check Box Events 155Displaying Images 157Sending in Your Order 162BOOK 2: ANDROID BACKGROUND MATERIAL 167CHAPTER 1: USING ANDROID STUDIO 169Good to Know versus Need to Know 170Getting a Feel for the Big Picture 171The main window 173Viewing modes 179The Designer tool 181Discovering What You Can Do 184Finding things 185Fixing code 190Refactoring 199CHAPTER 2: KOTLIN FOR JAVA PROGRAMMERS 203Using Kotlin or Java for Development 204Defining the Java Issues That Kotlin Fixes 207Improving control over null references 207Removing raw data types 210Using invariant arrays 210Working with proper function types 212Getting rid of the checked exceptions 213Nothing’s Perfect: Kotlin is Missing Features, Too 214Considering primitive types that are not classes 214Losing static members 214Eliminating non-private fields 215Reducing confusion by eliminating wildcard-types 216Abandoning the ternary-operator a ? b : c 217Looking at What Kotlin Adds to the Picture 218Considering higher order functions and lambdas 218Refining object orientation using extension functions 218Relying on smart casts 219Employing string templates 220Understanding primary constructors 221Implementing first-class delegation 221Using ranges of values 223Creating data classes 224Overloading operators 224Developing asynchronous code using coroutines 225CHAPTER 3: KOTLIN FOR EVERYONE 227Moving from Development to Execution with Kotlin 228What is a compiler? 228Understanding native code compiler or interpreter issues 230Considering the Android Runtime (ART) 231Grasping Kotlin Code 235Nearly everything begins with an expression 236The Kotlin class 238Classes and objects 239Kotlin types 240Performing casts 245The Kotlin function 249Objects and their constructors 252Classes grow on trees 254The Kotlin package 255Considering Kotlin visibility rules 257Defying your parent 258Kotlin comments 259CHAPTER 4: WHAT KOTLIN DOES (AND WHEN) 261Making Decisions (Kotlin if Statements) 261Testing for equality 264Choosing among many alternatives (Kotlin when statements) 266Repeating Instructions Over and Over Again 269Kotlin while statements 269Kotlin do statements 271Arrays in Kotlin 273Kotlin’s for statements 277Looping using Kotlin recursion 281Working with break and continue 283Jumping Away from Trouble 284Working with Kotlin Collections 286Considering the collection types 287Differentiating between read-only and mutable collections 289CHAPTER 5: OBJECT-ORIENTED PROGRAMMING IN KOTLIN 291Static Fields and Methods 291Interfaces and Callbacks 294Event handling and callbacks 299An object remembers who created it 302A less wordy way to implement an interface 303Classes That Must (and Must Not) Be Extended 305The need to override 306Java’s final classes 306Kotlin’s open classes 307Kotlin extensions 307Abstract classes 308Inner Classes 310Named inner classes 310Anonymous inner classes 312CHAPTER 6: FUNCTIONAL PROGRAMMING IN KOTLIN 315Defining Functional Programming 316Differences from other programming paradigms 316Understanding its goals 317Understanding Pure and Impure Languages 318Using the pure approach 318Using the impure approach 320Comparing the Functional Paradigm 320Using Kotlin for Functional Programming Needs 322Defining the Role of State 323Using Recursion to Perform Calculations 324Relying on standard recursion 324Relying on tail recursion 326Using Function Types 327Understanding Function Literals 329Lambda expressions 329Anonymous functions 330Defining the Function Types 331Comprehensions 331Receivers 332Inline 334Utility 335Using Functional Programming for Android Apps 336CHAPTER 7: ALOOK AT XML 339XML Isn’t Ordinary Text 340Of tags and elements 340Other things you find in an XML document 348What’s in a Namespace? 350The package attribute 353The style attribute 354BOOK 3: THE BUILDING BLOCKS 357CHAPTER 1: GETTING AN OVERVIEW OF JETPACK 359Understanding the Benefits of Jetpack 360Eliminating boilerplate code 360Managing background tasks 361Navigating between activities and fragments 362Managing memory 364Performing configuration changes 365Considering the Jetpack Components 366Foundation 367Architecture 368Behavior 370UI 372Getting an Overview of the AndroidX Package 373Working with Lifecycle-Aware Components 374Focusing on activities 375Understanding events and states 376CHAPTER 2: BUILDING A FOUNDATION FOR YOUR APP 377Working with Android KTX 378Getting a feel for KTX features 378Using KTX in your project 381Considering the modules 382Addressing Security Issues 389Benchmarking Your Application 392Removing barriers to correct results 393Creating a test app 394Profiling your app 397Tracing your app 398Checking for benchmarking module support 400Benchmarking the app 401Testing Application Functionality 403CHAPTER 3: CREATING AN ARCHITECTURE 405Managing Application Activities 405Defining an activity 406Getting an overview of intent filters 407Considering the activity lifecycle 407Understanding the backstack 409Working with fragments 412Considering the fragment lifecycle 416Seeing activities and fragments in action 417Providing for Navigational Needs 433Creating the navigational graph 434Adding a NavHostFragment to your activity 437Adding destinations 438Creating links between destinations 440Creating the required linkages 442Performing Background Tasks Using WorkManager 446CHAPTER 4: DEFINING AN APP’S BEHAVIOR 451Working with Notifications 452Understanding what notifications do 452Anatomy of a notification 454Assigning a channel to your notification 456Setting the notification importance 457Considering the notification types 458Relying on notification updates 459Do Not Disturb mode 460Creating a notification 460Getting Permission 466Considering permission use 467Configuring permissions in AndroidManifest.xml 468Complying with User Preferences 469Deciding on a preference set 470Setting preferences using the Preference Library 472Working with MediaPlayer 481Adding Camera Support Using CameraX 484Sharing with Others 487Performing simple share actions with other apps 487Using Slices 488CHAPTER 5: INTERACTING WITH THE USERS 491Creating a Great Layout 492Defining the View and ViewGroup elements 492Creating a layout using XML 493Modifying a layout at runtime 497Considering the common layouts 498Working with adapters 499Debugging your layout 500Employing Color and Texture 502Working with styles and themes 503Creating a palette 509Using swatches to create color schemes 510Using Animations and Transitions 510Understanding the need for animations 511Animating graphics 511Communicating with Emoji 514Keyboard emoji support 515Using the cut-and-paste method on standard controls 516Using the AndroidX approach 517BOOK 4: PROGRAMMING COOL PHONE FEATURES 521CHAPTER 1: HUNGRY BURDS: A SIMPLE ANDROID GAME 523Introducing the Hungry Burds Game 523The Hungry Burds Project’s Files 526The Main Activity 528The Code, All the Code, and Nothing But the Code 530Setting Up the Game 535Declaring properties 535The onCreate Method 537Displaying a Burd 538Creating random values 538Creating a Burd 539Placing a Burd on the constraint layout 540Animating a Burd 542Handling a Touch Event 544Finishing Up 546CHAPTER 2: AN ANDROID SOCIAL MEDIA APP 547Setting Things Up on Facebook’s Developer Site 548A Minimal Facebook App 549The build.gradle file 550The manifest file 550A Bare-Bones Main Activity 551Enriching the Minimal App 555Working with a radio group 559Controlling the web view 562Who tests your Facebook app? 563CHAPTER 3: GOING NATIVE 567The Native Development Kit 567Understanding why you need the NDK 568Knowing what you get 569Getting the NDK 570Creating an Application 573Starting with the template 573Seeing the essential project differences 575Considering the build.gradle (Module: app) differences 577Understanding the default template differences 580Getting an overview of the C++ file 582Seeing the result 583BOOK 5: APPS FOR TABLETS, WATCHES, TV SETS, AND CARS 585CHAPTER 1: APPS FOR TABLETS 587Gaining Perspective 588Creating the right devices 589Running code on multiple devices 593Copying the project 594Seeing presentation differences 596Developing a Nested Navigational Graph 603Understanding the uses for nested navigational graphs 603Developing an app design 604Considering the content needs 608Creating a Responsive App 612CHAPTER 2: DEVELOPING FOR ANDROID WEAR 615Seeing Where Wearables Are Used 615Setting Up Your Testing Environment 617Creating the project 617Configuring a wearable device emulator 620Other testing configurations 624Wearable Apps: What’s the Big Deal? 625Case Study: A Watch Face 626Defining the watch face project 627Testing the watch face app 628Dissecting the skeletal watch face project 631Enhancing the skeletal watch face project 634CHAPTER 3: DEVELOPING FOR ANDROID TV 637Getting Started 638Running the Skeletal App 641Dissecting the TV App 644Adding to the standard AndroidManifest.xml 644Looking into build.gradle (Module: app) 645Defining a layout 646The adapter and the presenter 647Using the Adapter class 648Using the Presenter class 650CHAPTER 4: DEVELOPING FOR ANDROID AUTO 653Checking Auto Compatibility 654Choosing the Google Play Services 656Considering Notification Limits 658Creating an Emulator 660Configuring your car for development 661Defining an emulator 662Developing an Android Auto App 670Creating the project 670Viewing the project configuration 672Performing required configuration tasks 674Touring the Media Service app 675BOOK 6: THE JOB ISN’T DONE UNTIL 679CHAPTER 1: PUBLISHING YOUR APP TO THE GOOGLE PLAY STORE 681Creating a Google Play Developer Account 681Preparing Your Code 682Un-testing the app 683Choosing Android versions 683Setting your app’s own version code and version name 684Choosing a package name 685Preparing Graphic Assets for the Play Store 685Creating an icon 686Creating screenshots 688Providing other visual assets 690Creating a Publishable File 691Differences among builds 692Creating the release build 697Running a new APK file 702Running the app in a new AAB file 703Another way to build and run an AAB file 705Publishing Your App 708The App Releases page 708The Store Listing page 710The App Signing page 711Other pages 711Leave No Stone Unturned 714Publishing Elsewhere 714The Amazon Appstore 714Other venues 715CHAPTER 2: MONETIZING AND MARKETING YOUR APP 717Choosing a Revenue Model 718Charging for your app 719Offering an extended free trial 723Freemium apps 724Selling things with your app 726Subscription pricing 729Earning revenue from advertising 729Variations on in-app advertising 731Donationware 732Offering your app for free 732Getting paid to develop apps for others 732Marketing Your Application 733Brick Breaker Master: An App Marketing Case Study 734CHAPTER 3: CREATING PUBLIC SUPPORT FOR YOUR APP 739Obtaining Support through Patreon 740Discovering that patronage isn’t new 740Considering crowdfunding 741Defining why you should use crowdfunding 741Understanding the development angle 742Determining the trade-offs 744Developing Your Own Distribution Stream 744Creating podcasts 744Developing YouTube videos 746Employing social media 748Answering questions 750Taking the Personal Approach 750Creating a blog 751Answering your email 752Considering App Store Alternatives 754Getting Awards 756Looking for awards in all the right places 757Strutting your stuff 757Index 759