Summary of java multithreaded producer consumer model
catalogue
Introduction to producer consumer model
wait,notify scheme
Implementation of ReentrantLock
Implementation of blocking queue
Semaphore implementation
Lockless caching framework: Disruptor
Note: This article refers to [Java summary] producer consumer model_ zhujohnle's column - CSDN blog
Java implementation of producer consumer ...
Posted by sandingmachine on Thu, 17 Feb 2022 17:14:20 +0100
Flink keying state AggregatingState development example
1, Keying status description
Referring to the description on the official website, several keying states are introduced as follows:
ValueState: save a value that can be updated and retrieved (as mentioned above, each value corresponds to the key of the current input data, so each key received by the operator may correspond to a value). This v ...
Posted by kumar_ldh on Thu, 17 Feb 2022 17:11:52 +0100
In depth understanding of String
preface
*** reference material: Deep understanding of String in Java
1, Analysis of the underlying source code of String class
Let's take a look at the source code of the String class:
public final class String implements java.io.Serializable, Comparable<String>, CharSequence {
/** The value is used for character storage ...
Posted by firecircle on Thu, 17 Feb 2022 17:12:36 +0100
Zero basic python programming thinking | string, text and list
Last Zero basics python programming thinking (I) | mathematical operation A small tail is left, that is, logical operation, which is supplemented and updated here first:
4: Logical operation
a = 10
b = 20
if (a and b): #Boolean and: returns the value of a if a is False, otherwise returns the calculated value of b
print("variable a an ...
Posted by ringartdesign on Thu, 17 Feb 2022 17:05:52 +0100
Implementation of rain algorithm
Implementation of one-dimensional rain algorithm
https://leetcode-cn.com/problems/trapping-rain-water/
def trap_rain_water(height):
# Idea: whether a grid can receive rainwater and how much rainwater it can receive are determined by the highest "wall" on both sides
# Traverse each grid from the second position to the pen ...
Posted by danoli3 on Thu, 17 Feb 2022 17:00:08 +0100
Loop nesting and extension of shell (function)
1, Random number
1. Practical cases:
Write a script to generate a phoneNum Txt file, randomly generate 100 mobile phone numbers starting with 139, one line for each
analysis
Generate 100 phone numbers, and the script needs to cycle 100 times139 + 8 bits, the last 8 bits are generated randomly, which can generate every d ...
Posted by astronaut on Thu, 17 Feb 2022 17:00:20 +0100
***A ThreadLocal fights the interviewer for 30 rounds
start
A battle between job seekers and interviewers is taking place in a business building in Hangzhou.
Interviewer: introduce yourself first.
Angela: Hello, interviewer. I'm the three bitches in the grass, the strongest single (Daji refuses to accept), the grass motorcycle driver, the promoter of the 21st set of radio gymnastics and the suc ...
Posted by mgm_03 on Thu, 17 Feb 2022 16:56:48 +0100
Construction of enterprise dns server
I Explanation of dns terms
dns: Domain name service
About client: (172.25.254.201) /etc/resolv.conf ##dns points to the file nameserver 172.25.254.101
Test:
host www.baidu.com Address resolution command
dig www.baidu.com Address detail resolution command
A record ip The address is called domain name Addres ...
Posted by trevorturtle on Thu, 17 Feb 2022 16:51:07 +0100
Vue3+Ts Episode 1
The first installment introduces the configuration of development tools
introduce
TypeScript introduction 1 TypeScript is an open source programming language developed by Microsoft. 2. TypeScript is a superset of JavaScript and follows the latest ES6 and Es5 specifications. TypeScript extends the syntax of JavaScript. 3. TypeScript is mor ...
Posted by dnice on Thu, 17 Feb 2022 16:51:07 +0100
Implementation and analysis of DPCM compression system
Implementation and analysis of DPCM compression system
I Experimental purpose
Master the basic principle of DPCM codec system. Preliminarily master the experiment, program the DPCM encoder with C/C++/Python and other languages, and analyze its compression efficiency.
II Experimental content
DPCM is the abbreviation of differential predicti ...
Posted by dcalladi on Thu, 17 Feb 2022 16:47:21 +0100