Tag:Square

  • The python implementation turns the even number in the list into its square

    Time:2021-10-13

    I’ll stop talking nonsense. Let’s look at the code directly~ ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #Write a program to turn the even number in the list into his square def word_len(s):   # s = [i ** 2 for i in s if i % 2 […]

  • An example of finding the square of numbers in Python Programming

    Time:2021-10-10

    Problem Description: Find the square of the input number. If the square operation is less than 100, exit. Source code: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #!/usr/bin/python # -*- coding: UTF-8 -*-   TRUE = 1 FALSE = 0 def SQ(x):   return x * […]

  • Good looking loading

    Time:2021-9-21

    1. Small circular loading with different sizes <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>Document</title> </head> <body> <div style=”width:100%;height:100vh;display: flex;justify-content: center;background-color: rgb(195, 191, 191);”> <div class=”d1″> <p></p> <p></p> <p></p> <p></p> </div> <div class=”d1″> <p></p> <p></p> <p></p> <p></p> </div> </div> </body> <style> *{ margin: 0; padding: 0; } .d1{ […]

  • Batch MP3 for Xiaobai MacOS step by step

    Time:2021-8-28

    Troubleshooting Once Xiaobai came to my house with a notebook, saying that there was a problem with the square dance I downloaded, and it couldn’t be played on the square dance speaker. He said it was the problem with the song I downloaded.When she came to me, she first reproduced the problem. She took out […]

  • Using Python to realize the nine palace pictures in the circle of friends

    Time:2021-7-20

    You should often see people sending pictures in the circle of friends. The essence is to cut a picture into nine parts and then send the nine pictures together in wechat. When it comes to cut diagrams, python can be implemented. The main Python library used is pilot, which can be installed and usedpip install […]

  • The advantages of go language in solid principle

    Time:2021-6-29

    [reading notes] solid principle What is the solid principle used for? Solid principle mainly tells us how to organize data and functions into classes, and how to connect these classes into programs. PS. the class here is not necessarily object-oriented, but a grouping of data and functions. The core of solid principle is to describe […]

  • JavaScript graphic example: Hilbert curve

    Time:2021-5-4

    In 1891, German mathematician David Hilbert constructed a kind of curve. First, he divided a square into four small squares, starting from the center of the square in the northwest corner, going south to the center of the square in the southwest, then east to the center of the square in the southeast corner, and […]

  • Analysis of Python example of spark

    Time:2021-4-25

    Here is an analysis of Spark’s own example of PI, as the entry codeFirst of all, let’s introduce the principle of PIIn fact, it is also a Monte Carlo simulation algorithm. The basic method is to consider a square with side length of 1If you draw a circle with a point of the square as […]

  • Colorpicker of mobile terminal made by canvas

    Time:2021-4-18

    Color picker of mobile terminal made by canvas I’m in another roomdemoI need to use the color picker in Android, but I can’t find the color picker I need on the mobile terminal. Many of them are PC’s, and then I find that the input [type =’color ‘] exists. I find that Android is OK, […]

  • Learning canvas from a Sketchpad demo

    Time:2021-4-11

    preface I started to learn canvas and made a Sketchpad application,The address is here. This article is some basic ideas and considerations of canvas, not basic API. It mainly lies in the practical experience of touch event Retina screen compatible Retina screen will use multiple physical pixels to render an independent pixel, resulting in double […]

  • Spark 3. Spark programming mode

    Time:2021-3-27

    Write on the front This series is a combination of my understanding records in the process of learning spark + some understanding of reference articles + some personal experience in the process of practicing spark. Writing such a series is just to sort out the notes of personal learning spark, so everything is mainly to […]

  • JavaScript graphic example: plane mosaic pattern

    Time:2021-3-5

    Mosaic with one or several plane figures of the same shape and size, and lay them together without any gap or overlap, is called plane mosaic of these figures. 1. A planar mosaic pattern realized by a polygon We can use regular triangle, square or regular hexagon to realize plane mosaic. (1) Tile with a […]