Introduction to dynamic memory functions (malloc, free, calloc, realloc)
Some recent knowledge is shared ~ as follows:
Stack area usually stores: local variables, parameters, and static space.The space requested by malloc, free, calloc and realloc is usually placed in the heap.Static declarations are usually placed in static storage.
The following describes several dynamic memory functions:
1.malloc function and f ...
Added by johnc71 on Sun, 09 Jan 2022 15:11:56 +0200
Python fourth advanced training notes
Semaphore:
Semaphore is an abstract data type managed by the operating system, which is used to synchronize the use of shared resources in multiple threads. In essence, a semaphore is an internal data used to indicate how many concurrent reads can be made to the current shared resource.
In threading module Semaphore class The semaphore object ...
Added by jeff8j on Sun, 09 Jan 2022 13:50:08 +0200
Java (base) generic
1: What is generics?
(1) Why use generics?
For example, the implementation in MyArray class can only save int type data, and other types of data, such as double, String or custom type objects, cannot be stored at all. All use generics.
(2) Definition: generics can write type independent code, that is, the written code can be reused by many ...
Added by tasairis on Sun, 09 Jan 2022 13:46:55 +0200
Notes on Java core technology Volume 1: Chapter III Basic programming structure of Java
3.6.5 build string
When String is used to continuously splice strings with circular statements, because String is an immutable class, new objects are generated every time, which is inefficient; Therefore, Java provides StringBuilder and StringBuffer to solve this problem.
public class Main {
public static void main(String[] args){
...
Added by Pigmaster on Sun, 09 Jan 2022 13:40:38 +0200
Java - Collection - Map interface - collection summary
Characteristics of Map interface implementation class [very practical]
Note: This is about the Map interface features of JDK8
Map and Collection exist side by side. Used to save data with mapping relationship: Key - Value (double column element)The key and value in the Map can be data of any reference type and will be encapsulated in the ...
Added by jay_bo on Sun, 09 Jan 2022 13:15:48 +0200
[Yugong series] January 2022 Java Teaching Course 59 - multithreading
1, Multithreading
1. Simple understanding of multithreading
It refers to the technology that multiple threads execute concurrently from software or hardware. Computers with multithreading capability can execute multiple threads at the same time due to hardware support, so as to improve performance.
2. Concurrency and parallelism
Par ...
Added by tazdevil on Sun, 09 Jan 2022 11:15:15 +0200
Spring -- Essence and code example of IOC
gossip
Hahaha, I've been reading computer network books recently. I'm a little lazy when updating my blog. Continue today
Basic points
1. IOC essence
Inversion of Control (IoC) is a design principle in object-oriented programming, which can be used to reduce the coupling between computer codes.Control inversion is a way to produce or obtain ...
Added by ipruthi on Sun, 09 Jan 2022 10:25:50 +0200
Student achievement management system (C + +)
Student achievement management system
1, Design task analysis
The main purpose of this topic is to manage students' grades. You can enter scores, query scores, delete score records, and rank scores. Facilitate the unified processing of students' scores after the examination.
2, Design of the overall scheme of student achievement management s ...
Added by mvidberg on Sun, 09 Jan 2022 07:22:43 +0200
JUC foundation, it's enough to read this article
JUC Foundation
1. Tube side: monitor, monitor, lock
It ensures that only one process is active in the pipe at the same time, that is, the operations defined in the pipe are called by only one process at the same time (implemented by the compiler) However, this does not guarantee that the processes are executed in the designed order
Synchroni ...
Added by jonniejoejonson on Sun, 09 Jan 2022 06:49:02 +0200
java concurrency -- three problems of concurrent programming
1. Three problems of concurrent programming
1. Visibility issues
Visibility concept
Visibility: when one thread modifies a shared variable, the other gets the latest modified value immediately.
In practical applications, we need to ensure visibility, but there is no visibility between threads without special methods. It often happens that a ...
Added by tegwin15 on Sun, 09 Jan 2022 06:20:40 +0200