Operator '= =' and object's equals() method

Operator '= =' and object's equals() method brief introduction The operator "= =" compares whether the two operands are equal. The two operands can be either basic type or reference type. For example > int a1=1,a2=3; > boolean b1=a1==a2;//The operand of "= =" is of basic ...

Posted on Sun, 19 Jan 2020 08:57:01 -0500 by megavolt

Deep understanding of NIO

Preface Based on the Server side of BIO implementation, how many threads will there be when 100 connections are established? How many threads will there be based on NIO? BIO The so-called BIO is the most traditional socket link, for example: int port = 4343; //Port number // Socket server (simple sending information) Thread sThread = new Thread ...

Posted on Sun, 19 Jan 2020 08:32:15 -0500 by gabo0303

Wuhan University of science and technology - Java object oriented and multithreaded comprehensive experiment - encapsulation, inheritance and polymorphism

Experimental target A preliminary model of user management module of archives management system is realized. Functions include: login interface of password mechanism; query and modification of ordinary users' own information; addition, deletion and modification of other users' information by administr ...

Posted on Sun, 19 Jan 2020 06:15:33 -0500 by darkninja_com

OAuth2 protocol and Spring Security OAuth2 integration

The authorization protocol of OAuth 2.0 allows third-party applications to access restricted HTTP resources. As usual, when you use Github and Google account to log in to other systems, you use the OAuth 2.0 authorization framework. The following figure is the authorization page diagram of using Github account to log in to Coding system: ...

Posted on Sun, 19 Jan 2020 01:58:18 -0500 by tanita

java AOP aspect programming practice

This example is an annotation based aspect programming practice. This aspect function is mainly used to count the execution time of the annotated method 1. First configure maven dependency: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-b ...

Posted on Sat, 18 Jan 2020 09:12:04 -0500 by anatak

The implementation source code of kubernetes service scatter algorithm

In the distributed scheduling, in order to ensure the high availability and disaster recovery requirements of the service, it is usually said that the service is evenly distributed in multiple areas, racks and nodes, so as to avoid the service unavailability caused by a single point of failure. The algorithm, SelectorSpread, is naturally implem ...

Posted on Sat, 18 Jan 2020 02:05:50 -0500 by d~l

s081[2]-unix memory allocation-malloc implementation

memory allocation Previous courses OS Interface: https://dreamerjonson.com/2020/01/04/6-s081-1/ Systems programming wiki Reference The main difference between system programming and application programming is that application programming is designed to produce software that directly serves users. System programming mainly serves other applica ...

Posted on Fri, 17 Jan 2020 11:21:02 -0500 by alimadzi

Simple TCP client program based on QTcpsocket

Code connection: Local path (for Copy code): H disk / Baidu online disk: / program backup / QT/QT_EasyClient.zip 1. introduction In fact, the [QTcpsocket](https://doc.qt.io/archives/qt-5.6/qtcpsocket.html) in the Qt network module has been well encapsulated, avoiding the tedious process of programming ...

Posted on Fri, 17 Jan 2020 09:49:33 -0500 by Joe

Introduction to network socket programming

The following is a Li's understanding of socket programming, hoping to help you; if there are errors, please point out generously; 1: Socket programming preparation 2: Introduction of socket api 3: The introduction and implementation of client / server of udp protocol 4: The introduction and impl ...

Posted on Fri, 17 Jan 2020 09:21:16 -0500 by thirdeye

CopyOnWriteArrayList data is written disorderly

CopyOnWriteArrayList problem This article records a problem that may cause data errors in CopyOnWriteArrayList, This problem was originally a conjecture when reading a book, but after verification, it was found that the problem existed. Originally, I thought that there would be no such problem since the jdk was on, but there was no such probl ...

Posted on Fri, 17 Jan 2020 06:48:45 -0500 by kateevanne