C + + algorithm determines whether the string is a numeric value
A string representing a numeric value
1, Title Description
Please implement a function to judge whether the string represents a numeric value (including integer and decimal).
The values (in order) can be divided into the following parts:
Several spaces
A decimal or integer
((optional) one 'e' or 'E' ,Followed by an integer
Several ...
Added by Renlok on Thu, 24 Feb 2022 11:11:30 +0200
C + + smart pointer
Memory leak
What is a memory leak: A memory leak is a condition in which a program fails to free memory that is no longer in use due to negligence or error. Memory leakage does not mean the physical disappearance of memory, but the loss of control over a certain section of memory due to design errors after the application allocates it, res ...
Added by mustatin on Thu, 24 Feb 2022 04:49:33 +0200
Dark horse programmer / C + + improve programming handout
=Generic programming and STL = = technology are explained in detail to explore the deeper use of C + +
1 template
1.1 concept of template
Template is to establish a general mold, which greatly improves the reusability
Characteristics of formwork:
The template cannot be used directly. It is just a frameworkThe universality of templates is n ...
Added by Mortier on Wed, 23 Feb 2022 18:43:37 +0200
Apollo MPC horizontal control learning notes
Reference link first
[motion control] Apollo 6 MPC of 0_ Controller parsing
Apollo MPC OSQP Solver
For detailed derivation of vehicle lateral dynamics model, please refer to my other blog
Horizontal control principle and core code line by line analysis of Apollo control module
Because it is similar to the code and framework of LQR control ...
Added by grant777 on Wed, 23 Feb 2022 18:41:48 +0200
C + + combat notes
Smart pointer
unique_ptr
unique_ptr is one of the simplest and easiest to use smart pointers. When declaring, you must specify the type with template parameters, for example:
unique_ptr<int> ptr1(new int(10)); //int smart pointer
assert(*ptr1 = 10); // Use * to get content
assert(ptr1 != nullptr); //You can determine whether it is a ...
Added by timj on Wed, 23 Feb 2022 17:20:29 +0200
2022-02-23 swipe questions and punch in every day
2022-02-23 swipe questions and punch in every day
All in one -- dynamic programming
1274: [example 9.18] merge stones
[Title Description]
N piles of stones are placed in rows on a playground. Now we need to merge the stones into a pile in order. It is stipulated that only two adjacent piles of stones can be selected each time to combine int ...
Added by kankersite on Wed, 23 Feb 2022 13:13:45 +0200
[daily series] appreciation of recursion from introduction to mastery (C + + version)
Recursion from introduction to mastery
(I) introduction to recursion
Write a recursive function
What is the function of this recursive function and how to call this function, that is, design the return value and parameter list of the recursive functionWhen should this recursion end and what is its boundary condition (exit)How to change from ...
Added by rocksolidhq on Wed, 23 Feb 2022 11:19:52 +0200
C++ programming: common sorting algorithms
C++ programming: common sorting algorithms
Bubble sort
Algorithmic ideas:
Compare adjacent elements. If the first is larger than the second, swap the two;Do the same work for each pair of adjacent elements, from the first pair at the beginning to the last pair at the end, so that the number of elements at the end should be the maximum;Repeat ...
Added by Sassci on Tue, 22 Feb 2022 19:05:43 +0200
opencv installation record with more than ten lines of C + + implementation of a human face recognition demo
preface:
Previously, I wrote an article about using opencv on nano. By default, the library of opencv is installed on nano. In addition to nano, we also want to use opencv to do some usual image processing verification on our own computers.
Originally, I read some materials and installed them. I don't think it's necessary to write them. How ...
Added by ego0 on Tue, 22 Feb 2022 16:18:58 +0200
STL topology sorting
preface
My story with topological sorting
The first contact was the class of data structure. However, I was addicted to playing games and didn't understand the code at that time. The second time was the punch in group. The second question of a force deduction fortnightly competition was topological sorting (I used violence to cycle 100 times ...
Added by hi2you on Tue, 22 Feb 2022 07:53:43 +0200