Good morning. This week, we are going to learn two very important constructs in C plus plus. We have already seen that from a simple sequence of statements, which when executed to desired computations, we first discussed the availability of conditional control structure, which permits us to take decisions and execute either of the two statement sequences. We then learn how to set up an iterative block, so that by writing few instructions, we can actually make computer execute hundreds of thousands or even millions times the same instructions, resulting in useful work done without having to write hundreds of thousands of lines of our program. We have two more important facilities, which will complete the discussion on basic programming principles. The first is the ability to write part of our program as separate blocks, which can be invoked or called whenever you require from within your main program. This notion is called sub-programs. In C plus plus, these are called functions. Functions are standalone code, which solve a particular part of the problem and which can be invoked as many times as you require from within your main program. We shall be looking at the facility of defining and using functions in C plus plus today. Next is our inability to handle a very large number of individual values, permitting access to any one of them during our program. Recall, we have written programs to add a large number of numbers or to find out factorial n. So, we could establish an iteration to do these things. However, if we have let us say thousand numbers and you want to read all of them and retain all of them and then access a 531st number any time in your program, we do not have that ability now unless we write thousand different names such as A, A, A, B, etc. That is provided by a facility called arrays, which is what we will be discussing on this Friday. So, before we look at the functions today, I would like to begin discussions by solving one more interesting problem, which requires an iterative solution, but it is a good computational problem coming out of the basic maths. We will use this to elaborate how iterations could help to solve problems numerically. However, we begin with two very special provisions, one of which we had actually seen in the switch statement when we discussed. It is called a break statement. So, this is your block where you have the typical while condition here. If it is true, you enter the block and then repeat it indefinitely till this condition remains true and then get out. You all agree and familiar with this while statement, while condition execute the block repeated. Inside these statements, if anywhere a special statement called break is encountered, you may have several other statements after this. The break is a very destructive statement. It simply takes the control out of the block straight to the exit path. So, it sort of jumps out. What it means is all the remaining statements will be ignored completely. In fact, we roughly did the same thing when we use break for different cases in the switch statement, but there was no iteration there. It was only a conditional execution. This takes the control out. Very obviously, if a break statement is written as I have shown, the control will always come out at that point. So, the break statement would necessarily be used in conjunction with some conditional check. If some drastic condition get out, then we can use the word break. So, this abandons the iterative block completed. On the other hand, if I have a similar block with the same condition as I shown and in this block, somewhere I encounter a statement which says continue. This continue statement also skips the remaining statement. So, both break and continue will skip the remaining statement. But in case of a break, we abandoned the block completely and went out to do things with the next statement. With continue statement, you only skip these statements and come out here to carry on with the next statement. So, there is a very fundamental difference between the two. Continue statement skips the remaining statements, but continues with the next iteration. Observe that this statement can be used. These continue and break statements can be used in any iteration. Whether it is established by file something or whether it is established by do something file condition or whether it is established by file. In case of file, you remember that there will be an increment on this part. There will be some increment condition here in case of file. I will call it file increment. So, this increment will be executed. When you come out to continue statement, it is not that it will blindly go to repeat the. So, it will follow exactly the same specification of iteration. Otherwise, it will only skip this block of statements. Once again, it is to be emphasized that break, like break, continue also cannot be used as a standalone statement. Because if you do, then every time you come there, you will skip the remaining statement. There is no point in writing subsequence. So, both of them are used in conjunction with some decision making. Like if some drastic condition break get out. If some condition, which says I do not need to execute the remaining things continue. I can implement both of these using appropriate changes in the condition for while iteration and using appropriate if conditional within the block, but this makes it convenient. That is all. So, this is the semantics of the break and continue statement. When used inside a control structure, break causes an immediate exit from the loop. Whereas, when executed inside a loop, the continue statement will skip any remaining statements and goes for the next. And the point you should notice should always be used as a part of, should always be used as a part of some conditional execution. Otherwise, they do not make sense. With this, now we proceed to discuss the problem that I promised. This is a computational problem. As an example of finding out real root of an equation, we consider the equation A x square plus B x plus c equal to 0. Everybody is familiar with this quadratic? There could be, there will be two roots, but both the roots could either be real or complex. What is the condition when they are real? B square minus a 4 a c should be positive. This everybody knows that. In fact, this particular quadratic equation form has a analytical solution. You can actually calculate if it has real roots R 1 equal to this, R 2 equal to this analogy. Can you do that with a cubic equation? Perhaps. Can you do that with a equation which is a polynomial of degree 4? What about degree 5? What about degree 6? What about degree 7? What about degree 28? And such large equations are not uncommon in scientific and engineering computing. Such roots therefore cannot be found analytically and therefore, numerical methods have been evolved to find approximations to these roots. Please note that in mathematics, we seek exact solution, but in most engineering and scientific problems, a close approximation is quite often good enough. And an approximate solution, if it could be found through some iterative technique of improving the approximation at every stage, it would be a good procedure. I have drawn it here because I was not sure I will get the stylus, but since I have it, I can draw things here. So, this is some function f of x. You will agree that one of the real roots of this function if it exists will be diagrammatically the crossover point at which x axis is intercepted by the function, because at that point whatever is the x, f of x is 0 which is the root. How to find this? So, what we do is we make an initial guess. You need not draw the function again and again, but let us say I do not know where this is by the way. So, on this x axis somewhere I will make a guess. I call this one and I call this as x guess. This is a starting point. X guess could be 58, 22.5 minus 7. We do not know that. Our ambition is that whatever is the starting point, we should now use the properties of the function to calculate another guess, a modified guess which is closer to the root. In this particular diagram, since root is shown here, our ambition would be to find some procedure by which we can move in this direction and let us say we can get a new point here which has an x coordinate x nu. We still not clear what property of the function will use, but this is our ambition. From x guess, we want to move to x nu. You can see that x nu is a better approximation to the root and you can also sense that now I can set up an iteration by simply treating x nu as a new value of x guess and repeating whatever procedure I did earlier so that I go further and further and further till I meet the root. So, this is what I said an iteration can now be carried out. Take x nu as the initial guess. How do you do that? Simply set x guess is equal to x nu and repeat the steps to find the next iteration. How to find x nu? There are many methods. One popular method is called Newton Raphson method. Suppose this is my original value of x guess, then what I do is at this point wherever the function is, say here I will draw a tangent to that graph. The tangent will look like this for bad drawing. So, this is the tangent to the graph here and the tangent will intercept x axis at some point. I will treat this as my x nu. Now, how do you calculate the distance between x guess and x nu? That is how we will calculate the value of x nu. To find this distance we use the property that tangent is always given by the derivative of the function. So, if the function is f of x, this is f of x, then f dash x at any point will give me what? The derivative gives what? Tangent of an angle subscribed by this tangent line to x axis. That is the property of the derivative of the function. Now, once I know this is tangent and I know what is tan theta. Tan theta is equal to this height h divided by this length l. Now, h by l is equal to tan theta, which I can calculate at x guess. How do I calculate h? Very simple, the value of the function at x guess. So, effectively knowing the value of the function at the guess point and knowing the value of its derivative at x guess point, I know I can find out the difference between x q and x guess. This is the crux of approximating a root in steps. In the first step I move to closer towards the root. In the next step, we move further close etcetera. So, this is what I have tried to show here. There is a point p on the x axis, which I call the initial guess. I want to find some point q, which is closer to the root. How to find q? First of all, I note that the length p r is nothing but the function value at x guess, which is the starting point. Then I draw the tangent to curve at that point r. q will then be intersection of the tangent with x axis. This is what we just saw. Further, we note that the tangent is determined by the derivative. So, f dash of x guess will be equal to p r upon p q. We need to find out p q this distance. If we find out this distance, then x guess minus that distance is my new coordinate x for the root.  So, f of x guess upon f dash of x guess. Knowing that, I can find out x nu, which is simply equal to x guess minus p q. Please note that before writing any program, we will have to do this kind of analysis in most of the real life problem. I repeat this because most of you are used to solving problems, which are given as detailed specification. Do this, calculate the value of this formula etcetera. In real life problems will come in this form. So, Newton and Raphson applied their mind to do these computations. Of course, it is not easy to do these computations by hand for too long, too many times. But using a computer, we can make these iterations as many times to be executed as we desire. But first, what is the iteration block? The iteration is that whatever was the original value, I move to the new value. So, whatever is the x nu now, I will treat that as x guess and again repeat the process. So, I will go here, I will draw a tangent, I will come to this point, which will be q. I will find out p q and keep moving this. So, the crux is given x guess, find x nu and now I will treat x guess equal to x nu now and repeat the process and keep on doing this till you are satisfied. We apply this logic to find out square root of a given number, which is a easier. Have you calculated square root any time? You know how to calculate square root arithmetically. What is square root of 64 plus or minus 8? In this particular case, we are talking only of positive roots, but we could also get a negative root does not matter. One of them, if we get square root will be same, the sign could be plus or minus. What is the square root of 1792486.7784? How long will it take? No calculators. It will take a long time. This was the problem, which afflicted Newton and his colleagues, when there were no calculators. But the methods that they derived are still useful. We propose to use Newton Raphson technique to find the square root of a number. By recognizing that, I could model this problem of finding square root of a number by saying, let that number be x square. Then, if I solve the, if I rewrite this equation k is equal to x square in the form x square minus k equal to 0, I got a quantity. If I can find its roots, well the root will be this square root of the given number k. So, the function f x in our case is x square minus k. What is f dash x? 2 x derivative of x square minus k is 2 x. Having seen this, I start with a value of x gas. Some arbitrary value has to be started. In this particular case, it can be mathematically proven that the value 1 will always go towards the root, if it is used as a starting point. Please note the difficulties in real life. If you have a complex function, let us say polynomial of order 20, you have no clue on what the initial value could be. What could happen? You could start with an initial value and the function could be behaving such that your solution will never converge, but you will diverge away and away from the root. It all depends upon the behavior of the tangent. So, whether a particular iterative solution will converge or will diverge itself is a question mark, which starting point to use itself is a question mark. These are issues which are addressed more properly in a course on numerical analysis. Some of you would be doing these courses in your, in your subsequent syllabus. Here, the objective is if there exists a numerical method, how to apply it and how to write a program. So, you come back to our problem. I compute x nu as equal to x gas minus x gas square minus k divided by 2 star x gas. Are you clear why this formula is? Are you clear how this formula has been derived? It is the same length that I want to compute and this is simplified as x gas plus k upon x gas by 2. This is just algebraic x part. So, this is what I want to calculate. So, the block of statements to be iterated repeatedly are identified as since x nu is the modified value of x gas to be used as x gas for the next iteration. The instruction which we can repeatedly execute instead of saying x nu equal to x gas this, this, this and then saying x gas equal to x nu. I can simply say x is equal to x plus minus something. Notice that is what you do when you are summing up a large number of numbers. When you say sum is equal to sum plus something you are in every iteration you are modifying sum reaching to the final value. This can be treated exactly. But once I have written an instruction which says x is equal to x plus k by x by 2 then I have a formula for iteration. I can keep repeating this starting with some value of x. I know x will change in every iteration. I know x will move towards the root. I can continue this endlessly. When should I stop? I have two ways of stopping one. I say I execute a fixed number of iteration. I say I will do it ten times or I will do it hundred times. That is one way. But depending upon starting value and the function ten times or hundred times may be such that I may never reach near the root or may be I will over do it. There may not be any improvement in the 11, 12, 13, 14 iteration at all. I have no clue. A better technique would be to say that I should define a criteria to stop when I have reached very close to the root. But how do you define a closeness? The closeness is related to accuracy of the solution. So, here is one way of defining the accuracy. Suppose this is my function and I want to calculate root correct to four decimal places. Now, four decimal places means if I am in this region I am ok. As long as I find out a root value which is not exactly this which this is the root. But suppose I find this point. Now, this point is within such vicinity of the real root such that the difference between f of x equal to 0 and f of x equal to that value is less than 0.000. So, that is accurate enough. I can of course, change this to 0.0001 depending upon how much accuracy I want. The greater the accuracy I need more will be the iterations required. But I leave it to the machine to figure out how many iterations it should execute by putting a conditional execution line. So, if I define closeness to be within 0.0001, 00001 sorry we wish to stop when f x is within plus minus this. This gives us a criteria. Set up an iteration, keep repeating the iteration while absolute value of f of x is greater than 0.0001. Observe the absolute value is essential because f of x may be positive or may be negative depends on the function. But as long as this criteria is valid I keep repeating. The moment the absolute value of f of x comes within this range I need not go any further that tells me how to terminate. All of this analysis results in a simple program which is shown. So, observe that this program defines k and x as floating point objects. It initializes x to 1 although in practice you will rarely initialize the guess value in a definition statement like float. We will actually read a value because for different functions different starting point may be there. In fact, you may want to experiment the same program with starting point to see what happens. Now, it will be very messy that every time you edit the program change that initialization and do something. You would rather put an input statement give a initial value and then start with that. Then you read of course the number whose square root you want to determine. The beauty is just a two statement iterative block which will solve this problem while x star x minus k greater than 0.0001 or please note the or is two vertical bars or k minus x star x greater than 0.0001. Do you agree that this or condition will be satisfied whether I am in the positive side of the root or negative side of the root. The absolute value is being determined. We do not know how to calculate absolute value in any other way right now. So, we use this. While this condition is true that is while I am not within the accuracy limit keep repeating what x is equal to x plus k by x divided by 2. As I said k and x all the float 2 is an integer but 2 will be converted to float automatically by the rules of the game. Of course, those of us who want to meticulously write this might want to write 2.0 here which is okay and finally I output the value. Is it clear how simple a program is to find out the square root of a number. Remember I said I could also execute fixed number of iterations. This is another example of the same solution a same problem solved in a different way where I use the counting control by force state. Here I have decided that no matter what I will execute the iteration only 10 times whatever is the value of k that you give. It so happens that in most cases we will actually reach the root because the convergence of this solution process is what they call quadratic. That means error reduces in proportion of square at every state. So, it is a very fast converging method. However, the way to implement is what is of interest here. So, we are saying for I equal to 1 I less than equal to 10 I plus plus. 10 iterations are set up only thing in iteration is to be executed x is equal to x plus k by x by nothing. This number 10 is fallacious. I could also take a value from user like how many iterations you want to run say a value of n and run the iteration from 1 to n and n can be any number that you want of course a positive. So, is this clear this is alternate form of solution. I would just like to illustrate the use of force statement in a file like case. It is a funny usage, but it is interesting and because some books will mention solutions of this kind I would like you to know although I would strongly advise not to use such artificial jugglery. What is the jugglery? I am saying flow takes k give value of k c in k. Now, I said of a force statement wait there is the iteration count there is no iteration count. What does this force statement say for x equal to 1 that is the initial value we understand. So, it will start with x equal to 1 next it will check the condition what is the condition x star x minus k greater than 0.0001 or k minus x star x greater than 0.0001 this is a familiar condition. So, it will check this condition and iterate what is the body there is nothing inside the body. Ordinarily force statement will have some statements to be executed. So, what happens in such a case there is no body force statement does nothing goes to increment the control variable and go back, but wait there is no increment here the increment is shown by this x is equal to x plus k by x by 2. Notice that this was actually the body that we wanted to iterate around, but since there is only one statement to be executed in that body I can actually write it as the third specification of the force statement. So, I am using for in a vile like fashion I am using for in a vile like fashion just to explain this when I say for x is equal to 1 x star x is equal to this etcetera minus k greater than this etcetera here x is initialized to 1 before the loop. So, this one next the condition repeats the loop if it is true this is the condition there is no body. So, nothing is to be executed the increment x is incremented to reflect them. So, this is a perfectly legal and correct c plus plus program it will work exactly like what the vile statement would do would you all agree that the iteration implemented by using vile was more easily understandable by most of us. So, this is this is a tricky implementation I would strongly advise not to use it the only reason I am discussing this in the class is you will find unfortunately several books and several problems solved in this fashion. In fact, it is not uncommon to have some examinations in some university system where they will ask you to necessarily implement a vile statement of that kind using for I think that is ridiculous, but just for the completion of your knowledge I have described this. But with this background now we come to the main issue that we wanted to discuss the notion of functions in c plus plus function is a facility to compute value of any mathematical function to the specified values of some parameters. So, consider this quadratic this is general quadratic a x square plus b x plus c no we are not talking about solving an equation was talking about just evaluating. Now, suppose I have to evaluate this function at x is equal to 4 at some point in my program say fifth or sixth statement in a long program. Suppose later on some 128 statement I again have to evaluate the same quadratic, but for a different value say x is equal to 2.3. I will have to write the entire expression a star x star x plus b star x plus c and imagine if I have a order 10 polynomial or something. Now, instead of doing this instead of having to write two separate statements such as y 1 equal to something y 2 equal to something where every time I write a complete expression I would like to simplify the problem. Suppose I could write the instructions to evaluate this polynomial separately at some other place and make the computer go to that place. This going to computer with the request to execute that function is called invocation. Imagine that the function is here the moment I write a statement y 1 is equal to square a b c 4.0 what I am saying is go to this function. Obviously this is called square this is the name of I am invoking the function you know what is invocation whom do we invoke normally God say God help us here we are saying Mr. Function help us the function is standing somewhere else. This function there are different functions like large number of God's that we have we have a we have a God called quad Mr. quad help us. So, he says give me the necessary parameters so that I can calculate what are the parameters required to be passed on to quad the value of a should come the value of b should come the value of c should come and the value of x should come the way it is written is a b c are some locations which hopefully contain meaningful values and x will be 4.0. So, the order in which I write these values in actual values in parenthesis are called the actual parameters and I take these parameters go to quad quad will take these parameters copy them in its own locations do the calculations find out one result and come back with some value there will be one value which will be written by this one. Next time when I call it again it will go to the same code and will come back this time with a different value here imagine the usefulness of this facility I can modular is my program although the illustration is only for a simple function we will see that every large piece of software in this world is composed of large number of such models. So, functions are provided in C plus plus we write instructions to compute value of a function only once and such a function will accept parameters from us and it will calculate the final value of the function and return that value and the function can be invoked or called from within a program as many times as you want we need to evaluate the function a x square plus b x plus c for evaluating the value of a function what values do we need to know we need to know a we need to know b we need to know c we need to know x the actual value this is my main program with these values I would like to go to some function and as I said come back at the point where I want to invoke it this is the definition of my function called quail float quail in bracket float a float b float c float x inside the bracket inside this function float quail what I have written I have written the statements which will evaluate the value to be written it defines value as a float location and it calculates value as equal to a star x star x plus b star x plus c and after having calculated that it executes a statement return value. Let us just analyze this statement this this particular code that we have written please note this is not as a part of your main program this is written somewhere else separate you shall see exactly how and where we write it but let us understand the implication c plus plus will compile this function as a separate standalone code while compiling it it should not need to know what is written in your main program what is declared in your main program the locations declared in your main program for computational objects are different these locations are different what are these locations it will it will put a location for a it will put a location for b it will put a location for c it will put a location for x and of course it will put a location for value how does it know how many locations are required simple as many locations as are declared within this function how many locations are declared within the function only one float value and therefore I get this location reserved by the compiler but there are additional locations and how they come about they come about because they are listed as parameters in the function definition. So I have said float a float b float c float x and that is why a b c and x are locations which are created by the function actually what is important for the function is to know in which order the parameters will come and what is the type of the value it is adequate actually for the function to know that there are four parameters the first one is of type float the second one is also of type float the third one is also of type float fourth one is also of type I could have parameters which is first one is integer second is float third is in fourth is care the function needs to know which are the place holders it has to assign these names a b c x are actually irrelevant except that they are used here the actual parameter. So in a nutshell what the c plus plus do whenever it encounters a function definition which is necessarily written as a separate block of statements a it creates memory locations for all the objects that are used within that function plus all the objects which are listed as parameters more importantly the specification of the function also tells c plus plus that after doing all the computations whenever this function is called there is a single value to be written it knows that value will be of the type float. So the type of return value is represented here it is important to understand the significance I can also say return I can write an expression it is incidental that I am returning a value which was declared as float but I can write any expression here four star p imagine p was integer if p was integer what would happen p multiplied by four will also be an integer but it will necessarily be returned as a floating point value because of this declaration attached to the name of the function. So it is very vital that every function name of my choice is preceded by the definition of the return value that is why the function is called float function int function care function or what these are the rules you can read them later but just to glance over them the first word in the function definition is the type of the value which will be returned. So I say float is the first word the next word is the name of the function what is the name that we chose why this is followed by one or more parameters and the parameters in our case have been float a whatever. Notice note that the order in which these parameters are listed is extremely important because it is in this order that the actual parameters will be brought in and copied into these locations if I mess up with the order I will get something wrong the return statement sends back the value and in between are all my computations is this followed pretty simple write a separate function quad this is the way the function would be invoked as I said C plus plus compiler will translate such functions separately it will keep these as compiled set of instructions in fact the process of coupling such compiled functions with your own program which is compiled is called linking process I link. So I take my translated program I take this function that function that function link all of them together that is what when you say C plus plus it does all of this it does compilation it does linking whatever. Now I have written the function if in my main program anywhere I want to evaluate let us say such a function f x which is given by 23.5 x square plus 9.7 x plus 12.6 that is the function difference and suppose somewhere I want to calculate the value by using a formula what is that formula 574.6 multiplied by f of x plus 1 upon x this could be a very well a formula in my computation now wherever this f of x comes I will have to ordinarily write the complete definition of f of x but if I have written a function separately called quad function then I can write my main program as shown here I can declare pro text n y then I can input x and I can calculate y as equal to this. Observe that what I have written here is an expression normal expression that you will write in C plus in that expression one of the elements happens to be the invocation or calling of the function quad. The other parts are one upon x 574.6 standard parts what the machine does is how will it evaluate this function by this expression by the way it has to calculate this and it has to calculate this and then it has to calculate this plus this agreed but when it has to calculate 574.6 multiplied by this it suddenly realizes that so called this is not a value is not a location from which I can pick up but it recognizes it says quad so like God I go to that function Mr. quad here are the parameters 23.5 9.7 12.6 and the current value of x please take these four parameters the quad as we saw will take these four parameters and will copy them into its own internal location a b c x will do the calculations and after calculation it will return a value that return value will come and replace this entire thing whatever comes back from the function. Once a value comes the expression is evaluated using its normal rules is that clear so within a program a function is invoked simply by writing the function name within any expression so please note a function is invoked within a main program by writing its name and the actual parameters that you wish to use for calculating the function value inside any expression since an expression can also be a standalone statement in c plus plus I can just write quad something something semicolon that itself will become the value but it will be useless to just write quad something something because return value you have to do something suppose you want to print out a value you can directly say c out quad something that will calculate the value and return what is important to note is that the given parameters are copied to the respective location there are other methods of parameter passing most important being the parameter passing by reference but we shall talk about it at a later date for the time being we will assume that the standard rule in c plus plus is copy all the actual parameters into the token parameters that you have in return inside your function definition. So, those are separate locations these are separate locations once that is done the function code is executed one value is calculated the type of that value is defined when you define the function and that will be return now the question if I can write a function quad I can use it in my program can you use a function which I have written yes there are two ways you say further please give me that code.  So, you say alright show me in which directory is that compiled code I will get my program compiled and tell c plus plus to link your compiled code also with my program. So, I do not have to do anything I will say fight, but you need to know how that function has been defined. So, that you can use it appropriate indeed such a thing is possible and indeed the main power of any programming language certainly that of c plus plus comes about because a large number of people have written a large number of useful functions which all of us can utilize. There are two types of libraries one which are application specific library for computational problems there are different routines which let us say people in our mechanical engineering department would have written all their students and others could use those functions, but there are standard libraries and these standard libraries provide a whole lot of useful functions which all of us can use. For example, there is a standard library called c math if you say in your program hash include c math then suddenly the following functions can be used in your program sign, cos, tan whatever you realize all the log all these exponential all of such libraries and their component functions which have been predefined in those libraries are defined as a part of c plus plus report on whenever you get a c plus plus compiler typically you will get all these libraries. When I write hash include c math you will recall that we normally write in our program hash include std, std i o what is std i o it is actually a library it is a library of functions which handle input and output. There is an std lib called c std lib that there are n number of libraries available and as we proceed further we will increasingly draw upon pre written functions to do our work rather than we ourselves writing those long programs that is not the same. The last one now it is time to understand why we say int main and why we say return 0 you observe that we have been writing it mechanically so far just as we can write functions give it parameters and get a return value c plus plus says that your entire main program is also a function its name is main that is defined by c plus however within a main program we may call functions who calls this main program itself the operating system when we say dot slash a dot out we are actually telling operating system please run my program the operating system treats this entire program as a function and that is why it has a return type called int and it has a pair of parenthesis so far we have not been writing anything inside this later in the course we shall see that we can actually pass parameters to the main program you know how the parameters are to be passed if on my command line when I say dot slash a dot out and I press return enter but instead if I say four three two spaces this four three two spaces this four and three become parameters the operating system says ah somebody is giving me two parameters it will take these two parameters and give it to your main function and it may use it in any way it wants we do not bother about it how it is to be done etcetera etcetera the definition is slightly clumsy we cannot understand that definition unless we understand the array structure we shall do that short the point is when we say return 0 what is happening is that the main program is returning a value 0 to the operating system because operating system called it so it returns the value 0 what operating system does with it we do not we have so far only stated that in general an operating system will treat a 0 return value as always well and if it gets 1 2 or 3 to operating system it means something went wrong but we do not know yet how to use that feature in any meaningful however the main program itself is a function is that understood we close this lecture with an example to evaluate a formula v is equal to square root of m plus square root of n divided by square root of m plus n we agree that such formula will come in eva for evaluation ok what do we do well we already written a program to calculate the square root can I not rewrite that program as a function and use it let me choose the name s root for that function how many parameters s root will have 1 because it has to calculate the value of only a given number k it starts with initial value if you want you can write a square root function which has two parameters with an initial of a guess also but ordinarily just the number whose root is to be calculated is sufficient so it has one parameter and this parameter will be a floating point suppose I have written that s root function with one parameter then v is equal to this will actually evaluate this agreed I am invoking the s root function which I have written separately how many times 3 times within the same expression perfectly value first time I go there with the value of m come back with the result next time I go there with the value of n come back with the result third time I go with the value of m plus n observe that while writing the function definition since I am defining the place holders or parameters I have to write names in a and b what but when I am invoking I am actually required to send an actual value as a parameter to that and therefore an expression is perfectly fine c plus plus will evaluate this m plus n whatever is the value so the total m is 5 n is 13 so m plus n is 18 and you take this value 18 and give it there and say to find the square root n come this is the way I will write my function please note that all functions are ordinarily required to be written before you write your main program so after writing include i o stream and using namespace std I should not write int main something I should first write any number of functions that I want to write we shall see how exactly this can be obligated and you can actually write the functions at the end as well but this is the standard when the standard way I write float s root in bracket float k what will this do now this will create a location for k it may create additional locations whenever it requires it will also create a location for x you will agree that the program written is exactly the same that we wrote to find the square root of a number exactly the same while this condition do this and it will return the value having done this this is my main program I declare m and n as two values v as the final value which I want to calculate collect the values of m and n then I invoke this function three times calculate the value of v and output the value it is not necessary to have a separate variable v if I wanted to simply say c out you agree because it is an expression and in c out I can write any expression it will be evaluated and the value will be calculated I can invoke the function inside I would like you to just quickly grasp through this program this program finds out the averages average marks scored by two groups of students students who attend CS 101 in slot five you are slot five right and students who attend lectures in slot 11 let us say as a teacher I am just curious to find out which group is doing better same test is given to everyone so what I want to do I want to read the number of students and their marks in slot five number of students and their marks in slot 11 and calculate the average average will be a floating point number just to make sure that I have a calculation precise up to many more digits because I expect both the groups to be very comparable so I declare the slot average as double it is not required to be double double means instead of 32-bit floating point it will be 64-bit floating it can be just a float that is good enough actually okay observe what I am doing I am reading the number of students in slot five call it n five I am reading the number of students in slot 11 I am calling it n 11 now I calculate slot five average is equal to average in bracket five comma n five so average is obviously the name of my function and I am sending two parameters to it one is the slot number and the other is the number of students in that slot but wait this is supposed to calculate the average should I not send the marks but marks are too many so what I have decided is instead of sending the mark because I do not know how to send let us say 250 students or 220 students take the test so how do I send those 220 names it is unclear right so what I will do is I will read the data for that slot in the function it is perfectly fine and once I get back the slot averages if slot five average is greater than slot 11 I say slot five has performed better or else I say slot 11 has performed better simple how is the function this is the function written double average as I said instead of this it could very well be flowed there is no problem observe the definition of two parameters int slot int n so slot number comes in and n which is the number of students in that slot I am defining marks as double sum as double everything as double for i equal to 1 to n I set up an iteration n is the number of students given to me so for each student I will read the marks and add it to sum so I start with sum equal to 0 and keep on saying read marks and sum plus equal to mark I will iterate this n time I get the sum I divide sum by n and calculate the value which is to be written directly so you think it is correct this function will work correctly only difference is we agreed some time ago that is c plus plus you should be writing functions before you write the main program but in this case we have first written the main program and then return this function this is not correct whenever you want to do such a thing c plus plus requires you can write your functions at the end but at least before you start writing the main program tell me the prototype of the function what is prototype what is the name of the function what is going to be the return value and how many parameters you are going to have in that function whenever you write it more importantly what are going to be the types of values of those parameters this is called a prototype definition let us go back to the previous slide and see the prototype double return value average name of function two parameters int int no name is given here because name is not important at this stage for c plus plus to compile your main program it only needs to know that if it encounters average somewhere then what is to be interpreted for this value and this value this prototype definition is important for another reason why consider the standard library those functions sign cost you are not writing somebody has written technically by rule I must write those functions before I write the main program but where are those functions when I write include c math what is included is not the complete code or program implementation of that function what is included is prototype definitions in a set of files called header files so some of you have done c or c plus plus programming earlier would know something called math dot h this used to be a header file which contains the prototype definitions of all the functions which are defined in the math slide where you include that all prototype definitions will come since your include statement comes at the beginning all prototypes get included at the beginning then you write your main code and the prototype definition requires only this and nothing so if I execute this program I will get something like this so let us say I give this is a sample test so I run it with three students in slot five two students in slot eleven I give some marks these are of course arbitrary marks and it so happens that the average gets calculated and I conclude that slot five has performed and you can you can do that for any number of students of all anyway so have you understood how functions are written how they are invoked and how convenient they will make our life particularly with the knowledge that large number of standard functions have been pre written by a number of people and c plus plus has these functions included in the standard library those of you have access to net can go to a c plus plus tutorial site and ask for standard library functions you will get all the standard library functions listed what are their parameters what they return etcetera etcetera and of course we will be discussing specific functions as and when we get to require we will close with some announcements any questions before we proceed by thank you very much


