title
Scala Tutorial

description
Get the Cheat Sheet Here : http://goo.gl/O1CuGM Best Scala Book : http://amzn.to/1JfA1bV MY UDEMY COURSES ARE 87.5% OFF TIL December 19th ($9.99) ONE IS FREE ➡️ Python Data Science Series for $9.99 : Highest Rated & Largest Python Udemy Course + 56 Hrs + 200 Videos + Data Science https://bit.ly/Master_Python_41 ➡️ C++ Programming Bootcamp Series for $9.99 : Over 23 Hrs + 53 Videos + Quizzes + Graded Assignments + New Videos Every Month https://bit.ly/C_Course_41 ➡️ FREE 15 hour Golang Course!!! : https://bit.ly/go-tutorial3 I LIVESTREAM CODE HERE : https://www.twitch.tv/derekbanas MY DISCORD : https://discord.gg/VckHCAvA ( Contact Me Anytime ) Support me on Patreon : https://www.patreon.com/derekbanas 00:55 Installation 03:03 REPL 04:36 Data Types 07:00 Math 09:57 If 12:38 Compiled Scala / Main 13:11 While 13:57 Do While 14:25 For Loops 19:46 User Input / Output 25:17 Strings 27:40 Functions 31:08 Recursion 33:22 Arrays 34:32 ArrayBuffer 37:04 Yield 37:40 ForEach 41:52 Maps 44:59 Tuples 46:39 Classes 54:26 Companion Objects / Static 57:42 Inheritance 1:01:22 Abstract Classes 1:03:11 Traits 1:06:04 Higher Order Functions 1:06:46 Map 1:07:53 Filter 1:10:07 Closures 1:11:05 File I/O 1:12:57 Exception Handling

