Tag:Superclass
-
QT parent signal calls subclass slot function
Background:I defined a QT parent class, which has a custom signal and slot function. I defined the parent class pointer in the main function to point to the subclass object. At this time, I sent a signal, and the subclass could not receive it. We started our exploration… Solution:According to the breakpoint, it is […]
-
Mooc.com_ Learning summary of Objective-C object oriented initial experience
Time: Friday, April 28, 2017Note: part of this article is from moocnet. @Moocnet:http://www.imooc.comTeaching example source code: NonePersonal learning source code:https://github.com/zccodere/s… Chapter one: start the journey of object oriented Introduction to 1-1 OOP What is object orientedOOP object oriented programming OOA object oriented analysis Ood object oriented design Basic concepts of OOP object Abstract – class […]
-
Using Es5 to realize the class of ES6
Parasitic combinatorial inheritance of Es5 function parent (age) { this.age = age } parent.prototype.say = function () { console.log(this.age) } function sub (age, value) { parent.call(this, age) this.value = value } sub.prototype = Object.create(parent.prototype, { constructor: { value: sub, enumerable: false, writable: true, configurable: true } }) Class of ES6 Here is a recommended syntax […]
-
Steps of creating microservice project
1. Jianfu project Set up a maven project usedependencyManagementManagement version: lock the jar package version and play the role of version arbitration Submodule can be omittedgroup、versionIf the version of the jar package used is found from the parent project, the version locked by the parent project will be used 2. Create each sub module It […]
-
Maven uses
Dependency passing In the dependency tree of engineering, the shallower the depth is, the more priority is given. If two dependent packages are at the same level on the dependency tree, who is the first to choose the other In summary, best practices for avoiding version problems when passing dependencies. In general, if the project […]
-
Five ways of CSS positioning
position According to other people’s information, I organize my own notes, consolidate the knowledge points of five positioning methods in CSS, review the old and know the new, and constantly improve myself in the work. The five values of the position property: static relative fixed absolute Sticky (viscous positioning) The following is the direct figure […]
-
Those confusing technical concepts
Only when the basic things are done well can the highest principle be produced. As programmers, especially newcomers, there are similar and relevant technical concepts, which are sometimes maddening, especially during interviews. The understanding of the concept of technology, to a certain extent, can reflect the level of a person. The following is my understanding […]
-
When the template method encounters a delegate function, your code can be simplified again
Now when you look at the source code of some open source projects, you will find that delegate functions, such as func, action, predict, are everywhere now. Indeed, C ᦇ is in functional programmingOn the way to become more and more mainstream, more and more power, once some of the classic design pattern writing, in […]
-
C ා basic knowledge series – 1 data type
Common data types The types of C ාValue type、reference typeThere are two types.Instances of value types are stored in the stack, and reference types place a pointer to a piece of content in the heap.C ා has built in several data types for us to use: Key words abbreviation Full name of the corresponding class […]
-
Generic generic [why, how is the performance of object compared with common methods? Generic class, generic method, generic interface, generic delegate, generic constraint, covariant inversion, generic cache]
1、 Why: why do we use generics? Let’s take a look at this example first: we print the writing of different types of values /// ///Print an int value /// public static void ShowInt(int iValue) { Console.WriteLine(“This is ShowInt,parameter={0},type={1}”, iValue, iValue.GetType().Name); } /// ///Print a value of type string /// public static void ShowString(string sValue) […]
-
C ා practice design pattern principle solid
The relationship between theory and practice is not far away, but near. It’s hard to say whether we can apply theory to practice. When it comes to design patterns, one of the most common principles is solid S – single responsibility principle O – Open Closed Principle L – Liskov Substitution Principle I – […]
-
The use of Java meta annotation @ inherited
1. Look at the source document first /** * Indicates that an annotation type is automatically inherited. If * an Inherited meta-annotation is present on an annotation type * declaration, and the user queries the annotation type on a class * declaration, and the class declaration has no annotation for this type, * then the […]