Friends -- the magic of map

Title Description Students should learn to make more good friends. Friend relationship is mutual. If a is a good friend of B, then B is also a good friend of A. A is a good friend of B, B is a good friend of C, but a and C are not necessarily good friends. Now give the relationship between some studen ...

Added by swampone on Wed, 19 Feb 2020 17:39:44 +0200

C pointer principle - AT&T assembly

The standard assembler of Linux platform is GAS, which is the background assembly tool relied on by GCC, and is usually included in binutils package,--gstabs tells the assembler to add a symbol table to the generated object code. First, we complete the assembly:as -gstabs -o hello.o hello.sThe target code generated by assembler must be process ...

Added by blogger3 on Fri, 06 Dec 2019 15:30:17 +0200

[Android 9.0] the usbhost module in the system/core cannot output log to logcat

Phenomenon: the native Android 9.0 SDK, system / core / libushost is the module used by usb module to communicate with the driver. When debugging, you want to output log to logcat, turn on the debugging switch to recompile the code, and report the error of "undefined reference to '" FAILED: out/soong/.intermediates/system/core/libusb ...

Added by shahansudu on Sun, 10 Nov 2019 18:36:01 +0200

Thinking problem -- the application of backward order difference

Title Description Xiaoma is a good one who loves line trees. Xiaoma's grandfather, Ma ye, was beaten by Xiaoma in the game, so he became angry and decided to give Xiaoma such a data structure problem: Given an array AA of length nn, the value of each entry at the beginning is 00. The following two operations are supported, totaling mm ...

Added by Fira on Fri, 01 Nov 2019 16:05:34 +0200

Compiling C++ code from the command line

Links to the original text: https://my.oschina.net/u/160145/blog/264399 Some people haven't written HelloWorld for three months; some people don't know what the compiler is; some peopl ...

Added by tibberous on Wed, 18 Sep 2019 08:42:45 +0300

The annual salary of 50w background senior engineers is one gdb short!

Common commands of gdb: Linux Learning--gdb Debugging 2. Learning examples of gdb: #include <stdio.h> int add_range(int low, int high) { int i, sum; for (i = low; i <= high; i++) sum = sum + i; return sum; } int main(void) { ...

Added by GrayFox12 on Wed, 21 Aug 2019 10:12:06 +0300

Android debuggerd source code analysis

Introduction to debuggerd Android The system comes with a practical program to diagnose abnormal exit daemon Debuggerd. This process can detect program crash and output process status information when crash to file and serial port for developers to analyze and debug. Debuggerd's data is stored in the / data/tombstone / directory and can hol ...

Added by kfresh on Sun, 30 Jun 2019 04:57:55 +0300

linux Kernel Interrupt Implementation Principle

Preface This article mainly explains several questions: What is interruption and what are the categories of interruption? How can interrupt events be passed step by step from the event source to the kernel layer and the corresponding interrupt handling functions are invoked? How is the interrupt system initialized during kernel startup? ...

Added by michaellunsford on Mon, 24 Jun 2019 03:51:20 +0300

Construction of Minimum Spanning Tree in CSP Metro

http://118.190.20.162/view.page?gpid=T54   Idea: Using the method of union search, all edges are sorted from small to large, and the smallest edges are selected continuously until the first node and the last node are connected (that is, their ancestors are the same). The corresponding number of days (weights) on the output side is required. ...

Added by abhikerl on Sun, 16 Jun 2019 01:00:20 +0300