In the last couple of weeks I've got a lot of requests from viewers of the channel for me to take a look at a Linux distribution called Linux FX. I've been getting messages, hey, DT, you gotta take a look at this thing. It looks just like Windows, except it's not Windows, it's Linux. And I gotta be honest, that sounds interesting to me. So this could be something very cool. So today I'm gonna take a quick look at Linux FX, I'm just gonna take a look in a live environment.  I'm gonna give you my impressions. So here is Linux FX, and I've gotta say my initial impression is well. As far as is this Linux, is this Windows 11, I think most people, unless they really sit down and look at some of the finer details, actually would think that this is Windows 11. I mean, it's got the exact wallpaper, right? It's also got your trash can sitting on the desktop, which most Linux desktops actually usually they don't put icons on the desktop by default. The trash icon especially is kind of a Windows thing. We have trash bins in Linux, but it's usually not a trash can sitting on the desktop. Also, we typically don't ship with Microsoft Edge for our browser. The panel at the bottom, by the way, this is KDE Plasma, the desktop environment. KDE Plasma is very customizable. And I've mentioned this in the past, that if you want new to Linux users, you know, you're coming from Windows over to Linux. If you want them to feel comfortable, Plasma is a good landing spot because you can actually turn Plasma into whatever you want. You can make it look exactly like Windows or Mac OS or Chrome OS or whatever desktop environment operating system you're coming from. Plasma has the ability to transform into that. And this Windows 11 desktop is pretty close to being 100% faithful.  Of course, you've got your centered taskbar and centered start menu where in Windows 10, they were on the left. Now, they're centered in the taskbar. I'm not sure I really like that. I'd prefer it to be on the left, to be honest. It's kind of weird being in the center, but I guess you got to do something different, right, with each big release of Windows. They got to change things. Otherwise, they'll get accused of not changing anything. So one thing I don't like, of course, is the fact that this is Linux. So it's GNU slash Linux. It's really supposed to be about free and open source software, right? That is really everything about Linux, why Linux, the kernel, got started, why people choose to work on it and donate so much time and money to work on that thing. It's because of freedom. It's because of the licenses, because of free licensing. And when I see a Linux distribution shipping Microsoft Edge as the default browser, that kind of hurts my heart a little bit. It looks like we don't have to use Microsoft Edge. We can change to a different browser because it looks like they also ship Google Chrome as a browser as well. Let's see what version of Chrome this is. If I go to help and about Google Chrome, this is Chrome 97.0. Of course, Chrome is proprietary, proprietary garbage, just like Microsoft Edge. Let's open up Microsoft Edge and just for sake of completeness, see what version of Edge they are shipping with. By the way, Linux FX is an Ubuntu based distribution. It is based off of Ubuntu 20.04, the LTS version. Let's see if we've got to agree to some licensing information with anything by Microsoft, of course, get rid of all of that. I just want to go to settings and let's go to about Microsoft Edge. And this is Edge 97.0, same version number as Chrome. Of course, Edge is based off of Google Chrome. I also notice we have Linux FX Android here. And I believe that is to give you the ability to run Android apps on this device, if you so choose.  So I'm assuming they probably ship wine, yeah. So we do have wine with a command line, run wine, and we have wine tricks. Wine tricks is interesting because it's kind of a easier way to get into wine, to get a lot of common applications that people like to run in wine up and running, maybe things like, I don't know, Microsoft Office or whatever you're trying to install. I'm actually not going to run through the wine configuration here because I have nothing that I really want to install in it. And let me get back into the menu system here. And by default, you've got these pinned applications in the menu. These were pinned by the Linux FX team. So these were already here. These are not applications I pinned. These are applications they assume most people will probably want to play with such as Microsoft Edge, the browser, you're going to need a browser, right? You're going to need your file manager, Dolphin, Discover is the software center. They imagine that a lot of people are going to need Microsoft PowerShell as well. But again, it's kind of geared toward the Windows user, basically somebody that wants Windows, but I guess for some reason they want Windows with a Linux shell around it, like a Linux skin. This is strange. Like I don't understand, like if you really are disinvested in Microsoft software and Windows stuff, why wouldn't you just run Windows? And I'm asking that in a sincere fashion. Like I really am not sure about this, the system settings here. I'm assuming just Plasma's system settings control center here. Let me see what kind of theming options we have. So I guess I can't do anything with the wallpaper. It just shows me what the wallpaper is. But we have a light theme, which is the default. Then we have a dark theme with a light theme. So this is a mixture of your dark panel, dark menu system, but your windows are still light. Okay. Well, it was just a common thing most people actually kind of like. They like dark panels, but they prefer their application windows to be light. Yeah. So that's kind of cool. Me, I just prefer all dark. So I want dark panels, dark menus, and a dark Plasma theme for the windows themselves. So I'm going to choose the last theme here. Yeah, that looks pretty good. Let me open up the Dolphin file manager. Yeah, I really like it. I mean, it is attractive, right? It's a sexy desktop. I like the icon theme. Let me right click on the desktop. Is there anything I can do to change the wallpaper? Configure desktop and wallpaper. Okay. So we do have some wallpaper packs here. Some of them are very windows like. Here's a dark wallpaper, similar to the default, but it's, yeah, it's got some, some darkness to it. I actually, yeah, I like the dark wallpaper, but I think I'd prefer the light theme to go with it. So I'd probably set that back to the light theme if I wanted to use the dark wallpaper, but since I'm using a dark theme, we really should choose a light wallpaper. So I'm going to go back to the default. If I can find it, let me change back to the default wallpaper and getting back into the menu system and going to all apps other than all of the great free and open source software that ships with this thing, which is all the KDE applications, the KDE suite of software, all of it, free and open source software, yay, freedom. But then I noticed they have things like any desk, any desk is a remote desktop application and it is proprietary software, right? Enter a license key, yeah, it's proprietary garbage. And there's no reason not on Linux. You don't need this on Linux. Like there's so many free and open source remote desktop applications. There's just no need. There's no need to ship with proprietary web browsers. There's no need to ship with Chrome or Edge when we literally have dozens of free and open source browsers available on Linux. And I know not everybody cares about free and open source software or they haven't heard that message, but I'm assuming whoever created this Linux distribution, they know about free and open source software. They know why it's important. And I don't get why they are stuffing this thing with so much proprietary poo. We've got Helloa here. Now, if this is what I think it is, oh my God, it is. So it's voice assistants. So this is Cortana basically on Linux. Helloa I believe uses Google technology, but it's asking for permission to connect to my microphone. It needs to connect to my microphone so it can listen to my voice commands. But it's not just listening to my voice commands. It's listening all the time, right? 24, 7, 365. I'm basically giving my computer permission to bug me, right? To wire tap me to listen to me all the time. This is not okay. This may be okay to some people that run proprietary software or people that don't know about free and open source software. But to Linux users, we don't want that. Again, I just don't understand why all of this stuff is here. Looking through some of the other applications. We have, of course, a lot of Microsoft software. You've got Outlook, OneDrive was here somewhere. I saw it earlier. There's Teams. There is some Office stuff. Of course, we've already seen the PowerShell. They also have OnlyOffice. So there is a free and open source Office suite as well. So that's good. I believe OnlyOffice. OnlyOffice is licensed under the GPL. So it's definitely free software. And then Steam, of course, is proprietary software.  There's OneDrive. And you don't need a proprietary cloud syncing service. I guess if your work uses it, I guess if your job is heavily invested in Microsoft products, I could see a case for something like this. But if your job is heavily invested in Microsoft products, again, I don't know why you're using Linux. Just use Windows, right? I mean, if you have to use proprietary software, you have to use proprietary software. I don't know why you would use Linux because you can put all the theming and wallpaper up and everything. This is still going to be Linux. Fundamentally, it's not going to be Windows. It's not going to be 100% compatible with all of your Windows stuff. So if you want the best experience to run Windows software, just run Windows, right? We've got some Linux FX stuff, like the Linux FX Store. I haven't opened that. This is the Software Center, which is just Discover. KDE's Discover. Really nothing to see there. There was some other Linux FX related applications, their own custom applications, I'm assuming. For example, Linux FX Register. Please tell me that isn't what I think it is. I've got a notification behind my head here. As soon as I clicked on it, it said the Linux FX key. And then shortly after, of course, we get enter a product key by a license. I don't mind buying a license. I don't mind paying for software. Let me rephrase that. If it's free and open source software and you want to charge for it, great. I'll buy all the free and open source software you can give me, but buy a license. Let's click on it. I'm assuming it's going to go to their website. Let's see what we're actually getting with this license. We're getting a friendly interface, Microsoft applications, personal assistant. Like, we're getting stuff. Again, most Linux users are not going to want. They're anti that stuff. So why would they want it? And much less, why would they pay for it? Let me go to software licenses here. Let's actually read the licensing information here. It's not in English, but that's okay. I just want to see. It says, control panel, OneDrive, hello assistant, login, log out, active directory, system, device manager, and other tools cloned from Microsoft Windows 10 or software developed by Linux FX. So some of those applications, even the ones, I guess that wasn't really OneDrive. That wasn't the Microsoft OneDrive. That was Linux FX software. That's interesting. Anyway, these tools are proprietary. So even though they're not Microsoft tools, it was developed by Linux FX, this Linux distribution team. Their tools are all proprietary software. They're licensing everything under proprietary licensing. The source code is not available. Well, that was my quick look at Linux FX. I really don't need to see any more for myself. Just personally, yeah, this serves no purpose.  For those of you that do find this interesting, because some of you obviously do, that's why you've asked me to take a look at it, I strongly urge you guys not to go this route. There's no reason to install a Linux distribution that's going to run all this proprietary software, all the Microsoft software and everything. Just run Microsoft Windows, because you're not gaining anything. You're trying to run Linux as an operating system, running all the proprietary evil stuff on top of it. Again, what are you gaining? You're really gaining nothing. Just run Microsoft Windows, it's okay. Even in my opinion, if you have to run proprietary software for your job or for your school, that's okay. Just do it, just accept the fact that you have to do that and be okay with it. Doing this, I think this is a travesty. Like I think this makes me angry. Like this is one of the worst distributions I've ever taken a look at from just a philosophy and ideological perspective. I don't like anything that this particular Linux distribution stands for. I'm not going to get a ton of hate in the comments, but honestly guys, if you need to run Windows software, just run Windows and that's me saying that, write a free software, zell it, just run Windows if you need to run Windows software. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode. Devon Gabe James, Matt, Michael, Mitchell, Paul, Scott, Wes, Alan, Chuck, Commander, Ingrid, Diochai, Dylan, George, Lee, Linux, Ninja, Maxim, Mike, Erion, Alexander, Peace, Arch, and Midori, Polytech, Rip, Prophet, Stephen, Willie, these guys. They're my highest tiered patrons over on Patreon without these guys. This quick look at Linux FX would not have been possible. The show is also brought to you by each and every one of these ladies and gentlemen as well. All these names you're seeing on the screen right now. These are all my supporters over on Patreon because I don't have any corporate sponsors. I'm just sponsored by you guys, the community. So you'll want to see more videos on Linux and free and open source software, not proprietary software. Subscribe to DistroTube over on Patreon. All right guys, peace. Choosing between Edge and Chrome is like asking, do you want to be shot or stabbed?


