Mouse follows colorful effect
It's cool and hard to see the effect of others on the Internet before, but it's not that hard to really understand how to do it. It uses canvas.
Let's see the effect first
Maybe it's not very nice.
1. Create a canvas first (size and style can be defined at will)
<canvas id="canvas" width="300" height="300"></canvas>
2. Get the curre ...
Added by cwiddowson on Wed, 04 Dec 2019 05:28:08 +0200
Implementation of drag effect of vue module
It happens that in the previous interview, we met with questions to achieve drag effect
At the time of interview, I simply answered the way and logic of implementation.
Now I have nothing to do, and I have realized this thing.
The principle is very simple and easy to write.
Data driven, create an array with an initial length of 1
When dragging ...
Added by emrys404 on Wed, 04 Dec 2019 00:23:17 +0200
Getting started with Tablestore data management
In order to let users of table store better understand the product data management ability and SDK use, this article will describe the function and use mode of data management in combination with the code. This article only talks about the management and use of the main table data, not all the data management capabilities of the Tablestore. The ...
Added by Drayton on Tue, 03 Dec 2019 21:15:46 +0200
Advanced optimization of bubble sorting
The idea of bubble sorting: we take ascending sorting as an example. The so-called bubble sorting is to select the largest number in each run in an unordered array and put the next largest number in the second run in the last place until the sorting is completed. And so on Descending is to sort small numbers after them. The code is as follows:
...
Added by timgetback on Tue, 03 Dec 2019 13:24:02 +0200
MySQL big data table horizontal partition optimization
Change the large running table to a partitioned table
The code of this article is limited to monthly horizontal partition based on data time. Other requirements can be implemented by modifying the code
1. Create a partition table
The table field of this table is the same as that of the original table, with partition
CREATE TABLE `metric_data_tm ...
Added by CrimsonSoul on Tue, 03 Dec 2019 04:40:27 +0200
[pyqt5 QT designer] dialog series
Standard input dialog series:
Main module
from PyQt5.QtWidgets import QInputDialog
The effect is as follows:
Full code:
from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton, QLabel, QInputDialog, QTextBrowser,QGridLayout)
import sys
from PyQt5.QtGui import QIcon
class Example(QWidget):
def __init__(self):
super()._ ...
Added by universelittle on Mon, 02 Dec 2019 22:58:14 +0200
Search algorithm (geek time record)
I. binary search method - (geek time record)
Binary search method can solve the problem, more tend to use hash table or binary tree. Dichotomy is more suitable for approximate search problems.
Error prone details:
Termination conditions;
The method of updating the upper and lower bounds of interval;
Selection of return va ...
Added by alecks on Mon, 02 Dec 2019 19:04:54 +0200
PHP digital amount to capitalized amount
An amount conversion function used in CRM in the early years. Today, take it out of the old project and record it. There are many functional methods for amount conversion, which are very good. But this is a conversion function that Cui wrote when he was working. It's more or less memorable. If you have any questions, please point out that Cui w ...
Added by stressedsue on Sun, 01 Dec 2019 02:28:31 +0200
Exercise: object oriented
1. Create an Auto class, including the number of tires, car color, body weight, speed and other attributes, and create instances through different construction methods. At least the car should be able to accelerate and slow down Another car class, CarAuto, inherits Auto, adds air conditioning and CD attributes, and re implements methods to cove ...
Added by catnip_uk on Thu, 28 Nov 2019 14:53:11 +0200
Understanding the implementation of circular queue
In the previous section, we found that multiple queue in and queue out operations will cause a "false overflow" phenomenon that there is storage space but can not enter the queue. The reason for this is that the storage unit of the sequence queue does not have a repeated storage mechanism. The solution is that if the ...
Added by HaLo2FrEeEk on Mon, 25 Nov 2019 21:15:24 +0200