Flask login exercise
Login based on blueprint CBV mode
Use blueprint and cbv mode to complete login function
Jump to the home page after login
Save the session in the redis database on liunx
Verify whether it is the login user by using "before" request
blueprint
from flask import Blueprint,render_template,redirect,views,request,session
user = B ...
Posted by Petty_Crim on Sat, 26 Oct 2019 12:00:19 -0700
Notes on node.js+mongodb+express to realize simple version of blog management system
I. Case initialization
Related folders
public: static resources
model: database related files
Route: route
views: template files
Build project description file
npm init -y
Download third party module
npm i express mongoose art-template express-art-template
Create server
const express = require ...
Posted by richo89 on Sat, 26 Oct 2019 00:26:17 -0700
RabbitMQ notes - getting started
Rabbitmq is a popular open source message queuing system, which is developed in erlang. The default port number is 5672, while the default port number of its background management system is 15672. The content of this blog post is an entry program used by rabbitmq, including message producers and cons ...
Posted by nlhowell on Fri, 25 Oct 2019 10:33:08 -0700
Analysis of SQL Server Trigger and its application
I. what is trigger
trigger is a method provided by SQL server to programmers and data analysts to ensure data integrity. It is a special stored procedure related to table events. Its execution is not called by programs or started manually, but triggered by events. (--- from Baidu Encyclopedia)
Simp ...
Posted by 99degrees on Thu, 24 Oct 2019 03:53:16 -0700
Apache Kudu cannot delete nonexistent data
Extend KafkaConnect Sink with Apache Kudu client.
Java client of Apache Kudu used. Suddenly one day, I found that the job could not be submitted, and I kept reporting an error.
Later, it was found that this is a verification mechanism of Kudu itself. In order to ignore this verification mechanism, and more in line with our SQL habits, I have ...
Posted by simmosn on Wed, 23 Oct 2019 07:02:25 -0700
AJAX for Java Web Learning
AJAX for Java Web Learning
What I bring you today is AJAX project analysis.
AJAX = Asynchronous JavaScript and XML.
The biggest advantage of AJAX is that it can exchange data with the server and update part of the web content without reloading the whole page.
Brief introduction of project content: wha ...
Posted by joejoejoe on Tue, 22 Oct 2019 08:16:59 -0700
The implementation of Facade in thinkphp
What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([
facade\App::class => App::class,
facade ...
Posted by cloudnyn3 on Mon, 21 Oct 2019 20:15:54 -0700
Analysis of the learner in zk
The parent class of observer and follower when learning defines common properties and methods
Subclasses Follower and Observer
Internal class:
PacketInFlight indicates that there is no commit message in the proposal
static class PacketInFlight { TxnHeader hdr; Record rec; }
Properties:
QuorumPeer
Server node
LearnerZooKeep ...
Posted by sp@rky13 on Mon, 21 Oct 2019 13:22:02 -0700
zk request processing class PrepRequestProcessor
As the first request processor of leader, PrepRequestProcessor can identify whether the current client request is a transaction request. If so, it will carry out a series of preprocessing, create the request transaction header, transaction body, session detection, ACL check and version detection.
attribute
Construction method
Method
Subm ...
Posted by bigray on Mon, 21 Oct 2019 13:06:36 -0700
Solve the problem of null session caused by the front end cross domain access session ID inconsistency caused by the separation of front end and back end projects of vue+springboot.
Problem: the front-end cross domain access to the back-end interface does not carry cookie s by default under the browser's security policy, so each request opens a new session.
When we print the sessionID in the background, we will find that the sessionID of each request is different. Since each request is a new session, it is naturally null ...
Posted by robotta1530 on Mon, 21 Oct 2019 09:12:28 -0700