Smaphor (Signal) Realization of Current Limiter

Semaphore semaphore The semaphore was used before the pipeline was put forward. Semaphore model One counter, one waiting queue, three methods. Counters and waiting queues are transparent to the outside world, so they can only be accessed through three methods provided by the semaphore model: init (), down (), up (). init(): Sets the initial v ...

Added by pt4siek on Sat, 05 Oct 2019 20:49:41 +0300

luogu P1135 strange elevator

https://www.luogu.org/problem/P1135 Title Description Well, one day I had a dream and dreamed of a strange elevator. The elevator can be stopped on each floor of the building, and there is a number Ki(0 less than Ki = N) K_i (0 \le K_i \le N) on the I floor (1 I) or N (0). The elevator has only four b ...

Added by tdelobe on Fri, 04 Oct 2019 19:45:18 +0300

scala partial applied function and partial function

Article directory Part of Application Functions 2. Partial function Part of Application Functions Partial application function: It means that a function has N parameters, and we provide less than N parameters for it, then we get a partial application function. def sum(a:Int,b:Int,c:Int) = a + b ...

Added by fleabay on Fri, 04 Oct 2019 09:19:21 +0300

Oracle basic knowledge accumulation-oracle for recycling

Scene: Basic Knowledge Query Motivation: Pure basic knowledge is accumulated to facilitate follow-up inquiries. In many occasions, people in charge are talking about going to IOE. Therefore, inevitably, the use of occasions will be more or less reduced, so according to the customary thinking record. ...

Added by Randomizer on Fri, 04 Oct 2019 06:38:06 +0300

Automatic Ajax asynchronous request data and crawler crawler

Automatic Ajax asynchronous request data and video crawler crawler # Close to the bottom of the development, framework development # scrapy framework # The hard parts of crawling are written in sugar-flipped JS (complex but inefficient), subsequent cookie s, web addresses to scrapy # or urllib, because ...

Added by russ8 on Thu, 03 Oct 2019 14:10:20 +0300

Exercises on the Basis of MySQL

subject There are three forms for classes, students and grades: Note: Table name and field name can refer to the word settings in the table. According to the table information, complete the following SQL statements as required: 1. Use SQL to create the table structure of class table, student table and achievement table. The data in the ta ...

Added by willl on Thu, 03 Oct 2019 13:45:43 +0300

Containers (collections) in Java

1. Common Java containers: List, Set, Map List: The Collection interface (public interface List < E > extends Collection < E >) is inherited, orderly and allows duplicate values. Set: The Collection interface (public interface Set < E > extends Collection < E >) is inherited, which is disorderly and does not all ...

Added by Spudgun on Thu, 03 Oct 2019 11:31:49 +0300

Go Language Foundation - Goroutine - Thread Security in Shared Memory

Goroutines are lighter threads Threads are more efficient than in Java Co operative grammar go func() { //... }() Once the code in the main goroutine is executed, the current Go program will be terminated, regardless of whether other goroutines are already running. Let the master goroutine wait for other goroutines: for i := 0; i < 10; i+ ...

Added by andriy on Thu, 03 Oct 2019 05:43:28 +0300

Monotone stack problem solving

Monotone stack problem solving 1. Monotone stack structure Niu Ke link Method: Monotone stack algorithm Maintaining a monotonic incremental stack, you can find elements smaller than the current element Convention: Current element cur, top of stack, tempTop of stack Traversing array If the current ...

Added by Aptana on Thu, 03 Oct 2019 00:47:21 +0300

Two Small Cases of Vue's Initial Experience

Two small cases for loop in Vue We want to achieve a function like this: The text in an array is traversed and a corresponding number of li tags are created. Then, the text is assigned to the li tag: Native JS imperative writing: <!DOCTYPE html> <html> <head> <meta charset="utf ...

Added by tomwhalen on Wed, 02 Oct 2019 23:09:22 +0300