Home
»
All posts
[Java] - Thread A->Z
December 16, 2025 |
Thread
==========================================================================
Thread
==============================
Virtual Thread
Ref :
Virtual threads are lightweight threads that reduce the effort of writing, maintaining, and debugging high-throughput concurrent applications.
A platform thread is implemented as a thin wrapper around an operating system (OS) thread. A platform thread runs Java code on its underlying OS thread, and the platform thread captures its OS thread for the platform thread's entire lifetime. Consequently, the number of available platform threads is limited to the number of OS threads
Virtual Thread:
- A virtual thread is also an instance of java.lang.Thread..
- A virtual thread isn't tied to a specific OS thread.
- Virtual threads are implemented in a similar way to virtual memory.
Why Use Virtual Threads:
- Use virtual threads in high-throughput concurrent applications, especially
those that consist of a great number of concurrent tasks that spend much of their time
waiting.
- Virtual threads are not faster threads.
[Security] - List of weakpoint need review/consider to resolve
June 17, 2025 |
Eclipse A-Z
February 17, 2025 |Apache Kafka
February 07, 2025 |
I. Setup environment
Photoprism
November 23, 2024 |
1.Install Photoprism in Windows
Ref: https://docs.photoprism.app/getting-started/docker-compose/#__tabbed_1_5
- Install Docker
$ curl.exe -o install.bat https://dl.photoprism.app/docker/windows/install.bat
install.bat
- Download compose.xml to local
- Run command below where compose.xml stored.
$ docker compose up -d
$ docker compose stop
- Access photoprim: http://localhost:2342/
- Enter default user: admin/insecure (Remember change password after login)
Proxmox
October 27, 2024 |
Download: https://www.proxmox.com/en/downloads
How to install Proxmox in Virtual Box: https://getlabsdone.com/how-to-install-proxmox-ve-on-virtualbox-step-by-step/
- Enter Country and timezone
Genymotion Tips
October 01, 2024 |Mikrotik L2TP / IPsec VPN Server Step by Step configuration
August 29, 2024 |
Ref:
https://www.cloudhosting.lv/eng/faq/Mikrotik-L2TP-IPsec-VPN-Server-Step-by-Step-configuration
How to enable VPN Server in Mikrotik Router
Step 1: PPP > Interface > L2TP Server
Check Enable & Enter IPSec Secret
Step 2: IP> Pool > Add
Make VPN Pool
Enter Name: VPNAddress : 192.168.10.100-192.168.10.150
Step 3: PPP > Profile
- Make profile
- Enter Name : VPN
- Local Addresss : VPN-Pool
- Remote Address: VPN-Pool
Enter Name : test
Password : 12356
Profile : VPN
Local Address : 192.168.10.100
Remote Address : 192.168.10.101
Step 5: Firewall > Filter Rule (Important step)
- Allow port: 1701, 500, 4500
- Chain: input
- Protocol: udp
- Dst Port: 1701, 500, 4500
- Action: Accept
These rule must be on top another rules.
If you have any question, please send to me: hoquoctri@live.com
Thanks;
MacOS A->Z
August 27, 2024 |
1. Install HomeBrew
Ref: https://brew.sh/
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If MacOS can't found brew command
$ echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
2. Install NVM (Node Version Management)
You can install vary node version in PC and easy switch between node version
$ brew install nvm
$ nvm ls
$ nvm --version
$ nvm install --lts // Install Node latest version
$ nvm install <node_version>
$ nvm use <node version>
$ nvm alias default <node version>
Note: if nvm command not found, add line below to ./zshrc
source $(brew --prefix nvm)/nvm.sh3. Install Yarn command
$ brew install yarn
4. How to show NPM Scripts in Visual Studio Code
Go to View > Open View > Select NPM Script
5. Install Many Java Verison in Mac OS
$ /usr/libexec/java_home -V // All Java Installed will show here
6. Install Many Java Version nin MacOS by SDKMAIN
Ref : https://sdkman.io/usage
// Download SDK
$ curl -s "https://get.sdkman.io" | bash
// Change SDK Man
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
// Check SDK version
$ sdk version
// List packages
$ sdk list or sdk list <package_name>
// Install Java
$ sdk install java
$ sdk install java 8.0.42
// Set use special version
$ sdk use scala 3.4.2
// Set default version
$ sdk default scala 3.4.2
// Check Current version
$ sdk current java
React Native on WearOS
August 26, 2024 |
Ref:
https://github.com/fabOnReact/react-native-wear-connectivity?tab=readme-ov-file
I. Create React Native Project on Android
#Remove previous cli
$ npm uninstall -g react-native-cli @react-native-community/cli
#Init project
npx @react-native-community/cli@latest init AwesomeProject
#Edit package.json; Run on Default Port 8081 & Select Device
#Create Android Simulator# In Android Simulator > Install Google Watch App/Wear OS App
#Paire Wear Devices
- Code in App.tsx
II. Create React Native Project on WearOS
#Remove previous cli
$ npm uninstall -g react-native-cli @react-native-community/cli
#Init project
npx @react-native-community/cli@latest init AwesomeProject
#Edit package.json , Run on Port 8082 & Select Device
Try test app:
Wear Device:





Previous Article