[design pattern] - Abstract Factory pattern
Abstract factory
The object creation mode bypasses new to avoid the tight coupling caused by the object creation (new needs to rely on specific classes), so as to support the stability of object creation. It is the first step after abstracting the interface
motivation
It mainly solves a series of "interdependent objects". The F ...
Added by dannyd on Sun, 19 Dec 2021 15:52:33 +0200
Byte 8.29 written test replay (in question recall)
Byte 8.29 written test replay (in question recall)
Question 1 natural numbers a and b
Simple topic meaning
Give the number a and B, and then give a number + 1 in the first round, a number + 2 in the second round, and a number + i in the i round. You can choose which number to add in each round. Ask you to become the same minimum number of ro ...
Added by gwolff2005 on Sun, 19 Dec 2021 15:49:49 +0200
[Cherno C + + Notes P21~P30]static, enumeration, constructor, destructor, inheritance, virtual function, interface, visibility
Series blog
[Cherno C + + Notes P1~P10] installation, linker, variable, function, header file [Cherno C + + Notes P11~P20] judgment, loop, pointer, reference, class [Cherno C + + Notes P21~P30] static, enumeration, constructor, destructor, inheritance, virtual function, interface, visibility
preface
This series of videos needs some found ...
Added by ahinkley on Sun, 19 Dec 2021 14:54:31 +0200
Huawei machine test HJ49: multithreading
Title Description:
Problem Description: there are 4 threads and 1 common character array. The function of thread 1 is to output A to the array, the function of thread 2 is to output B to characters, the function of thread 3 is to output C to the array, and the function of thread 4 is to output D to the array. It is required to assign ABCD to t ...
Added by raister on Sun, 19 Dec 2021 13:46:48 +0200
[Python source code reading] - torch trace. JIT interface C + + source code reading
preface
This paper is mainly from torch jit. Trace interface, open the door of Python JIT, and introduce it in normal NN The process of module forming scriptModule after trace and the C + + classes involved. Because there are a lot of contents involved, here are some relatively important classes from the perspective of source code or that ...
Added by dinku33 on Sun, 19 Dec 2021 10:29:28 +0200
Detailed explanation of vscode MinGw 8 configuring C + + environment variables
1. Download MinGW compiler
The difference between IDE and compiler
IDE (integrated development environment) is an application program used to provide a program development environment. It generally includes tools such as editor, compiler, debugger and graphical user interface. It is a development software suite
Compiler: converts one languag ...
Added by jaapoost on Sun, 19 Dec 2021 09:37:51 +0200
SOFT3410 - C language in system programming
Core Dump/Segmentation Fault
core dump caused by modifying constants
char *q = "cannot be modified.";
*(q + 1) = 'A';//Modified string literal
1 pointer
1.1 Dangling pointers
Pointer to the memory area that has been freed. As shown below, the local variable of the sub function has been released, but its reference is returned to a poin ...
Added by genericnumber1 on Sun, 19 Dec 2021 09:25:20 +0200
Binary tree series
Single valued binary tree If each node of a binary tree has the same value, the binary tree is a single valued binary tree. true is returned only when the given tree is a single valued binary tree; Otherwise, false is returned. Example 1: Input: [1,1,1,1, null, 1] Output: true Example 2: Input: [2,2,2,5,2] Output: false
link
/**
* Definition ...
Added by dpsd on Sun, 19 Dec 2021 05:16:10 +0200
qt common global macro definitions (qglobal)
explain
1 qt version related macros
1.1 QT_VERSION This macro is expanded into the numerical form 0xMMNNPP (MM = major, NN = minor, PP = patch), indicating the Qt compiler version. For example, the Qt compiler version is Qt 5.9 1, then QT_VERSION is 0x050901. This macro is often used for conditional compilation settings. Different code segmen ...
Added by dniry on Sun, 19 Dec 2021 04:02:14 +0200
Design pattern - singleton pattern. Have you heard of it? Write it down
Eight principles of face object design
Singleton mode
Definition: ensure that a class has only one instance, and provide a global access point for the instance
1. Motivation
In software systems, some classes must ensure that they have only one instance in the system to ensure their logical correctness and efficiency
2. Realization
2.1 ...
Added by porko2004 on Sun, 19 Dec 2021 00:57:53 +0200