Number of the largest and the next largest of a set of outputs

The first method is: This method can be selected when the data is basically ordered (ascending order) and does not require sequential output according to the original data. 1 void select_1(int a[],int length,int *min1,int *min2){ 2 int i,j; 3 bool change = true; 4 for(i = 1;i <= 2 && change;i++){ 5 c ...

Posted by me1000 on Fri, 04 Oct 2019 14:51:00 -0700

Creation and partial operation of graphical binary tree

Following is the study and understanding of the binary tree by Ayu. I would like to share with you, hoping to help some of you. If you have more expenses, please generously point out. A carp will be explained in the following order (c language implementation) BTNode *_CreateBinTree(char *array, int ...

Posted by grace5 on Thu, 03 Oct 2019 02:21:39 -0700

How to implement libevent timer

1. How does the timer work? In previous articles, we have said that the final processing of libevent is called the corresponding dispatch function in event_base_loop, and the timer is also processed in the dispatch function. Or take epoll as an example. The epoll_dispatch function has the following code: if (tv != NULL) { timeout = ...

Posted by moonshaden on Wed, 02 Oct 2019 14:43:10 -0700

Function overloading in class--Ditty Software College

The content of the article comes from Tang's courseware of Ditai Software College. 1. Review of Function Overload The essence of function overload is different functions which are independent of each other. Function Call Determined by Function Name and Function Parameters in C++ You cannot get the entr ...

Posted by corkg on Tue, 01 Oct 2019 04:38:42 -0700

Input and Output of Assembly Language Strings

Variable Definition Pseudo Instruction Definition: Variable definition pseudo instructions are used to allocate memory units for data and establish the relationship between variables and storage units.   Statement Format: [Variable Name] Variable Definition Pseudo Instruction Operator 1 (Opera ...

Posted by RaheimSG on Mon, 30 Sep 2019 04:53:45 -0700

The Simplest Communication Driven by Binder

Binder is ubiquitous in Android systems, and Binder transmissions occur at every moment. In many cases, there will not only be a single Binder transmission in a process, often concurrent multiple Binder transmissions, and there will be Binder nesting. Especially important processes such as system_server will have more Binder transmissions. When ...

Posted by madhu on Sun, 29 Sep 2019 03:28:49 -0700

Deep Understanding of the INVALID State of Connection Tracking

Several states in user-mode connection tracking A connection tracking system defines several states in which a connection may be in: NEW: The initial state of a connection (e.g. the arrival of a SYN packet in a TCP connection), or the firewall receives only traffic in one direction (e.g. before the firewall receives a reply packet). ESTABLISHE ...

Posted by Jeremiah on Fri, 27 Sep 2019 06:01:27 -0700

Deno Principle in detail, let's start with source code analysis

Father of Node: In his speech "Design Errors in Node", he said: Binding any local function to V8 is not allowed. All system calls will be done through message passing (protobuf serialization). Two primitive functions: send and recv. This not only simplifies the design process, but also makes the system easier to audit. These ...

Posted by salman_ahad@yahoo.com on Wed, 25 Sep 2019 08:51:02 -0700

[Redis5 Source Learning] An Analysis of the expire of redis command

Grape Command syntax Command Meaning: Set a lifetime for a given key, and when the key expires (lifetime is 0), it will be automatically deleted.Command format: EXPIRE key secondsCommand actual combat: redis> EXPIRE cache_page 30000 # Update expiration time (integer) 1 Return value: Setting successfully returns 1.When the key does not ex ...

Posted by PGTibs on Sun, 22 Sep 2019 01:15:34 -0700

Common features of 6 cpp

Common features of 1.6 cpp Return to directory 1 Object-Oriented TechnologyLast Section 1.5 Structures and classesNext section 1.7 Common features of classes in cpp bool type c + + extends a new data type: bool type. There are only two possible values in the bool type: true or false, representing true and false, respectively. source code /* b ...

Posted by username123 on Thu, 19 Sep 2019 21:15:03 -0700