Redis data type - integer set learning notes

preface Learning notes on Redis underlying integer set (intset). This data type is relatively simple. The main knowledge points are the upgrading of set elements, the search and insertion of elements. In the implementation of element search, the binary search algorithm is used. If you want to learn the implementation of Redis binary sear ...

Added by scristaldi on Thu, 16 Dec 2021 04:50:07 +0200

Data structure - Chapter 2 - stack and queue

Stack Basic concepts A stack is a linear table that only allows insertion or deletion at one end. Important terms: Stack top, bottom, empty stack, last in first out (LIFO) Sequential stack #define MAXSIZE 20 / / define the maximum number of stack elements typedef struct { int data[MAXSIZE]; int top; //Stack top pointer } SqStack; Basi ...

Added by cesy on Wed, 15 Dec 2021 21:09:37 +0200

2 simple plane game

1.2.1 Use scanf to input different strings, press W, a, s and D to change the values of coordinates x and y, so as to control the movement of aircraft * characters up, down, left and right. This VS may have a scanf C4996 error and a C6031 warning, which indicates that the modifier or attribute specified in the declaration is not recommended. W ...

Added by Wuhtzu on Wed, 15 Dec 2021 01:53:13 +0200

[advanced C language] dynamic memory management / allocation

catalogue 1, Why is there dynamic memory management / allocation?         Storage form division of memory 2, Introduction to dynamic memory functions         malloc         free         Practical application of malloc and free         calloc         realloc 3, Common dynamic memory errors         Dereference operation on NULL pointer ...

Added by habuchas on Wed, 15 Dec 2021 00:35:56 +0200

Initial knowledge of C language

Catalog: constantString+Escape Character+CommentSelection StatementLoop statementarrayOperator Beginning of text: Constant: Constants in C are divided into the following categories: Literal Constantconst-modified constant variableIdentifier Constant defined by #defineenumeration constant int main() {   //Literal Constant Demo   3.14;//Lite ...

Added by rscott7706 on Tue, 14 Dec 2021 19:38:24 +0200

Generate warnings not included with the - Wall option

Generate warnings not included with the - Wall option Although the - Wall option of the gcc compiler covers most warning flags, some warnings cannot be generated. To generate them, use the - Wextra option. For example, the following code: #include <stdio.h> #include <stdlib.h> int main() { int i=0; /* ... some c ...

Added by phpcip28 on Tue, 14 Dec 2021 10:17:16 +0200

How to input a specific string (word) as a terminator in C language

This article is explained with an example (the novice wrote it for the first time, only to share some methods and skills he thought of in writing code. There are still many shortcomings, and I hope it can be useful to you) Title Requirements: there is an article with multiple lines of text (no more than 10 lines), and the last line is end. It ...

Added by genistaff on Tue, 14 Dec 2021 09:23:25 +0200

C language I blog assignment 09

Which course does this assignment belong tohttps://bbs.csdn.net/forums/csuft_swxy_C?typeId=17321What are the requirements for this assignmenthttps://bbs.csdn.net/topics/603700627The goal of this assignment< learn new knowledge, practice and consolidate >Student number<20218549> 1. Complete PTA homework and give a screenshot of progr ...

Added by thestars on Tue, 14 Dec 2021 04:22:24 +0200

Practice learning of circular structure of computer level 2 problems

1. In the following given programs, the function of function fun is to calculate and output the sum of the maximum 10 primes within max. high is passed from the main function to the fun function. #include <stdio.h> #include <math.h> int fun( int high ) { int sum = 0, n=0, j, yes; /************found************/ while ((high ...

Added by 4evernomad on Mon, 13 Dec 2021 17:03:01 +0200

C language - string processing

1. Preface String is widely used in C language, because many data processing are text, that is, string, especially the text data returned by device interaction and web page interaction. The string itself belongs to a character array, but it is different from the character array in that there is' \ 0 'at the end of the string. Because '\ 0' is ...

Added by btrsrinivasarao on Mon, 13 Dec 2021 15:04:11 +0200