• Automatic interaction of shell with expect command


    background There are many scenarios in Linux script for remote operation, such as remote login SSH, remote copy SCP, file transfer SFTP and so on. The input of security password is involved in these commands. In normal use, it is necessary to manually input the password and accept security verification. In order to realize automatic […]

  • RT thread learning notes — (3) analysis of RT thread automatic initialization mechanism


    I believe many engineers will often see the macro definitions as shown in the figure below when reading the RT thread related source code. According to the naming of macro definitions, these macro definitions seem to be some declaration work for some initialization functions. As shown in the figure above, through tracing the source code, […]

  • Linux using Yum management software


    Yum is based on RPM package management software. It can automatically download and install RPM package from the specified server. It can automatically handle the dependency relationship and install all the dependent software at one time. There is no need to download and install one by one. Yum provides commands to find, install and delete […]

  • Python re takes the character between two characters


    import re str = ‘hihihi>abcdefgid=testgogogo<movemove&’ #The symbol needs to be escaped, and it needs to be preceded by a symbol title1 = re.findall(r’\>((?:.|n)*?)\<‘, str)[0] #Only the symbol is at the back title2 = re.findall(r’id=((?:.|n)*?)\&’, str)[0] print(‘title1 — ‘,title1) print(‘title2 — ‘,title2) Output results title1 — abcdefgid=testgogogo title2 — testgogogo<movemove

  • [leetcode] 64. Conditional sum, recursion + Shift


    To find 1 + 2 +… + N, it is required that keywords such as multiplication and division, for, while, if, else, switch, case, and conditional judgment statements (a? B: C) cannot be used. Example 1: Input: n = 3 Output: 6 Example 2: Input: n = 9 Output: 45 Restrictions:1 <= n <= 10000 […]

  • Solution to the problem of error reporting when bigint to int with sign in SQL Server


    One requirement is to store multiple states (including all kinds of exception and warning states that can exist at the same time) in a cloud monitoring state value. Bit operation mechanism is used to store multiple states in an int. At present, the amount of monitoring log data is very large (100 million level), and […]

  • The usage of input output conversion specifier in C language


    The usage of input output conversion specifier in C language This paper mainly introduces the usage of conversion specification in formatted input and output statements in C language printf sprintf fprintfConversion specifier for % [flags][width][.precision][length]specifier flags meaning – Align left + When the signed value is positive, a positive sign is added before the value; […]

  • Rust looks for the basic data type of frustration 1.0


    When we come into contact with a new language, we should first understand its related basic concepts, so today we will talk about the data types of rust. Basic typists can roughly compare with known systems. Each value in rust has a data type, so rust will know which processing method this value is; Generally […]

  • Original code, inverse code and complement code


    1、 Concept explanation Number of machines: The binary representation of a number in a computer is called the machine number of the number. Machine number is signed, in the computer with a number of the highest place to store symbols, 0 represents a positive number, 1 represents a negative number. For example, + 2 binary […]

  • MySQL learning notes (4): data types


    This article is updated on June 19, 2019, using MySQL 5.7 and operating system deepin 15.4. catalogue value type Integer type Fixed point number type Floating Point Types Bit type Date time type String type Enumeration type Collection type value type Integer type type[(m)] [UNSIGNED] [ZEROFILL] [AUTO_INCREMENT] type byte minimum value Maximum TINYINT 1 Signed […]

  • Basic data types of go language foundation


    Go language has a wealth of data types, in addition to the basic integer, floating-point, Boolean, string, as well as array, slice, structure, function, map, channel and so on. The basic types of go language are similar to other languages. Basic data type integer Integers can be divided into the following two categories: int8, int16, […]

  • How to start shell script programming quickly


    Before Linux shell script programming, there has been no systematic study. When writing shell script, you always need to check all kinds of syntax. This article uses the dimension of programming language to systematically learn shell script programming. Shell Linux shell is an application program that interacts with Linux system, through which we can operate […]