Introduction to AP Computer Science Unit 6, arrays or arrays depending on how you want to pronounce it. So this video just let you know is being recorded much, much later than the first five videos. The first five videos I did last summer in preparation for the course and now we've kind of caught up to those videos and now making Unit 6 arrays and arrays. So let's get started. An array, in case you don't know, is just a way of, in my mind, of bundling similar information. So for example, let's say we had int score 1 and equals, let's say, 50. Let's say int score 2 equals 100. Int score 3 equals 75, etc., etc. Now if we only have a few scores, this is perfectly acceptable. But what if we had say 100 scores or a million scores or a larger data set? And what we would do in that case is we would use something called an array. And that's what we're going to be taking a look at today. So section 6.1, array creation and access. So we're going to learn how to create an array and we're going to learn how to access the information in that array. So it's very similar. If you notice what I just did, I had int score equals something. With an array what we need to do is do something like this. We put square brackets, depending on where you're from, you might call them something different. Put square brackets. We give the array a name. Now notice in this case I used scores. I used a plural noun because it's very descriptive of what the information is. Now if I put score, it kind of doesn't make sense, especially later when we do certain things with loops, which you'll see in a few minutes. And then I have to put equals new. And I have to put the type again. So we got int here one time. We got int here another. And in this case I want to put the number 7 there. And the 7 was chosen, just semi-randomly. I have 7 students in my class right now. I have 7 wonderful students. And so I thought I'd use that number. So if you remember back to the string unit, if you watch that video or if you've been studying AP Computer Science, this will be kind of similar to how we accessed strings and the characters in that string. So anyway, so what I've done here is I've created an array of scores. And it is 7 items long. So what I can do now is I can start assigning values. Now just a little thing, I didn't have to use in here. I could have used double. And then I could put double here. Oops, not couple, double. I could have done Boolean. I could have done any of the primitives. And I could also do objects or reference types, whatever you want to call them. So I can also do strings. Now when I create this array, I'm going to go back to int there. When I create the array, there are some default values added. So basically if it's ints, I'll have an array of 7 ints. So I'm going to put that in here, default values. So if it's an int, it is 0. If it is a double, it is 0.0. So I like my formatting consistent. If it is a Boolean, it is going to be false. Now if it is an object or reference or a reference type, I should say, like a string, it will be a reference type. It will become null because we haven't actually defined what it is yet. So you can count on that being 0 or in this case of ints, it will be 0. So what I can do is now I can access each item by its index. So we have 7 items. And just like with strings, the first index is actually going to be 0. So here I'm going to assign some values. And I can say like this. So for example, scores 0 equals, let's say 100. So I did very well. Scores 1 equals 90. So in my array, I'm going to have 0, 1, 2, 3, 4, 5, 6. Not 7 because there's 7 items, but we start at index 0 just as we did with strings. So now what I can do is I can actually print that information out. So I'm going to say system.out.println. And then I'm going to say scores 0. So hopefully you can predict. So this is this. So we can just substitute in 100 basically. And then I'm going to lazy, so I'm going to copy this. Oops. No, not good. And there we go, scores and print scores 1. And what I can also do is I can do things like this, scores 0 plus scores 1. So I'm going to run that. Oops, you see some of the assignment from earlier. So you can see 100, scores 0 is 100. Scores 1 is 90. And then 100 plus 90 is 190. Now just to show you, if I did print out, let's say scores 2 and scores 3, for example, it doesn't matter what order at this point, it should be 0 because that's the default value. Now also just to show you what happens, if I do try to access number 7 or 8 or 9, something outside the range, you're going to see the type of error we get. So exception in thread main, you'll see an array index out of bounds exception. It tells us 7 is wrong. Because it's going to be 7 minus 1 because it's going to be 0, 1, 2, 3, 4, 5 and 6. Let me just put that back the way it was. So that was an array of integers. So that's one thing.  Fun may as a relative term. Let's try an array of strings. It functions the same way. Array of strings. So I'm going to make a new array against string. Now this should look very familiar. You've probably been seeing this all year or since you started selling Java. You never quite knew what it was but now you do. So args is going to be an array of string arguments. And that is passed to the program when you run it. If you're using, say, the command line or calling it through the system thingy. I know a very technical term, system thingy. So I'm going to do some names. And again, new string. And in this case I'm going to do 7. But again, you can do any number here. You can even do 0. But you can't leave it blank because you'll get an error. So you have to put something there. You can have an empty array, although I'm not quite sure why you would do that. But apparently you can do that, which I found quite interesting. So I'm going to do 7. And I'm going to add a few names. And let's say 0. And these are some old friends of mine, not my students. Oops. Names 1 equals gen. And names 2 equals jr. Let's give a shout out to my old peeps. So again, same thing. I can print these out. System.out.println. And names, oops, not putting quotes. Names 0. Oops. Copy that out. And 2. And I'm going to go ahead and just print 3 here. Just to show you what happens. I'm going to show you that it should be null, I believe. So it's got gen, jr. And null because we never said what names 3 was. Again, just a reminder, we're starting at index 0. So this is one way of creating a list. Sorry, list. That's Python. I apologize. I do a lot of Python programming. Anyway, so this is one way of doing an array. So we create the empty array first. We define the size. One of the things with arrays is that once you set the size, it is set. You can't expand it. You can't shrink it because you're setting aside a certain amount of memory.  So you need to think about how you're going to use your memory. Today's computers are pretty, you know, there's tons of memory.  Yeah, that's one way. Now, in a case where you actually already know what you want to put into the array at the beginning, you may want to pre-populate your array. So for example, so we use something called an array initializer list. So the format is very, very similar. So let's see what we do here. Let's do cities. So I'm going to do string again. And I'm going to say cities equals, actually not new. And I do it like this. I'm going to put some cities in there. Now I live in Tokyo, so I'm going to put Tokyo in there. I've also lived in Seoul. Let's say I lived in Bucharest. And yeah, those are probably the three places, three capital cities I've lived in in my life. And so now ask yourself, how long is this particular list? What is the length of the list? And clearly it's 1, 2, 3. However, the index is 0, 1, 2. So this may be a good spot to figure out how, well, let's print that out real quick. So system.out.println. And I'm going to say cities, new cities, 0. And again, I'm just going to copy that. Cities 1 and cities 2. So again, the thing here is you've got to keep in mind, I've only made room for three cities. So if I need more, I should have used a different method of defining this. Now for something like days of the week, you know there's only going to be seven days of the week. So you can just define that right at the beginning and you know what the answer is. Now real quick, to get the length, the length or the size depending on how you want to put it, is very similar to strings but just a little different to make it complicated. So what I can say here is I can say system.out.println. It's the array name.length. Notice there are no parentheses here. If it's a string, you've got to put parentheses because it's a method. If it's an array, you use the attribute length. So no parentheses. So let's go ahead and run that. And you can see how we got Tokyo, Seoul, and Bucharest. And I'm going to go ahead and actually just to make this a little bit, make the formatting a little bit nicer. I'm going to print out println a blank space. At the end here. Sorry, I should say a blank line after my print statements. Do I have any more? Nope. Okay, and then at the end here, that four. Again, this is just for formatting for my output. Okay, so we've got our integers. We've got our strings. We've got more strings of some cities. Yeah, I've lived it. I do still do live in Tokyo. That's a point in time. It is 2020. Crazy to think we are in the future. So that is the basics of creating and accessing arrays. Now, just one thing. Once you define a value, you can change it. So let's say I make gen here as gen. I say, oh, she decides. Okay, I prefer to be called Jennifer for professional purposes. I can say Jennifer. And then if I print that out, and then we should see the change. Okay, so you can change these values at will. You can't change the type. You can't change the length. But you can do a lot with these. And we'll get to that in a few minutes. Okay, so let's move on to 6.2, which is where it gets quite interesting. And this is why arrays are so useful. This is when we combine them with loops. And this is called traversing arrays. Traversing is just a fancy English word for kind of going across. So you can traverse a bridge, that sort of thing. So what we're going to be doing is we're going to be going through each element, and there's a good look at it, each element in the array. In the case of strings, each element was a letter. Okay, but in the case of an array, it could be an int, it could be a double, it could be some object, which is very, very powerful. Excuse me for taking a drink here. So, let's take a look. We've got a couple different arrays to choose from. We've got our scores, we've got our string names, and our cities. So let's try a couple different methods here. And some of these will look familiar. So let's say for int i equals zero, because it always starts at zero. I think it's something to put that much space in there. Semi-colon. Notice i is going to be less than, we'll do scores for this one, dot length. Notice it's not less than or equal, it's less than, and it's not minus one. Well, if you do equals, it'd be minus one. But in this case, it scores dot length. Again, no parentheses, as I mentioned earlier. And then we're going to increment i plus one. And then we're going to say system, dot system, dot out, dot print. And I'll say scores. And in this case, i. So what should happen is i's going to be zero. I'll print score zero. And then i will be one, scores one, two, all the way up to one minus the length of scores. So if you recall, there were seven scores. And so then I want to print a little space at the end there. Let's try it. So you can see we've got score zero, scores one, scores two, scores three, scores four, scores five, and scores six. That kind of makes it pretty easy. So imagine now that we can, now we want to do something with the scores, calculate an average, find the sum. We can do that even if we have seven scores or if we have 7,000 or 7 million scores. Just one change to the code. Actually, we don't even have to change this code because if we want to go through all of the items, this will work for any size array, which is quite nice. Okay, so we can do the same thing just to show you. The same thing absolutely will work with strings. So there's no reason it has to be integers. So this pattern holds out. And so I go to names. And then down here I'm going to print names. And let's see what we get here. Again, notice how we have zero, one, two, which we defined or we gave a value to, but because it is an object, it is null, null, null, and null because we haven't defined them. So yeah, it's pretty cool. And let's see here. Now, a couple of things. We can also use a while loop. So for example, int j, in this case, equals zero because we want to start at zero. I can say while j is less than names.length. Actually, I'll do cities in this one. Cities, I can just system.out.print cities j. Put a little thing at the end here. Oops, that was not it. Okay, I'm going to run that and compile and run it. Okay, so ooh, now we got a little error. Ooh, I made a mistake there. I did a nice little logic error. This is a while loop. So I'm going to end that. And I forgot to increment j. So I can do j plus plus. This is a while loop out of for loop. Rookie mistake. Okay, so we got Tokyo, Seoul, and Bucharest. Yeah, so that's basically it.  In this case, minus one. i is greater than or equal to zero. And we can do i minus minus. And we could do the names backwards. So let me try that real quick. Okay, so we went from six, five, four, three, two, one, zero. And then we can iterate or we can traverse them in the opposite order. Maybe cases where you need to do that. And we'll see later how to actually reverse an array as well. Okay, moving right along. This is a bit of a longer video, but this is kind of important. And it's something that really, really is helpful in simplifying your code and making it very efficient and more maintainable. Okay, so we're on to 6.3. This is called enhanced for loop. And enhanced for loop, if you've taken, if you study other computer languages, you might hear this called a for each loop. And this is just a really, really powerful structure. It has a lot of use cases. Excuse me, I'm drinking some green tea since I'm in Japan. And so what it lets us do is it lets us iterate through a loop without using an index, which is really pretty cool. So for example, we've got our scores. We've got scores. I'm going to say for int score in scores. I'm going to say system.out.println score. Okay, so what this does, this is really cool. So I've made a new variable here, score. So how you would read this to yourself, for each integer score in scores, print that score. So again, I'm going to say that one more time, for each score in scores. That's why I made this plural, make this singular, so it's very, very easy to understand what's going on. Print that score out. So what it will do is it will start at the beginning, score zero, go through. Now, if we do this method, we don't have access to the current index. But in this case, we don't need it, because we just want to print out all the scores. So let's try that. Okay, so you can see, print them out, zero, one, two, three, four, five, and six. So no matter what size that array is, it's going to print them all out. I can do the same thing with four string, for example, and let's do cities, sort of city in cities, cities, and system.out.println city. So this is, you can see, this is very, very powerful. This was an object, we could go through each object and call it a certain method, for example. This is very useful when you're programming games. Let's try that. Okay, so you can see how it went Tokyo, Seoul, and Bucharest. And again, there's not much else to tell about that. It's pretty interesting, but you just notice that the type has to be the same. So scores up here was defined as an array of ints, and so down here, it's got to be, excuse me, it's got to be an int as well. Cities is an array of strings, so we had to make city a string, which is, you know, fair enough, and probably fairly straightforward. Yeah, that's a really, like I said, very powerful structure and very useful at times. But in some cases you can't use it because you do need access to that particular index. Okay, the next section is a little bit long. So I'm going to go through as fast as I can, as quickly as I can. There are some standard algorithms or just standard things that you'll end up doing a lot in computer programming, and there are a number listed in the guide for the AP people, and I'm going to go through most of them. The only one I didn't get was the mode one. I meant to look it up, but I just did not have time. So what I'm going to do is I'm going to go ahead and run through several of them, and then you can watch, and hopefully learn a little bit something. I've been doing the coding bat exercises if they're still available because they're pretty good at helping you through this kind of stuff. Okay, so the first one is determining a maximum or minimum value. So let's say, let's see what we got here. Let's say, do averages. So I'm going to say int averages equals, well, I don't want to use scores again because I already defined it, but it's a way of defining it.  Let's do E7, E45, E75, let's see, 99, E93, whatever, just pick some random numbers here basically. So I've got an array of averages, and I want to find the maximum or the minimum value. In this case, I'm just going to show you maximum. Minimum works almost exactly the same. So in a case like this to be as efficient as possible, what we want to find at least, we want to find the maximum. So I need to store that information. So I can say maximum just to make it easy.  I like to type things out. And what I'm going to say is we know it's got to be one of these values. It's got to be one of them. So for efficiency's sake, what we would just do is we'd say the maximum equals averages, zero. So we assume, we say, okay, let's say we're going to assume the first value is the highest. Now we've got to prove that. So to do that, we need to iterate through the rest of these and compare this value to this value. So what I'm going to do is I'm going to say int i. Now I don't want to start at zero because I don't want to compare 87 to itself. I could, it's not going to cause a problem, but we want our code to be as efficient as possible. For i equals one, I'm going to say i is less than averages dot length and i plus plus. So I'm going to say if averages i is greater than maximum, then that's our new maximum. Maximum equals averages. Does that make sense? So we assume that 87 is our highest. Then we start at 45. Is 45 greater than 87? Nope. Come back. Is 75 greater than 87? Nope. Is 99 greater than 87? Yes, it is. If so, we say, okay, the new maximum is now 99. So we run through the whole loop. We do have to check them all. Now we can do a system dot system dot out. Dot print l n. The maximum is quote plus x. Period. I do like to do complete sentences and that should give us the maximum. So let's run that and see what happens. Hopefully there's no errors. Okay. So you can see the maximum is 99. It did find that force, which is pretty cool. Now again, you can do the same thing with minimum, except you make this minimum and then this would be less than instead. But we'll stick with maximum for this one. So that was one. Next one is, what do we got here? There were quite a few listed. Okay. Computing a sum or average. Okay. So sum or average. Okay. And this is a pretty straightforward one. Okay. So first we're going to make, I want to make a list of, well, let's do doubles. We'll say doubles, double, double costs equals, and I'm just going to put a bunch of costs in. So let's say 499, 399, you know, 99, 21, 99, and the prices in America are always 99 cents. And let's say $2 for your newspaper subscription. And what we want to find is we want to find the sum and we want to find the average. So I'm going to say double sum. And like right now we don't know what it is. And I'm going to say, I can do it like this, double average equals zero. Actually they're doubles so just to be consistent I'm going to put 0.0. Now what I need to do is I need to go through each of these and add up, add each of these to the sum. And when I'm done I can calculate the average. Now a couple ways to do this, we could do four int i, blah, blah, blah, blah. But here's a question we need to ask ourselves. Are we going through every single item? The answer is yes. Are we going through every single item in order? The answer is yes. If those two things are true, well the second thing is do we need to reference another item from another item? For example, do I need to know that 3.99 comes after 4.99? Does the order matter? And if the answer to that one is no then I can use an enhanced for loop. So I'm going to say double cost, costs. And again if you keep it the English correct it'll be much easier. So for each cost in costs I'm going to say sum plus equals cost, that cost. Now once I have the sum now I can calculate the average. I can say average equals sum divided by cost dot length. Now I could have put here 1, 2, 3, 4, 5 which is fine, this will work but what if I added another thing here I'm going to change the code here. So it's always better to put cost dot length. It'll make your code, you're going to avoid a lot of errors. Any time you can avoid hard coding a value that could possibly change you want to do that. So with sum we always have to start at zero. Now average actually could be anything because we're going to change it here but just logically it makes sense to make it zero. So now I can print this out. Print ln, what we're doing is sum plus sum and I can do system dot out dot print ln we've got here average plus average. Okay let's run it and test it. Now I don't know the answers but I'm hoping we'll get no errors and it should look logical. So the average is 6.792 the sum is 33 and that looks about right. I didn't really check it but yeah I think that's probably going to be correct. I'm going to add a little print ln I could have put the slash n up here but that's fine, let's keep it consistent. Okay so yeah so we've done that one so we've done that one now. Next one is determine if one element has a particular property. See here. So we're trying to find out if an element has a particular property. So I'll write that down and determine if one element has a particular property. So I'm just going to go ahead and use the costs again and so what I want to do is I'm going to say I want to find out if any of these costs are over $10. So actually I'll say over $9.99 that's $10 or higher. So what I need to do is I'm going to make a boolean. Say is over let's see let's say $10 just make it easy $10 and I'm going to assume that it's false because I haven't found one yet. I don't know if one exists but I do want to know if it does exist. So I'm going to set this equal to false and what I'm going to do is I'm going to iterate through I'm going to traverse the array I should probably use that nomenclature and I'm going to see if it meets that criteria. So again same thing do I need to go through every item? Yes. Am I going from start to finish? Yes. Do I need to know which follows which? No. I'm just checking each one as an individual. I'm going to say for cost it's for int sorry this is a double cost in cost. So I can say if the cost is greater than I'll say $9.99 just to make it easy. So as long as I have one I say is over $10 equals true. Now at this point I'm going to try to throw in a break actually I'll leave it without the break for now and I'll throw the break and just see what happens. I haven't actually tested that one yet but I'm assuming it'll work a certain way. Okay do we see anything? Oh we didn't print out the result. So if is over 10 so that's true let's just do that out let's just paste that actually it's technically $9.99 but we'll leave it at that and we can put else no items over $9. Okay so again we're only looking it doesn't matter as long as there's one okay there is an item over $9.99 Now it's always good to test your code so what I could do is I could go up to here and I could change this to $8.99 So it's really good practice to test your code to make sure that it is functioning correctly and you should also test the following case $9.99 in case you made a mistake okay and I might want to do $10.00 just because that's the next value just go ahead and test that okay there is an item over $9.99 alright okay so let's take a look at the next one which is determine if all elements have a property so this is very very similar to this one in the case where you're looking at one element has a property so in this case we're trying to prove that it's true there is an element that has this property but in this case we're trying to prove if all elements have that property so what I'm going to do is I'm going to go to and say boolean is under $10.00 and we're going to assume that it's true we only need to find one false and then we know that it's not true okay so again I'm going to go ahead and do my four because again I'm going through all of them start to finish I don't need to know what order I don't need to know that you know I don't need to know $3.99 follows $4.99 and so I'm going to go ahead and iterate through that the same way and I could do it with an index no problem so four costs in costs and I'm looking for all elements under 10 in this case so what I can say here I'm just looking for one that is over 10 so if cost I'll say is over 10 and then I'm going to say is under 10 equals false I only need to find one that's not under 10 so again the same thing I can do is if is under 10 nope system.out.print ln and we'll say all items under 10 10.00 that's a pretty simple one and else either all under 10 or they're not else system.out.print ln all items not under 10 so again we need to test this of course I'm going to test that in a second I missed a little something in the last one not the major but just a little tidbit so I'm going to run it and see what happens it says all items under 10 and it printed that twice which is not quite that's why I do that I wanted to especially as the video gets longer I tend to make more and more mistakes so if we look at this where's our cost set so are all items under 10 you can see here the answer is no so let's check our code ah so greater than 10 so I should make that greater than or equal to 10 because we're only looking for one this is a good thing about testing you need to test those edge cases they're called so I'm going to go back up to here I'm going to change this to 999 again so we have a case where we have one that's exactly 10 we have a case where they're all under 10 all under 10 and I'm going to go ahead and make this 999 and go ahead and see what we get out of that one ok so we are getting the proper response it's very important to check your code beginners like to assume oh I think I programmed it right they check one case oh it's working they don't check all the cases and then they have problems later the next one is access all consecutive pairs of elements I'm not really sure what that meant so I'm making my best guess here ah two pairs of elements ok so what I could do is I make some strings an array of strings I should say called foods and I populated that ahead of time with I just went with apple banana really original cucumber I didn't know anything but start with a D egg can't have eggs without ham yeah so we'll go with that so I've got a string of I got an array of strings I should say and now what I want to do is I want to access consecutive pairs so for example I want to print apple and banana together and then I can either do banana and cucumber and cucumber and egg or I can do apple and banana then cucumber and egg actually there's an uneven number so maybe that's not possible so in this case I do need to use a normal for loop so for int I equals zero I is less than foods I'm going to put my .length length I'm going to put minus one here you'll see why in a second so what I want to do here is I'm going to say system.out println I'm going to say foods I plus I'm going to put a little dash here plus foods I plus one so you can see the reason instead of putting length here which would go all the way to ham I need to stop one early because egg plus one if I do ham plus one I'm going to get an array out of bounds exception let's run that and see what happens apple banana, banana, cucumber, cucumber, egg egg and ham and yeah, that one is that again I think that's what that means but I'm not 100% sure but it's a good thing to practice anyway just so you don't go over the end of the array and there's some questions there's multiple choice questions that make you have to look at this and make sure you don't do that okay in the interest of just kind of saving a little bit of time and just kind of getting through this I've gone ahead and I've typed all the code in I'm just going to go through and kind of explain how everything works real quickly and this next one is determining the presence or absence of duplicate elements so basically what we have to do is we have to start with the first element so in this case it's the Hulk and then we have to compare the Hulk to every other element after that and see if they're equal if they're equal then we have a duplicate element okay so and then once we're done checking all the Hulk ones we move on to the flash and then we check everything from flash onwards to see if it's a duplicate we don't need to check backwards from flash because we've already checked Hulk and flash going forward so watch what we do here as we start our first loop here and we go from zero all the way to the end and then we go the internal loop we start from here plus one so that's why I got k equals i plus one and we go all the way to the end and we check if they are equal or not and then once it comes around when we're on flash so i is one k is going to be two and we go all the way to the end and then so on and so forth okay so let's give it a shot and see what happens you'll see some other output from the other ones but that's okay so you can see here are there duplicates false because there are no duplicates now let's say we get rid of the Daredevil Hulk in there again and so we go ahead and run it and we should see true okay so we do have some duplicates okay next one is determining the number of elements that meet a certain criteria so what I've done is I've created an array of strings genders m and f representing male and female and so what we want to do is we want to determine the number so we haven't started yet we don't know what the number is so we're going to set that at zero so let's say we're looking at the number of female board members in this case and so we iterate through the entire loop or through the entire array excuse me and we check and see if the gender in this case each element or item however you want to put it is equal to the condition which in this case is f for female and if it is we increment number of females we complete the loop and then we print out the result now I could have used an enhanced for loop here and the reason is that I want to search every element and the order I search them doesn't matter but this one works as well so I'm going to go ahead and run that and we should get one two and three because there are three female board members now let's go ahead and change this condition well it's not changed let's change this to f and just see if we get an extra female okay so now we have four female board members so it's good to see some good gender representation there okay moving on shifting array elements in this case we're going to be shifting left but you can use the same pattern for shifting right basically so we've got an array of letters they're strings but letters s h a r k and we want to shift them to the left so the s is going to be at the end a r k and s so the problem with this is or at least the way I'm going to do it is I'm going to start at index one and then I'm going to say this equals this okay then I'm going to go up one I'm going to say that this equals this I'm going to say that this equals this this equals this and then I'm done but what happens is because the first thing I did was I changed this s to an h I've lost the s so that's why I have here this string temp letter equals letter zero so I'm going to be saving this before I do anything and then I'm going to iterate through from the first index not zero index but from index one to the end shifting everything over to minus one I could have done it a little bit differently but that's the way I did it here is fine as well and then at the very end once I'm done with the loop I put the temp letter which was the zero at the new end I changed that last letter and then here I'm just printing everything out and then you should see h, a, r, k and s and I think you already see it down below but it's always nice to check that okay and then the last thing is reversing the order of elements so you can see here I've got some names and this actually came from one of the multiple choice questions in the reviews and it's pretty interesting actually so we could have done it a longer way but basically what we're going to be doing is we're going to be iterating from the zero element to the middle element in this case it's conon that's why we have length divided by two because this is an integer instead of being 2.5 or 3.5 whatever it is it's going to go down to 3 which is what we want and then so what I do is I store a temporary variable like we did in the previous one and then I say that this equals the length which should be plus 1, minus 1 and minus i since i is zero I'm going to say that this equals this so varshani overwrites n and then inside the loop this time then I say that last element is now temp student name basically swapping this one and the last one and then swap this one and then this one and then finally it's done because we're not going to get up that far because we went to half instead of going all the way through and what that should do is reverse the string or reverse the array of strings I apologize so we have everything in reverse order so I know it was a little bit quick on the last few you know go back watch the video you can kind of see how it works you have the code and hopefully that will become clear to you thanks so much


