Using enumeration in Java well, it's not so simple!

Recently, I revisited Java enumeration and saw this article that I thought was good, so I simply translated and improved some content and shared it with you. I hope you can also get something. In addition, don't forget that there is a supplement at the end of the article! ps: here is an enumeration article, which is also a very practical pract ...

Posted by habib009pk on Wed, 29 Jan 2020 00:19:07 -0800

Solution to Sudoku problem -- HDU -- 1426 -- Sudoku killer

Topic connection: http://acm.hdu.edu.cn/showproblem.php?pid=1426 Problem Description Since the first Sudoku World Championship from March 10 to 11, 2006, Sudoku has been more and more loved and valued by people. It is said that at the 2008 Beijing Olympic Games, Sudoku will be listed ...

Posted by raheel on Tue, 28 Jan 2020 20:38:51 -0800

Spring AOP-01 pre enhanced MethodBeforeAdvice

1. Classes to enhance package com.test.springadvicetype; import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; import java.util.Date; /** * Attendants */ @Component public class Waiter { /** * service * @param name */ public String serve(String name) { System.ou ...

Posted by Emperio on Tue, 28 Jan 2020 07:50:07 -0800

Introduction to simple Parser [1]: starting from tree recursion

Parser is a program that converts strings into AST (Abstract Syntax Tree) First of all, we start from the simple analysis of tree class, assuming that there is a tree node (it is a binary tree node): class Tr: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right We ...

Posted by rob.weaver on Tue, 28 Jan 2020 06:45:54 -0800

Simple script development of tampermonkey

Project structure   build.js is mainly used to write UserScript information to the packaged JS file. The reason why BannerPlugin is not used is that if there are some special (@ = = \ n, etc.) characters in the plug-in, they will be converted to commas... When raw is set to false, it is the following, which is useless   Browser debuggin ...

Posted by FoTo50 on Tue, 28 Jan 2020 06:39:30 -0800

Features of single case mode and analysis of common single case mode (analysis of six single case modes)

Single case mode: That is to say, in the whole life cycle, the production of this object is always the same, unchanged. It ensures that a class has only one instance and provides a global access point to access it. Effect: When thread safety is required, the uniqueness and thread safety of class instances are guaranteed. When multiple instan ...

Posted by elle_girl on Mon, 27 Jan 2020 04:46:28 -0800

Deploy the springboot project in idea to the remote docker container

1. Create the project in idea, as shown below 2. Configure docker maven plugin <!-- Docker maven plugin --> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>1.0.0</version> <configuration> <forceTags>true&lt ...

Posted by lou28 on Sun, 26 Jan 2020 07:00:26 -0800

Talk about the persistenceEnabled of artemis

order This paper mainly studies the persistence enabled of artemis persistenceEnabled activemq-artemis-2.11.0/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java public class ConfigurationImpl implements Configuration, Serializable { //...... private boolean persistenceEnabled = ActiveMQDefau ...

Posted by gtcol on Sun, 26 Jan 2020 06:37:40 -0800

How to start paging query (JavaWeb)

Technology coverage (JavaWeb, HTML, Ajax, JQuery, Bootstrap) When contacting this part of knowledge, we often do some small demos to practice. Inevitably, we need to touch a certain amount of data. We often need to echo the data from the database to the page. However, with the increase of data volume, if we do not deal with the query or displa ...

Posted by Sonic_Rage on Sun, 26 Jan 2020 04:19:06 -0800

Daily AC Series: Sum of Four

1 Topic Leetcode Question 18 Given an array and a target, find out that the sum of the four numbers in the array is all four unreplicated numbers of the target. 2 Violence List<List<Integer>> result = new ArrayList<>(); if (nums.length == 4 && nums[0] + nums[1] + nums[2] + nums[3] == target) result.add(Arrays.asLi ...

Posted by pixelfish on Sat, 25 Jan 2020 21:57:39 -0800