Python development [notes]: add Python program to systemctl system service
systemctl system services
Environment: centos7
System CTL service usage details
Realization
Normally, we create a file with the suffix. Service in the directory / usr/lib/systemd/system /, such as cdr.service
[Unit]
Description=cdr
After=network.target
[Service]
ExecStart=/opt/pbx/cdr/cdr.py
Type=forking
[Install]
WantedBy=multi-user.t ...
Posted by salomo on Sun, 05 Apr 2020 01:47:01 -0700
Retrofit+BroadcastReceiver realizes the function of App version update
Preface:
In the process of project development, there is generally a need for "version update". We can judge whether to upgrade according to the version code. Generally, for each version update, the version number is increased by one. If the version number on the get server is higher than the version number of this program, you will ...
Posted by PGTibs on Sat, 04 Apr 2020 22:30:56 -0700
7-3 underground maze exploration (30 points) (dfs)
Tunnel war is a way of fighting against Japanese invaders in the North China Plain during the Anti Japanese war. The tunnel network is the underground works of Fang Lian Fang, Jie Lian Jie and Cun Lian Cun, as shown in the figure below.
While reviewing the arduous war life of our predecessors, we sincerely admire their intelli ...
Posted by Skawn on Sat, 04 Apr 2020 20:52:57 -0700
Analysis of Java Dynamic agent
Java's dynamic Proxy mainly refers to the Proxy class under the java.lang.reflect package. The InvocationHandler interface under the same package will be used in the use process.
1. The proxy class provides a static method object newproxyinstance (classloader loader, class <? > [] interfaces, invocationhandler h) to generate proxy objects ...
Posted by nyk on Sat, 04 Apr 2020 15:18:16 -0700
tcp programming -- client obtains server input and output stream
tcp programming -- client obtains server input and output stream
Train of thought:
Step 1: instantiate a ServerSocket object (server socket) to wait for requests on the network (that is, the socket waiting to connect)
Step 2: call the accept() method to return a socket object connected to the client socket object
Step 3: the output stream obtai ...
Posted by bgoulette612 on Sat, 04 Apr 2020 12:56:32 -0700
DMAv1alpha2 New Version: Balancing Standards and Scalability
Author | Sun Jianbo (Tianyuan) Aliyun Technical Expert
Read about: DMASpec has been iterating for nearly three months. v1alpha2 Version finally released!The new version has become more Kubernetes-friendly as a whole, balancing standards and scalability to a large extent and supporting CRD better, on the basis of adherence to platform-independen ...
Posted by FMB on Sat, 04 Apr 2020 06:25:48 -0700
Linux Chromium source compilation
LInux Chromium source compilation
Under LInux, Chromium is compiled in gn+ninja mode. The older version of gyp has been discarded, and by default (the is Pang flag bit is true), the clang compiler is used.
GN generates the build.ninja file through the GN file in the Chromium source code under the compiled directory (s ...
Posted by mac25 on Sat, 04 Apr 2020 03:29:53 -0700
My Spring Cloud:Zipkin Service Tracking
1. Overview
*Why should we have service tracking? There are many services in the distributed system calling each other, and the invocation relationship is complex. If there is a problem, we will have a lot of work when we do problem investigation or optimize the architecture. At this time, we need to be able to accurately track each network re ...
Posted by madcat on Sat, 04 Apr 2020 03:23:40 -0700
[PTA - TIANTI training] I hope all lovers in the world are brothers and sisters who have been separated for many years
Ha-ha. We all know that intermarriage is not allowed within five uniforms, that is, two people cannot intermarry if their nearest common ancestor is within five generations (i.e. themselves, parents, grandparents, great grandparents, and great grandparents). Please help a couple of lovers to judge whether they can get married or not?
Input form ...
Posted by DavidAM on Sat, 04 Apr 2020 03:06:24 -0700
kibana starts reporting an error Elasticsearch cluster did not respond w
kibana start error
Elasticsearch cluster did not respond with license information
This error reporting environment is an ES cluster composed of four elastic search servers. The versions are all elk7.1.0. There are many online documents for specific installation steps.Use cdh1 as the master, cdh2, cdh3, and cdh4 as the datanode nodes.
After the ...
Posted by LAMP on Sat, 04 Apr 2020 02:01:12 -0700