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 […]

HtmlTableToMarkdown (table to markdown) in java

package com.medipath.helper.web; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.medipath.helper.web.vo.Node; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.util.ArrayList; import java.util.Comparator; import java.util.List; public class TableToMatrix { public static void main(String[] args) { String html = “<table>\\ ” + ” <tr>\\ ” + ” <td>\\ ” + ” <p>company</p></td>\\ ” + ” <td>\\ ” + ” […]

[Android Tablet Programming] Remote Ubuntu server code-server programming and writing code

Article directory 1. Install code-server locally on ubuntu 2. Install cpolar intranet penetration 3. Create a tunnel mapping local port 4. Android tablet test access 5. Fixed domain name and public network address 6. Conclusion 1.Ubuntu local installation code-server Prepare a virtual machine, either Ubuntu or centos. Here we take the VMwhere ubuntu system as […]

How to implement mtk tablet computer to simulate HID mouse

1. Linux USB HID gadget driver (1 Introduction The Linux HID gadget driver provides a way to emulate a USB Human Interface Device (HID). Basic HID handling is done in the kernel, and HID reports can be sent and received through the character device /dev/hidgX. For more details about HID, see http://www.usb.org/developers/hidpage/ (2) Configuration g_hid […]

Android 13 tablet Taskbar loading process

Starting from Android 12, if it is a large screen, the bottom navigation bar will change to display a task bar, from NavigationBar to Taskbar. Note: CentralSurfacesImpl.java has the same function as the original statusbar.java. The startup process of CentralSurfacesImpl has been mentioned before, so I won’t explain it here. // CentralSurfacesImpl.java public class CentralSurfacesImpl […]

Solution for value transfer between parent and child threads: InheritableThreadLocal and TransmittableThreadLocal

Original Shepherd Shepherd Advanced Notes 2023-07-17 08:50 Published in Zhejiang Cold Rainy Night Music: BEYOND – Footsteps of the Past 1. InheritableThreadLocal We have described the implementation principle, usage scenarios and methods of ThreadLocal before. It can be seen that ThreadLocal is a local variable used by each thread itself, but in actual development, there […]

Xamarin.Android realizes the function of the tablet

Table of Contents 1. Background description 2. Realize the effect 3. Code implementation 3.1 Overall idea 3.2 Core painting class – PaintView.cs 3.3 Dialog class – WritePadDialog.cs 3.4 Front-end implementation class – MainActivity 3.5 Layout files 3.5.1 write_pad.xml 3.5.2 activity_main layout file 4. Knowledge summary 5. Code download 6. Reference materials 1. Background description In […]