• Dependency injection of angularjs


    The method of angularjs dependency injection 1. Inferential injection declaration by function parameters If there’s nothing clear,AngularJSParameter names are assumed to be dependent names. Therefore, it calls thetoString()Method, analyze and extract the parameter list of the function, and then pass the$injectorInject these parameters into the object instance. HTML Code: <!DOCTYPE html> <html lang=”en”> <head> <title>demo</title> […]

  • The essence of C variable parameter function


    C language supports defining functions with variable parameters by adding “…” at the end of the parameter list of the function to represent the variable length parameter list, for example: void Func(int num, …) { } It should be noted that “…” must be at the end, and at the frontAt least have a fixed […]

  • Constructor analysis of C ා class


    Constructor A constructor is a method whose name is the same as the name of its type.  Its method signature contains only the method name and its parameter list; it does not contain a return type. Rules for defining constructors: (1) The name of the C ා language’s constructor must be the same as the […]

  • (27) asp.net core. Net standard rest library refresh


    1. introduction RefitIt is an automatic type safe rest library inspired by square’s retrofit Library (Java). Through httpclient network request (post, get, put, delete and other encapsulation), the data returned by rest API is converted intoPoco (plain ordinary C × object, simple C × object)To JSON. In fact, our application program encapsulates the request parameters, […]

  • 1.4 master the use of logging tools — Notes on the first line of Android code (version 2)


    The logging tool class in Android is log (Android. Util. Log), which provides the following five methods for us to print logs. Log. V(): used to print the most trivial and meaningful log information. The corresponding level of verbose is the lowest in Android logs. Log. D(): used to print some debugging information, which should […]

  • Python command line tour: delving into argparse (2)


    By hellogithub-Prodesire Preface In the previous article “delving into argparse (I)”, we learned more aboutargparseIts basic functions include parameter actions and parameter categories. It has the ability to write a simple command line program. This article will continue to exploreargparseThe advanced method of playing, a glimpse of its full picture, helps us to have the […]

  • Shell syntax


    variable Declare, use, read only, delete myUrl=”runoob.com” echo $myUrl ${myUrl} readonly myUrl unset myUrl 1. When defining variables, do not add$, between variable name and equal signNo spaces2. Using variables, precede the variable name with$ 。3、{ }Optional, with or without braces to help the interpreter identify the boundary of variables4、unsetCommand, cannot delete read-only variables String […]

  • Python + crawler + wechat robot: a powerful tool for price supervision of online shopping


      Preface The text and pictures of the article are from the Internet, only for learning and communication, not for any commercial purpose. The copyright belongs to the original author. If you have any questions, please contact us in time for handling. Author: wind, what to do PS: if you need Python learning materials, you […]

  • Casts and implicit conversions of data types


    Classification of data types Classification of data types:Basic data typeandReference data type Coercive transformation Coercion mainly refers to the use of some specific functions to manually convert various types of values to their corresponding types. Number() UseNumber()Function, you can convert any type of value to a numeric value. There will be different results depending on […]

  • Angular 2 Inject


    (update time – 9:00, March 20, 2017) The function of inject decorator In angular 2, inject is a parameter decorator, which is used to describe parameter objects of non type in the constructor of a class. Type in angular 2: //Type – @ angular / core / SRC / type.ts export const Type = Function; […]

  • Node calls Dubbo interface


    node-zookeeper-dubbo 1、 Main process and necessary parameters 1. Generate node zookeeper Dubbo instance Register: the registered address of zookeeper Dubbover: version for backend Dubbo service Dependencies: Customize several interface names Interface: real Dubbo interface name Methodsignature: the method name and corresponding parameters under the real Dubbo interface name 2. The node zookeeper Dubbo instance calls […]

  • Promise object


    PromiseObject is used to represent the final state (completion or failure) of an asynchronous operation and the value it returns. Most people are using other functionsCreate and returnOf The promise object is created by the keyword new and its constructor. This constructor takes a function called an “executor function” as its argument. This “processor function” […]