detail
{'title': 'Scala Tutorial', 'heatmap': [{'end': 1036.502, 'start': 757.912, 'weight': 1}, {'end': 1793.514, 'start': 1743.811, 'weight': 0.733}, {'end': 2196.553, 'start': 2106.34, 'weight': 0.746}, {'end': 2824.556, 'start': 2768.415, 'weight': 0.741}, {'end': 2919.891, 'start': 2860.962, 'weight': 0.703}, {'end': 3361.264, 'start': 3270.239, 'weight': 0.832}, {'end': 3809.398, 'start': 3762.514, 'weight': 0.952}, {'end': 4037.415, 'start': 3941.551, 'weight': 0.9}], 'summary': "The 'scala tutorial' video covers a comprehensive scala tutorial equivalent to a 200-page book with installation instructions for mac and windows, common arithmetic operations, shorthand notation, scala math functions, conditional operators, looping techniques, string and list manipulation, functions, input/output handling, maps, tuples, classes, properties, inheritance, abstract classes, traits, and higher-order functions.", 'chapters': [{'end': 422.005, 'segs': [{'end': 34.397, 'src': 'embed', 'start': 0.129, 'weight': 0, 'content': [{'end': 2.83, 'text': 'Well, hello Internet, and welcome to my Scala video tutorial.', 'start': 0.129, 'duration': 2.701}, {'end': 8.831, 'text': "In this one tutorial, I'm going to teach you pretty much everything you would learn from a standard 200-page book on Scala.", 'start': 2.89, 'duration': 5.941}, {'end': 15.072, 'text': "I'm going to teach you how to install everything and we're going to work in the terminal and we're also going to work with compiled Scala code as well.", 'start': 8.951, 'duration': 6.121}, {'end': 17.872, 'text': 'And you may ask yourself well, why would I care to learn Scala?', 'start': 15.212, 'duration': 2.66}, {'end': 25.634, 'text': 'Well, Scala is the perfect choice if you want to explore the world of functional programming without completely disregarding object-oriented programming.', 'start': 17.912, 'duration': 7.722}, {'end': 26.214, 'text': 'It has both.', 'start': 25.674, 'duration': 0.54}, {'end': 30.696, 'text': "And, on top of that, what's awesome is Scala runs on the Java virtual machine,", 'start': 26.474, 'duration': 4.222}, {'end': 34.397, 'text': "which means that it's going to have a ton of libraries ready for you to use.", 'start': 30.696, 'duration': 3.701}], 'summary': 'This scala tutorial covers everything from a 200-page book, emphasizing its dual functional and object-oriented programming aspects and its compatibility with java virtual machine.', 'duration': 34.268, 'max_score': 0.129, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M129.jpg'}, {'end': 120.357, 'src': 'embed', 'start': 91.137, 'weight': 1, 'content': [{'end': 92.598, 'text': "Everything's going to install for you.", 'start': 91.137, 'duration': 1.461}, {'end': 93.618, 'text': 'You might need to update it.', 'start': 92.618, 'duration': 1}, {'end': 94.318, 'text': "And that's it.", 'start': 93.758, 'duration': 0.56}, {'end': 96.418, 'text': "So that's all you need to do to install on a Mac.", 'start': 94.498, 'duration': 1.92}, {'end': 98.139, 'text': "Now I'm going to show you how to install on Windows.", 'start': 96.478, 'duration': 1.661}, {'end': 101.139, 'text': "Now, of course, you're going to need the Java virtual machine just like before.", 'start': 98.239, 'duration': 2.9}, {'end': 103.36, 'text': "But you're also going to need to go to Scala-lang.org.", 'start': 101.279, 'duration': 2.081}, {'end': 106.101, 'text': 'And then download.', 'start': 105.1, 'duration': 1.001}, {'end': 108.864, 'text': "And then on Windows, you're going to click on this guy right here.", 'start': 106.362, 'duration': 2.502}, {'end': 110.947, 'text': "It's going to pop up a little message at the bottom.", 'start': 109.065, 'duration': 1.882}, {'end': 111.968, 'text': 'Make sure you want to save it.', 'start': 110.987, 'duration': 0.981}, {'end': 112.889, 'text': 'Click on save.', 'start': 112.048, 'duration': 0.841}, {'end': 115.452, 'text': "And then it's going to start installing everything for you.", 'start': 113.109, 'duration': 2.343}, {'end': 118.135, 'text': 'And this is just basically going to be a whole bunch of next clicking.', 'start': 115.472, 'duration': 2.663}, {'end': 119.156, 'text': 'So click on next.', 'start': 118.175, 'duration': 0.981}, {'end': 120.357, 'text': "And then it's going to have this.", 'start': 119.396, 'duration': 0.961}], 'summary': 'To install on mac, update as needed. on windows, download from scala-lang.org and follow installation prompts.', 'duration': 29.22, 'max_score': 91.137, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M91137.jpg'}], 'start': 0.129, 'title': 'Scala tutorial & installation', 'summary': "Covers a comprehensive scala tutorial, equivalent to a 200-page book, providing installation instructions for mac and windows, emphasizing scala's functional and object-oriented capabilities, and showcasing coding exercises in the terminal and compiled scala code.", 'chapters': [{'end': 422.005, 'start': 0.129, 'title': 'Scala tutorial & installation guide', 'summary': "Covers a comprehensive scala tutorial, equivalent to a 200-page book, providing installation instructions for mac and windows, emphasizing scala's functional and object-oriented capabilities, and showcasing coding exercises in the terminal and compiled scala code.", 'duration': 421.876, 'highlights': ['The tutorial covers a comprehensive Scala tutorial, equivalent to a 200-page book. The instructor aims to cover the equivalent of a 200-page book on Scala in a single tutorial, making it an intensive and thorough learning experience.', 'Instructions for installing Scala on Mac and Windows are provided, along with the requirement of the Java Virtual Machine. The tutorial provides detailed instructions for installing Scala on both Mac and Windows, emphasizing the necessity of the Java Virtual Machine for the installation process.', "Scala's functional and object-oriented capabilities are highlighted, emphasizing its versatility and the availability of Java libraries. Scala is presented as an ideal choice for exploring functional programming alongside object-oriented programming, with the added advantage of running on the Java Virtual Machine, providing access to a wide range of libraries.", 'Coding exercises in the terminal and compiled Scala code are demonstrated, showcasing practical application. The tutorial demonstrates coding exercises in the terminal and compiled Scala code, providing practical examples to reinforce the learning experience.']}], 'duration': 421.876, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M129.jpg', 'highlights': ['The tutorial covers a comprehensive Scala tutorial, equivalent to a 200-page book.', 'Instructions for installing Scala on Mac and Windows are provided, along with the requirement of the Java Virtual Machine.', "Scala's functional and object-oriented capabilities are highlighted, emphasizing its versatility and the availability of Java libraries.", 'Coding exercises in the terminal and compiled Scala code are demonstrated, showcasing practical application.']}, {'end': 757.038, 'segs': [{'end': 622.068, 'src': 'embed', 'start': 583.279, 'weight': 0, 'content': [{'end': 587.061, 'text': 'And then finally, we could come in and do something like the radians.', 'start': 583.279, 'duration': 3.782}, {'end': 589.522, 'text': 'And then finally, we could come in and get the degrees.', 'start': 587.561, 'duration': 1.961}, {'end': 593.803, 'text': "So there's a whole bunch of different math functions that are available to you with Scala.", 'start': 589.942, 'duration': 3.861}, {'end': 597.184, 'text': "And of course, I'm going to show you how to do this in a compiled way here in a minute.", 'start': 594.003, 'duration': 3.181}, {'end': 599.265, 'text': "Now let's go over and take a look at conditionals.", 'start': 597.444, 'duration': 1.821}, {'end': 607.46, 'text': 'Now, your conditional operators that are going to be available to you are going to be equal to not equal to, greater than,', 'start': 600.134, 'duration': 7.326}, {'end': 612.363, 'text': "less than greater than or equal to, less than or equal to and that's pretty much everything.", 'start': 607.46, 'duration': 4.903}, {'end': 619.949, 'text': "And then your logical operators are also going to be familiar if you're used to using Java, and, or, and not.", 'start': 612.603, 'duration': 7.346}, {'end': 622.068, 'text': "Let's go and create a couple examples here.", 'start': 620.267, 'duration': 1.801}], 'summary': 'Scala provides various math functions and conditional operators, including radians, degrees, and logical operators like and, or, and not.', 'duration': 38.789, 'max_score': 583.279, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M583279.jpg'}], 'start': 422.281, 'title': 'Arithmetic operations, shorthand notation, scala math functions, and conditionals in scala', 'summary': 'Covers common arithmetic operations such as addition, subtraction, multiplication, and division, along with shorthand notation for incrementing and decrementing values in scala. it also discusses the usage of scala math functions, including importing libraries and using various mathematical functions, as well as an overview of conditional operators and examples of if statements in scala.', 'chapters': [{'end': 476.347, 'start': 422.281, 'title': 'Arithmetic operations and shorthand notation', 'summary': 'Covers common arithmetic operations like addition, subtraction, multiplication, and division, as well as shorthand notation for incrementing and decrementing values in scala.', 'duration': 54.066, 'highlights': ['The chapter covers common arithmetic operations like addition, subtraction, multiplication, and division, as well as shorthand notation for incrementing and decrementing values in Scala.', 'Modulus operation in Scala gives the remainder of a division.', "Shorthand notation can be used for incrementing and decrementing values in Scala without using '++' or '--' operators."]}, {'end': 757.038, 'start': 476.587, 'title': 'Scala math functions and conditionals overview', 'summary': 'Covers the usage of scala math functions including multiplication, division, importing libraries, and using various mathematical functions, as well as an overview of conditional operators and examples of if statements in scala.', 'duration': 280.451, 'highlights': ["Scala math functions overview It covers the usage of various math functions including absolute value, cube root, ceiling, rounding, floor, Euler's number, power, square root, hypotenuse, logarithms, minimum and maximum calculation, random number generation, conversion to integer, radians, and degrees.", 'Usage of if statements in Scala Demonstrates the usage of if statements with examples using conditional operators like greater than or equal to, less than or equal to, and the ternary operator, as well as when to use curly brackets and printing to the screen.', 'Introduction to conditional operators and logical operators Explains the available conditional operators like equal to, not equal to, greater than, less than, logical operators like and, or, not, and demonstrates the usage of boolean calculations.']}], 'duration': 334.757, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M422281.jpg', 'highlights': ['Covers common arithmetic operations like addition, subtraction, multiplication, and division, as well as shorthand notation for incrementing and decrementing values in Scala.', "Scala math functions overview including absolute value, cube root, ceiling, rounding, floor, Euler's number, power, square root, hypotenuse, logarithms, minimum and maximum calculation, random number generation, conversion to integer, radians, and degrees.", 'Demonstrates the usage of if statements with examples using conditional operators like greater than or equal to, less than or equal to, and the ternary operator, as well as when to use curly brackets and printing to the screen.']}, {'end': 1261.87, 'segs': [{'end': 793.226, 'src': 'embed', 'start': 757.912, 'weight': 0, 'content': [{'end': 763.954, 'text': "Okay, if you want to exit out of the Scala terminal, you just type in colon and Q and that's going to exit you out of there.", 'start': 757.912, 'duration': 6.042}, {'end': 766.194, 'text': "And now let's start writing some regular old code.", 'start': 764.074, 'duration': 2.12}, {'end': 774.057, 'text': "What we're going to do here is we're going to type in object, and then this is called Scala tutorial with the Scala exemption on the end there.", 'start': 766.214, 'duration': 7.843}, {'end': 781.919, 'text': "I'm going to call this Scala tutorial right like this put some curly brackets and then inside of main is where we're going to be writing our program code.", 'start': 774.237, 'duration': 7.682}, {'end': 790.304, 'text': "And there's arguments that can be accepted inside of This guy right here all going to be considered a string and we'll get more into arrays later on.", 'start': 782.159, 'duration': 8.145}, {'end': 792.005, 'text': "And let's just write some code here.", 'start': 790.524, 'duration': 1.481}, {'end': 793.226, 'text': "So we'll go variable.", 'start': 792.085, 'duration': 1.141}], 'summary': 'Exiting scala terminal and writing scala tutorial code.', 'duration': 35.314, 'max_score': 757.912, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M757912.jpg'}, {'end': 1036.502, 'src': 'heatmap', 'start': 757.912, 'weight': 1, 'content': [{'end': 763.954, 'text': "Okay, if you want to exit out of the Scala terminal, you just type in colon and Q and that's going to exit you out of there.", 'start': 757.912, 'duration': 6.042}, {'end': 766.194, 'text': "And now let's start writing some regular old code.", 'start': 764.074, 'duration': 2.12}, {'end': 774.057, 'text': "What we're going to do here is we're going to type in object, and then this is called Scala tutorial with the Scala exemption on the end there.", 'start': 766.214, 'duration': 7.843}, {'end': 781.919, 'text': "I'm going to call this Scala tutorial right like this put some curly brackets and then inside of main is where we're going to be writing our program code.", 'start': 774.237, 'duration': 7.682}, {'end': 790.304, 'text': "And there's arguments that can be accepted inside of This guy right here all going to be considered a string and we'll get more into arrays later on.", 'start': 782.159, 'duration': 8.145}, {'end': 792.005, 'text': "And let's just write some code here.", 'start': 790.524, 'duration': 1.481}, {'end': 793.226, 'text': "So we'll go variable.", 'start': 792.085, 'duration': 1.141}, {'end': 795.908, 'text': "I'm going to go over looping here just to start off.", 'start': 793.326, 'duration': 2.582}, {'end': 798.45, 'text': "I'm going to create a variable that's value can change.", 'start': 795.928, 'duration': 2.522}, {'end': 799.37, 'text': 'See, it says var.', 'start': 798.49, 'duration': 0.88}, {'end': 802.893, 'text': "And if you wanted to create a while loop in here, we'll just go i.", 'start': 799.69, 'duration': 3.203}, {'end': 805.471, 'text': 'less than or equal to ten.', 'start': 803.649, 'duration': 1.822}, {'end': 808.294, 'text': "like i said, you can use curly brackets if you'd like to.", 'start': 805.471, 'duration': 2.823}, {'end': 813.239, 'text': "i'm a hardcore java guy, so i like to use the brackets, but of course you don't need them,", 'start': 808.294, 'duration': 4.945}, {'end': 817.223, 'text': 'and then we can use the shortcut to increment the value of i.', 'start': 813.239, 'duration': 3.984}, {'end': 827.171, 'text': 'now, to compile this guy, you can either go in here and go scala c like this and then type out scala, tutorial dot Scala like that,', 'start': 817.223, 'duration': 9.948}, {'end': 832.073, 'text': 'or you could just go Scala, Scala, tutorial dot Scala and get exactly the same thing right there.', 'start': 827.171, 'duration': 4.902}, {'end': 836.816, 'text': 'you can see that it went and it looped through values between 0 and 10 with our while loop.', 'start': 832.073, 'duration': 4.743}, {'end': 841.798, 'text': "there's also do while loops, of course, and you're going to use do while whenever you want to guarantee that,", 'start': 836.816, 'duration': 4.982}, {'end': 846.38, 'text': "you're going to go through the loop at least once and we'll just do a print line.", 'start': 841.798, 'duration': 4.582}, {'end': 847.201, 'text': 'I. you can see there.', 'start': 846.38, 'duration': 0.821}, {'end': 852.199, 'text': "I'm not putting the semicolons at the end, even though I'd really like to, because I'm not a Java guy,", 'start': 847.201, 'duration': 4.998}, {'end': 855.661, 'text': "and in this situation you're going to put the while condition at the end.", 'start': 852.199, 'duration': 3.462}, {'end': 860.724, 'text': "so you're going to say we're going to continue looping through this as long as i is less than or equal to 20..", 'start': 855.661, 'duration': 5.063}, {'end': 865.247, 'text': "You can see if we execute that it's going to cycle through and print out 0 through 20.", 'start': 860.724, 'duration': 4.523}, {'end': 870.81, 'text': "We're also going to have four loops inside of Scala and here I'm going to show you a couple of them.", 'start': 865.247, 'duration': 5.563}, {'end': 876.64, 'text': "If you want to cycle between 1 and 10 we're going to go i Put that little caret symbol there.", 'start': 870.97, 'duration': 5.67}, {'end': 878.601, 'text': "And we'll go 1, 2, 10.", 'start': 877.02, 'duration': 1.581}, {'end': 883.583, 'text': 'And just to show you that we can do it without the brackets, we can go print line i.', 'start': 878.601, 'duration': 4.982}, {'end': 885.504, 'text': 'And you can see I printed that out perfectly fine.', 'start': 883.583, 'duration': 1.921}, {'end': 888.966, 'text': 'And of course, all this code here is available in the link underneath the video.', 'start': 885.684, 'duration': 3.282}, {'end': 892.427, 'text': 'We could also go random letters like this.', 'start': 889.166, 'duration': 3.261}, {'end': 895.108, 'text': 'And I could throw all the different letters in the alphabet.', 'start': 892.947, 'duration': 2.161}, {'end': 900.831, 'text': "And here, we're going to use a different type of for loop that we're going to use until here.", 'start': 895.529, 'duration': 5.302}, {'end': 904.433, 'text': 'This is very commonly used whenever we want to loop through strings or arrays.', 'start': 901.111, 'duration': 3.322}, {'end': 909.157, 'text': "So we'll go zero until, and we could say random letters.", 'start': 904.915, 'duration': 4.242}, {'end': 916.2, 'text': "And if we want to get the total length for that, so it's going to cycle through there as long as the letters are available for us to print out.", 'start': 909.617, 'duration': 6.583}, {'end': 922.923, 'text': 'And then if we wanted to come in here and print out specific letters from this string, we just go random letters.', 'start': 916.42, 'duration': 6.503}, {'end': 927.484, 'text': 'And then inside of there, instead of our square brackets, we put those inside of parentheses.', 'start': 923.482, 'duration': 4.002}, {'end': 928.344, 'text': "That's a common error.", 'start': 927.524, 'duration': 0.82}, {'end': 929.665, 'text': "So I'm just pointing that out.", 'start': 928.484, 'duration': 1.181}, {'end': 933.267, 'text': 'And you can see there it went through all the different letters and printed those out on our screen.', 'start': 929.825, 'duration': 3.442}, {'end': 934.547, 'text': "So that's how we'd use until.", 'start': 933.287, 'duration': 1.26}, {'end': 937.849, 'text': 'You can also use a for loop to iterate through a list.', 'start': 934.567, 'duration': 3.282}, {'end': 940.75, 'text': "So let's go and create ourselves a list.", 'start': 938.229, 'duration': 2.521}, {'end': 942.611, 'text': 'And this is how easy it is to create a list.', 'start': 940.83, 'duration': 1.781}, {'end': 943.972, 'text': 'Just go list like that.', 'start': 942.671, 'duration': 1.301}, {'end': 944.712, 'text': 'And there we go.', 'start': 944.192, 'duration': 0.52}, {'end': 946.253, 'text': 'One through five for our list.', 'start': 944.732, 'duration': 1.521}, {'end': 950.915, 'text': 'And then we can just go for i, temporary holding cell for each item in our list.', 'start': 946.613, 'duration': 4.302}, {'end': 958.821, 'text': 'a list and then of course we could go and print out those list items, then a plus sign at the end to concatenate those together.', 'start': 951.276, 'duration': 7.545}, {'end': 961.182, 'text': 'and it tried to print out that list, but i messed that up.', 'start': 958.821, 'duration': 2.361}, {'end': 962.924, 'text': "so let's go in here and do that again.", 'start': 961.182, 'duration': 1.742}, {'end': 966.346, 'text': 'put i inside of there and now you can see it printed all the list items out.', 'start': 962.924, 'duration': 3.422}, {'end': 968.888, 'text': "so there's a bunch of different ways we can use for loops.", 'start': 966.346, 'duration': 2.542}, {'end': 972.931, 'text': "another thing's kind of neat is we can throw an if statement inside here.", 'start': 968.888, 'duration': 4.043}, {'end': 977.695, 'text': "so let's say we wanted to cycle through a list and only store the even numbers.", 'start': 972.931, 'duration': 4.764}, {'end': 985.581, 'text': "well, we could go variable and we'll say something like even list is equal to 4, and then inside of this we'll go i 1 to 20,", 'start': 977.695, 'duration': 7.886}, {'end': 989.305, 'text': "so let's say we wanted to go through all the different list items from 1 to 20..", 'start': 985.581, 'duration': 3.724}, {'end': 998.681, 'text': 'We could then, inside of this guy, say if i and the modulus of 2, So anytime we would check for the modulus of 2, and it would be equal to 0,.', 'start': 989.305, 'duration': 9.376}, {'end': 999.882, 'text': 'we know that we have an even number.', 'start': 998.681, 'duration': 1.201}, {'end': 1008.205, 'text': 'And then down here, after we close off that curly brace, we go yield i and the value of i after it cycles through.', 'start': 1000.122, 'duration': 8.083}, {'end': 1011.706, 'text': 'this list is then going to be stored in the even list like that.', 'start': 1008.205, 'duration': 3.501}, {'end': 1020.151, 'text': 'And then if we wanted to print out this new even list, of course, we could just go for i and even list and print line and i.', 'start': 1011.946, 'duration': 8.205}, {'end': 1022.493, 'text': 'And there you can see it printed out all those different list items.', 'start': 1020.151, 'duration': 2.342}, {'end': 1025.214, 'text': "So that's just a different way to filter through a list.", 'start': 1022.773, 'duration': 2.441}, {'end': 1028.577, 'text': 'And there are many other different ways to use filters inside of Scala.', 'start': 1025.555, 'duration': 3.022}, {'end': 1030.258, 'text': "And of course, we'll take a look at those as well.", 'start': 1028.597, 'duration': 1.661}, {'end': 1036.502, 'text': "We're also going to be able to assign or increment through multiple different variables with our for loops.", 'start': 1030.498, 'duration': 6.004}], 'summary': 'The transcript covers scala programming concepts. it includes examples of while loops, do-while loops, for loops, and if statements, with examples and explanations provided.', 'duration': 278.59, 'max_score': 757.912, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M757912.jpg'}, {'end': 841.798, 'src': 'embed', 'start': 813.239, 'weight': 2, 'content': [{'end': 817.223, 'text': 'and then we can use the shortcut to increment the value of i.', 'start': 813.239, 'duration': 3.984}, {'end': 827.171, 'text': 'now, to compile this guy, you can either go in here and go scala c like this and then type out scala, tutorial dot Scala like that,', 'start': 817.223, 'duration': 9.948}, {'end': 832.073, 'text': 'or you could just go Scala, Scala, tutorial dot Scala and get exactly the same thing right there.', 'start': 827.171, 'duration': 4.902}, {'end': 836.816, 'text': 'you can see that it went and it looped through values between 0 and 10 with our while loop.', 'start': 832.073, 'duration': 4.743}, {'end': 841.798, 'text': "there's also do while loops, of course, and you're going to use do while whenever you want to guarantee that,", 'start': 836.816, 'duration': 4.982}], 'summary': 'Demonstrating how to use scala to loop through values 0 to 10, including different methods of compilation.', 'duration': 28.559, 'max_score': 813.239, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M813239.jpg'}, {'end': 895.108, 'src': 'embed', 'start': 855.661, 'weight': 1, 'content': [{'end': 860.724, 'text': "so you're going to say we're going to continue looping through this as long as i is less than or equal to 20..", 'start': 855.661, 'duration': 5.063}, {'end': 865.247, 'text': "You can see if we execute that it's going to cycle through and print out 0 through 20.", 'start': 860.724, 'duration': 4.523}, {'end': 870.81, 'text': "We're also going to have four loops inside of Scala and here I'm going to show you a couple of them.", 'start': 865.247, 'duration': 5.563}, {'end': 876.64, 'text': "If you want to cycle between 1 and 10 we're going to go i Put that little caret symbol there.", 'start': 870.97, 'duration': 5.67}, {'end': 878.601, 'text': "And we'll go 1, 2, 10.", 'start': 877.02, 'duration': 1.581}, {'end': 883.583, 'text': 'And just to show you that we can do it without the brackets, we can go print line i.', 'start': 878.601, 'duration': 4.982}, {'end': 885.504, 'text': 'And you can see I printed that out perfectly fine.', 'start': 883.583, 'duration': 1.921}, {'end': 888.966, 'text': 'And of course, all this code here is available in the link underneath the video.', 'start': 885.684, 'duration': 3.282}, {'end': 892.427, 'text': 'We could also go random letters like this.', 'start': 889.166, 'duration': 3.261}, {'end': 895.108, 'text': 'And I could throw all the different letters in the alphabet.', 'start': 892.947, 'duration': 2.161}], 'summary': 'Demonstration of looping through numbers and letters in scala, with examples cycling through 0 to 20 and printing alphabet letters.', 'duration': 39.447, 'max_score': 855.661, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M855661.jpg'}], 'start': 757.912, 'title': 'Scala programming fundamentals', 'summary': 'Covers essential scala programming concepts such as looping techniques, string and list manipulation, if statements, for loops, functions, input/output handling, and implementing break and continue statements, providing comprehensive coverage of fundamental programming skills.', 'chapters': [{'end': 916.2, 'start': 757.912, 'title': 'Scala terminal and looping tutorial', 'summary': 'Covers how to exit the scala terminal and demonstrates various looping techniques including while loops, do-while loops, and for loops with examples of compiling and executing the code, showcasing the cycling through values and printing outputs.', 'duration': 158.288, 'highlights': ["The chapter demonstrates how to exit the Scala terminal using the command 'colon and Q' and proceeds to create a Scala tutorial object with main program code.", 'It provides an example of using a while loop with a shortcut for incrementing the value, showcasing the output of looping through values between 0 and 10.', 'The chapter illustrates the usage of do-while loops with the guarantee of going through the loop at least once and showcases the output of cycling through and printing out values from 0 to 20.', "It explains the usage of for loops in Scala, demonstrating cycling between 1 and 10, printing the values, and iterating through different letters in the alphabet using the 'until' loop.", 'The tutorial emphasizes that all the demonstrated code is available in the link provided underneath the video.']}, {'end': 1261.87, 'start': 916.42, 'title': 'Scala programming basics', 'summary': 'Covers various programming concepts in scala, including working with strings, lists, if statements, for loops, functions, handling input and output, and implementing break and continue statements.', 'duration': 345.45, 'highlights': ['The chapter covers various programming concepts in Scala The transcript discusses different programming concepts in Scala, including string manipulation, list creation, for loops, functions, and handling input and output.', 'Working with strings and lists Demonstrates string manipulation, printing specific letters from a string, creating and iterating through a list, and printing list items.', 'Implementing if statements inside for loops Shows how to throw an if statement inside a for loop to filter and store even numbers in a new list, and print the new list items.', 'Iterating through multiple variables with for loops Explains how to iterate through multiple variables using for loops and demonstrates incrementing through different variables.', 'Implementing break and continue statements Discusses how to implement break and continue functionality in Scala using if statements inside functions, and demonstrates handling input and output with do while loop.']}], 'duration': 503.958, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M757912.jpg', 'highlights': ['The chapter covers various programming concepts in Scala including string manipulation, list creation, for loops, functions, and handling input and output.', 'The tutorial emphasizes that all the demonstrated code is available in the link provided underneath the video.', 'It provides an example of using a while loop with a shortcut for incrementing the value, showcasing the output of looping through values between 0 and 10.', 'The chapter illustrates the usage of do-while loops with the guarantee of going through the loop at least once and showcases the output of cycling through and printing out values from 0 to 20.', "The chapter demonstrates how to exit the Scala terminal using the command 'colon and Q' and proceeds to create a Scala tutorial object with main program code."]}, {'end': 2262.539, 'segs': [{'end': 1330.075, 'src': 'embed', 'start': 1302.484, 'weight': 0, 'content': [{'end': 1305.045, 'text': 'which is what that little warning is complaining about.', 'start': 1302.484, 'duration': 2.561}, {'end': 1307.306, 'text': 'I could also do read int, do whatever.', 'start': 1305.045, 'duration': 2.261}, {'end': 1309.307, 'text': 'I had my math library.', 'start': 1307.306, 'duration': 2.001}, {'end': 1312.288, 'text': 'I showed you how to import that inside of the terminal.', 'start': 1309.307, 'duration': 2.981}, {'end': 1319.951, 'text': "you do it pretty much the same way inside as the compiled version of Scala here, and then I'm also going to import a library for using array buffers,", 'start': 1312.288, 'duration': 7.663}, {'end': 1322.692, 'text': "which we'll see later, and print writer and source,", 'start': 1319.951, 'duration': 2.741}, {'end': 1327.934, 'text': "which is going to allow us to print to a file and then read from a file which we're going to see here in a moment.", 'start': 1322.692, 'duration': 5.242}, {'end': 1330.075, 'text': "And then we'll come in here and execute this.", 'start': 1328.074, 'duration': 2.001}], 'summary': 'Imported math library and other necessary libraries for file handling in scala.', 'duration': 27.591, 'max_score': 1302.484, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1302484.jpg'}, {'end': 1368.899, 'src': 'embed', 'start': 1338.722, 'weight': 4, 'content': [{'end': 1343.305, 'text': "So that's exactly how we would import data or get data from the console.", 'start': 1338.722, 'duration': 4.583}, {'end': 1345.907, 'text': 'And a couple different ways we can print that information out.', 'start': 1343.665, 'duration': 2.242}, {'end': 1349.569, 'text': "let's go in here and cover a couple other different ways to output data.", 'start': 1346.267, 'duration': 3.302}, {'end': 1352.51, 'text': "let's create a couple different variables.", 'start': 1349.569, 'duration': 2.941}, {'end': 1358.874, 'text': "there's my name, age, weight, and i'll show you how we can use some styling using print line.", 'start': 1352.51, 'duration': 6.364}, {'end': 1363.696, 'text': "you could also come in here and type in s like that and we'll be able to go hello,", 'start': 1358.874, 'duration': 4.822}, {'end': 1368.899, 'text': "followed with whatever the variable is that you'd like to print out there on the screen and that's going to work well.", 'start': 1363.696, 'duration': 5.203}], 'summary': 'Demonstrated importing, printing, and styling data using variables and print line in programming.', 'duration': 30.177, 'max_score': 1338.722, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1338722.jpg'}, {'end': 1449.42, 'src': 'embed', 'start': 1421.418, 'weight': 1, 'content': [{'end': 1424.74, 'text': 'for any floating point numbers and then s for any strings.', 'start': 1421.418, 'duration': 3.322}, {'end': 1426.802, 'text': 'A couple other things we can do here.', 'start': 1424.76, 'duration': 2.042}, {'end': 1428.002, 'text': 'We could go printf.', 'start': 1427.062, 'duration': 0.94}, {'end': 1429.989, 'text': "which we're going to use a lot.", 'start': 1428.988, 'duration': 1.001}, {'end': 1433.311, 'text': "And let's just talk about justification, how that's going to work for us.", 'start': 1430.269, 'duration': 3.042}, {'end': 1439.114, 'text': "If we wanted to have this right justify, let's say with a total of five spaces like that.", 'start': 1433.371, 'duration': 5.743}, {'end': 1443.877, 'text': "And I'll put another quote inside of here just so we can see that the justification is taking place.", 'start': 1439.374, 'duration': 4.503}, {'end': 1445.077, 'text': 'Could do it that way.', 'start': 1444.137, 'duration': 0.94}, {'end': 1449.42, 'text': 'We could also do left justification by putting a minus sign inside of there.', 'start': 1445.278, 'duration': 4.142}], 'summary': 'Using printf for formatting, right and left justification with total of five spaces.', 'duration': 28.002, 'max_score': 1421.418, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1421418.jpg'}, {'end': 1793.514, 'src': 'heatmap', 'start': 1743.811, 'weight': 0.733, 'content': [{'end': 1748.637, 'text': "we're also going to be able to come in here and get rid of this return altogether and get exactly the same results.", 'start': 1743.811, 'duration': 4.826}, {'end': 1750.479, 'text': 'so sometimes you use return mainly.', 'start': 1748.637, 'duration': 1.842}, {'end': 1756.065, 'text': "you use it just if you're used to other languages that use return, but other than that, scala doesn't require it,", 'start': 1750.479, 'duration': 5.586}, {'end': 1762.029, 'text': 'because it automatically outputs the value based off of the last line of code inside of your functions.', 'start': 1756.065, 'duration': 5.964}, {'end': 1766.451, 'text': "another thing we're going to be able to do is we could call this function, but let's say we wanted this.", 'start': 1762.029, 'duration': 4.422}, {'end': 1768.032, 'text': "in this situation it's not going to matter.", 'start': 1766.451, 'duration': 1.581}, {'end': 1776.097, 'text': "but let's say that we wanted to use named arguments inside of here so that num2 gets 5 and then num1 is going to get 4.", 'start': 1768.032, 'duration': 8.065}, {'end': 1779.179, 'text': "we can do it that way and of course you're going to get exactly the same results.", 'start': 1776.097, 'duration': 3.082}, {'end': 1787.851, 'text': "and then we have functions that do not return values and these are referred to as procedures inside of Scala and they're defined in the same exact way.", 'start': 1779.179, 'duration': 8.672}, {'end': 1791.453, 'text': "we could say say hi, see, there's no parameters inside of there.", 'start': 1787.851, 'duration': 3.602}, {'end': 1793.514, 'text': "in a situation which you're not returning anything,", 'start': 1791.453, 'duration': 2.061}], 'summary': "Scala functions can be used without 'return' and support named arguments, also includes procedures.", 'duration': 49.703, 'max_score': 1743.811, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1743811.jpg'}, {'end': 1809.043, 'src': 'embed', 'start': 1776.097, 'weight': 5, 'content': [{'end': 1779.179, 'text': "we can do it that way and of course you're going to get exactly the same results.", 'start': 1776.097, 'duration': 3.082}, {'end': 1787.851, 'text': "and then we have functions that do not return values and these are referred to as procedures inside of Scala and they're defined in the same exact way.", 'start': 1779.179, 'duration': 8.672}, {'end': 1791.453, 'text': "we could say say hi, see, there's no parameters inside of there.", 'start': 1787.851, 'duration': 3.602}, {'end': 1793.514, 'text': "in a situation which you're not returning anything,", 'start': 1791.453, 'duration': 2.061}, {'end': 1799.298, 'text': "you're going to put unit inside of there and then we just throw a simple print line inside of there and then this function, of course,", 'start': 1793.514, 'duration': 5.784}, {'end': 1802.98, 'text': "can be called just by going say hi, don't need to do anything else,", 'start': 1799.298, 'duration': 3.682}, {'end': 1809.043, 'text': "and you're going to see how the prints out there on the screen as well could also come in here and receive a variable number of arguments,", 'start': 1802.98, 'duration': 6.063}], 'summary': "Scala has procedures that don't return values, using 'unit' and can take variable number of arguments.", 'duration': 32.946, 'max_score': 1776.097, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1776097.jpg'}, {'end': 1927.838, 'src': 'embed', 'start': 1900.595, 'weight': 6, 'content': [{'end': 1906.518, 'text': "this is the recursion part where it's calling a function is calling itself, and I'll give you an example of exactly how this is going to work.", 'start': 1900.595, 'duration': 5.923}, {'end': 1914.366, 'text': "Well, we go in here and actually run it first. call the factorial pass in a 4 inside of it, execute it and then we'll go through exactly how it works.", 'start': 1906.803, 'duration': 7.563}, {'end': 1916.807, 'text': 'So you can see right there it comes back with a final value of 24.', 'start': 1914.406, 'duration': 2.401}, {'end': 1920.748, 'text': "Well, how exactly does that work? Well, let's walk you by step by step.", 'start': 1916.807, 'duration': 3.941}, {'end': 1927.838, 'text': "What it's going to do in its first pass through this is num, of course, is going to have a value of 4.", 'start': 1921.032, 'duration': 6.806}], 'summary': 'Recursion: calling a function on itself with an example of factorial calculation resulting in 24.', 'duration': 27.243, 'max_score': 1900.595, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1900595.jpg'}, {'end': 2030.556, 'src': 'embed', 'start': 2003.778, 'weight': 7, 'content': [{'end': 2008.781, 'text': "Now when it comes to should I use an array or an array buffer, it's basically going to come down to one thing.", 'start': 2003.778, 'duration': 5.003}, {'end': 2014.984, 'text': "You're going to use arrays whenever the size of the array or the number of pieces of data are going to be fixed.", 'start': 2008.981, 'duration': 6.003}, {'end': 2022.269, 'text': "You're going to use an array buffer whenever you're going to have a variable number of data stored inside of an array type structure.", 'start': 2015.305, 'duration': 6.964}, {'end': 2026.392, 'text': "Now if you want to create, I'm going to cover both array buffers and arrays, of course.", 'start': 2022.509, 'duration': 3.883}, {'end': 2030.556, 'text': "So let's go and let's just create an array called favorite numbers.", 'start': 2026.633, 'duration': 3.923}], 'summary': 'Use arrays for fixed size data, array buffer for variable data.', 'duration': 26.778, 'max_score': 2003.778, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2003778.jpg'}, {'end': 2196.553, 'src': 'heatmap', 'start': 2106.34, 'weight': 0.746, 'content': [{'end': 2109.763, 'text': "plus equal to, and let's say we want to throw a mark inside of there.", 'start': 2106.34, 'duration': 3.423}, {'end': 2111.003, 'text': "that's going to work for us.", 'start': 2109.763, 'duration': 1.24}, {'end': 2116.668, 'text': 'we could also come in and add multiple different values just by going plus plus equal to,', 'start': 2111.003, 'duration': 5.665}, {'end': 2121.871, 'text': "and we could just structure this like an array and it's automatically going to fit right into our array buffer.", 'start': 2116.668, 'duration': 5.203}, {'end': 2124.233, 'text': "so let's say we got suzy and paul.", 'start': 2121.871, 'duration': 2.362}, {'end': 2127.075, 'text': 'we could also add items starting at the second slot.', 'start': 2124.233, 'duration': 2.842}, {'end': 2134.612, 'text': 'so this can go friends, two dot insert and second slot in this situation is going to be one and we go mike, Mary and Sue.', 'start': 2127.075, 'duration': 7.537}, {'end': 2137.295, 'text': 'You can see we can add a whole bunch of values all at one time.', 'start': 2134.892, 'duration': 2.403}, {'end': 2139.898, 'text': 'We could also come in and remove an item.', 'start': 2137.315, 'duration': 2.583}, {'end': 2143.823, 'text': 'So we could say remove two elements starting at the second index.', 'start': 2140.259, 'duration': 3.564}, {'end': 2145.645, 'text': 'Well, the second index is going to be one.', 'start': 2143.863, 'duration': 1.782}, {'end': 2147.965, 'text': "and there's the two items we want to remove.", 'start': 2146.204, 'duration': 1.761}, {'end': 2151.128, 'text': 'And then we can come in here and cycle through these guys.', 'start': 2148.186, 'duration': 2.942}, {'end': 2156.632, 'text': "So let's just say friend, let's create a string, equal to, give an initial value of nothing.", 'start': 2151.388, 'duration': 5.244}, {'end': 2161.656, 'text': 'And then, if we want to cycle through them, of course temporarily store them in the friend variable.', 'start': 2156.792, 'duration': 4.864}, {'end': 2163.717, 'text': "friends two is what we're going to be cycling through.", 'start': 2161.656, 'duration': 2.061}, {'end': 2169.982, 'text': 'And then go print line, friend, and you can say it went and printed out, Phil, Sam, Mary Sue, Mark, Susie, and Paul.', 'start': 2163.977, 'duration': 6.005}, {'end': 2174.444, 'text': "So that's how we can insert, remove, and do all kinds of other different things with array buffers.", 'start': 2170.242, 'duration': 4.202}, {'end': 2180.646, 'text': "Let's go and use the favorite numbers array up here just to show you how we can fill an array in other different ways.", 'start': 2174.784, 'duration': 5.862}, {'end': 2183.367, 'text': "Let's try using a loop here because that's kind of easy.", 'start': 2180.987, 'duration': 2.38}, {'end': 2192.191, 'text': "Let's go j and then we'll go 0,, 2, and then, if we want to get the length of our array like that minus 1,", 'start': 2183.688, 'duration': 8.503}, {'end': 2196.553, 'text': "that's going to give us all the different values inside of our array that we're going to be cycling through.", 'start': 2192.191, 'duration': 4.362}], 'summary': 'Demonstrating array manipulation and iteration with examples of insertion, removal, and filling using array buffers.', 'duration': 90.213, 'max_score': 2106.34, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2106340.jpg'}], 'start': 1262.11, 'title': 'Scala functions', 'summary': 'Covers printing functions, string manipulation, creating functions in scala, including printf, importing libraries, manipulating strings, creating functions with default parameters and return types, return statements, named arguments, procedures, variable number of arguments, recursion with factorial example, and working with arrays and array buffers.', 'chapters': [{'end': 1736.221, 'start': 1262.11, 'title': 'Print functions and string manipulation in scala', 'summary': 'Covers printing functions using printf, importing libraries, manipulating strings, and creating functions in scala, with examples, including using printf to format output, importing libraries, manipulating strings, and creating functions with default parameters and return types.', 'duration': 474.111, 'highlights': ['The chapter covers printing functions using printf, importing libraries, manipulating strings, and creating functions in Scala, with examples, including using printf to format output, importing libraries, manipulating strings, and creating functions with default parameters and return types. Covering printing functions using printf, importing libraries, manipulating strings, and creating functions in Scala, with examples.', 'The chapter demonstrates using printf to format output, importing libraries, manipulating strings, and creating functions with default parameters and return types. Demonstrating using printf to format output, importing libraries, manipulating strings, and creating functions with default parameters and return types.', 'Importing libraries for using array buffers, print writer, and source, and executing the code to remove deprecation warnings. Importing libraries for using array buffers, print writer, and source, and executing the code to remove deprecation warnings.', 'Demonstrating different ways to output data, including using print line, s, and f to style output and perform calculations. Demonstrating different ways to output data, including using print line, s, and f to style output and perform calculations.', 'Explaining the usage of special characters and formatting options in printf, including justification, zero-filling, and decimal places. Explaining the usage of special characters and formatting options in printf, including justification, zero-filling, and decimal places.']}, {'end': 2262.539, 'start': 1736.221, 'title': 'Scala functions, recursion, and arrays', 'summary': 'Covers scala functions, including return statements, named arguments, procedures, and variable number of arguments, recursion with factorial example, and working with arrays and array buffers in scala.', 'duration': 526.318, 'highlights': ['Scala functions and return statements Functions in Scala automatically output the value based on the last line of code, but return statements can be used if familiar with other languages, such as when defining procedures or working with named arguments.', 'Recursion with factorial example Explains how recursion works with a factorial example, showing step by step how the recursive function calls itself to calculate the factorial of a number, and demonstrates the final value of 24 for factorial of 4.', 'Working with arrays and array buffers Covers the use of arrays for fixed-size data and array buffers for variable-size data, including creating, initializing, modifying, and cycling through arrays and array buffers, as well as using yield for formatting data and performing calculations.']}], 'duration': 1000.429, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M1262110.jpg', 'highlights': ['Covers printing functions using printf, importing libraries, manipulating strings, and creating functions in Scala, with examples.', 'Demonstrates using printf to format output, importing libraries, manipulating strings, and creating functions with default parameters and return types.', 'Explaining the usage of special characters and formatting options in printf, including justification, zero-filling, and decimal places.', 'Importing libraries for using array buffers, print writer, and source, and executing the code to remove deprecation warnings.', 'Demonstrating different ways to output data, including using print line, s, and f to style output and perform calculations.', 'Scala functions and return statements Functions in Scala automatically output the value based on the last line of code, but return statements can be used if familiar with other languages, such as when defining procedures or working with named arguments.', 'Recursion with factorial example Explains how recursion works with a factorial example, showing step by step how the recursive function calls itself to calculate the factorial of a number, and demonstrates the final value of 24 for factorial of 4.', 'Working with arrays and array buffers Covers the use of arrays for fixed-size data and array buffers for variable-size data, including creating, initializing, modifying, and cycling through arrays and array buffers, as well as using yield for formatting data and performing calculations.']}, {'end': 2666.885, 'segs': [{'end': 2287.403, 'src': 'embed', 'start': 2262.539, 'weight': 4, 'content': [{'end': 2268.422, 'text': 'and another way that we could print out those is just by going for each and then throw print line inside of there.', 'start': 2262.539, 'duration': 5.883}, {'end': 2272.864, 'text': "And it's going to multiply all those different values times two, as you can see it did right there on the screen.", 'start': 2268.682, 'duration': 4.182}, {'end': 2278.556, 'text': "Another thing you could do, which is neat, is we'd also be able to store values that match conditions.", 'start': 2273.151, 'duration': 5.405}, {'end': 2284.481, 'text': "So we'll say favorite nums divided by 4 equal to, say, 4.", 'start': 2278.696, 'duration': 5.785}, {'end': 2287.403, 'text': "This is more of the functional part of Scala, what you're seeing here.", 'start': 2284.481, 'duration': 2.922}], 'summary': "Using 'foreach' to print values, multiplying by 2, and storing values that match conditions in scala.", 'duration': 24.864, 'max_score': 2262.539, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2262539.jpg'}, {'end': 2347.953, 'src': 'embed', 'start': 2319.281, 'weight': 0, 'content': [{'end': 2326.164, 'text': "we could also come in and, of course, and create multi-dimensional arrays, and we'll be able to just go malt.", 'start': 2319.281, 'duration': 6.883}, {'end': 2333.067, 'text': "let's create a multiplication table here and with multi-dimensional array you need to go array dot of dim,", 'start': 2326.164, 'duration': 6.903}, {'end': 2336.488, 'text': "And then you're going to define the data type that's stored inside of it.", 'start': 2333.467, 'duration': 3.021}, {'end': 2342.191, 'text': 'Then you need to decide or define the size of the multidimensional reg to make this 10 by 10.', 'start': 2336.708, 'duration': 5.483}, {'end': 2347.953, 'text': 'We then go for I cycle through zero through nine for this guy.', 'start': 2342.191, 'duration': 5.762}], 'summary': 'Creating a 10x10 multiplication table using multi-dimensional arrays.', 'duration': 28.672, 'max_score': 2319.281, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2319281.jpg'}, {'end': 2416.999, 'src': 'embed', 'start': 2389.108, 'weight': 2, 'content': [{'end': 2392.631, 'text': "and we'll throw in a new line and we'll throw i and j.", 'start': 2389.108, 'duration': 3.523}, {'end': 2399.658, 'text': 'and then, if you want to get the value from the multi-dimensional array, just throw the i part in there and the j part in there as well.', 'start': 2392.631, 'duration': 7.027}, {'end': 2403.742, 'text': 'and there you can see it printed, all those different multiplication tables out there on our screen.', 'start': 2399.658, 'duration': 4.084}, {'end': 2406.512, 'text': "That's how we can use multi-dimensional arrays.", 'start': 2404.13, 'duration': 2.382}, {'end': 2409.594, 'text': "Another thing that's kind of neat is we could also come in here.", 'start': 2406.532, 'duration': 3.062}, {'end': 2412.356, 'text': "There's a whole bunch of different functions that are available to us.", 'start': 2409.654, 'duration': 2.702}, {'end': 2416.999, 'text': "So let's say we wanted to sum all the values in an array for us.", 'start': 2412.696, 'duration': 4.303}], 'summary': 'Demonstrating accessing and utilizing multi-dimensional arrays and functions in programming.', 'duration': 27.891, 'max_score': 2389.108, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2389108.jpg'}, {'end': 2496.895, 'src': 'embed', 'start': 2466.913, 'weight': 3, 'content': [{'end': 2469.735, 'text': 'And this is going to give us a sorting of descending.', 'start': 2466.913, 'duration': 2.822}, {'end': 2473.798, 'text': "If you wanted ascending, you'd put it this way, descending this way.", 'start': 2469.955, 'duration': 3.843}, {'end': 2479.962, 'text': 'And then another little trick is we can return an index sequence and convert it into a string with commas.', 'start': 2474.018, 'duration': 5.944}, {'end': 2481.884, 'text': "So let's see how that works.", 'start': 2480.402, 'duration': 1.482}, {'end': 2483.486, 'text': "Let's just use print line here.", 'start': 2482.264, 'duration': 1.222}, {'end': 2488.712, 'text': 'And we could go sorted numbers, deep, make string, like that.', 'start': 2483.886, 'duration': 4.826}, {'end': 2492.096, 'text': 'And then if we want to separate it with commas, we just put it in there like that.', 'start': 2488.912, 'duration': 3.184}, {'end': 2494.073, 'text': 'And if we execute it, you can see it did.', 'start': 2492.492, 'duration': 1.581}, {'end': 2496.895, 'text': 'See it automatically because of this guy right here.', 'start': 2494.333, 'duration': 2.562}], 'summary': 'Demonstrates sorting in descending order and converting to string with commas.', 'duration': 29.982, 'max_score': 2466.913, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2466913.jpg'}, {'end': 2560.488, 'src': 'embed', 'start': 2528.465, 'weight': 1, 'content': [{'end': 2528.945, 'text': 'There we go.', 'start': 2528.465, 'duration': 0.48}, {'end': 2530.785, 'text': 'And to create a map, we just go map.', 'start': 2529.305, 'duration': 1.48}, {'end': 2532.766, 'text': 'And then this is going to be the key.', 'start': 2531.005, 'duration': 1.761}, {'end': 2536.346, 'text': 'So this manager followed by a dash, like a little arrow.', 'start': 2533.086, 'duration': 3.26}, {'end': 2539.667, 'text': 'And we could say Bob Smith is the manager.', 'start': 2536.566, 'duration': 3.101}, {'end': 2542.318, 'text': 'And we can put as many of these in here as we would like.', 'start': 2540.077, 'duration': 2.241}, {'end': 2548.262, 'text': "This map in this situation is going to be immutable, which just means the values can't be changed after they're created.", 'start': 2542.578, 'duration': 5.684}, {'end': 2551.143, 'text': "I'll show you how to create mutable ones as well.", 'start': 2548.522, 'duration': 2.621}, {'end': 2555.666, 'text': "And secretary, and then let's have Sue Brown be the secretary.", 'start': 2551.523, 'duration': 4.143}, {'end': 2560.488, 'text': "We could then get the value from this employee's map.", 'start': 2555.886, 'duration': 4.602}], 'summary': 'Demonstration of creating an immutable map with managers and secretaries.', 'duration': 32.023, 'max_score': 2528.465, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2528465.jpg'}], 'start': 2262.539, 'title': 'Scala functional programming and arrays, maps, and functions', 'summary': 'Introduces functional programming in scala, demonstrating operations like multiplying values by 2 and creating a 10x10 multiplication table with multi-dimensional arrays, and covers the usage of multi-dimensional arrays, array functions like sum, min, max, and sorting, the creation and manipulation of maps, and the distinction between mutable and immutable maps in programming.', 'chapters': [{'end': 2389.108, 'start': 2262.539, 'title': 'Scala functional programming', 'summary': 'Introduces functional programming in scala, demonstrating operations like multiplying values by 2, filtering values based on conditions, and creating a 10x10 multiplication table with multi-dimensional arrays.', 'duration': 126.569, 'highlights': ['Demonstrating operations like multiplying values by 2 The chapter showcases the functionality of multiplying all values by 2, providing a visual demonstration on the screen.', 'Filtering values based on conditions Illustrates the capability to store values matching specific conditions and printing out only the values that are evenly divisible by four, showcasing the functional part of Scala.', 'Creating a 10x10 multiplication table with multi-dimensional arrays The chapter presents the process of creating a multi-dimensional array representing a 10x10 multiplication table, demonstrating the use of for loops and printf to print out the calculated values.']}, {'end': 2666.885, 'start': 2389.108, 'title': 'Arrays, maps, and functions in programming', 'summary': 'Covers the usage of multi-dimensional arrays, array functions like sum, min, max, and sorting; the creation and manipulation of maps; and the distinction between mutable and immutable maps in programming.', 'duration': 277.777, 'highlights': ['The chapter covers the usage of multi-dimensional arrays and the retrieval of values with indices i and j. It demonstrates how to access and print values from multi-dimensional arrays using indices, showcasing the practical application of multi-dimensional arrays in programming.', 'The usage of array functions like sum, min, and max is explained, along with their practical application. The chapter explains the usage of functions like sum, min, and max to perform operations on arrays, providing practical examples and showcasing the functionality of these array functions.', 'The sorting of arrays in ascending or descending order is presented, along with the conversion of index sequences into strings with commas. It illustrates the process of sorting arrays in ascending or descending order, and converting index sequences into strings with commas, demonstrating practical techniques for manipulating arrays in programming.', 'The creation and manipulation of maps, including the distinction between mutable and immutable maps, is covered. The chapter provides an overview of creating and manipulating maps, emphasizing the difference between mutable and immutable maps and their practical implications in programming.']}], 'duration': 404.346, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2262539.jpg', 'highlights': ['Creating a 10x10 multiplication table with multi-dimensional arrays', 'The creation and manipulation of maps, including the distinction between mutable and immutable maps, is covered', 'The chapter covers the usage of multi-dimensional arrays and the retrieval of values with indices i and j', 'The sorting of arrays in ascending or descending order is presented, along with the conversion of index sequences into strings with commas', 'Demonstrating operations like multiplying values by 2 The chapter showcases the functionality of multiplying all values by 2, providing a visual demonstration on the screen']}, {'end': 3098.209, 'segs': [{'end': 2709.253, 'src': 'embed', 'start': 2684.561, 'weight': 0, 'content': [{'end': 2690.048, 'text': 'And now we can just get the key, throw it where it needs to go, and the value and throw it where it needs to go.', 'start': 2684.561, 'duration': 5.487}, {'end': 2695.642, 'text': 'And if we do that, you can see it prints out the keys and the values for everything in the map.', 'start': 2690.478, 'duration': 5.164}, {'end': 2698.865, 'text': "And that's the vast majority of what we need to know about maps.", 'start': 2695.862, 'duration': 3.003}, {'end': 2701.707, 'text': "So now let's go and take a look at tuples.", 'start': 2698.885, 'duration': 2.822}, {'end': 2707.031, 'text': "Now, tuples are going to hold values of numerous different types, but they're normally immutable.", 'start': 2701.827, 'duration': 5.204}, {'end': 2709.253, 'text': "So let's go and create a tuple.", 'start': 2707.371, 'duration': 1.882}], 'summary': 'Introduction to maps and tuples in programming.', 'duration': 24.692, 'max_score': 2684.561, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2684561.jpg'}, {'end': 2824.556, 'src': 'heatmap', 'start': 2768.415, 'weight': 0.741, 'content': [{'end': 2778.598, 'text': "So let's go tuple merge product iterator and then call for each and then go and get all those different values and print them out on the screen.", 'start': 2768.415, 'duration': 10.183}, {'end': 2782.099, 'text': 'And there you can see, printed all those out on the screen, all on separate lines.', 'start': 2778.798, 'duration': 3.301}, {'end': 2789.001, 'text': "And if you'd want to convert a tuple to a string, all you would do, let's just go into it inside of a print line.", 'start': 2782.659, 'duration': 6.342}, {'end': 2790.822, 'text': 'We could say tuple merge.', 'start': 2789.201, 'duration': 1.621}, {'end': 2792.607, 'text': 'And call to string on it.', 'start': 2791.286, 'duration': 1.321}, {'end': 2795.848, 'text': 'To string is available for a lot of different things inside of Scala.', 'start': 2792.627, 'duration': 3.221}, {'end': 2799.009, 'text': 'And you can see it printed out all that information for that tuple.', 'start': 2796.188, 'duration': 2.821}, {'end': 2803.471, 'text': "So that's a rough overview of how we're going to use tuples.", 'start': 2799.169, 'duration': 4.302}, {'end': 2805.292, 'text': "Now let's take a look at classes.", 'start': 2803.871, 'duration': 1.421}, {'end': 2813.469, 'text': 'Okay, like any other object-oriented programming language, classes are going to be used as blueprints to create real-world objects.', 'start': 2806.365, 'duration': 7.104}, {'end': 2819.093, 'text': 'And those objects are going to define attributes which are called fields in an object-oriented world,', 'start': 2813.95, 'duration': 5.143}, {'end': 2822.175, 'text': 'and capabilities of those objects which are called methods.', 'start': 2819.093, 'duration': 3.082}, {'end': 2824.556, 'text': "And we're going to define them outside of main.", 'start': 2822.535, 'duration': 2.021}], 'summary': 'Using tuples and classes in scala to store and manipulate data.', 'duration': 56.141, 'max_score': 2768.415, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2768415.jpg'}, {'end': 2919.891, 'src': 'heatmap', 'start': 2860.962, 'weight': 0.703, 'content': [{'end': 2868.386, 'text': 'so first thing I want to do here is also before anything else happens, this is also part of the default constructor,', 'start': 2860.962, 'duration': 7.424}, {'end': 2876.831, 'text': "which is going to be the function in the code that's going to execute first whenever a new object of type animal is going to be created.", 'start': 2868.386, 'duration': 8.445}, {'end': 2878.011, 'text': 'this is a little bit weird.', 'start': 2876.831, 'duration': 1.18}, {'end': 2882.517, 'text': 'so what I want to do here is I want to call this this animal.', 'start': 2878.011, 'duration': 4.506}, {'end': 2886.263, 'text': "I'm going to call a function I'm going to create here in a second, called setName,", 'start': 2882.517, 'duration': 3.746}, {'end': 2895.392, 'text': "because I'm going to have some of this data be protected so that we will be able to verify or only allow certain names to be assigned to certain animals.", 'start': 2886.263, 'duration': 9.129}, {'end': 2901.737, 'text': 'So this, in essence, right here is a constructor where we are going to be accepting a name,', 'start': 2895.712, 'duration': 6.025}, {'end': 2910.484, 'text': "we're going to be accepting a sound and we're specifically going to allow them to set the name, how we define them to allow it to occur.", 'start': 2901.737, 'duration': 8.747}, {'end': 2919.891, 'text': "Another thing that's a little bit odd with Scala is that there are not static variables and static methods like in Java for example.", 'start': 2910.764, 'duration': 9.127}], 'summary': 'Defining a constructor in scala with specific name and sound properties, and addressing differences with java.', 'duration': 58.929, 'max_score': 2860.962, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2860962.jpg'}, {'end': 2919.891, 'src': 'embed', 'start': 2895.712, 'weight': 1, 'content': [{'end': 2901.737, 'text': 'So this, in essence, right here is a constructor where we are going to be accepting a name,', 'start': 2895.712, 'duration': 6.025}, {'end': 2910.484, 'text': "we're going to be accepting a sound and we're specifically going to allow them to set the name, how we define them to allow it to occur.", 'start': 2901.737, 'duration': 8.747}, {'end': 2919.891, 'text': "Another thing that's a little bit odd with Scala is that there are not static variables and static methods like in Java for example.", 'start': 2910.764, 'duration': 9.127}], 'summary': 'Scala constructor allows setting name and sound. no static variables or methods as in java.', 'duration': 24.179, 'max_score': 2895.712, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2895712.jpg'}, {'end': 3006.847, 'src': 'embed', 'start': 2979.52, 'weight': 2, 'content': [{'end': 2983.321, 'text': "And if it's public, it's basically going to be data that can be accessed from anything.", 'start': 2979.52, 'duration': 3.801}, {'end': 2989.803, 'text': "But, like I said, I'm not going to use that here, because I'm defining all those different types up here inside of my primary constructor,", 'start': 2983.461, 'duration': 6.342}, {'end': 2991.083, 'text': 'which is what Scala calls it.', 'start': 2989.803, 'duration': 1.28}, {'end': 2996.085, 'text': "I'm now going to come in here and define getters and setters that are going to be used to protect our data.", 'start': 2991.323, 'duration': 4.762}, {'end': 2999.366, 'text': "Now the get name part isn't really going to protect anything.", 'start': 2996.425, 'duration': 2.941}, {'end': 3000.926, 'text': "It's just going to return values.", 'start': 2999.386, 'duration': 1.54}, {'end': 3004.667, 'text': "And you can see that it's going to work just like any other function.", 'start': 3001.346, 'duration': 3.321}, {'end': 3006.847, 'text': "that we've come across here so far.", 'start': 3005.046, 'duration': 1.801}], 'summary': 'In scala, defining getters and setters for data protection, functioning like any other function.', 'duration': 27.327, 'max_score': 2979.52, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2979520.jpg'}], 'start': 2666.906, 'title': 'Working with maps, tuples, and classes in python and scala', 'summary': 'Covers looping through maps and working with tuples in python, and the usage of tuples and classes in scala. it includes iterating through a tuple, creating and defining fields and methods in a class, and implementing data protection with examples of using regular expressions to restrict input.', 'chapters': [{'end': 2747.783, 'start': 2666.906, 'title': 'Looping through maps and working with tuples', 'summary': 'Covers looping through maps and working with tuples in python, demonstrating how to print keys and values from a map and create and access values in a tuple.', 'duration': 80.877, 'highlights': ['The chapter demonstrates looping through maps in Python and printing out keys and values for everything in the map, providing a comprehensive understanding of working with maps.', 'It also showcases the creation and access of values in a tuple, emphasizing the ability to hold values of different types and access specific values within the tuple.']}, {'end': 2919.891, 'start': 2747.883, 'title': 'Scala tuples and classes overview', 'summary': 'Covers the usage of tuples and classes in scala, including iterating through a tuple using a product iterator, converting a tuple to a string, and creating and defining fields and methods in a class. it also discusses the default constructor and the usage of protected data in scala.', 'duration': 172.008, 'highlights': ['Iterating through a tuple using a product iterator and printing the values on separate lines. The chapter demonstrates the usage of a product iterator to iterate through a tuple and prints the values on separate lines, providing practical insight into tuple manipulation.', 'Converting a tuple to a string using the toString method. The chapter explains the process of converting a tuple to a string using the toString method, highlighting the versatility of Scala in handling different data types.', 'Creating and defining fields and methods in a class, including the usage of a default constructor. The chapter delves into creating a class in Scala, defining fields and methods, and elucidating the concept of a default constructor, providing a foundation for object-oriented programming in Scala.', "Usage of protected data to restrict and verify the assignment of certain names to specific animals. The chapter discusses the implementation of protected data in Scala to control and validate the assignment of names to animals, showcasing the language's robustness in managing data access."]}, {'end': 3098.209, 'start': 2920.276, 'title': 'Scala class constructor and data protection', 'summary': 'Discusses creating an animal class in scala, defining protected, private, and public fields, and implementing getters and setters to protect data, with examples of using regular expressions to restrict input.', 'duration': 177.933, 'highlights': ['The chapter discusses creating an animal class in Scala, defining protected, private, and public fields, and implementing getters and setters to protect data, with examples of using regular expressions to restrict input.', "Protected fields can only be accessed directly by methods defined inside of the class or by subclasses, while private fields can't be accessed by subclasses or inheriting classes.", 'The get name and get sound functions are used to return the stored values, and the set name function restricts input using regular expressions to disallow numbers in the name.']}], 'duration': 431.303, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M2666906.jpg', 'highlights': ['The chapter demonstrates looping through maps in Python and printing out keys and values for everything in the map, providing a comprehensive understanding of working with maps.', 'Creating and defining fields and methods in a class, including the usage of a default constructor, providing a foundation for object-oriented programming in Scala.', 'The chapter discusses creating an animal class in Scala, defining protected, private, and public fields, and implementing getters and setters to protect data, with examples of using regular expressions to restrict input.']}, {'end': 3727.964, 'segs': [{'end': 3137.581, 'src': 'embed', 'start': 3098.209, 'weight': 0, 'content': [{'end': 3104.972, 'text': "that's why I'm using getters and setters and I'm gonna give it a default name of no name to show that it was not set.", 'start': 3098.209, 'duration': 6.763}, {'end': 3110.735, 'text': 'we can also come in here and do the same thing with set sound, except in this situation.', 'start': 3104.972, 'duration': 5.763}, {'end': 3117.113, 'text': "I'm just gonna let this be perfectly fine, allowing them to directly Go in there and change the sound for my animal.", 'start': 3110.735, 'duration': 6.378}, {'end': 3122.981, 'text': 'And once again, if I want to change the specific sound, I just do this sound and pass in sound.', 'start': 3117.414, 'duration': 5.567}, {'end': 3130.091, 'text': 'So you may say to yourself well, what happens if they try to create an animal object but you do not have a name or a string or whatever?', 'start': 3123.242, 'duration': 6.849}, {'end': 3135.099, 'text': "Remember, this is the default constructor that's going to be called to create new animal objects.", 'start': 3130.356, 'duration': 4.743}, {'end': 3137.581, 'text': 'Well, we can also have a whole bunch of other constructors.', 'start': 3135.379, 'duration': 2.202}], 'summary': 'Using getters and setters for default name and sound in animal object creation.', 'duration': 39.372, 'max_score': 3098.209, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3098209.jpg'}, {'end': 3226.788, 'src': 'embed', 'start': 3199.944, 'weight': 3, 'content': [{'end': 3203.467, 'text': 'Okay? So those are the constructors, and they work very much like they work.', 'start': 3199.944, 'duration': 3.523}, {'end': 3205.45, 'text': 'in other object-oriented languages.', 'start': 3203.809, 'duration': 1.641}, {'end': 3207.552, 'text': 'You can also override methods.', 'start': 3205.831, 'duration': 1.721}, {'end': 3214.918, 'text': 'So one method that is available in Scala with every object you create is called toString.', 'start': 3208.153, 'duration': 6.765}, {'end': 3222.564, 'text': "If I want to override any method, whether it's pre-built in or I want to override a method whenever I inherit from it,", 'start': 3215.338, 'duration': 7.226}, {'end': 3226.788, 'text': 'I just type in override toString and then I can define exactly what I want it to do.', 'start': 3222.564, 'duration': 4.224}], 'summary': 'Scala constructors and method overriding demonstrated, including tostring method.', 'duration': 26.844, 'max_score': 3199.944, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3199944.jpg'}, {'end': 3361.264, 'src': 'heatmap', 'start': 3270.239, 'weight': 0.832, 'content': [{'end': 3274.542, 'text': "Remember up here I said I called a function and we're going to have to do new,", 'start': 3270.239, 'duration': 4.303}, {'end': 3283.047, 'text': 'different ways of creating static methods or static functions inside of Scala versus what we would have inside of other languages like Java.', 'start': 3274.542, 'duration': 8.505}, {'end': 3288.13, 'text': "Now what I'm going to do, I'm going to make sure I'm outside of this class area and I'm going to come down here right afterwards.", 'start': 3283.307, 'duration': 4.823}, {'end': 3295.392, 'text': "And I'm going to create a companion object for my class, which is where we would be able to find static class variables and functions.", 'start': 3288.65, 'duration': 6.742}, {'end': 3300.774, 'text': "And how it's created is you go object and give it exactly the same name as your class.", 'start': 3295.872, 'duration': 4.902}, {'end': 3302.694, 'text': "So it's going to be animal in this situation.", 'start': 3300.834, 'duration': 1.86}, {'end': 3304.995, 'text': 'And you want to create a static.', 'start': 3303.074, 'duration': 1.921}, {'end': 3306.675, 'text': "I mean, that's what it's called in Java.", 'start': 3305.295, 'duration': 1.38}, {'end': 3310.616, 'text': 'Field, you would go ID number is equal to zero like this.', 'start': 3306.955, 'duration': 3.661}, {'end': 3311.657, 'text': 'And private.', 'start': 3311.077, 'duration': 0.58}, {'end': 3315.998, 'text': 'And we could create a static function, new ID number.', 'start': 3312.157, 'duration': 3.841}, {'end': 3318.115, 'text': 'is equal to and inside of.', 'start': 3316.494, 'duration': 1.621}, {'end': 3319.817, 'text': 'here we can perform some operation,', 'start': 3318.115, 'duration': 1.702}, {'end': 3327.603, 'text': 'like we can take this number and just increment it so that we will know that each animal object is going to have a unique ID and then,', 'start': 3319.817, 'duration': 7.786}, {'end': 3331.006, 'text': "after it does that calculation, it's going to return the ID number.", 'start': 3327.603, 'duration': 3.403}, {'end': 3337.271, 'text': "so that's how we would create static fields and static functions inside of Scala as well, and that, of course,", 'start': 3331.006, 'duration': 6.265}, {'end': 3342.636, 'text': 'is what this is referring to see new ID number and if we come down here, a new ID number, this is a function.', 'start': 3337.271, 'duration': 5.365}, {'end': 3345.65, 'text': "So now let's go and create some objects using this class.", 'start': 3342.887, 'duration': 2.763}, {'end': 3347.231, 'text': 'Come back up inside of main.', 'start': 3345.89, 'duration': 1.341}, {'end': 3348.913, 'text': "I'm going to create one.", 'start': 3347.651, 'duration': 1.262}, {'end': 3350.454, 'text': "I'm going to call it rover.", 'start': 3348.933, 'duration': 1.521}, {'end': 3352.996, 'text': 'And I could just go new animal like that.', 'start': 3350.774, 'duration': 2.222}, {'end': 3359.042, 'text': 'I could then come in and go rover.setName and pass in rover like that.', 'start': 3353.277, 'duration': 5.765}, {'end': 3361.264, 'text': "Just make sure I don't put a number inside of there.", 'start': 3359.102, 'duration': 2.162}], 'summary': 'Creating static methods and fields in scala for unique id numbers and functions for objects.', 'duration': 91.025, 'max_score': 3270.239, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3270239.jpg'}, {'end': 3310.616, 'src': 'embed', 'start': 3283.307, 'weight': 2, 'content': [{'end': 3288.13, 'text': "Now what I'm going to do, I'm going to make sure I'm outside of this class area and I'm going to come down here right afterwards.", 'start': 3283.307, 'duration': 4.823}, {'end': 3295.392, 'text': "And I'm going to create a companion object for my class, which is where we would be able to find static class variables and functions.", 'start': 3288.65, 'duration': 6.742}, {'end': 3300.774, 'text': "And how it's created is you go object and give it exactly the same name as your class.", 'start': 3295.872, 'duration': 4.902}, {'end': 3302.694, 'text': "So it's going to be animal in this situation.", 'start': 3300.834, 'duration': 1.86}, {'end': 3304.995, 'text': 'And you want to create a static.', 'start': 3303.074, 'duration': 1.921}, {'end': 3306.675, 'text': "I mean, that's what it's called in Java.", 'start': 3305.295, 'duration': 1.38}, {'end': 3310.616, 'text': 'Field, you would go ID number is equal to zero like this.', 'start': 3306.955, 'duration': 3.661}], 'summary': "Creating a companion object for a class named 'animal' with a static field 'id number' set to zero.", 'duration': 27.309, 'max_score': 3283.307, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3283307.jpg'}, {'end': 3499.991, 'src': 'embed', 'start': 3474.428, 'weight': 4, 'content': [{'end': 3480.994, 'text': "gain all of the class that it's inheriting from all the fields and methods defined in animal in this situation.", 'start': 3474.428, 'duration': 6.566}, {'end': 3487.379, 'text': "And the only way that can't happen is if this guy up here is declared with final.", 'start': 3481.514, 'duration': 5.865}, {'end': 3492.704, 'text': "So if you do not want a class to be inherited from, declare it as final and you won't be able to do that.", 'start': 3487.599, 'duration': 5.105}, {'end': 3495.667, 'text': "But let's come in here and let's create a new class called dog.", 'start': 3492.904, 'duration': 2.763}, {'end': 3499.991, 'text': "It's also going to receive a string, a sound.", 'start': 3495.967, 'duration': 4.024}], 'summary': 'Inheritance in java allows classes to inherit fields and methods. declaring a class as final prevents inheritance.', 'duration': 25.563, 'max_score': 3474.428, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3474428.jpg'}, {'end': 3727.964, 'src': 'embed', 'start': 3703.181, 'weight': 5, 'content': [{'end': 3708.965, 'text': "Let's say mammal, and let's say it's going to get a name string just like before.", 'start': 3703.181, 'duration': 5.784}, {'end': 3712.588, 'text': 'And this is what we call an abstract field, moveSpeed.', 'start': 3709.446, 'duration': 3.142}, {'end': 3717.48, 'text': "It's just going to be a field that does not have a value assigned to it.", 'start': 3712.978, 'duration': 4.502}, {'end': 3718.92, 'text': 'So moveSpeed.', 'start': 3717.88, 'duration': 1.04}, {'end': 3726.463, 'text': "And an abstract method, likewise, is only going to define the parameters it gets, which this doesn't get any.", 'start': 3719.18, 'duration': 7.283}, {'end': 3727.964, 'text': "And it's going to have return type.", 'start': 3726.823, 'duration': 1.141}], 'summary': 'The transcript discusses defining an abstract field and method in a programming context.', 'duration': 24.783, 'max_score': 3703.181, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3703181.jpg'}], 'start': 3098.209, 'title': 'Scala properties and inheritance', 'summary': 'Explains the usage of getters and setters in scala, demonstrating default and additional constructors for creating new animal objects, and allowing direct changes to the sound for the animal. it also covers scala constructors, static methods, inheritance, and abstract classes, along with examples and explanations, highlighting the creation of static fields and functions, overriding methods, working with inherited values, and creating abstract classes.', 'chapters': [{'end': 3160.695, 'start': 3098.209, 'title': 'Using getters and setters in scala', 'summary': 'Explains the usage of getters and setters in scala, demonstrating default and additional constructors for creating new animal objects, and allowing direct changes to the sound for the animal.', 'duration': 62.486, 'highlights': ["The chapter demonstrates the usage of getters and setters in Scala, emphasizing the default name of 'no name' when not set, and the direct modification of the animal's sound.", 'It explains the usage of default and additional constructors in Scala for creating new animal objects with specified names and sounds.']}, {'end': 3727.964, 'start': 3160.735, 'title': 'Scala constructors, static methods, inheritance & abstract classes', 'summary': 'Covers scala constructors, static methods, inheritance, and abstract classes, along with examples and explanations, highlighting the creation of static fields and functions, overriding methods, working with inherited values, and creating abstract classes.', 'duration': 567.229, 'highlights': ['Creation of static fields and functions The chapter explains the creation of a companion object for the class, enabling the creation of static class variables and functions, with an example demonstrating the creation of a static ID number and a function to generate a unique ID for each animal object.', 'Overriding methods The chapter demonstrates the process of overriding methods in Scala, specifically the toString method, and provides an example of formatting a string using the toString method to return a string with the ID, name, and sound of an object.', "Working with inherited values The transcript contains an example of creating a subclass 'dog' that inherits from the 'animal' class, showcasing the process of extending a class, creating constructors, and overriding methods to handle different scenarios of passing values.", "Creating abstract classes The chapter introduces the concept of abstract classes, highlighting the creation of an abstract class 'mammal' with an abstract field 'moveSpeed' and an abstract method, demonstrating the syntax and purpose of abstract classes in Scala."]}], 'duration': 629.755, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3098209.jpg', 'highlights': ["The chapter demonstrates the usage of getters and setters in Scala, emphasizing the default name of 'no name' when not set, and the direct modification of the animal's sound.", 'It explains the usage of default and additional constructors in Scala for creating new animal objects with specified names and sounds.', 'Creation of static fields and functions The chapter explains the creation of a companion object for the class, enabling the creation of static class variables and functions, with an example demonstrating the creation of a static ID number and a function to generate a unique ID for each animal object.', 'Overriding methods The chapter demonstrates the process of overriding methods in Scala, specifically the toString method, and provides an example of formatting a string using the toString method to return a string with the ID, name, and sound of an object.', "Working with inherited values The transcript contains an example of creating a subclass 'dog' that inherits from the 'animal' class, showcasing the process of extending a class, creating constructors, and overriding methods to handle different scenarios of passing values.", "Creating abstract classes The chapter introduces the concept of abstract classes, highlighting the creation of an abstract class 'mammal' with an abstract field 'moveSpeed' and an abstract method, demonstrating the syntax and purpose of abstract classes in Scala."]}, {'end': 4479.463, 'segs': [{'end': 3849.132, 'src': 'heatmap', 'start': 3762.514, 'weight': 0, 'content': [{'end': 3764.314, 'text': "you can see exactly how that's all structured.", 'start': 3762.514, 'duration': 1.8}, {'end': 3768.23, 'text': "Now what we're going to be able to do is go back up inside of main.", 'start': 3764.588, 'duration': 3.642}, {'end': 3774.875, 'text': "We can get rid of all this stuff and let's create a wolf type that is called Fang and go new wolf.", 'start': 3768.27, 'duration': 6.605}, {'end': 3776.916, 'text': "And we'll pass in the name.", 'start': 3775.255, 'duration': 1.661}, {'end': 3786.484, 'text': 'Then we can say call the move speed for us and set that to 36.0, and then, if we want to print out the move information on fang,', 'start': 3776.936, 'duration': 9.548}, {'end': 3791.207, 'text': 'we can do that very easily and you can see the wolf fang runs 36 miles per hour.', 'start': 3786.484, 'duration': 4.723}, {'end': 3794.569, 'text': "and that's basically all you got with a abstract classes.", 'start': 3791.207, 'duration': 3.362}, {'end': 3797.07, 'text': "now let's take a look at traits.", 'start': 3794.569, 'duration': 2.501}, {'end': 3801.573, 'text': 'now a trait is more like a java interface in that a class can extend more than one.', 'start': 3797.07, 'duration': 4.503}, {'end': 3809.398, 'text': "Then, for example, we couldn't extend multiple classes and we couldn't extend multiple abstract classes.", 'start': 3802.273, 'duration': 7.125}, {'end': 3812.299, 'text': 'However, we are going to be able to extend multiple traits.', 'start': 3809.418, 'duration': 2.881}, {'end': 3817.943, 'text': 'The only difference is, unlike Java interfaces, traits can provide concrete methods and fields.', 'start': 3812.64, 'duration': 5.303}, {'end': 3824.867, 'text': "and how we're going to create one is we'll say something like trait flyable, and we can define fly.", 'start': 3818.263, 'duration': 6.604}, {'end': 3825.927, 'text': 'this is a method.', 'start': 3824.867, 'duration': 1.06}, {'end': 3829.109, 'text': 'we could then come in and also create another trait.', 'start': 3825.927, 'duration': 3.182}, {'end': 3832.091, 'text': "let's say we're gonna do something with superheroes.", 'start': 3829.109, 'duration': 2.982}, {'end': 3836.313, 'text': "so let's say that our superheroes can fly and maybe they're bulletproof.", 'start': 3832.091, 'duration': 4.222}, {'end': 3839.374, 'text': "we'll define hit by bullet.", 'start': 3836.313, 'duration': 3.061}, {'end': 3841.996, 'text': "what's gonna happen if our superhero gets hit by a bullet?", 'start': 3839.374, 'duration': 2.622}, {'end': 3849.132, 'text': "and then, like I said, we're also going to be able to define concrete classes, which is different than we can do with Java.", 'start': 3841.996, 'duration': 7.136}], 'summary': 'Using abstract classes and traits in a class to define methods and fields, demonstrating a wolf running at 36 miles per hour and creating traits for superheroes to fly and be bulletproof.', 'duration': 46.859, 'max_score': 3762.514, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3762514.jpg'}, {'end': 4055.199, 'src': 'heatmap', 'start': 3941.551, 'weight': 3, 'content': [{'end': 3947.058, 'text': "and we'll do all these other ones too and we'll say hit by bullet, superman, hit by bullet,", 'start': 3941.551, 'duration': 5.507}, {'end': 3955.22, 'text': 'and then we can also call the other function which is going to handle ricochets and we can pass in 2,500 as the speed of the bullet.', 'start': 3947.058, 'duration': 8.162}, {'end': 3958.321, 'text': 'And whenever we execute that, you can see Superman flies through the air,', 'start': 3955.44, 'duration': 2.881}, {'end': 3963.562, 'text': 'the bullet bounces off of Superman and the bullet ricochets at a speed of 1,875 feet per second.', 'start': 3958.321, 'duration': 5.241}, {'end': 3966.323, 'text': "So there's an example of traits and how they can be used.", 'start': 3963.582, 'duration': 2.741}, {'end': 3968.364, 'text': "Now let's take a look at higher order functions.", 'start': 3966.383, 'duration': 1.981}, {'end': 3973.526, 'text': "Now functions can be passed just like any other variable, and let's just give you an example.", 'start': 3968.704, 'duration': 4.822}, {'end': 3981.405, 'text': "So let's say I want to do the log 10 function is equal to, Well, if I want to copy this function and what it does, I just put log 10.", 'start': 3973.626, 'duration': 7.779}, {'end': 3984.367, 'text': "That's the function I want to copy and store in log 10 function.", 'start': 3981.405, 'duration': 2.962}, {'end': 3987.509, 'text': "However, you're going to need to put this underscore here after the function,", 'start': 3984.687, 'duration': 2.822}, {'end': 3992.673, 'text': 'to state that you meant the function and not another variable or whatever, which would cause an error.', 'start': 3987.509, 'duration': 5.164}, {'end': 3998.683, 'text': 'And then we can just come in here and go print line, log 10 function, like this, and then throw 1,000 in there.', 'start': 3992.881, 'duration': 5.802}, {'end': 4002.845, 'text': "And you're going to see that whenever we execute that, that that is going to print out our answer there.", 'start': 3998.963, 'duration': 3.882}, {'end': 4005.666, 'text': 'So nice to know that we can store those functions.', 'start': 4003.005, 'duration': 2.661}, {'end': 4007.706, 'text': "Now let's do something a little bit more interesting.", 'start': 4005.686, 'duration': 2.02}, {'end': 4012.988, 'text': "You're also going to be able to apply a function to all items of a list, for example.", 'start': 4007.966, 'duration': 5.022}, {'end': 4015.765, 'text': "So let's say we have 1,000.", 'start': 4013.268, 'duration': 2.497}, {'end': 4018.366, 'text': 'just to keep this simple, 10,000 maybe.', 'start': 4015.765, 'duration': 2.601}, {'end': 4022.768, 'text': "And how you're going to be able to do that is with a nifty function called map.", 'start': 4018.886, 'duration': 3.882}, {'end': 4031.172, 'text': 'So we can go log 10 function like this, and then call for each, which is going to print everything out on the screen for us.', 'start': 4023.128, 'duration': 8.044}, {'end': 4037.415, 'text': "And you can see that's exactly what it does, prints out the 3 and the 4, which is the log of those functions.", 'start': 4031.612, 'duration': 5.803}, {'end': 4039.236, 'text': "So that's something interesting we can do with map.", 'start': 4037.435, 'duration': 1.801}, {'end': 4045.635, 'text': "Another interesting function is, well, let's show you another example of map because I haven't done much with it.", 'start': 4039.892, 'duration': 5.743}, {'end': 4048.436, 'text': 'Say we want to go 2, 3, 4, and 5.', 'start': 4045.855, 'duration': 2.581}, {'end': 4050.217, 'text': 'We could also go map.', 'start': 4048.436, 'duration': 1.781}, {'end': 4055.199, 'text': 'And we can accept a value of x, which is going to be an integer.', 'start': 4050.777, 'duration': 4.422}], 'summary': 'Demonstrates traits, higher order functions, and applying functions to lists in programming.', 'duration': 113.648, 'max_score': 3941.551, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3941551.jpg'}, {'end': 4277.465, 'src': 'embed', 'start': 4249.87, 'weight': 4, 'content': [{'end': 4252.392, 'text': 'This needs to be changed to divisor 5, of course.', 'start': 4249.87, 'duration': 2.522}, {'end': 4253.913, 'text': 'Type in divisor value.', 'start': 4252.712, 'duration': 1.201}, {'end': 4255.754, 'text': 'And there you can see how that works out.', 'start': 4254.153, 'duration': 1.601}, {'end': 4257.93, 'text': "Okay, so there's an example of a closure.", 'start': 4256.189, 'duration': 1.741}, {'end': 4263.174, 'text': 'Pretty simple, just basically this is going to depend on a value that is stored outside of it.', 'start': 4258.15, 'duration': 5.024}, {'end': 4265.316, 'text': "And there's an example of how we can use that.", 'start': 4263.534, 'duration': 1.782}, {'end': 4268.098, 'text': "Why don't we also talk about file IO.", 'start': 4265.556, 'duration': 2.542}, {'end': 4275.403, 'text': "Now if we want to write to a file, first off we're going to need to get this guy right here and this guy right here.", 'start': 4268.538, 'duration': 6.865}, {'end': 4277.465, 'text': 'If we want to be able to read and write from files.', 'start': 4275.603, 'duration': 1.862}], 'summary': 'Teaching examples of closure and file io in programming.', 'duration': 27.595, 'max_score': 4249.87, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M4249870.jpg'}, {'end': 4461.813, 'src': 'embed', 'start': 4432.962, 'weight': 5, 'content': [{'end': 4442.454, 'text': 'And then after we have all of that done, we could do a finally block and inside of here we could do some cleanup after exception.', 'start': 4432.962, 'duration': 9.492}, {'end': 4444.136, 'text': 'Whatever you wanted to do inside of there.', 'start': 4442.694, 'duration': 1.442}, {'end': 4461.813, 'text': "And this is going to protect us if we would come in here and say print line and exception is just going to keep our whole entire program from completely collapsing if an error should occur and in this situation we'll just go divide nums and then we'll pass in 3 and 0 And if we execute,", 'start': 4444.416, 'duration': 17.397}], 'summary': 'Use a finally block for cleanup after exceptions to prevent program collapse. illustration: divide nums, pass in 3 and 0.', 'duration': 28.851, 'max_score': 4432.962, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M4432962.jpg'}], 'start': 3728.144, 'title': 'Scala features and practical implementations', 'summary': 'Covers abstract classes, traits, and higher-order functions in scala, with practical examples including the creation of classes like wolf and superhero, demonstrating traits for defining superhero abilities, and exploring higher-order functions, closures, file io, and exception handling.', 'chapters': [{'end': 3958.321, 'start': 3728.144, 'title': 'Abstract classes and traits', 'summary': 'Covers the implementation of abstract classes and traits in scala, demonstrating the creation of a wolf class with a move function and a superhero class with multiple traits and concrete methods. it also showcases the use of traits to define abilities and behaviors of a superhero, such as flying and handling bullet impacts.', 'duration': 230.177, 'highlights': ['The chapter covers the implementation of abstract classes and traits in Scala. It demonstrates the creation of a wolf class and a superhero class with multiple traits and concrete methods, highlighting the versatility of abstract classes and traits in Scala.', 'Demonstrates the creation of a wolf class with a move function and a superhero class with multiple traits and concrete methods. The example showcases the implementation of a wolf class with a move function and a superhero class that extends multiple traits, providing a practical demonstration of abstract class and trait usage.', 'Showcases the use of traits to define abilities and behaviors of a superhero, such as flying and handling bullet impacts. It illustrates how traits can be utilized to define specific abilities and behaviors of a superhero, such as flying and handling bullet impacts, enhancing the modularity and reusability of code in Scala.']}, {'end': 4479.463, 'start': 3958.321, 'title': 'Scala functions and file io', 'summary': 'Covers higher order functions, such as map and filter, demonstrating their use with examples and the ability to pass functions into functions. it also explores closures, file io for reading and writing, and exception handling, providing practical demonstrations and error handling.', 'duration': 521.142, 'highlights': ['The chapter covers higher order functions like map and filter, demonstrating their use with examples, and the ability to pass functions into functions, providing practical demonstrations and error handling.', 'Demonstrates the use of closures, illustrating how a function can depend on a variable declared outside of it.', 'Explains file IO for reading and writing, utilizing PrintWriter and source to write to and read from files, with practical demonstrations.', 'Provides an example of exception handling, showing how to handle a division by zero error using try, catch, and finally blocks to prevent program collapse.']}], 'duration': 751.319, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DzFt0YkZo8M/pics/DzFt0YkZo8M3728144.jpg', 'highlights': ['Covers abstract classes, traits, and higher-order functions in Scala, with practical examples.', 'Demonstrates the creation of a wolf class and a superhero class with multiple traits and concrete methods.', 'Showcases the use of traits to define abilities and behaviors of a superhero, enhancing modularity and reusability of code.', 'Covers higher-order functions like map and filter, demonstrating their use with examples.', 'Illustrates the use of closures and explains file IO for reading and writing.', 'Provides an example of exception handling using try, catch, and finally blocks.']}], 'highlights': ['The tutorial covers a comprehensive Scala tutorial, equivalent to a 200-page book.', 'Instructions for installing Scala on Mac and Windows are provided, along with the requirement of the Java Virtual Machine.', 'Covers common arithmetic operations like addition, subtraction, multiplication, and division, as well as shorthand notation for incrementing and decrementing values in Scala.', "Scala math functions overview including absolute value, cube root, ceiling, rounding, floor, Euler's number, power, square root, hypotenuse, logarithms, minimum and maximum calculation, random number generation, conversion to integer, radians, and degrees.", 'The chapter covers various programming concepts in Scala including string manipulation, list creation, for loops, functions, and handling input and output.', 'Covers printing functions using printf, importing libraries, manipulating strings, and creating functions in Scala, with examples.', 'Creating a 10x10 multiplication table with multi-dimensional arrays', 'The chapter demonstrates looping through maps in Python and printing out keys and values for everything in the map, providing a comprehensive understanding of working with maps.', 'Covers abstract classes, traits, and higher-order functions in Scala, with practical examples.']}