Once we have the quadratic formula, we can use it in order to factor quadratic expressions. So this emerges from an important result in mathematics known as the factor theorem. Suppose I have a solution to polynomial equal to zero. So I have some polynomial and it's an equation where that polynomial is equal to zero. And suppose a solution falls out of the sky and hits me on the head. Then one of the things I know is that x minus a is going to be a factor of that polynomial. So if I can find a solution, then I can factor. And we also use the term root. When we talk about the polynomial itself, we say that x equals a is a root. And what we mean is that x equals a is a solution to the equation polynomial equals zero. Now one of the things this means is that I can factor a polynomial by finding the roots. And this is a very important. You never, never, never, never, never try to solve a polynomial equation by trying to factor it. Instead what you tend to do is you find the solutions and use those to find the factors. So the quadratic expression is a particularly useful example because we have this nice quadratic formula that gives us all of the roots to the polynomial, all the solutions. And so that means the quadratic formula will also tell us how to factor any quadratic expression. So for example let's take a look at x squared minus x minus 12. If you've been practicing, practicing, practicing, practicing, factoring for years and years and years and years you might be able to look at this and say, oh I know how to factor that. But let's say that you want to factor it without having to go through the years and years and years of practice. Well to find the factors we'll look for the roots and that means we'll try to solve the equation polynomial quadratic expression equal to zero. So how do we solve something like this? Well we don't want to factor it. That's the problem we're trying to deal with in the first place. We don't want to factor this but that's okay. It's a polynomial. It's a quadratic expression and we have this very nice quadratic formula that will tell us what the solutions are. So x equals, well I know a is 1, b is negative 1, c is negative 12. So I can drop those into the quadratic formula and after all the arithmetic does settles I'll end up with both solutions x equals 4 or x equals negative 3. And again the factor theorem tells us that once I know the solutions to quadratic equals 0 I also know the factors x minus 4, x minus negative 3. And so that tells me I can factor this polynomial as x minus 4 times x minus negative 3 and I'll do a little bit of cleanup that minus and negative becomes plus 3. So here's another example, factor 6x squared plus x minus 12. And if you've been doing factorization for years and years and years and done hundreds of examples you're going to look at one of these and say, ew, I don't like this type. These are the ones that are really hard and painful because they require lots and lots and lots and lots of trial and error because 6 has lots of factors, 12 has lots of factors. And this is going to be something that's going to take us 20 minutes to figure out. Well we can actually solve it much more rapidly if we remember the root theorem. So again I want to factor this. I'm going to solve the equation quadratic equal to 0. And again I have this nice quadratic formula. So I'll drop these coefficients into the quadratic formula. A equals 6, B equals 1, C equals negative 12. And my quadratic formula gives me this and after all the arithmetic thus settles I do need to know that the square root of 289 is a whole number. That's actually the square root of 289 is 17. But I can then find my factor 16 over 12, negative 18 over 12, or I'll reduce that to 4 thirds or negative 3 halves. And so I have the solutions, 4 thirds, negative 3 halves. And that tells me that this is the product x minus 4 thirds, x minus negative 3 halves. Now there's one limitation to this particular approach. I know that x minus 4 thirds is a factor. I know that x minus negative 3 halves is a factor. There may be other factors that don't give us solutions. In particular there may be a constant factor that I'm missing here. So let's think about that. Now if I expand the right hand side I'm going to get x times x. I'm going to get an x squared over on the right hand side. But I want a 6x squared over on the left hand side. So I have this really complicated problem to figure out how I get a 6x squared. And what I need is an additional factor of 6 to complete de-factorization. So I'll drop in that factor of 6 and there's my factorization. Now as a factorization of this polynomial expression this is a great way of leaving it. This is a beautiful expression for what is the factorization of this. Well it's 6 times this times this and there's our factorization. Now if you've done polynomial factorization for years and years and years and years and done hundreds of examples you might look at this and say I've never come across anything like this. And the reason is that we like to have integer coefficients in our factors. We don't really need them but we like to have them. So what we can do is we can clean this up a little bit. We can eliminate these fractions by breaking this 6 apart into 3 times 2 and then distributing it among the different factors. So 6 I'm going to replace that with 3 times 2 and I'll rewrite this x minus negative as a plus and that becomes 3 and a 2 here. I can rearrange the product anyway I want to because of associativity and commutativity of multiplication and they can distribute the 3 into here, the 2 into there and that'll get rid of my fractions. But again this is a perfectly beautiful, perfectly legitimate, perfectly correct factorization of 6 x plus x minus 12. Everything you do after this point is in the nature of cleanup.


So sir, where are your sights at? Damn by. Shots at Daniel Bryan-Deadson.


