Python multitasking protocol

Preface The core point of the collaboration is the use of the collaboration, that is, you only need to know how to use the collaboration; but if you want to know how to achieve the collaboration, you need to know the iterator, the generator in turn. If you only want to see the use of the coordinator, you just need to look at the first part; i ...

Posted by Kitkat on Mon, 14 Oct 2019 23:48:58 -0700

[BZOJ3295][Cqoi 2011] Dynamic Inverse Sequence Pairs

[BZOJ3295][Cqoi 2011] Dynamic Inverse Sequence Pairs Tree nest tree | | CDQ divide and conquer I feel that the tree cover tree is better to think about. It can be reduced without thinking. However, my tree cover tree was hit several months ago, and it has not been transferred yet. CDQ is good tune, but the idea is not good. We regard deletio ...

Posted by a6000000 on Mon, 14 Oct 2019 13:02:38 -0700

Python Introduction and Basic Knowledge

1. notes * * 1.1 single line comment # The first python annotation 1.2 Multi-line Notes The first one python Notes' ' ** 2. Specify the spacer sep** When there is no sep, the default spacer is a space >>> print(1,2,3) 1 2 3 You can specify spacers when there is sep For example, sep=&qu ...

Posted by edtlov on Mon, 14 Oct 2019 11:23:37 -0700

Current Limiting Technology for High Concurrent Solution--Counter

1. It is the simplest and easiest current limiting algorithm. The counter realizes current limiting by allowing only 10 requests per minute for the first request to enter at startTime, and only 10 requests within startTime + 60s. When there are more than ten requests in 60s, refuse, do not exceed, and reset time in 60s package com.aiyues ...

Posted by brandye71 on Mon, 14 Oct 2019 10:07:56 -0700

How does Redis actually achieve the function of "nearby people"?

Preface For the application scenario of "nearby people" in the field of location-based services, many spatial indexes such as PG, MySQL and Mongo DB can be used to implement it. Redis, which combines its ordered queue zset and geohash coding, achieves the function of spatial search and has a very high operational efficiency. This pap ...

Posted by reidme on Mon, 14 Oct 2019 03:14:34 -0700

vue dynamic form

According to the requirement of the project, the data should be returned according to the background interface, and the form content should be added dynamically.   Description: This component is based on Ant Design of Vue   Six form controls are currently supported: Text Input, Text Area, Select Input, Select Multiple, Data Picker, and Data ...

Posted by aalmos on Sun, 13 Oct 2019 10:09:55 -0700

Input and output streams (IO streams) in Java

How to use read in java: Abstract int read() reads the next byte of data from the input stream (less efficient) int read(byte[] b) reads a certain number of input streams and stores them in buffer array B. Int read(byte[] b, int off, int len) reads the most len data bytes in the input stream into the b ...

Posted by karimali831 on Sat, 12 Oct 2019 14:11:48 -0700

CF--Primes on Interval--Several Writings of Thinking+Primes Screening+Dichotomy

You've decided to carry out a survey in the theory of prime numbers. Let us remind you that a prime number is a positive integer that has exactly two distinct positive integer divisors. Consider positive integers a, a + 1, ..., b (a ≤ b). You want to find the minimum integer l (1 ≤ l ≤ b - a + 1) su ...

Posted by mutedgirl on Sat, 12 Oct 2019 14:09:52 -0700

Implementation of Snowflake Algorithms in php (ID Incremental)

A brief description of the snowflake algorithm: The highest bit is the symbol bit, always 0, not available. 41-bit time series, accurate to milliseconds, 41-bit length can be used for 69 years. Time bits also play an important role in sorting by time. The 10-bit machine identifier and the 10-bit length support the deployment of 1024 nodes at mo ...

Posted by meediake on Sat, 12 Oct 2019 08:11:07 -0700

JSONPATH json parsing tool

1. jsonPath's address on github is as follows: https://github.com/json-path/JsonPath 2. json-path Quick Start Operators in json-path 2. Functions available in json-path 3. Filter operators     3. maven dependence <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId&gt ...

Posted by joecooper on Sat, 12 Oct 2019 07:07:57 -0700