References in Java and JNI (strong, soft, weak, virtual)

1. Strong References (Objects) Features: Strong references provide direct access to the target object. Will not be recycled. Two, soft reference (SoftReference class) Features: When GC reclaims based on JVM memory, JVM reclaims when it finds it is out of memory Conditions for freeing up space: JVM found insufficient m ...

Added by trygve on Sun, 19 Jul 2020 18:32:41 +0300

Maven Nexus Private Library Setup with idea Development Configuration

1. Set up Nexus private server Environment preparation: OS:        [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) JDK Installation Download address:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html        tar -xzf jdk1.8.0_121.tar.gz mkdir /usr/j ...

Added by alonso on Wed, 15 Jul 2020 19:21:43 +0300

android turns on Https two-way authentication

Last article was written How to turn on https one-way authentication on Android The method of one-way authentication is that the client authenticates the identity of the server.Let's discuss how the server side authenticates the client. Many people on the Internet say that Android only knows about certificates in BKS f ...

Added by hessian on Wed, 15 Jul 2020 18:28:14 +0300

android exceptions collect error information and save it to the crash folder

Save the log file to the sdcard, directory: crash folder under the sdcard root directory First, set permissions, no permissions to the final effect <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>Two classes must be crea ...

Added by r_a_s_robin on Wed, 15 Jul 2020 18:08:46 +0300

Coexistence of Kotlin and Java, calling kotlin code in -Java

Call of kotlin data class Call of object simple profit mode class in Kotlin Calling file class in Kotlin Flexible transfer of parameters by calling jvm annotation String string null call Call of kotlin data class kotlin Code: package com.tianfu.kotlin /** * age Member annotations cannot have get and ...

Added by beezza on Wed, 08 Jul 2020 19:00:57 +0300

100% Perfect Friend Sharing

Step 1: go Federation Official Website Register an account to create an application (the application name matches the project name), a detailed step you can refer to Friends QQ Login Skipping this time, text Import jar package add permission <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-p ...

Added by parag on Fri, 03 Jul 2020 18:09:04 +0300

Analysis on the speed of inserting a large amount of data into MongoDB database

Requirement background: a certain timing task generates thousands or more JSON data. This data has not been fully written into the database, and the data of the next scheduled task has been generated. How to solve the data congestion caused by this? When spring boot is used to insert data into MongoDB database, the save method in MongoTempla ...

Added by ghettopixel on Tue, 30 Jun 2020 19:43:06 +0300

XML Configuration for AOP

Basic usage steps Imagine a scenario where there is a business layer for saving and updating accounts and deleting them, but what do I do when I print logs for saving, updating, and so on? If we add code directly to the business tier, it's equivalent to adding code that doesn't matter.So here you can ...

Added by stevegg1965 on Mon, 29 Jun 2020 19:52:45 +0300

Create a custom thread pool (how to set the maximum number of threads?)

CPU intensive IO intensive 1: CPU intensive: Definition: CPU intensive also refers to calculation intensive. Programs that spend most of their time doing CPU actions such as calculation logic judgment are called CPU intensive tasks. This type of task requires a lot of calculation, which mainly consumes CPU resources. Although this kind of comp ...

Added by Arez on Sun, 28 Jun 2020 09:04:04 +0300

With all due respect, you may not be able to use java Part 7: sorting collections like SQL

Before I start, let me ask you a question: we now have an Employee class. @Data @AllArgsConstructor public class Employee { private Integer id; private Integer age; //Age private String gender; //Gender private String firstName; private String lastName; } Do you know how to sort a List set of Employee objects in reverse or ...

Added by mjh513 on Sun, 28 Jun 2020 03:41:37 +0300