LeetCode Algorithmic Question - Average of Levels in Binary Tree (Java Implementation)

This is the 277th update of Yueyue Book, 293 original works. 01 Look at the topic and prepare Today, we introduce LeetCode algorithm question 145 at the Easy level (rank 637). Given a non-empty binary tree, the average value of the sum of node values at each level is returned as an array. For example: 3 / \ 9 20 / \ ...

Posted by goldlikesnow on Thu, 14 Mar 2019 22:18:26 -0700

Install JDK and Tomcat under CentOS 64-bit and set up Tomcat boot-up operation steps

The preparatory documents are as follows: 1.CentOS-6.4-x86_64-bin-DVD1.iso 2.jdk-7u67-linux-x64.rpm 3.apache-tomcat-7.0.55.tar.gz The installation steps are as follows: Installation of JDK [root@n1 /]# java -version bash: java: command not found [root@n1 /]# rpm -ivh /soft/jdk-7u67-linux-x64.rpm Preparing... ############# ...

Posted by andylyon87 on Thu, 14 Feb 2019 09:42:18 -0800

centos activemq cluster configuration Networks of Brokers

1. Installing JDK Running Environment #cd /opt  #wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz  #tar zxvf jdk-8u112-linux-x64.tar.gz  #Vi/etc/pro ...

Posted by Jurik on Wed, 13 Feb 2019 06:09:20 -0800

File Transfer between Local windows Machine and Remote Linux Server -- Xshell uploads and downloads files using sftp

1. Log on to a remote Linux server: [c:\~]$ sftp root@192.168.233.136 1.1. Enter for certification: 1.2. The login was successful: Upload files to server: 2.1 Upload Operation Drag and drop the file to the current window. Another way - using commands: sftp:/root> lcd E:\Installation package\linux l ...

Posted by growler123 on Wed, 06 Feb 2019 19:21:17 -0800

CentOS 7.4 a start job is running for wait for Plymouth boot solution

Yesterday, I ran yum update on the system. There were many updates. So I clicked Y as before, and the system was updated slowly. After the updates were restarted, it was tragic that the desktop could not come out. I could not download the latest NVIDIA driver installation and report all kinds of errors. So I went to the ...

Posted by carlg on Wed, 06 Feb 2019 17:51:16 -0800

[Re-learning Java Foundation] [JavaIO Stream] [Part.6-2] Stream Decoder and Stream Encoder

[Re-learning Java Foundation] [JavaIO Stream] [Part.6-2] Stream Decoder and Stream Encoder StreamDecoder Summary This class is under the sun.nio package In the previous Oracle official JDK, you can only download OpenJDK to see the source code. Or check it online at grepcode openJDK Online Source But since Java 9, O ...

Posted by JBS103 on Wed, 06 Feb 2019 11:03:17 -0800

net.sf.json.JSONObject maven dependency

The last line needs to be retained. There are two JDK versions: json-lib-2.1-jdk13.jar and json-lib-2.1-jdk15.jar. <dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version> <classif ...

Posted by neodaemon on Wed, 06 Feb 2019 04:09:18 -0800

Java concurrent operation list collection causes java. util. Concurrent ModificationException to use iterators

Requirement: I have a collection, as follows, I want to determine whether there is a "world" element in it, if there is, I add a "javaee" element, please write code implementation. The code is as follows: public class Test {           public static void main(String[] args) {               List&l ...

Posted by Peter on Wed, 06 Feb 2019 01:51:16 -0800

One minute package management tool, take installing jdk as an example (centos, ubuntu, alpine, python pip, node)

One sentence to explain what package management tools are It's Android's app store. Each major distribution of linux comes with its own package management tools. Now take installing jdk as an example to illustrate their command-line usage. ubuntu 14.04 (dibian system) root@552b680ba26a:/# apt update ...

Posted by solee on Sun, 03 Feb 2019 19:09:16 -0800

JAVA Read and Write EXCEL

This article mainly shows you how to use JavaExcel API to read and write Excel files. With regard to the JavaExcel API, this is an open source lib library. The related feature s are as follows: Supports Excel 95, 97, 2000, XP, 2003 tabulation pages.Can read and write related Excel formulas (only support Excel 97 and later versions)Excel 2000 fo ...

Posted by Whitestripes9805 on Sun, 03 Feb 2019 16:21:16 -0800