Remember to parse the string once: find the starting position of the specified N strings in the target string

In our project, there is a scenario: a drop-down selection box, which supports user input and displays the final result in the text box (that is, ordinary string, and the user's selection in the drop-down box is in []) I don't know if I can imagine that when I write a note, it's a little close to the function of choosing "tag tag" in ...

Posted by bidnshop on Sat, 28 Mar 2020 04:15:35 -0700

Understanding and notes on Ajax Application and jQuery plug-in in jquery

Ajax has both native and packaged jQuery versions. It feels that jQuery's writing method is simple and clear, and does not need to be compatible with browsers. 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title></title> 6 </head> 7 <body> 8 ...

Posted by davidcriniti on Thu, 26 Mar 2020 08:37:44 -0700

Timer-Case Analysis in JS

Making js timer In javascritp, there are two special functions for timers: 1. Countdown timer: timename = setTimeout ("function (;"), delaytime); 2. Cycle timer: timename=setInterval ("function();", "delaytime); The first parameter,'function()', is the action to be performed when the timer triggers. It can be a funct ...

Posted by Akenatehm on Wed, 25 Mar 2020 01:06:50 -0700

How should JWT be used?

I. overview JWT, which is called JSON Web Token in full, is an open-source standard protocol. It defines a JSON based, lightweight and secure data transmission method. Two, details Each JWT is composed of three parts: Header, Payload and signature. At the same time, the JWT is spliced with dots in the form of: Header.Payload.Signature Header Th ...

Posted by Dale_G on Mon, 23 Mar 2020 20:35:25 -0700

JavaScript Modular Development

What is modular development? In front-end development, it can achieve some basic interaction effect as long as several dozens or hundreds of lines of code are embedded in script tags at first. Then js is valued and widely used. The help of jQuery, Ajax, Node.Js, MVC, MVVM, etc. also makes front-end development important and makes front-end pro ...

Posted by pmjm1 on Mon, 23 Mar 2020 10:53:05 -0700

Game making based on canvas

Use canvas canvas to design games 1. Catalogue 1. Introduction to Canvas 2. Cases 2. Introduction to canvas What is a Canvas element The canvas element of HTML5 uses JavaScript to draw images on a Web page.The canvas is a rectangular area where you can control each pixel.Canvas has a variety of ways to draw paths, rectangles, circles, character ...

Posted by spider661 on Mon, 23 Mar 2020 09:54:35 -0700

JQuery - about jQuery operation properties, elements, size locations, etc.

1. Operations on attributes The so-called attribute operation is to manipulate the attributes of a series of elements, value la class.... Especially the operation on input is very important. To complete the next advanced Sao operations on the framework, let's now take a look at the three prop(), attr(), and data() operations common to jQuery a ...

Posted by Elemen7s on Sun, 22 Mar 2020 19:46:56 -0700

EasyUI tree table displaying Json data

Use the TreeGrid component of EasyUI to format and display the Json data. First, read in the Json file, turn it into a Map object, recurse each Map, and determine whether its value is the basic type or Map. If the base type, the attribute node. If Map is an object, it needs to be traversed again. 1.Map resolves Tree objects Tree object public ...

Posted by nashruddin on Sun, 22 Mar 2020 08:22:02 -0700

json operation for Golang

JavaScript Object Representation (JSON) is a standard Protocol for sending and receiving structured information.JSON is not the only standard Protocol among similar protocols.XML (7.14), ASN.1, and Google's Proocol Buffers are similar protocols and have their own features, but JSON is the most widely used because of its simplicity, readability ...

Posted by GregArtemides on Sun, 22 Mar 2020 00:00:01 -0700

JS -- quick sorting and merging

Catalog Quick sorting and merging of JS sorting algorithm Quick sort Merge sort Quick sorting and merging of JS sorting algorithm Quick sort Principle: select a key (generally the first element) and divide the array into two regions. All the regions on the left are less than or equal to the key, ...

Posted by willcodeforfoo on Sat, 21 Mar 2020 07:05:21 -0700