Tag:Operator

  • ES6 Series 5: array expansion

    Time:2021-4-23

    The rookie official account of “Code tailor” provides technical information and a series of basic articles for front-end developers. WeChat pays close attention to the public address of “little and mountain rookie”, and gets the latest articles in time. preface Before learning, we would like to tell you that this article is an introduction to […]

  • Python rookie tutorial 12: input and output

    Time:2021-4-22

    Python has two ways to output values: Expression statement Print() function File object write () method, standard output file can be used sys.stdout quote. If you want the output to be more diverse, you can use str.format () function to format the output value. If you want to convert the output value to a string, […]

  • About + + []] [+]] + [+]]

    Time:2021-4-21

    A few days ago, brother Li showed me an operation in JavaScript, that is, the value of + + is 10;You can also have a look console.log(++[[]][+[]]+[+[]]) 10 Lying trough, bull!Very curious, JS how to get this result, inexplicably got 10; my first feeling is impossible, but the result is there; this is to think, […]

  • MySQL learning notes (5): operators

    Time:2021-4-21

    This article is updated on June 14, 2020, using MySQL 5.7 and operating system deepin 15.4. catalog Arithmetic operator Comparison operator Logical operators Bitwise Operators Operator priority Arithmetic operator operator grammar explain + a + b addition – a – b subtraction * a * b multiplication / a / b Division. similarDIV, butDIVThe results […]

  • An article to take you a preliminary understanding of C + + overload mechanism!

    Time:2021-4-20

    C + + function and operator overloading Operator overloading is a very important part of C + +. We already know how to overload functions The so-called overload is to redefine a defined function, symbol, etc. C + + adds the ability to overload operators on the basis of C, while Java does not allow […]

  • Prefix infix suffix expression rules

    Time:2021-4-19

    expression Prefix expression (Polish expression) Prefix expressions are also called Polish expressions, and the operators of prefix expressions precede the operands Examples: (3 + 4) ×5-6 The corresponding prefix expression is- × + 3 4 5 6 Prefix expression evaluation Computer evaluation of prefix expression Scan the expression from right to left. When encountering a […]

  • The distinction between compound sentences and operators

    Time:2021-4-19

    The concept and usage of compound sentence In some cases, the statement must be combined with other statements to achieve its functions. The code in curly braces {} is called a compound statement. For example: int a,b; if (a == b) … / * this part of the code is used with the if function, […]

  • Analysis and implementation of inverse Polish calculator

    Time:2021-4-18

    We have completed a reverse Polish calculator, which is required to complete the following tasks: Enter an inverse Polish expression (suffix expression) and use stack to calculate the result Support parentheses and multi digit integers, because here we mainly talk about the data structure, so the calculator is simplified and only supports the calculation of […]

  • Tips! How to store custom structure in set?

    Time:2021-4-18

    This question is a little question mark that popped up when I wrote leetcode-141There are two ways to judge whether a linked list has a ring: one is the speed pointer, and the other is to save the address of a node into the set every time it encounters itfind(a)!=s.end();It means there is a ring. […]

  • Thought analysis and code implementation of infix to suffix expression

    Time:2021-4-17

    Infix expression to suffix expression As you can see, the suffix expression is suitable for calculation, but it is not easy for people to write it, especially when the expression is very long. Therefore, in development, we need to convert infix expression into suffix expression. The specific steps are as follows: Initialize two stacks: the […]

  • Self study series of golang (3) — if, for, channel

    Time:2021-4-16

    Self study series of golang (3) — if, for, channel Generally, the if statement performs two branch logic based on the result of a Boolean expression, just like the if statement in most languages. There are always exceptions to go //Writing method 1 if i:= getID(); i < currentID { execute some logic } else […]

  • Swift personal learning notes – 03: basic operators

    Time:2021-4-15

    This article is purely a Chinese version《The Swift Programming Language》So most of the content is in the article. This article is my study notes, not a formal and systematic record. For reference only There are still a lot of incomprehensible and uncertain points below, which I will point out with “doubtful” notes. Thanks to the […]