Tag:complex

  • Ingerface {} type conversion summary

    Time:2021-10-4

    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

    Time:2021-8-22

    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

    Time:2021-8-19

    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?

    Time:2021-6-28

    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] – 3-numerical value and operation

    Time:2021-5-12

    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

    Time:2021-4-20

    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

    Time:2021-3-23

    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 8-bit signed integer size: 8-bit range: […]

  • Mapping between Gorm and database (singular and complex) table structure

    Time:2020-12-11

    Gorm connects to MySQL: import ( _ “github.com/go-sql-driver/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

    Time:2020-12-1

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

  • What are the numbers in Python?

    Time:2020-9-16

    Huaxiamaoyu: in Python, different types of numbers can be directly used for arithmetic operations, and there is no need for explicit type conversion. However, its “implicit type conversion” may be different from other languages, because the number in Python is a special object derived from the same abstract base class. In the last article, we […]

  • Yii2.0 restful API basic configuration tutorial

    Time:2020-2-15

    This article saysyii2.0DevelopmentAPIUse it.RESTfulAPI mode Install Yii2.0 Install through composer This is the preferred way to install yii2.0. If you haven’t already installedComposer, you can follow the instructions here to install. InstallationComposer, run the following command to installComposer AssetPlug-in unit: php composer.phar global require “fxp/composer-asset-plugin:^1.2.0” Install the advanced application template and run the following command: […]