Five reasons why you should learn to use Python decorators
Python decorators are very simple to use. Anyone who can use Python functions can learn to use decorators:
Python
@somedecorator
def some_function():
print("Check it out, I'm using decorators!")
Closures, but how to write decorators is another matter, and it's not easy. You have to understand the following:
How to use function as firs ...
Added by willfitch on Wed, 26 Jun 2019 21:20:29 +0300
fs file system of nodeJS
Previous remarks
The fs file system is used to read and write system files and directories. This paper will introduce the js file system in detail.
Summary
File I/O is provided by standard POSIX functions with simple encapsulation. Use this module through require('fs'). All methods have asynchronous and synchronous forms.
The asynchronou ...
Added by devang23 on Tue, 25 Jun 2019 21:01:14 +0300
Using Jsonp to implement cross-domain requests, spring MVC+JQuery
1 What is Jsonp?
JSONP (JSON with Padding) is a "usage mode" of data format JSON that allows web pages to request data from other domains.Another new way to solve this problem is to share resources across sources.
Due to the homology policy, web pages located at www.42du.cn generally cannot communicate with servers other than www.42du ...
Added by lightningrod66 on Tue, 25 Jun 2019 19:06:53 +0300
js Advanced Learning Notes (1)
Object-Oriented, Object Creation, Prototype... .
(Note: Part of the content is from the videos you learned.)
Three Characteristics of Object-Oriented
I. Packaging
A small example is given to illustrate the necessity of packaging.
(1) This is how we write code without object-oriented encapsulation
var divs = document.getElementsByTagN ...
Added by lifeless on Tue, 25 Jun 2019 03:57:05 +0300
springmvc Request Binding Annotation Details
One
@RequestMapping
RequestMapping is an annotation used to process the request address mapping and can be used on classes or methods. For classes, the address is used as the parent path for all methods in the class that respond to requests.
The RequestMapping annotation has six attributes, which we will describe in three categories.
1, va ...
Added by skope on Tue, 25 Jun 2019 00:38:51 +0300
Wechat Widget Widget Program Actual Chapter - Drop-Down Refresh and Load More
Hello, everyone, look at this title is not a bit strange, you look forward to the micro-program actual combat chapters - e-commerce (3) did not appear, I think so, because there are many content in e-commerce, how I just named as one or two or three, it is not convenient for you to see the content of each article, so I changed the way of namin ...
Added by [n00b] on Sat, 22 Jun 2019 01:32:56 +0300
easygen generic code generation framework [open source]
What is it?
My classmates who have used mybatis know that it's painful to write mapper and xml by hand. Fortunately, Mybatis-Generator is provided by the government, but the things generated by this guy are not open and inconvenient to modify, and the code generation requirements of the project are not only data access layer, such as view, serv ...
Added by Ironphp on Sat, 22 Jun 2019 00:34:57 +0300
A Simple Course for the Development of Wechat Programs
1. Get the AppID of the Wechat applet (Note that the AppID here is a special id for the widget. You can see it in the widget public number widget, without some functions of the AppID will be limited!)
Login https://mp.weixin.qq.com In the "Settings" - "Developer Settings" of the website, you can see the AppID of the Wechat a ...
Added by treybraid on Fri, 21 Jun 2019 04:34:48 +0300
axios use of vue
1. Installation
1. Install npm install Axios using npm --save
2. Install bower install Axios with bower --save
3. Introduce <script src="https://unpkg.com/axios/dist/axios.min.js"></script>directly using cdn
2. Examples
1. Send a GET request
//Send a request with a given ID
axios.get('/user?ID=12345')
.then ...
Added by phatgreenbuds on Thu, 20 Jun 2019 20:32:42 +0300
Transaction usage and code examples in [PHP] Yii2
Transaction usage and code examples in Yii2
Preface
In general, we do business logic, will not only be associated with a data table, so we will face transaction problems.
Database Transaction refers to a series of operations performed as a single logical unit of work, either completely or completely not. Transaction processing ensures that ...
Added by infratl on Thu, 20 Jun 2019 04:17:01 +0300