Hutool tools are not confused
Foreword
This is the third day of my participation in the revision challenge in November. See the activity details: the last revision challenge in 2021. Are you still encapsulating tool classes and tool methods in the project? Let Hutool help you. It is a friendly alternative to the util package in the project, covering all aspects of ...
Added by Jimmy79 on Mon, 20 Dec 2021 09:38:50 +0200
Linear algebra and code implementation vector
Linear algebra and code implementation (I) vector
background
The Linear Algebra I studied in university is a little forgotten now, and I am not proficient in the code implementation; This column mainly reviews the basis of linear algebra and implements the code part;
1. Some basic concepts
Essence: the basic expression of a group of numbers ...
Added by st89 on Mon, 20 Dec 2021 00:41:40 +0200
Android framework: Binder fully parses and understands everything
Link: https://juejin.im/post/6869953788388573192
Get ServiceManager from Java layer
In the previous article, I went to the getIServiceManager() method to get the ServiceManager object.
getIServiceManager()
//frameworks/base/core/java/android/os/ServiceManager.java
private static IServiceManager getIServiceManager() {
if (sServiceManager ...
Added by Cal on Sun, 19 Dec 2021 22:43:42 +0200
Interviewer: rm delete the file space to free it?
In Linux, have you ever naively thought that if you delete a file with rm, the occupied space will be released? Things may not always be what you want.
Generates a random content file of a specified size
Let's take a look at the current space size of each mounted Directory:
$ df -h
/dev/sda11 454M 280M 147M 66% /boot
I selected ...
Added by wing_zero on Sun, 19 Dec 2021 19:57:48 +0200
springboot: will @ Async execute asynchronously when using nested asynchronous annotations
1, Introduction
In the previous article[ springboot: those pits that use asynchronous annotation @ Async >The incorrect usage of using @ Async annotation to obtain task execution results is introduced in. Today, let's share another common error.
2, Code demonstration
Here is the code of my controller,
package com.atssg.controller;
impor ...
Added by keegan on Sun, 19 Dec 2021 19:20:15 +0200
Java CAS principle analysis, MySQL 10 million data deep paging optimization
The CAS operation process mentioned above is not very difficult. But the above description is not enough. Next, I will introduce some other background knowledge. With these background knowledge, we can better understand the follow-up content.
2. Background introduction
As we all know, CPU transmits data through bus and memory. In the multi- ...
Added by Quevas on Sun, 19 Dec 2021 04:07:17 +0200
The end of Java concurrency series: thoroughly understand the working principle of java thread pool and want to enter BTAJ
//Use the thread pool to perform a task
executor.execute(() -> {
// Do something
});
//Closing the thread pool will prevent the submission of new tasks, but it will not affect the submitted tasks
executor.shutdown();
//Close the thread pool, prevent new task submission, and interrupt the currently running thread
executor.showdownNow( ...
Added by Traveller29 on Sat, 18 Dec 2021 16:26:50 +0200
Python game development, python to achieve Snake games and eat beans with source code
development tool
Python version: 3.6 four
Related modules:
pygame module;
And some Python built-in modules.
Environment construction
Install Python and add it to the environment variable. pip can install the relevant modules required.
Principle introduction
I don't need to introduce the rules of the snake game, T_T. Writing a snake gam ...
Added by faheemhameed on Sat, 18 Dec 2021 05:53:41 +0200
2021 latest Ali Java advanced interview questions and answers, three concurrent tool classes frequently asked in interviews
Semaphore is a count based semaphore.
It can set a threshold. Based on this, multiple threads compete to obtain the license signal and return it after making their own application. When the threshold is exceeded, the thread application license signal will be blocked.
Semaphore can be used to build some object pools and resource pools, such as ...
Added by kostik on Fri, 17 Dec 2021 09:29:56 +0200
How can the 38 year old middle-aged unemployed live? Java basic interview question - multithreading
[](
)Callable thread creation
public class CallableTest {
public static void main(String[] args) throws ExecutionException,InterruptedException {
// new Thread(new Runnable()).start();
// new Thread(new FutureTask<V>()).start();
// new Thread(new FutureTask<V>( Callable )).start();
new Thread ...
Added by shwathi on Fri, 17 Dec 2021 02:53:10 +0200