C core creates the first API project
1. Install VS 2019, SQL Server 2019 (Optional)
2. Open VS and select new ASP.NET Core Web Application project
3. Fill in project name, solution name, modify storage path, etc.
4. Select the version of. NET Core. By default, we select 3.1 and API.
This is the default directory structure after ...
Posted by toysrfive on Thu, 12 Mar 2020 03:59:10 -0700
Thinking about the pconnect long link of PHP redis
Throw question
Some time ago, a big guy said that PHP redis's pconnect can't realize long links. After the request ends, the connection is released. I have doubts in my mind. If so, why does PHP redis have connect and pconnect?
Search document
The connection will not be closed on end of request un ...
Posted by NightCoder on Thu, 12 Mar 2020 01:23:19 -0700
The general interface of psr/log log database
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
composer require psr/log
Log interface specification
In this paper, the general interface specification of log class library is established.
The main purpose of this specification is to make the log class library record log information by receiving a Ps ...
Posted by mark_18 on Wed, 11 Mar 2020 23:05:21 -0700
express learning notes (generate project, route, route handler, use mysql, ejs template)
Generation project
Sir, a package.json
cnpm init
Node? Modules folder, which contains the modules provided by node.js
cnpm install
Install Express scaffolding
cnpm i express-generator
Install express
**cnpm install express --save**
Create an Express application named myapp, use ejs template engine ...
Posted by mrwutang on Wed, 11 Mar 2020 22:31:25 -0700
Truncate all tables in MySQL database with one command?
Is there a query (command) that truncates all tables in the database in one operation? I wonder if this can be done through a query.
#1 building
I found that even after NOCHECK CONSTRAINT ALL, TRUNCATE TABLE.. still has a foreign key constraint problem, so I used the DELETE FROM statement instead. This does mean that the identity seed wi ...
Posted by scottlowe on Tue, 10 Mar 2020 05:08:01 -0700
CSRF (Cross Site Request Forgery) Cross Site Request Forgery
0. Preface
CRSF is based on session, which sounds like XSS cross site scripting attack, but in fact, the attack mode is totally different. When I wrote XSS, I mentioned that many websites would use cookie s to save the login information of users. For example, when I finished using CSDN last night, I c ...
Posted by Kryllster on Mon, 09 Mar 2020 22:06:02 -0700
CRUD of MyBatis single table
crud of MyBatis single table
Create maven project and add dependency, junit, mysql, and mybatis(3.4.6)
Create the configuration file of mybatis under Resources
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http ...
Posted by mechamecha on Mon, 09 Mar 2020 20:28:34 -0700
Request request summary
Request line:
Request Method, Request Address and Parameters
public class LineServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//1. How to get the request
String method = request.getMethod( ...
Posted by witham on Mon, 09 Mar 2020 20:05:58 -0700
Source Code Resolution Quartz Distributed Cluster Implementation
1. Introduction
Previous articles have provided a preliminary introduction to the use of quartz quartz-2.2.3 Source Code Analysis and Integration of Quartz and Spring In this article, the Quartz distributed cluster implementation is analyzed from the source code perspective.
2. Quartz Cluster ...
Posted by Vorotaev on Mon, 09 Mar 2020 17:27:13 -0700
Comparison of DropDownList control and native dropdown in Asp
First of all, think about how to display the data in a List collection in the form of a drop-down box (select tag) without using the DropdownList control?
Use drop-down box (pure select) to display classification data
Steps:
Processing backend: ① Define a public userID variable in the back-end code to save the userID obtained in the url
public ...
Posted by justinh on Mon, 09 Mar 2020 04:07:40 -0700