Implementing Simple TCP Communication with QT5
Network sockets using QT s require the addition of a sentence in the. pro file:
QT += network
I. Client
1. The client code is slightly simpler than the server. Generally speaking, using the QTcpSocket class in the QT to communicate with the server requires only the following five steps:
(1) Create a QTcpSocke ...
Added by scuzzo84 on Tue, 21 May 2019 02:34:14 +0300
Summary of Common Problems in Java Programming (1)
String connection misuse
Wrong Writing:
String s = "";
for (Person p : persons) {
s += ", " + p.getName();
}
s = s.substring(2); //remove first comma
Correct writing:
StringBuilder sb = new StringBuilder(persons.size() * 16); // well estimated buffer
for (Person p : persons) {
if (sb.length() > 0) sb.append(", ");
sb.app ...
Added by kazil on Mon, 20 May 2019 05:53:56 +0300
C++ High Performance Server Network Framework Design Details
Preface
In this article, we will introduce the development of server, and explore how to develop a high performance and concurrent server program from many aspects. It should be noted that the complexity of large servers lies in their business, not in the basic framework of their code engineering.
Large servers generally consist of mult ...
Added by Charlie9809 on Sun, 19 May 2019 22:41:25 +0300
udp programming for python network-Socket (24)
Introduction to udp
udp - User Datagram Protocol is a simple connectionless datagram-oriented transport layer protocol.
udp does not provide reliability; it simply sends datagrams from applications to the IP layer, but it does not guarantee that they will reach their destinations.
udp does not need to establish a connection between client a ...
Added by Pobega on Sun, 19 May 2019 07:53:51 +0300
Install Mysql under centos7
Download Mysql
I use 64-bit MySQL 5.7.20 to execute the following commands
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz
Encounter problems
1,wget commond not found
If you sign up for wget commond not found ation, you have not installed wget configuration for centos.
This command needs to b ...
Added by gladius on Fri, 17 May 2019 11:18:19 +0300
Python's 22 programming skills, please accept!
1. Exchange two digits in situ
Python provides an intuitive way to assign and exchange (variable values) in a single line of code. See the following example:
x,y= 10,20
print(x,y)
x,y= y,x
print(x,y)
#1 (10, 20)
#2 (20, 10)
A new tuple is formed on the right side of the assignment and unpack on the left side to the variables < a > and & ...
Added by jdeer0618 on Fri, 17 May 2019 05:37:59 +0300
PostgreSQL on Linux Best Deployment Manual
Installation of common packages
# yum -y install coreutils glib2 lrzsz mpstat dstat sysstat e4fsprogs xfsprogs ntp readline-devel zlib-devel openssl-devel pam-devel libxml2-devel libxslt-devel python-devel tcl-devel gcc make smartmontools flex bison perl-devel perl-ExtUtils* openldap-devel jadetex openjade bzip2
Configuring OS Kernel Parame ...
Added by hazel999 on Fri, 17 May 2019 02:29:34 +0300
Introduction and Use of SpringBoot-WebSocket-STMOP
brief introduction
WebSocket: It is a network communication protocol. Servers can actively push information to clients, and clients can also actively send information to servers. details
sockjs-client: js library, which can simulate support for WebSocket if the browser does not support WebSocket github
STOMP: Simple (Streaming) Text Ori ...
Added by comcentury on Thu, 16 May 2019 09:43:30 +0300
s21day30 python notes
I. Content Review and Supplement
Brief description of three handshakes and four waves
The three handshake
accept accepts connections waiting for clients in the process
connect client initiates a syn link request
If you get the server-side response ack, you will also receive a syc link request from the server-side.
After the client responds ...
Added by sherrilljjj on Thu, 16 May 2019 04:42:17 +0300
java NIO File Download Server Based on Zero Copy Technology
What is zero copy?Let's start with a look at traditional I/O operations.Let's say that the user process now copies one file to another.Then the user program must first read this file into memory, and then write the data in memory to another file.However, file read-in memory is not directly read into the memory of user processes, but read into t ...
Added by 121212 on Wed, 15 May 2019 21:45:05 +0300