After using the cache object ConcurrentLruCache, the key value cannot be hit, resulting in the failure to improve the system performance

1. Problem Description: Concurrent lrucache is used as the JVM cache pool object public class UserManager { private ConcurrentLruCache<UserCacheKey, UserInfo> cache = new ConcurrentLruCache<UserCacheKey, UserInfo>(100, new Function<UserCacheKey, UserInfo>() { @Override public UserInfo apply(UserCacheK ...

Posted by lisa3711 on Thu, 04 Nov 2021 22:15:27 -0700

Image processing: basic operation of image

1. IO operation of image Here we will introduce how to read images, how to display images and how to save images. 1.1 reading images API: cv.imread() Parameters: Image to readFlag of reading mode cv.IMREAD_COLOR: when loading an image in color mode, the transparency of any image will be ignored. This is the default parameter.cv.IMR ...

Posted by djbuddhi on Thu, 04 Nov 2021 22:05:43 -0700

lua and Openresty, multi-level cache

1.nginx optimization A simple nginx configuration file: user nginx; #user worker_processes auto;#auto is recommended for the number of processes, and the number of cpu cores that automatically go to the server error_log /var/log/nginx/error.log error; pid /var/run/nginx.pid; worker_rlimit_nofile 204800; events { use epoll;#Use the most eff ...

Posted by carichod on Thu, 04 Nov 2021 21:53:02 -0700

Docker deployment of docker

I. Docker version selection         Docker did not distinguish between versions before, but it launched (renamed docker) a new project Moby, GitHub in early 2017. Address: https://github.com/moby/moby , Moby project is a new upstream docker of docker project. Docker will be a sub product of Moby, and later versions will be ...

Posted by webdzine on Thu, 04 Nov 2021 21:45:34 -0700

Django module learning - module language

Django module engine supports Django module language (DTL). DTL contains syntax such as variables, comments, filters, tags, module inheritance and HTML escape. This paper introduces the following six module languages 1. Variable 2. Notes 3. Filter 4. Labels: include 5. Label: for 6. Label: in 1. Variable DTL represents variables in ...

Posted by jtp51 on Thu, 04 Nov 2021 21:16:04 -0700

String matching in algorithm

28 implementation str () Determines whether a string is a substring of another string and returns its position. Enter a parent string and a substring, and output an integer indicating the position of the substring in the parent string. If it does not exist, return - 1. Input: haystack = "hello", need = "ll" Output: 2 ...

Posted by jlpulido on Thu, 04 Nov 2021 21:04:14 -0700

Cost flow duality

Some pre cheese you may need: Linear programming problem linear programming problem is the following problem: There are \ (n \) non negative variables \ (x \) and \ (m \) constraints, such as: \[\sum_j a_{i,j}x_j\leq b_i \]It is required to maximize the value of \ (\ sum_i c_ix_i \), as follows: \[\max c^{\mathsf T} x\\ s.t.\\ Ax\leq b\\ x\geq ...

Posted by BZorch on Thu, 04 Nov 2021 20:52:28 -0700

A complete understanding of Linux interrupt processing

What is an interruptInterrupt is a mechanism to notify the CPU after the external device completes some work (for example, after the hard disk completes the read-write operation, it informs the CPU that it has completed through interrupt). In the early days, computers without interrupt mechanism had to query the status of external devices throu ...

Posted by darcuss on Thu, 04 Nov 2021 20:00:38 -0700

EasyExcel third bullet + hutool POI are used together to export more complex Excel.xlsx + to calculate growth rate, year-on-year month on month ratio, proportion, etc

1, Review Following the last "dynamic header easyExcel import and export"( https://blog.csdn.net/qq_37337660/article/details/114680512)", And the last dynamic header import( https://blog.csdn.net/qq_37337660/article/details/110288393 )”After that. We have a third wave easyExcel Torture, this time export complex Excel, by the w ...

Posted by Rithiur on Thu, 04 Nov 2021 19:59:56 -0700

Vue3.x quickly get started with the main functions of Vue3.x

Create Vue3.x framework Demo <script src="https://unpkg.com/vue@next"></script> <body> <div id="app"> {{title}} </div> <script> const {createApp} = Vue const app= createApp({ data(){ return { title:123 } } }) let vm = app.mount('#app') </sc ...

Posted by Twister1004 on Thu, 04 Nov 2021 19:35:14 -0700