Nginx module development: handler module implementation

1, Functions to be implemented by the module Implementation function: count the access times of each ip address and display the corresponding html. (what's the use of this function? It can be made into a black-and-white list according to the statistics of the number of times. For those with more visits, access is prohibited) In the conf f ...

Posted by social_experiment on Sun, 22 May 2022 01:31:06 +0300

8x8 dot matrix display graphics or dynamic display string

8x8 lattice Display principle The LED dot matrix screen is composed of several independent LEDs, which are arranged in the form of matrix The structure of LED dot matrix screen is similar to that of nixie tube, which only arranges the pixels of each column in an "8" shape Like the nixie tube, LED dot matrix screen has two connecti ...

Posted by hoogie on Fri, 20 May 2022 23:08:03 +0300

[data structure and algorithm] stack and queue

Stack What is a stack? Stack is a kind of linear table. It only allows the insertion and deletion of elements at the fixed end. The one end for data insertion and deletion is called the top of the stack and the other end is called the bottom of the stack. Therefore, the stack addition and deletion elements have what we often call last ...

Posted by beboo002 on Fri, 20 May 2022 00:43:56 +0300

Data structure day 8 - two dimensional array and matrix multiplication, and transpose of compressed matrix

The first is matrix multiplication #include<stdio.h> #include<stdlib.h> /** *Dynamic two-dimensional array */ typedef struct TwoDArray{ int rows; int columns; int **elements; } TwoDArray, *TwoDArrayPtr; /** *Static two-dimensional array */ typedef struct TwoDStaticArray{ int rows; int columns; int elements[4][5]; } ...

Posted by g00bster on Thu, 19 May 2022 00:09:30 +0300

22 array pointer and pointer array

catalogue problem 1 array type 2. Define array type 3 array pointer 4 pointer array problem Are the following statements legal? int array[5]; int matrix[3][3]; int* pa = array; int* pm = matrix; Array represents the address of the first element of the array. What does matrix represent? The address values of array and & array are t ...

Posted by Toby on Tue, 17 May 2022 11:21:24 +0300

A simple way to realize ai in man-machine combat with gobang game in c language

A simple way to realize ai in man-machine combat with gobang game in c language Idea: First, select the color of the computer's chess pieces in the main function and call different functions. When it's the computer's turn, the basic idea is to traverse every empty space on the chessboard, calculate the value one by one, find the position with ...

Posted by jdc44 on Tue, 17 May 2022 10:34:32 +0300

String reverse order - multiple methods

Reverse the order of strings, taking the string abcdef as an example 1. With additional arrays #include <stdio.h> #include <string.h> int main() { char str[] = "abcdef"; //Find the size of the string, including '\ 0' int sz = strlen(str) + 1; //Dynamic memory allocation, apply for a character array of sz size ...

Posted by zechdc on Tue, 17 May 2022 03:07:02 +0300

Simple point - c-Lesson5 (structure, branch statement (if, switch), difference between p and * p)

1. Structure (1) A structure definition is a collection that describes different data types or the same data type. (complex type) (2) Access structure: pointer access structure (- >); Variable name access structure (.) (3) The difference between p and * p depends on whether it is a left value or a right value. #if 1 #include < ...

Posted by heminfotech on Mon, 16 May 2022 23:33:28 +0300

UNIX Advanced Environment Programming Learning Notes 6_ Process Control

1. Function fork Function prototype: #include<unistd.h> pid_t fork(void); The fork function creates a subprocess and returns it twice. Child process ID and 0, respectively. It is equivalent to copying the same process and executing it at the point where fork is called while the program is running. It has two main purposes: 1. Parent a ...

Posted by hoopplaya4 on Sun, 15 May 2022 22:01:01 +0300

The most complete and detailed explanation of three chess

If you want to write the sanbang code, you must have a start-to-finish idea: First of all we have three files game.h - declaration of the function game.c - function implementation test.c - test game Create a menu (menu()) //menu selection interface void menu() { printf("*****************\n"); printf("**** 1.play ****\n"); pr ...

Posted by commandonz on Sun, 15 May 2022 01:31:55 +0300