Tag：complex

Go language data type – basic type
Data type of go languageIt can be divided into two categories: basic type and derived type Foundation type 1. Boolean: the value of boolean type can only be true or false2. String: a finite length string of characters in a sequence3. Number: a data type that contains both integer and floatingpoint types Integer type describe […]

Go’s 100 day trip04 basic data types
catalogue brief introduction integer Floating point type Boolean complex brief introduction In the definition of variables, we said that each variable has a type, and the type is used to restrict the interpretation of data in the computer. Like other computer languages, go language provides a wealth of data types. Let’s see what types there […]

Matrix eigenvectors and eigenvalues
Recently, when learning LDA, we need to calculate eigenvalues and eigenvectors, so we re learned a wave The calculation of eigenvalues is relatively simple in Python, and the linalg calculation of numpy needs to be imported.Linalg is the abbreviation of linear algebra. Import numpy first import numpy as np Randomly generate a matrix A A […]

Ingerface {} type conversion summary
Golang’s interface {} is powerful and can point to various types of data. There are several methods for data type conversion There are the following definitions type BaseService struct { IService serviceName string routineNum int } type MyEnum int const ( CAT MyEnum = iota DOG ) var unknowValue interface{} unknowValue = baseService Method 1: […]

Chapter 6 class and object
1、 Note map 2、 Example code: public class PrintCarStatus{ public static void main(String[] args){ int speed; String color; String name; String direction; speed = 200; Color = “red”; Name = “Ferrari”; Direction = “Nurburgring south ring track”; System. Out. Println (“the speed of the passing car is:” + speed “); System. Out. Println (“its color […]

Construction of C + + class — design process and thinking summary of complex class
project 1. Design complex Requirements: 1) real part, imaginary part, re, im 2) Rewrite the + = symbol and call friend_ The doapl function adds two complex numbers, where the + = function calls a global function_ Doapl (complex *, complex &) for processing. Here, only the addition of two complex numbers is […]

What are numbers in Python?
Cat language: in Python, different types of numbers can do arithmetic operations directly without explicit type conversion. However, its “implicit type conversion” may be different from other languages, because numbers in Python are special objects derived from the same abstract base class. In the last articlearticleIn, we discussed the python number operation, and then I […]

[Python] – 3numerical value and operation
introduction This article introduces three very common numerical data types in Python, and uses these data types to demonstrate some simple calculations. Contents of articles 0 × 1. How to judge the data type0 × 2. Numerical data type0 × 3. Calculation examples0 × 4. Use the placeholder to print the value 0 × 1. […]

Essential for developers: API design
This paper mainly discusses the characteristics of RPC and restful API styles and how to select the technology in the development, intercepts some online communities, and provides readers with ideas and views on API design for reference. 1. Background API scientific name: application programming interface For example, people communicate with each other through language, while […]

Go series – Types
Here are the basic types of go support: bool Number type int8, int16, int32, int64, int uint8, uint16, uint32, uint64, uint float32, float64 complex64, complex128 byte rune string bool 1. The bool type represents a Boolean value with a value of true or false. 2. Signed integer Int8: indicates 8bit signed integer size: 8bit range: […]

Mapping between Gorm and database (singular and complex) table structure
Gorm connects to MySQL: import ( _ “github.com/gosqldriver/mysql” “github.com/jinzhu/gorm” ) type User struct { Id int `json:”id”` Name string `json:”name”` Age int `json:”age”` } func GormTest() { dsn := username + “:” + password + “@tcp(” + addr + “)/” + datebase + “?charset=utf8&parseTime=true&loc=Local” var err error DB, err := gorm.Open(“mysql”, dsn) if err != […]

How to construct complex regular expressions
The title was originally “how to construct complex regular expressions”, but I feel that there are some ambiguities. I feel that the regular expression is very simple, and I am teaching people how to make it as small as possible. On the contrary, my original intention is to find a suitable way to construct a […]