Akka streams - learning from an application perspective: basic stream parts

In fact, I wrote a series of blogs about akka streams very early. But at that time, I studied purely to understand akka, mainly from the principle of akka streams. Because akka streams is the basis of akka series tools, such as akka HTTP, persistence query, etc. are all based on akka streams. In fact, akka streams is not really used. Some requi ...

Posted by Rohlan on Thu, 19 May 2022 10:32:35 +0300

Scala basic tutorial - what are singleton objects and associated classes?

A singleton object is a special class with only one instance. Like lazy variables, singleton objects are created late and only when they are first used. When an object is defined at the top level (that is, it is not included in other classes), a singleton object has only one instance. When an object is defined in a class or method, a singleto ...

Posted by selenin on Tue, 17 May 2022 01:03:48 +0300

Chisel Tutorial - 08.Chisel parameterized generator (from Scala)

Chisel parameterized generator (from Scala) motivation To make the Chisel module a code generator, there must be something that tells the generator how to do this. This section describes the parameterization of modules, covering a variety of methods and Scala language features. The enrichment of the parameter transfer implementation is direct ...

Posted by dfownz on Thu, 12 May 2022 20:15:19 +0300

<Zhuuu_ZZ > Scala higher order function

Nested function Two level nesting Requirement: input a string, judge the length of the string and the size of 5, and output two different results respectively object Test1 { def main(args: Array[String]): Unit = { //The first method: judge first and then build-in function // def fun(s: String): (Int, Int) => Int = { // ...

Posted by coreyphp on Wed, 11 May 2022 01:05:44 +0300

Scala object oriented (OOP)

I class Class is defined by the class keyword Class creates an instance through the new keyword Class has member variables and methods Class members are public by default. private and protected are also supported Static member variables and methods cannot be defined in a class Class does not need to explicitly define the construction meth ...

Posted by icesolid on Tue, 10 May 2022 03:55:49 +0300

Scala - IEEE754 floating point standard and Float / Double conversion

I introduction The last article introduced Conversion between binary and decimal numbers , this paper introduces the widely used floating-point number standard IEEE754. II IEEE754 introduction 1. Overall introduction IEEE754 represents the binary floating-point arithmetic standard. Generally, the commonly used ones are single precision 32 ...

Posted by AndyMoore on Mon, 02 May 2022 10:44:31 +0300

[cloud computing] three virtual machines complete spark yard cluster deployment and write Scala applications to realize word count statistics

catalogue 1. Prepare the environment          2. Install spark and configure the environment 3. Install scala and configure the environment 4. Install the editor idea 5. Write Spark Scala application to realize word count statistics 6. Spark on Yan configuration 1. Prepare the environment Virtual machine: VMware Workstation 16 linux ...

Posted by Shellfishman on Thu, 21 Apr 2022 13:50:35 +0300