All right, in this first section, we're going to take a look at this Rapture toolkit. And to help you understand why, why we're bothering, let me take you on a little trip back through time. The year is 1985, back to the future was just out in the box office. Don Henley was singing The Boys of Summer and the Super Bowl was going on, it was the 49ers versus Miami back in the day. I'm sure you all remember, right? How many of you were born then? All right, hooray.  And I was working on a program at Purdue at the time, which was called SQL 2.1, semi-conductor electrostatics with quantum analysis, that was my program. And it was written in Fortran, Fortran 77. It was supposed to simulate a resonant tunneling diode, which is actually what it is as a sandwich of material layers, really, really thin nanometer sized material layers. And it turns out if you make a sandwich of different materials like that and apply a bias to it, it does really funny things because there's quantum physics involved. And if you get the quantum physics right, you get some interesting characteristics out of this thing. So here's this program that I had. It was written in Fortran 77, look at all the ASCII art, nicely formatted output. I spent a lot of time doing that. Again, back in the day, that was what we called graphics. And these are the guys in the machine room, not really, but pretty close back in the day. And it turns out if you wanted to get a copy of that program, you could write to my advisor, you could send him a letter along with like a $10 bill and he would send you a magnetic tape, probably bled off by those guys that had the software on it. So when I graduated, that's what happened. They gave me a cap and gown and said congratulations and we set up this agreement that anybody that wanted the software could send in a $10 bill and get a tape. That was back in the day, right? So nowadays the same program is available on Nano Hub and this is what it looks like. Same thing, the only thing that we did was we put a graphical user interface on top of it. So it runs the same engine, the same code. But instead of looking like that, it's like this. And instead of a $10 bill, you just log on to Nano Hub and push the button and it comes up and starts running. And it's pretty easy to use. You just fill in the number fields and then click simulate and boom, you've got a resonant tunneling diode at your fingertips.  I graduated thinking that I was going to make a million dollars. I'd be the next Bill Gates because everybody wants my resonant tunneling diode program and all I'd have to do is sell 100,000 copies, right? I'd be rich. But nobody did this because nobody wanted to go through the bother of $10 and the magnetic tape. But on the other hand, this now on Nano Hub has thousands of users. People are using the code because it's free and it's easy and it's available. So that's the point for all of you. You guys can do the same thing. You can take your code or your advisor's code. You can put a graphical interface online, put it out on Nano Hub, and thousands of people will find it and use it. In fact, if you look at the stats, you can see that. Nano Hub does a really great job of tracking stats, statistics like how many people have accessed this, how many questions are out there, how many citations in academic literature. I hardly ever got citations when I was doing this, but now it's actually starting to get some citations. Because it's out there and people find it. So the bottom line, the story, the moral of this story, I guess, is the magnetic tape was $10 and the live simulation tool is priceless. Like the MasterCard commercial. So that's what we're trying to do here. For the next three days, I want to show you guys how to do this, how to take your advisor's stinky Matlab code and make it look fantastically beautiful and live on Nano Hub. Don't tell him I said it was stinky. All right, so here's what it is. The Rapture toolkit takes that code and moves it into a graphical interface, sits in between the two, and basically manages all of the inputs and the outputs to your program. Rapture stands for the Rapid Application Infrastructure. Came out a long time ago in 2005, and we've been sort of working on it a little at a time ever since. It's available as open source on rapture.org. You have to spell it with the two P's, it's kind of an internet thing. So the two P's makes it cool, and it's basically creates standard desktop apps. The best thing about it is that it works with your favorite programming language. So all kinds of languages. You may say, well, I don't like Fortran, I don't know Fortran. Well, that's fine. Maybe you know Java or Ruby or Python or Pearl or any of those, Matlab. So we've even added R and a few others recently. So whatever programming language you like to use, you can take that code and you can put a Rapture interface on it. It'll work pretty much the same way. And so far, we've used it to deploy hundreds of tools on Nanohub and on other hubs. So Nanohub has about 230, 40 tools right now. Almost all of them are written in Rapture. Just because, not because we require it, you don't have to use Rapture to put tools on Nanohub, some people use other things. But it turns out it's a whole lot easier to build the tools in Rapture than it is to roll your own interface with QT or Matlab. A lot less work, so people like it. And it's used for other hubs too. Pharma Hub has about a dozen tools, Neese has a couple of tools. You look at all the different hubs, there's at least a few on a lot of the hubs written in Rapture. So there are really three parts to the Rapture. And we're gonna start today, this morning, with the builder. But let me walk you through all the parts. By the time we get to Thursday, we'll get all the way here to the tester. So you start with the Rapture builder and you can kind of drag and drop controls and fill in information and push a button. And it generates, it saves the information into a file that we call tool.xml. It's an XML description. XML is the extensible markup language, it's like HTML. So it's just an information description of everything you told it when you were dragging and dropping your interface. So we save this description, everything we need to know about your tool is in the tool.xml. Then when you wanna run the tool, Rapture, when you say Rapture or Rapture dash run, it will read the tool.xml that was generated by the builder. And it will generate the interface based on the description. So if you told Rapture I've got a number and I've got a Boolean control and a curve comes out, then the Rapture runtime reads that tool description and renders the graphical interface. And when you push the button to run your tool, it'll write out a run file. The run file will have all the information about the inputs and everything you need to know about that run. And then finally, the last part is a tester.    I want you to change that. I want you to fix this bug. So then you go to publish again. You wanna make sure everything's correct. At that point you can run the tester and the regression tester will run through all of the previous test cases you've generated and make sure everything matches up. If there's a problem all of a sudden, if you fixed a bug but actually broke something else in the process, the tester will catch that. It'll tell you something's wrong and then you can go back and take another look and fix it. So those are the three parts to Rapture. The builder, to build your tool. The runner, this is where when the tool's running on Nano Hub, it's mostly running in this area. And then the tester, whenever you go to put out a new version to the tool, you can test it and then deploy it. And these tools aren't once and done. I mean, you may put up a first version of your tool and add some stuff and put up a second version, 1.1, 1.2, 1.5, <IP_ADDRESS>, you can have a lot of fun with numbers. But anyway, you put up a lot of different versions of your tool as you keep adding features. And that's typically a healthy thing to do. But along the way, you wanna test and make sure it's working. All right, so let me show you what the Rapture builder looks like. When you bring this up, which you guys will be doing in just a minute, you get a graphical kind of interface like this. Over here, on the left here, there are a bunch of different control types. So things that you can choose from, curves and boolean values and strings. And what you do is grab one of those and drag them over. Drag them into the input section and it becomes an input. Drag it to the output section, it's an output.  Then for each one, you highlight a particular one like this boolean value that's highlighted in the bluish-purple color. And it'll show you all its properties, so you fill in the properties. You change its label, its description, give it a default value. You keep doing that for all the different controls to configure them. And then you can click on that preview tab. And the preview tab will show you what your interface is gonna look like. And you can check it if it doesn't look right and go back. And you can edit some more, look at it again, preview it again. And then finally, there's a save button up at the top.  That's it, that's the builder. If you've done that much, you build something, hooray. So what I wanna do next is kind of walk you through that. Show you what it looks like in real life, not just PowerPoint. Because you guys will be doing it in just a minute, so watch and learn. This is what I'm gonna build. I want a simple tool, it's like a Hello World application. So it's got two inputs. One input is who I'm gonna say hello to. I can put in any name there, Fred or whatever. Another one is a Boolean control, which is whether or not I want enthusiasm, add an exclamation point to the output. So I have two inputs coming into my tool, and then it's gonna generate some output. And the output it's gonna generate is just a string, the Hello World message, right? So that's my very simple tool that I'll build. And I'm gonna build it with two different languages just to kind of show you how it works. I'll build it in Python and I'll build it in Fortran, all right. So let me flip, bring up my web browser. I'm gonna work on hub zero. And when you're doing this work and you log into a hub, one of the tools that you'll find either on the all tools list or somewhere, maybe it's on your recent tools. One of the things you'll see is something called a workspace. A workspace is like a Linux desktop that you can access through the hub anytime, anywhere, and it's where we'll be doing most of our work today inside of the workspace. So you find this workspace tool, and there's a little button right here that you can click on to launch it. If I click here on workspace, it'll just take me to the description of the workspace, which I can also click here to launch it.  And what it does is you may have to allow Java to do its thing. It launches a workspace section back on hub zero, and mine didn't go so well, it says something about inactive plug-in right here. So I'm gonna try it again. Restart my browser after enabling, great, hold on. Hooray, all right, so that's the way it's supposed to work. Let me bump up my font size so you guys can see what I'm doing. All right, so this is what it looks like when your workspace comes up. And if you have any problems with Java, you gotta maybe fuss with it, and make sure Java's enabled, because if Java's disabled, you'll have all the problems I just did. So now I'm in a workspace, and I have a command line here where I can type stuff. You can see I have a bunch of files here. These are all on the hub zero side. And I'm gonna go into my boot camp, 2012, into the lectures. And I'm gonna make a directory called hello for hello world. Okay, so now I'm in my directory. I can say rapture-builder, and it'll bring up the builder program. All right, so this is what you guys are gonna do.  You can browse through all the objects on the side and see what's there. And I'm gonna start by grabbing a string and dragging it over to the input and dropping it. So now I have a string there, right? And I also wanted a Boolean value, and I'm gonna drag that in. So now I have those two values, and I can kind of configure them. This name right here is the name we'll use inside our program. We'll see that in a minute. Rather than call it value one, that's what rapture calls it by default. I'm gonna give that a little better name. I'm gonna call that name. That's the name of the person. And I'll label it on the GUI, say hello to. So that's who I'm gonna say hello to. Of description, you can say this is who we say hello to. And there's some other stuff that we'll talk about later. And I can put in a default value, like world. So by default, I've got the string control now. It's labeled, say hello to, and the default value is world, right? Hello world. Now I'm gonna look at the Boolean value the same way. And this one I'm gonna call in my program. I'll call it exclaim. So that's the name it'll have. I don't wanna just call it Boolean, I'll call it enthusiasm. And the description is add an exclamation point. And down in the default value, I'll set it to false. So you have to ask for enthusiasm to turn it on. Now one other thing, I wanna produce some output. So I can grab a string control and drop it over here on the output side. And the output, I'll give it the name result. And hello output. And this is the output generated by hello world. All right, so now I've got an interface. I've got two inputs, the string and the Boolean value. And it's gonna produce a string called result as the output. So I pretty much describe my interface. And I wanna take a look at it, so I can click on preview. When I click on preview, it tells me uh-oh, there's a couple of things wrong. There are three warnings for the current tool definition. You wanna take a look at them? Yeah, all right, let's take a look and see what I've messed up. Say yes, and it'll show you up here each warning. It says first of all, I should have a title that describes the tool. Yeah, I forgot completely, I didn't even look at the tool part when I was explaining all this to you. So let's make up a title. This is, I'll call this simple hello world. And then I click next and it gives me a description. Okay, it says you should have a brief description of the tool. This usually pops up when you're first doing it. So the description is demo app for bootcamp 2012. Okay, and then next, and then it says, you gotta set the program type down here. So if you click, and you notice it's highlighted, you click on that, it'll show you, these are all the different languages that Rapture supports. And depending on how I wanna do the demo, I can pick any one of these. So for right now, I'm gonna start off with Python. Any of you guys know Python? Seen Python before? Yeah, all right, well it'll make sense to a few of you, I guess. So let's see what it looks like. And there's no more warnings, so I'm all done here now. So I can click on preview again. And now it shows me the preview. So I get a sense of this is what the program's gonna look like in a minute when I start to run it. And you can very quickly take a look and see, does everything look right? Did I forget to label something? Did I have a good description? You notice all the descriptions that I gave will show up as tool tips. So if I mouse over, say hello to world, and then the little pop up message is, this is who we say hello to, right? And similarly, the Boolean value, add an exclamation point. So if I flip back, you can see again, if I wanna change the message, then I can just change any of these input or the default value and so forth. All right, so all that looks good to me. I'm gonna go ahead now and save this, so I'll click save as and choose, and I can choose to save it to any file. You notice by default, it says tool.xml. That's kind of the Rapture conventions that we always save it into a file called tool.xml. You can change it if you want to, but I'll just keep that. And I can also have it generate a program for me, a skeleton program that I'm gonna fill in with the logic for my program, and that's a good thing. It's probably a good way to get started, especially if you're just getting started with Rapture. So I'll choose this main.py, or I can give it a different name too. If I click choose, I can change whatever name I want, main.py or whatever. That's fine, I'll leave it alone. And then I'll say save, and then I can quit the program. Okay, now if I look around, you'll notice that my builder generated two files. It generated main.py and tool.xml. Let's start quickly with the tool.xml, just curiously to see what's in it. And you can see it's an xml file. Xml has the little diamond braces and a bunch of markup that explains all the bits and pieces. And you could pretty much see what we did in the interface here. You can see, for example, this part right here says that we're defining a string whose ID is name and AME. It has a label say hello to, it has a description, this is who we say hello to, and a default value of world. So pretty much everything you saw in the builder, you're seeing here, except it's saved out now in this xml format. All right, so that's the xml file. Now, let's take a look at the main program. This is the main program that got generated by the Rapture Builder, and it has some gobbledygook that's all, in this case, all set up for Python. This is what you need to say in Python. In Python, you start out by importing the Rapture package, and you might wanna bring in other things too, like sys and map, those are common libraries. And then it starts off with some stuff to open Rapture, rapture.library, and then it says io.get and io.get and all that. So this stuff, these statements are actually reaching inside that xml and getting the value of the thing called name. And this reaches inside the xml and gets the value of the Boolean control called exclaim. So now I have these two variables name and exclaim that represent my two inputs. That's what I'm trying to get out of the interface. And if I scroll down a little bit, you notice it says right here, add code here for the main body of your program. So I generate the skeleton. It's got, I've got a skeleton of a program now. I need to fill in middle with the stuff that I want to do. And then at the very end, you can see that it's doing io.put and it's saving that result variable. It's saving out the string called result. So what I'm gonna do is I'm gonna fix up the middle part here. We'll just get rid of the progress stuff. And I'm gonna add in some code here, basically. So the Hello World application, the whole point of it is to build a result string. And the result string is basically Hello plus my name variable, Hello World or Hello Fred, right? So that's basically it. But I added a wrinkle to make it just a little more fun that if the exclaim is turned on, then I wanna add on an exclamation point, okay? So when exclaim is set, we'll add an exclamation point to the set, to the end. So that's the guts of my program. And you notice I'm using all those variables that I declared in the Rapture builder. My inputs are the variable's name and exclaim. And my output is the variable result, which was automatically set up here to be saved as an output. So those names we defined earlier are important. They become the variable names in your program. All right, so now I can save this and now my program's all set to go. If I wanna run it, I can just say Rapture. And Rapture by default, if you say nothing else, will look for the tool.xml file in the current directory, will read the tool.xml and will generate the whole interface. You notice it's got the title that we set for the application. It says simple Hello World app and it says demo app for Bootcamp 2012. So that's the description stuff that we sent on the tool page. You notice that it's got say hello to and the enthusiasm control here. And I really don't have to, with the way Rapture is normally set up, everything has good default values. I don't have to mess with it. I can just click the button. All your tools should be set. Like most users don't know what to do, believe it or not, when confronted with a page like this. So the best thing is if they can at least click the button and it works, then you're in good shape. So we click the button, it went off and it ran my Python program and it gave me back the result Hello World. Now let me try it again. I can try something else. I can give it a different name, like Fred and I can turn on the enthusiasm and I can run it again. And now it generates Hello Fred with an exclamation point. And the way Rapture is built, you can run lots of cases like this and you can actually flip back and forth between the results. So we can try lots of different things. So now we have three different results. The original Hello World, the Hello Fred with enthusiasm, and Hello Bootcamp. So I've got all those different results that I can browse in the Rapture interface. It's actually a lot cooler when you have graphs and stuff because then you can actually flip back and forth between the graphs instead of just messages. All right, and if I want to make changes, I can go back into the builder, Rapture-Builder, and I can load up, I can open that existing tool.xml file and everything's right back where I left it so I can make changes to name and exclaim and all of that. So maybe I want the default value to be true for the exclaim. I can do that and I can save it. Now when I go to save it again, I may just want to change the tool.xml file. If I regenerate the skeleton program at this point, it'll actually overwrite the changes that I made, right? So if I regenerate main.py, it'll basically wipe out the body that I had stuck in there and that's no good. So if you do regenerate the skeleton program, you want to probably regenerate it in a different file, otherwise you're going to wipe out the work you did. But in this case, I'm not going to do that. I'm not going to generate the skeleton, I'll just change the tool.xml and I'll save it. And then now if I run Rapture again, you notice now enthusiasm is on by default because that's what I did. I changed it, right? So you can kind of go back and forth with the builder, make changes, test it. And when you get to a point like I am now where everything is working properly, then your tool is ready to go on NanoHub. You can actually deploy it and put it out and other people can use it, okay? All right, so that was my demo, taking the two inputs and producing a string output. Oh, I showed it to you in Python. I got to show it to you in Fortran too, right? Huh? Yeah, how many people use Fortran? How many people's grandfathers have used Fortran? A few? Nobody? Come on. I know your grandfathers use Fortran. Let me go back into the Rapture Builder and I'll leave everything just as it was. Oh yeah, I got to open my file again. So everything is just as it was, except now I'm going to go into the tool section and I'm going to change the language to Fortran. Click on it. Okay, so now it's Fortran 77 and I'm going to save it and I'm going to save the tool.xml. I'm going to have it generate a main program for Fortran, main.f And I'm also going to generate something called a make file. When you have Fortran, Fortran's an old man's language. You have to compile it down to machine code so that you can run it, right? And when you want to compile it, there's a certain thing called a make file that makes it easy to compile. And in fact, Rapture makes it even easier because it generates the make file for you. So if you just click on that button, I'll get a make file where I can use to build Fortran. So I'm going to build all three. I'm going to get the tool definition, the skeleton program and the make file and click save. Now if I take a look, you can see there's a make file there. Whoops, right there. The make file shows, these are the rules that I would use to build Rapture and to build my program main.f. So it's showing all of that. And I also have the program main.f that I need to fix up too. And again, this is the skeleton that Rapture generates, gets you most of the way there. It does the Fortran way of managing Rapture. It defines some stuff that Rapture needs and it, so variables at the top and it does some stuff to kind of open up. You notice it's doing roughly the same thing. It's still trying to get the variable called name and it's producing something called name and it's still trying to get the Boolean value for exclaim and it's setting that variable to exclaim as well. Has to do a little bit more stuff. There's still a middle part in here where you need to add your code and then there's a part at the end where it's saving the string result. So pretty much the same as Python, just a little different language in terms of how it works. Again, the recipe is I'm gonna get rid of the stuff in the middle and I'm gonna put in my own stuff in here. So I'm gonna add if statement, if exclaim then, result is hello concatenated with the name, concatenated with the exclamation point. Otherwise, just take hello and concatenate it with the name. So that's it. I just added in that little bit of code to kind of produce the string that I want, result. And now I have to compile it. So I type mate and what make does, oops, just gives me a couple of warnings for unused variables. I'll clean them up. I don't like having warnings there. So back into my program, I've got the variable okay and RPE units convert double that weren't really being used. Okay, when you say make, it invokes the compiler rule with all the right libraries to build everything and link it all together. And at the end of that now, I have an executable program. The executable program that we call main F77. And if I look, sure enough, there's a program there, main F77. So that's the actual executable that Rapture is gonna run when you're doing your simulation. And I'll type Rapture and it looks like the same program. It's the same interface, world and exclaim and enthusiasm and all that. When I click simulate, it goes off and it runs the Fortran version now and it builds that result. Probably wouldn't believe me unless I proved it to you. But we can take main.f and change it to, instead of hello, I'll just make it F77. And then I'll remake, whenever you've changed your program in Fortran, you always have to rebuild, remake it. And then run Rapture. See, it says F77 world, which makes no sense. But at least you know it's the Fortran program that it's running now under the hood. So that's how it works. And again, the tool.xml is something that you figure out once and it doesn't matter what language you're using. In the builder, you can choose whatever language you want and then you build a skeleton program and then you go from there to kind of connect it up to the guts of whatever you're trying to do. We have some programs on Nano Hub that aren't even one thing. It'll be Rapture calls the Python program, the Python program execs the Fortran program and MATLAB and half a dozen other things, takes all the results, puts them together and produces the final result. So you can build really complicated systems if you want to with all of this, but it all works pretty much that way. All right, so now that was my demo. Build the simple interface and show you two different programs, Python and Fortran. So now I want you guys to try it. I want you to get into a workspace. Now you should be, everybody authorized for workspace? All right, so you should be good to go being able to get into Nano Hub or Hub Zero into a workspace. And what I want you to do is build a program, whatever your favorite program or language is, whether it's Python or C or Fortran, whatever you feel comfortable with, Pearl, Tickle, I don't care, but pick a language that you're comfortable with and I want you to build a program that has two integers coming in and you can sum them and produce an integer result. So for example, you could have two plus two and you get the answer four, right? There's two plus two is four. So your program, when you're running it, should look like this, should have two integers on the input side and when you click the button, you're gonna get a number result, an integer result on the output side. Don't be surprised when Rapture shows you an integer value, it'll show it to you like this on a graph, which is kind of weird.  So it's kind of more useful to have it on a plot, but this is what the final program will look like. It's two integers on this side and an integer on this side, which shows up as a plot when you're running it. So if you do everything correctly, that's what you'll see. Now, when you're getting into Workspaces, how many of you guys have used Linux before? You're like Linux gurus? Good. For those of you who've never seen Linux before or a command line prompt, don't worry, we'll help you out. Derek here has got some sheets that he's gonna pass around the Workspace reference. And let me also show you, we have all the materials for this on the website too. If you can't remember anything else and you're trying to figure out where do I go for documentation, if you can just remember Rapture with two P's, Rapture.org with two P's, it will take you to the Rapture website with all the documentation. And if you search on there for Bootcamp, you have to spell it right, you'll find, see Bootcamp 2012, right? That's us, Bootcamp 2012. And on this page on Rapture.org and on Bootcamp 2012, you'll see the outline and you'll see all the materials and you'll also see this Workspace reference that Derek has here, he's passing out. So the Workspace reference will kind of help you get started, logging into a workspace, how you launch it and all of that. And it gives you kind of a cheat sheet of various things that you wanna do. What I'm gonna suggest for each lab assignment, start with a fresh directory. So for this first lab assignment, use the makedir command, M-K-D-I-R, right? Makedir assignment one, whatever, lab one, whatever you wanna call it. Make yourself a fresh directory. And then you can use the CD command, change directory. So you makedir lab one and then CD into lab one and then launch the builder and go from there. Each lab assignment, you're gonna wanna have a separate directory, otherwise when you start the next lab assignment, it's gonna overwrite the tool.xml from the first lab assignment and everything's gonna get all balled up, right? So go ahead and log into a workspace the way it shows on the left-hand side here. And from there, use some of these commands like makedir and CD, make yourself a lab one directory, change into that directory, and then you can go ahead and launch the Rapture Builder. And if you're like, dang it, I wish I was listening when he was telling me all that stuff about the builder, if you're thinking that, don't panic because you can just go back onto bootcamp and you can find right there all the slides that we just looked at, right? So remember rapture.org, rapturewith2ps.org, go onto that, search for bootcamp 2012 and on the bootcamp 2012, by the way, there's earlier bootcamps, 2011, 20, 29, don't get confused because the older labs or the older bootcamps are not so good, they're not so up to date. So look for bootcamp 2012, the fresh stuff and there's all the slides for introducing Rapture right there. You can pull up the PDF and use that as your cheat sheet and also the sheet that Derek passed around. And if you have any questions, we're gonna spend like the next half an hour working our way through the lab assignment, I'll put it back up on the screen here and if you have any questions, I want you to work through it and call people over, right? We got George here, we got Ben, we got Derek and I'll be walking around too, we're all happy to help you guys with questions. So give it a try and see what you can come up with. All right, let me show you what my solution is for this particular lab assignment. So remember, we're trying to build this program that takes two integer values and produces an integer result. And it's real important that we use integers so that Rapture can kind of enforce the interface. So here I am over on my workspace on hub zero. I'll go into bootcamp 2012. I have all these directories that I use like file folders to keep everything separate. So you can see I got a lot of stuff here on hubzero.org. I'm working on a lot of different projects and the easiest way to keep things straight is to make directories. So I've got this directory and you notice I'm such a lazy typer. I can just type bo and hit tab and it'll type everything else for me. Hey, that's pretty handy. So it types as much as it can and then it waits for me to finish the rest. Is it 2009, 2011, 2012? So I can go into bootcamp 2012 and look around and I've got these three assignments, lectures and solutions folders. So I'll go into solutions and again I type SO tab and it fills in the rest for me and I can look around and then I can go into exercise one. If I wanted to, I could make a new directory. I've got three solutions here. One for C language, one for Fortran and one for Python. But let's say I'll just make a new solution directory new. So I say makedir new and now I can cd to new and now I have a nice fresh clean directory where I can keep all my stuff. Because remember when you run the builder it's gonna generate a tool.xml and a make file and a main program and all that stuff and you don't want to get lost with everything else you're doing. So make yourself a clean directory. Then I run rapture-builder to bring up the builder and out of all these different controls I try to pick the most specific one. You could grab for example a string over here and use a string as an input value but that means that anybody could type in whatever string they want. They don't have to use integers. They could type in x, y, z or hello world and when you get into MATLAB or C and you're trying to add hello to world as numbers it's not gonna work, right? You're gonna get trouble. So forget about the string because that'll mess you up. When you've got a control you don't want there's a little delete button here over to the side. I can click delete and that goes away. So instead I'm gonna grab an integer and I'll put that over here. You notice there's also a number in rapture. The number in rapture lets you have fractional values. So if you wanted to have a number like 2.17 or 3.14159 you can use a number for that. The number also has physical systems of units and we'll be learning more about it as we go along. So you have to ask yourself in this case, am I supposed to use, could I allow number values with fractional values and double values with units or is it an integer? The assignment here was integer so I'm gonna stick with integers but there's a subtle difference. If you're trying to have a number of grid points for example, you can't have 2.7 grid points, right? That has to be an integer like 100 grid points or 1,000 grid points. You can't have fractional values. So think about the controls as you're dragging them over. Make sure you got the right ones. Again, I could always produce string output but I don't want a string output. I want an integer output so I can plot it. So I've got two integers coming in and I'm gonna rename the first one N1 and I'll prompt the user by saying add this and give it a default value. You should always give a default value.  So I'm gonna give it a default value. Whatever you think makes sense, I'll say zero. And then the other one, I'm gonna rename it to N2. That'll give it a nice variable name in my program N2 and I'll label it to this and I'll give it also a default value of zero. And then finally on the output side I'm gonna rename that to sum and this is, I'll call it sum, sum of the two inputs. All right. So now I can try to preview and see what I'm gonna get. Uh-oh, five warnings for the current tool definition. Do I wanna take a look? Yeah, I might as well take a look. Again, it's telling me I should have a title. I'll call it lap, oops, number one. Number one, all right. And then next, and it'll tell me a description. Solution or lab number one. And next, and it'll tell me I need to choose my program. Okay. So a lot of you guys, I noticed we're using MATLAB. That's good because it's easy and you may know it already. I'm gonna choose, you could choose MATLAB. I'm gonna choose octave and I'll tell you why. It's the same as MATLAB, like 99% the same. It's the same language, the same everything. It doesn't quite have as fancy a GUI but it also doesn't take as long for the whole program to start up. When MATLAB starts up, man, it takes a long time for that GUI to come up and that's nice when you're sitting there working with it interactively but it's not so nice when you have a program that you're trying to run and debug as some of you found out. So you may not be able to tell the difference between octave and MATLAB as far as Rapture is concerned because it's just, it's running your script under the hood and it's just the same programming language basically. Plus if you like free software, go GNU free software. Then you might as well use octave and support them. So anyway, and because it's not licensed software, you'll actually find it on a lot more places. When we deal with MATLAB, we have to be careful. We have to make sure Purdue people are using MATLAB and Nano Hub and all this stuff which is why we ran into the permission problems with some of you guys which we sort of worked around for now but there's a better fix. So with MATLAB, there's all these headaches that deal with commercial software and all of that. All the other hubs, you'll find octave. It's a standard thing. It's in Linux, it's on all the other hubs. So when you run into a roadblock with MATLAB, just switch to octave because chances are you won't notice the difference. The syntax is all pretty much the same unless you're using the toolboxes and stuff. All right, let me keep working through my, get down off my soapbox and keep working through my notes. It's asking me for a description and another description and that's pretty much it. So I didn't bother with those two descriptions. If I try to preview now, it still says there are two warnings but I'll just say don't look at those problems, go on ahead. So if the warnings are benign or you don't want to fix them or whatever, Rapture will keep nagging you about it but don't worry, just move on. So now I've got an interface where there are two integers coming in, default value zero and it'll produce an output integer which is the sum. All right, so I can save all this. So I'm gonna go ahead and save it and still nagging me about all those warnings. I really should fix them. I'm gonna choose a tool definition file in this directory, tool.xml and I'll have it generate the skeleton program and there's no need for a make file with octave. So I'll just have it generate that, save it and quit now. So now you can see my two files there. My tool.xml has all the XML code in it with the integers and all that this is my main program generated by the Rapture Builder and you can see that it's basically pulling out the variable n1 here and the variable n2 and then at the very bottom of the program it's saving out the variable sum right here, converting it to a number and then a number to a string basically and then saving it back out. So my job is to fix up where it says add your code here, right? That's your marker, that's where your code goes. If your program runs for a long time you can put out all these progress messages.  So if your program takes a long time to run it's a good idea to put out these progress messages so the user isn't like why is it hung up? So you can say what's happening in your program. In this case the program runs so quickly it's not even worth putting out the progress messages so I'll get rid of them. And what I say instead is sum equals n1 plus n2. So that's what I wanted to do basically. Two plus two is four and then write out the sum. So that's the whole body of this particular program. You notice this all looks like MATLAB syntax, right? I mean if you know MATLAB this is basically the same stuff, all the stuff you can do in MATLAB you can do here in octave. It's a clone of MATLAB. All right so I save that out and now I can run Rapture and it'll prompt me now, oops, for the two values so I can plug in two plus two and simulate, oh, and it's given me a hard time. It's given me a hard time, sometimes it gives you a hard time because you haven't got the right use thing. So if I say, you have to make sure, what? Yeah, but I do. So you have to make sure that you're using the right program, right? A lot of you guys ran into this because you got right to where I did and it was like dang it, it doesn't work. And in the next section I'm gonna show you how it all works under the hood and how to debug all of that but one of the first things that you can run into is the fact that octave may not be working. So you gotta make sure you've got the use thing set up. If it is set up you should see a star there. So I've got octave set up and if there's any doubt you can say use again and make it persistent. Let me see, beyond that I must have some kind of syntax error in what I did. On octave? So you say just int, what are you saying? And to a double, right? Try Derek's solution, we'll see if Derek got it. Two plus two, four, gray. So int 32 used to work in older versions of octave in order to convert to an integer but so the skeleton must be generating something a little funny or something. Yeah, check on that. And we'll talk a little bit more about debugging in the next section. I didn't wanna get too far into the debugging stuff cause we're gonna do that to death in the next section. Let me show you quickly one more solution because some of you guys did C language. So again, I can do rapture-builder and I can open my tool.xml and again preview it. Same interface but this time under the tool section, I'm gonna choose something else. I'm gonna choose C language as my target language and when I go to save it, I've got a tool.xml and I can have it generate a skeleton program and a make file. Make sure you do the make file. I saw some people generating the skeleton program but just trying to compile it by hand. It's too hard to compile it by hand cause you gotta get all the right libraries and the include files and everything. So when you're dealing with something where there's an option to generate a make file, make sure you generate the make file. That's very handy. So again, I'm gonna save this now and I can get in and edit my program. So here's the program that it generated for me in C and again you can see it grabbing the value for N1 and the value for N2 and producing the sum. So again, I'm gonna say sum equals N1 plus N2. That's basically the body of my program in C language and I'll save that out. And now that's not enough. I have to actually make it. I generated this nice make file that explains how to build my program and now that I've got it I can just say make. It's giving me a warning about an unused variable. I can go in and clean that up. Line 18 I think it said error so it didn't like that, that wasn't used. So I can say make, now it builds cleanly and you notice there's all the libraries and everything. At the end of that, there's a program there. It's called, the program it builds is called main C and so we're ready to run. Now I can run Rapture and give it a value like three and five and simulate and it gives me the sum eight. You notice I've got to give it different values like three and seven and it'll give me 10 and if I give it three and 12 it'll give me 15 and I can go back through all of the different values and I can also click on the all button to kind of plot them all at once.  This feature is actually more handy not when you're dealing with something like two plus two equals four but imagine that you're simulating something as a function of temperature and you want to try a bunch of different temperatures and at each temperature you get a number and then by trying a bunch of temperatures you can plot them all. You can actually sort of build a curve of how it varies versus temperature or how it varies versus pressure. All the different things that you can change. So this is kind of a handy feature, this plotting thing and that's the reason it's set up that way. You notice also because I used an integer value here if I try to type in X, Y, Z, it gives me an error. So Rapture does all this built-in error checking. If you try to type something funny then it's gonna give you an error. Even if I try to type 2.214724, whatever, it gives me a problem with it. And the integer control also has little buttons built in so you can just click the buttons to change the value which is another little feature. So if you use the right control for the type that you're trying to deal with it'll give you a better version. It'll do all the error checking properly.  So you should always be the most specific you can with all the Rapture controls and what you're intending to do.


