Tag:array

  • Nodejs interactive tool library — commander and Inquirer

    Time:2020-11-28

    Nodejs interactive tool library series library effect chalk-pipe Create a chalk style scheme using simpler style strings chalk Handle terminal string style correctly Commander.js complete node.js Command line solution Inquirer.js A common set of interactive command-line user interfaces. slash System path character processing minimist Parse parameter options dotenv Load environment variables from. Env file into […]

  • Binary heap sequential storage

    Time:2020-11-28

    Implementation of binary heap by array Create three files: heaprarray. H, heaprarray. C, heapararraytest. C heapArray.h #ifndef HEAP_ARRAY_H_ #define HEAP_ARRAY_H_ #ifdef __GNUC__ #define DEPRECATED __attribute__( (deprecated) ) #elif defined(_MSC_VER) #define DEPRECATED __declspec( deprecated ) #else #define DEPRECATED #endif #ifndef PTOI #define PTOI( p ) ((int32_t)(int64_t)(p)) #endif #ifndef ITOP #define ITOP( i ) ((void *)(int64_t)(i)) #endif […]

  • JS regular expression syntax

    Time:2020-11-28

    regular expression syntax Regular expression is a text pattern composed of ordinary characters (such as numbers, letters, punctuation and metacharacters used to represent a specific character or character set) and special characters (characters used as qualifications or special functions). Common characters All numbers, lowercase letters, uppercase letters, punctuation are common characters. Metacharacters are required to […]

  • Handwriting algorithm in written test

    Time:2020-11-27

    As a developer, it is particularly important to have a learning atmosphere and a communication circleMy IOS communication group: 761407670No matter you are Xiaobai or Danio, welcome to join us, share bat, Ali interview questions, interview experience, discuss technology, let’s communicate, learn and grow together! The following is basically implemented in C language 1. Instead […]

  • Array of algorithms — sum of three numbers

    Time:2020-11-27

    Sum of three numbers difficultysecondary Here is an array of N integersnums, judgmentnumsAre there three elements a, B, C in a such that a + B + C = 0? Please find all triples that satisfy the condition and do not repeat.be careful:The answer cannot contain duplicate triples. Example:Given array nums = [- 1, 0, […]

  • Front end workflow

    Time:2020-11-27

    background When many people do a project, they always need to unify the style through the way of document agreement because the code style is not unified. For example, the file name method, some people’s initials are uppercase, some people’s initials are lowercase. In JS, TS, Vue, there are different styles. In view of this […]

  • Analysis of Redux middleware applymiddleware

    Time:2020-11-27

    What is middleware Middleware just wraps the dispatch method of the store. Technically, anything middleware can do can be implemented by manually wrapping the dispatch call, but unified management in the same place will make the expansion of the whole project much easier. Repackaging the dispatch method Why repackage dispatch The role of middleware allows […]

  • Interviewer: how to write code to make CPU run faster?

    Time:2020-11-27

    preface The code is run by the CPU. The execution efficiency of CPU is determined by whether the code is written well or not. Especially when writing computationally intensive programs, we should pay more attention to the CPU’s execution efficiency, otherwise the system performance will be greatly affected. The CPU cache (CACHE) is embedded in […]

  • Everything about hashing!

    Time:2020-11-26

    preface This article is on the album: http://dwz.win/HjK , click to unlock more knowledge of data structures and algorithms. Hello, this is tongge. In the last section, we learned how to build a high-performance queue in Java, which involves a lot of low-level knowledge. I don’t know how much you get?! In this section, I […]

  • ES6 set and map data structure

    Time:2020-11-26

    Set is a new data structure of ES6, which is characterized by the absence of members with the same value Set Set itself is a constructor used to generate the set data structure const set = new Set(); [1,2,2,3,4,5,6,7,5,8,9].forEach((x)=>{    set.add(x);}) console.log(set);  // [1,2,3,4,5,6,7,8,9] The set constructor takes an array or class array as a […]

  • Awk of three swordsmen in shell text processing

    Time:2020-11-26

    Awk is a text processing tool, which is usually used to process data and generate result reports. Its name comes from the initials of the three founders: Alfred aho, Peter Weinberger and Brian Kernighan. Grammar: awk [options] ‘BEGIN{} pattern {commands} END{}’ file stdout | awk [options] ‘BEGIN{} pattern {commands} END{}’ explain: optionsoption BEGIN{}Before formal data […]

  • Summary of numpy

    Time:2020-11-25

    A chestnut >>> import numpy as np >>> a = np.arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> a.shape (3, 5) >>> a.ndim #The number of axes of an array. In the python world, the number of axes is called rank […]