Hello everyone, welcome back to a new session on dentistry and more. So today we have a new topic that is preventive resin restorations. So I mentioned this in my bit and fissure sealant session. This is a restoration rather than a sealant, a restoration we do when there is involvement of caries. So it is cutting enamel and filling up with materials compared to just sealing of the pits and fissures. So let's see more details about PRR or preventive resin restoration. So it is a very new technique where we have better advantage compared to the traditional amalgam restorations. But the main problem it requires a excellent isolation of moisture and saliva contamination and if it is properly done which has a very long term success compared to the traditional amalgam. And we know how amalgam is getting replaced from dentistry because of its limitations of its bone strength, emotional leakage and a lot of tooth need to be removed when we apply amalgam because it has specifications like it requires a minimum of 1.5 millimeter depth of cavity and a 90 degree but joint should be present. So we might end up removing a lot of normal tooth structure for the sake of amalgam restoration. So that all are removed from this PRR technique where we think of a more conservative approach where the minimal tooth is removed. So PRR uses both invasive and non-invasive treatment of mostly borderline or questionable caries. So mostly this non-invasive treatment we have seen in Wittenfischer sealant use that is a non-invasive treatment. The invasive procedure also involved in preventive resin restoration because it is a restoration. Sealant process and restoration process is entirely different. We will not be involving any of the cutting enamel but the restoration involves removal of tooth structure. So this resin placed in caries areas and adjacent caries susceptible areas and seals them from the local environment. So we can use both sealant and restoration on the same tooth depending upon the caries environment. Because we have deep bits and fissures of tooth surface we think of only sealant therapy. So we just apply sealant, we do not need to apply any restoration because there is no caries involvement. But the picture is not very clear, you can see a black marking, this is caries. So we can apply sealant on all these places but we need to restore this point. So that is preventive resin restoration. So we are restoring this point and sealing all other points. So if caries is present in one area or part of the Wittenfischer, so that particular area that is this particular area is restored and the remaining part is protected with sealant. So that process is known as preventive resin restoration. If we do just restoration also with minimal intervention with minimal loss of tooth structure it is known as preventive resin restoration. If it is along with sealant also it is known as preventive resin restoration. So the three types that is type A, B and C based on the extent and depth of caries relation. So this is type A which is confined to enamel only, the caries is confined to enamel. So we can just using a very small burr, we can make a very small preparation because it is only confined to enamel. So slow speed burr can do its job, remove any calcified enamel and we can use an unfilled resin or a sealant to restore the preparation of caries relation because it is very minimal involved. So an unfilled resin is fine or even a sealant can do. But whereas type B which is completely involved in enamel and it has just ended then where we need to apply more strength or material because filler content we need to add or a material with filler need to be placed because more material means more strength it requires because of the anstricatory load. So preparation also is by round burr size 2 and we need to remove as much as normal structure possible, minimal to structure possible. We don't need to remove unwanted to structure like for amalgam administration. But the type A is very bigger cavity completely involved in amel and almost the dentine but it doesn't reached a pulp. So what we do is we are going for a bigger large size burr and a bevel is placed on the enamel cavos of a smonchin and we need to use both the material that is unfilled resin layer then we have to use a filled composite. So both should be used because the cavity is very big. So type A, type B, type C as you can see unfilled, filled and a combination. Here we are using both unfilled resin and a composite. So what are the steps involved in the PRR? So the first process is profile axis then it should be isolated with rubber dam or cotton rolls. Any decalcified areas over the tooth surface to be removed with burr, acid etching should be done, then washing and drying, bonding agent to be applied and then cavity to be restored with sealant or filler material. So these are the basic steps we apply for any sealing or any illustrations which involves curing light, because acid etchant and this bonding agent is a steps which involved where we apply curing light. So type A, type B and type C has different approaches in preparation of cavity. So advantages is the minimal cavity preparation compared to the conventional amalgonystration because it prevents unnecessary removal of healthy tooth structure. So it seal carries and it also destruction of tooth. So this picture says how much it cost for amalgam conventional restoration because as you can see there is a lot of restoration present and once it goes here most of the tooth is restored because we are unwantedly removing the normal tooth structure for the sake of amalgam requirements. Ultimately we end up using the tooth but in PRR it is just the carries areas we are restoring or sealant we are applying where it is carries prong. So there is no unwanted removal of the tooth structure. So the longevity is obviously very greater than compared to the conventional amalgam. So nowadays amalgam is nowhere used in dentistry or we are using a conservative approach with minimal tooth loss. So loss of frustration and subsequent replos replacement proves to be less invasive than that for conventional amalgam. So precautions early loss of PRR is almost similar aspect and future sealants because of the insufficient etching. So it is very important to maintain the excellent isolation and moisture contamination. So these are the very critical steps even in the pitum-fisher sealants. The isolation and prevention of moisture contamination. If moisture is involved the longevity will be compromised. So that's all about preventive restoration there are three basic types and always keep in mind that sealant is different from preventive restoration one is restoration and one is sealant. In sealant there is no carries involvement. We are blocking the pitum-fisher which are carries prong. In preventive restoration we are restoring the carries spot but with a very minimal intervention because with type A, type B, type C along with if there is any areas which are carries prong without any carries involvement we can seal it off. So that's all about preventive restoration. It is a very small chapter it comes along with ART, pitum-fisher sealant and PRR. So I will come over with a new session on dentistry and more. Thank you.


