Socket network programming learning notes UDP assisted TCP point-to-point transmission case -- UDP broadcast, search and obtain IP/Port
1. UDP search IP and port
Implementation principle: in a LAN, you don't know the IP address of the server, but only the UDP Port common to the server. In this case, you want to realize the TCP connection. TCP is a point-to-point connection, so you need to know the connection IP address and Port of TCP.
How to get the IP and Port of TCP? It ca ...
Added by zbert on Sun, 27 Feb 2022 09:23:37 +0200
MySQL uses binlog logs to solve the problem of deleting databases and tables
First, create a simulation environment.
mysql> create database testdb;
mysql> use testdb;
mysql> CREATE TABLE `people` (
`name` varchar(20) DEFAULT NULL,
`age` varchar(20) DEFAULT NULL,
`birth` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
mysql> CREATE TABLE `pet` (
`name` varchar(20 ...
Added by bonkaz on Sun, 27 Feb 2022 09:00:39 +0200
Several ways of cross domain implementation of jsonp [js cross domain principle]
Search is often used in projects, especially navigation websites. It's not realistic to do keyword search by yourself. Calling Baidu directly is the best choice.
Using jQuery Ajax's jsonp method can call Baidu's js in a foreign domain and get the return value, of course $ getScript can also call js across domains. jsonp quick start:
[origi ...
Added by La Parka on Sun, 27 Feb 2022 08:56:10 +0200
JVM -- garbage collection
2, Garbage recycling
How to judge whether an object can be recycled Garbage collection algorithm Generational waste recycling Garbage collector Garbage collection tuning
1. How to judge whether an object can be recycled
1.1 reference counting method
Disadvantages:
1.2 reachability analysis algorithm
The garbage collector in Java v ...
Added by karthikeyan_coder on Sun, 27 Feb 2022 08:55:45 +0200
python and pygame game development guide [python game design and development]
Recently, I was developing games with python+pygame. After writing, I encountered great problems when sharing with friends. Only when I built an environment can I run python scripts.This will scare off more than 99% of people... So it is imperative to package our game (pay attention to packaging rather than compiling, python is a script program ...
Added by hykc on Sun, 27 Feb 2022 08:52:51 +0200
Detailed explanation and exception handling in Java
brief introduction An unexpected event that occurs when a program is running, which prevents the program from executing normally as expected by the programmer. This is an exception. When an exception occurs, do you allow the program to live and die, exit and terminate immediately, or output an error to the user? Or C language style: using funct ...
Added by trystan on Sun, 27 Feb 2022 08:46:55 +0200
Redis cache breakdown, cache penetration, cache avalanche solution (with code)
In our daily use of redis development, cache penetration, breakdown and avalanche are unavoidable problems. It is also a question we are often asked during the interview. Next, we will explain a variety of solutions to these three kinds of problems.
Buffer breakdown
Cache breakdown means that a Key is very hot and is accessed with high ...
Added by mecha_godzilla on Sun, 27 Feb 2022 08:42:11 +0200
Computer graphics -- Experiment 4 texture mapping experiment
Experiment 4: texture mapping experiment
Nature of experiment project: Design Experiment
Course Name: computer graphics A
Experimental planned class hours: 3 class hours
1, Purpose and requirements of the experiment
Master the basic principle of texture mapping, and use VC++ OpenGL to realize texture mapping technology.
2, Experimental pr ...
Added by gamesmad on Sun, 27 Feb 2022 08:22:51 +0200
DVWA-CSRF Cross Station Request Forgery - High level
Basic knowledge introduction to csrf attack process
Experimental environment:
CSRF simulated attack environment (this is the Intranet environment. The public network only needs to map the port, and other operations are the same)
CentOS7 DVWA server (analog transfer system) 192.168.0.9
kali hacker (attacker) 192.168.0.2
Win10 user (vict ...
Added by lupld on Sun, 27 Feb 2022 08:20:21 +0200
Primitive thread synchronization -- kernel mode construction (WaitHandle, EventWaitHandle, AutoResetEvent, ManualResetEvent, Semaphore, Mutex)
1, Kernel mode constructionThe kernel mode construction adopts the windows operating system to synchronize threads, which is much slower than the construction of user modes such as volatileread, volatilewrite and interlocked. Compared with the construction of user mode, it also has its own advantages:1. There is no need to occupy cpu "spin ...
Added by rdimaggio on Sun, 27 Feb 2022 07:46:27 +0200