DTO to JsonObject

Once upon a time, there was a case where DTO needed to be "frequently" transferred to JsonObject for delivery (because the framework used was Vert.x, and EventBus was used for communication) with obvious performance consumption. Or use the DTO customization of the framework belt, but there is no trouble or operation at first sight. ...

Posted on Sun, 05 Apr 2020 07:49:10 -0400 by Jezz

Children line up for past test questions (blue bridge)

Problem description n children stand in a row. Now we should arrange them in the order of height from low to high, but we can only exchange two adjacent children each time. Every child has a level of unhappiness. At the beginning, the unhappiness of all the children was 0. If a child is asked to exchange for the firs ...

Posted on Sun, 05 Apr 2020 07:16:31 -0400 by mguili

Correct use of thread pool in Java

In the Java development manual recently released by Alibaba, it is not allowed to use Executors to create thread pools. Instead, it uses ThreadPoolExecutor to make the students more clear about the running rules of thread pools and avoid the risk of resource exhaustion Executors use factory mode to provide us with four thread pool implementatio ...

Posted on Sun, 05 Apr 2020 07:01:44 -0400 by jraede

Hadoop 8-day course - the third day, MapReduce details

MR is good at processing offline text files. MR+yarn extends the simple operation logic to the distributed program logic in the context of massive data. If I write distributed programs, I will first face a problem, how to distribute my computing logic to other nodes? How to summarize the running results on all nodes? The overall framework of MR ...

Posted on Sun, 05 Apr 2020 06:46:21 -0400 by Rohan Hill

Thrift -- communication between NodeJS and Java

Thrift – realize the communication between NodeJS and Java Apache Thrift is an efficient framework implemented by Facebook that supports remote service calls in multiple programming languages. It uses interface description language to define and create services, supports extensible cross language service deve ...

Posted on Sun, 05 Apr 2020 04:41:42 -0400 by mlin

Learn Java-9 from scratch. Describe objects

1. Create variables for classes or objects;2. Methods of using objects and classes;3. Call the method and return a value;4. Create a constructor;5. Pass parameters to the method;6. Use this to reference objects;7. Create a new object. Program VirusLab: test the function of Virus class 1 package com.jsample; 2 3 public class VirusLab { 4 ...

Posted on Sun, 05 Apr 2020 04:40:02 -0400 by jkatcher

Getting started with JDBC

Because in the process of testing, we need to take some random values in the database, and then we went to study the application of JDBC in Java. Here are the learning notes for beginners. (using Java as the programming language, the database is MySql.) 1, What is JDBC JDBC API is a Java API, representing Java databas ...

Posted on Sun, 05 Apr 2020 03:41:39 -0400 by bschultz

Slot, slot point for Java design

No water today, go straight to dry!Hope the following explanation will resonate with you.   1. Each length has its own merits   Have you ever been asked during an interview if there is a length() method for arrays?Does the string have a length() method?Does the collection have a length() method?   Faced with this problem, you have to spit out ...

Posted on Sun, 05 Apr 2020 01:43:36 -0400 by Jenk

Brief introduction and application of agency mode

Proxy mode There are two kinds of agent modes: one is static agent, the other is dynamic agent. Because static agent has too many problems and is inconvenient to operate, most of them are dynamic agents now, so what we are talking about today is the basic of dynamic agent Dynamic Proxy: it refers to creating Proxy ob ...

Posted on Sun, 05 Apr 2020 01:06:50 -0400 by stephenalistoun

Joda time in java date calculation

Joda time in java date calculation Joda time provides a set of Java class packages to handle date and time, including the ISO8601 standard. It can be used to completely replace JDK Date and Calendar classes, and still provide good integration.  http://joda-time.sourceforge.net/ Version: joda-time-2.1.jar1. Ti ...

Posted on Sun, 05 Apr 2020 01:05:29 -0400 by Amitk