22 suspected crude oil thieves have been arrested by operatives of the Nigerian Navy along the Akasa River and Brass Local Government Area of Biosus State. The suspects and the vessel used in perpetrating the crime have been handed over to the Economic and Financial Crimes Commission, the EFCC, for persecution. A correspondent in Biosus State, Jesse Essay, covered today's handing over. This fall was intercepted on December 6, 2021, with 15 crew members on board for allegedly transporting about 700,000 litres of stolen crude. Investigation by operatives of Nigerian Navy ship NNS Oro led to the arrest of seven other collaborators. The Navy is not empowered to prosecute. This is a hand-over ceremony. We have established the fact that the vessel and a crew are complicit in crime that border on economic sabotage. As a result of that, we are here today to officially hand over the vessel and a crew to the Economic and Financial Crime Commission. We will be signing the handing over and taking over notes. The EFCC promises to do a thorough job in its investigation of the crime. The interception of the few vessels on the sea looked to be a major breakthrough for the Navy in 2021 as securing the nation's waterways and the resources therein still remains its core duty.


Increase in the subsidy of bulk flour to bakers from $12 to $17 per bag. Mrs. Speaker, our bakers are part of our National Food Security Program, and they have continued to feed the nation throughout this crisis. This provision is meant to stabilize the baking sector and alleviate cash flow challenges.


