Programming Notes ✍️ – Telegram
Programming Notes ✍️
12 subscribers
65 photos
1 file
22 links
Download Telegram
API Gateway
SSL Termination proxy

For all incoming HTTPS connections, the load balancer service ends the SSL connection and establishes a plain text HTTP communication with the back-end server. CPU-intensive SSL handshakes and encryption or decryption tasks are shifted away from the back-end servers, allowing them to use all their CPU cycles for processing application traffic.
Linear Data Structures:

Array: A collection of elements of the same type stored in contiguous memory locations.

Linked List: A collection of elements linked together by pointers, allowing for dynamic insertion and deletion.

Queue: A First-In-First-Out (FIFO) structure where elements are added at the end and removed from the beginning.

Stack: A Last-In-First-Out (LIFO) structure where elements are added and removed from the top.

Non-Linear Data Structures:

Tree: A hierarchical structure where each node can have multiple child nodes.

Graph: A collection of nodes connected by edges, representing relationships between data elements.

Hash Table: A data structure that uses a hash function to map keys to values, allowing for fast lookup and insertion.


Applications of Data Structures
Data structures are widely used in various applications, including:

Database Management Systems: To store and manage large amounts of structured data.
Operating Systems: To manage memory, processes, and files.
Compiler Design: To represent source code and intermediate code.
Artificial Intelligence: To represent knowledge and perform reasoning.
Graphics and Multimedia: To store and process images, videos, and audio data.
Observers and events do not do the same thing at all.

An observer watches for specific things that happen within eloquent such as saving, saved, deleting, deleted (there are more but you should get the point). Observers are specifically bound to a model.

Events:

Events are actions that are driven by whatever the programmer wants. If you want to fire an event when somebody loads a page, you can do that. Unlike observers events can also be queue, and ran via laravels cron heartbeat. Events are programmer defined effectively. They give you the ability to handle actions that you would not want a user to wait for (excxample being the purchase of a pod cast)
Manifestation.
Integration.
Single Point of Failure

Just Running the system.
np-manager
np-executer
Running One-Time Scripts: Use npx for executing packages that you don't want to install globally, like testing a new package or tool.

Quick Prototyping: Leverage npx to quickly test libraries and tools without cluttering your global installation with unused packages.
During the installation process, Yarn installs multiple packages at once as contrasted to npm that installs each one at a time. Reinstallation was also pretty fast when using Yarn. It's because of its offline mode feature that uses a caching mechanism to allow for fast download of previously downloaded packages.
struct pnpm

{
"name": "package-manager-playground",
"version": "1.0.0",
"packageManager": "pnpm@6.24.4",
"pnpm": {
"packageExtensions": {
"styled-components": {
"dependencies": {
"react-is": "*"
}
},
"autoprefixer": {
"dependencies": {
"postcss": "*"
}
}
}
},
// ...
}
To increase the capacity of a slice one must create a new, larger slice and copy the contents of the original slice into it. This technique is how dynamic array implementations from other languages work behind the scenes.
func copy(dst, src []T) int
The looping piece of this common operation is made easier by the built-in copy function. As the name suggests, copy copies data from a source slice to a destination slice. It returns the number of elements copied.
t := make([]byte, len(s), (cap(s)+1)*2)
copy(t, s)
s = t