更新时间:2021-06-30 19:12:51
coverpage
Title Page
PacktPub.com
Why subscribe?
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Building Stacks for Application State Management
Prerequisites
Terminology
API
Don't we have arrays for this?
Creating a stack
Implementing stack methods
Testing the stack
Using the stack
Use cases
Creating an Angular application
Installing Angular CLI
Creating an app using the CLI
Creating a custom back button for a web application
Setting up the application and its routing
Detecting application state changes
Laying out the UI
Navigating between states
Final application logic
Building part of a basic JavaScript syntax parser and evaluator
Building a basic web worker
Basic web worker communication
Enabling web worker communications
Transforming input to machine-understandable expression
Converting infix to postfix expressions
Evaluating postfix expressions
Summary
Creating Queues for In-Order Executions
Types of queue
Implementing APIs
Creating a queue
A simple queue
Testing the queue
Priority Queue
Testing a priority queue
Use cases for queues
Creating a Node.js application
Starting the Node.js server
Creating a chat endpoint
Implementing logging using priority queues
Comparing performance
Running benchmark tests
Using Sets and Maps for Faster Applications
Exploring the origin of sets and maps
Analyzing set and map types
How weak is WeakMap?
Memory management
API differences
Sets versus WeakSets
Understanding WeakSets
The API difference
Creating custom keyboard shortcuts for your application
Creating states with keymap
Activity tracking and analytics for web applications
Creating the Angular application
Performance comparison
Sets and Arrays
Maps and Objects
Using Trees for Faster Lookup and Modifications
Creating a typeahead lookup
Creating a trie tree
Implementing the add() method
The friends' example
Implementing the search() method
Retaining remainders at nodes
The final form
Creating a credit card approval predictor
ID3 algorithm
Calculating target entropy
Calculating branch entropy
The final information gain per branch
Coding the ID3 algorithm
Generating training dataset
Generating the decision tree