Category Archives: Internet Technology

What does /bin/sh -c do in Linux

To solve the problem of command permission, you can expand the scope of permission. Next, we will introduce it to you with an example. For example, there is a root file (admin.log) in the current directory, and we want to … Continue reading

Posted in Internet Technology, System | Tagged , , | Comments Off on What does /bin/sh -c do in Linux

Batch change file extension in Linux

In the daily development process, we sometimes need to do some batch operations, as described in the previous article. Today, we will share how to use Linux commands to change file extensions in batches. First, we create files with txt … Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on Batch change file extension in Linux

java tutorial: java uppercase first letter

In the following example, two ways to change the first letter to uppercase will be shared. Example 1 * Use ASCII table * The ASCII code of lowercase letters a-z is: 97-122; Example 2 * Use string substring function and … Continue reading

Posted in Internet Technology | Tagged | Comments Off on java tutorial: java uppercase first letter

SpringBoot 2.* security turn off login authentication

SpringBoot 2.* security turn off login authentication, use java annotations on the startup method. Continue reading

Posted in Internet Technology | Tagged , | Comments Off on SpringBoot 2.* security turn off login authentication

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Initialize the SpringBoot application and run the following error: Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured. Obviously, the application does not configure some related properties of datasource, such as database … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Nginx combined log format and parameter explanation

Because lnmp does not customize the log format by default, it uses the combined default format: Parameter explanation: $remote_addr, $http_x_forwarded_for record the client IP address. $remote_user records the client user name. $request records the requested URL and HTTP protocol. $status … Continue reading

Posted in Internet Technology | Tagged , | Comments Off on Nginx combined log format and parameter explanation

java tutorial: java enum in switch case

Java enum in switch case : 1. Returns the enum constant of the specified enum type with the specified name. 2. The case label is an enum constant. Continue reading

Posted in Internet Technology | Tagged , , , | Comments Off on java tutorial: java enum in switch case

java tutorial: java get timestamp milliseconds

Java get timestamp milliseconds : 1.System.currentTimeMillis(); 2.Calendar.getInstance().getTimeInMillis(); 3.new Date().getTime(); Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on java tutorial: java get timestamp milliseconds

Use FileWriter class to write files in Java

The FileWriter class extends from the OutputStreamWriter class. This class writes data to the stream character by character. You can create the required objects through the following construction methods. Constructs a FileWriter object given a file name. Constructs a FileWriter … Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on Use FileWriter class to write files in Java

java tutorial: Java enum check if value exists

Java enum check if value exists: 1. Enum class provides inspection methods 2. Check with for loop 3.Use stream iterators 4.Use a tool class similar to Apache EnumUtils Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on java tutorial: Java enum check if value exists

How to display full path/absolute path with ls command

linux ls full path, you can use the ls -d option combined with the environment variable $PWD. syntax: ls -d $PWD/* Continue reading

Posted in Internet Technology | Tagged , , | 1 Comment

MySQL tutorial: use variables to generate row numbers for each row

Mysql row number – we can implement it through variables. mysql> set @id = 0;mysql> select @id := @id + 1 as id … Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on MySQL tutorial: use variables to generate row numbers for each row

MySQL tutorial: column to row use group by and group_concat function

Mysql column to row – use group by the data set, and then associate the column data through the group_concat function. Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on MySQL tutorial: column to row use group by and group_concat function

java tutorial: Java Generic

Java generics, in a nutshell, generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods. Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on java tutorial: Java Generic

java tutorial: 5 ways to create stream in java 8

A java stream is a sequence of objects, which can be arranged, filtered, and transformed through a pipeline to produce the desired result. Continue reading

Posted in Internet Technology | Tagged , , | Comments Off on java tutorial: 5 ways to create stream in java 8