Tag:Header file
-
Time:2021-1-13
Mysingleton. H: Singleton macro definition – header file //How to use. H add //Mysingletonh (singleton class) // singleton mode //Usage: m add //Mysingletonm (singleton class) // singleton mode //Mysingletonh. H file – creates a mysingletonh. H global file #define MYSingletonH(name) + (instancetype)shared##name; #if __has_feature(objc_arc) #define MYSingletonM(name) \ static id _instace; \ \ + (id)allocWithZone:(struct _NSZone […]
-
Time:2020-12-3
lower_ bound&upper_ Bound – binary search function They are built-in functions in C + +, which are used to search in an ordered sequence. Attention, it must be orderlyTheir time complexity is O (logn) and the efficiency is very highTo use them, add algorithm header files. Of course, you can use universal header files #Include […]
-
Time:2020-11-30
Snort experiment 1、 Experimental environment Operating system: Ubuntu 18.04, Kali Experimental tools: snort, VMware Workstation IP of unit 1: 192.168.204.131 IP of unit 2: 192.168.204.132 2、 Experimental content The experimental environment needs to be built before snort configuration. The environment configuration required for the experiment is shown in the following figure: Part A Run snort […]
-
Time:2020-11-25
This version focuses on the support of other languages, such as adding FORTRAN’s compilation support, Zig’s experimental support, and adding third-party dependency package support and cross compilation support for golang / dlang. Although xmake focuses on C / C + + construction support, xmake will also make some improvements from time to time. The main […]
-
Time:2020-11-19
Running environment: Xcode 11.1 swift5.0 Recently, I participated in a project that needed to be transferred from Objective-C (hereinafter referred to as OC) to swift. During this period, some pits were encountered, so this summary document was provided.If you also have the need to make OC project swift, it can be used as a reference. […]
-
Time:2020-11-15
Exercises 2.2 and 2.3 Header file #pragma once #include<iostream> #include<vector> void Pentagonal(const std::vector<int> &inputs, int num); inline bool IsValidNum(const int num, const std::vector<int> &v) { if (num <= 0 || num >= 1024 || num <= v.size()) { return false; } return true; } CC file #include “practice_2_2.h” void Pentagonal(std::vector<int> &inputs, int num) { //First […]
-
Time:2020-11-13
Most people learn or use something, like to see the results of the operation intuitively, then they will have the interest to continue. preface: There are a lot of online tutorials about golang calling C / C + +. As far as I can see, my personal opinions are quite chaotic and there are many […]
-
Time:2020-11-13
The programming environment uses AVR studio The download program is in this link https://www.pjrc.com/teensy/usb_ serial.html The key is that the computer needs to install a driver to communicate normally include #include #include #include #include #include #include “usb_serial.h” #define LED_CONFIG (DDRD |= (1<<6)) #define LED_ON (PORTD |= (1<<6)) #define LED_OFF (PORTD &= ~(1<<6)) #define CPU_PRESCALE(n) […]
-
Time:2020-10-20
As one of the components of agile development practice, unit testing aims to improve the efficiency of software development and maintain the health of code. Its goal is to prove that the software can run normally, rather than find bugs (the purpose of finding bugs is positively related to the development cost. Although finding bugs […]
-
Time:2020-10-17
Description of multithreading API: http://www.cplusplus.com/refe… There are two types of multitasking:Process based and thread based. Process based multitasking is the concurrent execution of programs. Thread based multitasking is the concurrent execution of fragments of the same program. <thread> STD:: thread is declared in the header file of ා include < thread >, so the header […]
-
Time:2020-10-13
This series of articles are the important knowledge points summarized by the author after reading “C + + primer”. The simple basic grammar and common sense are deleted, and the easily forgotten and more detailed knowledge points are summarized. It is suitable for comrades with certain C language grammar foundation to read. This book is […]
-
Time:2020-10-10
Strlen function: find the length of a string size_t strlen(const char *s) Header file: ා include < string. H > Note: find the length of the string pointed to by s (excluding null character). Return value: returns the length of the string pointed to by S. size_t strlen(const char *s) { size_t len = 0; […]