What's crazy about hip-hop, kids started doing this because they had no other options. Their parents couldn't put them in a dance class, so they created their own dance, their own music, their own art. And so you have to create something from scratch. Hip-hop is a culture. It's a community. And the values that it represents is peace, love, unity, and having fun. And we really believe that regardless of where you come from, what you're dealing with, these values will allow you to break free. I grew up in a pretty rough side of Houston. At the time, gangs were really heavy, drugs were really heavy. I mean, that's all there was. And so I was really trapped, man. I was trapped because I knew what was right and what was wrong. It's funny, you know, when I first discovered dancing, it was actually when I had a 9mm at a middle school talent show. Like five minutes before the talent show closes down, the lights go dim. And all of a sudden you see these dudes coming out like spinning on their backs or hands or heads and just top rocking. And so seeing it right there and there, it just literally just impacted me. And I was like, yo, I want to do that. Immediately, it led me to do better in school. My relationship with my parents got stronger. I started getting rid of friends I didn't want to be around because that's what I wanted to get good at. I just wanted to do that. There was freedom to it. There was love. There was acceptance. And it was coming from hip-hop and changed my life, man. B-Boying created opportunities. People in the neighborhood he grew up in normally wouldn't have. That idea of getting out of where he was, I think pushed him a little more to become what he is today. You know, I've been to 50 countries around the world, then national commercials, feature films, tours with multiple celebrities and upcoming artists. In 2010, I was honored by Rock Steady Crew with the Spy Award, which is the most prestigious award for B-Boys and B-Girls.  And when I dance to me, it's 110% spiritual, man. I literally forget about everything that I'm dealing with. I put myself in a space where it's just me and my artistry. I put myself in this place because nothing becomes wrong. Everything is right. And when you can learn to do that with something that you're passionate about, I believe you're going to reach different heights in your life. You know, hip-hop is a culture. It's a community built from different ethnicities from around the world who are all passionate about these four elements, Breaking, MCN, DJing and graffiti art. And at Break Free, we're able to teach this and create a structured program where kids can learn every single element, every single day. We're probably the first and only hip-hop school in the world. We really promote healthy living, self-expression and empowerment. Kids leaving here feeling like they're superheroes that they can do whatever they want to do. I started it with $5,000. I mean, we didn't have no budget, but we made it happen. In his mind, he wants the kids in his community to have the dreams that he did and to create opportunities for them they probably didn't know they could. What I hope for is for kids to just have a memorable moment where there was positive role models in their life to support whatever it is that they wanted to do. Cullen was bullied a lot in school. And then later on, he was diagnosed with Asperger's. And to see Cullen go from being bullied and then to being one of the most talented kids, probably in the city of Houston, is amazing to me. You can make your own way of getting out of bullying and that's what breaking did for me. It helped me get away from that. He just loves what he does and I think that's the most beautiful part about it because he broke free. So that passion that you carry, that passion that you carry, you have to pour it in to everything that you do. The most important thing about what Break Free does, man, is not just the hip-hop culture side of things, is that there are life lessons being taught every single day. But hip-hop is about fun, it's about peace, it's about love, it's about respect, it's about unity. And we got to learn all these values because for me, there's freedom in what we do and it makes me feel good. Every day is tough. There hasn't been a time at Break Free where it's easy. You know, I'm married with two kids. We sacrifice a lot to keep Break Free growing but it's motivating for me, it drives me, man. When I think about my wife, when I think about what I've been through, when I think about my parents, when I think about my family, when I think about Break Free, my students, my team, I want to give them the world. He's the best. To me, he is the best. It's easy to sit down and think about all the negative things, man, but there's just so much good happening that why would I even let that weigh me down? You know what I mean? Like, it doesn't even matter.  Since Break Free opened, I knew that it was going to be a tough struggle, you know? But I truly believe that the values that it carries will eventually hit people's hearts and people want to be a part of it.


