Private toolset 7 -- Token timeliness verification in webapi

Confucius said: if a worker wants to do well, he must sharpen his tools first github: https://github.com/redAntCpp/CSharpTools Next to the previous article, the previous article only realizes the generation and parsing of token, and incidentally mentions the verification mechanism. However, in actual business, it is usually necessary to ver ...

Added by shah on Sat, 19 Feb 2022 17:44:55 +0200

Class and object knowledge points

C + + will provide a default constructor, destructor and default copy constructor   Shorthand method of constructor CCylinder(double r,double h) { radius=r; height=h; }; ==>CCylinder(double r,double h):radius(r),height(h){} [this method is limited to constructors]   Allocate space during construction and release space during deco ...

Added by kbrij on Sat, 19 Feb 2022 17:43:56 +0200

rxjava2 source code analysis and thread switching analysis

usage method Let's start with the most basic use: Observable.create(new ObservableOnSubscribe<String>() { @Override public void subscribe(ObservableEmitter<String> emitter) throws Exception { emitter.onNext("1"); emitter.onNext("2"); emitter.onNext("3" ...

Added by harryman100 on Sat, 19 Feb 2022 17:41:20 +0200

Implementation and analysis of time wheel and time wheel in go zero

Time wheelUsed to delay the scheduling of tasks.sceneImagine a scenario where I need to maintain a connection pool. The connection in the connection pool has a timeout time. The connection will maintain a certain frequency to send heartbeat packets. For example, it will expire in 5s if I don't receive keep alive within 30s. conn will disconnect ...

Added by cavedave on Sat, 19 Feb 2022 17:38:08 +0200

[source code analysis] the child process of parallel distributed task queue Celery processes messages

[source code analysis] the child process of parallel distributed task queue Celery processes messages 0x00 summary Celery is a simple, flexible and reliable distributed system that processes a large number of messages. It focuses on asynchronous task queue for real-time processing, and also supports task scheduling. In the previous article, w ...

Added by jawinn on Sat, 19 Feb 2022 17:24:43 +0200

Finding the median of two positive arrays [difficult]

subject Give two positively ordered (from small to large) arrays nums1 and nums2 of sizes m and n, respectively. Please find and return the median of these two positive arrays. The time complexity of the algorithm should be O(log (m+n)). Tips:      ~~~~      num ...

Added by angus930 on Sat, 19 Feb 2022 17:21:24 +0200

A brief analysis of JUC source code Semaphore

Related reading A brief analysis of JUC source code AbstractQueuedSynchronizerBrief analysis of JUC source code ReentrantLock brief introduction Semaphore is an auxiliary class for thread synchronization. It internally maintains the number of threads currently accessing itself and provides a synchronization mechanism; Using Semaphore, you ca ...

Added by the-botman on Sat, 19 Feb 2022 17:13:06 +0200

SQL syntax summary

SQL SELECT statement reference resources: https://www.w3school.com.cn/sql/sql_select.asp The SELECT statement is used to SELECT data from a table. The results are stored in a result table (called a result set). 1. SQL SELECT statement SELECT Column name FROM Table name And: SELECT * FROM Table name Note: SQL statements are case insensi ...

Added by XeroXer on Sat, 19 Feb 2022 17:12:19 +0200

Some related configurations of Vue router (notes)

1, Reference CDN to build a simple route Official website address: https://router.vuejs.org/zh/installation.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"&g ...

Added by crzyman on Sat, 19 Feb 2022 16:56:00 +0200

What is the difference between String, StringBuffer and StringBuilder of Java foundation?

What is the difference between String, StringBuffer and StringBuilder of Java foundation? 1.String 1.1 String memory storage Storage method: use char array inside the string to save the contents of the string. Each bit in the data stores a character. The length of char array is also the length of the string. For example, the storage method o ...

Added by harman on Sat, 19 Feb 2022 16:41:54 +0200