Tag:Header file

  • IOS singleton macro definition record

    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 […]

  • Function – lower_ bound&upper_ bound

    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 […]

  • Installation and application of Snort

    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 […]

  • Xmake v2.3.6 release, new FORTRAN compilation support

    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 […]

  • Swift Project Guide

    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. […]

  • After class questions of Chapter 2 of essential C + +

    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 […]

  • Golang calls C / C + +, example tutorial

    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 […]

  • CDC analog serial port program of atmega32u4

    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) […]

  • Experience course I IOS unit test

    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 […]

  • C + + multithread — thread

    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 […]

  • Reading notes of C + + primer (beginning of Chapter 1)

    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 […]

  • Introduction and implementation of string processing library function in C language

    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; […]