[configuration file] yaml configuration file read / write resolution [python and C + +]

Content of this article: This section mainly introduces how to read, write and parse the configuration file yaml.                  Basic introduction: In daily development, we can always encounter some scenarios that may need to be changed. At this time, we need a configuration file to change th ...

Added by punked on Mon, 17 Jan 2022 15:27:06 +0200

c++ sort() function and its application

sort() function: it is a sort function in c++ stl library. Learning to use this function can greatly save us from writing a sort function, such as bubble sort (O(n2)). Moreover, this sort function is written by quick sort, so the time complexity is O(nlogn), so it can also greatly reduce the program running time. Note that the sorting range is ...

Added by diondev on Mon, 17 Jan 2022 06:52:35 +0200

C + + introductory learning notes 3 - data sharing and protection

C + + Notes 3 Data sharing and protection Scope and visibility of identifiers Scope There are five scopes, from small to large: function prototype scope – > local scope – > class scope – > file scope – > namespace scope. Function prototype scope For example: function declaration double area(double r ...

Added by uberpolak on Mon, 17 Jan 2022 05:36:41 +0200

C + + container - set & map

Content reference: https://www.bilibili.com/video/BV1et411b73Z?p=231 set / multiset container set container Basic concepts Introduction: all elements are automatically sorted when inserted Essence: set / multiset is an associative container, and the underlying structure is implemented by binary tree Difference between set and multiset s ...

Added by nankoweap on Mon, 17 Jan 2022 03:27:48 +0200

C/C + + language data structure quick start (code parsing + content parsing) queue

1, Basic concepts of queue Note: three elements of data structure - logical structure, data operation and storage structure (physical structure) Different storage structures lead to different implementations of operations 1. Definition of queue A linear table is a finite sequence of n (n > = 0) data elements with the same data type, whe ...

Added by stiphu on Mon, 17 Jan 2022 02:13:54 +0200

C + + array is passed into the function int sum as a parameter_ arr(int arr[], int n)

First of all, we should know that C + + has restrictions on the type of return value -- it can't be an array. Let's look at the statement int sum_ Is arr (int arr [], int n) correct? This statement is correct, but doesn't it mean that the return value can't be an array? Why is int arr [] OK? Is int arr [] really an array? arr is not actually ...

Added by IronCannibal on Mon, 17 Jan 2022 00:00:09 +0200

Digital statistics DP

preface Review the content of the basic course of acwing algorithm. This article is to explain the basic algorithm: dynamic programming - digital statistics DP. About time complexity: bloggers are not very good at computing at present. They will make up for it in the future. 1, Dynamic programming Dynamic Programming (DP) is the proc ...

Added by phait on Sun, 16 Jan 2022 21:54:13 +0200

PGSQL protocol parsing and C/C + + code implementation

PostgreSQL uses message based protocols to communicate between the front end and the back end (client and server). T port number 5432 is registered with IANA as the preferred TCP port number of servers supporting this protocol, but actually any non privileged port number can be used. What is PostgreSQL? PostgreSQL, also known as Postgres, is ...

Added by podarum on Sun, 16 Jan 2022 17:47:02 +0200

Design pattern series (Dahua design pattern c + +) - observer pattern

Schema definition Let's take a look at the definition of observer mode in Dahua design mode: it is also called publish subscribe mode, which defines a one to many dependency, allowing multiple observer objects to listen to a topic object at the same time. When the status of the topic object changes, it will notify all observer objects, Yes ...

Added by shezz on Sun, 16 Jan 2022 17:28:21 +0200

leetcode brush questions / daily questions 138 Copy linked list with random pointer

138. Copy linked list with random pointer Meaning: Give you a linked list with a length of n. each node contains an additional random pointer random, which can point to any node or empty node in the linked list. Construct a deep copy of this linked list. The deep copy should consist of exactly n new nodes, in which the value of each new ...

Added by MasumX on Sun, 16 Jan 2022 16:32:11 +0200