Tag:Key name

  • PHP common array functions and examples [basic]]


    1、 Some basic operation functions of array about key name and value1. Get all keys or values of the array:array_keys() array_values() $arr_keys = array_keys($array);$arr_values = array_values($arr); 2. Exchange the positions of keys and values in the array. If the previous ones are repeated, they will be overwritten by the following ones:array_flip() $arr2 = array_flip($arr); 3. […]

  • PHP + redis solves practical problem 1: order flow restriction


    1. Each issue of this series of articles will solve a practical redis problem2. Questions in each issue will be selected from the comments in each issue3. Questions are limited to those related to redis. If I am interested in other questions, I will not rule out opening up a new series4. I often use […]

  • ES6 data structure set


    The data structure set is similar to an array, but the values of members are unique and there are no duplicate values.Set itself is a constructor used to generate a set data structure.You can add members to the set data structure through the add () method. let s = new Set(); [2,2,3,4,5,5,6,2,3,4].forEach(x=>s.add(x)); console.log(s) //Set(5){2,3,4,5,6} The […]

  • [daily function] daily function (August 12, 2021)


    A dream Millennium Series Today’s functionarray_search、array_shift、array_slice、array_splice、array_sum array_search1 Search the specified value in the array. If it is found, the first key name is returned. If it is not found, false is returned explain array_search(mixed $needle, array $array, bool $strict = false) : mixed parameter needleThe value to be searched is case sensitive if it is […]

  • ES6 series Xi: object expansion


    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 starting to learn, we want to tell you that this article is based on […]

  • Local storage (local storage)


    HTML5 is a new method, but IE8 and above browsers are compatible. characteristicLife cycle: persistent local storage. Unless the data is actively deleted, the data will never expire.Stored information is shared in the same domain.When localstorage is operated (added, modified or deleted) on this page, this page will not trigger the storage event, but other […]

  • JavaScript has a deep understanding of – set, map, weakset and weakmap


    Set The set object allows you to store unique values of any type, whether they are original values or object referencesEssence: constructor, used to generate set data structure describe A set object is a collection of values, and you can iterate its elements in the order in which they are inserted. The elements in the […]

  • What is the structure of redis key value pair?


    What is the structure of redis key value pair? A global hash table (array) is composed of multiple hash buckets (elements on the array, including entry elements) For example, key name: AAA, key value: BBBThrough hash (AAA), get array subscript 6, then hash bucket 6. The entry element in hash bucket 6 containsKey andValue pointer,Key […]

  • Configuration encapsulation of API interface request


    Throw a question Question 1: in our daily development, we all encounter interface class requests, various third-party interfaces, and internal interfaces. How can we maintain these interface quick requests conveniently and quickly? Question 2: in the face of a third-party interface, remember when docking, do you think you can’t find it in the subsequent search? […]

  • The function of map and set in ES6


    Set、Map、WeakSet、WeakMap If we want to describe it in one sentence, we can saySet is a data structure called set, and map is a data structure called dictionary So what is a set? What is a dictionary? aggregate A set is a combination of unordered, associated, and non repetitive memory structures [called elements in mathematics] Dictionaries […]

  • JavaScript replacement 6: key value vs. data


    Introduction The data structure of “key value pair” is basically used before{}There is a more suitable choice in the new specification. LastJavaScript replacement 5: function nesting。 Origin My GitHub Es5 mode Basic Usage use{}Store key value pairs. Only two types of keys are supported:StringandSymbol 。 const obj1 = {1:’1′}; const obj2 = {‘name’:’Tom’}; const mark […]

  • Bash skills: introduce a shell script that can add, delete, modify and query key value pair format configuration files


    This article introduces a bash shell script for parsing, adding, deleting, modifying and querying key value pair format configuration files. The basic configuration format information processed by the shell script is as follows:key|value。 In the script, putkeyCalled “key name.”. holdvalueCalled “key value.”. Put the wholekey|valueThis is called a key value pair. Take the middle one|This […]