Chapter 3: sparse arrays and queues

Chapter 3: sparse arrays and queues 1. Sparse array 1.1 actual demand The Gobang program has the functions of saving, exiting and continuing the upper board Because many values of the two-dimensional array are the default value of 0, many meaningless data are recorded. We convert them into sparse arrays for storage 1.2. Sparse array appl ...

Posted by Michael Lasky on Wed, 24 Nov 2021 07:35:42 -0800

Chapter 7 sorting algorithm

Chapter 7 sorting algorithm 1. Introduction to sorting algorithm 1.1 introduction to sorting algorithm Sorting is also called sort algorithm. Sorting is the process of arranging a group of data in a specified order. 1.2 classification of sorting algorithms Internal sorting: refers to loading all data to be processed into internal memory (mem ...

Posted by james19 on Wed, 24 Nov 2021 07:33:13 -0800

It turns out that this is the correct implementation of multithreading

Java Memory Model Thread synchronization Thread synchronization mechanism is a set of data access mechanism suitable for coordinating threads, which can ensure thread safety The thread synchronization mechanism provided by the java platform includes lock, volatile keyword, final keyword, static keyword, and related API s such as obje ...

Posted by jzimmerlin on Wed, 24 Nov 2021 07:14:29 -0800

Alibaba cloud - build an on cloud blog

2. Deployment environment This tutorial uses Apache as the back-end server and creates a MySQL database on the ECs to store data. one   On the ECS server, execute the following command to install the Apache service and its extension package. yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql If a result similar to the ...

Posted by jesushax on Wed, 24 Nov 2021 07:09:46 -0800

An sql blind injection practice_ easysql writeup

An sql blind injection practice preface The title is a ctf web penetration question. You need to penetrate into the database, get the correct flag and submit it. 1. Preliminary observation Casually enter the account and password, and it is found that a php code is echoed on the page. It seems that it is necessary to construct the string of sql ...

Posted by JayLewis on Wed, 24 Nov 2021 06:59:10 -0800

Usage and analysis of AES symmetric encryption

First of all, I use the OpenSSL library to implement the encryption. When using, I need to import these libraries and header files, which have been uploaded to GitHub. First pull them down from here. 1, Introducing AES encryption: AES is a symmetric encryption algorithm. You can specify your own key to participate in the encryption of plainte ...

Posted by jay7981 on Wed, 24 Nov 2021 06:52:33 -0800

A note to understand Sentinel @ SentinelResource summary

@SentinelResource can be said to be a breakthrough in Sentinel learning. Understanding the application of this annotation basically clarifies most of Sentinel application scenarios. 1, @ SentinelResource resolution Sentinel provides @ SentinelResource annotation to define resources, and provides AspectJ extension to automatically define resou ...

Posted by sublevel4 on Wed, 24 Nov 2021 06:41:53 -0800

Record the principle and Java implementation of snowflake algorithm

1. Basic understanding: SnowFlake algorithm is an open source distributed id generation algorithm for Twitter. The core idea is to use a 64 bit long number as the globally unique id. It is widely used in distributed systems, and ID introduces timestamp, which basically keeps self increasing. There are detailed comments in the following code.&nb ...

Posted by mpiaser on Wed, 24 Nov 2021 06:36:20 -0800

In depth understanding of MapReduce principle

1. Overview and principle of MapReduce MapReduce is a distributed computing model   MapReduce runs distributed and consists of two stages: Map and reduce. The Map stage is an independent program, with many nodes running at the same time, and each node processes part of the data. The reduce phase is an independent program, with many nodes ...

Posted by mausie on Wed, 24 Nov 2021 06:28:35 -0800

[bloom filter] I

[bloom filter] I One of the solutions to cache penetration is the bloom filter Cache penetration: refers to data that does not exist in the cache or database, but users constantly initiate requests, such as data with id "- 1" or other nonexistent data. At this time, the user is likely to be an attacker, and the attack will lead to exc ...

Posted by yzerman on Wed, 24 Nov 2021 06:25:59 -0800