Custom types: structure, enumeration, union
1, Structure
Declaration of structure:
For example, describe a student:
struct Stu
{
char name[20];//name
int age;//Age
char sex[5];//Gender
char id[20];//Student number
};//Semicolons cannot be lost
Special statement:
//Anonymous structure type
struct
{
int a;
char b;
float c;
}x;
struct
{
int a;
char b;
float c;
}a[20 ...
Posted by interrupt on Thu, 04 Nov 2021 19:30:43 -0700
EMOS personal tutorial - Chapter 2 building back-end projects from scratch
1 Introduction to this chapter
2 create a SpringBoot project
Change application.properties to application.yml
Configure tomcat
server:
tomcat:
uri-encoding: UTF-8
threads:
max: 200
min-spare: 30
connection-timeout: 5000ms
port: 8080
servlet:
context-path: /emos-wx-api
Configure data connection pool
spr ...
Posted by devman42 on Thu, 04 Nov 2021 19:14:09 -0700
Sword finger offer array topic summary (necessary for interview)
Sword finger offer array topic summary (C + + version)
1. Duplicate number in array All numbers in an array num of length n are in the range of 0 ~ n-1. Some numbers in the array are repeated, but I don't know how many numbers are repeated, or how many times each number is repeated. Find any duplicate number in the array. Idea 1: sort first ...
Posted by j115 on Thu, 04 Nov 2021 19:06:44 -0700
Cf847e packman problem solution
Strange things
WA took two hours
Twice as fast as rk2, but the code is four times longer
Please think about how to do this problem with dp
meaning of the title
Now there is a section where people and objects are on top of it, and sometimes there is space. People can move up left and right. Find the minimum of the maximum distance of peopl ...
Posted by desenhistas on Thu, 04 Nov 2021 19:03:14 -0700
Advanced C language pointer
catalogue
Character pointer
Pointer array
Array pointer
Function pointer
Function pointer array
Pointer to array of function pointers
Callback function
Character pointer
Character pointer: char*
int main()
{
char ch = 'w';
char * pc = &ch;//pc is a variable that points to a character
const char* p = "hello bit";//"hell ...
Posted by jasonc310771 on Thu, 04 Nov 2021 18:59:47 -0700
Maven build project, how to build Java and Web projects in IDEA and how to run
3. Construction of Maven project
3.1 contents of Maven project
The structure of the project is as follows:
See the following figure for details:
3.2 commands for manually building projects
mvn compile #compile
mvn clean #eliminate
mvn test #test
mvn package #pack
mvn install #Install to local warehouse
Just be familiar ...
Posted by tina88 on Thu, 04 Nov 2021 18:47:40 -0700
[suggestions collection] how many 32+ vue modifiers do you master?
prefacevue is simple and easy to use, which is reflected in many places. For example, it has a built-in 32 + modifier, which can be very convenient for us to prevent bubbles, prevent default events, mouse event processing, system keyboard events, etc., so that we can quickly handle business. It's not too convenient!!!After 15 minutes, you can g ...
Posted by shrive22 on Thu, 04 Nov 2021 18:44:23 -0700
Scala express syntax | data structure
Scala express syntax (11) | data structure
map mapping function
The map function returns a new collection
Pass the elements of the collection through the functions in ()
//Create list
val list = List(1, 2, 3, 4, 5)
//Each element * 2
println(list.map(_ * 2))
flatmap mapping: flat is flattening, flattening and flattening mapping
flat ...
Posted by nashyboy on Thu, 04 Nov 2021 18:23:12 -0700
python database uses pandas, sqlalchemy and Table
The theme of this time is to store data in CSV (or other) file format into MySQL database, and the table structure primary key should be established. Including the processing of date format. Although it's very simple, there are many details and a wide range of knowledge, so write it down.
Three tables, as follows articles: issues: sales:
i ...
Posted by brendan2b on Thu, 04 Nov 2021 18:11:09 -0700
Summary of JUC multithreaded programming
Summary of JUC multithreaded programming
JUC: use of java.util.concurrent multithreading Toolkit
Test demo:https://gitee.com/aqq/mytest.git
1. Daemon thread
There are two kinds of threads in java: user thread and daemon thread
Only if the user thread in the current JVM does not end, the daemon thread will work. Only when the last user thre ...
Posted by iimrii on Thu, 04 Nov 2021 18:07:21 -0700