-
Python How to check if a file exists
In Python, we can use os.path.isfile() or pathlib.Path.is_file() (Python 3.4) to check if a file exists.
Date: 2019-08-11 View: 2152
-
Python Check if a String contains another String?
In Python, we can use in operator or str.find() to check if a String contains another String.
Date: 2019-08-11 View: 1860
-
Python Count the number of items in a list
In Python, we can use len() to count the number of items in a List
Date: 2019-08-11 View: 1913
-
Java How to join List String with commas
In Java, we can use String.join(",", list) to join a List String with commas.
Date: 2019-08-11 View: 1909
-
Maven List all the projects plugins
In Maven, you can use mvn help:effective-pom to list all the current project’s plugins and its version.
Date: 2019-08-11 View: 1914
-
Java How to convert Bytes to Hex
In Java, you can use String.format("%02x", bytes) to convert bytes to hex easily.
Date: 2019-08-11 View: 2371
-
Java List of available MessageDigest Algorithms
In Java, you can use the Security.getAlgorithms("MessageDigest") to list all the available MessageDigest algorithms.
Date: 2019-08-11 View: 1615
-
Java Find the length of BigInteger?
In Java, we can convert the BigInteger to a String object and get the length of the String.
Date: 2019-08-11 View: 1883
-
mvn site : java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent
Generating a Maven report with mvn site, but hits the following errors
Date: 2019-08-11 View: 2752
-
Maven SpotBugs example
In this article, we will show you how to use SpotBugs Maven Plugin to find bugs in Java code.
Date: 2019-08-11 View: 2866
-
Java Global variable examples
In Java, there is no global keyword, but we can use public static variable to referring a global variable.
Date: 2019-08-11 View: 1838
-
Maven PMD example
In this article, we will show you how to use Maven PMD Plugin to analyze the Java code.
Date: 2019-08-11 View: 1888
-
Maven How to force re-download project dependencies?
In Maven, you can use Apache Maven Dependency Plugin, goal dependency:purge-local-repository to remove the project dependencies from the local repository, and re-download it again.
Date: 2019-08-11 View: 2228
-
Java JMH Benchmark Tutorial
In Java, we can use JMH (Java Microbenchmark Harness) framework to measure the performance of a function.
Date: 2019-08-11 View: 2067
-
JMH Java Forward loop vs Reverse loop
A JMH benchmark test about Forward loop vs Reverse loop for a List. There is a myth about reverse loop is faster, is this true?
Date: 2019-08-11 View: 1689


