Luogu P1886 Sliding Window (Monotone Queue)

Um...   Topic link: https://www.luogu.org/problem/P1886   Firstly, this problem is a typical template problem for standard monotonic queues (some people say monotonic queues can only solve this problem). This problem can be handwritten in a queue, or can be used in STL double-ended queue. Core idea: If a person is stronger and smaller than ...

Posted by nade93 on Fri, 11 Oct 2019 12:06:39 -0700

Java Self-Learning - Date and Date Formatting

Using SimpleDateFormat to format date in Java SimpleDateFormat date formatting class Example 1: Date to String y represents the year. M represents the month. d representative day H stands for 24-decimal hours h stands for 12-decimal hours m stands for minutes s stands for seconds. S stands for milliseconds package date; import java.text.Simp ...

Posted by alexvgtb on Fri, 11 Oct 2019 07:48:28 -0700

python web Framework Flask-csrf Attack

What is CSRF? Cross Site Request Forgery (Cross Site Request Forgery) is a network attack. It was listed as one of the 20 major security risks of the Internet in 2007. It is also known as "One Click Attack" or Session Riding. It is usually abbreviated as CSRF or XSRF. It is a malicious use of the website, which is known as phishing w ...

Posted by phpnow on Thu, 10 Oct 2019 23:48:03 -0700

Snowflake algorithm-variant-53 bits

For most common applications, there is no need for more than 4 million IDs per second, and the number of machines is less than 1024. So we can improve the method of ID generation by using shorter IDs: 53 bitID is composed of 32 bits second timestamp + 16 bits self-increasing + 5 bits machine identification. It accumulates 32 machines and gener ...

Posted by yellowzm on Thu, 10 Oct 2019 20:14:05 -0700

Snowflake algorithm-native

Snowflake algorithm is a distributed primary key generation algorithm published by Twitter. It can guarantee the non-repeatability of primary keys in different processes and the orderliness of primary keys in the same process. In the same process, it is guaranteed not to repeat through the time bit first, and if the time is the same, it is gua ...

Posted by geroid on Thu, 10 Oct 2019 19:51:55 -0700

Introduction to web Front-end to Practice: Introduction to JavaScrip Functional Programming Principles

After learning and using object-oriented programming for a long time, let's take a step back and consider the complexity of the system. After doing some research, I discovered the concepts of functional programming, such as invariance and pure functions. These concepts allow you to build functions without side effects, making it easier to main ...

Posted by Braveheartt on Thu, 10 Oct 2019 17:24:29 -0700

HTML Makes Simple Clocks

HTML Makes Simple Clocks Using HTML, CSS, jQuery, JS to make clocks can get the system time and make the pointers of the clocks change in real time without much code. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width= ...

Posted by ctsttom on Thu, 10 Oct 2019 14:04:50 -0700

[POJ-3273] Monthly Expense (dichotomy)

Monthly Expense Go straight to Chinese Descriptions Give you a sequence of length N, and now let you cut them into M parts (so each one is continuous), and then each one has a sum[i]. The largest one is maxSum = max(sum[i]). Ask what is the minimum of this maximum value? input Multiple Input and Output GroupsThe first row of each set of da ...

Posted by jrws on Thu, 10 Oct 2019 13:49:00 -0700

Weighted Line Segment Tree & Line Segment Tree Merge

Weight line segment tree The so-called weighted line segment tree is a maintenance value rather than a subscript line segment tree. I personally prefer to call it a range line segment tree. Chestnut: For a given array, a normal segment tree can maintain the sum of the numbers in a subarray, while a weighted segment tree can maintain the number ...

Posted by monkeypaw201 on Thu, 10 Oct 2019 10:28:19 -0700

React Source Reading - 4_033

React Source Reading-4 Context Context provides a way to pass data through a component tree without having to pass props attributes manually at each level. When to use Context Context aims to share data that can be considered "global" within a component tree, such as currently authenticated users, topics or preferred languages. con ...

Posted by rob_maguire on Thu, 10 Oct 2019 04:38:13 -0700