Let's say you have a project and there are some module in it. If you want change the version of this project you can find all version number in global search and replace with new version or use following command.
I install Node.js and npm in my virtual machine which OS is CentOS. I following official website here to start my first Angular app. After execute ng new my-app init the project I execute ng serve --open to start the app. The log is here.
Download Node.js Linux Binaries (x86/x64) from here. I use wget to download it.
When I use rm *.log -rf to delete the files I got the following error message.
Use following command to add user name and email.
The default output of git is without color. Add following config in ~/.gitconfig can enable the git color output in your terminal. If there is not .gitconfig file create one.
Collectors.partitioningBy is used to divide stream into two map. The key of two group are true and false. Two list of values are collections of elements that satisfy the condition. The example code is here.
curl is a good tool to help you make a request. Before introducing how to use it we need to start a server which receives the requests. I use Spring Boot as a simple server. The code is like following.
When we want to group the list data, we have to write some tedious code in the old version of the JDK. For example we want to group list of people by age. The code is like this before JDK8.
Here is my own common vim configuration. Disable syntax and enable spell check in markdown file.
Add following function in your ~/.bashrc file then you can use one command to commit changes and push them to remote.
reduce method of stream is used to calculate elements in the stream and get the result. For example, we can use reduce to get the sum of Integer list. It can also help you to get the min or max number of Integer list.
map method is used to handle the element of stream and output the stream. flatMap method is used to handle multiple stream and output new stream. Here is some easy examples.
When I run mvn clean install -DskipTests to build my project I got an error message. The content of message is like following.
Nginx will add Content-Type depend on suffix of url in response header. The suffix and Content-Type mapping are in /etc/nginx/mime.types. There are two ways to change Content-Type in Nginx.