IDEA change new project maven home directory

The default home directory of the Maven project in IDEA is Bundled(Maven 2) or Bundled(Maven 3). I am used to using my own Maven home directory. So, every time I create a new project, I will change this default Maven home directory. It is too much trouble. After reviewing the official documentation, I learned that the default new project settings can be changed.

git bisect example

Before starting to learn this command, we need to initialize a git directory. The following script can help us initialize a git repository with 20 commits

Maven change mirror repositories

If you want download artifacts faster you need to configure maven setting.xml file.

Enable PostgreSQL remote access

Following these steps to enable PostgreSQL remote access.

Config PostgreSQL in CentOS7

It is no way to use service postgresql-9.4 initdb init PostgreSQL in CentOS7. I use following commends.

PostgreSQL dump and restore database

It is easy to dump database by using pg_dump commend.

Red packet algorithm

This is an interview question. Not fully understood yet. ;(

guava BloomFilter example

The biggest advantage of the Bloom filter is that his space usage is very high. His disadvantage is that there may be misjudgments. Bloom filters return two values: elements may exist and elements definitely do not exist.

redis benchmark

Benchmarking Redis is very easy. After completing the redis installation, there is a command tool in his directory to perform benchmark tests. Here is a simple example.

Understanding Java references

There are four different types of references in Java.

guava read resources file

It is very simple to read files using the tool classes in guava. Here is the example.

git quick clone

It takes long time to clone a particularly large git repository. Use the following command to help you quickly clone a git repository.

yum install nginx

There are several ways to install nginx in CentOS. I recommend you install it by yum command. Quick and safe.

CentOS7 virtualBox install guest additions

In order to use share folder you have to install guest additions in VirtualBox. In this page I will show you how to install it. Click devices -> Install Guest Additions... and wait a minute. Open terminal in CentOS7. Before installing it you need make sure your environment is OK.

CentOS config double network adapter

When you install CentOS in virtual machine you need to config double network adapters. One is for connecting internet another is for ssh. For more detail you can click VirtualBox CentOS static ip address.