Nginx installation and depth optimization

Blog Outline: I. optimization before compilation and installation II. Nginx configuration item optimization 1. Adjust the number of Nginx running processes 2. CPU affinity of Nginx 3. Nginx event processing model 4. Enable efficient transmission mode 5. Connection timeout 6. fastcgi optimization 7. gzip tuning 8. Tuning of expires cache 9. ...

Added by choubix on Fri, 25 Oct 2019 15:17:40 +0300

TP5 custom command detailed command line usage

Many times, you need to use the command line to execute php scripts. There is no big problem in executing individual php scripts. If you want to execute a file that uses the TP5 framework project, you may not be able to execute because the relevant files cannot be loaded. Fortunately, there is comma ...

Added by Christian B. on Fri, 25 Oct 2019 09:22:04 +0300

rpc client and server of PHP

[TOC] rpc client and server of PHP There are many solutions for PHP rpc, and many open rpc frameworks based on PHP code can be seen on composer. There are also many rpc frameworks based on C PHP extension, such as swoole, Yar and grpc. The ready-made framework is very simple to use. Just install and call it directly, I won't say it. Let's just ...

Added by im8kers on Thu, 24 Oct 2019 01:13:27 +0300

Codeforces - 1194E - Count The Rectangles - scanlines

https://codeforc.es/contest/1194/problem/E For 5000 normal (same direction will not overlap, nor degenerate into point) line segments, they are all parallel to the coordinate axis direction, to find how many rectangles can be formed. Firstly, coordinate migration is carried out, which is classified according to horizontal line and vertical line ...

Added by mikosiko on Wed, 23 Oct 2019 23:12:02 +0300

P2762 space flight plan problem (minimum cut)

n experiments, each experiment can gain ai yuan. How many instruments are needed for each experiment Buying each instrument has different costs, different experiments may be used, the same instrument is purchased only once for maximum benefit Explanation:........................................... Let's talk about the construction of metaphy ...

Added by jaikar on Wed, 23 Oct 2019 22:18:18 +0300

iOS and H5 page interaction (WKWebview and UIWebview cookie settings)

Mainly record the cookie related pits 1. UIWebview 1. UIWebview is relatively simple and can be realized directly by setting cookies through NSHTTPCookieStorage. Code part ``` NSURL *cookieHost = [NSURL URLWithString:self.domain]; // Set cookie s NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties: [NSDictionar ...

Added by DasHaas on Wed, 23 Oct 2019 22:15:01 +0300

Python -- Network Programming 3

Socket socket (module): responsible for receiving data from the transport layer, processing it, and handing it to the operating system from the bottom layer. Effect To avoid the use of interfaces and protocols in each layer of computer learning, socket has encapsulated all interfaces, which is convenient to use and improves development effi ...

Added by incubi on Wed, 23 Oct 2019 20:54:31 +0300

Initial experience of wechat applet webSocket

WebSocket is a single TCP Connect to full duplex Communication protocol. WebSocket communication protocol was approved by IETF As standard RFC 6455 and supplemented by RFC7936. WebSocket API Also be W3C Set as standard. WebSocket makes the data exchange between the client and the server easier, allowing the server to actively push data to the ...

Added by ceruleansin on Wed, 23 Oct 2019 19:39:05 +0300

Bubble sorting and binary search and for loop enhancement

Bubble sort My understanding: With double loops, the length of the array is as long as the outer loop is repeated. There are 10 arrays, and the outer loop will loop 10 times. Think of double loops as rows and columns. The outer loop is rows and the inner loop is columns. For the first time, it enters the internal circulation from the externa ...

Added by mgs019 on Tue, 22 Oct 2019 19:05:42 +0300

[CF11D]A Simple Task solution

Title Solution Let's start with the simplest idea. First of all, we can see that the topic discovery \ (n \) is very small, so it's easy to think of state compression. Let's consider a more intuitive state. f[i][j][k] represents the number of schemes of a simple ring whose starting point is I, the current point state is j, and the previous poin ...

Added by sssphp on Mon, 21 Oct 2019 18:57:43 +0300