Basic commands Execute the gcc -E -dM test.c command to view the default macro definition of gcc on the current system, where test.c is a c source file with empty content. Extension Embedded gcc can add CPU parameters to see the default macro definition of gcc under the current compilation configuration, for example, execute the […]
JavaScript array methods explained with examples
push():Adds one or more elements to the end of the array and returns the new length. let arr = [1, 2, 3]; arr.push(4); // Now the value of arr is [1, 2, 3, 4] pop(): Removes the element at the end of the array and returns the value of the element. let arr = [1, […]
Principles of using eBPF in Android and examples of kprobe dmabuf_setup
Table of Contents eBPF in Android Android eBPF kprobe dma code Define a MAP Define a PROG bpfprogs/Android.bp test program bpfprogs/memstats/Android.bp bpfprogs/memstats/MemStats.h bpfprogs/memstats/MemStats.cpp bpfprogs/memstats/MemStatsMain.cpp Compile and run Result analysis summary eBPF in Android Official website: https://source.android.com/docs/core/architecture/kernel/bpf?hl=zh-cn#tracepoints The official Android website has a more detailed introduction. For official examples of using eBPF in Android, you can […]
Android JNI static and dynamic injection methods
Author: MiniCode One of the more popular ways for Android to call C/C++ code is through JNI. There are two ways to implement local methods: static and dynamic Create a C project or C Module: After successful creation, the following files (CMakeLists.txt, nativelib.cpp) will be generated: Among them: CMakeLists file is used to package cpp […]
Tree dp – a super practical data structure
? 1. Concept introduction Tree DP is dynamic programming based on trees as a model. Mainly use the substructure brought by the tree itself (the parent-child relationship on the tree) to perform state transfer. Generally, the DP value of the parent node is derived from the DP value of the child node. 2. Detailed explanation […]
Cesium mouse clicks on the map to draw a point at the clicked location
Draw a point wherever the mouse clicks Directly copy the last picture code, any HTML with cesium, you can experience it directly as shown in the picture Let me explain it step by step. Finally, I will put the overall code at the bottom. Cesium is too difficult to learn. Compared with other languages, there […]
javascript:void($=o),javascript void o
Hello everyone, the editor will answer the question of javascript:void($=o). Many people still don’t know javascript void o, let’s take a look at it now! JavaScript object-oriented (ES5 article) 1. JavaScript object-oriented 1. Several ways to create objects in JavaScript 1. 1. Constructor pattern 1. 2. Factory mode 1. 3. Prototype mode 1. 4. Combined […]
How to use vue-cli scaffolding to quickly deploy engineering projects
How to use vue-cli scaffolding to quickly deploy engineering projects Reason why engineering is needed: Modular development: Engineering allows developers to divide the entire project into small modules, each focusing on specific functions. This modular development makes code easier to organize, maintain, and reuse. Automated construction: Engineering tools can automatically perform tasks such as code […]
[SpringBoot] Use Spring Cache to efficiently process cached data
Table of Contents 1. Brief description of Spring Cache 2. Common annotations for Spring Cache 3. @Cacheable annotation 4. @CacheEvict annotation 1. Brief description of Spring Cache Spring Cache is a caching abstraction mechanism provided by the Spring framework to simplify caching operations in applications. It caches the return value of the method. When the […]
SpringCloud GateWay custom filter GatewayFilter and AbstractGatewayFactory
1. GatewayFilter GatewayFilter is a simple interface used to define the behavior of a gateway filter. A gateway filter is a class that implements the GatewayFilter interface and can perform certain operations when a request enters the gateway or when a response leaves the gateway. Filters can be used to modify requests or responses, log, […]