Scala -- definition of classes and objects + use of associated objects
1. Classes and objects
Scala is a functional object-oriented language. It also supports the idea of object-oriented programming, and also has the concept of class and object. We can still develop object-oriented applications based on Scala.
1.1 related concepts
What is object oriented?
Object oriented is a programming idea, It is based on p ...
Posted by knsito on Sun, 28 Nov 2021 19:14:00 -0800
ES6 learning Chapter 7 function extension
prefaceThis chapter introduces the extension of functions. Some knowledge that is not commonly used can be understood.Link to the original text of this chapter: Extension of function. Default values for function parametersES6 allows you to set default values for function parameters, that is, write them directly after the parameter definition.Wh ...
Posted by ace21 on Sun, 28 Nov 2021 19:13:09 -0800
Standard library in golang
Time type
The time.Time type represents time. We can obtain the current time object through the time.Now() function, and then obtain the information such as year, month, day, hour, minute and second of the time object. The example code is as follows:
func main() {
current := time.Now()
fmt.Println(current)
// 2021-11-26 16:13:54.3960877 +080 ...
Posted by Shendemiar on Sun, 28 Nov 2021 19:09:02 -0800
postgreSQL source code analysis -- establishment and use of index -- Hash index
2021SC@SDUSC
catalogue
Hash index
In addition to using B-Tree index, postgreSQL can also use hash index. Hash index has faster query speed. This article mainly explains the principle of hash index, compares it with B-Tree, and analyzes the relevant data structure of hash index in the source code.
Hash indexing principle
Hash table
The ...
Posted by incubi on Sun, 28 Nov 2021 18:57:01 -0800
Thoughts on cc3k village operation
Thoughts on cc3k village operation
When I finished this assignment in object-oriented curriculum design, I haven't summarized my experience. Today, take the opportunity to answer the students' questions to summarize.
Before starting
The teacher asked to implement it in C + +, but on the other hand, I only knew this language at that time.
At ...
Posted by hemoglobina on Sun, 28 Nov 2021 18:43:06 -0800
About forEach synchronization and asynchrony
About forEach synchronization and asynchrony
Verify whether forEach is synchronous or asynchronous
Some people have told me that forEeach is asynchronous ~ asynchronous code can't be put into execution ~ I was confused at that time, as if it wasn't the case when I first learned javascript
Some people engraved a scar on you ~ tmd smiled and ...
Posted by redking on Sun, 28 Nov 2021 18:40:01 -0800
CentOS system manually deploys MySQL database
Introduction: MySQL is a relational database management system commonly used in Web site scenarios such as LAMP and LNMP. This article will show you how to install, configure, and remotely access MySQL databases on an ECS instance of the CentOS system.
Mirror download, domain name resolution, time synchronization Click Alibaba ...
Posted by iceangel89 on Sun, 28 Nov 2021 18:25:36 -0800
Getting started with Android series: message prompt box and dialog box
1, Message prompt box and dialog box
1. Use Toast to display the message prompt box
There are contacts before the message prompt box. The main application is
Toast.makeText().show
Next, learn in detail
The objects of the Toast class have the following common methods
setDuration(int duration) sets the duration toast.length of the message_ ...
Posted by bluetonic on Sun, 28 Nov 2021 18:10:46 -0800
Detailed explanation of "concurrency" in Java [volatile, synchronized, Atomic class operation, Atomic.., CAS principle]
1. Understanding of volatile?
volatile is a lightweight synchronization mechanism provided by Java virtual machine
Ensure visibilityProhibit instruction sortingAtomicity is not guaranteed
JMM (Java memory model)
JMM itself is an abstract concept, which does not really exist. It describes a set of regulations or specifications, which def ...
Posted by Simmo on Sun, 28 Nov 2021 18:00:07 -0800
Java_IO stream (Intensive)
1. Concept of Java Io flow
Stream: represents any data source object capable of producing data or receiving end object capable of receiving data.
The essence of flow: data transmission. According to the characteristics of data transmission, the flow is abstracted into various types to facilitate more intuitive data operation.
Function: ...
Posted by Fritz.fx on Sun, 28 Nov 2021 17:47:30 -0800