Tag:tuple

  • Tool | one SQL to realize PostgreSQL data retrieval

    Time:2021-12-29

    Author: Zhang Lianzhuang, PostgreSQL R & D Engineer He has been engaged in the development of PostgreSQL database kernel for many years and has a very in-depth research on citus. Recovering lost data quickly is an important functional requirement of the database. It is generally recommended to use the tools recommended by the official. For […]

  • Reading Notes Series 4 of Python concise tutorial – data structure

    Time:2021-12-19

    Series articles: A series of reading notes of Python concise tutorial — basic grammar Reading Notes Series 2 of Python concise tutorial — what can be seen from “operators and expressions”, “control flow” and “functions” Python concise tutorial book Notes Series III – module Reading Notes Series 4 of Python concise tutorial – data structure […]

  • Rust data structure

    Time:2021-12-18

    notice Rust hasn’t reached 1.0 yet. The development is fast. Please see the official documents Structs Rust structures can usestruct Name { field1: T1, field2: T2 [, …] }Formal declaration of. T1 and T2 represent types. Similar syntax is used to instantiate a struct. There is no struct keyword, such asPoint { x: 1.0, y: […]

  • Failed Django exploration

    Time:2021-12-14

    When I wanted to write a relatively automatic database management interface, I thought of Django + MySQL (my Python rookie) and set it quickly and conveniently by using Django admin. This tutorial,http://django-chinese-docs.readthedocs.org/en/latest/intro/tutorial01.html, I still recommend novices to get started. I felt that I had learned almost the same template and path. When I was ready […]

  • After Django expands the user table, the user password is added in the new table and stored as clear text

    Time:2021-12-6

    Question:Recently, when using Django, Django extended its own auth_ User table, the general format is as follows: from django.contrib.auth.models import User as AbstractUser class Users(AbstractUser): ”’ This table records the details of system users ”’ Users_Name = AbstractUser.username #Department number Users_ Group = models. ForeignKey (usergroup, models. Cascade, db_column = “user_group”, null = true, verbose_name […]

  • Requests interface test Basics

    Time:2021-11-29

    Send HTTP request Import the requests library and set the interface address of the test as a variable import requests base_url = ‘http://httpbin.org’ Get request r =requests.get(base_url+’/get’) print(r.status_code) Post request r=requests.post(base_url+’/post’) print(r.status_code) Put request r=requests.put(base_url+’/put’) print(r.status_code) Delete request r=requests.delete(base_url+’/delete’) print(r.status_code) Get pass in parameters param_data = {‘user’:’zxw’,’password’:’666′} r =requests.get(base_url+’/get’,params=param_data) print(r.url) print(r.status_code) Post pass in parameters […]

  • 3.2 tuple: USB flash disk with non editable data

    Time:2021-11-25

    (1) What is a tuple Tuples (called tuples in English) are very similar to lists and can also store multiple data. The difference is that once the element in the tuple is assigned, it can no longer be modified, deleted or changed, which is very different from the list. As shown in the figure below. […]

  • Introduction to database (IV) integrity

    Time:2021-11-16

    Integrity Similarities and differences between integrity and security Integrity: prevent data that does not conform to semantics in the database, that is, prevent incorrect data in the database. Guard against objects: non semantic and incorrect data.Security: protect the database from malicious damage and illegal access. Prevention object: illegal users and illegal operations. Entity integrity rules […]

  • Getting started with Flink [0]

    Time:2021-11-9

    Dependent environment Please confirm that the following environments are installed correctly Java 8.x Maven 3.0.4 (or higher) Verify Java $ java -version java version “1.8.0_191” Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode) Verify maven $ mvn -version Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00) Maven home: /Users/dushixiang/Library/apache-maven-3.6.0 Java version: […]

  • Deep secrets of PostgreSQL data directory

    Time:2021-10-31

    Introduction: PostgreSQL is a very powerful and open source client / server relational database management system (RDBMS). It is known as “advanced open source database” in the industry. It supports NoSQL data types. It is mainly aimed at the OLTP business scene of enterprise complex SQL query, and provides PostGIS geographic information engine, Alibaba cloud […]

  • Python implements the conversion between list, tuple, STR and dict

    Time:2021-10-29

    1. Dictionary (dict) ? 1 dict = {‘name’: ‘Zara’, ‘age’: 7, ‘class’: ‘First’} 1.1 Dictionary – string return: ? 1 print type(str(dict)), str(dict) 1.2 Dictionary – tuple Return: (‘age’, ‘name’, ‘class’) ? 1 print tuple(dict) 1.3 Dictionary – tuples Return: (7, ‘Zara’, ‘first’) ? 1 print tuple(dict.values()) 1.4 Dictionary – List Return: [age ‘,’ name […]

  • 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 = […]