of the result.Extended to the topological sorting, the result has a unique condition that all its vertices have a full order relationship. Without this full-order relationship, the result of topological sorting is not unique. As we will see later, if the result of the topological sorting is unique, the result of the topological sorting also represents a Hamilton path.Typical implementation algorithms:KahnAlgorithm:Abstract A pseudo-code description of the Kahn Algorithm on Wikipedia:L merge Emp
options.MetacharactersMetacharacters (metacharacter) is a character that has a special meaning:Metacharacters description. Finds a single character, in addition to line breaks and line terminators.\w find word characters.\w Find non-word characters.\d find numbers.\d to find non-numeric characters.\s Find white space characters.\s find non-whitespace characters.\b matches the word boundary.\b Matches a non-word boundary.To find the NUL character.\ nto
mode? :
$ Mode = '/a = (\ d +) B = (? : \ D +) c = (\ d + )/';
In this way, the matching result will become:
array (size=3)=> string 'a=4b=98c=56' (length=11)=> string '4' (length=1)=> string '56' (length=2)
Of course, we can also give it a unique name inside the brackets.
The naming sub-group is acceptable (?
For example: $ mode = '/a = (\ d +) B = (? P
The result is as follows:
array (size=5)=> string 'a=4b=98c=56' (length=11)=> string '4' (length=1) 'sec' => string '98' (length=2)=> string
new application in the new window. You can modify the name of your current window. In the current example, the top program I run, so top is the name of the window.
If you want to rename, you only need to press:
CTRL-B
The status bar changes. You can rename the current window.
Once multiple windows are created in one session, we need to move them between these windows. Windows are organized together like arrays. Each window is marked with numbers starting from 0 and you want to quickly jump to
Vi/Vim
Picture copyright: lampbrother
Note: After Entering Vim/Vi, the command mode is used by default.
1) Basic commands
AAdd text behind the cursor
IInsert text before the cursor
: WqSave changes and exit
ZZShortcut Key, save the modification and exit
: Q!Exit Without saving changes
: WSave changes
2) basic operations
UCancel the previous operation
Ctrl + r Restore the Undo operation in the previous step
: Set nuSet row number
: Set nonuCancel row number
GgTo the f
user's directory
-V
Show instruction execution Process
-T
Treat a linked file as a normal file
Mv[ function Description ]Move and rename files#mv can manipulate files, rename directories, and move them[ syntax Format ]mv[ parameters [ source files ] [ target files ][ option parameter ]
Parameters
Description
-B
If you need to overwrite the file, back up before overwriting
-I.
Interactive oper
character\ nto find line breaksrepeating character matching{N,m} matches the previous item at least n times, but cannot exceed m times{N,} matches the previous item n or more times{n} matches the previous item n timesN? Matches the previous item 0 or 1 times, which means the previous item is optional, equivalent to {0,1}n+ matches the previous item 1 or more times, equivalent to {1,}n matches the previous item 0 or more times, equivalent to {0,}n$ ma
Androidmanifest.xml file, and the Project.Properties file contains the string android.library=true .3) providing additional Android Assets and resourcesIf you need to add Assets to your Unity application that should being copied unchanged into the output package, import them I Nto the assets/plugins/android/assets directory. They appear in the assets/directory of your APK, and is accessed by using the Getassets () Android API from your Java cod E.2.
external hosts, track and isolate hardware and software issues, and test, evaluate, and manage networks.
ping -b 192.168.1.1, Ping the Gateway
ping -c 10 192.168.1.2, ping specified number of times
ping -c 10 -i 0.5 192.168.1.2, interval and number of times limit the ping
ping -c 5 www.baidu.com, Ping the site through the domain name on the public website
NetstatNetstat [-accefghilmnnoprstuvvwx][-aUsed to display statistics related to IP, TCP, UDP, and ICMP protocols,
] [host name or IP address]Determine the status of networks and external hosts, track and isolate hardware and software issues, and test, evaluate, and manage networks.
ping -b 192.168.1.1, Ping the Gateway
ping -c 10 192.168.1.2, ping specified number of times
ping -c 10 -i 0.5 192.168.1.2, interval and number of times limit the ping
ping -c 5 www.baidu.com, Ping the site through the domain name on the public website
NetstatNetstat [-accefghilmnnoprstuvvwx][-aUsed to d
192.168.0.0 netmask 255.255.255.0 GW 172.16.0.1How to modify the network card MAC address#sudo ifconfig eth0 down network card#sudo ifconfig eth0 hw ether 00:aa:bb:cc:dd:ee and change the address.#sudo ifconfig eth0 up and then start the NICCount the number of current IP connections#netstat-na|grep Established|awk ' {print $} ' |awk-f: ' {print '} ' |sort|uniq-c|sort-r-n#netstat-na|grep Syn|awk ' {print $} ' |awk-f: ' {print '} ' |sort|uniq-c|sort-r-nTo
-CZVF 008.tar.gz/home/lxtoo8Unpacking Package: TAR-XZVF 008.tar.gz/homeComment out: #Create shell script: VI first.shDisplay string: echo "Wang Lin"Wait for input from terminal to variable: Read f (variable f)Display variable contents: Echo ${f}View Environment variables: envNo line break required:-NTo view the running process: PSKill a Thread: Kill 1186 (1186 is the thread number)Set a process to run in the background: Find/-name passwd (Set the Fin
also cpo-;
We can use it ; to repeat the operation of VIM lookup and , repeat the reverse search.
Give some chestnuts:
example1:In the main.cc 31 lines of the file, first use f: to find the : characters, then use ; to repeat the find operation
example2:We will repeat the change operation described earlier and the inline lookup operation repeatedly, in the main.cc 31 lines of the file f+: to find the first : character, and then replace the characters with cl : + charac
eth0 up and then start the NICCount the number of current IP connections#netstat-na|grep Established|awk ' {print $} ' |awk-f: ' {print '} ' |sort|uniq-c|sort-r-n#netstat-na|grep Syn|awk ' {print $} ' |awk-f: ' {print '} ' |sort|uniq-c|sort-r-nTo count the IP addresses in the current 20,000 IP packets that are larger than 100 IP packets#tcpdump-tnn-c 20000-i eth0 | Awk-f "." ' {print $1″. ' $2″. " $3″. " $4} ' | Sort | uniq-c | Sort-nr | awk ' $ > 10
, the action command is:[[email Protected] ~]# usermod-l Lijunjie lijie[[emailprotected] ~]# tail-1/etc/passwdlijunjie:x:502:502::/home/lijie :/bin/bash is visible from the output and the user name has been changed to Lijunjie. The home directory is still the original/home/lijie, and if you want to change to/home/lijunjie, you can do this by executing the following command [[emailprotected] ~]# usermod-d/home/lijunjie Lijunjie[[emailprotected] ~]# tail-1/etc/passwdlijunjie:x:502:502::/home/lijun
---restore content starts---1. Append contentAppend the contents of one file to another file:Cat First.txt >> second.txt//append to the end of the Second.txt fileCat first.txt > second.txt//overwrite content in Second.txt file2. View head, tail, etc.View Header:Head-n the number of rows to display after My.txt//-nView Tail:Tail-n the number of rows to display after My.txt//-nTo view a specific number of lines:Starting at line No. 3000, displays 1000 r
' s/.*:::\ ([0-9]*\). * \ ([0-9]*\) \/sshd/\1 \2/p 'which- NTo disable the default output,sedThe default is to output all text, the main next regular expression, here in::: Front plus.*is to put the frontTCP 0 0to include in the comingpatternwithin this regular expression, and then in the\ ([0-9]*\)Add a space to the back and add.*, in order to put the whole Abe used as a whole behind/1to reference, if not.*, the following references/1will become emp
1 overviewIn the script loop, you need to use break,continue,exit. To control the loop. Use return to get the return value of the function. This article will introduce the use of these four commandsBreak [n]: Early end of the nth layer cycle, the inner layer is the 1th layerContinue [n]: End of the nth layer of the current cycle, and directly into the next round of judgment; the inner layer is the 1th floor.Exit command to terminate the script2 Break Continue exit comparison2.1 Break and Continu
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.