DRF+VUE realizes password and verification code login
#1, User name + password + jwt authentication to achieve login authentication
The following are some codes of VUE front-end login interface
<div class="inp" v-if="login_type==0">
<input v-model="username" type="text" placeholder="user name / phone number" class="user">
<input v-model="password" type="pass ...
Posted by webslinger on Thu, 11 Nov 2021 11:17:06 -0800
Minimalist design pattern factory pattern
Factory Pattern
sketch
There are three types of factory modes.
1. Simple factory mode.
2. Factory method mode.
3. Abstract factory pattern.
Principles and ideas of design
Encapsulate the creation of objects in factory classes to decouple the creation and use of objects.
Product hierarchy and product family
Product hierarchy : ...
Posted by Ruiser on Thu, 11 Nov 2021 11:15:03 -0800
Use of Spring Data Redis Stream
1, BackgroundThe Stream type is a new type after redis5. In this article, we use Spring boot data redis to consume the data in Redis Stream. Realize independent consumption and consumption group consumption.2, Integration steps1. Import jar package<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId& ...
Posted by awiedman on Thu, 11 Nov 2021 11:07:58 -0800
How to solve bracket related problems
https://labuladong.gitee.io/algo/4/32/135/
After reading this article, you can not only learn the algorithm routine, but also win the following topics on LeetCode:
20. Valid parentheses (simple)
921. Minimum addition to make parentheses valid (medium)
1541. Minimum insertion of balanced bracket string (medium)
-—–
Judge legal bracket string
T ...
Posted by Begby on Thu, 11 Nov 2021 10:42:52 -0800
Implementation of C language minesweeping game (detailed analysis)
Let's sort out our ideas first, and then write the mine sweeping code. In this way, we can write the code efficiently
1. First of all, play the game with at least one interface! The interface allows people to choose whether to play the game or quit, or continue to play after playing the game
2. Initialize array
3. Print chessboard
4. Number ...
Posted by ltd on Thu, 11 Nov 2021 10:38:57 -0800
Learning notes: implementing OPT FIFO LRU LFU with JAVA
Note: the note is about the implementation of page replacement algorithm by fengsigaoju boss( (35 messages) java implements the page replacement algorithm (OPT,FIFO,LRU) _fengsigaoju's blog - CSDN blog _pagereplacement algorithm code java )Learning, invasion and deletion.
I have been learning JAVA for one month. If there are any deficiencies, ...
Posted by ruppelm on Thu, 11 Nov 2021 10:29:03 -0800
C + + Abstract container type I (vector, list)
1, Container
When you first understand containers, you can think of containers as libraries that provide a series of specific functions.
2, Common containers
STL Classification of standard template library:
Sequence container:
vector: Vector container
list : List container
deque : Dual ended queue ...
Posted by herschen on Thu, 11 Nov 2021 10:27:33 -0800
[knowledge map] py2neo basic operation (November 11, 2021)
1. Connect to Neo4j database
To operate Neo4j through python, you first need to install py2neo, which can be installed directly using pip.
pip install py2neo
After installation, open pycharm and call py2neo
from py2neo import Graph,Node,Relationship
test_graph = Graph (
"http://localhost:7474",
username="neo4j",
password="neo4j"
...
Posted by massive on Thu, 11 Nov 2021 10:24:58 -0800
Payment transaction limit
1, Background
Technology stack: Redis+Lua
Double eleven is a festival that belongs to e-commerce rather than operators. However, goose has no choice but to be on duty. After zero, the flow of the payment system rises for half an hour, and then it runs stably. With a serious and responsible attitude, I'd better stick to it all night. I ...
Posted by yuws on Thu, 11 Nov 2021 10:05:33 -0800
Reflection of [JavaSE basic review] (including practice Demo)
reflex
1. Class loader
1.1 loading of class
When a program wants to use a class, if the class has not been loaded into memory, the system will initialize the class through three steps: loading, connecting and initialization.
load This is to read the class file into memory and create a class object for it. When any Class is used, the sy ...
Posted by Rederick on Thu, 11 Nov 2021 10:05:08 -0800