• Built in objects Math.random () three examples of random number method


    1. Get a random number between two numbers function getRandom(min,max){ return Math.random () * (max min) + min; / / returns a floating-point random value that is not an integer and less than between two arguments. } getRandom(3,10);   2. Get a random integer between two numbers function getRandom(min,max){ return Math.floor ( Math.random () * […]

  • Java basic data type and integer cache mechanism


    1、 8 basic data types (4 integer, 2 float, 1 character, 1 cloth) Integer: byte (the smallest data type), short (short integer), int (integer), long (long integer); Floating point type: float, double; Character type: char (character type); Boolean: Boolean. 2、 Value range Data type name Occupied bytes Default value Min max Corresponding packaging Integer type […]

  • Golang string formatting


    golang format In go language, fmt.Sprintf (), fmt.Printf (), fmt.Fprintf (), Log.Printf (), log.Panicf () and other functions often use string to format parameters. This article will familiarize you with all parameters. Parameter introduction Verbs Function %v Output according to the original value of the value %+v Expand the structure field name and value based […]

  • Basic part: java basic types


    1: Several basic types of Java keyword type Bits (8 bits, 1 byte) Value range (representing range) byte integer 8 -2^7 ~ 2^7-1 short integer 16 -2^15 ~ 2^15-1 int integer 32 -2^31 ~ 2^31-1 long integer 64 -2^63 ~ 2^63-1 float Floating point number 32 3.402823e+38 ~ 1.401298e-45 double Floating point number 64 1.797693e+308~ […]

  • Introduction of lua data structure and standard library


    If you don’t know Lua, please refer toLua Foundation Table Table is very flexible. It’s in LuaUniqueData structure. x = 5 A = {} — empty table B = {key = x, otherkey = 10} — string as key C = {[x] = B, [“string”] = 10, [34] = 10, [b] = x} — variables […]

  • The numeric type of MySQL


    The numeric type of MySQL Integer type Integer type containsTINYINT、SMALLINT、MEDIUMINT、INT、 BIGINTEtc. Access range type Storage size Default display width (PCS) Range (signed) Range (no sign) purpose TINYINT(m) 1Byte m:4 -128 – 127 0 – 255 Small integer value SMALLINT(m) 2Byte m:6 -32768 – 32767 0 – 65535 Large integer value MEDIUMINT(m) 3Byte m:9 -8388608 – […]

  • Redis common commands__ Common types and operation of redis


    Redis command manual: http://www.redis.cn/commands.html   Data type: String: elements can be collectively referred to as string, integer and floating point List: a collection of sequences with each node wrapped with an element Hash: hash group with key value, where key is a string and value is an element Set: different elements Sort set: score value […]

  • 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 […]

  • C language notes (2): data type (basic data type), type conversion (automatic conversion, cast)


    Welcome to my official account, “old notes”, or to visit my personal blog. www.yuxiaoshao.cn Can QQ exchange learning 1316677086 or join my group exchange: 901648700 share resources, exchange learning data type Can add QQ group together to learn C language 984775301Data types are a wide range of systems used to declare variables or functions of […]

  • Java Foundation (1) eight basic data types


    Since the release of Java, the basic data types have been part of the Java languagebyte, short, int, long, char, float, double, boolean. Among them: Integer: byte, short, int, long Character type: char Float, double Boolean: Boolean Before we introduce it in detail, let’s talk about it first. The smallest calculation unit in Java isbyte, […]

  • Some mistakes in the basic knowledge of Java


      1. Use equals () Object’s equals method is easy to throw null pointer exceptions. You should call equals with a constant or an object that has a value. String str = null; if (str.equals(“abcd”)) { … } else { … } If the variable STR is null, an empty pointer exception is thrown. If […]

  • Network model miniaturization — quantification


    Network model quantification Model quantification A procedure for approximating 32-bit finite range floating-point data with fewer bits The input and output of the model are still floating-point It can reduce the size of the model, reduce the memory consumption of the model and accelerate the reasoning speed of the model principle By bridging fixed-point and […]