I’m used to using Linux or Mac terminals for work.
I took some time to set up the WSL environment on my home PC to easily switch work environments.
Differences between WSL 2 and WSL 1 # WSL 2 is based on Hyper-V and runs a full Linux kernel in a virtual machine.
WSL 1 is a simulation of Linux functionalities on the Windows system.
Therefore, WSL 2 supports more native Linux features and system calls than WSL 1.
Shallow Copy # Copies as little as possible.
A new structure created by a shallow copy has the same structure as the old one,
and they share the memory address of elements.
For example, in Java:
int[] arr1 = {1, 2, 3}; int[] arr2 = arr1; arr2 is a shallow copy of arr1.
If one of the structures modifies an element, the other will also be affected. Deep Copy # Copies everything.
A new structure created by a deep copy not only has the same structure as the old one,
but also copies all elements of the old structure to the new memory address.
Introduction # C++ provides various containers to store and manage data,
each with its unique characteristics and applicable scenarios.
This article will delve into five common sequence containers: array, vector, deque, list, and forward_list,
comparing their features, performance, and offering selection advice.
Array # std::array is a fixed-size array introduced in C++11,
combining the performance of C-style arrays with the interface of STL containers.
Continuing from Docker Operations Log (Part 1)
Basic Docker Usage # Deleting a Container # Remember to stop the container using stop before deleting it.
docker rm CONTAINER_NAME Or
docker rm CONTAINER_ID After deletion, you can use
docker ps -a to confirm if the container has disappeared.
When designing systems with higher traffic, you will eventually encounter cluster-related issues.
Cluster # A collection of one or more machines (nodes) with three different purposes:
Load Balancing # Allows multiple machines to share tasks as evenly as possible, accelerating application execution.
High Availability (HA) # For high availability and redundancy, if one machine suddenly fails, others can take over.
Each DNS zone in a DNS server has a zone file.
A DNS zone is usually a single domain (though not always).
A zone file is composed of many DNS resource records (RRs).
There are many different types of RRs.
Let’s record some common ones.
A record # Maps a hostname to an IPv4 address. (32-bit)
hostname IN A xxx.xxx.xxx.xxx