Implementation of a protocol pool in fasthttp
Implementation of a protocol pool in fasthttp
The protocol pool can control parallelism and reuse the protocol.An important reason why fasthttp is many times more efficient than net/http is the use of a coprocess pool.The implementation is not complicated, we can refer to his design to write high-performance applications.
Entrance
// server.go
...
Posted by simonj on Sun, 07 Jul 2019 18:39:57 +0200
RelativeSizeTextView for Custom Controls
Preface
Firstly, the blogger of this control really does not know what kind of Chinese name to explain, so the title can only carry the name of the control directly. The main function of the control is to display a pre-text and post-text that can configure the size and color. It may be said that they do not understand very well. Okay, firs ...
Posted by jennatar on Sun, 07 Jul 2019 03:31:58 +0200
How to Implement Android Desktop Widgets (2)
In the last blog, I mainly introduced how to implement an Android desktop widget from the perspective of documentation. This blog will show you how to implement an Android widget with examples!!
Look at the effect map first.
As can be seen from the effect chart, the desktop widget has been implemented, but there is nothing in it. Now let's ...
Posted by chiefrokka on Sun, 07 Jul 2019 03:09:35 +0200
If you don't want to write objects, clone one.
1. Why cloning?
For example, sometimes we need to get a very complex object. Instead of using new to create objects and assign values to each attribute, we can clone existing objects directly. In java, "=" can be used to clone base types, but not reference types.
Why not use "=" directly for reference types?
Answer: Because ...
Posted by homie on Sun, 07 Jul 2019 02:18:05 +0200
Material Design Compatibility Control Learning
Sketch
Material Design, introduced from Android 5.0, is a brand new design language called "Raw Material Design", which is a design style, concept and principle advocated by Google. Combining the imitation design and flat design style, some scientific and technological concepts are integrated.
For further information, check out this w ...
Posted by matafy on Sun, 07 Jul 2019 01:06:04 +0200
Reading Notes of "JavaScript Object-Oriented Programming Guide (2nd Edition)" (1)
Catalog
I. Objects
1.1 Ways to Get Attribute Values
1.2 Get the value of dynamically generated attributes
Array
2.1 Check whether it is an array
2.2 Increasing array length results in undefined unassigned locations
2.3 Implementing Simple Iterator with Closure
Scope
3.1 Function Scope (Local Variables)
3.2 There is no block-lev ...
Posted by dizel247 on Sun, 07 Jul 2019 00:25:32 +0200
Sass Learning Summary
The following code is based on the scss format:
The difference between.sass and.scss
"Sass" can only use Sass's old grammar rules (indentation rules), "scss" uses Sass's new grammar rules, which are SCSS grammar rules (similar to CSS grammar format).
.sass:
$font-stack: Helvetica, sans-serif //Define variables
$primary ...
Posted by keeB on Sat, 06 Jul 2019 20:16:27 +0200
Android OpenGL ES2.0 (1) - Drawing Static Shapes
quick get start
Key Classes
GLSurfaceView
Carriers drawn
TextureView is available for small areas
SurfaceView can theoretically be used
GLSurfaceView.Renderer
Essential Drawing Action
Keying a GLSurfaceView object
class MyGLSurfaceView extends GLSurfaceView {
public MyGLSurfaceView(Context context){
super(context);
...
Posted by vivianp79 on Sat, 06 Jul 2019 18:48:46 +0200
AF Security Policy of AFNet Working Source
1 HTTPS and SSL/TSL
Secure Sockets Layer (Secure Sockets Layer), because the HTTP protocol used on the Internet is plain text, there are many shortcomings, such as transmission content will be peeped and tampered with. The role of the SSL protocol is to encrypt the network connection at the transport layer.
By 1999, because of its wide applicat ...
Posted by toddg on Sat, 06 Jul 2019 01:03:58 +0200
On JSX Grammar of React
The best solution is to generate templates directly through JavaScript and then build user interfaces.
To make it simpler, there is a very simple and optional HTML-like syntax that generates templates through function calls, called JSX.
1. Why use JSX?
You don't need to use JSX for React, you can use JavaScript directly, but JSX is recommend ...
Posted by vzwhaley on Fri, 05 Jul 2019 23:18:05 +0200