Tag:integer

  • [rust] basic data type

    Time:2021-7-27

    This article introduces the built-in data types provided by rust. Boolean type Boolean typeLogical values representing yes and No. It has two values:trueandfalseGenerally used in logical expressions, and, or, and not operations can be performed: fn main() { let x = true; let y: bool = ! x; // False, inverse operation let z = […]

  • [leetcode] 415. String addition

    Time:2021-7-13

    Given two nonnegative integers num1 and num2 in the form of string, the sum of them is calculated. be careful: The length of num1 and num2 is less than 5100 “`Num1 and num2 contain only the numbers 0-9“` “`Neither num1 nor num2 contains any leading zeros“` You can’t use any built-in BigInteger library, and you […]

  • A small algorithm problem: the sum of two numbers

    Time:2021-7-12

    A small algorithm problem: the sum of two numbers Specific requirements:Given an integer array, a target value is specified. After adding two values in the integer array, the result is equal to the target value. Finally, the index values of these two values are returned for instance: number := []int{123,12,4,53, 66} target := 16 12 […]

  • [leetcode] 989. Integer addition in array form

    Time:2021-7-5

    For a non negative integer x, the array form of X is an array of each digit from left to right. For example, if x = 1231, its array form is [1,2,3,1]. Given the array form a of non negative integer x, the array form of integer x + k is returned. Example 1: Input: […]

  • Nsstring of Objective-C

    Time:2021-7-4

    Create string NSString *aStr = @”I am a String”; NSString *cStr = @”I am a String”; Creating strings with standard C Char * CString = I am a string; NSString *astring = [[NSString alloc] initWithUTF8String:Cstring]; NSLog(@”astring:%@”,astring); The memory address of the string NSLog(@”astr point adress: 0x%.8x”,aStr); NSLog(@”astr point adress: 0x%.8x”,bStr); bStr = @”I am a […]

  • Expansion of ES6 value

    Time:2021-6-23

    In this section we learnES6The number type of the common data type in.ES6In addition toJavaScriptIn addition to the six data types in, a new raw data type is introducedSymbol, which is the seventh data type of JavaScript language: Number(numerical value) String(string) Boolean(Boolean) Object(target) undefined null Symbol Binary and octal notation ES6A new way to write […]

  • C programming rookie exercises 100 questions (01-10)

    Time:2021-6-22

    [exercise 1] output “Hello, world!” Title:Output “Hello, world!” 1. AnalysisUse printf() to output “Hello, world!”. 2. Procedure: #include int main() { printf(“Hello, World!”); // Double quotation marks are required before and after strings in printf() return 0; } 3. Input and output: Hello, World! 4. Expand knowledge:Printf() is a function defined in the header file […]

  • High performance mysql (version 3)_ Selection of data type_ Integer type

    Time:2021-6-17

    Integer type in MySQL integer type in MySQL Tinyint, smallint, mediumint, int, bigint (corresponding size: XS, x, m, l, XL), which each occupies 8, 16, 24, 32, 64 bit storage space, the storage range is: – 2 (n-1) ~ 2 (n-1) – 1, tinyint range is – 127 ~ 128. The unsigned property Unsigned attribute: […]

  • [Python 1-6] Python tutorial number

    Time:2021-6-17

    A number is a writing symbol used to represent a numberChinese digital writing 37, 37Roman numeral writing XXXVIIArabic numeral binary writing 100101 First address of the article Author: VladSource Vlad (official account: fulade_ me) number In programming, numbers are often used to record game scores, represent visual data, and store web application information. Python handles […]

  • Five tips to improve your C code (1)

    Time:2021-6-14

    Dear readers, in this article, I have provided some best practices of C # programming. Do you use exception handling in user input validation? If so, you are the one who has reduced your project execution speed by 62 times. Don’t you believe me? Wait a few minutes; I’ll show you how to do it. […]

  • Data type of MySQL

    Time:2021-6-13

    value type Integer type of MySQL type Storage space occupied (unit) The value range without sign There is a consistent range of values definition TINYINT 1 0 ~ 2⁸-1 -2⁷ ~ 2⁷-1 A very small integer SMALLINT 2 0 ~ 2¹⁶-1 -2¹⁶ ~ 2¹⁶-1 Small integer MEDIUMINT 3 0 ~ 2²⁴-1 -2²⁴ ~ 2²⁴-1 Medium […]

  • C programming rookie exercises 100 questions (21-30)

    Time:2021-6-13

    [exercise 21] calculate the sum of natural numbers Title:Calculating the sum of natural numbers 1. AnalysisPractice using the for loop structure. The for loop allows a loop control structure to execute a specified number of times. 2. Procedure: #include int main() { int i, iNum, iSum; Printf (“enter a positive integer):”; scanf(“%d”,&iNum); iSum = 0; […]