SpringBoot implements dynamic switching of data sources, which is more elegant!

Recently, when doing business requirements, I need to obtain data from different databases and then write them into the current database, so it involves switching data sources. Originally I wanted to use the dynamic data source SpringBoot starter provided in Mybatis-plus: dynamic-datasource-spring-boot-starter to achieve it. After the results were introduced, it was found that it […]

[C++]: Memory management: C++ memory distribution || Dynamic memory management in C++ (new || delete)

1. C/C++ memory distribution 【illustrate】 1. The stack is also called a stack – non-static local variables/function parameters/return values, etc. The stack grows downwards 2. Memory mapping segment is an efficient I/O mapping method, used to load a shared dynamic memory library. Users can use the system interface to create shared shared memory for inter-process […]

Dynamic programming method of five major algorithms

Definition: To solve a given problem, we need to solve its different parts (i.e., subproblems) and then combine the solutions to the subproblems to arrive at a solution to the original problem. Often many subproblems are very similar, so dynamic programming attempts to solve each subproblem only once, thereby reducing the amount of computation: once […]

python|web application framework|add dynamic routing

Yesterday we have modified the web route registration, changing it from function registration to class decorator registration. If you haven’t read the previous article, I suggest you read it first so that you can do it. To connect the previous and the following: python|web application framework|use class decorator to register routes: juejin.cn/post/722879… Today we will […]

Write static library (ar, package), write dynamic library (sharing principle, -fPIC, -shared), install static library (system path (library name)/specified path (-I, -L option)), install dynamic library ( ldd,-static, tells the loader the path to search

Table of Contents How to write a library static library Introduction — static library principle form static library introduce ar Options Create static library Add files to existing static library After we have a library, how should we give it to others? dynamic library The difference between static library and dynamic library linking static library […]

Linux generates dynamic libraries

Dynamic library 1. Naming rules Linux: libxxx.so lib: prefix (fixed); xxx: The name of the dynamic library (choose it yourself); .so: suffix (fixed); Windows:libxxx.dll 2. Production of dynamic library Use gcc to get the .o file and get position-independent code: gcc -c -fpic a.c b.c … Use gcc to get the dynamic library: gcc -shared […]

Vue routing (router-link) – highlighting, dynamic parameter transfer

1. Declarative navigation-navigation links 1. Requirements Implement navigation highlighting effect If you use the a tag to jump, you need to add styles to the currently jumped navigation, and at the same time remove the style of the previous a tag, which is too troublesome! ! ! 2. Solution vue-router provides a global component router-link […]

Android Datastore dynamic creation and source code analysis

Knowledge points involved 1. Principle of coroutines —-> A very good blog introduction. A short story explains what is the relationship between processes, threads, and Kotlin coroutines? 2. Channel knowledge points—->Android-kotlin-Channel is explained in detail 3. Coroutines: CompletableDeferred and structured concurrency Encapsulated DataStoreUtils tool->gitHub Purpose of this blog The company’s use of SharedPreferences can easily […]

SCNU-Algorithms-MS-2023-Dynamic Programming

1-1 All longest common subsequences of two strings Find the longest common subsequence of two strings Input format Enter two strings with length ≤100. Input example 1: ABCBDAB BDCABA Input example 2: ABACDEF PGHIK Output format Output all the longest common subsequences of the two strings. If there are more than 1 longest common subsequences, […]