Tag:Number of bytes

  • Linux command learning: WC command


    Linux command learning: WC command How many words, lines and characters are there in the statistical file. WC syntax [[email protected] ~]# wc [-lwm] Options and parameters: -l: Travel only; -w: List only how many words (English words); -m: How many characters;   WC statistics / etc / passwd is used by default #wc /etc/passwd 40 […]

  • Counter: reduce counter


    I Counter overview When the MapReduce program is executed, the console output information usually contains the following fragments:The core word in the output information is counters, which is called counter in Chinese,The built-in counter function of Hadoop collects the main statistical information of jobs, which can help users understand the operation of the program and […]

  • Study day 34


    C language 1. Write the structure to the binary file 1. fwrite; Write data to file 1. Swrite (pointer or address, number of bytes written into the file, data item written into bytes, file pointer); 2. swrite(buffer,size,count,fp); 3. Pointer type variables should not appear in the structure written into the file, because the addresses of […]

  • Conversion between C + + numeric type and string and CString


    catalogue Numerical range Numeric type and string are converted to each other Numeric type converted to string Use function template + ostringstream Using the standard library function STD:: to_ string() Convert string to numeric type Use function template + istringstream Using C + + standard library functions Conversion between CString and string Conversion between CString […]

  • Nginx learning notes


    Simply learn nginx and sort out the memory points of each branch Common commands Start nginx: `systemctl start nginx.service` To view nginx processes: `ps aux | grep nginx` Shut down service: `Nginx – s quit ` shut down calmly (the process will shut down after completing the task) `Nginx – s stop ` forced shutdown […]

  • The maximum length of varchar in MySQL and the difference between char and varchar


    problem Create a table with 9 fields. All fields are of varchar type. The first 8 fields can hold up to 7279 characters, can be empty, and the character set type islatin1, that is, one character only occupies one byte. The table creation statement is as follows: CREATE TABLE test_varchar_length6( a VARCHAR(7279), b VARCHAR(7279), c […]

  • Netty sticky package & half package solution


    Short link Disconnect after sending data and re-establish the connection when sending next time //Client side Fixed length decoder When the length of the data sent by the client is fixed, set the decoder of the server as the fixed length decoderFixedLengthFrameDecoderThe problem of sticking package and half package can be avoided //Server side Row […]

  • PHP substr intercepts English dot and turns it into garbled code


    substr(‘6tTPnWsXBBmF5FZ2·mPbpBcZh8D76PrBP~’, 16, 1); E:\Apache\htdocs\site\application\controllers\Welcome.php:16:string ‘�’ (length=1)   mb_substr(‘6tTPnWsXBBmF5FZ2·mPbpBcZh8D76PrBP~’, 16, 1); E:\Apache\htdocs\site\application\controllers\Welcome.php:17:string ‘·’ (length=2)   Substr is the number of bytes intercepted, MB_ If substr is intercepted according to the number of logical fields, the above situation will occur. See  https://bugs.php.net/bug.php?id=66069

  • Go language: Master Emoji thoroughly


    A series of articles: In depth analysis of reflection + actual combat cases Go language: Master Emoji thoroughly Keywords: Emoji, Unicode, utf8, go, expression What is Emoji Emoji is just some ideographic symbols. Implementation of Emoji First, you have to be able to distinguishunicode、utf8andcharacterThe differences between them are as follows: unicodeA character set is a […]

  • #How to use pragma pack


    Reference article:https://fanxinglanyu.blog.csdn.net/article/details/106616772 1 cause When defining communication frame structure variables in communication protocol, the compiler will compile each variable with the corresponding maximum number of bytes by default because the structure contains multiple variables and the number of bytes occupied by each variable is different. There are two problems 1) The waste of memory resources; […]

  • MySQL learning notes (4): data types


    This article is updated on June 19, 2019, using MySQL 5.7 and operating system deepin 15.4. catalogue value type Integer type Fixed point number type Floating Point Types Bit type Date time type String type Enumeration type Collection type value type Integer type type[(m)] [UNSIGNED] [ZEROFILL] [AUTO_INCREMENT] type byte minimum value Maximum TINYINT 1 Signed […]

  • Windows emergency response and system reinforcement (8) — windows IIS log extraction and security check analysis


    Analysis of windows IIS log extraction and security check 1、 IIS log introduction: 1. Introduction to IIS IIS, the full name of Internet information services, is a basic Internet service provided by Microsoft based on running Microsoft Windows. IIS is a web service component, including web server, FTP server, NNTP server and SMTP server, which […]