Hi guys, welcome back to our YouTube channel, this is Jason here from the Nathaniel School of Music and in this lesson, let's learn how to construct melodies on the piano given an existing chord progression using piano player's ultimate favorite tool, which is what? Arpeggios. Okay, so let's get started with how we can use them. First off, an arpeggio is where you take a chord in any of their inversions. So if you take, let's say the G minor chord which is Gbbd, you can play it like that, Gbbd, Bbdg or Dgbb, this is what we call as the different voices or the different ways the voices work or we also just say inversions or shapes or whatever else you want to call it. Okay, so you go Bbdg, Dgbb, Gbbd. It's good to be aware of the top note of each of these chords because the top note is going to be your melody line. So if I play, what did I sing? I sang the top note, which in this case is Bbd. So get used to playing the three notes and singing the top most note. So we go, and now in this version. So all the notes are, but you need to sing only because that's going to be a melodic note. And then if I take in the root position, Gbbd, D is your main melody note. So let's go or very melodic already just by observing the top note of the chord. What do we do with arpeggios? We play them one by one, obviously. We take the chord tone, play the chords one by one, play the chord tones one by one. And let's say I take Dgbb, always choose an arpeggio. If you want to build melodic lines, play the arpeggio in such a way that you start from the top note and then perhaps hold the top note. In this instance, I'm doing high note, middle note, low note, middle note. I could also do high note, low note, middle note, low note, which I also say HLML, HLM. So or HMLM, HM. We'll start with this for now, played as eighth notes, one and two and three. Arpeggios are usually played faster at three and four and one and two and three and four. With the chords in the left hand, creates a very epic feeling, right? Repeat the same pattern for Eb using inversion, Bb, Fmaj, if you sing the top notes. If you ask me, it sounds nice, but it sounds a little boring, not so rememberable. So what you could try to do is just change the inversions of each chord. You're not trying to play inversions here on the piano to make the piano playing easy. You're trying to use inversions here in this instance to actually bring out the voice or bring out the melody from the chord. So you take that's the D on top, C, Fmaj with C on the top, so you go la la la, D on top. Playing something familiar, right? So you see what's happening, right? You create a lot of popular music, which you would find in all these electronic dance songs, primarily because the synths are playing it, you know, and arpeggios are great for synths as well as piano. So using arpeggios, being a bit clever with the top note, the chord only has three notes. You just have to understand that the top note is what the audience or the listener is going to really react to as the melody. Now, this may not be a very singer like melody, but it's still very melodious. If you think about it, it's created a hook right here, right? So whatever I've done right now, I've just played the arpeggio starting with the high note and developing a pattern like HLML or HMLM, you know? And sticking on to that high note, holding, pressing it down with the top fingers, which is usually going to be your ring finger and your pinky finger on the piano, okay? So that's not over. You can do a lot more with these arpeggios now, and let's move on. And guys, if you haven't already, please subscribe to our YouTube channel right away. Turn on the notifications at bell thing and all that and share the video, share the channel, get more people on board. Let's get started. So with arpeggios, you can also use accents, which are sort of irregular groupings within a beat division system. So if you divide the beat, let's say by two and do something like one and two and three and four and one and two and three and four and that's a grouping of three plus three plus two, which is a very popular thing used in songs. So you go one, two, three, one, two, one, two, three, one, two. So now your melody becomes all that more prominent in the listener's ears because the melody is really striking at accents, it's striking at very unpredictable points, so it will be registered more by the listener. Or you could do that. That was what one, two, three, one, two, three, one, two, three, four. 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, Also my left hand is kind of playing an arpeggio of its own, right? That's also quite cool, but I'll probably talk about left hand arpeggios in another lesson. And if you haven't already, do watch one of our really older lessons where you may not recognize me. It's called creative arpeggios, so we will link that up in the description. Do watch that as well. Anyway, moving on. So you see how accents, irregular groupings of a time division can make arpeggios even more melodious. And then moving on, another style of using arpeggios is what I call as the wandering melody where the top note of the chord, since anyway the listener reacts to it the most, why don't you also react to it and move it around. So within the vicinity of the chord, within that vicinity, you don't want to play a note suddenly here. In any case, it'll be impossible. So you go, see it is sort of G minor, it works on G minor. There's a lot more melody because I'm playing more notes. I'm playing notes diatonically, very important to stay within the diatonic realm. In this case, we are on the B flat major scale which has two flats, B flat and E flat. So I can do something like the next chord, F major. See what's happening. What's also quite exciting is I was able to play that same sort of same motif and spice it up more with the harmony as an arpeggio. So the melody will probably show off itself as over G minor, over E flat major, B flat. And then if you don't want to play that same na na na na over F major, you could do You can use your voice. Your voice will sort of kick in the piano to kind of move away from its comfort zone which is just playing around the same point. That's what we ... That's what our natural instincts will want to do in the right hand. But your voice will push the piano because your voice is always going to sound good. It's a no filter kind of thing. thing. So when you sing, it's the most organic way to help your piano and then the piano takes over because that's your main skill. And yeah, so we've talked about usage of accents to make an arpeggio pattern more and more awesome. We've looked at the wandering melody where you take the top note and move it around a bit. And another tip I'd like to share with you guys in the field of arpeggios is where you can take broken up arpeggios. You don't have to play all the notes of a available time feel, you know, you can just play a little bit like for example, if I divide the beat by four, I can count as one e and a two e and a three and a four e and a one e and a two e and a three, but you don't have to play sounds a bit busy. So you could do maybe I'm skipping the e of the one e and a isn't it or every and so sounds like a gallop money money. I'm skipping what am I skipping I'm skipping the and isn't it one e and a two one e and a two e and a three and you can always combine arpeggios with what we've learned in the earlier videos. So if you haven't already do what some of the earlier chapters if you will, where in one lesson I've talked about passing and landing tones. So at the end of the phrase, maybe if you played it's getting a bit boring, right? So you can use passing tones to make it a little bit interesting at the end like a drummer playing a drum roll. That's how I look at it. So you can go and that what was that? I just did some passing notes to finally land back on a chord tone. So when you combine arpeggios with some of the other concepts of melodic creation, like following the chord tones, passing notes, landing notes, whatever else, man, things will get a lot of fun on the piano. Even though you're playing a rather cheesy chord progression, which is six four one five, which you must have heard in a lot of songs. So I apologize if I've chosen six four one five and you don't like it. I just thought I'll choose something popular so that everyone can sort of relate to this. You either have heard it enough and more and you don't like it so much or you may really like this, right? I'm sort of in the middle. So that's about arpeggios. Guys, very, very important for pianists to use arpeggios. You could also look at other musicians who play other instruments and learn from them. For example, a banjo or a mandolin or a finger style guitar. Listen to them and see what they do. They pretty much do the same thing which we are trying to do in the piano on the right hand. All the best with arpeggios. As always, do stay in touch for more videos. Like, share, subscribe, comment and more if you can. Cheers.


