Tag:Go ahead

  • 1、 Thread preliminary

    Time:2021-5-10

    #include<thread> #include<iostream> void myPrintf() { //5 std::cout << “threadRun” << std::endl; return; } int main() { std::thread t(myPrintf); //14 t.join(); //15 system(“pause”); return 0; } STD:: thread is a class, which is declared in # include < thread >, 14 lines to construct an STD:: thread object t. A thread is also started (the thread […]

  • The comparison between rxjs – and promise started again

    Time:2021-5-3

    1.promise’s resolve and reject are asynchronous at any time. They call the callbacks in the next micro task cycle. let nn = Promise.resolve(‘niahoP1’); nn.then(console.log) console.log(‘niahoP2′) // niahoP2 niahoP1 2. Rxjs’s subscribe is synchronous, and the subscriber will be called synchronously immediately after the stream is updated let su = new rxjs.Subject() console.log(‘nihao1’) su.subscribe(console.log); su.next(‘nihao3’) console.log(‘nihao2’) […]

  • How async / await works

    Time:2021-4-29

    End of 2019RustThe async / await syntax is officially supported, and the implementation is completedRustThe last piece of the jigsaw puzzle of the coroutine, so that asynchronous code can be written in a way similar toGoWrite in a simple way. However, for programmers, it is necessary to understandasync/awaitThe realization principle of the system. async In […]

  • Graphical promise

    Time:2021-4-18

    Author: Herry loBlog original link PromisesObject is used to represent the final completion (or failure) of an asynchronous operation and its result value. The main purpose is to solve the problem of asynchronous operation. A promise object has the following three states: Pending: initial state, neither success nor failure. Fully (resolved): means that the operation […]

  • The difference between break, continue and return statements

    Time:2021-4-14

    break: interrupts execution and outputs results continue: skip this time and continue to execute the remaining code return: exits the loop, interrupts execution, and returns function parameters

  • Front end Engineering: unveiling Automated Deployment System (1)

    Time:2021-4-14

    Sending NPM packages is a frequent requirement for a slightly larger factory, so the local execution of computing version commands andnpm publishIt’s not feasible. There will be a separate deployment system to help us do this automatically. Today, let’s talk about the core computing version, release logic and process of the deployment system. Semantic version […]

  • Install mysql-8.0.23 database with bash script

    Time:2021-4-13

    1、 Creating folder and downloading database installation package for basic environment detection Environmental Science: Alicloud ECS centos8.3 MySQL 8.0.23-el8 Check whether the directory where the installation package is stored exists if [ ! -d “/root/mysql” ];then Echo_ Blue ‘[info] create folder / root / MySQL’ mkdir /root/mysql else Echo_ Yellow “[info] folder / root / […]

  • [20201231] single instance data buffer states.txt

    Time:2021-4-9

    [20201231] single instance data buffer states.txt –//What is the status of Pi? PI represents past image. It is a unique status of Rac environment and will not appear in single instance database.–//Now that this problem is mentioned, today is to explore an example of data buffer states. 1. Environment:[email protected]> @ ver1PORT_STRING                    VERSION        BANNER—————————— ————– ——————————————————————————–x86_64/Linux […]

  • Go: process control

    Time:2021-4-6

    1. If / else branch judgment 1.if condition { } 2.if condition { }else { } 3.if condition { }else if condition { }else { } 2.switch / case var i =0 switch i { case i =0: pass //Fallhough can be added to continue the subsequent operation case i >1: pass Default: // default […]

  • ES6 exploration — promise object

    Time:2021-3-25

    Recently, when I came into contact with react Redux asynchronous action, it was very interesting to write it asynchronously. The application of promise object solves the problem of pyramid structure code.The traditional callback code is one layer at a time. When you want to write an asynchronous request with a request in it, what should […]

  • Ubuntu setting time zone

    Time:2021-3-12

    Ubuntu setting time zone View current time zone [email protected]:~# date -R Wed, 21 Oct 2020 23:46:05 +0800 implement tzselectView time zone (only view, not modify) An error is reported in tzselect [email protected]:~# tzselect /usr/bin/tzselect: line 180: /usr/share/zoneinfo/iso3166.tab: No such file or directory /usr/bin/tzselect: time zone files are not set up correctly Solution 1: install tzdata […]

  • Knowledge point synchronous and asynchronous

    Time:2021-2-10

    Let’s start with a high vote answer from stackoverflow When you execute something synchronously, you wait for it to finish before moving on to another task. When you execute something asynchronously, you can move on to another task before it finishes.When you synchronize a task, you need to wait for it to complete before you […]