SOCKET programming - Implementation of time server and client

Article directory UNIX_NET Get server time connect function Get time client program implementation Get time server implementation antic The use of macro definition Source address UNIX_NET Get server time connect function #include <sys/types.h> /* See NOTES */ #include <s ...

Posted on Sat, 26 Oct 2019 14:20:28 -0400 by Mikester

Python super detailed string usage

String splicing Actual scenario: concatenate the data in the list into a string Solution: use the str.join() method >>> li = ['cxk', 'cxk', 'kk', 'caibi'] >>> ''.join([str(i) for i in li]) 'cxkcxkkkcaibi' Generator expressions are recommended. If the list is large, you can save a lot of memory space >>> ''.join(str(i) ...

Posted on Sat, 26 Oct 2019 09:33:57 -0400 by MoldRat

Automatic deployment of python environment (including openssl) in offline environment

When a project is encountered, you need to install the python project in the Intranet environment, so you write a script to automatically deploy the python environment and the python project in your spare time. Because the project is classified, only the shell script to automatically deploy the python environment is provided here, including the ...

Posted on Fri, 25 Oct 2019 16:06:43 -0400 by Karpathos

Using C + + to encapsulate mutex and conditional variables

This article uses C++ RAII mechanism To encapsulate the mutex and condition variables, to make them manage the life cycle of mutex and condition variables automatically, and to avoid resource leakage caused by manual maintenance. This article uses Pthread Library under Linux. mutex MutexLock First, the mutex is encapsulated. The following is th ...

Posted on Fri, 25 Oct 2019 14:30:24 -0400 by bickyz

python uses plot to generate charts in batches

After using groovy to crawl the historical weather of 3000 + cities in China, I need to draw a Time Series table for each city to reflect the change curve of the temperature difference between the highest temperature and the lowest temperature. There is a problem here. Every time I plot the icon, I always call up the system browser to open it f ...

Posted on Fri, 25 Oct 2019 03:50:44 -0400 by YappyDog

Ubuntu nginx gunicorn Django Tencent cloud deployment

Step 1: create root user and use Create root user: sudo passwd root //Will let you enter the current user password. Enter press enter to enter the root password twice Using the root user: su root //Prompt for the root password. Input can Step 2: enter the root account update system root@VM-0-1 ...

Posted on Fri, 25 Oct 2019 00:20:00 -0400 by dietkinnie

Making Centos 7.4 operating system template machine

The tools needed for making the template machine can be extracted from the online disk: https://pan.baidu.com/s/17vnFic6xKVdDaY0g7uRv5g Extraction code: m005 Create a new virtual machine, select a typical installation, and click Next Choose to install the operating system later, and click Next Select Linux operating system, CentOS 64 bit vers ...

Posted on Thu, 24 Oct 2019 22:24:25 -0400 by SkyRanger

Optimization and configuration for Apache Service -- log file optimization

Optimization and configuration of Apache services Log segmentation Log file analysis Apache compression Setting up the Apache cache I. log segmentation The default storage location for Apache log files: /var/log/httpd/ It is divided into access log and error log by default. The purpose of log segmentation: As the number of visits to the si ...

Posted on Thu, 24 Oct 2019 22:17:58 -0400 by PJSheltrum

How to execute groovy script file in java test framework

When I write the test framework based on httpclient, I use groovy script as the script language of the test case. Naturally, I need java to execute the uploaded test script. After reading the example, I encapsulate it. Generally speaking, it is similar to java reflection execution Java method. But there are also some incompatibilities. Some of ...

Posted on Thu, 24 Oct 2019 04:53:29 -0400 by GreyFilm

Implementation of qq robot with cool Q+java

Background: due to the company's current business demand, many business arrivals are through the offline QQ notification channel. When the business volume is large, operators need to spend a lot of time to send QQ information notification channels. So I found the cool q deployment shared by Daniel on the Internet to realize the QQ robot, and su ...

Posted on Wed, 23 Oct 2019 17:39:38 -0400 by XeRoZeN