When using Baidu's face recognition, there are several points to pay attention to (mainly some errors)

The premise is to call Baidu face recognition interface under the vue framework vue project, unable to get this in the reader.onload function, unable to transfer the value to the global Solution: if you encounter this problem, use let that = this to record this in the outer layer of reader.onload function, so that you can get this by using that ...

Added by scraff on Mon, 04 Nov 2019 17:32:27 +0200

JAVA design pattern builder pattern

1 Definition Separate the construction of a complex object from its representation, so that the same construction process can create different representations. Type: creates a class pattern. Four elements: Product class: generally, it is a more complex object, that is to say, the process of creating an object is more complex, and generally th ...

Added by drock on Sun, 03 Nov 2019 09:35:24 +0200

React(dispatch and parameter passing)

Only two forms are allowed onClick={fn}; or onClick={()=>{fn()}}; //onClick={()=>{fn(id)}}; You can't write that onClick={fn(id)}; in addition onClick={()=>{fn()}}; Equivalent to onClick={fn}; The first writing method (dispatch by parent component, parameter does not flow into TodoItem) TodoList todos ...

Added by nads1982 on Sun, 03 Nov 2019 05:11:11 +0200

[maximum flow and minimum cut] jzoj_secretmission

meaning of the title In a graph, some edges on the shortest path are removed to make the shortest path unconnected, to judge whether the scheme is unique and to find the sum of edge weights of the least removed edges. thinking First, take out the points on the shortest path. It is obvious that remov ...

Added by chaffinator on Wed, 30 Oct 2019 23:34:39 +0200

[JZOJ3362] [NOI2013 analog] number

The main idea of the topic A number \ (n \) is called a graceful number if and only if its digits can be divided into two sets, the sum of the numbers in the two sets is equal. How many graceful numbers can be found in \ ([a,b] \).\(a,b\leq 10^9\) Analysis The exact solution is digital \ (dp \) but I won't. As the range of \ (a,b \) is coveted, ...

Added by ragtek on Mon, 28 Oct 2019 23:33:49 +0200

Non recursive merge sort

Non recursive merge sort Diagram Explain Code Diagram Explain Algorithms are recursive. Here is a simple non recursive implementation. That is, 2, 2 merge and sort, and then 4, 4 merge and sort until it is finished. Do not group recursively. Note that some code implementations on the Inter ...

Added by digitallookout on Mon, 28 Oct 2019 16:10:50 +0200

P4141 the division of lost things Backpack

Meaning: give the volume of $n $items and the maximum knapsack capacity of $m $, find out the number of schemes of $w\in [1,m] $knapsack after removing one item of $i $. There are n items with volume of W1, W2,... WN. Due to her negligence, the ith item was lost. "How many ways can i use the remaining N – 1 items to fill a backpac ...

Added by countdrac on Sat, 26 Oct 2019 23:31:49 +0300

Use of SELECT INTO in stored procedure

Using SELECT in MySQL stored procedures... The INTO statement assigns values to variables: Used to save the column values of a row returned by the query to a local variable. Requirement: There can be only 1 row in the result set of the query. SELECT col_name[,...] INTO var_name[,...] table_expr Use SELECT... The INTO statement queries in t ...

Added by SlyOne on Sat, 26 Oct 2019 18:16:42 +0300

Three common uses and source code implementation of IOC in Spring source code analysis

In retrospect, what we have studied is AnnotationConfigApplicationContext annotationConfigApplication = new AnnotationConfigApplicationContext (MainConfig.class); Person person2 = (Person)annotationConfigApplication.getBean("person2"); The realization of these two sentences comes to the constructor implementation of annotationco ...

Added by madspoihur on Sun, 20 Oct 2019 20:37:30 +0300

Summary of gateway current limiting

1. Common current limiting algorithms 1.1 counter algorithm Count the number of requests allowed to pass over a period of time. For example, qps is 100, that is, the number of requests allowed to pass in 1s is 100. Add 1 to each request counter. If the request is rejected more than 100, the counter will clear after 1s, and the counter will be c ...

Added by Gonwee on Sun, 20 Oct 2019 17:10:50 +0300