Welcome to our brand new show on Imam Hussein TV called Insight to Karbala. This brand new show we are going to seek to delve into different aspects on the story of Ashura that took place on Karbala. There are several ways the story can be broken down and every single episode we will dedicate to one aspect of the story that we can learn and talk about openly. Today's episode we're going to start from the beginning on who was Hussein before Karbala. Many of us understandably so know the Hussein on the day of Ashura and afterwards but who was this person before this tragedy took place? What was his status? What were the moments where he stood out with certain things he did in his life? To discuss this on our opening show we have some guests, we've got Sayed Ali Nawab, we've got Sayed Mohsin Shah, and we've got Ibrahim Ansari to provide some poetry as well as add to the discussion. Say that I mentioned in my intro that it's understandable that the Imam Hussein that we know is the one on the day of Ashura because this is the moment where the climax happened of his life, what he was born to do in that essence. The two questions is why is it important to know the years before this happened and secondly who was Hussein? It was a very, very big question but who was this person pre-Ashura? As you said brother it is understandable why people when they hear the name of Imam Hussein they quickly remember Karbala and Ashura. It's because the Imams of Ahlul Bayt and before them the Holy Prophet of Islam, before the Prophet of Islam Allah subhanahu wa ta'ala placed a great emphasis on the event of Ashura and they drawed people or they pulled people towards the event of Ashura and what happened on the plains of Karbala. But it's equally as important for us to come and understand who was Imam Hussein alaihi salam because when we stand in front of the shrine or the burial site of Imam Hussein and we do the the ziyarah or the salutation of Imam Hussein it is always recommendable to know who you are visiting because the hadith says Manzara al-Husaynah arifan bi haqqih. Now arifan bi haqqih doesn't come from Karbala alone or the Imam in Mashhad for example Imam al-Raza or for example other Imams when you visit Imam alaihi salam al-Najaf or Imam Musab al-Najaf al-Farin Qadami or the rest of the Imams when you stand before them you must know in what circumstances they were born when they were born what they did during their life not only that major event that they were known for. So in regards with Imam Hussein alaihi salam prior to the birth of Imam Hussein Rasulullah sallallahu alaihi wa alaihi wasallam informed the people about the tragedy of Karbala he was known to have been seen to be weeping and crying before years before the birth of Imam Hussein alaihi salam. So Jibrail comes down informs the holy prophet that Allah swt is going to grant you a grandchild his name is going to be Hussein and this is what's going to happen to him and Rasulullah cries and weeps and the companions muhajireen and Ansar sitting around him they see they observe the prophet of Allah the messenger the infallible the greatest person on the face of this earth suddenly started crying of course when Jibrail alaihi salam sometimes speaks to the holy prophet it's sound heard only by Rasulullah the people around him they can't see Jibrail or sometimes Jibrail used to come in and enter upon the holy prophet in the in the shape and form of Dahi al kelb for example known in personality so sometimes they used to know what's happening and sometimes no the Rasulullah had to explain to them that this is what's going to happen so Imam Hussein alaihi salam specifically other than the imams of the Ahlul Bayt the rest of the imams he had a speciality why because as I said previously in other programs that Rasulullah sallallahu alaihi wa alaihi wasallam he prepared the nation for the happening of Ashura prior to the birth of Imam Hussein on the birth of Imam Hussein alaihi salam and in the five or six years where the Rasulullah sallallahu alaihi wa alaihi wasallam had Imam Hussein around him Imam Hussein alaihi salam was an individual that in his first years around Rasulullah Rasulullah sallallahu alaihi wa alaihi used to feed Imam Hussein Imam Hussein still young Fatima Tuzara alaihi salam in some narrations she fed Imam Hussein until the milk dried out Rasulullah it is observed as it is mentioned in the rewayat that he used to place his thumb or one of his fingers in the in the maqt of Imam Hussein alaihi salam and the rewayat says Imam Hussein used to take in from that action what he needs for two or three days so the flesh and blood of Imam Hussein alaihi salam was from Rasulullah and some people say when Rasulullah says Hussein and minni is that I have brought up Hussein I'm guessing this this feeding is also symbolic that he's also getting the wisdom exactly feeding is it's symbolic and also the physical feeding yes two-way yes Rasulullah sallallahu alaihi wa alaihi used to place his his lips or his tongue upon the lips of Hussein alaihi salam as he used to do with his father Amir al-Mu'mineen Ali ibn abiyat alim and through that he used to give the alam and the wisdom where Amir al-Mu'mineen alaihi salam says alamani rasulullah alfababin minna al-ilm yuf tahli min kulli bab alfbab similar to Imam Hussein alaihi salam Rasulullah educated Imam Hussein so if you ask where Imam Hussein received his education I would say he received it directly from the person that received the revelation so this is the knowledge this is the upbringing of Imam Hussein alaihi salam in other instances before the event of Karbala Imam Hussein alaihi salam with the presence of his father because he was with his grandfather for about five or six years in some narration seven years and then with his mother Fatima Tuzzahra again for a year or two after the Rasulullah sallallahu alaihi wa alaihi wa sallam sorry a couple of months after the demise of Rasulullah with his father Amir al-Mu'mineen he was for 35 years if I'm not mistaken with his brother Hussein an extra 10 years and then his Imamate was for 10 years as well so in this process with the presence of Imam Ali with the presence of Imam Hussein it doesn't mean that he didn't do it much but he was not in the limelight as his father Amir al-Mu'mineen or in the Imamate of Imam Hussein alaihi salam and we'll get to his Imamate afterwards but I want to bring in our other two guests and let's delve into history here and I'll keep repeating myself understandably Ashura is the day we remember Imam Hussein for the most can both of you shed some light on an incident or a story even a narration that Imam said way before Ashura that stands out or that the viewers should know about say what's new you can go first I mean there's many stories you know the famous ones are like you know when Rasulullah sallallahu alaihi wa alaihi wa sallam we used to pray he'd hit mount on him and you were able to sort of extend his soju there will be other stories of miracles of there was a famous one where how the how Imam Hassan Imam Hussein taught the old man how to do wudu so there's many many stories but an event an incident that sticks out for me is when Imam Hassan is attacked and this is when there is a this is before the treaty with Muawiyah it is about to be a war and people are you know preparing for war and they had actually the head towards Syria and during the camp Imam Hassan's camp turns on him because they don't want to fight anymore they've had enough of fighting with Imam Ali and so forth so the the attacking while he's in prayer and Imam Hussein is the only one there to defend him and in this attack in this ambush Imam Hassan's actually stabbed in the leg yes and the reason it sticks out for me is that oh it's like Imam Imam Hassan was there to protect his brother and he was there to to to fight off the enemies and then to protect his Imam but then what happens later on in Kadaballah you know there's no one there to protect him there's no one there to stop you know the sword smashing him so that event really sticks out for me Ibrahim what about you so you're asked for an event and or a narration yes in terms of the first event that really stands out is his actual birth yes as Said mentioned so I'm not going to detail that because Said mentioned it the narration that stands out for me is a very powerful narration by Imam Hussein alayhi wasaatu as-salam and he says may I be blinded that does not see you overseeing the person so the eye of a person that doesn't see you overseeing may the I be blinded as for an event that I will then mention now is before he actually left Madina when they were trying to force him to pay allegiance to Yazid his stance was unbelievable his stance was truly unbelievable he described all the bad acts of Yazid he drinks alcohol he gumbles he and then he said someone like me will never pay allegiance to someone like him absolutely powerful and before that now he would say that the Imam was you know at the time of his Imam and he was he had Bani Hashem around him and he was at a older age but Imam Hussein alayhi as-salam he was that strong in his in his actions and in his belief that even he done that when he was younger at the time of the the the second ruler when he stole Khilafa he Imam Hussein alayhi as-salam entered the Masjid of Rasulullah and he noticed that person sitting on the pulpit he's speaking and there's hundreds of people muslim sitting listening to whatever he wanted to say if he had anything to say so he Imam Hussein alayhi as-salam came came until he reached the pulpit now the muslims are observing Hussein the grandson of the holy prophet what is he going to do he came he went up the pulpit he stood in front of him in front of all the muslims and said to him now you're not talking about a normal person sitting on the pulpit talking about someone who was assumed himself as a leader of the Islamic umma and who is speaking to him regardless of them knowing this is Hussein this is a youngster standing on the pulpit come down from the pulpit of my father or my grandfather what's had a memory abig go elsewhere and sit on the pulpit that your father used to have and this guy out of stupidity he came out and said my father doesn't have a pulpit which gives another clue that what you have taken is not yours this is mine and my father's because you know at that time the sign and signal was that whoever sits on the pulpit is the ruler and the Khalifa so this is another interesting starts from the life of Imam Hussein alayhi as-salam I think we can there's so much we'll delve into more of it I mean two things take out we and I think everything links to Karbala I mean we can't help it but the relationship with the bus I think pre-karbala is also set to foundation I think a very uh one that's I don't think it's ignored actually but we forget that Dua al-Arafa came from Imam al-Hussein um one of the most beautiful pieces of piece of theology um in any walk of life uh to fall in love with the person himself um this is if you want to learn about God you look at Dua al-Arafa and there's something Imam Hussein did independent of Karbala itself um and we're going to have as per usual uh on the format of the show what we're going to do in this show is halfway through the show we usually have a poetry and we end with a eulogy so it's time for the poetry and we're going to ask brother ibrahim to recite some poetry so I'm going to take you to another event before Karbala which is his departure which is usually recited about um and as Imam Hussein is leaving his ill daughter Fatima at night a caravan was leaving in pain prophets prophets family followed the lead Hussein. Imam Hussein bid his hometown farewell forced to leave his beloved daughter unwell as a lover submitted to Allah's will renewing his grandfather's campaign. Hussein was devoted yet Hussein was devoted and full of charisma declared refusal to Yazid schema humiliation far from the son of Fatima he does not submit to any tyrant's reign Fatima was like her grandmother alone she felt ill faithful and out of tone losing her day ones with whom she has grown proved to be worse than any physical pain city of the prophet was deep in darkness Hussein's departure has turned it so heartless its noble family was shuttered faultless for years Medina did not see peace nor gain the princess kept waiting for their return patients made her tender heart slowly burn she knew her father to death had to adjourn because Hussein acted in strength not to wait because Hussein acted in strength not to wait thank you very much to move the discussion forwards saying a reminder of a narration by the prophet peace be upon him and his family where he says Hussein and Hussein are imams whether they are standing or sitting I want to ask an interesting question how does it work when you have two imams who are alive at the same time so when Imam Hussein and Imam Hussein were alive at the same time was Imam Hussein the Imam of Imam Hussein or were they both imam at the same time how does the imam it work there just to add a small point to the narration he just narrated because Rasulullah at the time that he was alive and Imam Hussein and Imam Hussein were alive they were youngsters yes and at many times Rasulullah used to look for specific movements or specific times to attract the muslims towards Imam Hussein and also to say a saying for example when Imam Hussein or Imam Hussein was seen to be playing with the rest of the kids in the streets of Medina Rasulullah used to come and hug Imam Hussein alaihi salam take Imam Hussein sitting on his lap and say Hussein on minni wa anamin Hussein that narration has been narrated whilst Rasulullah was walking in the streets of Medina and Imam Hussein was busy playing and the Prophet said that Hussein on minni wa anamin Hussein I love Allah man I love Hussein whoever loves me has to love Hussein and whoever loves me is automatically loved by Allah subhanahu wa ta'ala so here you ask me about what happens or how does it work when there are two Imams at the same time of course in the level of hierarchy with the Imams alaihi salam Imam Hussein out of his position and the place that he has is better than the rest of the Imams after him but what happens when there are Imams before him yes of course Rasulullah is better than Amir al-Mu'minin Amir al-Mu'minin is better than Hassan alaihi salam Hassan Imam Hassan is better than Imam Hussein because not only he is his older brother but he is an Imam before him so at the time of the Imam of Imam Hassan alaihi salam it is the duty of Imam Hussein alaihi salam to follow the Imam before him which is Imam Hassan alaihi salam obviously there's no um we have to add that they'll never conflict anyway no they never conflicted they are all the same from the beginning until the end from Rasulullah from Amir al-Mu'minin until Imam al-Mahdi alaihi salam isn't there a narration I think I read once that I don't know who narrates it the first is Muhammad the last is Muhammad and those in between are Muhammad so here in knowledge wise they are all the same in level wise they are all the same but there is a point of hierarchy that one should observe as I said Imam Hassan alaihi salam when he was the Imam Imam his opinion is the opinion of Imam Hussein Imam Hussein's action would have been the same as the decision at that time of Imam Hassan when he done this agreement or treaty between Muawiyah and between himself so but the times give us different responsibilities of different actions by the Imam themselves and Imam while sitting or standing yes Imam if they are in peace or if they are in war they are the same so if we swap positions Imam Hassan would have gone to Karibullah and Imam Hussein would have been the same yes according to the time according to the situation they would have dealt with the same situation the same way as Imam Hassan or Muhammad thank you and one of the final points when I look at is when we go to actually to Ashura and when Imam Hussein died obviously a very sorrowful moment and understandably Imam Hussein is very very thirsty very weak at the time um he's took all the bodies and it's his turn and sometimes the literature and the way we portray Imam is at that moment in time and I say that specifically he was a very he was very weak um physically speaking I want to go backwards to Imam's role as actually a very skilled fighter because yes in Karibullah he was killed but if we go to the battle of Saffeen for example another moments before Ashura when Imam Ali was alive for example Imam Hussein was actually a very very good skilled warrior as well because of who his father was so it wasn't do we need to remember that Imam wasn't just someone that was just killed and you know wasn't a good swordsman he actually he was a very very skilled fighter as well I mean when it comes to fighting um you know it is mustahab that you know one a male should learn how to horse ride yes archery uh Rasulullah sallallahu alaihi was really encouraged wrestling and swimming so physical fitness and the you know combat uh is is I mean we we are a piece of religion but you know we have to defend ourselves now when it comes to Imam Hussein do you know how many of the of the opposition Imam Hussein killed in in Karibullah now some say there was 30 000 of them 20 70 000 of them 80 000 Imam Hussein and his camp managed to kill 11 000 now let me ask you this how can 72 men take on an army of 30 000 minimum and kill 11 000 and it wasn't just his because of his bravery and the way he fought it was also because of his um tactics because of of his his you know his strategy yeah towards war um that the people were thinking how could he do that one of the main strategies he used was stampede so they'll come to attack him and then he would leash out uh you know with his attack and he'll get scared and he'll turn around and then so many are coming to attack so many are turning around it will cause a stampede and that's how he killed so many of them and furthermore when they were fighting only one on one uh armed combat they they were they were they were threatened they were scared because he resembled his father so much even in combat and Imam Ali is what they call the champion warrior yeah of of Arabia where people used to write his name on their swords in honor of him yeah so let's not forget that yes Imam Hussein was killed and um you know there is you know destiny and there is you know uh also that he had to return to his lord but one thing to add to what Sayed was saying is that uh Amir al-Mu'mineen alaihi salam he used to of course take Imam Hussein with him to all the battles uh Jamal Safin Nahrwan and he used to give them roles he used to say Imam Hussein you are in charge of the the horse riders on the right alayl maiman al-hasen alaihi salam alayl maisara for example Muhammad ibn Hanafiyah uh he was known to be uh participating Muhammad ibn Abi Baqir also participating in the battle so Imam used to give them responsibility because they were uh individuals that the Imam relied upon because they were good army and skilled individuals and also Imam Hussein alaihi salam and specifically Abul Fattul al-Abbas and the day of ashura they used to strike once and kill the opponent so they used to ride their horse in the middle of the army like Amir al-Mu'mineen alaihi salam with one strike left and right they used to kill a couple of individuals so many of the enemies used to be killed in that manner so Imam Hussein alaihi salam and the children of Amir al-Mu'mineen they were brought up in a manner where they were very skilled in the battlefield like their father Amir al-Mu'mineen but at the same time Imam Hussein alaihi salam was an individual to be known to be uh worshipping Allah subhanahu wa ta'ala when he was uh in the masjid or at home i think to end there was that there's a one narration that sticks out again the irony of it as well is that i think it was after Safin where one of the prisoners who was tied with a rope um asked Imam Hussein to undo the rope and uh he asked permission of his father and he did it and who did it end up being who shimmered himself and Imam untied his ropes his compassion his compassion was there yeah salam used to help feed or give water to and the certain individuals and then uh next you know they're in kabbalah and they're participating in the looting of the tents thank you very much uh thank you to our dear viewers we've reached the end of our show thank you for watching at home uh on our first episode of this brand new series we do encourage you to please watch the rest of the episodes that are coming we have several topics to discuss and several more episodes to uh uh show you um the format of the show dictates that at the end of the show we end with a eulogy uh as that is common tradition of the culture of mourning this tragedy so we're going to ask brother ibrahim to end and close the show with a eulogy um a poem written by Nouri Sardar welcoming the president of Muharram the shroud of a family a month on you beckons and the new moon's crescent with my bloody darkens i see a flame in the heart it away comes at the sound of wailing children these hot weekends as approaches the horizon of my 10 days the pangs of grief on hearing my name on you praise between your eye and your eyelid my body lays and hear the angel of death on my body prays if by my tragedy your heart it worked for her oh she I remember me when you see for her for I was murdered thirsty alone a stranger indeed my children would refuse water later for what reason oh my love do your eyes weep is it that so it's cold my name whilst my soldier sleep oh that's my flag bearer with no hands lies asleep whilst fire and men upon my women's dance seep whilst fire and men upon my women's dance seep thank you


