Tag:list

  • Step by step Vue + element front-end application development (19) — integration of back-end query interface and Vue front-end

    Time:2021-10-24

    In the series of articles on the front-end application development of Vue + element step by step, the processing and implementation of various functions of the system are introduced earlier. This essay introduces the integration of front-end and back-end development from a main line. Let’s make a complete introduction from the processing of query interface […]

  • Native JS implementation tree structure list

    Time:2021-10-24

    The tree structure list has been written before. It is based on Vue explanation, but it seems that it has not solved the pain point. How should the most basic native JS be implemented? This article will introduce the implementation of tree structure list in detail, from data processing into tree structure to dynamic generation […]

  • 7.3 service creation, maintenance and horizontal expansion

    Time:2021-10-23

    Create a service In swarm mode, docker run is basically not used #Swarm manager node docker service create –name busybox busybox /bin/sh -c “while true;do sleep 3600;done” View the service list [[email protected] ~]$ docker service ls ID NAME MODE REPLICAS IMAGE PORTS 426kwqf7gxif busybox replicated 1/1 busybox:latest Replicated indicates that this service can scale horizontally […]

  • Python technique 1: sequence splitting

    Time:2021-10-22

    Any sequence (iteratable object) in Python can be split by assignment, including but not limited to tuples, lists, strings, files, iterators, generators, etc. Tuple splitting Tuple splitting is the most common splitting. Examples are as follows: p = (4, 5) x, y = p print(x, y) # 4 5 If written x, y, z = […]

  • 02select listening server

    Time:2021-10-22

    # can_ read, can_ write, _ = Select. Select (inputs, outputs, none, none) ## the first parameter is that we need to listen for a readable socket, the second parameter is that we need to listen for a writable socket, the third parameter is that we need to listen for an abnormal socket, and the […]

  • 7.4 deploy WordPress through service in swarm cluster

    Time:2021-10-22

    Create an overlay driven network docker network create -d overlay wordpress [[email protected] ~]$ docker network ls NETWORK ID NAME DRIVER SCOPE q3rp3i79eud7 wordpress overlay swarm Create MySQL container docker service create –name mysql –env MYSQL_ROOT_PASSWORD=root –env MYSQL_DATABASE=wordpress –network wordpress –mount type=volume,source=mysql-data,destination=/var/lib/mysql mysql Create WordPress docker service create –name wordpress -p 80:80 –env WORDPRESS_DB_PASSWORD=root –env WORDPRESS_DB_HOST=mysql […]

  • Python built-in data structures list, set, dict, tuple (I)

    Time:2021-10-21

    Hanoi Tower problem Rules: Only one plate can be moved at a time For any movement, the state of the three towers must be that the small plate is on the top and the large plate is on the top method: N = 1: directly move a plate on a to C, a – > […]

  • Introduction to Python variable scope and list

    Time:2021-10-20

    Variable scope Variables are limited by scope Classification: by scope Global: defined outside the function Local: defined inside a function Scope of variable Global variable: valid in the whole global scope Global variables can be used locally (that is, variables defined outside the function can be accessed inside the function) Local variables can be used […]

  • Antd select linkage data processing

    Time:2021-10-19

    Requirements: Select the building, pass the selected building ID to the floor drop-down list, select the building request floor list, and search each other When there is no floor in the building, check it problem When adding and editing, only the selected floor ID is transmitted, and the editing echo is given to two IDS […]

  • Multiple operations for each number in the python square list

    Time:2021-10-18

    map map(function,iterable) x = [1,2,3,4,5] def square(num): return num*num print(list(map(square,x))) #output:[1, 4, 9, 16, 25] lambda lambda x: x = [1,2,3,4,5] print(list(map(lambda num:num*num, x))) #output:[1, 4, 9, 16, 25] list comprehensions [funtion for item in iterable] print([ num*num for num in [1,2,3,4,5]]) #output:[1, 4, 9, 16, 25] Supplement: several methods of finding the square root […]

  • Python one click to get mail attachments

    Time:2021-10-18

    Here, take my corporate QQ email as an example. The code is as follows: # -*- coding: utf-8 -*- Original text:bgods.cn/blog/post/54/ This work adoptsCC agreement, reprint must indicate the author and the link to this article

  • Python built-in data structures list, set, dict, tuple (II)

    Time:2021-10-18

    #Difference between value transmission and address transmission #For simple values, the value transfer operation is adopted, that is, the operation of parameters in the function does not affect the external variables #For complex variables, address passing operation is adopted. At this time, the parameters in the function and external variables are the same content, #Changes […]