Java lock mechanism

In the multithreaded environment, programs often have some thread safety problems. Therefore, Java provides some thread synchronization mechanisms to solve the safety problems, such as synchronized Lock and Lock lock. Pessimistic lock and optimistic lock We can roughly divide locks into two categories: Pessimistic lock Optimistic lock As ...

Posted by hmemnon on Thu, 02 Dec 2021 18:47:56 -0800

Principle analysis of PriorityBlockingQueue

PriorityBlockingQueue is an unbounded array based priority blocking queue. The default length of the array is 11. Although the length of the array is specified, it can be expanded indefinitely until the resources are exhausted. Each time out of the queue, the element with the highest or lowest priority is returned. By default, elements are sort ...

Posted by djmc48 on Thu, 02 Dec 2021 18:22:51 -0800

[back end integration] new program Day7

1. Axios post request 1.1 types of common post requests form submission method = "post" synchronization (element: whether the page is refreshed)axios.post() asynchronous operation 1.2 introduction to Axios post   1.2.1 edit front-end JS <!DOCTYPE html> <html> <head> <meta charset="utf-8"> &lt ...

Posted by luxluxlux on Thu, 02 Dec 2021 14:11:10 -0800

JUC learning - blocking queue 1

6,PriorityBlockingQueue An unbounded blocking queue that supports prioritization. The elements entering the queue will be sorted according to priority. public class PriorityBlockingQueue<E> extends AbstractQueue<E> implements BlockingQueue<E>, java.io.Serializable The unbounded priority blocking queue uses an array to ...

Posted by paulnaj on Thu, 02 Dec 2021 13:51:32 -0800

Advanced pointer of C language

preface 1. Pointer is a variable used to store address. The address uniquely identifies a piece of memory space. 2. The size of the pointer is fixed 4 / 8 bytes (32-bit operating system / 64 bit operating system). 3. Pointers are typed. The type of pointer determines the step size of ± integer and the permission of operation memor ...

Posted by steved on Thu, 02 Dec 2021 12:25:37 -0800

Two Wrong Writings for Iterator Traversal Collection [java]

Two Writing Errors for Iterator Traversal Sets Error Mode One: eg: package iterator; import java.util.Collection; import java.util.ArrayList; import java.util.Iterator; public class IteratorDemo5 { public static void main(String[] args) { Collection c1 = new ArrayList(); c1.add(1234); c1.add("abc"); c1.a ...

Posted by Rayne on Thu, 02 Dec 2021 10:33:21 -0800

Network programming in java

1, What is network? In the computer field, the network is a virtual platform for information transmission, reception and sharing. Through it, all points, surfaces and bodies are connected together, so as to realize the sharing of these resources. Function: information transmission and resource sharing A little: resource sharing is free 2 ...

Posted by BraniffNET on Wed, 01 Dec 2021 18:58:37 -0800

2021 geek challenge

Geek challenge 2021 Welcome2021 Test site: http header request method F12, prompt, please use the WELCOME request method to request this web page burp captures packets, modifies the request method, and finds f11111aaaggg9.php Request the flag again Dark Tor browser (onion browser) can be accessed directly. But the premise is that you need ...

Posted by jamcoupe on Wed, 01 Dec 2021 16:08:49 -0800

[Bukkit plug-in development tutorial] [high quality plug-in series] [protocol] teaches you how to Ping the server from the outside

Introduction         As we all know, the server and client of Minecraft are separated. The client and the server communicate with each other through TCP / IP (especially Java version and UDP version) (so we need to configure the port property of server.properties on the server and the input required for client connection & ...

Posted by Xproterg^vi on Wed, 01 Dec 2021 15:28:20 -0800

Java -- network programming

1. What is network? In the field of computer, network is a virtual platform for information transmission, reception and sharing. Through it, all points, faces and bodies are linked together So as to realize the sharing of these resources Function: information transmission and resource sharing Advantages: sharing resources is free 2 ...

Posted by dgny06 on Wed, 01 Dec 2021 14:30:57 -0800