Tag:assignment

  • Go learning notes map (Dictionary)

    Time:2020-11-25

    1. Declaration assignment: var m1 map[string]int m1 = map[string]int{“name”:1, “xxx”:2} be equal to m1 := make(map[string]int) be equal to m1 := map[string]int{} //m2 := map[string]interface{}{} 2. Map is a reference type m2 := m1 m2[“age”] = 18 //Results of M1: Map[ age:18 name 1 xxx:2 ] 3. Determine whether the map value exists OK, it’s […]

  • Hand in hand to teach you to use 6 lines of code to make calendar generator

    Time:2020-11-23

    Series articles: Escape character Hand in hand to teach you to use 6 lines of code to make calendar generator 1. Set production objectives Objectives: Enter the specified year and month to generate the calendar It can be run repeatedly 2. Make the required function Enter the specified year and month → input functionGenerate monthly […]

  • C ා value parameter / reference parameter / output parameter

    Time:2020-11-22

    Value parameter 1. Allocate space for formal parameters in the stack 2. Copy arguments to formal parameters 1   public class Person 2   { 3    public int age = 10; 4    } 5 static void Main(string[] args) 6 { 7 int a2= 10; 8 Person a1= new Person(); 9 10 Console.WriteLine(a1.age + “–” + […]

  • Go switch is different from Java C ා

    Time:2020-11-21

    The statement after 1 switch can have a simple assignment statement 2 case: after the end of the statement, there is no need to break; it ends automatically by default UnlessfallthroughStatement, otherwise the branch is automatically terminated     Unconditional switch   In some cases, you need to use fallthrough It is equivalent to that […]

  • Five practical JS deconstruction usages

    Time:2020-11-18

    Personal column ES6 has been launched in simple terms. In depth ES6, through case study, master some use skills and principles of new features in ES6. During continuous updating, ← Click to subscribe. Like it and watch it again. Get used to it this paperGitHubhttps://github.com/qq44924588… On has included, more previous high praise article classification, also […]

  • Tensorflow course (1) — linear model

    Time:2020-11-11

    Series articles: Tensorflow tutorial (first one) — linear regression Tensorflow course (first two) — polynomial regression Tensorflow tutorial (first three) — Logical Regression Tensorflow course (1) — linear model install pip3 install tensorflow introduce import tensorflow as tf Execute options with tf.compat.v1.Session() as session: session.run([…]) #Execute initialization variables session.run(init) #Feed assignment print(session.run(iMul, feed_dict={input2: [7.0], input3: […]

  • 2. Go variable parameter function, anonymous function and function variable

    Time:2020-11-6

    2.1. Variable parameter function Variable parameter means that the number of parameters can be any number Variable arguments must be at the end of the argument list, adding three dots between the parameter name and type to represent the variable parameter function When you declare a function, you can use the variable parameter as a […]

  • Uni app uses mobx | uni app state to manage mobx

    Time:2020-11-5

    Testing The response function autorun of mobx is used to monitor the state changes, assign values and run functions. All autorun are executed when the page is onload, and all autorun is destroyed when the page is onunload observer.ts import {autorun, IReactionDisposer, IReactionPublic, reaction, toJS} from ‘mobx’ //Respond to mobx and respond to observables export […]

  • Python learning notes Day2 – Python variables

    Time:2020-11-5

    1. Definition and use of Python variables Assignment of variablesPython uses the equal sign=As the assignment operator, the specific format is: name = value The value of a variable is not immutable, it can be modified at any time, as long as you re assign it; in addition, you do not need to care about […]

  • Full stack data base (understanding)

    Time:2020-10-31

    preface This paper begins to standardize the use of markup syntax “markdown grammar writing”.In the case of no practical experience, the basic data types should also be kept in mind so that they can be applied quickly. 1. Redis data type Redis data typeRedis supports five data types: a. One dimension String — set / […]

  • C ා thread pool

    Time:2020-10-29

    Why use thread pool? There is no need to repeatedly open a new destroy thread Environment: vs 2015. Net 4.5.2 output environment: console application Post code: class Program { Static int workerthreads; // the maximum number of worker threads in the thread pool Static int completionportthreads; // the maximum number of asynchronous I / O […]

  • Notes on go language learning (2)

    Time:2020-10-27

    1、 Character 1. Overview The character type stores a single letter or a single text Go language does not support character type. In go language, all character values are converted to int32 values in corresponding encoding table Go language uses utf8 encoding by default 2. Coding history At the beginning, eight on-off transistors were used […]