Hello everyone, thank you for joining me for this session. It's about Ansible Console, how to debug many nodes in an emergency or not. The idea and all the slides I done by my colleague, Pierre Blanc, who is unfortunately preferred to run marathon than coming to the conference. So you are stuck with me here for today. Let's jump right into the talk. So here is Pierre, you don't see him today, but you could always join him by email if you have any follow-up questions. Today's agenda is about short story of appearance of Ansible Console, how to install it, how to use, and some benefits that you could get out of it. So in short, it's a console for executing Ansible tasks. It's an open source project, and it's another way to consume Ansible modules. You could have immediate usage as visit hook commands. It's perfect for occasional or urgent use and the really great feature, it allows you all bash short cards, and I will show it off in some moments. So a bit of history, Ansible Shell was written by another C-vocal, soon known as Dominis, and his first contribution are of 2013. So Ansible appeared in 2012. So the need of having something like Ansible Shell was immediately here, and it became a part of Ansible Code in 2016 after the acquisition of Ansible by Red Hat. It's a part of official Ansible project since version 2.1. So it's included in Ansible Code, so how to install it, it's easy, you have it with RPMs the same way as you have Ansible Dock, Ansible Galaxy, or Ansible Playbook. That's really easy, it's all in here. So concerning the place in Ansible ecosystem, okay, here is really simplified, but what I want to show you on this slide is that it's basically the same access to collections, modules, and plugins as Ansible AdHoc has, but it has some additional benefits in comparison to AdHoc, so let's compare them both. So AdHoc allows you to use a module to perform a single task, okay, so no history. Ansible console allows you to execute multiple tasks and it keeps the state of the previously executed task, so it's more extended usage in comparison with the AdHoc. So let's jump into the execution. So you execute it exactly as the same way as Ansible, you are providing the inventory, and here we have the typical prompt, okay, so what do we see here? Here we see a username demo, we see all groups selected, we see 20 nodes, and we see 10 forks, if you want to run a parallel execution. So what we could do with this inventory is here, we could list selected nodes, list available groups, and select a group of all nodes. We do it like this, so here we list all the groups backend, frontend, and ungrouped, we select frontend, and we list three machines that are in frontend. We could also come back and select all the machines, or we could just select only backend and list two backend machines. We could just select one machine, and you see the number of machines selected, this displayed right here in the console, so as the first part. So again, we are coming back to all, and we are having all five machines, three frontends and two backends selected right here. We could also list available groups, and then the rest of the part I already showed you here. So let's jump into the usage, so what we could do as a simple thing, first of all, we could just execute an unskilled task, so let's install HTTPD server on every frontend machine. So what we could do here, we could first narrow down our group to the frontend, so instead of five machines, we just keep here three frontend machines, and then we execute an unskilled task to install HTTPD server on each of them, and so here is the result, nothing to do, the everything is already installed. Okay, so that's how you execute unskilled task, here's the help of console. Let's go to a more extensive usage, what is good about unskilled console is that you can use facts, okay? So here is how you can get facts, and here is how you could just check out this fact, so again, here we are executing unskilled command, but now we are using the fact that we governed right before. So we just discussed a sort of unskilled usage of the console, let's now jump to a shell usage, so it's not only unskilled commands that are available here, the great thing is that you have also shell available, and I will show you that actually you could combine both. So for the moment, let's just check out shell, so again, we are in the frontend group, and we are just displaying a Linux release that I installed, and we also could force the execution by using the exclamation mark if needed, okay? So we discussed unskilled usage, we discussed shell usage, and now here is the more important slide in this presentation, let's discuss the combination of both, how we could use ansible facts within the shell command. So here it's a bit in the middle of the gif, so let's just wait in the beginning. So what we could do here is that we could basically execute the facts governing, okay, and get the facts for all the machines, okay? So now what we are going to do, we are going to execute a shell command, okay? So we are going to check the content of slashetct slash modtd file, and here is the best part. So we are combining here shell command with the ansible variables, which is retrieved from before. So you see we are keeping history, we are using ansible facts that were retrieved by ansible commands, and we are using it within the shell command. So it's really great, you have a huge flexibility. So you have really a combination of shell and ansible and goodies from the boss within one part. Shell, ansible, and you are keeping history of the previous command, so it's really great. It's something that I really want to promote. So this is the most important fact of the presentation. This is what I wanted to pitch here. So then, if we just speak about how to start, ansible console provides you an interactive help. So you could basically check the syntaxes of each command, you could check the execution, and you could easily get a helper and auto-complete with every modules. So here is the demo. So for example, I want to get a help of the copy command and I display what it could be done. And I also want to get an auto-complete and here is how it goes. So let's go to some bonuses. It's like real quick highlights that I personally like here. So what you could do, you could exclude a node from the selection. So it's really handy. If you want, for example, to debug all nodes, except one in which you are really sure, you could use become option. Be careful with that, but you can. And you could really trim a number of used forks. So if you want execution one by one and no parallelization, just use fork one. If you want to run everything in parallel, you could use a lot of forks. And also the story of your execution is right here, Ansible console history. So if you want to check out what was done, you could. And let's jump into the conclusion. So it's easy to access fast and intuitive. It's improved that Hoc command. So what you get in plus in comparison with that Hoc, you have history, you have Ansible variables, you have multiple tasks. It's really convenient for one time interventions like testing and debugging. It could easily replace softwares like cluster SSH, PSSH, and so on, because of its combination of shell and Ansible usage. So here you have links to the source code and to some resources. And here is a quote from the creator of the console. Hope no one accidentally nuked the entire infrastructure because it, and that's it. Thank you so much for the attention, guys. You have five minutes for the questions. Let me just go back to the most important slide of the presentation and here you go. Okay, yeah, go ahead. Can we use console to implement a custom module that I would be developing? I can write in a custom module for Ansible. Can I invoke it in the console or do I have to wire it somewhere, in some way to be able to call it? I'm not really sure to be honest. I don't know the answer to that question. I think once you publish the collection as official Ansible collection, for sure you can. Okay. If you can it during development, this I don't know exactly. I'm not really into Ansible development life cycle. You could ask Pierre. I'm sorry for not having an answer for that. No, no problem. Thank you. Yeah, do have, yeah, go ahead. In Ansible, but let's say that I wanna know, can I do that or how is, like, for me it looks like that it has a... Yeah, it's okay, sorry, I will repeat. So the question was how it's distinguished between Ansible commands and shell commands. Okay, in some obvious situations as these variables, you have Ansible syntax right in here. And I imagine that you could enforce Ansible syntax using the quotes. But to be honest, I'm not really sure about really tiny situations than the names could be mixed up. What, from what I've seen in the usage, it's basically first tries to interpret as shell and then it tries to interpret as Ansible if it's not available. But again, I'm afraid I'm not, I don't know the exact answer in all the tricky situations. Thank you. Do have any other questions we still have sometime? Do not hesitate. There is also email of Pierre on the first slide of the presentation. So if you have, like, really in-depth question to which I'm sorry I did not reply today, could reach out to him directly. So he's a really good guy and he could provide you really in-depth expertise on the subject. No questions? I think you are good then. Thank you so much.


