Basic Python learning (object oriented)
Notes on Python basic learning (4)
There are three basic characteristics of object-oriented
Encapsulation: abstract and encapsulate objective things into objects, that is, attributes, methods and events are integrated into a whole
Inheritance: allows you to use the functions of existing classes and extend them without rewriting the origi ...
Posted by jeffrydell on Sat, 02 Nov 2019 10:32:26 -0700
On recursion and closure in javascript
Recursion and closures, as an important part of js, are almost involved in front-end interviews, especially closures. Today, the leader of the front-end group asked me a question and gave a rough answer. I felt dissatisfied, so I relearned and wrote this article.
Before we talk about these two concepts, let's review function expressions.
Func ...
Posted by WebGeek182 on Sat, 02 Nov 2019 09:58:47 -0700
The second step of overall review of web -- css3 effect properties and animation
Catalog
I. css effect attribute
1.box-shadow
2.text-shadow
3.border-radius
4.background
Sprite animation
Size adaptation of background drawing
5.clip-path
Clip path animation:
svg effect:
6.3D transformation
Transform transform:
- chromon rotation:
I. css effect attribute
box-shadow ...
Posted by GaryAC on Sat, 02 Nov 2019 06:45:49 -0700
Flask resolution: Local, LocalStak, LocalProxy
What is Local?
Whether you are exposed to threading.Local or werkzeug.Local, they represent a variable - each thread's own global variable.
Global variables, usually on the process heap. All threads of a process can access the same global variable, because they share the address space of the process, so each thread can access it, which al ...
Posted by theresandy on Sat, 02 Nov 2019 06:18:05 -0700
Image upload pose and Typed Arrays you don't know
There are several questions about uploading pictures in the question of thinking or not, all of which involve the concept of ArrayBuffer. I want to sort out the knowledge in this area and hope that more people can get something.
Ladies and gentlemen, let's start together.
1. How to upload files
Generally, FormData is used to create request data ...
Posted by Mastodont on Sat, 02 Nov 2019 06:01:51 -0700
The use pit of @ Data in Lombok
When you're using Lombok's @Data When commenting, there will be some holes that need attention. Let's see today.
Lombok
Let's briefly introduce Lombok. Its official introduction is as follows:
Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code ...
Posted by jaytux on Sat, 02 Nov 2019 03:21:15 -0700
Excel boot (a lightweight open source component composed of Excel import and export solution)
Easy-POI
Tool link
Github: https://github.com/programmeres/easy-poi
Code cloud: https://gitee.com/nw1992/easy-poi
Easy POI is a lightweight open source component of Excel import and export solution.
(if you like or are willing to use it, please star and Watch the project. If you are an enterprise, please let me know the name of the enterprise b ...
Posted by LazyJones on Sat, 02 Nov 2019 00:18:01 -0700
JQuery svg pan zoom for svg drag and zoom
jquery-svg-pan-zoom.js download and documentation here https://github.com/DanielHoffmann/jquery-svg-pan-zoom
Principle: control the viewbox property of svg
viewbox is an attribute of SVG image. It defines the visible area of SVG, which is defined by four numbers: abscissa X, ordinate Y, Width, ...
Posted by ganlal on Fri, 01 Nov 2019 21:58:25 -0700
Data hijacking and data broker
Data hijacking
Data hijacking uses Object.defineProperty() to implement the two-way binding of vue. Let's see how it works.
let obj = {}, txt = ''
Object.defineProperty(obj,'txt',{
set(val) {
console.log('set ....')
txt = val || '';
},
get() {
//get callback will be triggered when getting obj.txt.
...
Posted by flashbot on Fri, 01 Nov 2019 14:51:46 -0700
Use enumeration class of Python 3
When we need to define constants, one way is to use uppercase variables to define integers, such as months
JAN = 1
FEB = 2
MAR = 3
APR=4
May=5
Jun=6
Jul=7
Aug=8
Sep=9
Oct=10
NOV = 11
DEC = 12
The advantage is simplicity, the disadvantage is the type int, and it is still a variable.
A better way is to define a class type for ...
Posted by tinker on Fri, 01 Nov 2019 11:16:48 -0700