Python Foundation

variable Variable type Variables can specify different data types, which can store integers, decimal or characters.         2.Variable assignment Each variable must be assigned before it is used, and the variable will be created after assignment. An equal sign (=) is used to assign variables. The equality sign (=) operator has a variable name on the left, and the equality sign (=) operator has a value stored in the variable on the right. For example: 1 # autor:guangqing xu 2 counter =100 #Assigned integer variables 3 miles = 1000.0 #float 4 name = "guangqing" #Character 5 print(cou...

XStream parsing XML message

One, XML data in one format is converted to object. pom.xmlIntroduce <!--javaBeanBidirectional conversion of XML and -->< dependency>< groupId> com.thoughtworks.xstream< /groupId>≪ artifactId> xstream< /artifactId>< version>1.4.10</version> </dependency> xmlFile template <?xml version="1.0" encoding="GBK"?> <MESSAGE> <MESSAGEHEAD> <MESSAGEID/> <SRC/> </MESSAGEHEAD> <MESSAGEBODY> <TRANLIST> <TRAN_DATE/> <TRAN_TIME/> ...

Vue2.0’s three commonly used values, parent, child and non parent components.

In Vue framework development projects, components are often used to manage different functions, and some common components are extracted. There must be some doubts and needs at this time. For example, if one component calls another component as its own subcomponent, how do we pass values to the subcomponentWhat? If it is the development of e-commerce website system, will also involve shopping cart options, this time will involve non-parent component value transfer. Of course, you can also use the Vuex state management tool to implement this part, which we will introduce later. Let me first in...

WeChat small program view container (swiper) component to create a rotation chart

two, swiper application 1, page logic (index.js)” indicatgorDots whether there is focus. interval automatic play interval time <!--Sowing map--> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" indicator-color="{{indicatorColor}}" indicator-active-color="{{activeColor}}"> <block wx:for="{{imgUrls}}"> <swiper-item> <navigator url="{{item.link}}" hover-class="navigator-hover"> <image src="{{item.url}}" class="slide-image" width="355" height="200" /> ...

Linux+Jenkins environment building and automatic deployment of Django Projects – building configuration

Note 1:cd xxx BUILD_ID=DONTKILLME nohup python manage.py runserver 0.0.0.0:8000 & BUILD_ID=DONTKILLME : Programs running in the background in Jenkins are automatically killed by jenkins, so you need to add BUILDID to this parameter so your program won't be killed.    

Python (sys module)

sysModular The first is the file name, followed by the incoming content.   1 #!usr/bin/python 2 # -*- coding: utf-8 -*- 3 4 import sys 5 6 print(sys.argv) #The command line parameter List, the first element is the program itself path. 7 8 def post(): 9 print('ok') 10 11 def dowmload(): 12 pass 13 14 if sys.argv[1] == 'nizhipeng': 15 post() 16 17 elif sys.argv[1] == 'download': 18 download() 19 20 import time 21 print(sys.path) #Returns the search path of the module and initializes the value of the PYTHONPATH environment variable. 22 23 print(sys.platform) #...