WebSocket learning summary
This article casually wrote about my own understanding of websocket communication protocol, Demo played on two frameworks, and then stepped on several pits and unfilled pits (welcome to comment and guide).
What is WebSocket? Why use WebSocket?
WebSocket is a kind of network communication protocol.
When it comes to network communication protoc ...
Posted by redmonkey on Fri, 17 Apr 2020 02:42:03 -0700
Using codemirror in vue (element) to realize code highlighting, code completion and version difference comparison
vue language is used, and component of element is used. To make an online editing code, code content is required to be input, highlighted display can be carried out, different languages can be switched, keyword completion is supported, and a code left-right comparison between different versions is required.
As for why codemirror is selected, pl ...
Posted by deltatango5 on Fri, 17 Apr 2020 01:50:42 -0700
HTML5+tracking.js for brush payment
HTML5+tracking.js for brush payment
Recently, brushing payments have become so popular that bosses are sure to keep up with the times, so there's a brushing payment program.The key technologies for front-end implementation are camera video recording, photo taking and face matching. This article will discuss how to achieve face brushing payment ...
Posted by adt2007 on Thu, 16 Apr 2020 20:34:11 -0700
Process control statement switch select statement
When there are many options, switch is more convenient than if else. The syntax is as follows:
1 switch (expression)
2 {
3 case value 1:
4 execution code block 1
5 break;
6 case value 2:
7 execution code block 2
8 break;
9 ...
10 case value n:
11 execution code block n
12 break;
13 default:
14 code executed at the same time as c ...
Posted by SirChick on Thu, 16 Apr 2020 08:02:20 -0700
Pull-up loading of native ajax writes
The idea of pull-up loading
Pull up loading is to trigger ajax event request data when the screen is pulled to the bottom
2. All the codes below the height of the document and the height of the scroll to get the height of the screen are compatible and can be used directly
Javascript:
alert(document.body.clientWidth); //Page visible area ...
Posted by scbookz on Wed, 15 Apr 2020 13:16:56 -0700
(5) ArcGIS JS query map information by attribute
Preface
When we use the ArcGIS JS API, we will encounter entering a name in the text box, querying the element, and realizing the function of finding the element.
Get ready
Deploy ArcGIS JS API locally / call online API Local deployment of ArcGIS JS API
Publish a good dynamic map service http://blog.csdn.net/idomyway/article/details/792 ...
Posted by rjs on Wed, 15 Apr 2020 07:43:43 -0700
(6) ArcGIS JS query map information by space
Preface
When we use the ArcGIS JS API, we will meet the requirement of clicking to find the element attributes. Spatial query of map can be realized through IdentifyTask in ArcGIS JS
Get ready
Deploy ArcGIS JS API locally / call online API Local deployment of ArcGIS JS API
Publish a good dynamic map service http://blog.csdn.net/idomyway/a ...
Posted by eva21 on Tue, 14 Apr 2020 10:28:42 -0700
Life cycle function in React
Life cycle function refers to the function that the component will automatically execute at a certain time
constructor can be regarded as a common life cycle function of a class, but it is not a unique life cycle function of react
render() is a function that automatically executes when the data changes, so it belongs to the life cycle function ...
Posted by wmvdwerf on Tue, 14 Apr 2020 10:16:16 -0700
JavaScript development must master skills - better use of jQuery attr method
The previous several articles are all long speeches. It's really a bit hard to read them all at once. Today, I'd like to share a skill of using attr() in development. Maybe we haven't used it like this. It works with the template string module in the ES6 standard. Let's take a look at the template string and its use:
// Conventional JavaScript ...
Posted by tomwerner on Tue, 14 Apr 2020 09:25:46 -0700
wx.request(Object object) HTTPS network request encapsulation
Wechat applet wx.request
RequestTask wx.request(Object object) initiates an HTTPS network request.
Sample code
wx.request({
url: 'test.php', //Example only, not real interface address
data: {
x: '',
y: ''
},
header: {
'content-type': 'application/json' // Default value
},
success (res) {
console.log(res.data)
}
})
...
Posted by Ab on Tue, 14 Apr 2020 07:52:30 -0700