Spring data paging

To implement paging function in spring data, we need to implement PagingAndSortingRepository, which provides paging query method Page<T> findAll(Pageable pageable); //Paging query (including sorting function) @Test public void Pagination() { int pageIndex = 1;// Current page from front desk int pageSize = 5; ...

Posted on Tue, 17 Dec 2019 12:18:30 -0800 by freaka

Python learning: Collections

Set Collection creation There is only one way to create a collection Elements in a collection must be immutable data types The collection is unordered and can be traversed by a for loop or filtered by an iterator   1 s=set('xiaoming') 2 s1=['alex','mike','alex','mary'] 3 s2=set(s1) 4 print(s) 5 print(s2) 6 >>>{'a','g','m','x' ...

Posted on Tue, 17 Dec 2019 11:23:14 -0800 by pnoeric

squid proxy - traditional proxy, transparent proxy

Cache agent overview Working mechanism of web agent: Cache web page objects and reduce repeated requests Basic types of agents Traditional agent: applicable to the Internet, the server should be specified clearly Transparent proxy: the client does not need to specify the address and port of the proxy server. The firewall redirects the web to ...

Posted on Tue, 17 Dec 2019 10:39:15 -0800 by Danestar

Hibernate many to many Association

Then continue to learn the above Association. Many to many association in the database logic needs to establish an intermediate table, which stores the foreign keys of the other two tables. Here we use the User table and the Goods table, and the middle table is collaborations. The User table field is username password The go ...

Posted on Tue, 17 Dec 2019 08:43:23 -0800 by PerfecTiion

1. Evolution history of JavaScript modularization

Modular evolution history Global function mode Global function mode: encapsulate different functions into different global functionsProblem: Global is polluted, which is easy to cause naming conflicts // module1.js //data let data = 'atguigu.com' //Functions that manipulate data function foo() { conso ...

Posted on Tue, 17 Dec 2019 08:41:30 -0800 by camdes

Many fish in 21 days

A cow has a fish tank. There are already n fish in the fish tank. The size of each fish is fishSize[i] (1 ≤ I ≤ n, all positive integers). Niu Niu now wants to put the newly caught fish into the fish tank. There is a law that big fish eat small fish in the fish tank. After observation, cattle and cattle found that the siz ...

Posted on Tue, 17 Dec 2019 08:35:34 -0800 by Tchelo

Construction of spring boot debugging environment for dubbo series (1)

preface This is the first part of dubbo series. Before we officially explain the source code of dubbo, we need to build a set of dubbo samples for us to read the source code and understand the core functions of dubbo. This article is based on springboot, and other configurations through xml are too cumbersome. Version Descri ...

Posted on Tue, 17 Dec 2019 08:06:54 -0800 by everlifefree

In Centos 7, firewall configures port rules

Note: the firewalld service has two rule policy configuration records. When configuring permanently effective policy records, you need to execute the "reload" parameter before they take effect immediately: Permanent: permanent RunTime: currently in effect   1. View the current area   [root@ecs-7bec-0002 bin]# chkconfig iptables off ...

Posted on Tue, 17 Dec 2019 08:00:50 -0800 by hendoyeah

Simple implementation of Java blocking queue

Source: https://blog.biezhi.me/2019/01/simple-blocking-queue.html One of the common components of Java concurrency is called blocking queue. When the queue is empty, the thread that gets the element will block and wait until there is data in the queue. When the queue is full, the thread that wants to store the element will block and wait until ...

Posted on Tue, 17 Dec 2019 07:55:29 -0800 by jmakeig

java database programming (3) creating tables and adding data to tables

Let's talk about what mysql.ini is, which is to load some key value pairs for Properties. The specific operation is to create a new text document, as followsNote that the password should be changed to the password of your database, then change the suffix of the text document to ini, and then drag it to the project folder. The ...

Posted on Tue, 17 Dec 2019 06:57:22 -0800 by robmarston