Canvas drawing a pixel wind electronic clock

The idea is to draw a number of small squares on Canvas. The first step is to realize the method of drawing small squares. First, draw a 10x10 square with a side length of 5, which can be easily completed by using two for loops. 1 for (let i = 0; i < 10; i++) { 2 for (let j = 0; j < 10; j++) { 3 context.fillRect(5 * i, 5 ...

Posted on Wed, 16 Oct 2019 21:51:01 -0400 by Tracekill

23 design patterns of Java, detailed explanation

1. Adapter Intent Convert one class interface to another user's interface.       Class Diagram       Implementation Duck and Turkey have different calls. Duck's call calls the quack() method, while Turkey calls the gobble() method. It is required that Turkey's gobble() method be adapted to Duck's quack() method to make Turkey ...

Posted on Thu, 17 Oct 2019 02:55:37 -0400 by QSDragon

Android 9.0 MTK flat panel horizontal screen scheme modification (forced app horizontal screen + startup logo / animation + shutdown charging horizontal screen + RecoveryUI horizontal screen)

If the article is long, it is suggested to collect it before reading it. Disassembly steps 1. The app forces horizontal display, ignoring the Android: screenorientation = "portait" attribute 2. Screen touch coordinate is changed to horizontal screen. 3. Power on animation screen 4. Startup logo, shutdown and charging animation screen ...

Posted on Wed, 16 Oct 2019 20:42:33 -0400 by russellpehrson

python learning 11: detailed explanation of Python tuple

Tuples are another important sequence structure in Python. Similar to lists, tuples are also composed of a series of elements sorted in a specific order. Unlike a list, a list can operate on any element and is a variable sequence, while a tuple is an immutable sequence, that is, the elements in the tuple cannot be modified separately. Tuples c ...

Posted on Thu, 17 Oct 2019 01:52:01 -0400 by manishdugar

elasticsearch Chinese word segmentation plug-in IK analyze

Elastic search version 7.3 Install Chinese word segmentation plug-in The corresponding version of plug-in should be the same as that of elastic search. Download address of plug-in versions https://github.com/medcl/elasticsearch-analysis-ik/releases Install using the elasticsearch native script ./bin/elasticsearch-plugin install https ...

Posted on Thu, 17 Oct 2019 02:05:15 -0400 by Ryaan