ubuntu agent configuration

set DNS sudo su echo "nameserver 172.26.61.250" > /etc/resolvconf/resolv.conf.d/base echo "nameserver 172.26.61.249" >> /etc/resolvconf/resolv.conf.d/base echo "nameserver 172.26.61.250" > /etc/resolv.conf echo "nameserver 172.26.61.249" >> /etc/resolv.conf Setting agent #Current user agent cat <&l ...

Posted on Wed, 22 Jan 2020 11:40:46 -0500 by ScoTi

Decoding Base64 data in Java

I have a Base64 encoded image. What is the best way to decode in Java? You want to use only the libraries that come with Sun Java 6. #1 building Another late answer, but my benchmark shows, Jetty's Base64 Encoder Realization Very fast. Inferior to MiGBase64 Fast but comparable iHarder Base64 Hurry up. import org.eclipse.jetty.util.B64C ...

Posted on Wed, 22 Jan 2020 10:20:08 -0500 by atoboldon

Spring unified resource loading strategy

1. Subclass structure of uniform resource interface WritableResource: writable resource interface ByteArrayResource: binary array resource ClassPathResource: the resource under the classpath. The resource is represented in the form of relative path FileSystemResource: file system resource. Resou ...

Posted on Mon, 20 Jan 2020 06:39:57 -0500 by Heywood

java connection to MQTT server

1, Business scenario The data collected by hardware is transferred to EMQX platform (using MQTT protocol), and java connects to MQTT server through code to receive, analyze, process, store and display the collected data. MQTT is based on publish / subscribe mode for communication and data exchange. ...

Posted on Mon, 13 Jan 2020 11:48:59 -0500 by millsy007

Alibaba cloud IOT platform device historical attribute reporting and MNS server subscription

Summary Alibaba cloud's Internet of things platform not only supports the reporting of real-time attributes of devices, but also supports the reporting of attribute data that is not reported in time for some reasons by the way of historical attribute reporting. Historical attribute reporting is Topic: / sys/{productKey}/{deviceName}/thing/e ...

Posted on Tue, 07 Jan 2020 09:20:08 -0500 by BandonRandon

Java implementation of Git pull package maven package project

In the development process, Java pulls the code java code of the specified branch of the specified code base, and then maven packages and uploads the packaged jar to the file server. The solution is divided into three steps: 1. Download code file from Git warehouse 2. Package and download the code file with maven 3. upload jar Solution: 1 ...

Posted on Sun, 05 Jan 2020 08:21:38 -0500 by SulleyMonstersInc

Virtual machine performance monitoring and fault memory allocation strategy

jdk command line tools jps virtual machine process status tool The most frequently used is that jps jps can query the remote virtual process status of the RMI service through the RMI protocol jstat virtual machine statistics monitoring tool Command line tool for monitoring various status information of virtual machine, wh ...

Posted on Sun, 05 Jan 2020 05:08:30 -0500 by Kodak07

What is stack trace and how to use it to debug application errors?

Sometimes, when I run my application, it gives me an error that looks like: Exception in thread "main" java.lang.NullPointerException at com.example.myproject.Book.getTitle(Book.java:16) at com.example.myproject.Author.getBookTitles(Author.java:25) at com.example.myproject.Bootstrap.main(Bootstrap.java:14) People c ...

Posted on Tue, 31 Dec 2019 07:55:23 -0500 by *mt

Using JDK to develop WebServrice case

Use JDK to develop WebServrice case: 1, Develop WebService server Step 1: create a Java project, create a corresponding package (server side) and use JDK for development (version 1.6 and above) Step 2: create an interface WebServiceI, and create the method: package com.liuyongqi.WebService.service; import javax.jws.WebMethod; impo ...

Posted on Sat, 28 Dec 2019 12:16:39 -0500 by Beauchy

Include all jar s in the directory of the Java class path

Is there a way to include all jar files in the directory of the class path? I'm trying java-classpath lib/*.jar:. my.package.Program java-classpath lib/*.jar:. my.package.Program and it can't find the class files that must exist in these jars.Do I need to add each jar file to the class path separately? #1st floor It works under Window ...

Posted on Sat, 14 Dec 2019 03:57:58 -0500 by caine