Correct use of thread pool in Java

In the Java development manual recently released by Alibaba, it is not allowed to use Executors to create thread pools. Instead, it uses ThreadPoolExecutor to make the students more clear about the running rules of thread pools and avoid the risk of resource exhaustion Executors use factory mode to provide us with four thread pool implementatio ...

Posted on Sun, 05 Apr 2020 07:01:44 -0400 by jraede

node operation mongodb database

install cnpm install mongodb Create database //create object var MongoClient = require('mongodb').MongoClient; //Configure url and port var url = "mongodb://localhost:27017/runoob"; //link MongoClient.connect(url, function(err, db) { if (err) throw err; console.log("Database created!"); db.close(); ...

Posted on Sun, 05 Apr 2020 01:36:45 -0400 by nyi8083

An example of Python Golang parsing web log regularity

Some log files need to be parsed. What python does now is to see the performance of golang. Because it's not so familiar with golang, it doesn't do any optimization. Compare the code and performance of regular extraction of the two languages. Just for reference and thinking Environmental Science macos 11.13.x 15 ...

Posted on Sat, 04 Apr 2020 18:01:07 -0400 by sam2004

k8s deployment lancher dashboardsh

Lazy people don't talk much Lancher official website is too targeted. Basically, it is k8s cluster that requires rke to deploy. Admitting that lancher dashboard is not bad, it can improve development efficiency. But rke is shit, rke is shit, rke is shit, and important things are said three times The scheme of deploying ha with helm has been t ...

Posted on Fri, 03 Apr 2020 16:12:34 -0400 by swebajen

Nange takes you to learn the separation of HTML CSS from document flow, positioning, transition and 2D deformation

Break away from document flow Document flow: 1. Left to right, top to top layout. 2. A layout that conforms to the meaning of the tag itself in html, for example, some tags have only one row. Some tags belong to inline elements, etc. Detach from document flow: Let the elements fly in the document stream, no longer ...

Posted on Fri, 03 Apr 2020 11:04:51 -0400 by Assorro

Let blog Park automatically generate directories and return to the top

If there is a directory for a blog post, it will be convenient not only for yourself but also for readers. Here are my blog settings. Automatically generate catalog effects Back to the top Set build directory and return to top method You need to have Js permission first, and then copy the code. It's very simple (1) Footer html code ...

Posted on Fri, 03 Apr 2020 10:48:16 -0400 by everlifefree

onActivityResult in Android Fragment is not called to solve

 Original address onActivityResult in Fragment is not called. There are several situations, please check one by one.   1. Check whether the onActivityResult method is overridden in the Activity to which the Fragment belongs. If this is the case, make sure that super.onActivityResult is written: onActivityResult of MainActivity ...

Posted on Fri, 03 Apr 2020 06:01:58 -0400 by gloveny

The application of the project using jspm to deploy ES6

Project initialization Execute in project directory, $npm init -y initialization Install jspm dependency: $sudo yarn add jspm --dev jspm initialization operation: $. / node_modules/.bin/jspm init one way return, select and enter Babel MacBook-Pro:20 Johnny$ ./node_modules/.bin/jspm init Would you like jspm to prefix the js ...

Posted on Thu, 02 Apr 2020 13:34:00 -0400 by zoooj

Python learning notes (11) Python statements (2)

For loop statement Basic knowledge The for loop can traverse any sequence of items, such as a list or a string. Syntax: for loop rule:   do sth 1 >>> for i in "python" : #i is used to traverse every character of the string 2 ... print i #Print out traversal characters 3 ... 4 p 5 y 6 t 7 h 8 o 9 n 10 >>> lst = ...

Posted on Thu, 02 Apr 2020 03:00:23 -0400 by yshaf13

The npm road of chrome driver

background At present, the front-end project of the system is a little explosive~ In the old projects, more and more people are using experience technology. In different projects, chrome driver is used maven integrated gulp compression js,css scheme It is very easy to use the frontend Maven plugin plug-in in the system~ problem One day, t ...

Posted on Wed, 01 Apr 2020 18:23:00 -0400 by jwilliam