python day 7 (nested functions, object-oriented programming)
Nested functions (intrinsic functions)
Nested function
Usage scenarios:
1. Subpackage, data hiding
2. Implement DRY principle and avoid duplicate code inside function
3, closure
def outer():
print('outer running')
def inner01
print('inner running)
inner01() #Can only be used internally
out ...
Added by jollyjumper on Sun, 01 Mar 2020 12:20:39 +0200
An example of object-oriented technology topic classification-2 blog of zam9036
Programing language
C++
Inheritance and Derive
11. Constructor of multiple inheritance derived class
Problem description
Declare a teacher class and a student class, and declare a graduate derived class with public multiple inheritance, including private member waves. The teacher class contains ...
Added by voltrader on Fri, 28 Feb 2020 06:02:56 +0200
Monitoring and debugging Java code based on BTrace
Btrace is a dynamic code tracking tool in Java. By writing btrace script, it can dynamically inject tracking code into the byte code of the target application program. By modifying the byte code, it can achieve the purpose of monitoring, debugging and positioning problems, and it is a powerful tool to solve online problems.
Github home page of ...
Added by marty on Thu, 27 Feb 2020 05:24:48 +0200
Python 3 Standard Library: Tools for functools to manage functions
1. Tools for functools to manage functions
The functools module provides tools to adjust or extend functions and other callable objects without requiring a complete override.
1.1 Modifier
The main tool provided by the functools module is the partial class, which can be used to "wrap" a callable object with default parameters.The resul ...
Added by wkrauss on Thu, 27 Feb 2020 04:13:47 +0200
Custom Round-robin Map swiper dots Style for WeChat Applet
In the process of developing the WeChat applet, the common component is the swiper component, through which the effect of the round-robin map can be achieved. However, the swiper component's indication point defaults to small black spots. Generally, we can modify the color according to the related attribute method of swiper in ...
Added by mac007 on Wed, 26 Feb 2020 18:58:56 +0200
jq selector | basic selector level selector property selector filter selector form filter selector
Basic selector
Level selector
attribute selectors
Filter selector
Form filter selector
1. Basic selector
1. Label selector (element selector)
* syntax: $("html tag name") gets all elements that match the tag name
2. id selector
* syntax: $("ාid attribute value") gets the ...
Added by imstupid on Wed, 26 Feb 2020 07:52:07 +0200
Vue series learning notes component Foundation
Article directory
1. Basic example
1.1 'data' must be a function
2. Transfer data to subcomponents through 'props'
3. Single element
4. Listen to subcomponent events
4.1 use ` v-model 'on components`
5. Distribute content through slots
6. Dynamic components
7. Precautions when parsing DOM template
...
Added by stuartbaggs on Tue, 25 Feb 2020 10:05:09 +0200
Usage of getattr() in python
1.getattr() is a built-in function in python that gets the value of an attribute in an object
2.getattr(obj,name[,default]) where obj is the object name, name is an attribute in the object, and must be a string.
3. Differences between the two expressions
First, getattr(obj,"_attr")Second, getattr (obj, "" + ...
Added by TheIceman5 on Mon, 24 Feb 2020 18:49:46 +0200
[Java] object oriented: static static attribute / method / code block
Static modifies the properties or methods of a class
Instance property is the independent memory space (multiple copies) held by each object. If the object is modified unilaterally, other objects will not be affected.
Static attribute, the instance attribute decorated by static, is. Static property i ...
Added by fxchain on Mon, 24 Feb 2020 13:58:35 +0200
13, Monitor
1, Monitor
1.1. Function of monitor
+++What is a monitor?
Listener: it is mainly used to listen to the creation or destruction of specific objects and the change of properties!
Is a common java class that implements a specific interface!
+++What objects need to be monitored?
Par ...
Added by agoe on Sun, 23 Feb 2020 09:57:01 +0200