day_25Lambda expression, functional interface
1. Lambda
1.1 general
Lambda expression is a function without name, which can also be called closure. It is the most important new feature released by Java 8. It is essentially an anonymous inner class or a piece of code that can be passed
And the arrow function
1.2 why use Lambda expressions
Lambda expression is a short form of anonymous ...
Posted by unknown101 on Tue, 02 Nov 2021 15:46:14 -0700
Super detailed explanation of java8 stream API!
First post a few cases. Students with high level can challenge:
Select employees with salary greater than 8000 from the employee set and place them in a new set.Count the sum of the maximum salary, average salary and salary of employees.Employees are ranked from high to low in salary, and the younger ones are the first.Classify employees by ...
Posted by northcave on Wed, 13 Oct 2021 17:04:40 -0700
New Java 8 features - lambda
1. Introduction to lambda
1.1 introduction to lambda expression
Lambda expression is an anonymous function. We can understand lambda expression as a piece of code that can be passed (passing code like data). You can write more concise and flexible code. As one A more compact code style has improved the expression ability of Java language. JDK ...
Posted by thunderbox on Sat, 04 Sep 2021 20:47:32 -0700
Rent price analysis of rental housing in Shanghai
Rent price analysis of rental housing in Shanghai
In this paper, we use crawler to crawl the housing rental data of Shanghai, and use python to clean, analyze and display the data, and carry out data mining modeling and prediction for housing rent.
# Import related packages
import pandas as pd
import numpy as np
import seaborn as sns
import ma ...
Posted by Calamity-Clare on Mon, 29 Jun 2020 19:46:08 -0700
Pytoch deep learning practical course: today, do you classify garbage?
This article is about GitHub https://github.com/Jack-Cherish/PythonPark Has included, there are technical dry goods articles, collated learning materials, interview experience sharing of first-line large factories, etc., welcome to Star and improve.
1, Waste classification
Do you remember the gar ...
Posted by Michael 01 on Mon, 29 Jun 2020 19:46:17 -0700
Naive Bayesian Text Classification-An Application to Author Identification in A Dream of Red Mansions (Pthon Implementation)
Naive Bayesian algorithm is simple and efficient.Next, we will describe how it can be used to identify the authors of A Dream of Red Mansions.
The first step, of course, is to have text data first. I downloaded a txt freely on the Internet (I was in a hurry to hand in the draft at that time.)Classification is definitely a round-by-turn score, ...
Posted by viperfunk on Sun, 28 Jun 2020 17:25:39 -0700
Playing with Stream in Java 8
Playing with Stream in Java 8
By litesky
Link: http://www.jianshu.com/p/11c925cdba50
I believe you have heard about Java8 Stream, but you may not be able to use it or you are not familiar with it. This article will take you to use it from scratch, step by step, and lead you to the peak of Stream.
Operator
What are operators? Operator is a k ...
Posted by michibk on Sat, 27 Jun 2020 19:14:03 -0700
Getting started with tkinter -- list box, Scrollbar, Scale
tkinter getting started (4) -- list box, scroll bar, Scale
1. List box, for multiple options
2. When there are many list boxes, the solution
3. scale component enables users to select a certain range of data
1. List box, for multiple options
import tkinter as tk
root = tk.Tk()#Generate top windo ...
Posted by xtian on Fri, 26 Jun 2020 20:25:19 -0700
[Python basics] day8 -- LEGB principles of function and scope
Function (subroutine, procedures)
definition:
Function is to encapsulate a set of statements with a name (function name). To execute this function, you only need to call its function name
effect:
Easy to reuse a part of code and reduce duplicate code
Easy to modify code and expand
Keep the ...
Posted by jedney on Thu, 25 Jun 2020 23:16:12 -0700
The algorithm of python Development & data structure
The algorithm of python Development & data structure (4)
data structure
1. Circular queue
2. Python queue built-in module
3. List
3.1 creating a linked list
3.2 insertion of linked list nodes
3.3 deletion of linked list nodes
4. Double linked list
4.1 insertion of double linked list nodes
4.2 ...
Posted by sm on Thu, 25 Jun 2020 02:27:58 -0700