131x Filetype PDF File size 0.31 MB Source: wilderness.blob.core.windows.net
O'reilly scala cookbook pdf The funny thing about writing books, or at least writing books with OâReilly in 2013, is that I never received the final PDF copy of the Scala cookbook. Luckily, I have the original Word documents they were using at the time, so I carry them around on my laptop. Hi, my name is Alvin Alexander and I wrote the Scala cookbook for O'Reilly. Here is a link to Scala Cookbook 2nd Edition: The rest of this page contains direct links to recipes from Scala Cookbook 1st Edition. All of them are available on my main site alvinalexander.com. And if you're new to the Scala programming language, you can find it at scala-lang.org. Foreword The original foreword to the Scala Cookbook Chapter 1 Chapter 1 is not yet online. Chapter 2 Chapter 2 is not online yet. Chapter 3 Recipe 3.1. How to loop through a collection with for and foreach (and how the for loop is translated) Recipe 3.2. How to Use Scala to Loop with Multiple Counters Recipe 3.3. How to use a for loop with built-in if ' statements (guards) Recipe 3.4, How to create a "to understand" (for/yield loop) Recipe 3.5, Scala: How to use break and continue in for (and while) loops Recipe 3.6, How to use Scala if/ then statement as a ternary operator Recipe 3.7, How to use a Scala Matches expression as a switch statement Recipe 3.8, How to combine multiple conditions with a single case statement Recipe 3.9, How to assign the result of a match expression to a variable Recipe 3.10, How to access the default case value in Scala Matching Expression, Recipe 3.11, How to Use Pattern Matching in Matching Expressions, Scala Recipe 3.12, How to Use Uppercase Classes in Matching Expressions, Scala Recipe 3.13, How to Add If Statements (Guards) to Case Statements Recipe 3.14, How to use match expression instead of isInstanceOf (for type matching) Recipe 3.15, How to use lists in Scala match expressions Recipe 3.16, How to bind one or more exceptions to try/catch in Scala Recipe 3.17, How to declare(var) before use in try/catch/finally Recipe 3.18, How to Create Your Own Control Structures in Scala Chapter 4 Recipe 4.1, How to Create Basic Constructor in Scala Recipe 4.2, How to Control Visibility of Scala Class Constructor Fields 4.3 , How to Define Helper Class Constructors Recipe 4.4, How to define a private base constructor in Scala Recipe 4.5, How to provide default values for Scala constructor parameters Recipe 4.6, How to override default accessors and mutators in Scala classes Recipe 4.7, How to prevent getter and setter generation in Scala classes Scala class Recipe 4.11, How to call the Scala superclass constructor Recipe 4.12, When to use an abstract class in Scala Recipe 4.13, How to set properties in an abstract base class or trai defines t Recipe 4.14, How to generate pattern code with Scala case classes Recipe 4.15, How to define e and ne equals method ( object equality) in Scala Recipe 4.16, How to Create Inner Classes in Sc ali Chapter 5 Recipe 5.1 How to control the scope of a method in Scala Recipe 5.2 How to create a method in a superclass in Scala Recipe 5.3 How to set default values for method parameters Scala Recipe 5.4 How to use parameter names when calling a method Scala Recipe 5.5, How to define Scala methods that return multiple elements (a tuple). Recipe 5.6, How to force callers to leave parentheses of getter methods. Recipe 5.7, How to create methods that take arrays of variable arguments (varargs) and a Scala method may throw an exception Recipe 5.9, How to support Scala's fluent programming style Chapter 6 Chapter 7 Chapter 8 Recipe 8.1, How to create a Scala function to use as an interface Recipe 8.2, How to use abstract and concrete fields in Scala8.3. Recipe for using scala features such as an abstract class recipe 8.4, how to use scala characteristics as simple myxins (or how to confuse scala characteristics) 8.5. Recipe to limit which classes can use the characteristic recipe 8.6. Scala feature so that it can only be mitigated by a certain type of recipe 8.7, how to announce that the scala function can only be confused with a type of 8.8 method, as an object's instance recipe is added to the scala function 8.9. How to expand Java interface, such as Scala property, 9.1. Recipe 9.1. The recipe for using functional (anonymous functions) scala, how to use functions as variables (values) Scala uses a recipe 9.3, how to define a method that accepts a simple feature parameter recipe 9.4, so you define scala methods that define complex functions as use parameters 9.5, then use the closure scala (closure examples, syntax) in the recipe 9.6, then use partially used features in the Scala recipe 9.7. , a real example of functional programming Scala Chapter 10 Introduction to Chapter 10 (Scala List Class and Methods) Recipe 10.1, Scala Understand the Recipe for Hierarchy of the Collection 10.2. 10.4. Problem recipe, Scala collection performance understanding 10.5. Recipe 10.5. The Manual Declaration of the Year, creating a collection's instance recipe 10.6, changing the variables with unchanged collections, understanding the recipe 10.7, the vector class for unchanged "go to" sequence, the recipe 10.8. , Scala massive buffer class for their "Go to" the seized sequence to create a recipe 10.9, how to go through the collection 10.10 with ForeAach, how to go through a collection with a loop 10.11, how to use zipwithinx or zip to create loop meters 10.12With Scala classes, recipe 10.13, how to convert one Scala collection to another using for/yield recipe 10.14, how to convert one Scala collection to another using the Recipe 10.15 function, how to smooth the list in Scala using Flatten Recipe 10.16 How to combine the map and smooth the Flatmap Recipe 10.17, how to use the filtering filter SCALA 10.18, how to extract the sequence of elements from the Scala 10 recipe, how to disrupt the sequences into the sequences of the subgroup in the scala (groupby, partition, span) recipe 10.20 and FOLD Recipe 10.21, how to extract unique elements from the recipe Scala 1022, how to combine consecutive collections (list, vector, arraybuffer, field, SEQ) recipe 10.23, how to combine two consecutive collections in pairs using ZIP 10.24, how Create a deferred representation in recipe 10 Scala. 25, How to fill in the Scala collection using a recipe for 10.26 to create and use the recipe scala enumerations 10.27, scalas -trales when you only need a bag with recipe 10.28, how to sort the recipe scala 10.29, how to convert the Scala collection to a line using a recipe 11.1 Mkstring Chapter 11, different ways to create and fill in the list in the Recipe Scala 11.2 how to create a changed list in the Scala recipe (Listbuffer) 11.3, how to add elements to the SCALA list 11.4, how to remove elements from the list (or Listbuffer) in Scala recipe) 11.5, how to combine (concrete) lists in the Recipe Scala 11.6, how to use the SCALA Stream class, the lazy version of the Recipe 11.7 list, the different ways to create and update the field in the Scala 11.8 recipe how to create a field whose size can change (Arraybuffer), recipe 11.9, how to remove field elements and arraybuffer in Scala, recipe 11.10, 11.10, how to sort fields in Scale, recipe 11.11, how to create multidimensional e Massifs in Scala, recipe 11.12, J and transfer the field back and forthJava Methods Recipe 11.13, How to create cards in a Scala recipe (Scala map class examples) 11.14, How to choose a card implementation in a Scala recipe 11.15, How to add, update, and delete elements with variable cards recipe 11.16, How to Add, update, and delete elements with enhanced card recipes 11.17 how to access card values in a Scala recipe 11.18 how to get a card in a Scala recipe (Cycle for, Foreach) 11.19 how to get keys or values FROM a Scala card 11.20 how to change keys and values in a recipe to a Scala map 11.21 , how to check availability of key or value in Scala Card recipe 11.22 how to filter Scala recipe (FilterKeys, Transformation) 11.23 how to sort an existing key or value (sortby, sort) recipe 11.24 how to find largest key or largest key or largest key or largest key or largest key value in Scala Map 11.25 recipe, switch to Java Cards and back to Scala 11.26 recipe how to add elements to a set in Scala recipe 11.27 how remove elements from a Scala set Recipe 11.28 How to use SOR table sets in Scala Recipe 11.29 How to use a queue in Scala Recipe 11.30 How to use a stack in Scala Recipe 11.31 How to use a range in Scala Chapter 12 , Recipe 12.1 how to open and read a text file in Scala recipe 12.2 how to write text files in Scala recipe 12.3 how to read and write binary files in Scala recipe 12.4 how to process each symbol in a text File in Scala recipe 12.5 how to process a file CSV in Scala Recipe 12.6 as well as reading a YAML configuration file in Scala Recipe 12.7 How to use Scala strings (Serializable Property) Recipe 12.9 How to list files in a catalog in Scala (and filtering them) Recipe 12.10 How to list subcatalogs in catalogs in Scala recipe 12.11 how to external system commands in Scala recipe 12.12 how to External commands and use their stdout in Scala recipe 12.13 how to Handle STDOUT and STDERR recipe External commands 12.14External commands in the Scala 12.15 recipe such as redirecting Stdout and Stdin External command recipe 12.16, how to use 'A' or 'when starting external commands in the SCALA 12.17 recipe. Command (process) in another recipe in directory 12.19, so set the variable environment when starting external commands RECEP 12.20, index of the methods of starting external system commands Chapter 13, actors, actors, actors, actors, actors, actors , Actors, actors, actors and recipe for match 13.1, how to start with a simple recipe for the actor recipe 13.2, how to create actors Scala/Akka, whose constructor recipe for arguments needs, how to communicate between scala/Akka recipe ( Send messages) 13.4, understanding of the method in the recipe for the life cycle of actor Scala/Akka 13.5, how to set a recipe for actor Scala/Akka 13.6, as the recipe Akka Actors Recipe 13.8, S stops. The actor Akka with the "Watch" recipe, simply parallel to the Futures recipe with Scala 13.10, how to get a message to the actor Akka Send t and for the recipe for answer 13.11 awaits how to change between different actors akka akka states with prescription "become" 13.12 Examples of the use of parallel collections in recipe 14.1 Chapter 14, how to start with lit.2 scala recipe, how The code blocks are inserted and loaded into the Scala recipe 14.3. . If you would like to make files and container classes for the Rep -Classpath 14.4 recipe from Repl Class, add the Shell command from the SCALA REPL 14.5 recipe to create a scala code with "Scalac" and execute with a "Scala" recipe 14.7 So you will find a good recipe -Scala libraries 14.8, you generate Scala documentation with command recipe SCALADOC 14.9, compile your scala code faster with a recipe for commanding line 14.10 How to use Scala as a recipe for scriptingHow to access command line arguments in a Scala Shell script Recipe 14.12, How to prompt the user for input from Scala Shell scripts Recipe 14.13, How to speed up Scala Shell scripts by precompiling them Chapter 15 Recipe 15.1, How to create a JSON string from a Scala Object. Recipe 15.2. How to create a JSON string from Scala classes that have collections. Recipe 15.3. How to create a simple Scala object from a JSON string. Recipe 15.4. How to convert JSON data to an array of Scala objects. Recipe 15.5, How to Create Simple Web Services Using Scalatra Recipe 15.6, How to Replace XML Servlet Mapping with Scalatra mount Recipe 15.7, How to Access Scalatra Web Service GET Parameters Recipe 15.8, How to Access POST Request Data Using Scalatra Recipe 15.9, How to Write simple HTTP GET request client in Scala Recipe 15.10 How to create a Twitter client in Scala Recipe 15.11 How to send JSON POST data to a REST URL Recipe 15.12 How to access HTTP response headers after making an H TTP request with Apache HttpClient Recipe 15.13 , How to set HTTP headers when sending a web service request Recipe 15.14, How to write a GET request web service using the Play Framework recipe 15.15, How to write a POST request web service Play Framework Chapter 16 Recipe 16.1, How to connect to a MySQL database using Scala and JDBC recipe 16.2 how to connect to database using Spring Framework recipe 16.3 how to connect to MongoDB and in data insertion using S cala, Recipe 16.4, How to insert documents into MongoDB using insert, save and += Recipe 16.5, How to search a MongoDB collection using Scala and Casbah Recipe 16.6, How to update documents in MongoDB using Casbah Recipe 16.7, How to access the "ID" field of a document MongoDB (_id) using the Casbah 16.8 recipe, How to delete documents in MongoDB using the Casbah 16.9 recipe, Slick Database Library at a Glance Chapter 17 Chapter 18 Chapter 19 Chapter 20 Get full access to The Scala Cookbook, 2nd Edition and over 60,000 other titles,Free 10 -day trial version O'Reilly. There are also live online events, interactive content, certification materials and more. Save time and exertion in creating object - oriented, functional and concurrent applications with Scala. The latest edition of this comprehensive cookbook contains over 250 ready -made recipes and 1000 examples of code to help you solve the most common problems with Scala 3 and its favorite libraries. Scala changes the way you think about programming - and that's good. Whether you are working on web applications, large data or distributed applications, this cookbook contains recipes based on real scenarios for experienced Scala developers and developers who are still learning to use JVM. Alvin Alexander provides practical solutions from his experience in using Scala for applications based on components, highly scalable and distribution applications. Recipes include: strings, numbers and control structures, classes, methods, objects, properties, packaging and import, functional programming techniques, rich collections of classes and methods and publishing Scala applications using SBTACTors and concurrentness with popular Scala Future libraries , Scala.js, Play Framework and Graalvmtypes such as deviations, data, intersections and unified procedures including comparison of patterns, modules and function errors/sending errors Download sample code Preface Breaks. Packaging and Import Functional Programming Collection: Introduction Collection: Common Sequential Class Collection: Normal Sequential Methods Collection: Using MAPs Collection: Tuple, Range, Set, Stack and Queue Files and Projects Creation with SBT Concurrency with Scala Futures and Akka Play Framework and web services Apache Spark Scal A.Js, Graalvm and JPACKAGE integration scala with sTypes of the best practices
no reviews yet
Please Login to review.