How does Iterator work? What are the characteristics?

Methods in the source code of Iterator interface The java.lang.Iterable interface is inherited by the java.util.Collection interface. The iterator() method of the java.util.Collection interface returns an Iterator object The next() method gets the next element in the collection hasNext() checks if there are any elements in the collection ...

Posted on Thu, 21 Nov 2019 09:55:19 -0500 by xhitandrun

Talk about rocketmq's maxReconsumeTimes

order This paper mainly studies the maxReconsumeTimes of rocketmq maxReconsumeTimes rocketmq-client-4.5.2-sources.jar!/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { private final InternalLogger log = ClientLogger.getLog(); //...... ...

Posted on Thu, 21 Nov 2019 09:49:53 -0500 by JasonGreen

PHP development engineer foundation - PHP array

Array Array is the most important data type in PHP. It can be said to master array. Basically, most of the problems in PHP can be solved. The concept of PHP array is different from that in other programming languages. Other programming language arrays are data structures composed of collections of elements of the same type, while PHP array elem ...

Posted on Thu, 21 Nov 2019 08:49:17 -0500 by sleepingdanny

Two problems of conventional dynamic programming algorithm and two solutions of heresy

The following are two very classic dynamic programming algorithm problems, from the force button, the solution is also a commonplace. However, the two solutions ranking first in their respective speed are very unusual. Open a pit and analyze later. LeetCode 322 change exchange Give coins of different denominations and a total amount. Write a fu ...

Posted on Thu, 21 Nov 2019 07:16:20 -0500 by johnsmith153

[Leetcode algorithm weekly] issue 4

First appeared in the WeChat public's front-end growth notes, written in 2019.11.21 background This paper records the whole thinking process in the process of writing questions for reference. The main contents include: Assumption of topic analysis Write code validation Consult others' solution Thinking and summing up Catalog 67. Binary sum S ...

Posted on Thu, 21 Nov 2019 07:07:48 -0500 by Frapster

Asynchronous channel and asynchronous operation result

Asynchronous channel and asynchronous operation result The following contents refer to Chapter 12 of "Java network programming core technology details" written by sun Weiqin.The source code download address is: http://lesson.javathinker.net/javanet/javanetsourcecode.rar Starting from JDK7, the asynchronous SocketChannel class and the ...

Posted on Thu, 21 Nov 2019 05:20:19 -0500 by grantp22

Dynamic execution of code logic

There are two ways to dynamically execute logic as far as I know QLExpress Groovy QLExpress QLExpress is an open source dynamic script execution project for Ali.A dynamic script engine parsing tool designed by Ali for business rules, expressions (Boolean combination), special mathematical formula calculation (high precision), grammar analysis ...

Posted on Wed, 20 Nov 2019 22:20:27 -0500 by wilsonodk

Kafka and Micronaut in Microservices

Today, we will build some microservices that communicate asynchronously with each other through the Apache Kafka theme.We use the Micronaut framework, which provides specialized libraries for integration with Kafka.Let's give a brief introduction to the architecture of the sample system.We have four micro services: order service, trip service, ...

Posted on Wed, 20 Nov 2019 20:51:36 -0500 by dirtyfrenchman

Eckarts template: Ring chart

I have just participated in the market research competition. In this process, I have tried many software for drawing. Compared with what I see is what I get from Tableau, although the operation is simple, the steps are tedious. Finally, I choose to use Echarts to draw a picture. It is not only simple in operation, but also beau ...

Posted on Wed, 20 Nov 2019 14:35:27 -0500 by mickfuzz

Declare exception, throw exception, brief summary of exception

Declaration exception Declaration exception Custom exception If there are multiple types of exception matching, the order of exception matching Conclusion: If an exception is thrown in a method body, how can the caller be notified? Declaration exception There are two methods: Method 1: caller handles exception: usually ...

Posted on Wed, 20 Nov 2019 14:11:13 -0500 by andychamberlainuk