Let us learn to calculate the area of a segment of a circle. Now what is a segment? When you draw a chord of a circle such as AB, you get two kinds of segments. One is a minor segment shown in green and other is the major segment shown in orange. How do we calculate the area of these segments though? First of all let us consider this as a center of the circle. And if this center is O, we will join OA and OB. And then the area of minor segment which we can read as AXBA can be given by area of the sector OAXB minus area of triangle OAB. Now in order to find the area of the segment AXBA, we must know some information since we need to know the area of the sector OAXB. It is expected that we will know this angle theta at the center so that we will be able to calculate the area of the sector and length of the chord L so that we can find the area of the triangle. In some cases we might be provided with the area of the triangle OAB directly. Now let us say this R is 10 centimeters. And if L is 10 root 3 and the center angle is 120 degrees. What is the area of the segment AXBA? Now this area of the segment AXBA is in green. So we will use the green color. So area of segment AXBA is equal to area of the sector is theta which is the center angle subtended by this particular sector divided by 360 degrees times pi times R square minus area of triangle OAB. Now I want to calculate the area of triangle OAB first. Since we have this space here, this is how we are able to approximate the triangle. Let's say this is the height of the triangle and we already know the base of the triangle and the perpendicular drop from the center each of these parts will be 5 root 3. This will be 10 and how we can find out H by Pythagoras theorem and so we have H square is equal to hypotenuse square minus 5 root 3 square. This gives me H square to be equal to 100 minus 75 equal to 25 and therefore H is equal to 5 centimeter. And from here we can find the area of the triangle OAB as half times base of the triangle which is 10 root 3 times the height which is 5 and this gives us 25 root 3 square centimeter. Let us quickly write this value for the area of the triangle OAB that is 25 root 3 square centimeter and now let us proceed with finding out the area of the sector. Area of the given sector will be equal to 120 degrees divided by 360 degrees times pi times R square which is 100. This gives us 100 by 3 pi square centimeter and let's put this value here and so we can simplify this by putting the value of pi and root 3 we get the area of the segment AXBA as 61.418 square centimeter and this is how we can calculate the area of the given segment of the circle.


