Common function interfaces
Common function interfaces
The use of functional interface
Interface MyFunctionalInterface
package cn.xiaoge.day20.demo01;
public class Demo {
public static void show(MyFunctionalInterface myInter) {
myInter.method();
}
public static void main(String[] args) {
// Cal ...
Posted by lettheflamesbegin on Sat, 18 Jan 2020 06:35:22 -0800
Making a screen recording tool with Python
1, Write in front
As a test, sometimes it is often necessary to record their own operation on the screen, so as to facilitate the follow-up development and positioning of students. In the past, screen to GIF was used to record the screen and make dynamic pictures. Occasionally, python can also be realized. Then hurry to learn.
2, Effect display ...
Posted by Monkee Of Evil on Fri, 17 Jan 2020 07:09:22 -0800
Disruptor learning - easy to use
Destructor GitHub address
Introduction: disruptor is an open source and efficient concurrent framework
event: event
Event factory: eventFactory
The concrete implementation of event handling: eventHandler
Producer
In order to use disruptor, let's consider a simple example, which is to say = pass a long t ...
Posted by Sanoz0r on Thu, 16 Jan 2020 00:39:44 -0800
Selenium: screenshot showing waiting
1, Show wait (conditional wait)
common problem:
The location is clearly right. Why can't the running code find the location.
The location is clearly right. If the location is found, why is the text information empty?
Analysis reason:
frame not processed
The page rendering speed is slower than the code of automatic test, and the page is locat ...
Posted by arsitek on Wed, 15 Jan 2020 22:44:46 -0800
Summary of leetcode stage: solving Sudoku & Queen n
37. Solve Sudoku
51. N queen
These two kinds of topics are typical backtracking methods, which are not particularly complicated in terms of ideas, but they are relatively tedious and repetitive, so they are suitable for writing with the method of subfunctions. In addition, the number of solutions i ...
Posted by suresh_nsnguys on Sat, 11 Jan 2020 08:19:42 -0800
Naive Bayes algorithm: News Classification (Sklearn Implementation)
1. Steps of news classification based on Naive Bayes
(1) Provide text file, i.e Dataset Download
(2) Prepare data
The data set is divided into training set and test set, and the jieba module is used for word segmentation, word frequency statistics, stop word filtering, text feature extraction, and text data is quantified
Stop word text Stopword ...
Posted by AdRock on Thu, 09 Jan 2020 08:16:32 -0800
Crawler: Scrapy framework
1. Crawler
With Scrapy, we can easily write a site crawler. However, if the number of sites captured is very large, such as crawling news information of major media, multiple spiders may contain a lot of repetitive code.
If we keep the common parts of spiders in each site and extract different parts as separate configurations, such as crawling ...
Posted by mattcairns on Tue, 07 Jan 2020 04:04:55 -0800
Dart basic language beginner level chapter
This article is [ Learn from scratch and develop a Flutter App ]The first article on the road.
This article introduces the basic features of Dart, aiming to help you build a general understanding of Dart language and master its grammar.
We assume that the reader has a certain programming foundation. If you know the object-oriented languages su ...
Posted by ask9 on Mon, 06 Jan 2020 10:49:04 -0800
Python has 35 built-in functions. Are you ok ay?
Python has more than 60 built-in functions, of which 35 are combed today
1 abs()
Modulus of Absolute or Complex Numbers
.
In [1]: abs(-6)Out[1]: 6
2 all()
Accepts an iterator and returns True if all elements of the iterator are true or False otherwise
In [2]: all([1,0,3,6])Out[2]: FalseIn [3]: all([1,2,3])Out[3]: True
3 any()
Accepts ...
Posted by OriginalSunny on Mon, 06 Jan 2020 07:04:23 -0800
Rescue GlusterFS Distributed Storage System
After the GlusterFS distributed storage system was migrated in a previous period of time, the phenomenon of dropping lines and intermittent happened frequently, which made it unable to work properly for a long time.Observations revealed that one of the nodes was always restarting, further revealing that only one of the four nodes in the replica ...
Posted by renesis on Mon, 06 Jan 2020 01:02:34 -0800