Tuesday, March 17, 2020

Free Essays on Prosperity And Depression

The good economic times of the 1920’s and the bad economic times if the 1930’s. The New Deal permanently increases the role of government in our lives. As the WWI end in 1918 and we failed to join the League of Nation in 1920. Also Harding was elected for president. This time was the post war depression and many social changes were made at this time. During this era, it was a time of prosperity changes on America or known at the roaring 20’s. Some of the social changes are: revolt in moral and manners changes for women (new industries)-behavior and appearance, home appliances, auto, airplane, radio, fads, sports, prohibition or also as stop the sell of alcohol-organized crime, big time movies, jazz, and Harlem Renaissance or as a rebirth of African American’s culture. Also in the 1920’s America return to normalcy or as return to the old ways. Then in 1923’s, President Harding dies. He was a horrible president and let big businesses ru n the country. During that period, the scandals with Harding, The Red Scare with communism coming to America, immigration restriction as in decreasing the number of immigrant going to this country and the Ku Klux Klan which is a white group with racial prejudice against other races. Then in 1925’s the Scope Trail. It was about this professor who teaches evolution in school and he was charge guilty for it. This was the biggest trial at the time. In 1927’s, Lindberg Flew across the Atlantic Ocean. He did this because it was a competition to see the first Solo man to fly across the ocean. He did this for money, not for fame. During the same year, the stock market was booming because new industries lead to overproduction so the prices are low and affordable. Then easy credit and advertising lead to overspending. After one year, Hoover is elected for president. After the second year of Hoover presidency, the stock market crashes in 1929’s. Then the depres sion begin or as bad... Free Essays on Prosperity And Depression Free Essays on Prosperity And Depression The good economic times of the 1920’s and the bad economic times if the 1930’s. The New Deal permanently increases the role of government in our lives. As the WWI end in 1918 and we failed to join the League of Nation in 1920. Also Harding was elected for president. This time was the post war depression and many social changes were made at this time. During this era, it was a time of prosperity changes on America or known at the roaring 20’s. Some of the social changes are: revolt in moral and manners changes for women (new industries)-behavior and appearance, home appliances, auto, airplane, radio, fads, sports, prohibition or also as stop the sell of alcohol-organized crime, big time movies, jazz, and Harlem Renaissance or as a rebirth of African American’s culture. Also in the 1920’s America return to normalcy or as return to the old ways. Then in 1923’s, President Harding dies. He was a horrible president and let big businesses ru n the country. During that period, the scandals with Harding, The Red Scare with communism coming to America, immigration restriction as in decreasing the number of immigrant going to this country and the Ku Klux Klan which is a white group with racial prejudice against other races. Then in 1925’s the Scope Trail. It was about this professor who teaches evolution in school and he was charge guilty for it. This was the biggest trial at the time. In 1927’s, Lindberg Flew across the Atlantic Ocean. He did this because it was a competition to see the first Solo man to fly across the ocean. He did this for money, not for fame. During the same year, the stock market was booming because new industries lead to overproduction so the prices are low and affordable. Then easy credit and advertising lead to overspending. After one year, Hoover is elected for president. After the second year of Hoover presidency, the stock market crashes in 1929’s. Then the depres sion begin or as bad...

Sunday, March 1, 2020

Understanding and Using Loops in Delphi Programming

Understanding and Using Loops in Delphi Programming The loop is a common element in all programming languages. Delphi has three control structures that execute blocks of code repeatedly: for, repeat ... until and while ... do. The FOR loop Suppose we need to repeat an operation a fixed number of times. // show 1,2,3,4,5 message boxesvar j: integer;beginfor j : 1 to 5 dobeginShowMessage(Box: IntToStr(j)) ;end;end; The value of a control variable (j), which is really just a counter, determines how many times a for statement runs. The keyword for sets up a counter. In the preceding example, the starting value for the counter is set to 1. The ending value is set to 5.When the for statement begins running the counter variable is set to the starting value. Delphi than checks whether the value for the counter is less than the ending value. If the value is greater, nothing is done (program execution jumps to the line of code immediately following the for loop code block). If the starting value is less than the ending value, the body of the loop is executed (here: the message box is displayed). Finally, Delphi adds 1 to the counter and starts the process again. Sometimes it is necessary to count backward. The downto keyword specifies that the value of a counter should be decremented by one each time the loop executes (it is not possible to specify an increment / decrement other than one). An example of a for loop that counts backward. var j: integer;beginfor j : 5 downto 1 dobeginShowMessage(T minus IntToStr(j) seconds) ;end;ShowMessage(For sequence executed!) ;end; Note: its important that you never change the value of the control variable in the middle of the loop. Doing so will cause errors. Nested FOR loops Writing a for loop within another for loop (nesting loops) is very useful when you want to fill / display data in a table or a grid. var k,j: integer;begin//this double loop is executed 4x416 timesfor k: 1 to 4 dofor j: 4 downto 1 doShowMessage(Box: IntToStr(k) , IntToStr(j)) ;end; The rule for nesting for-next loops is simple: the inner loop (j counter) must be completed before the next statement for the outer loop is encountered (k counter). We can have triply or quadruply nested loops, or even more. Note: Generally, the begin and end keywords are not strictly required, as you can see. If begin and end are not used, the statement immediately following the for statement is considered the body of the loop. The FOR-IN loop If you have Delphi 2005 or any newer version, you can use the new for-element-in-collection style iteration over containers. The following example demonstrates iteration over string expressions: for each char in string check if the character is either a or e or i. consts About Delphi Programming;varc : char;beginfor c in s dobeginif c in [a,e,i] thenbegin// do somethingend;end;end; The WHILE and REPEAT loops Sometimes we wont know exactly how many times a loop should cycle. What if we want to repeat an operation until we reach a specific goal? The most important difference between the while-do loop and the repeat-until loop is that the code of the repeat statement is always executed at least once. The general pattern when we write a repeat (and while) type of loop in Delphi is as follows: repeatbeginstatements;end;until condition true while condition true dobeginstatements;end; Here is the code to show 5 successive message boxes using repeat-until: varj: integer;beginj:0;repeatbeginj : j 1;ShowMessage(Box:IntToStr(j)) ;end;until j 5;end; As you can see, the repeat statement evaluates a condition at the end of the loop (therefore repeat loop is executed for sure at least once). The while statement, on the other hand, evaluates a condition at the beginning of the loop. Since the test is being done at the top, we will usually need to make sure that the condition makes sense before the loop is processed, if this is not true the compiler may decide to remove the loop from the code. var j: integer;beginj:0;while j 5 dobeginj:j1;ShowMessage(Box:IntToStr(j)) ;end;end; Break and Continue The Break and Continue procedures can be used to control the flow of repetitive statements: The Break procedure causes the flow of control to exit a for, while, or repeat statement and continue at the next statement following the loop statement. Continue allows the flow of control to proceed to the next iteration of repeating operation.