Collection and Iterator interface -- Java Collection Series
The Collection interface is the parent interface of the List, Set and Queue interfaces. The methods defined in the interface can be used to operate both the Set Collection and the List and Queue Collection.
1. Collection interface method
1.1 method API
boolean add(Object o) Add an element to the collection and return true when the collect ...
Added by teamshultz on Tue, 31 Dec 2019 07:03:59 +0200
Spring cloud war package deployment causes the service not registered to Nacos normally
Recently, a spring boot project has been connected to microservice, using spring boot 2.1.9.release and spring cloud greenwich.sr3. Local tests are normal, but after going online, there is a situation like this:
There is no statement like Nacos registry in the log, and there is no exception information, just like there is no microservice config ...
Added by csteff24 on Mon, 30 Dec 2019 14:49:19 +0200
Query result field type in yii2 database
The default return from the yii2 database query is an AR object, where the field type is essentially the same as the database, but if asArray is used to return in an array, the default field type is all string, and if this json_encode is returned to the App end, it will be killed by the engineers of the strongly typed languages Android/IOS, and ...
Added by Eratimus on Mon, 30 Dec 2019 09:49:12 +0200
Understand Nginx location matching thoroughly
Nginx's location implements fine-grained processing of requests, some URI s return static content, some distribute to back-end servers, and so on. Understand its matching rules thoroughly today
An example of the simplest location is as follows
server {
server_name website.com;
location /admin/ {
# The configuration you plac ...
Added by pavanpuligandla on Mon, 30 Dec 2019 06:15:04 +0200
Using Golang to realize Joseph Ring
Following the previous one-way list, the single line list can be further expanded into a ring, as shown in the following figure:
Characteristic:
1. The first node is called the head node, and the last node is called the tail node
2. Each node points to the next node unilaterally
3. Tail node next node points to head node
Title:
Gaspar, a F ...
Added by nitroxman on Sun, 29 Dec 2019 22:11:28 +0200
On dubbo spi mechanism
For example:
private static final Protocol protocol = ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
First of all, analyze the getExtensionLoader method: it is very simple to query whether the extension "loaders" exist or not, and then new returns
public static <T> ExtensionLoader<T> getExten ...
Added by hyperyoga on Sat, 28 Dec 2019 16:53:49 +0200
Python crawler battle, 60 lines of code crawl all-hero skin of the League of Heroes, looking for those once deleted out-of-date skin
After more than a week of crawling classes, the editor finally couldn't help but decide to write the crawler program manually. Just as LJ encouraged the students to share their results and rewarded their excellent works, he organized the crawl process of crawling high definition Wallpapers of major games with Python programming for submission a ...
Added by YOUAREtehSCENE on Sat, 28 Dec 2019 09:59:41 +0200
CSP201803-4 chess game evaluation
Problem description
Alice and Bob are playing jigsaw.The rules of Jingzi chess game are simple: two people take turns to put pieces on the 3 * 3 board, Alice puts "X", Bob puts "O", and Alice holds the lead. When the same piece occupies three squares of a row, a column or a diagonal, the game ends and the holder of the piece ...
Added by Sander on Fri, 27 Dec 2019 16:43:51 +0200
Super easy to parse JSON package GJSON with Golang
Basic overview
People who have used dynamic languages believe that it is very easy to parse JSON. You only need a few lines of code to get the parsed JSON object. For example, Python parses JSON as follows
result = {"name": "Bob", "age": 18}
print(result["name"]) // "Bob"
The simple data structure in Golang language can use map[string] ...
Added by youropensource on Fri, 27 Dec 2019 10:58:09 +0200
maven uses the setting.xml configuration file to configure the warehouse address
Only one image library can be configured. Alibaba's cloud address is used here, which is faster
Upload a maven settings.xml configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apa ...
Added by cmaclennan on Thu, 26 Dec 2019 21:04:02 +0200