Java 8 stream syntax usage

import java.util.ArrayList; import java.util.Arrays; import java.util.IntSummaryStatistics; import java.util.List; import java.util.Random; import java.util.stream.Collectors; import java.util.Map; public class Java8Tester { public static void main(String args[]){ System.out.println("Use Java 7: "); // Eval ...

Posted on Mon, 30 Mar 2020 07:40:37 -0700 by jaapoost

OkHttp Configure HTTPS Access+Server Deployment

1 Overview OkHttp configures HTTPS access with three core components: sslSocketFactory() HostnameVerifier X509TrustManager The first is the ssl socket factory, the second is to validate the host name, the third is the certificate trustor management class. Implementing HTTPS access through OkHttp requires that you implement these three parts y ...

Posted on Sun, 29 Mar 2020 13:00:51 -0700 by vfwood

HTML5 mini game development

Base of HTML HTML, known as hypertext markup language, is an identifying language.It includes a series of tags that can be used to unify the format of documents on the network and to link scattered Internet resources into a logical whole.HTML text is descriptive text composed of HTML commands, which can explain text, graphics, animation, sound ...

Posted on Sun, 29 Mar 2020 10:56:23 -0700 by lanasa

LeetCode 1162. Map analysis

My LeetCode: https://leetcode-cn.com/u/ituring/ My LeetCode brush Title source [GitHub]: https://github.com/izhoujie/Algorithmcii LeetCode 1162. Map analysis subject You now have a Map (Grid) grid of size N x N on which each Zone (Cell) is marked with 0 and 1.Among them, 0 represents the ocean and 1 represents the land. Do you know which ocea ...

Posted on Sun, 29 Mar 2020 10:18:28 -0700 by tsilenzio

Mybatis Spring: integrating mybatis and Spring mode 1: SqlSessionTemplate

Mybatis Spring will help you integrate mybatis code seamlessly into Spring. It will allow mybatis to participate in Spring's transaction management, create mapper and SqlSession and inject them into bean s, and convert mybatis's exception to Spring's DataAccessException. Preparation, entity class, mapper interface, mybatis configuration file ...

Posted on Sun, 29 Mar 2020 07:04:56 -0700 by mhsjrotc

Java Concurrent Programming (03): multithread concurrent access, synchronous control

Source code: GitHub point here || GitEE point here 1, Concurrent problems When multithreading learning, the first complex problem to face is the access to variables in concurrent mode. If you don't understand the internal process and reasons, there will often be a problem: the variable value after thread processing is not what you want, and yo ...

Posted on Sun, 29 Mar 2020 06:03:59 -0700 by royalsolo

God, how many holes have I stepped on in a simple unified log format

In recent days, we have received a requirement that the configuration file of log4j should be packaged into a jar file. At the same time, the jar relies on skywalking related packages. On a large level, in order to unify the log output format of the whole company, it is convenient to access skywalking and elk. How do I think about it The globa ...

Posted on Sun, 29 Mar 2020 01:54:24 -0700 by Amy1980

Detailed explanation of DOM4J in java object-oriented programming 3

Details of DOM4J in java object-oriented programming 3 (7)   1, Introduction & overview Itcast tools: fast, too many restrictions dom4j: free, more code than itcast tools   Environment construction:       2, Getting started: parsing XML files Three steps of parsing: (purpose: get the root tag)   /* * dom4j Introduction ...

Posted on Sat, 28 Mar 2020 10:04:25 -0700 by fr@nkie

2D small game development learning notes - CreateJs game case

1, Surround the nerve cat game How to play the game: it's easy to play. The blue circle represents the nervous cat. Click the circle around to trap the cat, even if the game is successful Game effect Logical combing: 1. Draw regular dots; 2. Set the nerve cat position; 3. Set logic 1) Six directions; 2) The end of the game: go to the ...

Posted on Sat, 28 Mar 2020 09:56:49 -0700 by ericbangug

Single instance mode of creation mode

1 Overview The singleton pattern should be the simplest and most complex creation pattern. Because we all know this pattern: it is nothing more than to ensure that there is only one instance of an object in the system. However, it is not easy to realize a perfect singleton mode. 2 single case mode In general, the implementation of the singleton ...

Posted on Sat, 28 Mar 2020 09:40:49 -0700 by SkyRanger