-
mongoimport unable to import $numberLong
A collection with NumberLong type data as follows :
Date: 2019-08-17 View: 1328
-
Linux : How to gzip a folder
On Linux, gzip is unable to compress a folder, it used to compress a single file only. To compress a folder, you should use tar + gzip, which is tar -z.
Date: 2019-08-17 View: 1338
-
Ubuntu : Status 14: The disk contains an unclean file system
Dual boot Windows and Ubuntu, but Ubuntu is unable to access the Windows partition /dev/sdb3, shows the following error message :
Date: 2019-08-17 View: 1845
-
MongoDB : write Aggregation result into a new collection
This article shows you 2 ways to export a MongoDB “aggregation” result into another new collection.
Date: 2019-08-17 View: 1213
-
Find out Tomcat is using which JDK or JAVA_HOME
In this article, we will show you how to find out which JRE / JDK or JAVA_HOME is used by the Tomcat container.
Date: 2019-08-17 View: 1332
-
How to change Tomcat to use JDK 7
The current environment is using Tomcat 7 + JDK 6. How to configure Tomcat to use JDK 7?
Date: 2019-08-17 View: 1214
-
How to change Tomcat manager default path ?
By default, Tomcat’s manager webapp is able to access via yourapp:8080/manager. It is a good practice to change the default /manager to something else, to avoid potential brute force attack.
Date: 2019-08-17 View: 1472
-
Java Read a file from resources folder
In this tutorial, we will show you how to read a file from a resources folder or classpath, in both runtime and unit test environment. Try putting a file into the src/main/resources folder, and read the file with following code snippets :
Date: 2019-08-17 View: 2241
-
jsoup : Send search query to Google
This example shows you how to use jsoup to send a search query to Google.
Date: 2019-08-17 View: 1459
-
Count IP address in Nginx access logs
Recently, many referer spam hit on my server, below is the command I used to find and count the IP Address from a Nginx access log file.
Date: 2019-08-17 View: 1413
-
Nginx : Block User Agent
In Nginx, you can block certain user agents (normally it is crawler) like this :
Date: 2019-08-17 View: 1380
-
Java : Return a random item from a List
Normally, we are using the following ways to generate a random number in Java.
Date: 2019-08-17 View: 1514
-
Nginx + Apache Tomcat configuration example
This tutorial shows you how to configure Nginx as a reverse proxy to redirect the traffics from port 80 to Apache Tomcat on port 8080.
Date: 2019-08-17 View: 4422
-
Nginx : Block Referrer Spam
In this article, we will show you how to block referrer spam in one of our Nginx web server.
Date: 2019-08-17 View: 6556
-
Maven Exclude logback.xml in Jar file
This example shows you how to use Maven to exclude the logback.xml file from the final Jar file.
Date: 2019-08-17 View: 2732