Recently, a small project just needs to use the search function to input data in the search box, press enter or click Submit, and then process the data to the background database and return it to the front end, and locally update the data in the front end.
But there is a small problem, that is, after entering any input box in the form form and ...
Posted on Mon, 04 May 2020 23:30:06 -0700 by geo3d
Execute integration test mysql deploy with docker
The integration test needs to use flywayDB to manage the script information of the database according to the test case. Each time before the production goes online, it must pass the integration test to verify the accuracy of the data. Therefore, each integration test is the database instanc ...
Posted on Mon, 04 May 2020 17:40:07 -0700 by Entanio
Top class of Throwable exception handling class
Error (server crash database crash)
Exception (exception class): runtimeException (runtime exception)
// Corner sign out of range
int num = new int;
Posted on Mon, 04 May 2020 15:04:20 -0700 by love_php
To create a table:
create database Database name;
CREATE DATABASE mybase;
use Database name
Create data table format
create table Table name(
Column name 1 data type constraint,
Column name 2 data type constraint,
Column name 3 ...
Posted on Sun, 03 May 2020 12:56:35 -0700 by drums
This reptile has been writing for a long time. It hasn't updated its blog for a long time.
1. The first idea is: you can easily and quickly grab the web page through the curl Φ setopt() function of php.
2. What kind of news attracts people? Of course, hot news. Here choose Baidu's search billboard to get a list of hot keywords.
3. For th ...
Posted on Sun, 03 May 2020 06:30:08 -0700 by bigscanner
How to assign different DB to different crawler items instead of just using db0
By default, redis will generate 16 dB: db0 ~ db15. When writing a scrape redis distributed crawler, db0 will be used by default to store the de duplication, seed queue and item data. But in general, we don't have only one crawler project. If we put ...
Posted on Sun, 03 May 2020 03:16:03 -0700 by TheFilmGod
How does python access the database? Through the database interface DB-API, it is a standard to clarify a series of required objects and database access mechanisms. It can provide consistent access for different database adapters and underlying database systems.
In order to access the database, python has developed many adapters for connecting ...
Posted on Sun, 03 May 2020 00:47:37 -0700 by harshilshah
1. JPA Core API Objects
1.1.Persistence persisted object
Persisitence is primarily used to create an EntityMangerFactory, which can create a corresponding EntityMangerFactory based on the persistence unit name passed in.
// Corresponding profile persistence-unit name="cn.yif.jpa02"
// Create an entity class management factory by persisting cla ...
Posted on Sat, 02 May 2020 16:26:24 -0700 by ShibSta
1, Create two tables and associate foreign keys
Import ForenginKey module
# -*- coding: UTF-8 -*-
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, DATE, Enum
from sqlalchemy import ForeignKey
from sqlalchemy.orm import sessionmaker
engine = create_eng ...
Posted on Sat, 02 May 2020 16:05:45 -0700 by Kisses
1. Use MongoDB module for operation
First, install the mongodb module in the working directory,
1 cnpm i mongodb//Lead in module
const MongoClient = require('mongodb').MongoClient;
//Write connection string,My database address is as follows,So when you're writing, just change the address
const DB_CONN_STR= 'mongodb://127.0.0.1/demo';
Posted on Sat, 02 May 2020 15:31:39 -0700 by daimoore