Tag:function

  • New features of interview question ES6 (detailed)

    Time:2021-5-9

    There are many new contents in ES6, and they are often used in development. With various Babel transformations, most companies in the market are developing with ES6 syntax. JavaScriptIt’s said that Netscape companyBrendan EichDashen designed it in 10 days. Leaving aside the topic of designing a programming language in a short time, no language is […]

  • JavaScript on the front end

    Time:2021-5-9

    JavaScript JavaScript is a scripting language, which is mainly composed of the following three parts: Core (ECMAScript) Document object model (DOM)   Document object model (integrating JS, CSS, HTML) Browser object model (BOM) Note: ES6 refers to ECMAScript 6. Introduction of JavaScript //First, write code in the script tag JS code //Second, introduce JS file […]

  • Using connected react router and Redux thunk to get through react route isolation

    Time:2021-5-9

    redux In our development process, many times, we need to let components share some data. Although data sharing can be realized through component transfer, if there is no parent-child relationship between components, data transfer is very troublesome, and it is easy to reduce the readability of code. At this time, we need a state management […]

  • New features of php8

    Time:2021-5-9

    Detailed description and code are on GitHub, welcomestarandfork Brief description of php8.0.0 PHP 8.0.0 alpha 1 will be released on June 25, 2020, and GA 8.0.0 will be released on November 26, 2020. Click view. PHP 8.0.0 alpha 1 cannot be used in production environments. Click to view the details PHP 8.0.0 alpha 1 download […]

  • What does Android system development do?

    Time:2021-5-9

    Digression In 18 years, I transferred from Android application development to framework layer development. Since then, I have started the happy life of 996. The updating of blog technical articles has basically stopped, and I have been occupied with too much energy by work. I really don’t have time to draft, write, practice and revise […]

  • 2、 Passing functions to thread functions

    Time:2021-5-9

    #include<thread> void fun(int i,std::string const& str) { return; } int main() { std::string s(“hellos”); std::thread t(fun,3,s); t.join(); system(“pause”); return 0; } Pass parameters to the function, and the default parameters will be changedBe copiedIn the thread’s independent memory, all accesses in the function are copied copies, even if the parameters are in the form of […]

  • 3、 Join, detach

    Time:2021-5-8

    Join: #include<thread> #include<iostream> #include <windows.h> void myPrintf() { Sleep(1000); std::cout << “threadRun” << std::endl; return; } int main() { std::thread t(myPrintf); t.join(); //15 std::cout << “main” << std::endl; system(“pause”); return 0; } /*Output: threadRun main Please press any key to continue */ Although the sub thread sleeps for one second, the main thread does not […]

  • Setting shared folder in VirtualBox 6 and CentOS 7

    Time:2021-5-8

    Due to learning needs, discuss with students to use virtual machine development. Their back end uses spring, and each update needs to pass a large. Jar package. They think it is not flexible enough. They see that VirtualBox provides the function of shared folder, but there are many problems with it. They record it to […]

  • Redis learning notes (11) server

    Time:2021-5-8

    Redis server is responsible for establishing network communication with multiple clients, processing command requests sent by clients, saving data generated by client executing commands in database, and maintaining the operation of server itself through resource management.   Command request process (take set command as an example)   1. The client sends a command to the […]

  • Review Manual (1): data types

    Time:2021-5-8

    A series of articles: Review Manual (1): data types Review Manual (2): variables and constants Review Manual (3): operators Review Manual (4): process control Boolean type Range: true; false; transformation:If it is false, it is true in all other cases var_ dump(boolval(0)); // bool(false) integer Range: //64 bit signed integer range, out of range converted […]

  • Redux source code interpretation — composition source code analysis

    Time:2021-5-8

    Composition source code analysis composeModule code is very concise, but the role of the implementation is very powerful.reduxWhy Redux? Some people say it isreduceandfluxThe combination of the tworeduceExactlycomposeThe core of the module. composeThe function of the module is powerful and simpleFrom right to left, combine parameters (functions).So, pass it on tocomposeMethod parameters must be of […]

  • KMP

    Time:2021-5-8

    Basic concepts Intuitive understanding of match function 1. The match array records where we need to return to the pattern in case of mismatch 2. The function match (J) can be expressed as When the pointer points to p [J] (not including the whole string itself) fromHead startA substring and a segment ofEnd at P […]