Introduction to JAVA 8 (II) Stream

1. Simple use Last time, we talked about the new API stream of JAVA 8. If we have such a need, we need to pick out the name of the top three calorie dishes with less than 1000 calories in the recipe. If we use the traditional way of writing JAVA 7, we should write as follows: public List<String> findDish(List<Dish> menu){ ...

Added by somedude on Wed, 05 Jun 2019 23:36:13 +0300

Java Paging Query--Paging Display

When there are too many data bars in the database, a page can not be displayed. This is to set up paging query. The first thing to use is the limit condition of database sql statement to realize grouping query.The sql statement is roughly in the form of: select * from table limit to start the index, showing the number of barsWith this statement ...

Added by brandon on Tue, 04 Jun 2019 21:40:26 +0300

Row-column conversion using PIVOT and UNPIVOT

In database development, we often encounter row and column to row situations, there are many ways to achieve this function, such as using CASE...WHEN..., DECODE, or PIVOT and UNPIVOT. This article explains the use of PIVOT and UNPIVOT, and hope that readers can learn the use of row to column conversion. PIVOT Syntax SELECT ...    FROM .. ...

Added by scuff on Tue, 04 Jun 2019 03:25:00 +0300

Use and Operation of Database Connection Pool (DBCP)

Use and Operation of Database Connection Pool (DBCP) When using SQL statements to operate databases in java, it is often necessary to load the driver first, establish a connection, and then execute some SQL after successful connection. After executing SQL, it is necessary to consider whether to close the connection. When there is another SQL ...

Added by FredFredrickson2 on Mon, 03 Jun 2019 23:37:41 +0300

MySQL. Feature Analysis. Who Executed FTWL

What is FTWL FTWRL is short for FLUSH TABLES WITH READ LOCK (FTWRL). This command is mainly used to ensure backup consistency. In order to achieve this goal, it needs to close all table objects, so this command is very lethal and easy to cause hang when executing the command. If it is executed in the main library, the business cannot access it ...

Added by raouleduke on Sun, 02 Jun 2019 01:47:07 +0300

mysql row-to-column conversion

mysql row-column conversion is very frequently used in projects, especially in some financial projects. Among them, the most headache is multi-row to multi-column, dynamic row to row conversion. Recent studies of these row-to-column transformations have begun with the simplest row-to-column transformations. sql script -- Create table studen ...

Added by endlyss on Fri, 31 May 2019 22:19:17 +0300

Spark MLlib Data Preprocessing-Feature Transform

Tokenizer (Word segmentation device Introduction to the algorithm: Tokenization divides text into separate individuals (usually words). RegexTokenizer provides more partitioning options based on regular expressions. By default, the parameter "pattern" is a delimiter for dividing text. Or you can specify the parameter "g ...

Added by axm on Fri, 31 May 2019 21:05:00 +0300

Summary of the use of SQLite in Android database

Preface In Android development process, for data storage, we will more or less use database-related operations, so in this little summary, Android using SQLite database skills and methods, is their own review of database knowledge. Project source code This blog is published synchronously XueLong's blog crud Operating SQLite in adb shell ...

Added by nelson201 on Thu, 30 May 2019 22:48:53 +0300

spring data jpa use (1)

spring data jpa A subproject of Spring. Used to simplify database access, support NoSQL and relational data storage. Its main goal is to make database access convenient and fast. Dedicated to reducing the amount of data access layer (DAO) development. The only thing developers need to do is declare the persistence layer interface, and the re ...

Added by kristy7 on Wed, 29 May 2019 22:38:51 +0300

Java implements simple BaseDao with custom annotations and Reflections

In common ORM frameworks, annotations are mostly used to map entity to database. Here, we simply use custom annotations and reflections to generate executable sql statements. This is the overall directory structure, which was originally established for reviewing annotations.^ Okay, let's first determine the idea. 1. Customize the @Table@Column ...

Added by hucklebezzer on Wed, 29 May 2019 20:40:50 +0300