Alrighty, we have a construction update. It's been a long time again. The Canadian weather is not cooperating with me whatsoever. One day it'll be raining, some days it's snowing, if it's not snowing or raining, it's windy and I can't get the drone up safely, so I don't. Oh, it's so frustrating, but let's get right to it. So as you can see, lots of track in the storage area. In fact, you can actually make up the vertical loop in that storage area, so that's awesome. I'm assuming they have track all the way up to the return. That's what I would predict. If not, they have the vertical loop there and then they're just missing the remainder of it. So as you can see, construction was going pretty late today. So again, I promise you guys, well, let's get right into this. So this is a little teaser into a video that's gonna come out slightly after this. So you see something on Behemoth's track there. I'll update you guys after this video, give it about 30 minutes after this video. Another video will be put up about what's going on with Behemoth, but yeah, other than that. So as you can see, construction's gonna be a little late today. They're making up time, I guess, for the last two days, three days that they couldn't get anything done due to weather. So they're installing the remainder of the Imelmann. You can actually see the support structure in and then a piece of track being held in by one crane. And then later on in the video, you're gonna see the big yellow crane lifting in another piece of track into that area. So the Imelmann should be done by later tonight. It was just getting too dark. We were there around 3.34. So I'm assuming that they'll be done the Imelmann by tonight. And I'm gonna hopefully, it's supposed to be snowing all day tomorrow, which is horrible. I hate living in Canada. Why do you live somewhere where the wind and the air hurts your face? I have no idea, but I do. But I'll be there tomorrow, hopefully filming. I'm saying hopefully because I don't think I actually will be there. If I don't get there tomorrow, I promise you guys I will go fly on the weekend, Saturday, Sunday, whatever day it's not raining, snowing or windy. Again, I can't go up if any of those conditions are in. I can fly usually below 24 kilometers an hour wind. So if it's below 24 kilometer hour winds, I'm good. If it's over, it's just getting too unsafe to fly. Technically I can fly up to 30 kilometer hour winds or something like that. The drone can handle a lot. I just don't like to because it wobbles a lot and it scares me and I don't wanna lose it. It's inexpensive, he's a technology. But yeah, I'm teaching a Krega. For those of you who don't know, Krega is someone that I started vlogging with and hanging around at the park. He's been super helpful with the content. Krega was actually a general public. He saw some of my videos. He met me and the team and he's become a huge enthusiast. In fact, this kid is always at the park. He lives right across the street, super helpful. He's able to tell me when something's going on. You can see it from his house, so I go and film. And yeah, it's just super awesome. He's a huge enthusiast now. He wrote Behemoth and Leviathan for the first time this season and he loves it and he is now a full blown enthusiast. In fact, I think he is more obsessed with Wonderland than I am now, which is awesome. So yeah, he's helping us out a lot. He's been a huge help. So we're gonna actually be welcoming him onto the team finally. It's long overdue. But yeah, so I'm teaching him how to fly. So the person flying the drone right now is actually Krega. Teaching him how to fly the drone.  He can actually just film the footage for me, check it, send it over to me and then I can edit it into a video for you guys. So it actually removes a lot of the transportation sides of things. So that's super awesome. So thank you to him. Give the video a like for Krega helping me out and reducing some of my time and travel time. As you can see the highway there, it is packed. It's slow moving in the direction I live up north, up there, the direction that is moving slow. But let's get back on topic. I think I just went on a huge rant there. I apologize guys, just updating you guys I guess on some of the smaller parts of the channel. So I don't see anything going on in the station area. I am seeing a lot of white in the station area. So I'm curious about that, what it could be. I'm looking for vertical construction in terms of buildings and stuff. I feel like we should be seeing something sometime soon. I have noticed though in the past when I was flying my drone last season that buildings for theming and stuff typically go up in March. So end of February, March is when we might see buildings going up. So it might be too soon. I think they wait until the snow storms are done because end of February things do calm down regardless of winter carrying on until April. So I have a feeling we may not see anything until then. I know Wonderland was a little late on getting the contracts for the buildings, infrastructure and theming for this coaster. So Frontier Canada was a little bit kind of delayed in terms of the logistical part of it. Like basically the contracts for the company that would build it. But yeah, as you can see actually on site in some of the angles they have actually a lot of track pieces in the site there. I think they have like a good four, five or six track pieces sitting there. And they have a lot of support beams and catwalks for the MCBR are on site right next to Timbrel Falls. So that's interesting. You can actually see a cement truck or concrete truck. Again, I always mix them up. It's concrete or cement, one of the two. I'm not perfect. I don't know all the wordings and I will never remember everything. But that is on the site. They're pouring footings in the vertical loop area. So you can see it just pouring some footings in the area right before it heads into that trench. Also from the footage, when we go more left, which we will, you'll see how deep that trench is. It's insane how deep it is. So this is actually, I don't even know why I left this in but this is just me teaching Craig how to like go up, down, left, right. If there's like strong winds or if there's a communication error with the drone how to like bring that down safely. But we'll get back into the construction update now. So the element is again, heading over vortex now. So tomorrow it will be over vortex and it's gonna look really amazing. This thing's moving a lot slower than Copperhead Strike now but it's amazing how each time they install track it's two to four pieces at a time. So again, when they install one segment it's usually two track pieces connected together. In this case, the next piece to go in will be one piece, not two attached together but you can actually see where it's gonna connect to. You can see the little kind of like cherry picker right up near the support column there. It's a little Y frame support just before it's over vortex there. You'll see it now better. And yeah, so the track piece will connect to that and then it's gonna be completely over vortex after that. So it'll be interesting to see how that happens and how that plays out. That's gonna be awesome. Hopefully we'll have the drone up. You can actually also see the landscaping and how it's gonna form. So you can see how right next to the wave pool and next to mine buster they formed that little grass hill curve area now. So it doesn't look like it's gonna be for anything. It looks like they're probably just gonna throw down some grass seed for next season and it's actually gonna look a lot nicer than it did this season. So they built that new little kind of road that goes in under behemoth towards the Splashworks maintenance bay for the wave pool. But yeah, not too much going on other than that. Again, I'm just double checking. So again, when I film, I actually watch this footage kind of like once with a quick run through and then I kind of fill you guys in as I go through myself. So sometimes I spot things as I'm filming but I don't notice anything out of the ordinary in the station area. That's the area I'm kind of like looking at. I am noticing white on the catwalks and station area though, which I don't know what it is. I can actually see it also at the base of the lift hill. I don't know if that's just like a tarp for protecting if they're gonna start doing some work. Sometimes they'll lay down tarp to protect it. You see it actually on Copperhead Strike as well. Now I was supposed to have a Maxforce and Copperhead Strike update today. I'm actually gonna move that till tomorrow just because of the kind of stuff that we've seen here at Wonderland, especially on behemoth. I wanna explain to you guys what that is. That's gonna be really cool. But yeah, this thing is absolutely stunning from every angle. Hope you guys really enjoyed the footage today. For anyone that participated in the amusement insiders giveaway, I will announce the winners on Sunday. And then everyone, all the prizes for the giveaways will be shipped out at once just to help me out. So I'm not shipping out things individually. So once the giveaways are done, I will ship everything out. Any of the winners I will announce though on Sunday in a video. And if you won, I will then pair what color and size you want. Again, sizes cannot be guaranteed because what I have is what I got. So you'll have first pick for the first giveaways and color and all that. And I'll pair it with your name in an envelope. And then at the end of the month, I'll send everything out at once. So to make things easier for me. And yeah, I just wanted to thank everyone for participating in that. Thanks for watching my construction updates. These things are getting really popular. We're getting a lot of partnerships with some other parks, even some overseas, the Six Flags chain. And then we have something really cool for Toronto, a Toronto event that we're gonna get to go film for you guys behind the scenes. So that's awesome. Thanks for watching my channel. Thanks for hitting that like button. So don't forget, hit that like button down below, comment, share the video for those who don't know and to get the message out there about amusement insiders under construction update. And yeah, thanks for watching guys. Have a good one. Bye.


