android -------- ConstraintLayout Guideline and Barrier (IV)

Previous articles Introduction to ConstraintLayout (1) ConstraintLayout constraint attribute (2) ConstraintLayout aspect ratio and offset ratio (3) This post mainly explains: Guideline and Barrier Guide line (understand, I don't use much in actual use) When you need an anchor at any position, you can use the guide line to help you locate ...

Posted on Tue, 17 Dec 2019 13:33:29 -0800 by viv

python script monitor - using python language to monitor the execution of python scripts (logging)

Requirement: the existing crawler (named CNSubAllInd) needs to be kept running in the background all the time (if the execution is finished, restart it immediately, and continue to execute), and record its running log. The logging module of python is used to record the log, and the subprocess module is used to execute the command interactively ...

Posted on Tue, 17 Dec 2019 13:15:12 -0800 by jdaura

Spring uses RedisTemplate to store key value in disorder

Recently, when learning the integration of SpringBoot and Redis, I found a problem: the key values stored through RedisTemplate are all hexadecimal random codes: 127.0.0.1:6379> keys * 1) "\xac\xed\x00\x05t\x00\x04name" Find two solutions by consulting the data.   (1) use StringRedisTemplate to replace RedisTemplate, which is a more el ...

Posted on Tue, 17 Dec 2019 13:06:47 -0800 by microthick

SPI of Dubbo source code analysis

I. overview This article introduces adaptive extension, the implementation of getadaptive extension(). Many functions of the ExtensionLoader class itself also use adaptive extensions. Includes the ExtensionFactory extension. Generally speaking, the logic of adaptive extension is: when calling the method of extension point, automatically judge ...

Posted on Tue, 17 Dec 2019 12:46:03 -0800 by feddie1984

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