Preliminary understanding of Promise

First, we know Promise from console Dir (Promise) start The prototype method in prototype needs an instance all race reject resolve is a static method, which is used directly How to use Promise? new Promise((resolve,reject) => { setTimeout(() => { console.log('implement Promise') resolve('Data to return') },2000) }) ...

Added by IronicSoul on Tue, 25 Jan 2022 00:55:44 +0200

vue source code understanding - change detection

1. Change detection How to implement data responsive system in Vue to achieve data-driven view. change detection One of the biggest features of vue is data-driven view What is a data-driven view? We can understand the data as a state, and the view is what users can intuitively see. The page is not a constant layer. It changes dynamically. ...

Added by Sheen on Tue, 25 Jan 2022 00:46:59 +0200

HTTP learning notes

HTTP learning notes HTTP Fundamentals Common request methods of HTTP protocol methodDescriptionGETRequest the specified page information and return the response contentPOSTSubmit data to the specified resources for processing requests (such as submitting forms or uploading files), and the data is included in the request body. POST requests ...

Added by Eggzorcist on Mon, 24 Jan 2022 22:46:24 +0200

Notes - browser built-in objects

What is the browser object model BOM: Browser Object Model. The browser model provides an object structure that is independent of content and can interact with the browser window, which is the API provided by the browser. Its main objects are: window object, the core of BOM, is the interface for JS to access the browser and the Global obj ...

Added by Rochtus on Mon, 24 Jan 2022 22:38:48 +0200

Vue learning notes - Custom Instruction && components

2. User defined instructions 2.1 registration of directives The registration of user-defined instructions is divided into global registration and local registration. For example, registering a v-focus instruction is used to automatically obtain the focus when the page is loaded. That is, as long as no content is clicked after opening th ...

Added by Q695 on Mon, 24 Jan 2022 21:07:14 +0200

Comparison between Javascript and C# Linq iterators

outline In front-end and back-end code development, iterator pattern is widely used in the process of data traversal to simplify our traversal code. This paper mainly compares the iterators in JS and C # from two aspects of implementation and principle, so as to deepen our understanding of the programming mode of iterators. code implementatio ...

Added by anoopmail on Mon, 24 Jan 2022 20:44:59 +0200

Filter & listener

filter Filter introduction What is a filter Examples in life: Strainer, sieve, fishing net Filter in life: eliminate what we don't need, leave what we need. The concept of filter in Java Web: the object that intercepts or enhances requests and responses is a filter. (key points) What are the filters in the Java Web? Filter interface: fu ...

Added by rpieszak on Mon, 24 Jan 2022 18:13:59 +0200

Promise control concurrency in 5 minutes

causeThe project needs to do an upload function, which uploads 20 videos at a time. There will be a blocking problem if it is not transmitted directly.Because a web page can only have 6 tcp connections with the same domain name at most. If you do not control the concurrent transmission of 6 interfaces at the same time, all subsequent operations ...

Added by jaiswal on Mon, 24 Jan 2022 16:34:53 +0200

Front end | custom component v-model: how Vue implements two-way binding

v-model is a common instruction in Vue, which is often used for data binding in forms. The following basic usage must be familiar to everyone. The value of the checked attribute in data will change in real time with the status of multiple selection boxes. <el-checkbox v-model="checked" /> But you may have heard that there is a "one- ...

Added by peri on Mon, 24 Jan 2022 16:19:13 +0200

SpringBoot sets the return field of Json to be non empty

preface You may have encountered the following problems. In the project development, the back-end returns data in Json format to the front-end, but for fields with empty data, null may appear, which makes the front-end students very painful. So they think, for those null fields, can the back-end return String data to empty String and int ...

Added by Shuriken1 on Mon, 24 Jan 2022 15:19:01 +0200