Java optimistic lock and pessimistic lock

What is the difference between optimistic locks and pessimistic locks?

In simple terms, optimistic locks assume that those who take data will not be modified, so they are locked only when reading, to determine whether the data is updated after reading. Pessimistic locks assume that data will be modified every time it is read, so locks will be applied when reading. When one thread is used, other threads will block.

Sorting out Java collection related issues

What is the difference between ArrayList and LinkedList?

  1. ArrayList is the data structure implementation of dynamic array, while LinkedList is the data structure implementation of two-way linked list.

  2. ArrayList is more efficient than LinkedList in random access. Because LinkedList is a linear data storage mode, you need to move the pointer to search from front to back.

Is Java parameter transfer a value transfer or a reference transfer?

The Java language can only pass parameters by value. When an instance object is passed to a method as a parameter, the value of the parameter is a copy of the object's reference. Pointing to the same object, the content of the object can be changed within the called method, but the reference of the object (not the copy of the reference) will never change.

Open source intranet penetration tool frp simple use tutorial

Note: This tool depends on a PC or server with a public IP address.

First, let's talk about the original requirements. As we all know, the number of IPv4 network addresses is very limited, only about 4.3 billion. With the development of the global Internet, it is obviously impossible for every device to be assigned to IPv4 addresses.

EDMAG download station closing notice

EDMAG download station will be officially and permanently closed from now on (2016-10-24)!

EDMAG download station (original 52 download), originally because I like to collect movies, but I have to go to many places to find resources every time. I feel very troublesome, so I wrote a crawler integrating multiple resource stations, and then wrote a simple front-end interface, so 52 download resource station was born. It has been one year and ten months since I came to the present EDMAG download station after several setbacks, But, everything that has a beginning, has an ending~

Blog fully enables HTTPS protocol support

Recently saw a message from Google Chrome( Google Chrome 56 will mark HTTP pages as unsafe from 2017 )In addition, the original domain name of the blog has been blocked recently, and the security problem of the Web has become increasingly prominent. It seems that from now on, the website without HTTPS means that it is unsafe, so I took the time to turn my blog to HTTPS. After two days of testing and deployment, the Techzero blog has fully enabled HTTPS http://www.techzero.cn/ Access will be automatically forced to jump to https://www.techzero.cn/

Google Chrome 56 will mark HTTP pages as unsafe from 2017

In the Google security blog on September 8, the Google security team announced that in order to make it easier for users to understand whether the connection between them and the website is secure, From the official release of Chrome 56 in January 2017, Google will thoroughly mark HTTP pages containing personal privacy sensitive content such as password login and transaction payment as [unsafe], and will gradually mark all HTTP websites as [unsafe] in the subsequent updated version of Chrome