Detailed explanation of InheritableThreadLocal

Table of Contents Preface text 1. Class ThreadLocal cannot implement value inheritance 2. Use InheritableThreadLocal to reflect the value inheritance feature 3. Execution process of value inheritance feature in source code 4. The parent thread has a new value, but the child thread still has the old value: immutable type 5. The child thread has […]

How to use Synology NAS’s Audio Station combined with intranet penetration to achieve remote access to the local music library

Article directory The problem this tutorial solves is: After following this tutorial method, the effect achieved is: The environment used for this tutorial: 1 Install audiostation package on Synology system 2 Download the mobile app 3 Intranet penetration, mapping to public network Many old people want to listen to their favorite songs or cross talk […]

ESP uses webserver for local control

Because using cloud services is sometimes unreliable, offline control is important. This article uses webserver to implement local web page control. In this way, there is no need to develop a separate APP, and it can be controlled with a browser. All tests in this article are based on ESP32. 8266 has not been tested. […]

.net core webapi implements localization

Nowadays, projects often require support for localized configuration. There are many ways to achieve localized configuration. For example, Microsoft’s official website provides localized configuration through resx resource files and PO files. However, the scalability of resx resource files is not good, and PO files need to introduce dependency packages. This article mainly introduces another scalable […]

java downloads files to the local tool class by specifying the URL address (including https digital signature request)

java downloads files to the local tool class by specifying the URL address (including https digital signature request) XFileUtils public class XFileUtils {<!– –> /** * Download files from network Url * @param urlStr url path * @throwsIOException */ public static String downLoadByUrl(String urlStr,String savePath, String fileName) {<!– –> if (StrUtil.isBlank(fileName)) {<!– –> fileName = […]

Pure front-end to record screen and save video locally, so simple

Big factory technology advanced front-end Node advanced Click above for Programmer Growth Guide and follow the official account Reply 1, join the advanced Node communication group Author: Moment Link: https://juejin.cn/post/7280057907055869992 As a senior picture cutter, we will inevitably need to share some functions of the pages we write with others through videos. There is another […]

The most complete interpretation of maven settings (local warehouse, remote warehouse, authentication, etc.)

1. Interpretation of setting 1.maven warehouse configuration The warehouse priority is: local warehouse (localRepositories) > repositories warehouse in profile > POM > mirrors global warehouse What is the use of settings.xml? If you have used the Maven plug-in in Eclipse, you must have this experience: configure the path of the settings.xml file. What does the […]

[python\import] When importing, the local project code (library constructed with setup.py and other methods) is given priority instead of the library installed by pip || Code test

【start:20231103】 Article directory introduction Problem Description Specific case Construct your own python library Files involved in constructing the library pyproject.toml setup.py Commands involved in constructing the library `pip install -e .` `python setup.py develop` `python setup.py install` other problems Problems with linkage between construction library and importlib Practical combat: Installation of local Cellpose library Case […]

Error when compiling Spark source code locally in idea

Report the error content first [INFO] Scanning for projects… [INFO] ————————————————– ————————– [INFO] Detecting the operating system and CPU architecture [INFO] ————————————————– ————————– [INFO] os.detected.name: osx [INFO] os.detected.arch: x86_64 [INFO] os.detected.version: 10.15 [INFO] os.detected.version.major: 10 [INFO] os.detected.version.minor: 15 [INFO] os.detected.classifier: osx-x86_64 [INFO] ————————————————– ————————– [INFO] Reactor Build Order: [INFO] [INFO] Spark Project Parent POM [pom] […]

Webpack builds a local server

1. Build webpack local service 1. Why build a local server? The code we have developed so far requires two operations in order to run: Operation 1: npm run build, compile the relevant code; Operation 2: Open the index.html code through the live server or directly through the browser, View the effect; Frequent operation of […]