Memory Manager ByteBufAllocator and Memory Allocator
ByteBufAllocator Memory Manager:
The top-level abstraction of memory allocation in Netty is ByteBuf Allocator, which allocates all ByteBuf-type memory. In fact, there are not many functions, mainly the following important API s:
public interface ByteBufAllocator {/**Allocate a block of memory to automatically determine whether to allocate i ...
Posted by evil turnip on Thu, 01 Aug 2019 21:45:59 -0700
Analysis of TCP Reset Message Segments and RST Common Scenarios
RST represents a connection reset used to close connections that no longer need to exist.Normally it means an abnormal closing of the connection, distinguishing it from a normal closing of the connection after four breakups.
The three conditions for generating RST are:
The SYN destined for a port arrives, but there is no server listening on th ...
Posted by earthlingzed on Thu, 01 Aug 2019 18:44:45 -0700
Concurrent Programming - Daemon - Mutex
Daemon
Main Process Create Daemon (Subprocess)
Then the main process is the daemon
The daemon terminates after the main process code executes
The daemon cannot open any more child processes or an exception is thrown: AssertionError: daemonic processes are not allowed to have children
Note: Processes are independent. The main process code runs ...
Posted by jwilliam on Thu, 01 Aug 2019 18:02:38 -0700
Natural Language Processing NLP Learning Note 3: Making a NLP Web Site with Django
Preface:
Previously, we have been able to initially implement a model of Chinese Natural Processing Language, but the interactive interface is command-line and not very friendly.
If you want to do something similar http://xiaosi.trs.cn/demo/rs/demo The interface, then, needs to go on.
Django
Since Jiagu and others use the python langu ...
Posted by srividya on Thu, 01 Aug 2019 17:45:33 -0700
Python Object-Oriented Inheritance Case
Three Object Oriented Features
Encapsulation encapsulates attributes and methods into an abstract class according to duties
Inheritance enables code reuse without requiring duplicate writing of the same code
Polymorphic. Different objects call the same methods, produce different execution results, and increase code flexibility
01. Sin ...
Posted by haixiao on Thu, 01 Aug 2019 13:43:55 -0700
Round5, Bullock School, 2019
Solved:4
Rank:122
A digits 2
Check in to write this number n times
#include <bits/stdc++.h>
using namespace std;
int T;
int n;
int main(){
scanf("%d",&T);
while(T--){
scanf("%d",&n);
for(int i=1;i<=n;i++)printf("%d",n);
puts("");
}
return 0;
}
digits 2
B ...
Posted by achintha on Thu, 01 Aug 2019 11:51:56 -0700
A complete machine learning project
Download Data
import os
import tarfile # Used to compress and decompress files
import urllib
DOWNLOAD_ROOT = "https://raw.githubusercontent.com/ageron/handson-ml/master/"
HOUSING_PATH = "datasets/housing"
HOUSING_URL = DOWNLOAD_ROOT + HOUSING_PATH + "/housing.tgz"
# Download Data
def fetch_housing_data(housing_url=HOUSING_URL, ...
Posted by pentinat on Thu, 01 Aug 2019 11:44:37 -0700
Spring's component scan annotations
Scan Spring's component classes by annotating @ComponentScan on the class.
Optional parameters for @ComponentScan
basePackages: Specifies the root package directory that needs to be scanned, and its subdirectories will also be scanned. The default path is the @ComponentScan annotation class directory and its subdirectories
Alias for value:base ...
Posted by bluto374 on Thu, 01 Aug 2019 11:43:18 -0700
HDU5845 trie tree optimization dp
http://acm.hdu.edu.cn/showproblem.php?pid=5845
Topic: Given a sequence, ask how many segments it can be divided into so that each sequence does not exceed L and XOR or X.
For interval XOR sum, it is easy to think of prefix XOR and de-optimization so that it can find interval XOR sum in O(1) time, and then we can write a n violence
...
Posted by jonners on Wed, 31 Jul 2019 18:54:53 -0700
React Hooks Deep Series - Design Mode
This article is React Hooks in-depth series Follow-up.This article details the advantages of Hooks over classes, introduces the design ideas of related api, and explains how Hooks align the life cycle hooks of classes.
React Logo and Hooks
React's logo is an atomic pattern in which atoms make up the representation of matter.Similarly, React is ...
Posted by Unknown_Striker on Wed, 31 Jul 2019 14:44:19 -0700