Sorting out the use of some functional functions
Some commonly used functional functions
About native JS
File size unit conversion
/**
* @desc bytesToSize Byte unit conversion
* @param bytes Incoming data in bit
*/
const bytesToSize = function (bytes) {
const k = 1024;
if (!bytes || bytes === 0) return '0 B';
if (typeof (bytes) == 'string') {
return bytes
} else {
...
Posted by gilijk on Sat, 30 May 2020 08:29:56 -0700
Implementation of pull-down menu effect with native js
Recent contact with Magento background management system needs to realize the function of a pull-down menu. The previous projects are all mixed use of js and jquery. They never use pure js to realize the function. They don't know if they don't write. They find their own shortcomings only after they write. If they lose jquery, they will lose th ...
Posted by watts on Fri, 29 May 2020 08:30:53 -0700
Basic principle of Chainlink Oracle
Basic principles of ChainlinkIn this paper, we will briefly introduce the basic principle of Chainlink. If we use the shortest sentence to explain what Chainlink is, we can say that Chainlink is a decentralized Oracle project, so in order to understand the working principle of Chainlink, we should first understand what is a oracle.
Prophecy mac ...
Posted by jeethau on Thu, 28 May 2020 02:43:42 -0700
2 Enables you to quickly get response headers and senders
Today we're going to use two quick ways to get response headers and send headers.
1. Get Request Header
To get the request header, you need to use the package capture tool, which is currently more common than fiddler.You can search and download in Baidu.First let's turn on fiddler
You'll find that on the left side there's an increa ...
Posted by d3vilr3d on Wed, 27 May 2020 18:09:37 -0700
The problem of 32-bit floating-point precision loss of WebGL shader in map development
The following content is reproduced from the article "WebGL shader 32-bit floating-point precision loss" of wood tree
Author: tree of wood
Link: https://www.cnblogs.com/dojo-lzz/p/11250327.html
Source: blog Park
The copyright belongs to the author. For commercial reprint, please contact the author for authorization. For non-commercia ...
Posted by dankstick on Mon, 25 May 2020 22:08:26 -0700
Rookie front end diary 11 (native JS -- date function)
Date function
Date object: js is a built-in method for processing date and time related operations.
Creation date object:
new Date();
Parameters can be received in new Date
1. No parameters: create a date object with local time as reference.
2. New date (year, month, day, hour, minute, second)
Note: the parameter can be omitted. The om ...
Posted by deepson2 on Sun, 24 May 2020 08:46:58 -0700
Rookie front end diary 11 (native JS -- date function)
Date function
Date object: js is a built-in method for processing date and time related operations.
Creation date object:
new Date();
Parameters can be received in new Date
1. No parameters: create a date object with local time as reference.
2. New date (year, month, day, hour, minute, second)
Note: the parameter can be omitted. The om ...
Posted by arsitek on Sun, 24 May 2020 08:47:30 -0700
Dynamic generation of raster layouts using React short code
As a sub-process module of TerminalMACS, React Web Management, uses Ant Design Pro as the framework.
The knowledge to which this article applies
1. Use of methods in style file less
2.for Loop Create Button and Raster Layout (flex Layout)
1. Final results and source links
As a front-end novice, I spent several days doing this simple functio ...
Posted by transformationstarts on Sat, 23 May 2020 13:45:50 -0700
JavaScript Statistics Processing - Encapsulation and Inheritance of Classes
JavaScript is a widely used Web programming language.
Using JavaScript technology to process statistics in browsers has the best dissemination effect
A class is a collection of common attributes and methods.JS is an object-oriented language whose objects as objects are simulated and encapsulated using the prototype property.
The cl ...
Posted by BLaZuRE on Fri, 22 May 2020 19:13:38 -0700
Ref realizes navigation and rolling positioning
abstract
In development projects, there is often a need to click jump to scroll to the anchor. The simplest anchor location is to give a tag a, a tag's href = 'anchor', and then give an id = 'anchor' to the anchor to jump. Referring to the simplest way to realize the jump of anchor point, useRef is used in React to realize the function of jump ...
Posted by smarty_pockets on Fri, 22 May 2020 08:52:14 -0700