sort is the double nesting, the outer layer is n-1, the inner is this trip to be n-i times comparedDisadvantage, the bubble sort time complexity is very high.Application scenario: Sorting out unordered columns3. Quick SortBasic idea: Determine the base number k, which is generally the 1th number in a series. On both sides of the sequence to the middle of the "exploration", according to judging conditions (such as in order), starting from the right side, when a value greater than k on the right,
", Sendbuflen);Sendbuflen = 10240;SetSockOpt (Clientsocket, Sol_socket, So_sndbuf, (void*) sendbuflen, Len);GetSockOpt (Clientsocket, Sol_socket, So_sndbuf, (void*) sendbuflen, len);printf ("now,sendbuf:%d\n", Sendbuflen);It is important to note that although the send cache is set to 10k, in fact, the stack expands it by 1 time times and sets it to 20k.-------------------Instance Analysis---------------In real-world applications, if the sender is non-blocking, due to network congestion or slow p
systems
z/Os V1r13 provides a fully POSIX-compliant asynchronous write-behind operation for a-owner system. Non-owner system can access directories and files directly from disk without having to make an access request to owner system through a ZFS function shipping. Owner system still updates metadata, but the disk space occupied by metadata is very small compared to a complete file content, so the update metadata reduces the overhead on the owner system. This makes owner's status less importa
description table.
5. Real mode changes to protected mode
(1) Data segment: is the real mode code snippet, data segment, stack segment, Terminal Services program collectively
(2) Descriptor: Used to describe a data segment, 8 bytes, and a 5th byte description description Descriptor type. Descriptors are made up together as descriptor tables, which are the address translation table.
(3) Select sub: 2 bytes, 2nd bit table RPL, the third note is a GDT or a LDT, the highest 13-bit descriptor in the
accidentally execute JavaScript hidden in the URL. A similar situation occurs not only on the redirect (location header), but also in other headers, such as the Set-cookie header. This attack, if successful, can do many things, such as executing scripts, setting up additional cookies (The way to avoid this attack is to filter all response headers, except for illegal characters appearing in the header, especially CRLF.The server generally restricts the size of the request headers. For example, t
= ${addnum}"
mm=$ (Expr ${addnum}/1024)echo "MM = ${mm}"
If [${mm}-le 5];thenEcho-e "\033[31;43m warning \033[0m" >/DEV/PTS/4//terminal, printing in different colors,ElseEcho-e "\033[31;43m ok\033[0m" >/DEV/PTS/4//InterruptFi
Timed execution:Crontab–e
*/1 * * * */xxx/xxx/xx/1.sh
The script file runs every minute,
Because the printout is output through the console, so print the console:/DEV/PTS/4, if you do not know, can be determined by the TTY command, because different conso
Statement: The material used in this column is written by the VIP students of the Kay Academy, who has the right to be anonymous and has the final right to interpret the article; The Edith Academy is designed to promote students to learn from each other on the basis of public notes.Decorative Flow:Introduction: There are two kinds of flow, one is to handle the flow of transport speed, one is to deal with the flow of specific products, one read a slower, to read a batch, and this batch can not be
your own DD command, block size is 8k# time DD if=/dev/sda2 of=/dev/null bs=8k count=83886088388608+0 Records in8388608+0 Records out68719476736 bytes (GB) copied, 516.547 seconds, 133 MB/sReal 8m36.926sUser 0m0.117s Sys0m55.216s #因为/dev/sda2 is a physical partition, reading it will generate Io,/dev/null is pseudo device, equivalent to black hole, ofThe IO is not generated by the device, so the IO for this
. Note, however, that a collection like HashMap is implemented as an array + linked list, so do not set the initial size to the size you estimate because it is almost 0 more likely to connect an object on a table. The initial size proposal is set to the power of N of 2, which can be set to new HashMap (128), and new HashMap (256) if it can be estimated to have 2000 elements. When copying large amounts of data, it is best to use the System.arraycopy () method [when the content length is greater t
compression instructions. The relevant instructions for gzip compression output are located in http{...} Between the two curly braces:gzip on;Gzip_min_length 1k;Gzip_buffers 4 16k;Gzip_http_version 1.1;Gzip_comp_level 2;Gzip_types text/plain application/x-javascript text/css application/xml;directive meaning:
GZIP Instructions:Syntax: gzip On|offDefault value: gzip offInstructions are used to turn the Gzip module on or off.
Gzip_buffers directive:Syntax: gzip_buffers number SizeDefault va
Official: A Simple NimSg[0]=0When X=8k+7 is Sg[x]=8k+8,When X=8k+8 is Sg[x]=8k+7,The rest of the time sg[x]=x; (k>=0)It can be found by the rules of the table, the mathematical induction method can be proven.The specific table is placed in the code, see the INIT function/* by*/#include#include#include#includeusing name
Nginx is a powerful HTTP server, but in the process of using the discovery, when encountering an extra long post request or get request, Nginx will return 413, 400, 414 Status code, this is because the request string length exceeds the Nginx default cache size or request string size, then we need to how to solve these problems? for a POST request, we can adjust the following two configuration items to resolve:client_body_buffer_sizesyntax: client_body_buffer_size the_sizedefault value:
for X, then for the first operation, the SG of the sub-situation is obvious. For the second operation, X is divided into a,b,c. A+b+c=x, then this operation produces three piles, three sub-situation, then the sum of this sub-game is SG (a) ^SG (b) ^SG (c). For example, when X=7, the second operation can produce a sub-game 1,2,4. So the situation with this sub-game is SG (1) ^SG (2) SG (4) = 7.According to the above, through recursion can be known:Sg[0]=0When X=
The linux3.5 kernel allocates a 8k or 4k kernel stack for all processes (including kernel processes and user processes) (which can be selected at the time of kernel compilation), and the stack memory allocated in the module code is in the kernel stack, and if the module code is to allocate memory in the heap, it will be allocated using Kmalloc or Vmalloc, which is something.The stack bottom of the kernel stack holds this thread_info, by acquiring the
files. We can use the reverse proxy function of Nginx to keep only gz files.# can Google "Nginx gzip_static" to learn more
Gzip_comp_level 4# Default value: 1 (recommended option is 4)# gzip Compression ratio/compression level, compression level 1-9, the higher the level of compression, of course, the longer the compression time (faster transmission but more CPU consumption).
Gzip_buffers 4 16k# Default value: Gzip_buffers 4 4k/8k# Set the system t
, and for a specific IO type, the result may be slightly skewed because the speed may be different.
By adding ":
This option controls the number
Sequential produce order of offset
Identical produces the same offset
[Parameter notes]
' Sequential ' is for random io only. Typically, FIO will generate a new random io after each IO. E.g.rw=randread:8, the seek will be executed after every 8 Io, not after each IO. Sequential Io is already in order and then set to ' sequential ' will not produce any
platforms. Orion is free, and users can download their media to Otn downloads link: http://www.oracle.com/technetwork/topics/index-089595.html. I/O calibration with Orion is also simple, including the following steps: (for example, Linux x86_64) 1. Download the Orion media, upload it on a server that requires I/O calibration, and then unzip it to get a binary file; 2. Create a file called Orion.lun , which records the name of the device (LUN) that requires I/O calibration, for example;
/dev/sdb
block. It is no exaggeration to say that this parameter is the most important parameter for large amount of data processing. The larger the value of the parameter is, the more advantageous it is for large data processing. Limited to the operating system, NT4 can only be set to 8k,win2k maximum can be set to 16K. The maximum allowable value for Oracle itself is 64K. Forgot to say that the db_block_size should be set to a power of 2.
For analytical d
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.