Javaa Learning Note Day12: Network Programming
1. Network programming (simple code, but deep complexity)
Overview of 1.1 Network Programming
1.1.1 Classification
Network programming: BIO,NIO,AIO
BIO (base): Blocking communication (data flow is limited, waiting for the last batch to be released)
(1) In the process of communication, there must be one sender and one receiver.
(2) Before ...
Posted by zuessh on Thu, 03 Mar 2022 19:58:28 +0100
Section 8 Number Theory
Greatest common divisor
1. Seeking the Maximum Common Number Euclidean algorithm-rolling Division (a, b) maximum common divisor gcd(a, b) minimum common divisor lcm(a, b) Theoretical basis: gcd(a, b) = gcd(b, a mod b)
//Core Code
int gcd(int a, int b)
{
return b > 0 ? gcd(b, a % b) : a;
}
AcWing 1246. Equal difference series
The math ...
Posted by jaddy on Thu, 03 Mar 2022 19:47:08 +0100
Java interview questions - Nginx
1, Why can Nginx handle it asynchronously and non blocking
Look at the whole process of a request: when the request comes, establish a connection, and then receive the data. After receiving the data, send the data.
Specifically, the bottom layer of the system is the read-write event. When the read-write event is not re ...
Posted by vickie on Thu, 03 Mar 2022 19:45:20 +0100
Hello Qt-QT coordinate system
1. Introduction to the QT coordinate system
Each window in Qt has a coordinate system. The upper left corner of the default window is the coordinate origin, and then increases horizontally to the right, decreases horizontally to the left, increases vertically to the bottom, and decreases vertically to the top. The origin is the (0, 0) point, i ...
Posted by feign3 on Thu, 03 Mar 2022 19:43:26 +0100
Chapter IV selection of structural programming ##C language programming (4th Edition)
if statement
Example 4.1 input the scores of two students a and b, and output the highest score.
The preparation procedure is as follows:
#include <stdio.h>
int main()
{
float a,b,max;
printf("please enter a and b:");
scanf("%f,%f",&a,&b);
if(a>=b) max=a;
else max=b;
printf("max=%6.2f\n",max);
ret ...
Posted by dave_biscuits on Thu, 03 Mar 2022 19:42:14 +0100
Basic java learning notes day01
1, Preface, introductory program, constant, variable
1.1 what is the Java language
Java language is a high-level programming language launched by Sun Corporation (Stanford University Network) in 1995. The so-called programming language is the language of the computer. People can use the programming language to give orders to the computer ...
Posted by John_S on Thu, 03 Mar 2022 19:38:12 +0100
Mysql(dmg installation) preference setting of MacOS fails to start
First, let's talk about my version information
Operating system MacOS Big Bur 11.2.2
Mysql 8.0.24
Note: I installed it through the official dmg package, not through homebrew. If it is a problem in homebrew installation, it can also be used as a reference.
Current date: April 21, 2021
If you want to directly test the results, you can ju ...
Posted by Vasudhevan on Thu, 03 Mar 2022 19:34:48 +0100
Swift-Initializer
Convenient Initialization
Previous initializers were called specified initializers (required, no system will generate a default), and convenient initializers
Uses of convenient initializers
The specified initializer is not to be overlooked. The convenience initializer does work with the specified initializer in the data I have available at t ...
Posted by ewillms on Thu, 03 Mar 2022 19:29:22 +0100
STM32 analog IIC + color recognition TCS34725
STM32 analog IIC + color recognition TCS34725
1, Hardware parameters
1. Parameters and interfaces
VCC3.3/5V power supply positiveGNDPower groundSDAI2C data inputSCLI2C clock input
2, Communication protocol
1.IIC sequence diagram
It is known from the I2C sequence diagram that I2C communication, I2C communication, a data line and a clock li ...
Posted by pinxxx on Thu, 03 Mar 2022 19:17:20 +0100
Tear Front End JavaScript by Hand (Phase 1)
1. Anti-shake function (debounce)
Purpose: Prevent users from triggering events multiple times and wasting multiple requests
Principle: Callback is executed after an event triggers for n seconds; If triggered again within n seconds, the time is recounted;
const debounce = function(func,delay = 50){
/*
func: Functions requiring ...
Posted by JayBlake on Thu, 03 Mar 2022 19:10:25 +0100