With it's give me a little bit of that food with it's just how I sound when it's done. Come on When you when you heard the beat he produced it, you know, you heard them you heard the it was the flute What was it was? That's what it was. Yeah, it was Yeah, we gonna talk first day out you get out you you do first day out I Like it. I know you got some more heat coming. That's gonna be way way Everybody do first days out. Yeah. Yeah, he did it. He did his first day out. Yeah, I think it was early I ain't gonna lie. I think it was early. Okay. I'm gonna say that I think it should have been a Little bit, you know, you know, you pumping man.  I get it, right? You know, I'm saying I love your music.  I already know it's gonna be some bangles coming my way But I already know that you in a different place too now because you ain't in the same place You was when you went in there, right? You don't people be saying man, they showed change. No nigga. You got a time pass nigga So I'm not looking for the same thing but what really For me the highlight for this interview was that 10 year old with their son that whole trifecta, right? Where anything can happen. Yeah, you know what I'm saying sky's the limit steel the devil didn't take nothing. You know what I'm saying Yeah Like I said, what but when you came home, what was the on your mind when you did when you put that track together, right?  I get it, you know, so I went in there and I bit the mic on that one, right? But that ain't even close to the album. I already know. You have a lot that you wrote what for all them years Man, if y'all think because I'm giving God all the glory that I'm gonna put out a Christian now Yeah, my wife will say Okay, that's not happening this right here is all Off the pavement music now see now the niggas got to break out them A-list beats Yeah, give them you know, I was rapping in prison.  Yeah, and I'm telling you a drew guy so many He's sending me a beat pack every other day from everybody DJ to my main. Yeah, too. Don't shine on the beat I'm working. I talked to you one time. You remember I called you.   I'm trying to figure out where the hell you're at I got your number nigga. Yeah, I will call But I love it. I love this movement I'm showing on the beat other producers they have retired. Yeah, that came out of it work came out what back like hey black I'm back. Hey, come on. We're gonna do because they trying to make you got other Hey, listen, the whole studio where I record that session works Almost every artist coming through there is pitching in to make sure this this project is epic I know it because you have a lot of love and they know that you gonna go hard on this album everybody know it and it's so weird because I'm actually a question. Did you have all right? Did you ever think about doing anything with bumby? Yeah, I got two songs with bunman and again. Yeah, because when I do go Yeah, first thing pops up is him with you on a picture not together But because when you came out he commented on there and say, you know fun has been super supportive. Oh, dude, man Man, what did you talk to me? I love this dude But more than anything you got a lot of these industry guys that I met a lot of them Just don't they really not familiar with the streets at all, right?  He said you don't cost nothing to keep it real black He said anything you love it back in your play. Wow, because you know a lot of these guys man You know not just because I went up under there stood up under that pressure to stood on business and came home Not just because of that, but I play I play and I did everything we supposed to do in these streets, man So a lot of the guys that that really Understand the streets then they like a man a thousand dollars and paying homage or hey man Hey, I got guys that pull up on me right now. Shout out to Zeke man Man, I can't go two days without him bringing me a carload of clothes No, of course, right look at my nephew didn't got me with the pay. Oh, yeah Yeah, yeah, go keep you right. Go keep you right. I'm talking about because fashion change from the time you left Now I'm gonna tell you about the harmony fatigue. You know what I'm talking about Big baggy clothes no more Give me a little bit of that food with it just Come on blow my trees I'm When you when you heard the beat he produced it, you know, you heard them you heard the it was the flute What was it was? That's what it was. Yeah, it was the it was a flute and When I heard that I knew right then I said just the one yeah, I don't know how I knew but I knew yeah So I wouldn't even write it. I wouldn't even write it at the studio Twisted black half man have beats with it white tee with the penitentiary crease Man man was so hard man twisted black. No, I'm just I'm just going back cuz I know how I am man I love the music, bro. You don't build the foundation. How many people you may feel good with that song, bro Man, that's that's a testament to tune to actually man to him. He honed me. He on my skills. Yeah Yeah, to him is a he wanted him real was rough and I'm gonna be real with you man The circle is tight small and tight We don't get into some things that we have camera But like you guys man y'all like I said you gotta you got a lot of people looking at you man Yeah, you got a lot of people trying to figure out what you gonna do I mean, what's the what's the what's the move like like when is that? I think you put a date on the on the a 16. Yeah, is that is that legitimate?  Well, well, I got a I got a full album of different from prison. I'm talking about bad. It's hard.  Why not?  You got your stars young ballas You got all of these people gotta be very strategic of how you move Nowadays Yeah, because I'm already defined eyes and let me say this I try to stay away from the negativity, but It's okay. Not to like my music. Yeah, it's cool. You dig out. It's okay It wasn't for you. Yeah, but if you from the streets if you really a gangster or any of that type and you like music Then nine times out of ten you gonna embrace what I got to say. Yeah, so I want to get around get one chance Yeah, I'm not trying to come out here You know old-ass come on now come on now correct this career, but I love music and this is my girl So, you know, I'm trying to really like you talked about my son I want to get you know, get it in the bag and get my label started move on to do some work with him Of course give my son a position right and my city because Fort Worth roll for me


