Multi-threaded and multi-process detail

I. Threads What is a thread? The basic unit of CPU scheduling and allocation. When the current thread CPU time slice is exhausted, it will cause the next operating system scheduling, such as CPU, to execute when it is its turn.The operating system does not allocate memory for threads, but groups of ...

Posted by sgarcia on Sun, 16 Feb 2020 17:43:28 -0800

Automatic creation of pv for K8S data persistence

1. Types of data persistence:1.emptyDir: Can only be used as temporary storage.If the container is deleted, the data still exists, and if the Pod is deleted, the data is deleted.2.HostPath: Less scenarios increase the coupling between Pod and nodes.3.PV, PVC: based on NFS services.The PV state must be Available, the access mode must be the sam ...

Posted by rdoylelmt on Sun, 16 Feb 2020 15:26:03 -0800

The concept and common operation of binary search tree

What is a binary search tree? We divide the general search operations into two categories: static search and dynamic search. There is a fast searching method in static searching (the time complexity of binary searching is O (log (n)). The reason why it can reduce the time complexity is that it sorts t ...

Posted by nanobots on Sat, 15 Feb 2020 23:21:03 -0800

Dijkstra of the shortest path of graph -- pseudo code, complete implementation code (adjacency matrix, adjacency table), examples and problem points

1 Dijkstra (single source shortest path problem) 1.1 minimum distance 1.1.1 pseudo code //Figure G is generally set as a global variable; Array d is the shortest path length from the source point to each point, and s is the starting point Dijkstra(G, d[], s){ Initialization for (n cycles) ...

Posted by tisa on Sat, 15 Feb 2020 19:36:13 -0800

ACM week 3

When the trees are withered, they are no longer flourishing. They are young and cherish the people beside the mirror This week's question is a little difficult, I adjusted several of them to do it; 1 Define a 2D array: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, ...

Posted by Merdok on Sat, 15 Feb 2020 18:23:21 -0800

Thread eight basic core seven (exception handling)

1. Introduction There are eight basic cores in java multithreaded concurrent programming. What are the eight core foundations?They are: 1. How threads are created 2. Thread Start 3. Thread Stop 4. Thread life cycle 5. Thread-related methods 6. Thread-related properties 7. Thread exception handling 8. Thread Security Today w ...

Posted by PHPThorsten on Sat, 15 Feb 2020 18:02:23 -0800

JS regular expression creation, matching string, escape, character class, repetition and common characters

Regular expressions operate on strings Function: search, replace and validate data   There are two ways to create regular expressions: // Literal measure /js/ // Constructor method regular expression new RegExp() Common characters: alphanumeric characters blank;, @ (no special meaning symbol)   Two ways to match: test, find and return true ...

Posted by Invincible on Sat, 15 Feb 2020 05:59:10 -0800

DL based on Python Day2 multi-layer perceptron

1. Text preprocessing Text is a kind of sequence data. An article can be regarded as a sequence of characters or words. Text preprocessing usually includes four steps: 1. Read in text 2. participle 3. Establish a dictionary to map each word to a unique index 4. Transform the text from the sequence of ...

Posted by X74SY on Fri, 14 Feb 2020 06:30:27 -0800

[notes] P1330 block sunshine University

Easy to read: for two points \ (u,v \), only one point can block this edge. What do you mean? If the points on this graph are colored, then for the above two points \ (u,v \), \ (u,v \) must be different colors (it is important to understand this point). So, that is to say, in this picture, if we want to "completely block" this pictur ...

Posted by Residue on Fri, 14 Feb 2020 06:20:14 -0800

Hands on in-depth learning PyTorch version - Task02 learning notes

Text preprocessing Text is a kind of sequential data. An article can be regarded as a sequence of characters or wordsPretreatment usually consists of four steps: Read in text English novels: Taking English novel as an example to show the steps of text preprocessing import collections import re def ...

Posted by miksel on Fri, 14 Feb 2020 05:22:13 -0800