Merge sort algorithm implemented in Java

The following is a merge sort algorithm implemented in Java, referencing Algorithms Unlocked by Thomas H. Cormen I read some blogs from other CSDN bloggers, and I think some details can be optimized, such as avoiding overflow due to too long array length, and using mid = low + (high - low) / 2 for mid For example, instead of creating a (high ...

Posted by Loran on Fri, 10 Jul 2020 08:37:44 -0700

Installation and Startup of Elasticsearch under UBUNTU

1. Installation 1. Add ppa source sudo add-apt-repository ppa:openjdk-r/ppa 2. Upgrade system apt-get source sudo apt-get update 3. Install jdk8 Elasticsearch was developed in practical java, so JVM is required to run, so we need to install jdk sudo apt-get install oracle-java8-installer 4. Check jdk Execute the follow ...

Posted by KenGR on Thu, 09 Jul 2020 08:06:18 -0700

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 ...

Posted by denoteone on Wed, 08 Jul 2020 09:03:14 -0700

Access other nodes through a jumper using the JSCH framework

A set of code for remotely accessing ssh has been developed. Recently, there is a need for a jumper to access the target service.After searching the web for half a day, I didn't find a good example, so I browsed the API of JSCH myself.But look in the clouds.Imagine if port forwarding works by mapping the target node ip:port to localhost:port an ...

Posted by Spoiler on Sun, 05 Jul 2020 08:04:33 -0700

Principle and java implementation of inserting red and black trees

A red-black tree is a binary balanced lookup tree in which each node has a storage bit to represent the color of the node, either RED or BLACK.Red-black trees have the following properties: (1) Each node is red or black (2) The root node is black (3) If a node is red, both of its sons are black (4) For each node, all paths from that node to its ...

Posted by Tiigeress on Sun, 05 Jul 2020 07:56:59 -0700

Select a Map Collection to save the number (key) and name (value) of students with numbers from 1 to 15

Select a Map collection to hold the number (key) and name (value) of students with numbers from 1 to 15.*Student numbers are represented as strings and entered in a random order in the Map collection.* The elements in the Map collection are then printed in order of the number from largest to smallest.*You need to customize the Comparator of the ...

Posted by joebWI on Fri, 03 Jul 2020 09:25:27 -0700

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 ...

Posted by loki1664 on Fri, 03 Jul 2020 08:12:09 -0700

jquery, js knowledge

jquery selector Jquery selector requires two backslashes to escape special characters when fetching elements For example: var orgName=$("#whir$t3198_f4972").val(); A minor question: <div style="WIDTH: 100%" id="whir$t3198-whir$t3198_f4972"> <div class="cls-ui cls-ui-ui207 cls-ui-readonly cls-ui-1003131 ...

Posted by r3dn3ck on Thu, 02 Jul 2020 07:43:25 -0700

Pure html cross-domain access to java interfaces

What is cross-domain? Cross-domain means that html access addresses and interface addresses are in different domains. As long as one of the domain names, protocols, and ports is satisfied, cross-domain means cross-domain. Why not cross-domain? Because of security issues, such as when a user visits a bank website, ...

Posted by cshinteractive on Thu, 02 Jul 2020 07:35:54 -0700

Separation of dynamic and static state by Nginx+Tomcat

Add group groupadd www Add user WWW: useradd - G www under www group Modify configuration file nginx.conf : user www www; worker_processes 2; events{ worker_connections 1024; } http{ #Set the default type to binary stream default_type application/octet-stream; server_names_hash_bucket_size 128; #Specify the hea ...

Posted by ftrudeau on Wed, 01 Jul 2020 08:01:07 -0700