It broke the world record by 0.74 seconds and realized automatic minesweeping with Python

Automatic minesweeping is realized with Python+OpenCV, breaking the world record. Let's take a look at the effect first. Intermediate - 0.74 seconds 3BV/S=60.81 I believe many people have known for a long time that there is such a classic game (graphics card test) play (software) as mine sweeping, and many people have heard of China's Lei S ...

Added by gwizz on Tue, 15 Feb 2022 04:57:11 +0200

Usage of Java foreach statement

Usage of Java foreach statement foreach loop statement is one of the new features of Java 1.5. foreach provides great convenience for developers in traversing arrays and collections. foreach loop statement is a special simplified version of for statement, which is mainly used to execute the loop of traversal function. The syntax format of for ...

Added by Spud_Nic on Tue, 15 Feb 2022 03:51:44 +0200

Concurrent class programming - countdownlatch

1. Overview CountDownLatch is a synchronizer tool class, which is used to coordinate the synchronization between multiple threads. It can make a thread continue to execute after waiting for other threads to complete their work. It cannot be reset. 2. Realize A counter is used for implementation. The initial value of the counter is the number ...

Added by PW on Tue, 15 Feb 2022 02:12:43 +0200

[java] source code analysis of SynchronousQueue

1. General Reprint: jdk11 source code - Analysis of SynchronousQueue source code Synchronous queue is a synchronous blocking queue. Each put operation must wait for a take operation. Each take operation must also wait for a put operation. SynchronousQueue has no capacity and cannot store element node information. It cannot obtain elements ...

Added by tmswenson on Mon, 14 Feb 2022 17:04:16 +0200

Java Memory Model for Java Concurrent Programming

1. Java Memory Model JMM is the Java Memory Model, which defines the abstract concepts of main memory and working memory from the Java level. The bottom layer corresponds to CPU register, cache, hardware memory, CPU instruction optimization, etc. JMM is reflected in the following aspects: Atomicity - ensures that instructions are not affe ...

Added by Alkimuz on Mon, 14 Feb 2022 16:59:16 +0200

Node.js data Stream (Stream interface)

1 Overview Data reading and writing can be regarded as a special case of Event mode. The continuously sent data blocks are like events. Reading data is a read Event, writing data is a write Event, and data block is the information attached to the Event. Node provides a special interface Stream for such situations. stream is a way of handl ...

Added by leon_zilber on Mon, 14 Feb 2022 16:03:28 +0200

Ten minutes to take you in-depth understanding of multithreading, multithreading lock optimization

1, Some suggestions for improving lock performance Lock competition will inevitably lead to the decline of the overall performance of the program. In order to minimize this side effect, here are some suggestions on using locks, hoping to help you write programs with higher performance. 1. Reduce lock holding time For applications that use lo ...

Added by MiniMonty on Mon, 14 Feb 2022 14:27:52 +0200

Faker: a wonderful Python tool library

In today's big data era, the value of data can be imagined. Sometimes in order to test, we need to simulate the real environment, but we can't directly use the real data, so we need to make some data. Compared with Excel, I still think Python makes such "virtual" data more time-saving and labor-saving. [note] submit the technical ex ...

Added by MAXIEDECIMAL on Mon, 14 Feb 2022 13:38:48 +0200

golang treasure house recommendation

1. Write at the beginning When I was coding last year, I found two easy-to-use libraries and recorded them here for reuse later. At the same time, it is also convenient for those who have needs in this regard. Library of golang map to structure - https://github.com/mitchellh/mapstructure golang json verification Library - https://github ...

Added by mizkit73 on Mon, 14 Feb 2022 12:29:06 +0200

In depth interpretation of Pytest official documents (26) custom Pytest assertion error information

catalogue Default error messageRewrite the error message of pytest assertionRewrite common assertion error messages text For example, write the following test cases def test_01(): assert 1==1 def test_02(): assert 1==2 def test_03(): assert "1"==1 The results are as follows: $ pytest ============================== test se ...

Added by HuggieBear on Mon, 14 Feb 2022 10:13:42 +0200