The path to learning in Python -2018/6/27
1. Multiple table operations add a record to add a many-to-many relationshipMethod One: Incoming author object= Book.objects.get(bid=1= Author.objects.get(name="gy"= Author.objects.get(name="yq")book.authors.add(gy, yq)Operation Result:Mode two: Incoming author primary key= Book.objects.get(bid=2)book.authors.add(34)Operation Result:To remove a many-to-many rela
can be accessed online. You can use the following command to export a "naked warehouse" and then use the SCP command to copy them to your server:$ git clone --bare /home/user/myrepo/.git /tmp/myrepo.git$ scp -r /tmp/myrepo.git myserver.com:/opt/git/myrepo.gitIf other people also have an SSH account on the myserver.com server, TA can clone the (clone) code from this server:clone myserver.com:/opt/git/myrepo.gitThe above command will prompt you to enter the SSH password or use the public key.Viii
, user input1 # user foreground input and assign value to variable name 2 name = input ("what' s your name? ") " )34# print out the foreground input information 5 print (" """)python1 #/bin/bash2 3 #User Foreground input4Read-p"What ' s your name"Uo5 6 #Assign a value to a variable name7Name="Welcome to Beijing"8 9 #Print information about the information and variables entered in the foregroundTen Echo $Uo $name One AShellShell 10. ExpressionExpression if...elif......else-statementPython#Pyth
Operating system Win7The pathping is primarily used to provide information about network latency and network loss at the intermediate hops between the source and destination.Pathping sends multiple echo Request messages to each router between the source and destination for a period of time, and then calculates the results based on the packet size returned by each router. Because Pathping shows the degree of loss of any particular router or linked packet, the user can determine the router or subn
\-qt-mouse-tslib \-qt-kbd-linuxinput
Compile and install: make and make install
Porting to the development platform
Configure the root file system under the/etc/profile file
Put the compiled QT library file lib and tslib respectively into the corresponding directory of the tag
Compiling tools
Unzip: Unzip the cross-compilation tool to the directory you want to place
Setting envir
"Three basic drawing Instructions"1. Move to current point (MoveTo) and draw line (LineTo)Analytical:
Instructions
Actual Draw action
M269 112
Move pen to coordinates (269,112)
L217 163
Draw a line to a coordinate (217,163)
L272 163
Draw a line to a coordinate (272,163)
M257 149
Move pen to coordinates (257,149)
L299 149
Draw a line to a coordinate (299,149)
L249 200
Linux learning path: Understanding shell, bash, and shellbashI. shell
The direct controller of computer hardware is the kernel of the operating system. Because of the importance of the kernel, as a user, we cannot directly operate the kernel, therefore, we need shell to call the application or double-click to open the installed application to communicate with the kernel. Shell is equivalent to an interface
variables: scope current shell process and its child processes local variable: scope current shell process Local variables: scoped only to a snippet of code in the current shell process (usually a function context) Position variable: $ $, $ Special variables: $? How variables are defined:Bash built-in variables: can be called directly, built in a number of environment variables, such as Path Custom variable: variable assignment: variable name = value
__name__ ' __main__ ' : src.run ()Set log path (and database path) in 3.conf/settings.pyThe same is the dynamic access to the root directory of software, and then stitching to the specified directory of the software log to solve the migration problemImport osbase_dir=os.path.dirname (os.path.dirname (__file__'log' ' Transaction.log ')A general method of 4.lib/common.py from Import Settings Import Time
BASH Programming Conditional judgment: Determine whether the prerequisites for subsequent operations are satisfiedCommon Types of Judgments:Integer judgment:Character Judgment:File judgment:$?: Status return value0: True1-255: FakeWe can use the status return value as the judging condition, do not need to add ' 'Boolean value:True and FalseLogical operation:and Operation:Or Operation: | |Non-op:!The conditions in bash are judged using if:Single branch:if condition; ThenBranch 1;FiDual Branch:if
the configuration by specifying the configuration path for the startup parameter. Of course, conf.py You can change a similar name here, for example settings.py . Or you can use other formats to write configuration files, such as settings.yaml . -------------------------atm.py-------------------------------Print (__file__) #返回当前程序的相对路径import Osimport Sysprint (Os.path.abspath (__file__)) #返回绝对路径print (Os.path.dirname (Os.path.abspath (__file__))) #返回
The module is not under the path of the calling program, and the call is faulted:Workaround: 1, put the module under the Site-packages2. Specify the path when callingLogin Module--------------------------------------------------------------------------Import Getpass_username =' Alex '_password =' 123 '#将用户输入的内容赋值给 the name variableuser =input ( "Enter user name:") #pwd = Getpass.getpass (" Please enter pa
"Summary"This article is intended for JavaScript beginners, and generally divides the basic part of JavaScript into nine chunks, namely variables, operators, arrays, process control structures, string functions, function Foundations, DOM manipulation basics, Document Object Model DOM, and regular expressions. Keywords variables, operators, arrays, process control structures, functions, DOM, regular expressions.The main content of this article is around the basis of JavaScript (hereafter referred
following:?? This shows how much memory is used, how much CPU is consumed, and how fast the network is. is a click on the Load page when the distribution of the situation. It can help us to view and optimize our program, which makes it very intuitive. Vi. Static code checking tool lint?? Lint mainly provides a set of static code analysis tools, it can help us to check the problems existing in the project, let us more normative development of the app. Run the menu Analyze->inspect Code.?? At a m
that you download this version of the JDK, download the page here: http://java.sun.com/j2se/1.4.2/download.html.
The downloaded JDK is an executable installer that installs a set of JRE (for browsers to use) under the C:Program Filesjava directory after the default installation, and installs a set of JDK (also includes a JRE) under c:j2sdk1.4.2. Then we need to add the Java path c:j2sdk1.4.2in to the front of the environment variable
command, that is, to view the contents of a file and display on the screen, followed by without any option directly with the file name, Amin introduced two common options:-N: When viewing a file, the line number is also displayed on the screen.TAC is reverse view fileMore one screen screen display, the space bar to display the next screen Ctrl B on a screenWc-l See how many lines the file hasLess usage basic with moreBut you need to press Q to exit and support the arrow key movement/xxx Search
receive the parameters configured in the configuration tool, and then process them in the matches method..
The above is all the content in this article. This article mainly introduces how to create and use custom feature matching rules and custom matching rules. If there are any mistakes, please note :)
Index of a series of articles on the learning path of Microsoft enterprise database 5.0:
Step 1: get
validators will be introduced in the next article.
PS: The content in this article is my personal understanding. I also referred to the source code of the enterprise database validation module, which may be messy, and there are deviations in some functional purposes, if you find any problems, please correct them. Thank you! Mom
Index of a series of articles on the learning path of Microsoft enterp
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.