• An inedible mid autumn moon cake


    The bright moon is rising above the sea, everyone faraway enjoy the same moment. —-“Looking at the moon and cherishing the distant” (Tang · Zhang Jiuling) Unconsciously, it is the Mid Autumn Festival again. I believe that the majority of friends have received moon cakes sent by the company or other friends. I believe no […]

  • Instance – custom paint slide unlock


    design sketch:          GitHub address: https://github.com/luofangli/Draw_ SlideUnclock   All codes: 1:   xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent” tools:context=”.MainActivity”> android:layout_width=”200dp” android:layout_height=”200dp” android:background=”@color/design_default_color_primary” app:layout_constraintBottom_toBottomOf=”parent” app:layout_constraintEnd_toEndOf=”parent” app:layout_constraintHorizontal_bias=”0.445″ app:layout_constraintStart_toStartOf=”parent” app:layout_constraintTop_toTopOf=”parent” app:layout_constraintVertical_bias=”0.499″ />2:     package com.example.myimport android.graphics.Colorimport android.graphics.Paintimport android.graphics.Rectclass Dot(x: Float, y: Float,radius:Float,tag:Int) {// center position of the dot Val CX = x Val CY = Y // […]

  • Canvas draw posters or price tags, download a single picture, and download multiple picture zip packages


    Requirement: Download price tags in batch, click batch download, if you select a piece of data, draw a canvas and download it directly. Else for multiple pieces of data, cycle to draw multiple canvass, and download the zip. The zip name is set to “label” + the current date (the zip name can be set […]

  • Canvas font auto wrap line thickness to solve 1px line blur problem


    Ctx.filltext automatically replace rows <!DOCTYPE HTML> <html> <head> <meta charset=”UTF-8″> <title>fillText Auto-wrap</title> </head> <body> < canvas id = “mycanvas” > your browser does not support canvas</ canvas> <br> < textarea id = “input” row = “6” col = “60” style = “width: 300px; height: 100px;” > auto wrap text auto wrap text auto wrap text […]

  • Learn D3 getting started document: Shapes


    Introduction FollowLearn D3: ScalesThe fifth part is only an English translation. The modifiable code is replaced by static pictures. If you want real-time interaction, please read the original text. Original text:Learn D3: Shapes Version: Published Mar 24, 2020 Origin My GitHub text Svg and canvas allow any type of graphics to be intentionally generic; In […]

  • Solve the problem of fuzzy canvas drawing


    Canvas painting often finds that he is fuzzy. There are two main ways to solve this problem. Change the pixels rendered by canvas Situation: the line drawn with 1 pixel looks blurred, as if it is wider.Solution var ctx = canvas.getContext(‘2d’); ctx.translate(0.5, 0.5); Principle: we all know that the smallest unit of the screen is […]

  • Best practice of MCU software — matrix keyboard driver


    1. Matrix keyboard vs independent keys In the process of MCU application development, independent keys are common, but when a large number of keys are required, the use of matrix keyboard can reduce IO occupation and improve the utilization of system resources. For example, a MCU project requires 16 buttons. If the independent key scheme […]

  • AI UAV makes transmission line inspection more “smart”!


    Abstract: this group of “young” people “tamed” the UAV to inspect the transmission line with technology. In June 2019, a city suddenly became a “gray” city because of the paralysis of the power interconnection system. The traffic lights stopped working, all public transportation such as subway, intercity railway and bus stopped, and the water supply […]

  • Web front end lesson 66 – new features of H5: Canvas drawing


    1. Canvas description Canvas is a new label proposed by H5, which is intended to replace plug-ins similar to flash animation or games, It can greatly reduce the page structure size and improve the page response speed. explain: ⑴   Canvas tag is only a graphics container, providing an area where images and graphics can […]

  • Applet comments / handwriting


    This chapter mainly introduces how to make handwriting / picture annotation in small programs. Introduction to small program documents Canvas:Canvas, drawing context:CanvasContext 1. Create a canvas in the front end, and the canvas ID of the front end’s canvas,Using Wx. Createcontext to get the drawing context var context = wx.createCanvasContext(‘myCanvas’) 2. Set properties / styles. […]

  • Application of experiential quantum neural network in natural language processing


    abstractThis paper takes you to experience the application of quantum neural network in natural language processing from zero This article is shared from Huawei cloud community《Application of experiential quantum neural network in natural language processing》Author: Jeff Ding. In this paper, we will experience the application of quantum neural network in natural language processing from zero. […]

  • Call the delete key to delete the line or node of jsplug process


    ❝ Some time ago, I made a front-end process designer, which is based on jsplug and can be dragged. The big leader was very satisfied with it and put forward a suggestion. The deletion of lines was not in line with the habits of the public. Most people couldn’t guess (what I did was to […]