;]falsefalsefalsefalseCustom replication behavior, you can use special methods __copy__ () and __deepcopy__ () to control how replicas are created.Pprint Beautiful print data structure, used to generate a beautiful view of the data structure, easy for human reading.#Print fromPprintImportPprintdata= [(1,{'a':'A','b':'B','C':'C','D':'D'}), (2,{'e':'e','F':'F','g':'g','a':'A','b':'B','C':'C','D':'D','h':'h','I':'I','J':'J'}) ]#format An object, write it to a data stream, adjust the w
The
output of each set of test data takes one row, and the output moves to get the maximum value of the new integer.
Sample input
1990 1100 09090000078001234 6
Sample output
91901009907000008001234
The code is as follows:
angle Absolute angle: The x-axis relative to the canvasTurtle.seth (45) Turtle angle: Relative to the turtle's current orientationTurtle.left (angle)Turtle.right (angle) Color System Turtle is an RGB color system (with small values by default)Turtle.colormode (mode) #mode = 1.0 decimal value, mode=255 integer valueTurtle.colormode (1.0) Turtle.pencolor (1,1,0.4)analysis of grammatical elements of turtle libraryImportThe From library import function (*) #不用在前面加库名, but causes a function name
until the Terminator is reached null.3.1.2 Standard library functions for C-style strings
Standard library functions for manipulating C-style strings
Strlen (s)
Returns the length of S, excluding the string terminator null
strcmp (S1, S2)
Compares two strings of S1 and S2. If S1 and S2 are equal, return 0;If S1 is greater than S2, returns a positive number, if S1 is less than S2, returns a negative number
strcat (S1, S2)
Con
Three ways to define a struct variableFirst, define the struct type, and then define the struct-body variableGeneral form:struct STU_INFO{Char name[12];int num;Char id_card[19];int G_score;int X_score;int S_score;};Defining struct-Body variables stu1,stu2struct Stu_info stu1, stu2;The second method, defining struct-body types while defining struct-body variablesGeneral form:struct STU_INFO{Char name[12]; /* Student Name */int num; /* Student Number */Char id_card[19]; /* ID Number */int M_score;
(Count_mutex, NULL); thePthread_cond_init (COUNT_THRESHOLD_CV, NULL); the the /*set to connect when creating threads for portability*/ +Pthread_attr_init (attr); -Pthread_attr_setdetachstate (attr, pthread_create_joinable); thePthread_create (threads[0], attr, Watch_count, (void*) t1);BayiPthread_create (threads[1], attr, Inc_count, (void*) t2); thePthread_create (threads[2], attr, Inc_count, (void*) t3); the - /*wait for all threads to complete*/ - for(i =1; i ) { the Pthread_jo
1.1.1 Summary: 1.1.1.1 JS in the BOM object:? Window
alert (); --Popup dialog box
SetInterval ();
SetTimeout ();
Clearinterval ();
Cleartimeout ();
Confirm (); --Pop up a confirmation window
Prompt (); --Pop up a dialog box that can be entered
Open (); --Open a new window? Navigator: Contains information about the browser.? Screen: Used to get information about the screens:? History: Browser's Historical object:? Location: The object that contains the URL information
return value.3.shell variable Quantum string knowledge650) this.width=650; "Width=" 720 "height=" 305 "title=" 1.png "style=" width:720px;height:305px; "alt=" Wkiol1j4d1jcztx-aafomugkd9o187.png "src=" https://s5.51cto.com/wyfs02/M01/91/B9/ Wkiol1j4d1jcztx-aafomugkd9o187.png "border=" 0 "vspace=" 0 "hspace=" 0 "/>Tips:The colon of the expression in the above ID 11-14 can be omitted, and if the colon is omitted, the "empty or Unassigned" section in each definition is changed to "Unassigned".For e
' file1query File1 The line that ends in Hai grep abc$ file1look for files with the/usr/local/apache/logs directory last modified longer than 30 days and delete. find/usr/local/apache/logs-type f-mtime +30-exec rm-f {} \;add a route to 192.168.3.0/24 with a gateway of 192.168.1.254. Route add-net 192.168.3.0/24 GW 192.168.1.254within November, every 2 hours from 6 o'clock in the morning to 12 o '/usr/bin/httpd.sh how to implement0 6-12/2 */usr/bin/httpd.shHow to forward a local 80 port request
data conform to the "keyword"
${ variable / old string / new string }
If the contents of the variable conform to the old string, the first old string is replaced by the new string
${ variable // old string / new string }
If the contents of the variable conform to the old string, all old strings are replaced by the new string
2. Testing of variables and content substitution
How variables are set
Str is not set
Str is an empty
3.1 Regular Expression BasicsThe primary function of regular expressions is text query and string manipulation. is actually string filtering.Regular expressions include ordinary characters and metacharacters character, meta-character main, see the Book 50 page description. A special regular expression ^$ matches a blank line.Extension of regular expressionsThe wildcard in the bash shell is completely different from the original character meaning. Contrast difference3.4grep command, powerful text
library to allocate resources. There are two ways of terminating a thread group (do_group_exit) and terminating a thread (do_exit).Delete process: The parent process needs to know the result of the child Process Execution (dead); If the parent process dies first, the orphan process becomes a child of the INIT process, and the processing is removed by the init process wait ().Kernel threadsThread 0:linux The initialization phase of a process created from scratch, the idle processThread 1: Thread
secret key and public keyOne-way encryption (hashed encrypted fingerprint encryption): Extract data signatures, used for data verification characteristics: avalanche effect and fixed-length output./MD5 128-bit fixed-length output sha1:secure Hash algorithm 160-bit fixed-length outputUser Category admin: ID 0 Normal User (System user 1-499 and general user 500-60000) ID 1-65535User Group Category Admin Group General Group (System Group general Group)Private groups If you create a user without sp
Shell echo CommandDisplay Normal string:echo "I am cat_crazy."Note: The double quotes here can be omittedShow escape characters:If you want to output quotes, the * number needs to be escaped to output, as followsecho \ "I am cat_crazy\"The output is "I'm cat_crazy."Note: Quotes need to be escaped to outputDisplay variables:Name= "Cat_crazy"Echo $nameShow line breaks:Echo-e "Hello \ n" #-e open escape \ n line breakecho "Cat_crazy"The output is:HelloCat_crazyNote: There is a blank line in the mid
, example: * * * * command, that is, 12 points per day per month to execute commands
Second, the closure and start of serviceNtsysvChkconfig--list Chkconfig--level 2 ATD off/on Chkconfig ATD on Chkconfig--add to add a script Third, the system log/etc/rsyslog.conf /var/log/messages /var/log/secure /var/log/maillog To view sent messages: Cat/var/log/maillog/var/log/cron /var/log/spooler /var/log/boot.log /var/log/wtmp /var/log/btmp /VAR/LOG/DM
Tag:shell reference escape command replace Escape and reference two types of characters: normal character and escape character escaping: "\" Example: 1, Echo $Dollar 2, echo \ $Dollar 3, Ech O? Characters that need to be escaped: * $ () \ ' "? + ! # [] {} Shell Learning Note III (escaping and referencing)
matter what you need to execute commands, then you need to use some of the common commands to remember how you do it, want to master Linux is a lot of practice, a lot of thinking, The result of a lot of hands out, each command is not the crash hard back to remember, understanding will be flexible to run the commands. Hadoop distributed computing If you want to deal with big Data computing, distributed Application system design often need to set up a Linux high-performance server to handle, mast
priority, the longer the time slice, Nice value ( Priority series value ) the smaller, the higher the frequency of execution!!! (e.g. I/O consumption type )Visible priority and time slice length are proportional!!!So we just need to scale the priority to a certain scale, according to the time slice of the value range, is the time slice value.How do you ensure that highly interactive tasks, such as I/O consumption, are performed more frequently?in the Schedler_tick () in the function:(1) The cu
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.