apply, call, bind in Javascript

In javascript, call, apply and bind exist to change the context of a function runtime, in other words, to change the direction of this within the function body. call,apply For example: let person = { name:'Lucy', say:function () { console.log(this.name) } } person.say() ...

Posted on Fri, 06 Dec 2019 09:01:47 -0500 by LikPan

Use and application of Canvas

Canvas canvas is one of my favorite tags in all my favorite new features in HTML5. Because it's so powerful, all kinds of interesting special effects can be achieved. 1. Basic usage of canvas - It is an inline block element - The default size is 300 x 150,Cannot be in css You can only write its properties in the label. as width = 400,height ...

Posted on Fri, 06 Dec 2019 08:27:21 -0500 by gdrums

spring security permission control

There are two ways to control the permission of spring security: one is to compare whether the current request url and the permission of the current user contain the url; The other is to use @ PreAuthorize("hasAuthority('XXX ')) annotation, where XXX can be role or any permission identifier, which is a string type 1) way of annotation Y ...

Posted on Fri, 06 Dec 2019 06:30:27 -0500 by tomato

Three frameworks: React

Introduce react file to run page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <script sr ...

Posted on Fri, 06 Dec 2019 02:41:59 -0500 by Ghostu

dubbo source resolution remote call -- redis protocol

Remote call - redis protocol Objective: to introduce the design and implementation of redis protocol and the source code of Dubbo RPC redis. Preface The redis protocol supported by dubbo is based on redis, Redis It is an efficient KV storage server, similar to the implementation of memcached protocol. In dubbo, there is no service exposure abou ...

Posted on Fri, 06 Dec 2019 01:15:45 -0500 by Jocke

Applet development: left slide delete

Introducer First, make two statements: The idea and code is to make some modifications and supplements according to the data Here The following is just demo. You can modify and improve it according to your own needs The ideas for implementation are as follows 1. First, each item on the page is divided into two layers: the upper layer is for ...

Posted on Fri, 06 Dec 2019 00:46:13 -0500 by james_cwy

Ten minutes to learn how to use python3 web crawler to capture cat eye movie rankings

In this section, we use the requests library and regular expressions to capture the relevant content of the cat's eye movie top 100. Requests is more convenient than urllib, and we haven't learned HTML parsing library systematically, so we choose regular expression as parsing tool. 1. Objectives of this section In this section, we want to extra ...

Posted on Thu, 05 Dec 2019 23:32:21 -0500 by slaterino

[python] the usage of @ property, @ setter, @ getter, @ delete in object-oriented programming

@Property decorator function: turn a method into a property call Use @ property to convert class methods to read-only properties, and customize setter, getter, and delete methods   @property&@.setter class Person(object): @property def birth(self): return self._birth @birth.setter def birth(self,va ...

Posted on Thu, 05 Dec 2019 19:32:08 -0500 by RavenStar

Solution to offline implementation of Openlayers official website instance

Openlayers official website provides many examples for GISer to learn, but the latest example is based on openlayers 5.3 and ECMAScript6 language development, and most of the industry uses more openlayers 3-4 versions, which has a connection problem with the market development of new and old versions. The beginners of GIS development often have ...

Posted on Thu, 05 Dec 2019 17:40:06 -0500 by gabereiser

Do you really know the Object source code

Welcome to like reading, study and exchange together, please leave a message if you have any questions. Open source is also available on GitHub JavaHouse Welcome star Introduce Object should be a relatively simple source code. Now let's analyze him. Object is the root of the class hierarchy. By default, each class in the Java system has a supe ...

Posted on Thu, 05 Dec 2019 16:53:33 -0500 by besly98