Tag:literal

  • Command operation of mongodb

    Time:2021-10-19

    Mongodb series: Install mongodb using yum Command operation of mongodb Programming operation of mongodb Before introducing the specific operation and use of mongodb, it is necessary to introduce some basic concepts of mongodb. With these foundations and knowledge, you can master the following operations more solidly and understand them more thoroughly. Mongodb database is different […]

  • Mock is both a shield and a weapon

    Time:2021-9-4

    Front end mock At present, the development mode is generally separated from the front end and the back end, so it is inevitable to “accommodate” each other. For example, the background only sets the interface documents generally, and the interface has not been released yet. As the front end, we can’t wait foolishly, but we […]

  • [JS] object, constructor and instantiation

    Time:2021-9-1

    1. Object JavaScriptAn object in is a reference data type. Except for the original value, all other values are objects. An object is data that contains properties and methods tokey-valueForm exists. var obj = { name: “tom”, age: 23 } 2. Constructor Constructor is different from general functions. It can usenewKeyword to create and initialize […]

  • Rust from pit to soil – pit – string compared to str

    Time:2021-8-30

    String compared to str Rust String Rust str When we first came into contact with rust, we may not be very clear about the relationship and difference between string and STR, so that we are not sure which type to use when writing functions. This paper mainly expounds this problem. Rust’s official documents areStringIn the […]

  • Object extension

    Time:2021-8-14

    Object extension Enhancement of object literals Object.is() Object.assign() Object.getOwnPropertyDescriptors() Object.keys(),Object.values(),Object.entries() Enhancement of object literals Attribute shorthand in object and method shorthand in object. Note that function is shorthand, not arrow function const obj = { // bar:bar bar, // method:function(){}, Method() {// note that this abbreviation is only for function console.log(this); // This points to […]

  • Several ways of creating objects by JS

    Time:2021-8-13

    Several ways of creating objects in JS New object() constructor ​ var student1 = new Object(); ​ student.name = “zs”; ​ student.id = 123; ​ student.message = function(){ ​ console.log(“name:” + name + “id:” + id); ​ } // call method ​ student1.message(); Object literal {} var student2 = { ​ name: “zs”, ​ id: […]

  • ES6 (IX) — string

    Time:2021-8-10

    catalogue Template String literals String wrap Contains variables or expressions Tag literals Logical operation String extension method Es6-es10 learning territory Template String literals To solve the string splicing problem, you can define the string in this way from ES6. `string text` `string text line 1 string text line 2` `string text ${expression} string text` Here […]

  • Bash: String

    Time:2021-8-3

    \Backslash (escape) Follow closely\The literal amount of characters will be retained and removed when outputting\。 A special case is\newline(backslash + newline character), this combination will be regarded as a long string newline, and will be used when outputting\newline(backslash + newline) remove, ignore. $ echo \a a $ echo \aaa aaa $ echo aaa\ > ssss […]

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

  • Eslint code specification for vue-cli3 project configuration

    Time:2021-7-23

    preface Recently took over a project, because before in order to rapid development, did not do code checking. In order to make the code more standard and easier to read, it’s time for eslint. Installation dependency There are two ways to install dependencies: Add the corresponding dependency to devdependences in CMD, and then NPM install […]

  • Objective-C Tips

    Time:2021-6-12

    Notes & suggested usage Bool is actually an 8-bit character type. If an integer value greater than 1 byte is assigned to bool, only the status character will be used as the bool value. In the header file, other header files should be introduced as little as possible, and [email protected], or use the class protocol. […]

  • Four patterns of creating instance objects in JS

    Time:2021-5-12

    demand Complete the following functions: Returns an object The value of the greeting attribute of the object is equal to STR1, and the value of the name attribute is equal to STR2 Object has a sayit method, the string returned by this method is the value of greeting attribute + ‘,’ + name attribute analysis […]