Start the Activity process
Preface
This is Android 9.0 AOSP series Let's review the general contents of the previous articles.
Pangu and Nuwa in Java World -- Zygote
This paper mainly introduces the starting process of Zygote, the first Java process in Android world.
Register server socket to respond to client requests
Various preloading operations, classes, resources ...
Posted by Nymphetamine on Tue, 03 Dec 2019 15:47:28 -0800
Data Compression and Archiving-zlib:GNU zlib Compression-Compression of Network Data
8.1.5 Compressed network data
The server in the next code list responds to a file name request with a stream compressor that writes a compressed version of the file to a socket that communicates with the client.
import zlib
import logging
import socketserver
import binascii
BLOCK_SIZE = 64
class ZlibRequestHandler(socketserver ...
Posted by coder9 on Tue, 03 Dec 2019 12:02:54 -0800
MySQL password change, common commands
MySQL password change
Check whether MySQL service is started. If not, use / etc/init.d/mysqld start
[root@test-a ~]# ps aux | grep mysql
root 2180 0.0 0.1 115432 1724 ? S 07:33 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/data/mysql --pid-file=/usr/local/mysql/mysqld.pid
mysql 2390 0.9 17.8 1117648 180356 ? ...
Posted by rcarr on Mon, 02 Dec 2019 20:22:12 -0800
RPC based on TCP protocol
Preface:
Environmental Science:
windown 10
Eclipse
JDK 1.8
Concept of RPC:
RPC is a remote procedure call and the basis of distributed web site.
Experiment
SayHelloService.java interface class for specification
SayHelloServiceImpl.java is the implementation class of SayHelloService
Provider.java is the service providing class
C ...
Posted by rg_22uk on Mon, 02 Dec 2019 09:34:18 -0800
MySQL installation under CentOS
Mysql database is a common database. When you practice the installation, you may encounter various problems. Please refer to the installation method of MySQL database in CentOS system. If you have any questions, please leave a message and I will answer them at any time.
MySQL installation steps are as follows:
Step 1: upload MySQL binary instal ...
Posted by roze on Sun, 01 Dec 2019 12:26:41 -0800
Make a chat room with gorilla websocket
This demo implements:
Message broadcasting
Heartbeat detection
Chat via command line
The specific logic is in websocket.go
The core here is the global variable aliveList, which is responsible for distributing messages to clients. Events are passed through channel s to reduce blocking
A single link will be registered in the Livelist, and ConnL ...
Posted by coderage on Sun, 01 Dec 2019 05:49:22 -0800
Supervisor's installation and management of tomcat process under CentOS7
Before installation, please ensure that your server can access the Internet normally, and the firewall is closed. Turn off selinux
1. Supervisor installation
yum install python-setuptools //Installation dependency
easy_install supervisor
mkdir /etc/supervisord.d/ //Create directory
cd /etc/supervisord.d/
echo_supervisord_con ...
Posted by sunnypal on Sat, 30 Nov 2019 08:53:55 -0800
Java Socket framework Apache MINA: implement Socket server
Java Socket framework Apache MINA: implement Socket server
Now, Apache MINA is used to realize a simple Socket Server. The Server implements a simple function. When a Socket client connects, it sends a simple string "zhangphil" to the client. The Server-side program code is as follows:
import java.net.InetSocketAddr ...
Posted by Xo_ on Sat, 30 Nov 2019 05:05:33 -0800
Best practice of eBCC performance analysis - a simple eBCC analysis network function's latency
0. Intro
BCC is a set of performance analysis tools based on ebpf of 4.x kernel;
eBCC, as the name implies, is the abbreviation of extended BCC. It is the extension of the BCC project by Alibaba kernel team on Aliyun Linux, including the existing tool set of BCC itself and some small tools newly developed by us. eBCC is based on the extension o ...
Posted by cristiano on Fri, 29 Nov 2019 11:55:34 -0800
JAVA programming Miscellany
1. How to obtain the request and response in spring aspect programming
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();//Get request
HttpServletResponse response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();//Get response
2. Exam ...
Posted by BETA on Fri, 29 Nov 2019 11:51:46 -0800