Function parameter passing, pointer, structure and review of cin and cout
Function parameter transfer
When an array is used as a function parameter, the length of the first dimension of the array in the parameter does not need to be filled in, such as
void a(int a[])
{
a[1]=1;
a[2]=2;
}
However, if it exceeds one dimension, such as a two-dimensional array, the length must be written at the beginning of the ...
Posted by deerly on Tue, 08 Feb 2022 07:16:25 +0100
QThread of Qt multithreading
In the project, a QThread object manages a thread. Generally speaking, the execution of a thread starts with the run () function. In Qt, there are two ways. The first is to inherit QThread and rewrite run() function. The second is to inherit QObject function and add time-consuming operations, and then call QObject::moveToThread() function. It i ...
Posted by deolsabh on Tue, 08 Feb 2022 04:47:49 +0100
Memory layout of C + + objects
Reprinted from CoolShell: https://coolshell.cn/articles/12176.html
Note:
1. The original text includes the experimental principle, experimental code and conclusion; This paper only contains the experimental principle and conclusion. The purpose is to simplify the experimental code.
2. This paper has made significant changes and deletions to ...
Posted by phpbeginner on Tue, 08 Feb 2022 02:01:34 +0100
Libtorch deployment model
Libtorch It is the C++ API officially provided by pytoch, and the use method can be said to restore pytoch to a great extent.
1, Environment configuration
GitHub address: BASNetVS2017+CUDA 10.1+cuDNN 7.6.5+OpenCV 3.4.11Pytorch 1.5.0+torchvision 0.6.0Libtorch 1.5.0 (release): extraction code: 865k https://pan.baidu.com/s/1Ty-UPZWEOnNRPwl ...
Posted by rpanning on Mon, 07 Feb 2022 22:19:31 +0100
Recursion (with examples)
1. What is recursion
A function call itself is recursive. Recursion usually transforms a large and complex problem into subproblems layer by layer until the subproblem can be solved without further recursion. Recursion greatly reduces the amount of code.
Generally speaking, a recursive algorithm consists of the following parts:
A termination ...
Posted by zplits on Mon, 07 Feb 2022 21:03:07 +0100
C + + implementation of anonymous shared memory
1, Ashmem C language interface
You can usually use ashmem in the libcutils library_ create_ The region function creates a shared memory area:
#define ASHMEM_DEVICE "/dev/ashmem"
/*
* ashmem_create_region - creates a new ashmem region and returns the file
* descriptor, or <0 on error
*
* `name' is an optional label to give the region (vi ...
Posted by neoboffins on Mon, 07 Feb 2022 20:51:24 +0100
[visual inspection C + + interface implementation] vs2019 uses the dynamic link library yolo_cpp_dll call yolov3
catalogue
0. Preface
1. Preparation
1.1 yolo_cpp_dll.dll and Yolo_ cpp_ dll. Acquisition of Lib
1.2 pthreadGC2.dll and pthreadvc2 DLL acquisition
1.3 yolo_ v2_ class. Acquisition of HPP
1.4. Set opencv environment variable (if it has been set, it can be ignored)
2. C reation of new C + + projects
2.1 create a new C + + project (omi ...
Posted by dbdummy on Mon, 07 Feb 2022 19:16:53 +0100
Training Resume 2.7
Question A: Gifts
Time Limit: 1.000 Sec Memory Limit: 512 MBSubmit state
Title Description
In an n × N on the grid, m gifts are placed, each with a value vi(1 < i < m), you can choose a gift, and then choose: (1) Take away all gifts listed with it, or (2) Take away all gifts that go with it What is the maximum value of the gift y ...
Posted by partypete on Mon, 07 Feb 2022 18:53:22 +0100
Analysis of High Precision Large Number Addition, Subtraction, Multiplication and Division Algorithms
High Precision Addition, Subtraction, Multiplication and Division Algorithms
What is high precision?
High Accuracy Algorithm s are mathematical computational methods for processing large numbers. In general scientific calculations, hundreds or more decimal places are often counted, of course, hundreds of billions of large numbers. Generall ...
Posted by Teck on Mon, 07 Feb 2022 18:30:16 +0100
KY4 Proxy Server
describe
The use of proxy servers can hide client information to some extent, thus protecting users'privacy on the Internet. We know the IP addresses of n proxy servers and now use them to access m servers. The IP address and access order of the M servers are also given. The system can only use one proxy server at a time and requires that it c ...
Posted by hermand on Mon, 07 Feb 2022 18:29:14 +0100