network-dns

怎样学习一个新的东西,也可以按照一定的套路的。这个东西解决什么问题?这个东西怎样解决问题? 还有没有其他方法? 三步走分析一下 DNS 解决什么问题 根据

algorithm-quick-sort

quick sort C 代码 #include <stdio.h> int partition(int* array, int startIndex, int endIndex){ int left = startIndex; int right = endIndex; int pivot = array[startIndex]; int temp = 0; // 第一个 while 循环,其实就是从两个方向遍历一次数组,根据 pivot 进行分割。 while (left != right) { // 第二

algorithm-merge-sort

merge sort merge sort C code #include <stdio.h> void merge(int* array, int start, int mid, int end){ // start = 0 // mid = 3 // end = 7 int tempArrayLength = end - start + 1; // 8 int tempArray[tempArrayLength]; // tempArray[8] int p1 = start; // 0 int p2 = mid + 1; // 4 int p = 0; // 比较两个小集合,

three-easy-pieces-4-process

我们知道一个计算机 CPU 数量有限, 但是却可以同时跑数量远远多于 CPU 数量的程序. 其实这就是 virtualizing. 怎样进行 CPU 虚拟化呢? 通过抽象出 process 这个基本概念, 也就是 running program.

master-git

git init Create an empty Git repository or reinitialize an existing one 也即是向 working directory 里添加 .git 文件夹 .git/ ├── branches # git 分支 ├── config # git 配置 ├── description ├── HEAD # HEAD 指针, 指向当前分支最新的 commit ├── hooks │

katacoda-what-is-a-container

Processes Containers are just normal Linux Processes with additional configuration applied. 容器只是应用了附加配置的普通 Linux 进程。 redis container lanch redis-server process Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…] docker run –help -d, –detach Run container in background and print container ID –name string Assign a name to the container docker run -d --name=db redis:alpine 在后台

tomcat-http-cookie

package javax.servlet.http; import java.io.Serializable; import java.security.AccessController; import java.security.PrivilegedAction; import java.text.MessageFormat; import java.util.BitSet; import java.util.Locale; import java.util.ResourceBundle; /** * Creates a cookie, a small amount of information sent by a servlet to a Web * browser, saved by the browser, and later sent back to the server. * 创建一个 cookie, servlet 发给浏览器的一个小信息

katacoda-what-is-a-container-image

container image A container image is a tar file containing tar files. Each of the tar file is a layer. Once all tar files have been extract into the same location then you have the container’s filesystem. container image 是一个 tar 文件. 每一个 tar 文件就是一个 layer docker pull 拉取一个镜像 docker pull redis:3.2.11-alpine 3.2.11-alpine: Pulling

bloomfilter

References bloom filter bloom filter https://coderscat.com/bloom-filter/

x86-64-architecture

操作系统其实很大一部分面向 CPU 来编程的。一些 OS 的概念直接来源于 CPU 的术语,或者和 CPU 关联性非常大。要想彻底理解 OS ,无法绕过 CPU。因为 Intel 的 X86(Intel 80386 之后