Background data request in node.js mock, axios

<! -- Axios handles the cross domain background configuration 1. Install cnpm install -- save dev Axios 2.Introduce axios To project or component(Current component use only) --> // Using axios requests Axios.get("/getuser") .then(res => { //succss console.log(res.data.result); }) .catch(error => { //error ...

Posted by petrb on Sat, 04 Apr 2020 11:58:38 +0200

javascript websocket [heartbeat + service pushing information forward]

1. [Role]To maintain the sustainability and stability of the connection, the websocket heartbeat is the solution.2. [Analysis]1. If the device network is disconnected, the native websocket will not immediately trigger any events on the websocket, and the front end will not know if the current connection has been disconnected.2. When we use the ...

Posted by mator on Tue, 31 Mar 2020 03:17:16 +0200

Example of JS using cookie to save user login information

This article describes how JS uses cookie s to save user login information. To share with you for your reference, as follows: Generally, cookies and session s are used to store information in web development. Sessions exist in the memory of the server, while cookies exist in the client. Therefore, js ca ...

Posted by epp_b on Fri, 14 Feb 2020 16:53:50 +0100

An example of using Websocket developed by Python

I learned how to implement web development in java. Today I want to try to implement it in python, so I found the code on the Internet 2.1. Effect 1 (a client connects to the service and sends a message) 2.2. Effect 2 (another client connects to the service and sends a message) 2.3. Effect 3 (the servic ...

Posted by starmikky on Fri, 17 Jan 2020 15:14:10 +0100

HTML table template

HTML table 1. < Table > label: declare a table. Its common attributes are as follows:Border property: defines the border of the table. The setting value is a valuecellpadding property: defines the distance between the cell content and the border. The setting is a numeric valuecellspacing property: defines the distance between cells. The ...

Posted by Sorrow on Mon, 23 Dec 2019 21:04:30 +0100

restframework Component Details

Introduction to restfulrestful is an interface specification in which front-end and back-end interfaces are developed to improve team development efficiency, especially for front-end and back-end separation, according to which front-end and back-end development modules are not affected by each other2. Routing from rest_framework.routers import ...

Posted by wintallo on Wed, 18 Dec 2019 03:15:03 +0100

Js dynamically adds < td > data to table node tbody

/** * Dynamic < td > fill current page */ function fillPage() { // Determine the number of rows to generate based on the number of records for (var i = 0; i != dataArray.length; ++i) { // Create a row element var row = document.createElement('tr'); // Create td cell var idCell = ...

Posted by phpmania1 on Sat, 14 Dec 2019 20:42:26 +0100

Sample code of three ways to make a simple todo application with Vue

This article mainly introduces the sample code of three ways to use Vue to make a simple todo application. Xiaobian thinks it's very good. Now I'll share it with you and give you a reference. Let's follow Xiaobian to have a look   1. Reference vue.js `<!DOCTYPE html>` `<html>` `<head>` `<script src=``"[http://vuejs. ...

Posted by rotto on Sun, 08 Dec 2019 09:29:50 +0100

Front end and mobile development project III

Animation review parallax scrolling plug-inParallax Scrolling (Parallax Scrolling) refers to the web page display technology that multi-level elements move in different degrees in the process of web page scrolling, forming a three-dimensional motion effect visuallyThe main core is that the foreground and background move at different speeds to ...

Posted by xlxprophetxlx on Sat, 07 Dec 2019 13:33:14 +0100

Java compressed files and folders

Not updated for a long timeTen thousand words are omitted here. Hu Hansan is back again!!!! get down to business... This time, the main function is to achieve: according to the incoming path, compress files and folders, for example, compress files from path A to directory B, including empty folders. Not much nonsense, directly on the code: (th ...

Posted by [JayZ] on Fri, 06 Dec 2019 21:05:32 +0100