JS(12) object, packing class (2)

Write at the front Internal principle of constructors Implicitly add this = {} at the front of the function body Execute this.xxx = xxx Return of privacy this function Student(name,age,sex){ //The first step is to implicitly add this = {} at the front of the function body //var this = {}; //AO{this:{ ...

Posted on Thu, 02 Apr 2020 16:45:05 -0400 by lordfrikk

MIT6.0001 Notes, LECTURE 8:Object Oriented Programming (class, object, method)

This lesson focuses on the concepts of class, object, method. 1. It begins with a description that any data type in python is a class.Any data is an entity of a class.The role of classes is to better abstract the objects described and encapsulate related data and methods.For methods of similar functionality, because they belong to different ...

Posted on Thu, 02 Apr 2020 15:54:26 -0400 by James138

Non parent child component communication

Method 1: for the communication between non parent and child components, you can use eventBus to listen for an event in the hook function when creating a build, trigger the function in the component that needs to communicate with it, and exchange data at the same time eventBus.js import Vue from 'vue' export default new ...

Posted on Thu, 02 Apr 2020 14:23:18 -0400 by Mr P!nk

js export excel file

js export Excel method Using the html table format to write the desired excel format Get the contents of table and assemble it into a string in xls format Using Blob object to generate an xls file Use the download attribute of a tag to create a file name and download it locally This paper mainly uses Blob object and URL.createObjectURL() met ...

Posted on Thu, 02 Apr 2020 11:58:37 -0400 by RIRedinPA

Object oriented (class properties)

Class attribute (2) Private property in the class, the variable name starting with double underscore is private property; class Student(object): def __init__(self,name='xiaoming',score=100): self.name=name self.__score = score a=Student() print a.__score() ---->>The result is wrong, Trace ...

Posted on Thu, 02 Apr 2020 07:43:13 -0400 by tonymontana

Problems of style invalidation such as bold font in PDF exported by Jasper reports

Wrong description Setting bold font style in ireports template design takes effect when previewing, but it doesn't take effect when exporting PDF from Java program. So I found that there was a lot of data on the Internet, and found many solutions to this problem, but failed to try. Problem finding Check the style s ...

Posted on Thu, 02 Apr 2020 07:37:48 -0400 by ahoo

Prototype and prototype chain of front end Foundation

1. Prototype and prototype chain 1. 1 constructor function Foo(name, age){ this.name = name this.age = age this.cklass = 'class-1' // return this / / this line is available by default } var f = new Foo('zhangsan', 20) var f1 = new Foo('lisi', 22) 1. 2 constructor - Extension function Foo {...} ...

Posted on Thu, 02 Apr 2020 07:34:17 -0400 by blawson7

Tool class: limit EditText to enter decimal places, and input according to the amount format

It is often necessary to set EditText in the APP to input only according to the amount format, just sort out a tool class, which can be directly copied and pasted in the future. Um... Laziness makes one progress! First of all, you can limit the length of EditText. If it's money, a small target is enough. Um... Add ...

Posted on Thu, 02 Apr 2020 06:42:14 -0400 by haddydaddy

iOS basic control UIView

About UIView There are many contents about UIView control. As a basic control in iOS development, UIView also involves many things. Let me talk about some properties and methods of UIView commonly used in development. Initialization of UIView Before we talk about properties and methods, let's create an instance of UIView. ...

Posted on Thu, 02 Apr 2020 05:14:30 -0400 by ksteuber

2, SpringBoot -- configuration file description

1, Purpose of profile In project development, we often use configuration files to write some public information to the configuration, such as database configuration information, port configuration information, etc. Creating a spring boot project through IDEA will automatically generate a configuration file of application.properties. The conte ...

Posted on Thu, 02 Apr 2020 03:09:33 -0400 by Zero20two