Visitor pattern is a behavior pattern, which is not commonly used. It can separate the algorithmic logic acting on the object from the object itself.
2 visitor mode
When we need to operate on a group of similar types of objects, we can maintain the operation logic within each object separately, but this violates the principle of singl ...
Posted by markl999 on Sun, 31 May 2020 11:54:48 +0200
Chain of Responsibility Pattern
It gives multiple objects the opportunity to process the request, thus avoiding the coupling between the sender and the receiver of the request. Connect these objects into a chain, and pass the request along the chain until there is an object to handle it.
Each processing object determines which com ...
Posted by KCAstroTech on Sun, 31 May 2020 09:37:16 +0200
namespace HelloWorldApplication // Namespace Declarations
/* Class name is HelloWorld */
class HelloWorld // A class
/* main function */
static void Main(string args)
/* My First C#Program */
Posted by roneill on Sat, 30 May 2020 18:44:39 +0200
If Maven's dependency is not handled properly, it often leads to some problems, which is very annoying. Today I'd like to share with you a dependency related problem that you may have encountered before.
There is an ES search project, which is still in good condition at the beginning. After a while, it is found that the start ...
Posted by foxy69 on Sat, 30 May 2020 11:57:00 +0200
In the previous article, we introduced the use of jstat tool in JDK14. In this article, we will further explore the use of jstack tool.
jstack tool is mainly used to print java stack information, mainly java class name, method name, bytecode index, row number and other information.
Blockchain from getting st ...
Posted by unidox on Sat, 30 May 2020 03:56:47 +0200
Through the previous article Istio Sidecar injection principle It can be found that the Sidecar application has been injected at the same time when the application is submitted to the kubernate deployment.
If you are careful, you can also find that in addition to the application of istio proxy, there is also an Init Containers of istio ...
Posted by virtual_odin on Wed, 27 May 2020 13:02:34 +0200
It's like a synchronization block, java.util.concurrent.locks.Lock Is the thread synchronization mechanism. However, locks are more flexible and complex than synchronous blocks. Because lock is an interface, you need to use one of its implementations to use lock in your application. ReentrantLock is one such implementation of ...
Posted by greedyisg00d on Wed, 27 May 2020 07:09:42 +0200
In the actual development process, we often encounter businesses that require multi-threaded concurrency. Finally, we need to summarize the tasks completed by each thread, but the main thread usually ends earlier than the sub-threads. If you want to wait for each sub-thread to finish before running the main thread, you need to identify ...
Posted by freedomclan on Mon, 25 May 2020 18:56:38 +0200
140. Word Split II
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces to the string to construct a sentence so that all words in the sentence are in the dictionary.Return all these possible sentences.
Words in the dictionary can be reused when separating.
You can assume that t ...
Posted by hellangel on Mon, 25 May 2020 18:45:06 +0200
Source network, only for learning, if there is infringement, please contact delete.
Before Redis 3.0, sentinel mechanism was used to monitor the status of each node.
Redis Cluster is redis's distributed solution, which was officially launched in version 3.0, effectively solving redis's distributed requirements. When encountering single machin ...
Posted by nigelbashford on Mon, 25 May 2020 10:23:23 +0200