Code. After each view of the maps file, I will take a keyboard return key. My tests are as follows:
Process output after code compilation
Root @ abcd :~ #./A. out7846Init stateBefore unmap fixmap around stackAfter unmap fixmap around stackAfter extend stack [first]After second fixmap around stack at the same addressAfter unmap fixmap around stack incompletelySegment error (core dumped)View the output of the maps file of each process:
Root @ abcd :~ # Cat/proc/'ps-e | grep a. out | awk '{print $
.
# $ Cn_len the number of Chinese characters in bytes or words. if the number of words is counted, a Chinese character is counted as one byte.
Function csubstr ( $ str, $ start = 0, $ long = 0, $ ltor = true, $ cn_len = 2 ){
If ($ long = 0) $ long = strlen ($ str );
If ($ ltor = false) $ str = cstrrev ($ str );
If ($ cn_len = 1 ){
For ($ I = 0, $ fs = 0; $ I $ I + = (ord ($ str [$ fs]) For ($ I = 0, $ fe = $ fs; $ I $ I + = (ord ($ str [$
the Unicode specification, each file is preceded by a character that represents the encoding sequence, which is named "0-width non-newline space" (ZERO wide no-break space), denoted by Feff. This happens to be two bytes, and FF is 1 larger than FE.If the first two bytes of a text file are FE FF, it means that the file is in a large head, and if the first two bytes are FF Fe, it means that the file is in a
Fe FF, it means that the file is in a large head, and if the first two bytes are FF FE, it means that the file is in a small way.8. ExampleOpen Notepad program Notepad.exe, create a new text file, the content is a "strict" word, followed by Ansi,unicode,unicode big endian and UTF-8 encoding method to save.Then, use the "hex feature" in the text editing software UltraEdit to see how the file is encoded inte
is truly reachable.Lab @ FSJ # run ping 1.1.1.2 logical-router ChablisPING 1.1.1.2 (1.1.1.2): 56 data bytes^ C--- 1.1.1.2 ping statistics ---6 packets transmitted, 0 packets received, 100% packet lossOf course, the above is based on the olive logical router. It should not be like this on the real Juniper Router, for example:Lab @ FSJ # run ping 1.1.1.2PING 1.1.1.2 (1.1.1.2): 56 data bytesPing: sendto: No route to hostPing: sendto: No route to host^ C--- 1.1.1.2 ping statistics ---2 packets tran
{$ F_str. = $ str [$ I];}}Return $ f_str;}/* Chinese string truncation FunctionSome Chinese string truncation functions often have some problems, such$ A = "1 medium 2 ";After two interceptions,Csubstr ($ str, $ a, 0, 2 );Csubstr ($ str, $ a, 2, 2)The loading position may point to the right byte of "medium ".1, 2Using this function produces the correct result.Medium, 2*/# Start position, starting from 0# Long = 0, the string is retrieved from start until the end of the string.# When ltor is set
. The name of this character is "zero width, non-line feed SPACE" (zero width, NO-break space ), expressed in FEFF. This is exactly two bytes, and FF is 1 larger than FE.
If the first two bytes of a text file are fe ff, it indicates that the file adopts the big header mode. If the first two bytes are ff fe, it indicates that the file adopts the Small Header mode.
contents of the register EAX (the address of I) to the variable ref in the register, that is, int ref=i804872f:8b 0x18 (%ESP),%eax//the register in ESP to EAX, the address of I8048733:8B (%eax),%eax//with the value of the register EAX as the address, remove the value to EAX 8048735:89 (%eax,0x14)///The value of the Register%ESP To the X in the register ESP, which is x=ref8048739:c7 movl $0x8048900,0x4 (%ESP)8,048,740:088048741:c7 A0 movl $0x804a040, (%ESP)8048748:e8 CB
) or from the head (Little-endian) knocked open. For this matter, the war broke out six times, one Emperor gave his life, and the other emperor lost his throne.Therefore, the first byte in front, is the "Big endian", the second byte in front is the "small Head Way" (Little endian).Then, naturally, there is a problem: How does the computer know which encoding to use for a particular file?Defined in the Unicode specification, each file is preceded by a character that represents the encoding sequen
size of each interval
Float s=0;//s is the area of the rectangle and
float i=0;
for (i=a;iS=s+ ((Fun (i) +fun (i+h)) *h)/2;
}
coutcout}
Float Fun (float x) {
Return pow (x,2);
}
a more complicated exampleWrite a common function to find the definite integral of sinx, COSX, E^x, x^2
Analysis: Fun for the general function of the definite integral, when calling the fun function, we need to pass the upper limit of integral, the lower limit, the number of parts of interval
. var). var, array_ptr );
PZVAL_LOCK (array_ptr );
If (iter ){
......
} Else if (fe_ht = HASH_OF (array_ptr ))! = NULL ){
// Reset the internal pointer of the array
Zend_hash_internal_pointer_reset (fe_ht );
If (ce ){
......
}
Is_empty = zend_hash_has_more_elements (fe_ht )! = SUCCESS;
// Set EX_T (opline-> result. u. var). fe. fe_pos to save the internal pointer of the array.
Zend_hash_get_pointer (fe_ht, EX_T (opline-> result. u. var).
are obtained from right to left.
# $ Cn_len the number of Chinese characters in bytes or words. if the number of words is counted, a Chinese character is counted as one byte.
Function csubstr ( $ str, $ start = 0, $ long = 0, $ ltor = true, $ cn_len = 2 ){
If ($ long = 0) $ long = strlen ($ str );
If ($ ltor = false) $ str = cstrrev ($ str );
If ($ cn_len = 1 ){
For ($ I = 0, $ fs = 0; $ I $ I + = (ord ($ str [$ fs]) For ($ I = 0, $ fe = $ fs; $ I
, "Guang" code for%B9%E3, for the moment%b9 called the section encoding,%E3 for character encoding (second encoding).
Ideas:
Collect Chinese characters from GBK encoding page http://ff.163.com/newflyff/gbk-list/
From a practical point of view, only select "GBK/2: GB2312 Kanji" This section, a total of 3,755 Chinese characters.
Look at the law: The bar code from B0-D7, and for the Chinese character encoding from the A1-fe, that is, 16*6-2=94, very reg
];
}
}
Else {
$ F_str. = $ str [$ I];
}
}
Return $ f_str;
}
/* Chinese string truncation function
Some Chinese string truncation functions often have some problems, such
$ A = "1 medium 2 ";
After two interceptions,
Csubstr ($ str, $ a, 0, 2 );
Csubstr ($ str, $ a, 2, 2)
The loading position may point to the right byte of "medium ".
1, 2
Using this function produces the correct result.
Medium, 2
*/
# Start position, starting from 0
# Long = 0, the string is retrieved from start until the end of
Or the problem of virtual tree ... If there is only one inquiry, we think so, can be set dp[x] to only delete the X subtree within and X to the father's edge, so that x this subtrees tree in the energy islands are not connected with the father of X the minimum cost. So if x itself is an energy island, then dp[x]=fe[x], otherwise dp[x]=min (Fe[x],sum{dp[son[x]}) is similar to this. (
Very detailed very good, turn around to study:Reprinted from: http://www.cnblogs.com/lidabo/archive/2013/11/27/3446518.html1, character encoding, internal code, incidentally introduced Chinese character codingCharacters must be encoded before they can be processed by the computer. The default encoding used by the computer is the internal code of the computer. Early computers used 7-bit ASCII encoding, and in order to deal with Chinese characters, programmers designed GB2312 for Simplified Chines
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.