026.2 network programming UDP chat
Implementation through socket object##############################################################The UDP sender needs to be established:The way of thinking is:1. Set up a socket service that can realize UDP transmission2. Specify the data to be sent3. Send data through socket service4. Shut down serviceSteps:1. Create DatagramSocket object2. C ...
Posted by TheTechChik on Fri, 27 Dec 2019 20:54:03 +0100
python implements simple FTP
1. Development environment
server side: centos 7 python-3.6.2
Client: Windows 7 python-3.6.2 pycharm-2018
Program purpose: 1. Learn to use socketserver to achieve concurrent processing of multiple clients.
2. Learn to use struct to solve TCP sticky packages.
2. Programming
(I am a novice bird, for development specifications, interface design is ...
Posted by rushdot on Thu, 26 Dec 2019 23:40:34 +0100
MiniWeb framework of python
The purpose of this study on MiniWeb framework is not to complete the compilation of the framework, but to learn the ideas in the compilation of the framework, mainly to understand the definition and automatic maintenance of routing table, the function of view function, the development idea of separation of front and back ends, and the realizat ...
Posted by hesketh on Thu, 19 Dec 2019 17:43:44 +0100
Summary of mysql8.x single machine installation
1. Download the mysql installation package, extract the installation file, and change the name to mysql
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.13-linux-glibc2.12-x86_64.tar.xz
2. Create data directory in mysql folder
mkdir data
3. Create mysql user group and mysql user
groupadd mysql
useradd -g mysql mysql
4. Change ...
Posted by shellyrobson on Thu, 12 Dec 2019 15:22:48 +0100
Understanding the use of BigDecimal
What is BigDecimal
BigDecimal can represent a floating point number of any size with complete accuracy.
Why use BigDecimal instead of double
Talk is cheap, Show me the Code.
Example 1:
double d1 = 0.3;
double d2 = 0.2;
System.out.println("Double:\t 0,3 - 0,2 = " + (d1 - d2));
float f1 = 0.3f;
float f2 = 0.2f;
System.out.println("Float:\t 0,3 - ...
Posted by manmanman on Thu, 12 Dec 2019 03:04:33 +0100
Implement a simple Tomcat
1. Tomcat function
Our web application will run in Tomcat. Obviously, the request must arrive at Tomcat first. Tomcat will actually process the request as follows:
Provide Socket service: the start of Tomcat must be Socket service, which supports http protocol.
Request distribution: a Tomcat can provide services for multiple web applications, ...
Posted by Nat on Tue, 10 Dec 2019 21:15:05 +0100
Troubleshooting a UDP communication problem
Communication model
(a -- > B -- > A): a sends data to B through UDP (a can be a specified destination, or a broadcast message to b). B sends back a message to a according to the source address and port after receiving the message, which is such a simple communication process.
For the explanation of golang udp, please refer to the followi ...
Posted by PDXDesigner on Mon, 09 Dec 2019 08:37:47 +0100
How to use Android Bluetooth 2.0:
Copyright notice: This is the original article of the blogger. It can't be reproduced without the permission of the blogger. https://blog.csdn.net/u010046908/article/details/50610297
How to use Android Bluetooth 2.0
1.Android operation Bluetooth 2.0 use process
(1) fi ...
Posted by rune_sm on Wed, 04 Dec 2019 12:24:57 +0100
How can I tell if there are no regular files in Bash?
I use the following script to see if the file exists:
#!/bin/bash
FILE=$1
if [ -f $FILE ]; then
echo "File $FILE exists."
else
echo "File $FILE does not exist."
fi
If I just want to check that the file does not exist, what is the correct syntax to use?
#!/bin/bash
FILE=$1
if [ $FILE does not exist ]; then
echo "File ...
Posted by maheshbaba on Tue, 03 Dec 2019 19:24:56 +0100
EMQ source code -- start of EMQ
It's back to erlang again. It's kind of friendly to go back to erlang after using it for a while. In the project, mqtt is also prepared to be used for message reporting. By the way, I want to see his code.
In erlang, application s are managed by a supervisor. In emq, emqttd sup is the largest supervisor, and there are many supervisors or worker ...
Posted by Dragoa on Sun, 01 Dec 2019 06:26:35 +0100