); Loadingbarpronum++; varLoadingbar = This. Getchildbytag (Loadingbar_tag); if(loadingbar!=NULL) {loadingbar.setpercent (pernum); } //the progress bar is loaded to jump if(pernum==100) { //Load CompleteMLOG.C ("Asynchronous Load Resource Complete"); PFUNS.RUNEFFATTACK_SP ( This, "Skill_dianjin", "000", 13, 6, 3, 1, 11111, 1, 1000,NULL); } },Setloadingbar This method is our callback, and the Gameframecache will use the Addimageasync method for the successful ca
Use of text processing tools sed and awkI. Text Processing Sankey grep: a text filtering tool. For details, see blog article 2 and sedsed (stream editor): A Row editing tool that works perfectly with regular expressions. During processing, the currently processed rows are stored in the temporary buffer, called the patt
address of eth0 in CENTOS6Ifconfig eth0 | grep "inet addr" | Tr-s "": | Cut-d:-f4Take out the IP address of ens33 in Centos7Ifconfig Ens33 | grep "Netmask" | Tr-s "": | Cut-d:-F3Paste-d "Custom delimiter (only single-character is a delimiter)"Function: Merge two files horizontally, first and first row, second and second row, default to "^itap" as delimiter-S "The first line puts all rows of the first file" "The second line puts all the rows in the second file"Text Data statistics work:WC: The n
In Linux, unlike windows, windows can be used for window operations. it is composed of many different commands.
In Linux, unlike windows, windows can be used for window operations. it consists of many different commands. This article describes the most common tools used in Linux to process text using Shell: find, grep, xargs, sort, uniq, tr, cut, paste, wc, sed, awk;The examples and parameters provided are the most common and practical;The principle I
Text viewing and processing tools:WC [OPTION] FILE ...-C: Number of bytes-L: Number of rows-W: number of wordsW.H.O. | Wc-l: View current number of usersCut [OPTION] FILE ...-D CHAR: Specify field delimiterIf this option is not added, the default is separated by a space-F #|#-#|#,#: Specify the fields to displayCut-d:-F 1/etc/passwordCut the/etc/password file with a colon and display the first fieldThat is, lists the first field in the current/etc/pas
content into the specified filesSed ' 3,5s/original character/replacement character/g ' file/*3-5 line conversionSED xd/* Mask specified lineSed XP/* Copy the specified lineSed-n XP/* Displays only specified linesSed-ne xp-ne YP File/* Specify to replicate 3 and 52 rowsSed-n 3,5p File/* Copy 3-5 rowsExample: Sed-e ' s/^\ *//g ' file-e ' s/\t/\/g '-I file/* Replace the file with a space and start with the TAB keyA script (match the password to the account) *************#!/bin/bashmax=$ (Wc-l $ |
Common Linux Command Line Text processing tools summary keyword search: the grep keyword specifies that during file-I search, case-n is ignored. The row where the result is displayed.-v is used to display rows that do not contain keywords. Column-based text processing: cut-d: -f1/etc/passwd/*: Separate passwd files, extract the first column */-d to specify the de
$} '/etc/passwd# A=NF# awk-f: ' {print $ ' $a '} '/etc/passwdlogical operations (can directly refer to fields for operation)
= + = =/= *=: Assignment
| | !: Logical AND logical OR logical non-
~!~: Match regular or mismatched, regular need/regular/Surround
$: The field reference needs to be added $, and the variable reference is taken directly with the variable name
+-*/% + +--: operator
Escape Sequences
\ \ Self
\$ Escape $
\ t tab
\b Ba
data to screen tail-n 0-f/var/log/messages #只显示追加的数据 cancel the day after tomorrow ~] #fg1即可Head command:Option:-N #: Displays the first n rows-C: Specifies the pre-fetch # bytesMore names:More [options] file [...] More file This command does not support the page before you want toLess command:Less-opposite of more less command supports front and back page, and other matching methodsPaste command:paste[option]...[file]...-d delimiter: Specify delimiter, default with tab- s: all rows of the com
) jsonp: "callback",data:params, After //successfully obtains the JSON data on a cross-domain server, This callback function is executed dynamically success:function (data) { varresult=data.result; if (data.head!= ' SUCCESS ') { alert ("server error, Please contact the developer in time!"); return; } if (fn!= Undefined) NBSP;FN (result); }});How to Use:Request ("http://www.baidu.com", {"money": "100000"},moneycall);function Moneycall (data) {Alert (json.stringify (data));}Unified Ajax Submissi
Android image processing tools,The image tool class can be used for Bitmap, byte array, and Drawable conversion and image scaling. Currently, the function is weak and will be enhanced later. For example:BitmapToDrawable (Bitmap B) bimap to drawableDrawableToBitmap (Drawable d) drawable to bitmapDrawableToByte (Drawable d) drawable to byte
ScaleImage (Bitmap org, float scaleWidth, float scaleHeight) Scaling
;
# Cut-D:-F7/etc/passwd | sort-u
2. Extended Regular Expression
Egrep: uses an extended regular expression to construct the mode, which is equivalent to grep-e.
Character match:
.: Any single character
[]: Any single character in the specified range
[^]: Any single character out of the specified range
Matching times:
*: Match any character before it;
? : Match the first character 0 or 1 time;
+: Match the first character at least once
{M}: match the previous characters m times;
{M, n}: At lea
- N : with the " - b " option Knot use, do not split multiple words Section character- S : No Display lines that do not contain separators are shown--output-delimiter= delimiter; Specify lose out inside The tolerance is the field divided Cut characterCut The LimitationsCut command Default recognize It is not possible to use multiple spaces for to be Separators650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9C/20/wKioL1lsc9iQ1D5RAAByGNmXMsw533.jpg "title=" Aaa.jpg "alt=" Wkiol1lsc9iq1
/#PATTER}: Deletes the first string of the Var row by the pattern match.${var/%patter}: Deletes the end of the Var line by the pattern-matching string.Case conversion:${var^^}: Converts all lowercase characters in Var to uppercase.${var,}: Converts all uppercase characters in Var to lowercase.Variable assignment:${var:-value}: Return value if var variable is empty or not set, otherwise returns the value of var variable${var:=value}: If the var variable is empty or not set, return value and assig
Produced by Northeastern University, written in pure C + +, academic free, open source.System Features1. All code is written in C + + language2. Achieve the best analytical performance in the industry3. Support Seven language analysis techniques4. Can be applied to the development of application systems such as text analysis and text mining based on depth calculationAddress: http://www.niuparser.com/One of the natural language processing
example head-4/etc/passwd |sort-t Specifies the delimiter,-K specifies the areaFor example head-4/etc/passwd |sort-t ': '-k3-nYou can also sort on a contiguous areaFor example head-4/etc/passwd |sort-t ': '-k3,5-r3 Command WCThe number of lines, characters, or words used to count the document-L count rows-M statistic character number-W Statistic Word number4 command UniqUsed to delete duplicate rows, if sorting is required-C to count the number of rows to repeatWe write a test.txt to understand
/‘ date2 linealinebline3Review print
Lowercase p is used to print the line of text
Equal sign = used to print line numbers
lowercase l used to list travel
Print line of text[emailprotected]:~# head -3 /etc/passwd | sed ‘p‘root:x:0:0:root:/root:/bin/bashroot:x:0:0:root:/root:/bin/bashdaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologindaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologinbin:x:2:2:bin:/bin:/usr/sbin/nologinbin:x:2:2:bin:/bin:/usr/sbin/nologin[emailprotected]:~# head -3
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.