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> ...
Posted by joecooper on Sat, 12 Oct 2019 07:07:57 -0700
leetcode352. Data Stream as Disjoint Intervals
Subject requirements
Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals.
For example, suppose the integers from the data stream are 1, 3, 7, 2, 6, ..., then the summary will be:
[1, 1]
[1, 1], [3, 3]
[1, 1], [3, 3], [7, 7]
[1, 3], [7, 7]
[1, 3], [6, 7]
** ...
Posted by Zmodem on Sat, 12 Oct 2019 03:25:14 -0700
Web pack related configuration
//Since webback is built on nide, any legal node code is supported when configuring files.// 1. Import Path Template
const path =require('path');
// Import plug-ins that generate html pages in memory
const htmlWebpackPlugin = require("html-webpack-plugin")
// 2. Operating through modules in node To expo ...
Posted by gammaman on Fri, 11 Oct 2019 13:19:29 -0700