Java multithreading - ReentrantReadWriteLock

1. Introduction to read-write lock There is such a scenario in reality: there are read and write operations on shared resources, and write operations are not as frequent as read operations. When there is no write operation, there is no problem for multiple threads to read a resource at the same tim ...

Posted by underparnv on Sun, 23 Feb 2020 03:04:35 -0800

Learning notes of memcpy source code under glibc

I've always heard that memcpy has memory overlap. I want to see why it has this problem? glib version 2.15 #include <string.h> #include <memcopy.h> #include <pagecopy.h> #undef memcpy void * memcpy (dstpp, srcpp, len) void *dstpp; const void *srcpp; size_t len; { u ...

Posted by AE117 on Sat, 22 Feb 2020 22:27:57 -0800

Pool technology -- custom thread pool

Catalog Pool technology -- custom thread pool 1. Why use thread pools? 1.1 characteristics of pool technology: 1.2 benefits of thread pool: 1.3 how to customize a thread pool 2. Three methods 2.1. Thread pool method of single thread 2.2. Fixed thread pool size method 2.3 me ...

Posted by Justin98TransAm on Sat, 22 Feb 2020 19:42:40 -0800

python3-cookbook notes: Chapter VI Data Encoding and Processing

Each section in the python3-cookbook explores the best solution of Python 3 to a given problem in three parts: problem, solution, and discussion, or how Python 3's own data structure, functions, classes, and so on, can be better used in a given problem.This book is very helpful for understanding Python 3 and improving Python programming capabil ...

Posted by Slashscape on Sat, 22 Feb 2020 08:48:46 -0800

Data structure string (explain KMP algorithm in detail)

1. Definition of string: A finite sequence of zero or more characters, also known as a string Empty string without characters A string with only spaces is called a space string 2. Abstract data type of string: ADT String ( string) Data //The element of a string consists of only one character, and the ...

Posted by seavolvox on Sat, 22 Feb 2020 04:56:51 -0800

RabbitMQ from entry to Mastery Series: details of work queues

(1) RabbitMQ work queue model structure The work queue model increases the number of consumers compared to simple queues. The producer provides the message to the message queue, and the consumer can get the message in the queue. By default, polling distribution is used to distribute messages t ...

Posted by neveriwas on Fri, 21 Feb 2020 05:52:43 -0800

Java language introduction ๐ž“œ 02 | object oriented and common class ๐ž“œ day10 | interface, polymorphic

Chapter I interface 1.1 Interface Overview and life examples Interface is a common standard As long as it conforms to the standard, it can be used by all 1.2 basic format of interface definition Interface is a kind of reference data type, and the most important content is abstract method. D ...

Posted by nikes90 on Fri, 21 Feb 2020 04:08:02 -0800

Breakthrough CRUD universal tree tool class encapsulation

0. You may be able to gain after learning this article Experience the process of gradual optimization and perfection of a tree tool from the beginning Design and implementation of tree tool package Finally, we get a ready to use tree tool source code Students who have some knowledge and use of the front-end tree components can dir ...

Posted by ale8oneboy on Fri, 21 Feb 2020 02:26:49 -0800

VTK? Learning? Image smoothing? Mean filter? Gaussian filter? Median filter? Anisotropic filter

1. Mean filtering Mean filtering is a kind of smoothing method which is often used. The value of each pixel of the corresponding template is 1. stay VTK There is no class to implement mean filtering directly, but we can do it by image convolution. Convolution operation passes vtkImageConvolve Class ...

Posted by blueman on Fri, 21 Feb 2020 02:14:08 -0800

netty learning note 14 - TCP packet sticking and unpacking

Basic introduction of TCP packet sticking and unpacking TCP is connection oriented, flow oriented, and provides high reliability services. There should be one-to-one comparison of socket s on both sides of the transceiver (client and server). Therefore, in order to send multiple packets to the server ...

Posted by ProblemHelpPlease on Fri, 21 Feb 2020 00:06:39 -0800