Everybody for a steer ripping 2022 top Star Wars chrome galaxy hobby for bucks number 10 random letter style we're gonna do the random right now and Then we'll get started Checklist up. There we go All right, so randomized names and then letter same amount of times when I'm side-by-side and then we started good luck everybody Two and six eight times I did not know that Blake I did not know that eight times in the names one two three four five six seven and eight Anthony W down to Michael M and then eight times on the letters one two three four five six seven and eight a Down to our all right, Anthony W a Roger H. M. N Kihun K B Francis D T Wang SK Andrew S eight Francis D P Michael E H John W G Michael M Q and X mark G you through W Y and Z Darrell M C William P's S Stefan H O Francis D L Andrew S J John B E F I and Michael M with R. Let me get those posted We're getting right into it a few things before we start opening boxes here Letter means the first letter of the card. So T so the would be T Autograph cards go to the first letter of the character not the actor It's only spot. We don't use a checklist for if an insert has no texture you've heard of the checklist The car go to the first letter listed so everything has a name there Any sketches we ran up to everybody at the very end of the break and Gameplay Galaxy inserts referred to the first letter of the card on the checklist after Star Wars So like Star Wars Battlefront 2 is B Star Wars Jedi outcasts is J for instance. So that's that let's go ahead and get started everybody. I Do Friday night breaks Sam is doing Friday daytime What happened Blake? What happened on tiktok? Usually eBay is the best place to go regardless. I mean you can go to 130 point comm as search is eBay listings Fractor Poe Dameron P as we'll get to the refractors. So Han and Chewie there for H This is a v12 so vintage Star Wars v12 Goes to Dulak shaman D refractor wedge antelies in battle W battle with the Dianaga Guy refractor creatures of the cantina for C Wandering glass now glass as a beast Three PO there's that a Star Wars Jedi starfighter goes J for gameplay Galaxy J Jedi starfighter Fractor a dark turn for Anakin. That's a Fractor Abort the bridge a to the trooper got an auto coming up after a refractor of Yoda That's one for why base refractor Yoda the auto is BB8 going to be a blue refractor numbered 5 of 150 And it is Brian Herring puppeteer for BB8 Go solid hit. There's base Vader sketch variation of Kylo Ren goes K Boba Fett refractor B. All right refractor tuskin raider at dawn T Concept R. I believe it's ATST on this one OT 8 original trilogy concept art OT 8 There it is. Yeah, ATST goes a refractor Dual on the Death Star for D refractor Stormtrooper surveys the desert for s other base Vader Darth Vader goes D Is a you believe that's papalu v9 Yeah, papalu for P refractor of tech T Fractor Harris and doula H Atomic aboard the bridge really good-looking card here Go into a 101 of 150 Star Wars TIE fighter T gameplay galaxy goes to T Impers power refractor Yoda on Dagobah Y Refractor Leia and her bush disguise. Yep L Torah does a sketch variation refractor the shadow of the Dark Lord go into T nice one T base refractor of Greedo G Was a princess Leia concept art refractor echo go into E First box down. Let's see what we got on chrome black now chrome black at 11 to go breaking next I'll go tweet that out get you guys a link And that's random auto or pack for spot either get an encased auto or a numbered refractor Or a numbered parallel I should say Her spot purchased All right box two or start out with an orange Jedi Starfighter gameplay galaxy that looks awesome 7 of 25 congrats to the J spot I've played that game a lot when I was a kid on ps2 Yeah, I played that game through maybe like 20 times There we go nice one for Jay refractor of Leia, Organa L is doing really well in this break right Republic commando gameplay galaxy for our that was a fun game I was going to Inside the meditation chamber refractor I Fractor general grievous for G as a Anakin Skywalker sketch variation there refractor stormtroopers on hoth Or invade a hoth s Oh, yeah, ps2 was way better than ps1 Fractor Gomorrian guard G redemption is base card atomic refractor vintage Vader So vintage Vader does go V. I'm pretty sure let me just check here Yeah, vintage Vader does go V that is exactly the name of the card the base redemptions That'll be probably really cool. That'll be the 150. I believe on the atomic vintage Vader V That's not an auto, but it is a like base redemption essentially What with that starship on the original trilogy concept art? I don't even have to do that I think I think it'd be okay Po damman sketch variation we've got refractor Darth Vader Our lord Vader assembles his stormtroopers l refractor a Han solo base refractor I think blu-ray was ps3 I think Yeah, ps2 definitely didn't have blu-ray because that came out in like 2001 or 2000 or something like that That was before that Uh, vint our original original trilogy concept art. It goes luke leah and hawn so ellon this one R2 d2 base refractor Shoot intended was great too Salacious be crumb refractor So donnie's brother Donnie donnie crumb No, we call this shawn. Oh, that's shawn. Yeah, why is it shawn the samsung? Oh, okay All right, good luck with that uh v15 Wicket in the tree in the bright tree village medical droid refractor m a hyper coming up or a prism coming up as a prism refractor of e walks under attack going to e Number it's 60 of 75. I don't have any of my any of my older consoles except my um xbox one refractor grand moff tarkin for g retro style consoles role plays s nes and Bubba federal original trilogy concept art refractor luke skywalker Is base refractor Yes, I know different than the old stuff. It's like the same thing basically weak way base refractor Yeah, that's pretty cool spear That is x-wing versus tie fighter going to x gameplay galaxy Refractor fin f Auto coming up after refractor of ala sakura for a it's going to be a klatu auto for k Klatu is corey d williams Those those were the days refractor wicket warwick w all right saw a couple boxes so far Let's hope for like a big hit here Box three sketch variation hunter got refractor the buntah eve classic for t Fractor above a fat battles the sarlak b Tuscan orator original trilogy concept art Uh storm trooper storm Darth Vader for s refractor of han solo and chubaca in the cockpit for h I forget what this one is v seven vintage Star wars the from gang for t Wookie war dance w refractor refractor battle with the diannaga for b mojo refractor Lord vader Ready's a ship 39 out of 50 nice card for l l has done very well here l francis d congrats congrats Uh galactic battlegrounds on the for g here star wars galactic battlegrounds Game play galaxy Refractor c3 poc Torah doza refractor t Hey, walter, uh, do you guys turn hammers only on hammers only oh boy refractor sith trooper s Yeah, some of the other ones are just unnecessary or op Some of the other ones are just way it would be like the one that shoots the beam Oh, yeah, that one's this one refractor, uh, the infamous boba fett for t Atomic nice a dark turn for anakin a 72 of 150 this this third box been really good some really nice refracts the number of refractors here That is such a cool card concept art there Refractor boba fett ambushed, I believe b Yes, and a lux bon terry auto for l Jason speesack has lux bon terry It's a bunch of Nintendo characters who fight each other essentially Yeah smash brothers you turn on you it's like a Hammer's only donny means like there's like the the power-ups and one of them is just like a hammer And you can make it's where it's like that's the only one that's available Luke the jedi and the princess for t on the refractor here It's also fun to just turn nothing but pokeballs on Like the max spawn rate. Yeah, just have a pokemon battle throw a pokemon everywhere refractor trudging for t That's always fun refractor record w you should try it out walter Yeah, the pokemon one is fun, too. They did like Charizard's pop up and oh boy super bomb bad erasing s refractor a wookie in the wilderness for a a wookie in the wilderness Fractor obi-wan kenobi. Oh All right onto the last one. Let's see. What is up with star wars chrome black next Throw out a link right seven ago awesome. Let's get tweeted out Well, you guys should walter it's a good time Yeah messing around with like the power-ups stuff like that is one of the more fun things to do. Yeah It's putting it how you want to play really We got to bring smash brothers in here one day dude that would be so much fun But we have to like have a day where like we don't have anything going on It would legitimately have to be like a Yeah, it would have to be like a After 5 p.m. type thing I would think what even then there's always someone breaking or doing something right It'd be like here's your holiday off also come to work and play games Yeah, we could just keep it around and games are just happening. You know what I mean, right green refractor sketch variation crosshair For the letter c bv 90 is going to be crosshair 51 of 99 One of the more interesting characters at least in the animated series recently. Yeah He's a he's a good character. I hate how they turned them but refractor anakin skywalker a I think it's all uh All for the best, I think It makes for a better story, right Refractor storm troopers invader snow troopers invader hoth s either way. Yes. No troopers s They're refractor general grievous g Refractor fin f Refractor star wars s factor crosshair c Super star wars going s on the gameplay galaxy Super star wars refractor bubba fat battles the sarlacc Dude those star games for Nintendo were no joke They're incredibly difficult. Yeah, they're so hard refractor Luke Skywalker in action l I don't think I ever got off off on the empire strikes back. I don't think I ever played them, but I've seen like people playing them I have empire strikes back. I I think I got past the first two levels. I never got factor I think it's solo investigates. Yeah s solo investigates s They're so hard One of the PlayStation one jedi games was difficult There's just like episode one type game. Oh grito sketch variation refractor chubaca Was it uh power battles or something like that? Yeah, top battles is pretty tough at least when I was like 10 Yeah, I didn't know what I was doing so There were a lot of like I'd love to go replay that game I would too remaster version that I'm in purple refractor. Wow han solo That's sick. Whoo 15 of 25 H big card Michael e What a hit wow huge congrats Holy cow, dude. I'm trying to get this in like a nice light. I remember game boy. I'm 30. I don't like the same age Yeah June Okay, yeah turn 31 this year, right? Yeah refractor x-wing starfighters don't remind me How does it go in tone that's a huge hon solo right there Uh bouncy hunters refractor b I remember game boy game boy color was more popular when I was in like elementary school So like pokemon cards started becoming popular like second grade for me and that's kind of when game boy took off because The pokemon games are definitely the most popular game boy games ever. Yeah for sure I refractor the emperors power t as far as like game boy color Maybe not the original game boy because that only had like a few versions Do you ever have the modified thing or it's like a big refractor the uh dark lord and a new hope t It's like a big magnifying glass the light and then the speakers. I remember that yeah I remember that That was one refractor a galaxy within grasp and an auto Uh fixer 20 of 50 going f Skyler bible or bible Spelled bible. I don't know if that's the how you pronounce it Fixer f Yeah, game boy was the og the giant brick the game boy color came out And then what was a game boy advanced after that? Yeah refractor Didn't mean to intrude for d ds was after advanced and then it was The switch I don't know I don't think they made a game boy after ds I don't think they did either it went to like we and then like switch pretty much refractor crosshair See So the next handheld would have been switch. I believe yeah, I mean maybe like different versions of like a ds like an updated one Oh, yeah, I think they did but but yeah Not like as like like the ps2 and they made the one that was like had more memory like whatever, you know Right same thing same console quick recap. All right. We had the fixer auto to 50 lux bon terry Not numbered clot two not numbered. This is a redemption for a base card vintage vader for v blue auto bb8 um To 150 and purple hawn solo To 25 big time hawn solo That's gonna do it for the break. Nice.