Constructive Gray Code for Divide and Conquer (C++)

Today, the arithmetic teacher set up a divide-and-conquer job to build graycodes. As a programming whitespace, he thought about it for hours before he happened to finish it. So he thought about taking his own notes on CSDN, which is also my first blog post. Origin: Gray code is a 2^n sequence with no identical elements in the sequence, and ...

Posted by Spudgun on Thu, 23 Sep 2021 09:42:17 -0700

C language knowledge commonly used by JNI

1, Pointers and arrays 1. Ordinary pointer The pointer is the memory address where the variable is stored. It has a type, and the address has no type. int main(int argc, char const* argv[]) { //Define variables int i = 90; //Define pointer p and take address character for variable i int *p = &i; float fi = 0.8f; ...

Posted by davidp on Thu, 23 Sep 2021 06:30:30 -0700

Chapter 17 electronic mall system

1, Functional requirements analysis 1. Login function The user needs to enter the user name and password to log in to the mall system. The password is protected in the form of password. If the password is incorrect, re-enter it. The interface is mainly composed of label, LineEdit, pushbutton and other controls   2. Mall system function ...

Posted by elecktricity on Thu, 23 Sep 2021 05:20:35 -0700

C + + smart pointer

typora-copy-images-to: ./ Summary of smart pointer knowledge: Source cpp, summarize and review by yourself. Object and memory Memory distribution: Static memory: local static objects, class static data members, variables defined outside functions.Stack memory: non static objects defined in functions.Memory pool (free space, heap): dynami ...

Posted by picker999 on Thu, 23 Sep 2021 01:10:04 -0700

[C + +] Chapter 10: class template - full specialization and partial specialization of templates and separate compilation of templates

[C + +] Chapter 10: class template - full specialization and partial specialization of templates and separate compilation of templates 1, Non type template parameters Template parameters are classified into two types: type parameter and non type parameter. Type parameter: the parameter type name that appears in the template parameter lis ...

Posted by daucoin on Thu, 23 Sep 2021 00:31:49 -0700

HDU1232 unblocked project and collection query introduction classic OJ problem solution

1, Background introduction This is the classic example of parallel search set, and the entry level. If you want to learn this data structure, you must learn this foundation well. You can recite the template. The title source is HDU 1232, and the specific link is: http://acm.hdu.edu.cn/showproblem.php?pid=1232. 2, Title Description Probl ...

Posted by kelseyirene on Wed, 22 Sep 2021 21:53:28 -0700

Opencv basics cropping images using OpenCV

First, why do we need crops? Clipping is to remove all unnecessary objects or areas from the image or to highlight a special feature of the image. Unlike Numpy, which uses slicing to achieve clipping, OpenCV does not have a specific function to perform clipping. Each image read is stored in a 2D array (for each color channel). Just specify the ...

Posted by rebelo on Wed, 22 Sep 2021 17:23:28 -0700

Detailed explanation of user-defined type: structure (memory alignment, bit segment) + enumeration + Union

Data type: C language built-in type: — char short int long float double Custom type / construction type: - structure, enumeration, union Data storage - type details 1, Structure 1. Special declaration When declaring a structure, you can declare it incompletely Anonymous structure struct { int a; char c; double d; }s1, s2; ...

Posted by pgudge on Wed, 22 Sep 2021 09:53:31 -0700

Data structure, algorithm and application - C + + language description learning notes - priority queue - Application - Hoffman coding

1, Principle and construction process 1. Principle Previously, we learned the text compressor based on LZW algorithm, which is based on the repetition of substrings in the text. Huffman coding is another text compression algorithm, which is based on the relative frequency of different symbols in a text. Suppose a text is a string composed ...

Posted by bokehman on Wed, 22 Sep 2021 07:02:04 -0700

Introduction to linked list (C + +)

Learn the basic knowledge of linked list on LeetCode and summarize as follows: 1. Introduction to single linked list         Unlike an array, a single linked list only stores the value of the element. In addition to the value of the data, a single linked list also includes a reference field pointing to the next node, which ...

Posted by Talon on Tue, 21 Sep 2021 23:41:50 -0700