OkHttp3 source code details okhttp connection pool reuse mechanism

1. Overview To improve network performance optimization, it is very important to reduce latency and improve response speed. Usually, when we make a request in the browser, the header part is like this Keep alive is to keep a long connection between the browser and the server, which can be reused. It is enabled by default in HTTP 1.1. Why does ...

Posted by tempa on Mon, 18 Nov 2019 02:01:01 -0800

OkHttp3 source code details Request class

Every network request is a request. Request is the encapsulation of URL, method, header and body. It is also the encapsulation of request line, request header and entity content in Http protocol public final class Request { private final HttpUrl url; private final String method; private final Headers headers; private final RequestB ...

Posted by gazever on Mon, 18 Nov 2019 01:39:59 -0800

Foundation of Web front end: JavaScript

1. Common built-in objects The so-called built-in objects are some objects provided by ECMAScript. We know that all objects have corresponding properties and methods. 1.1 Array 1.1.1 array creation method Create in a literal way (recommended). var colors = ['red','color','yellow']; Use the constructor (later on) to create, and use the new key ...

Posted by ppera on Sun, 17 Nov 2019 22:46:38 -0800

Automating your git workflow with git-flow

Introduce to you The git flow branch model is believed to have been heard more or less by everyone. Let's start with Zhang Tu Townhouse: It doesn't matter if I don't understand the diagram above (I don't know==), but today I'm talking about the git-flow command line tool developed from this branch model.Just remember a few simple commands to s ...

Posted by lostnucleus on Sun, 17 Nov 2019 18:18:02 -0800

kui component library idea (come on, brother, keep updating, deploy gitpages, add issue)

Click the blue words above to follow us Welcome to my public address, Python. 01 Some ideas Today, I will not update the flash tutorial for the time being. Today, I write an article to introduce the idea of doing a day's kui component chemistry library. In fact, there is a vague feeling that I want to have my own component chemistry library, wh ...

Posted by lnt on Sat, 16 Nov 2019 13:59:40 -0800

Doublecachequeue and spinmutex

Original from: http://www.tanjp.com/archives/144 (immediate fix and update)   Doublecachequeue Double buffer, so the idea is to have two buffers (A and B for short). These two buffers are always one for the producer and one for the consumer. When the buffer triggers a condition, a switch is made (the previously written by t ...

Posted by scuzzo84 on Sat, 16 Nov 2019 09:35:53 -0800

Talk about rocketmq's consumeThread

order This paper mainly studies the consumeThread of rocketmq DefaultMQPushConsumer rocketmq-client-4.5.2-sources.jar!/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { private final InternalLogger log = ClientLogger.getLog(); //...... ...

Posted by Sillysoft on Sat, 16 Nov 2019 06:10:44 -0800

Common sorting algorithms

Merge order: 1. It is a sort algorithm based on merge operation, which is an application of divide and conquer method 2. Steps: Assume that the sequence to be sorted is R[0...n-1], and adopt two-way merge a. divide r into two subsequences R1, R2 with the same growth or the same difference of 1 b. divide the subsequences R1 and R2 recursive ...

Posted by baldwinw on Fri, 15 Nov 2019 12:30:55 -0800

New feature of Oracle 12c: online conversion of non partitioned tables to partitioned tables

concept Nonpartitioned tables can be converted to partitioned tables online. Indexes are maintained as part of this operation and can be partitioned as well. The conversion has no impact on the ongoing DML operations. You can convert non partitioned tables to online partitioned tables. Indexes are maintained as part of the op ...

Posted by SoulAssassin on Fri, 15 Nov 2019 10:13:30 -0800

Selective sorting and its application

Simple selection sorting One minimum at a time Time complexity o(n^2), space complexity o(1) void selectsort(int a[], int n) { int min; for (int i = 0; i < n; i++) { min = i;// for (int j = i + 1; j < n; j++) if (a[j] < a[min])min = j;//Find minimum if (min != i)swap(a[i], a[min]);//Put the minimum val ...

Posted by Axcelcius on Fri, 15 Nov 2019 09:18:52 -0800