java collection [13] - a wave of Stack source code analysis

preface Collection source code analysis series: Java collection source code analysis The vector, ArrayList and LinkedList have been analyzed. I wanted to start Map, but I looked at the following interface design framework diagram: the whole interface framework relationship is as follows (from Baidu Encyclopedia): It turns out that there is ...

Posted by bb_xpress on Mon, 10 Jan 2022 01:56:53 +0100

C + + class composition (Chapter 4)

catalogue Combination of classes Concept of combination Constructor design of class composition Initialization order when constructing composite class objects Class assembler example Example 4-4: combination of Line class and Line class Forward reference declaration Forward reference declaration considerations Combination of classes ...

Posted by NTGr on Sun, 09 Jan 2022 23:09:47 +0100

String class and StringBuffer class

String class and StringBuffer class Initialization of String class Directly initialize a String object with a String constant String variable name = string; When initializing a string constant object, you can either set the initial value of the string object to null or initialize it to a specific string String str1 = null; //Ini ...

Posted by MaTT on Sun, 09 Jan 2022 22:34:26 +0100

Strong reference, soft reference, weak reference, false reference (strong weak weak)

Java has introduced four references since version 1.2, and the four references range from high to low: Strong Reference>Soft Reference>Weak Reference>Virtual Reference 1. Strong References (Never Recycle) If an object has a strong reference, the garbage collector will never recycle it. When there is insufficient memory space, th ...

Posted by gazfocus on Sun, 09 Jan 2022 18:28:55 +0100

[introduction to Python tutorial] detailed explanation of Python function definition and parameter transfer methods (4 kinds)

This article mainly introduces the detailed explanation of Python function definition and parameter transmission methods (4 kinds). The example code in this article is very detailed, which has certain reference and learning value for everyone's study or work. Friends in need, let's learn together with Xiaobian 1, Elementary knowledge of functi ...

Posted by Urbley on Sun, 09 Jan 2022 17:42:56 +0100

Python semaphores, condition variables, events

Semaphores, in other words, control the number of concurrent threads, which is the number of concurrent threads in turn See the example: import threading # Import module import time # Import module class Exam(threading.Thread): # Create class def __init__(self, num): # initialization super(Exam, self).__init__() # Parent cl ...

Posted by elabuwa on Sun, 09 Jan 2022 17:33:50 +0100

Flash get post request parameters

Flash get post request parameters Today, let's continue to talk about how to obtain post request parameters using flash web application. summary There are several ways for post requests. The content type entity header is used to indicate the MIME type of the resource media type . Content type is the field of http request header. As a r ...

Posted by tomm098 on Sun, 09 Jan 2022 13:30:28 +0100

Unit 2 learn the maximum value problem and related variable rate of calculus with python

The content of this article comes from learning MIT open course: univariate calculus - correlation rate - Netease open course 1, Examples of best value problems 1. Cut a line with a length of 1 into 2 segments, circle each segment into a square, and find the maximum area that can be obtained , Calculate both ends: Therefore, when t ...

Posted by yasir_memon on Sun, 09 Jan 2022 12:25:35 +0100

Java common classes (entry level)

1. String class: 1) String/StringBuffer/StringBuilder are three classes that represent strings. 2) String: immutable String. The bottom layer is implemented with char [] decorated with final, and the length cannot be changed. 3) all methods of StringBuffer are decorated with synchronized, so it is thread safe, and StringBuffer is non thread sa ...

Posted by doofystyle on Sun, 09 Jan 2022 08:06:29 +0100

java Concurrent Programming -- the practice of fair and unfair locking

preface stay java Concurrent Programming (16) -- seven categories and characteristics of locks In this paper, we classify locks into various dimensions, one of which is fair / unfair. In this paper, we discuss fair and unfair locks. Fair | unfair First, let's look at what are fair locks and unfair locks. Fair locks refer to allocating locks ...

Posted by girishn on Sun, 09 Jan 2022 07:03:58 +0100