Canvas Getting Started 6 requestAnimationFrame for Animation

The learning resources for this article come from "Graphics, Animation and Game Development of HTML5 Canvas Core Technologies" Try not to use setInterval and setTimeout to animate, but rather use the requestAnimationFrame() method to let the browser decide the frame rate on its own. Because browsers differ in the implementation of ...

Added by dawho9 on Tue, 07 Jul 2020 17:40:43 +0300

canvas tags for HTML5

canvas tags for HTML5 preface text What is canvas Basic use of canvas canvas element Rendering context Test support canvas drawing concept Coordinate space Draw rectangle Draw path Draw arc arc example 1 arc example 2 arc example 3 Add canvas style fillStyle strokeStyle Draw text Add text sty ...

Added by cresler on Wed, 24 Jun 2020 09:22:11 +0300

Mouse and keyboard operation events

Mouse events Mouse events are included in the ActionChains class. When importing, you only need to: from selenium.webdriver.common.action_chains import ActionChains Import the class to: Common methods are: context_click() -- right click double_click() -- double click drag_ and_ Drop - drag move_to_element() -- mouse over an element cl ...

Added by snipesh0tz on Mon, 01 Jun 2020 04:12:15 +0300

Native js implements addClass,removeClass,hasClass methods

1.hasClass() //Determine whether a class exists function hasClass(element, value) { var cls = value || ''; //\s Matches any white space characters, including spaces, tabs, page breaks, and so on if (cls.replace(/\s/g, '').length == 0) { return false; //Returns false when no parameter is returned ...

Added by geroid on Thu, 21 May 2020 19:13:09 +0300

Spring Security automatically kicks off the previous logged-in user, a configuration is complete!

After successful login, automatically kick off the previous login user. Songge first saw this feature inside the button. It was fun at that time. Once you've done your own development, you've met the same requirements. Just as the recent Spring Security series is being serialized, you can use Spring Security to talk about how this function work ...

Added by bl00dshooter on Thu, 07 May 2020 04:01:23 +0300

How to remove the browser's built-in password saving function?

Previously, there was a bug like this when you logged in. When you click on the sign-in browser will prompt you to "save password". Then if the user accidentally clicks on this "save" when they go online in a field such as an Internet cafe, it will be troublesome. After shutting down and leaving, the ...

Added by kabucek on Mon, 13 Apr 2020 19:33:01 +0300

[code segment] set the width and height of iframe label automatically according to the sub page

[code segment] set the width and height of iframe label automatically according to the sub page This code function can automatically modify the width and height of iframe label in the parent page according to the width and height of the child page loaded by iframe to fully display the child page To configure T ...

Added by Wo0tHigh on Tue, 31 Mar 2020 13:38:49 +0300

Front end replication

Replication mainstream implementation At present, there are four main ways of copy: ZeroClipboard.js, Clipboard.js, execCommand Differences in replication ZeroClipboard: it's the most compatible. It can be fully compatible with chrome/firefox/ie/safari, but the plug-in is large, 230KB. The implementation method is fl ...

Added by andynick on Tue, 31 Mar 2020 01:50:56 +0300

vue interceptor implements unified token and is compatible with IE9 verification

In the project, vue is used to build the front-end page, and axios requests the back-end api interface to complete the data interaction. If the password token is written in each interface, it is not only a small physical work, but also inflexible. Here we share the use of vue's own interceptor to add token to the header of each request, and it ...

Added by Seamless on Mon, 30 Mar 2020 18:25:36 +0300

Abstract Factory Mode for Creative Mode

1 Overview Last article Speaking of the factory method pattern, it provides a solution for creating class instances without specifying a specific implementation.So why do we need the abstract factory model? 2 Abstract Factory Mode The abstract factory model is essentially also a factory defined as an entry for class creation, which has the adva ...

Added by bhogg on Sat, 21 Mar 2020 07:53:49 +0200