Hi, my name is Dr. Xavier Ortiz Ramirez. I am a chiropractor here at SCU Health. I am a Spanish speaker, hablo español. It is a very good asset in the sense that here in Southern California we have people coming from different areas of Latin America and each one of them has different backgrounds. So it's not interesting only to learn Spanish but also to try to learn the culture of different Hispanic nations so you can get acquainted with what is the reality of their living and be able to communicate in a better way.


So, now we are going to discuss about sideline hold, now I really like sideline hold also besides cross cuddle hold because you know when you go in the hospital lot of this mothers you know have had C-section, in fact the Z-section has the rate has gone up remarkably so many mothers have C-section and you know many mothers they had stitches even with vaginal delivery and they are in pain sometimes they are tired you know so I do not insist that on day one that mother has to learn cross cuddle you know cross cuddle can yes cross cuddle need to be learned before they go home you know because it is a little bit kind of little bit more difficult this thing but once mother understand what to do is they love that cross cuddle hold but in sideline hold again the concept is same where mother is sleeping okay and mother is on the side so she is sleeping on the side and then baby is basically being brought you know in again in this position okay so here mother is sleeping and baby is coming literally in this position so again remember the concept put the baby little bit lower down okay not right not facing so that the neck is little bit extended forward okay because if you bring the baby directly on the breast on the nipple then what will happen the neck will be straight okay and again with next rate it will be difficult to swallow again when you try to swallow in the neck is straight it will be little bit difficult so try to kind of extend the neck so in that position you want to make sure that you know baby is kind of little bit downward you know keep the pull the baby is like little bit downward okay and then extend the neck a little bit and the same way you have to figure out whether baby is upper lip and lower lip are and you tell the mother to kind of you know press the breast in that direction where the lips are okay and then in side line hold actually if you look at the video we have shown that first what hand to use then what hand to use and in that sleeping position where should this hand should go what should be the angle over here you know how mother should support baby's back all the step by step we have taught so side line hold do watch it two three times because you know it's kind of little bit tricky you know to and we have made it kind of point by point so that you know mothers don't miss any important aspect okay so thank you so much and enjoy welcome to the spoken tutorial on side lying hold for breastfeeding in this tutorial we will learn choosing the correct breastfeeding hold for a mother and her baby mother's preparation before breastfeeding and how to do the side line hold let us begin across the world mothers breastfeed their babies using various types of holes as discussed in an earlier tutorial the best breastfeeding hold for a mother and her baby is the one in which both mother and baby are comfortable for the entire duration of breastfeeding the baby is able to attach deeply to the mother's breast and get sufficient milk let us learn about a new hold called the side lying hold this hold is recommended when the mother is breastfeeding at night or when the mother has had a caesarean section delivery or when the mother is tired before feeding her baby the mother must wash her hands with soap and water and dry her hands properly then she should drink a glass of boiled and cold water lactating mothers produce 750 to 850 milliliters of milk per day on an average therefore they need to increase their daily water intake next mother should uncover the breast from which she wants to feed the baby she should ensure not to put pressure of her bra or blouse on the breast next the mother should lie down comfortably on the side of the breast that she will feed from she should keep a pillow under her head and a pillow between her legs to avoid rolling over in her sleep the mother in this picture will be feeding her baby from her right breast therefore she is lying on her right side next let us learn how to position baby's body correctly place the baby on her side such that her stomach is gently pressed by the mother's body the mother should support her baby's back with the hand on the side that she is lying on the mother in this picture is supporting her baby's back with her right hand the mother can place a pillow behind her baby's back to hold her close to her body lesser distance between their bodies will reduce the baby's effort to reach the breast and it will become easier for the baby to attach deeply to the breast remember the mother should never bring the breast to the baby by bending her back this will increase the distance between the baby's stomach and mother's body she should always keep her back straight and bring the baby to her breast the second important point is the direction in which the baby's entire body is held you may have noticed that when we eat food our head neck and body are always in the same direction similarly baby's head neck and body should always be in the same direction while breastfeeding this will make swallowing milk easier for the baby now we come to the third point in positioning the baby's body mother should support the baby's back with her hand otherwise the baby will have to take a lot of effort to attach deeply to the breast next let's look at the position of the baby's nose and chin baby's nose should be in line with the nipple and her chin should be forward and very close to the breast this will ensure that the baby takes in more of the lower part of the ariola while latching and therefore will use the lower jaw to drink more milk efficiently please note ariola is the dark area around the nipple now that the baby is held correctly let us learn how to hold the breast using the fingers of the hand that is free the mother should cup her breast from the side in a C shape hold the mother in this picture will use her left hand to hold her right breast the fingers holding the breast should always be in the direction of the baby's lips why let's understand this using a simple example when we eat a vadapa or burger our lips open horizontally we hold the vadapa or burger horizontally to take a big bite here the thumb and fingers are placed in the direction of the lips if we hold the vadapa or burger vertically we won't be able to take a big bite similarly observe the direction of the baby's lips the lips are horizontal here therefore mother's fingers and thumb should also be placed horizontally on the breast this will help the baby to take a big part of the lower ariola in her mouth in addition to being in the direction of the baby's lips mother's thumb and fingers should always be at a distance of three fingers from the nipple again while eating a vadapa or burger if we hold it too close our fingers will block our mouth from taking a big bite if we hold it too far away it will not be shaped correctly to fit in our mouth therefore we hold it at the right distance to take a big bite similarly for the baby the right distance is of three fingers from the nipple as shown in this picture this distance will ensure that mother's fingers do not block the baby from taking the lower ariola in her mouth mother does not compress only the nipple which will give very little milk mother compresses the larger milk ducts beneath the ariola to express more milk out and the breast is shaped correctly to help the baby attach deeply let's go back to the example of vadapa or burger after holding the vadapa or burger correctly we always press it to take a big bite similarly the mother should lightly press her breast in a C shape hold from the side this will help the baby to take a big part of the breast in her mouth but remember mother should not press her breast in a Caesar shape hold Caesar shape compression will pinch the breast and cause nipple feeding also make sure that there is equal compression of the breast with the thumb and the fingers otherwise the nipple will shift either in the upward or downward direction and the baby will not be able to attach deeply to the breast now the baby is in the side lying hold and ready to attach to the breast for breastfeeding correct attachment of the baby to the breast is explained in another video in the same series as soon as the baby is attached deeply to the breast mother should release the breast from her hand she should use this hand to hold the baby's back and keep the baby close to her body also she should move her other arm from the baby's back and keep it at 90 degrees to her body she should bend the elbow of that arm then she should tuck that hand under the pillow the mother in this picture has released her right breast from her left hand she is using her left hand to hold the baby's back and keep the baby close to her body she has moved her right hand from the baby's back she has kept it at 90 degrees to her body her right elbow is bent her right hand is stuck under the pillow after feeding from the first breast if the mother wants to feed from her other breast then she will have to lie down on the other side the mother in this picture has turned to her left side to feed from her left breast this brings us to the end of this tutorial hello everyone so now we are going to discuss about laid-back hold many mothers they like laid-back hold and this are the mothers who have kind of access to privacy they have you know say reclining chairs they have lot of these gadgets you know where they can kind of used to kind of make or feel comfortable so in some time you know what happens is mothers are really tired so we do recommend laid-back hold you know if mothers are tired and they want to relax so in that laid-back hold what we do we tell mothers to basically you know to take a reclining chair or even the bed she can put two or three pillows or even those round pillows and then she can basically relax okay like this not completely recline completely kind of in a back supine position but more in a reclining position and then baby can come on her you know this way in this position this is called laid-back hold and then you know similar concept of babies coming straight on just like a football hole but in football hole baby was kind of held under the armpit here baby is you know kind of resting on mother's body and just make sure that the nose is not higher up on the nipple just a little bit lower and in this position what happens is you know because you know the gravity helps so baby automatically opens a big mouth okay so because babies mother is much more laid-down than what I am in this position and because the babies kind of downwards right so automatically baby opens a big mouth and have a good latch you don't even have to hold the breast if you want to hold the breast that's fine but many times and even if you don't hold that gravity really helps baby to open the mouth and have a good lower latch okay so this is your laid-back hold and do remember to understand the concept of how to kind of you know bring the baby extend the neck all those important points and thank you so much welcome to the spoken tutorial on laid-back hold for breastfeeding in this tutorial we will learn choosing the correct breast feeding hold for a mother and her baby mother's preparation before breastfeeding and how to do the laid-back hold let us begin across the world mothers breastfeed their babies using various types of holds as discussed in an earlier tutorial the best breastfeeding hold for a mother and her baby is the one in which both mother and baby are comfortable for the entire duration of breastfeeding the baby is able to attach deeply to the mother's breast and get sufficient milk let us learn about one of the holds called laid-back hold laid-back hold is recommended when deep attachment of the baby to the breast is difficult using cross cradle or cradle hold or if the mother has big breast or if the mother has back pain or when the mother is tired before feeding her baby the mother must wash her hands with soap and water and dry her hands properly then she should drink a glass of boiled and cold water lactating mothers produce 750 to 850 millilitres of milk per day on an average therefore they need to increase their daily water intake next mother should uncover the breast from which she wants to feed the baby she should ensure not to put pressure of her bra or blouse on the breast then the mother should lie down comfortably on the floor or on a bed her head neck and upper back should be well supported by pillows now that the mother is ready let us learn how to hold the baby correctly mother should hold her baby's body with the hand on the side of the breast that she will feed from she should hold the lower part of her baby's head with the thumb and fingers of her other hand the mother in this picture will be feeding her baby from her right breast therefore she is using her right hand to hold the baby's body she is using the thumb and fingers of her left hand to hold the lower part of her baby's head next let us see the correct position of mother's thumb and fingers for holding the baby's head mother's thumb should be behind one year and rest of the fingers behind the other year of the baby she should not move her fingers or thumb from behind the year to the baby's neck she should not apply pressure on the back of the baby's head with her hand this will keep the baby comfortable while feeding next let us learn how to position the baby's body correctly the baby should be placed on the mother's body in such a way that baby's stomach is on the mother's stomach and the baby's head is near the mother's breast lesser distance between the baby and the breast will help the baby to reach the breast and it will become easier for the baby to attach deeply then the second important point is the direction in which the baby's entire body is held you may have noticed that when we eat food our head neck and body are always in the same direction similarly baby's head neck and body should always be in the same direction while breastfeeding this will make swallowing milk easier for the baby remember the baby can be positioned on the mother's body in any direction as long as the whole front part of the baby's body is placed on the front part of the mother's body and the baby can reach the breast easily now we come to the third point in positioning the baby's body the mother should support the full body of her baby otherwise the baby will have to take a lot of effort to attach deeply to the breast next let's look at the position of the baby's nose and chin baby's nose should always be in line with the nipple and her chin should be forward and very close to the breast this will ensure that the baby takes in more of the lower part of the areola while latching and therefore will use the lower jaw to drink more milk efficiently please note areola is the dark area around the nipple now the baby is in laid-back hold and ready to latch on for breastfeeding in this hold the baby can naturally attach deeply to the mother's breast deep attachment of the baby to the breast is explained in another video of the same series as soon as the baby is deeply attached to the breast mother can release the baby's head from her hand and use both her hands to support the baby's body in this position the mother should lie back relax and breastfeed this brings us to the end of this tutorial thank you for joining