COVID-19 has come through and completely decimated and put on pause the bar and restaurant industry. We've got about eight million people out of work and bar and restaurant owners struggling to come up with new ways to possibly stay in business. I'm Jacob Greer. I work in the bar hospitality business and I'm also a freelance writer. I write for Reason Magazine as well as other public policy outlets. Talking to other people in the industry, talking to bartenders, they want two things. One, they want to go back to work, but they also want to stay safe. And it's really hard to do both at the same time if the only option is for people to come into a bar or a restaurant and to gather inside. We're seeing it's just a recipe for spreading the virus. So we don't want to end up in a cycle of reopening and then re-closing constantly, which we're seeing right now. We'd like to find something that's more stable. Talking to people in my industry, the number one item on their wish list is to be free to sell cocktails to go. They want to be able to package a drink up to go alongside their food or even by itself for a customer to take home and drink there. The other quick ideas would be to expand outdoor spaces for drinking, which could be through closing sidewalks, putting on tables, even closing down on highest streets and creating public social plazas. Or if you want to go all the way there, eliminating open container laws entirely so that it's no longer a crime to have a drink outside. So in much of the world, especially in Asia and other parts of Europe, it's not against the law. It's not a crime to be outside drinking. And that was the case in the United States as well. From most of our history, it was not a crime simply to drink in public. It was a crime to be drunk in public. And that's a key distinction. In the 1970s, there became this push to make the law less discretionary, more objective. And the way they did that was to say the act of drinking itself is now the crime. And that highly constrained where people could drink. When we think of open containers, we think of party atmospheres like Las Vegas or Bourbon Street in New Orleans. But there's also a lot more relaxed places that have varying degrees of open container permission, like say Hood River in Oregon or Sonoma in California. It doesn't have to be a party atmosphere, especially if you don't force everyone into one narrow space. It could be just allowing people to have a drink in the park, to have a picnic, to walk around their neighborhood with a drink in hand. And prohibition happened in 1920. And contrary to popular image of the fun speakeasy with great cocktails, what actually happened was we just spoiled our cocktail culture in the United States through that period. And we didn't really recover until the early 2000s, up until now. And all of this has been hugely hit by the shutdown. Right now I view these laws about allowing us to do cocktails to go and expanding outdoor spaces as much about damage control as anything else. And to prevent this from being completely erased and giving it some chance to survive.


Super sore and tired from yesterday's dunk session, but you're trying to get a tomahawk today. That's pretty much it. Baby room 99, let's get it.