Design mode of Dahua, decorator mode of structural mode
Overview of structural mode
Overview of structural mode
Decorator Pattern allows you to add new functionality to an existing object without changing its structure. This type of design pattern belongs to structural pattern, which is a wrapper for existing classes.
This pattern creates a decoration cl ...
Posted by Slashscape on Sun, 19 Jan 2020 06:40:08 -0800
2020 zero base to rapid development of Vue, Quantong, e-commerce management system (element UI) [assign authority]
Article directory
1, introduction
2. Assign permissions
2.1 pop up the assign permission dialog box and request permission data
2.2 initial configuration and use of El tree tree control
2.3 optimize the display effect of tree control
2.4 analyze the implementation idea of default checking of existin ...
Posted by joey3002 on Sun, 19 Jan 2020 04:17:09 -0800
Application of reflection -- getting the structure of a class
Article directory
1, Get all interfaces implemented
2, Get parent
3, Get all construction methods
4, Get all methods
5, Get all attributes
Reflection can not only instantiate objects, but also obtain the complete structure of a class. Three classes in java.lang.Class and java.lang.reflect package ...
Posted by chandan_tiwari on Sun, 19 Jan 2020 03:05:50 -0800
Easily ignored points of js Foundation
1
if ( typeof v === 'undefined') { // true
}
if ( typeof null === 'object') { // true
}
2
Number(null) //0
5 + null //5
Number(undefined) //NaN
5 + undefined //NaN
3 integers and floating points
There are no integers at all at the bottom of JavaScript language. All numbers are decimals (64 ...
Posted by inutero on Sun, 19 Jan 2020 02:45:14 -0800
Chi-square box (Chi Merge algorithm)
Principle and implementation of chi-square box dividing (Chi Merge algorithm)
1. Chi-square distribution
Definition of chi-square distribution:
If k independent random variables Z1,Z2,..., Zk satisfies the standard normal distribution N(0, 1), then the sum of the K random variables is:X=∑i=1kZi2
X = ...
Posted by b2k on Sat, 18 Jan 2020 20:29:56 -0800
js download files, audio, video
Recently, I did a music download, downloading with tag a will jump to the url of the audio (it can't be downloaded directly on the current page). After a long time, I finally found this article:
https://www.jianshu.com/p/c31c199e1d5e Download the solution using fetch, collect a wave, thank you old m ...
Posted by eevan79 on Sat, 18 Jan 2020 19:36:33 -0800
Struts 2 Framework -- the third day
How to deal with struts 2 and how to implement action
1. Attribute driven
jsp page:
<form action="register" method="post">
//User name: < input type = "text" name = "name" / > < br >
//Password: < input type = "password" name = "PWD& ...
Posted by badman on Sat, 18 Jan 2020 08:19:26 -0800
Android Edittext limits the number of decimal places, the size of input numbers and style attributes
Everyone is not new to Edittext. I won't say much here. I'll go straight to the topic. I'm just writing this article to record some tips for using Edittext:
1. Limit input range method 1:
/**
* Limit the range of input numbers
*/
public class RegionNumberEditText extends EditText {
private Context context;
private i ...
Posted by riyaz on Sat, 18 Jan 2020 07:24:38 -0800
React actual battle - star rating and merchant list component
1, Star evaluation component
import '../../Assets/css/star.css';
import React from 'react';
class StarScore extends React.Component {
renderScore(){
let wm_poi_score = this.props.score || '';
let score = wm_poi_score.toString();
let scoreArray = score.split('.');
// ...
Posted by fontener on Sat, 18 Jan 2020 06:04:22 -0800
Javascript function review + built in objects
Learn some video notes before sorting them out
Introduce
var str=parseInt(prompt("Please enter a number"));
console.log(str);
Why is the result NaN???
No conversion succeeded, indicating that there is a problem with prompt("please enter a number")
var str=prompt("Please enter a number ...
Posted by Joost on Sat, 18 Jan 2020 04:18:11 -0800