c language realizes the function of adding, deleting, modifying and checking the address book, and can sort the contacts
The idea of realizing address book is as follows:
1. When the program runs, the user should first see the Menu bar options and make a choice corresponding to the options given in the Menu bar. Here, we simply design a Menu() function to let the user see the optional items;
2. The user's optional range should be 1 ~ 7. In order to avoid th ...
Posted by StickeR on Wed, 26 Jan 2022 03:51:13 +0100
Why is ConcurrentHashMap thread safe?
ConcurrentHashMap is a multi-threaded version of HashMap. HashMap will have various problems during concurrent operation, such as dead circulation, data coverage and so on. These problems can be perfectly solved by using ConcurrentHashMap. Here's the problem. How does ConcurrentHashMap ensure thread safety? How is its bottom layer realized? Nex ...
Posted by kevinkorb on Wed, 26 Jan 2022 00:05:13 +0100
Java foundation 05 method
Java foundation 05 method
A Java method is a collection of statements that together perform a function.
Method is an ordered combination of steps to solve a class of problemsMethod is contained in a class or objectMethods are created in the program and referenced elsewherePrinciple of design method: the original intention of method is fun ...
Posted by mysoogal on Tue, 25 Jan 2022 23:53:06 +0100
Generics in Java
The following are my notes on watching the Java learning video of shangsilicon valley
Why generics
Generic can be understood as a tag, which is jdk5 0 new features Analogy: there are labels on the outside of each drawer in a traditional Chinese medicine store, and only the drugs represented by the labels can be stored in the drawer. We can ...
Posted by KingIsulgard on Tue, 25 Jan 2022 23:04:05 +0100
Using C language to realize the of small games -- [mine sweeping]
Use C language to realize a simple minesweeping game!
[game requirements]
[mine sweeping game]:
Layout Thunder - 10Minesweeping: enter coordinates
It was thunder - > killed! game over!
Not Thunder - > tell you how many thunder there are on the eight coordinates around this coordinate.
Until all the non mine positions are found ...
Posted by babybird11 on Tue, 25 Jan 2022 20:13:49 +0100
6 Java exceptions try catch, try catch finally, try finally and throws declaration and throw throw throw
abnormal
1. What is an exception?
Broadly speaking, exception refers to all abnormal conditions, including Error Exception In java, abnormal conditions are divided into:
Error: refers to problems that cannot be solved by the program, such as insufficient memory, heap overflow and JVM crash
Exception (narrow sense): for example: stack ov ...
Posted by virtualdevl on Tue, 25 Jan 2022 19:33:57 +0100
C + + learning record 2 -- classes and objects
1, Classes and objects
1. Class and object concepts
Everything is an object with attributes and methods. Objects with the same properties and methods (the same properties) can be abstracted as classes.
Properties and objects in a class are collectively referred to as members Attributes are also called member attributes, and member variab ...
Posted by jacobsdad on Tue, 25 Jan 2022 18:17:01 +0100
python notes: tslearn (data part)
tslearn is a Python package that provides machine learning tools for analyzing time series. This package builds on (and therefore relies on) the scikit learn, numpy, and scipy libraries.
1 time series data format
Use to_time_series function to generate time series data
from tslearn.utils import to_time_series
time_series_lst=[1,3,5,7,9]
ti ...
Posted by erth on Tue, 25 Jan 2022 17:53:26 +0100
Talk about java annotations
The essence of annotation
When talking about the essence of annotation, the simplest way is to decompile. See the essence. The code is as follows:
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface Foo{
String[] value();
boolean bar();
}
Use the ...
Posted by aldernon on Tue, 25 Jan 2022 16:58:51 +0100
Dynamic memory management
catalogue
1. Why does dynamic memory management exist
2. Introduction to dynamic memory function
2.1 malloc
2.2 calloc
2.3 realloc
3 common errors in dynamic memory allocation i
3.1 dereference of NULL pointer
3.2 cross border access to dynamic development space
3.3 free release for non dynamic development memory
3.4} use free to r ...
Posted by zzlong on Tue, 25 Jan 2022 16:48:12 +0100