• HOC vs Render Props vs Hooks


    Warehouse address of complete high frequency question bank:https://github.com/hzfe/aweso… Complete high frequency question bank reading address:https://febook.hzfe.org/ Related issues What is hoc / render props / hooks Why do you need hoc / render props / hooks How to improve code reusability Implementation principle of hooks What are the advantages of hooks over other schemes Answer key […]

  • Use lists, dictionaries, and set generators to shorten your code


    By Philip WilkinsonCompile VKSource: towards Data Science I’ve been using Python for nearly a year, and I often encounter it“Generative formula”This word, but I don’t have a generative formula, its exact meaning or what it covers. Only recently did I find that with a generator, I can use a list to shorten my code from […]

  • Vue basic introductory notes 03: binding V-model, class and style


    Vue basic introduction notes 03 V-model implements bidirectional binding between form elements and data in data Class: three forms Array form Ternary expression Replace ternary expressions with objects (improve readability) style Key value pair object <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> <title>Document</title> <script src=”https://cdn.jsdelivr.net/npm/vue”></script> <style> .class1{ font-size: […]

  • Vue optimization tips


    Internal use of hook monitoring life cycle <template> <div> < H5 > life cycle hook usage: < / H5 > <p> <span v-for=”item in arrList”>{{item}},</span> <br> < El button @ Click = “addfruit” > start < / El button > </p> </div> </template> <script> export default { data(){ return{ arrList:[ ‘Apple’, ‘Apple’, ‘Banana’, ‘grape’, ‘add […]

  • Uri design principles


    The rest API we designed is really nice E? Elegant:http://api.exapmle.com/louvre… Louvre / da Vinci / Mona Lisa Moderate type:http://58.com/bj/ershou/310976 Beijing / second hand channel / post ID Shetter typehttp://api.example.com/68dd0-… I don’t know what the hell This article will share some principles of URI design. Do not add ‘/’ to the end of the URI With […]

  • Essential for developers: API design


    This paper mainly discusses the characteristics of RPC and restful API styles and how to select the technology in the development, intercepts some online communities, and provides readers with ideas and views on API design for reference. 1. Background API scientific name: application programming interface For example, people communicate with each other through language, while […]

  • [data structure] Chapter 1 Introduction (1) — data structure


    The second section of the introduction — algorithm Basic concepts What is an algorithm? Program = data structure + algorithm Characteristics of the algorithm Finiteness: an algorithm must always end after executing finite steps, and each step can be completed in finite time. Note: algorithm must be finite, two programs can be infinite. Certainty: every […]

  • The difference and relation between HTTP and RPC


    Author: Yi GeLink:https://www.zhihu.com/questio…Source: ZhihuThe copyright belongs to the author. For commercial reprint, please contact the author for authorization. For non-commercial reprint, please indicate the source. First of all, the real name praises the subject.This is a very good question。 Second, real name opposes the answer that RPC is good and HTTP is bad. Because,The subject’s […]

  • Basic program structure of go language: Notes


    The function of annotation in the program is to annotate and explain the program, which is easy to read the source code. Adding annotations appropriately in the source code can improve the readability of the source code. There are two kinds of annotations in go language, one is single line annotation and the other is […]

  • Laravel unified error handling as JSON


    The appexceptionshandler class in larevel is responsible for recording all the exceptions triggered by the application. This is very convenient in our development process. Always try… Catch makes the code too cumbersome and greatly reduces the readability. How to use it to handle the exception isjsonWhat about it? We can create a new class to […]

  • A little trick, let your ABAP open SQL have self description effect


    ABAP developers must have dealt with the confusing database table fields in Figure 1. To understand its meaning, you have to open se11 to see the field description. If you use as to set more readable aliases for these field names when writing code after viewing the description information, it will be more convenient to […]

  • Simple react state management Library – stamen


    When it comes to react state management, it must be mentioned that Redux and mobx are definitely the hottest state management tools. There are also some Redux based state management tools, such as DVA and rematch, and some new ones, such as mobx state tree. Here, we will not comment on various solutions. But still […]