Tear Front End JavaScript by Hand (Phase 1)

1. Anti-shake function (debounce) Purpose: Prevent users from triggering events multiple times and wasting multiple requests Principle: Callback is executed after an event triggers for n seconds; If triggered again within n seconds, the time is recounted; const debounce = function(func,delay = 50){ /* func: Functions requiring ...

Posted by JayBlake on Thu, 03 Mar 2022 19:10:25 +0100

Unit webgl loads assetbundle (nodejs build server)

This article is a study record. I dug a hole for myself to fill in. Step 1: Pack ab After establishing the corresponding path Assets/AssetBundles folder, you can go to the menu ("Assets/Build AssetBundles") and click the button to package. public class CreateAB : MonoBehaviour { [MenuItem("Assets/Build AssetBundles")] stati ...

Posted by freebie on Thu, 03 Mar 2022 16:48:47 +0100

How to handle large volume XLSX/CSV/TXT files?

In the development process, we may encounter such needs. We need to parse information from local Excel or CSV files. These information may be attendance clock in records, calendar information or recent bill flow. However, their common feature is that there are many and complicated data, the workload of manual input is huge, error prone, and it ...

Posted by Spud_Nic on Thu, 03 Mar 2022 08:33:40 +0100

Five tips for JSON in JavaScript

Some tips about JavaScript JSON1. FormatThe default stringer also shrinks JSON, which looks uglyconst user = { name: 'John', age: 30, isAdmin: true, friends: ['Bob', 'Jane'], address: { city: 'New York', country: 'USA' } }; console.log(JSON.stringify(user)); //=> {"name":"John","age":30,"isAdmin":true,"friends":["Bob","Ja ...

Posted by troy_mccormick on Thu, 03 Mar 2022 04:22:30 +0100

Detailed explanation of ES6 module and CommonJS and their differences

ES6 module (introduction, features) introduce ES6 introduces modularity. Its design idea is to determine the dependencies of modules and the variables of input and output at compile time. The modularization of ES6 is divided into two modules: export @ and import. characteristic The module of ES6 automatically turns on the strict mode, ...

Posted by dheeraj on Wed, 02 Mar 2022 14:48:58 +0100

Use vue to jump between registration page, login page and home page and maintain login status [complete code]

Article catalogue preface1, Simple implementation of page 1. Login page2. Registration page3. Home page (display personal information) 2, Logical implementation 1. Use of localstorage2. Function realization Sign inregisterhomepageRouting profile summary preface This article mainly explains how to use vue to realize the j ...

Posted by PHPHorizons on Wed, 02 Mar 2022 06:18:38 +0100

Node.js learning 13 (express framework)

1, Express introduction 1. What is Express Express is based on node JS platform, a fast, open and minimalist Web development framework. The role of ExpressExpress and node JS is similar to the built-in http module, which can help developers quickly create a Web server. ExpressExpress is a popular node based The Web application develop ...

Posted by Zoran_Dimov on Tue, 01 Mar 2022 15:33:44 +0100

minio sdk based on nodejs, breakpoint continuation scheme of self built service transfer file

backgroundThe company's business problems need no more elaboration. The general demand is to need a breakpoint continuation functionThe company's file storage is used amazon s3 , this is a general-purpose file storage, similar to Alibaba cloud oss. A file can be regarded as an object and can do some operations for file objects. amazon s3 is a s ...

Posted by superdan_35 on Tue, 01 Mar 2022 09:05:07 +0100

Promise asynchronous programming - the ultimate asynchronous solution async + await node JS primary

Promise introduction: Promise is a solution for asynchronous programming. ES6 writes it into the language standard, unifies the syntax, and provides promise objects natively. Promise is simply a container that holds the result of an event (usually an asynchronous operation) that will not end in the future. Syntactically speaking, promise is a ...

Posted by jawapro on Tue, 01 Mar 2022 01:55:50 +0100

Memory control of Node

Memory control of NodeAllocation failed — process out of memoryIf you see the above error, it means that your NodeJS application is out of memory. It consumes more memory than the allocated memory, resulting in its self termination.When an application batch processes a large amount of data, the data processing algorithm is written in such a way ...

Posted by kkessler on Mon, 28 Feb 2022 10:07:17 +0100