Count the number of various types of files in a specific directory (shell&c + +)

Shell language This problem uses command line + bat (windows batch file) to realize query. There are two main methods. The first is to use dir command and find command to count the number of various types of files in a specific directory; The second is to use the for statement to traverse and count the files in a specific directory, as follows: ...

Posted by LiquidEagle on Tue, 28 Sep 2021 12:03:56 -0700

C language pointer

Pay attention to one button three times (don't be sure next time) Hello, bald men, let's learn the pointer together today! Key points of this chapter What is the pointerPointer and pointer typeField pointerPointer operationPointers and arraysSecondary pointerPointer array What is the pointer? In computer science, a Pointer is a ...

Posted by jdubwelch on Mon, 27 Sep 2021 17:30:05 -0700

Algorithm learning: 1-1 greedy algorithm

The so-called greedy algorithm is to ensure that each operation is a local optimal solution, so that the final result is a global optimal solution. Exercise 1:455. Distribute cookies The key to using greedy algorithm is to find greedy strategy, that is, each operation is a local optimal solution. As can be seen from the question, to satisf ...

Posted by Pastulio on Mon, 27 Sep 2021 06:37:57 -0700

Data structure and algorithm stack and queue

Stacks and queues are linear tables that restrict the insertion and deletion of total equity changes at the end of the table Stack -- last in first out         Stack algorithms must be used: number system matching, expression evaluation, bracket matching detection, eight queens problem, line editing program, function ca ...

Posted by jazz_snob on Mon, 27 Sep 2021 06:29:13 -0700

this pointer supplement, const supplement, static supplement, static const int

catalogue Object calling function and this pointer (supplemented by this pointer) const supplement const decorated data member (initializing member list) Modify member functions (data members will not be modified in member functions) Decorated object static supplement Modified out of class Modify global variables Modify local variables ...

Posted by tomwerner on Mon, 27 Sep 2021 04:07:18 -0700

File operation (file pointer + detailed explanation of sequential read-write function)

1, Documents What is a file: Files on disk are files 1. Classified by file function: Procedure documents: Source program file test.c object file test.obj executable program test.exe Data file: The content of the file is not necessarily the program, but the data read and written when the program runs, such as the file from which the ...

Posted by dujed on Mon, 27 Sep 2021 02:22:28 -0700

The firmware library is used to control the GPIO output high and low levels of STM32F103 to realize the on and off of LED lights

When writing the structure of LED lamp, you need to set the clock of GPIO port, input and output mode and high and low levels of GPIO pin. Next, we will introduce how to configure each structure Introduction to GPIO General purpose input / output is referred to as GPIO for short. STM32F103VET6 has 80 gpios in total. These IO pins are divided i ...

Posted by ldoozer on Sun, 26 Sep 2021 22:38:53 -0700

Experience of using doctest

        There are many unit testing frameworks, and it is convenient for ubuntu to use gtest. The window s platform is mainly developed using vs2017. I use VS to develop qt projects. Although there are many fewer unit testing configurations with VS, I still need to import. props files. During testing, I need to change the a ...

Posted by juma929 on Sun, 26 Sep 2021 18:13:53 -0700

Opencv advanced super resolution based on OpenCV

brief introduction Super resolution refers to the process of enlarging or improving image details. When increasing the size of the image, additional pixels need to be interpolated in some way. Traditional image processing techniques can not get good results because they do not take the surrounding environment as the background when zooming in. ...

Posted by MalikBB on Sat, 25 Sep 2021 23:42:13 -0700

Implementation of C/C + + linear table

Novice way out, please consult!! Definition of linear table: linear list is the most basic, simplest and most commonly used data structure. Linear table data elements The relationship between is a one-to-one relationship, that is, except for the first and last data elements, other data elements are connected head to tail, but this only applie ...

Posted by Saviola on Sat, 25 Sep 2021 20:56:39 -0700