Tag:create object

  • Dotnet source code learning — queue


    1、QueueDeclare the creation object. (QueueIs a generic object.) public class Queue :IEnumerable,System.Collections.ICollection,IReadOnlyCollection   The essence isArrayObject to store data.   Queue qy = new Queue(); private T[] _array public Queue() { _array = Array.Empty(); } Queue qy1 = new Queue(12); public Queue(int capacity) { if (capacity < 0) throw new ArgumentOutOfRangeException(nameof(capacity), capacity, SR.ArgumentOutOfRange_NeedNonNegNum); _array = […]

  • Java abstract class


    When the same function appears in multiple classes, but the function subjects are different, you can extract it upward, only the function definitions, but not the function subjects. Features of abstract classes: 1. Abstract methods must be defined in abstract classes 2. Abstract methods and abstract classes must be decorated with abstract keywords. 3. Abstract […]

  • JavaScript object


    create object Creating objects with literals The curly braces {} contain the attributes and methods to express this specific thing (object); the {} is represented by key value pairs Key: equivalent to property name Value: equivalent to attribute value var star = { name: ‘peach’, age: 18, sayhi: function () { alert(‘hello’) } }; Properties […]

  • About using @ Autowired injection object to null in springboot


    Today, I have a problem [email protected] When annotating, there is a mapper interface that can’t be injected. I don’t know what’s wrong. I added it to the class according to the [email protected] annotation is passed to the IOC container to reflect and create the object Later, after a long time of self closing Baidu, we […]

  • Spring learning road 1


    Spring framework brief introduction The spring framework was created due to the complexity of software development Purpose: to solve the complexity of enterprise application development Function: use basic JavaBeans instead of EJBs, and provide more enterprise application functions Scope: any Java application advantage: Open source free framework (container) Spring is a lightweight, non intrusive framework […]

  • JS advanced — create regular expression object


    Creating a regular expression object   Two species: 1. Create an object through the constructor 2. Create an object in the literal way   The role of regular expressions: matching string   //Object created— var reg = new RegExp(/\d{5}/); //Call method to verify string matches Var flag = reg.test (“my phone is 10086”); console.log(flag);   […]

  • Object factory of mybatis


    Preface In the process of how to map the XML of mybatis to the method mentioned above, you need to create an object, and then assign a value to the property of the object. To create an object, you need to use the built-in object factory class defaultobjectfactory of mybatis. Of course, mybatis also provides […]

  • Another way to analyze the dependency injection function of laravel framework


    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t This stackoverflow answer perfectly explains the concept of dependency injection Fundamentally speaking, dependency injection is not to let an object create a dependency, nor let a factory object create an object, but to turn the required dependency into an external object, making […]

  • Fromdata of front and rear data communication


    All HTTP data submitted to the server is actually a form Fromdata is a container used to simulate forms and submit data to the server. There are two ways to use it Create a blank fromdata object and add data to it Convert the < from > tag directly to a fromdata object Using fromdata […]

  • Front end development JS — object and prototype


    27. Create object ① Batch create objects in factory modeDisadvantages: unrecognized object, i.e. all objects are of object type; method memory space is wasted / encapsulation is not perfect Function sayname() {/ / can effectively save memory space   console.log(this.name); } function createObject(name, age, gender){ var obj = { name:name, age:age, gender:gender, Sayname: sayname, / / […]

  • Spring basic learning 01


    Spring foundation Spring is an open source design level framework, which solves the loose coupling problem between business logic layer and other layers, so it runs the interface oriented programming idea through the whole system application IOC control reverse Transfer the right to create and maintain the relationship between objects to spring management. Spring container […]

  • 06. Object advanced – object creation mode


    01. Object constructor mode Method 1: object constructor mode*Routine: create an empty object object first, and then add properties / methods dynamically*Applicable scenario: uncertain internal data of objects at the beginning*Problem: too many statements //A person: Name: “Tom”, age: 12 var p = new Object() p = {} p.name = ‘Tom’ p.age = 12 p.setName […]