Effective java essay

preface After reading the previous chapters of Effective Java, combined with their actual use, record some useful points 1. Replace the constructor with the static factory method Consider using the static factory method instead of the constructor public class Pizza { private String dough; private String sauce; private String topping; ...

Posted by antisback on Sun, 05 Dec 2021 12:56:37 -0800

Dijkstra algorithm details (single source shortest path algorithm)

Most of us may know BFS and DFS better. For Dijkstra algorithm, it is the algorithm to solve the single source shortest path problem in the graph algorithm structure. It is probably such a weighted graph. Dijkstra algorithm can calculate the shortest path from any node to other nodes. (single source shortest path problem), Dijkstra algorithm c ...

Posted by hayson1991 on Sun, 05 Dec 2021 12:37:44 -0800

du command works well, disk space is well known

As a public environment, the server development environment often encounters disk space bursts (I don't know if you've ever encountered this, but I often do). Since many of our development classmates put files on it, in this case we can only delete our useless files first. However, I have encountered a situation before, I deleted the 10 G files ...

Posted by ponsho on Sun, 05 Dec 2021 11:59:14 -0800

Configuration of docker container network

The Linux kernel implements namespace creation ip netns command You can use the ip netns command to complete various operations on the Network Namespace. The ip netns command comes from the iproute installation package, which is usually installed by default. If not, install it yourself. Note: The ip netns command requires sudo privileges whe ...

Posted by lunny on Sun, 05 Dec 2021 11:43:50 -0800

[Python 3 crawler] BeautifulSoup library crawls geek Solidot technology consulting: collect consulting information within 10 days

This paper crawls the data of qike.com only for learning, but also because I haven't written a blog for more than a month (because it's inconvenient to write the recent contents into a public blog). The crawling technology in this article uses the beautiful soup library. For its specific usage, you can consult relevant materials on the Internet ...

Posted by iluv8250 on Sun, 05 Dec 2021 11:37:43 -0800

Data structure Java data structure stack and queue and LeetCode related interview questions

1. Stack 1.1 concept Stack: a special linear table that allows insertion and deletion of elements only at a fixed end. One end for data insertion and deletion is called the top of the stack, and the other end is called the bottom of the stack. The data elements in the stack follow the principle of Last In First Out LIFO (Last In First Out ...

Posted by Mohammad on Sun, 05 Dec 2021 11:30:29 -0800

tomcat entry to mastery

1, Tomcat Foundation 1.1.Tomcat Foundation Tomcat It's essentially a Servle(Color is) Container, therefore Catalina(Katarina) is Tomcat Core of , Other modules are for Catalina(Katarina) Provide support. such as :  adopt Coyote (k The module provides link communication, Jasper(Jasper) Module provision JSP Engine, Naming provide JNDI Servic ...

Posted by lc on Sun, 05 Dec 2021 11:23:07 -0800

Enhanced Learning Practice | Customize Tingzi Chess in Gym Environment

In Article Enhanced Learning Practice|Customize the Gym Environment In, we learned how a simple environment should be defined and presented simply using print. In this article, we'll learn to customize a slightly more complex environment, Tingzi Chess. Recall the Tingzi game: This is a two-player round game. Players use different placeholders ...

Posted by paruby on Sun, 05 Dec 2021 11:04:47 -0800

2021SC@SDUSC Application and practice of software engineering in Software College of Shandong University -- Ebiten code analysis and source code analysis

2021SC@SDUSC 1, Overview This paper will mainly describe the related methods in packing package in ebiten. Packing package provides a two-dimensional space packing algorithm. The file is located in the internal/packing/packing.go folder. 2, Code analysis const ( minSize = 1 ) type Page struct { root *Node size int maxSize int ...

Posted by bouwob on Sun, 05 Dec 2021 10:49:08 -0800

Network flow and bipartite graph

0. Change log 2021.12.5: replace template code. Add a bipartite chart. 1. Network flow The key of network flow is modeling. Modeling is the essence and modeling is human wisdom. 1.1. Maximum network flow Maximum Flow, MF for short. A directed graph network \ (G=(V,E) \), gives the source and sink \ (S,T \), and each edge \ ((u,v) \) has capacit ...

Posted by defect on Sun, 05 Dec 2021 10:46:03 -0800