Tag:scope

  • How to understand the difference between name and variable scope in tensorflow

    Time:2020-10-4

    The namespace in TF Recently, we encountered the problem of shared space of variables in TF during the construction of the model.For the sake of variable sharing and transmission, tensorflow introduces variable (or domain) namespace mechanism.This test environment is under tensorflow1. X:import tensorflow as tf Name scope: by callingtf.name_scopeproduce Variable scope: by callingtf.variable_scopeproduce There are […]

  • The life cycle of scopes in angular

    Time:2020-10-4

    It’s convention to talk nonsense first — life is the most important thing for people, but you are not likely to think about how long it is before the end of life every day, let alone the life cycle. Once a person’s life is over, it won’t start again. If you insist that life has […]

  • Static keyword + scope and lifecycle of variables

    Time:2020-10-3

    Scope: the scope of a variable or function Life cycle: when is a variable released Static keyword: modify local variables, modify global variables, modify functions 1. The scope of local variables The scope of a local variable is the code block nearest to it, such as the curly bracket of function body and the code […]

  • Angular developer’s Guide (4) controller

    Time:2020-9-30

    Understanding controllerIn angularjs, controller is defined by JavaScript constructor to extend angularjs scope.When the controller is connected to the DOM through the ng controller instruction, angularjs instantiates a new controller object using the constructor of the specified controller. A new child scope is created and provided as an injectable parameter to the controller’s constructor as […]

  • Summary: NPM common commands and operations

    Time:2020-9-26

    The full name of NPM is (node package manager), which is a package management and distribution tool installed with nodejs. It is very convenient for JavaScript developersDownload, install, upload and manage installed packages。 First of all, the following variables will be used: < name > | < PKG > module name < version > version […]

  • Clever use of CSS variables to make your CSS more exciting

    Time:2020-9-26

    Author: Joway youngWarehouse: GitHub, codepenBlog: nuggets, Sina, Zhihu, Jianshu, headlines, CSDNOfficial account: IQ front-endContact me: I will pay attention to the official account.WeChatYo!Special statement: original is not easy, no authorization is allowed to reprint or plagiarize this article, otherwise, according to the infringement, if you need to reprint or open the official account list, you […]

  • Ascii_Demo

    Time:2020-9-25

    Static keyword initialization: 1. Variables Initialization can be initialized to basic constants such as numbers, characters, arrays, etc Ex: static $a = 1, static $a = array(), etc However, it cannot be initialized to variables, objects, expressions, function return values, etc Ex: $B = 1; static $a = $B, static $a = new obj(), etc […]

  • Talking about the unknown hero in flutter — Focus

    Time:2020-9-25

    The widget and function class of focus series can be said to be the existence of unknown heroes in flutter. They pay silently, but they are not well known. It is not used in daily development, why? With that question in mind, we begin today’s content. 1. Focus Here, we will briefly introduce some focus […]

  • A text to clarify the context in JavaScript

    Time:2020-9-23

    background This article is part of “in 2019, after reading this one, I will no longer be afraid of the front-end interview” Refer to what I wrote beforeBlogAnd extradata, share it to you, hope to bring some to youInspiration and help。 For reprint, please contact the author for permission. text contextIt is an important concept […]

  • Make clear the “context” in JavaScript

    Time:2020-9-23

    background This article is part of “in 2019, after reading this one, I will no longer be afraid of the front-end interview” Refer to what I wrote beforeBlogAnd extradataI hope I can bring you someInspiration and help。 For reprint, please contact the author for permission. text contextIt is an important concept in JavaScript. Maybe many […]

  • JavaScript closure

    Time:2020-9-19

    1. What is closure? A closure is a function that has access to a variable that another function acts on*In fact, a closure is a function, and its common way is to create another function inside a function For example: ‘use strict’ function a(){ let data = ‘hello world’; //Function B is a closure function […]

  • JS setTimeout running mechanism

    Time:2020-9-15

    Let’s look at an example interview before we start Why is it 0 1 2 2 instead of 0 0 1 1 Let’s take another example   The output result is 4 undefined, why not 1,2,3,4? Why? This is because the setTimeout is asynchronous, and the running mechanism is the specified code. It will not […]