Thursday, March 12, 2020
The Vb.Net Sender and e Event Parameters In VB6, an event subroutine, like Button1_Click, was much less complicated because the system called the subroutine strictly by name. If a Button1_Click event existed, the system called it. Its direct and straightforward. But in VB.NET, there are two major upgrades that make VB.NET SOOPercharged (thats OOP for Object Oriented Programming). The Handles clause controls whether the system calls the subroutine, not the name.The sender and e parameters are passed to the subroutine. Use of Parameters Lets look at a simple example to see the difference that parameters make in VB.NET. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs ) Handles Button1.Click Your code goes hereEnd Sub Event subroutines always receive a sender object and a system EventArgs parameter e. Because the EventArgs parameter is an object, it supports whatever properties and methods are necessary. For example, the old VB6 MouseMove event subroutine used to receive four parameters: Button As IntegerShift As IntegerX As SingleY As Single When more advanced mice came out with more buttons, VB6 had a real problem supporting them. VB.NET only passes one MouseEventArgs parameter but it supports a lot more properties and methods. And each of them are objects that support even more. For example, the e.Button property contains all these properties: LeftMiddleRightNoneXButton1XButton2 If someone invents a trancendental mouse with a virtual button, VB.NET will only have to update the .NET Framework to support it and no previous code will break as a result. There are a number of .NET technologies that absolutely depend on these parameters. For example, since your PC usually only has a single screen to display graphics, your code has to merge the graphics it creates into the same image used by Windows. For that reason, a single graphics object has to be shared. The major way that your code is able to use that graphics object is to use the e parameter that is passed to the OnPaint event with the PaintEventArgs object. Protected Overrides Sub OnPaint( ByVal e As System.Windows.Forms.PaintEventArgs) Dim g As Graphics e.Graphics Other Examples What else can you do with these parameters? To illustrate, suppose you want to find whether a string, perhaps something you entered into a Textbox, exists in any one of a collection of other Textboxes when you click on one. You could code a few dozen virtually identical subroutines for each Textbox: If TextBox42.Text.IndexOf( SearchString.Text) -1 Then NotFound.Text Not Found But its a lot easier to code just one and let it handle all of them. The sender parameter will reveal which Textbox was clicked. Private Sub FindIt( ByVal sender As System.Object, ByVal e As System.EventArgs ) Handles TextBox1.Enter, TextBox2.Enter, . . . and on and on . . . TextBox42.Enter Dim myTextbox As TextBox myTextbox sender Dim IndexChar As Integer myTextbox.Text.IndexOf( SearchString.Text) If IndexChar -1 Then _ NotFound.Text Not Found _ Else _ NotFound.Text Found It! End Sub Recently, a programmer asked me for a better way to delete the line that was clicked in any of six specified lists. He had it working in a couple of dozen lines of code that simply confused me. But using sender, it was really quite simple: Private Sub ListBox_Click( ByVal sender As Object, ByVal e As System.EventArgs ) Handles ListBox1.Click, ListBox2.Click Dim myListBox As New ListBox myListBox sender myListBox.Items.RemoveAt(myListBox.SelectedIndex)End Sub One more example to nail down the point is a question that was sent in by Pierre in Belgium. Pierre was testing the equality of Button1 and sender using the Is operator for objects: If sender Is Button1 Then ... This is syntactically correct because sender and Button1 are both objects that can be referenced. And since sender really is identical with Button1, why doesnt it work? The answer depends on a keyword that is found a little earlier in the statement. First, lets check the Microsoft documentation for the Is operator. Visual Basic compares two object reference variables with the Is Operator. This operator determines if two reference variables refer to the same object instance. Notice that sender is passed ByVal. That means that a copy of Button1 is passed, not the actual object itself. So when Pierre tests to see if sender and Button1 are the same instance, the result is False. To test whether Button1 or Button2 has been clicked, you have to turn sender into an actual Button object and then test a property of that object. Text is usually used, but you could test a value in Tag or even the Location property. This code works: Dim myButton As ButtonmyButton senderIf myButton.Text Button1 Then
Monday, February 24, 2020
Gastroesophageal reflux disease - Research Paper Example If the stomach motility is disturbed then it is possible that the contents would last their much longer and this would increase the bulk of the gastric contents which would reflux into the esophagus (Kumar et al 2005; Dore et al 2008). The reflux from the stomach can lead to esophagitis which means inflammation of the esophagus. The gastric juices entering the stomach can lead to an injury of the gastric mucosa of the esophagus and this leads to irritation in the esophagus. Most of the cases of GERD are primarily seen in children and the clinical features show heartburn, hematemesis or melena. The damage to the esophageal mucosa does not depend upon the symptoms of GERD but rather depend upon the time for which these symptoms have been occurring. If a reflux is not stopped for a long time then it is possible that much of the esophageal mucosa would be damaged. If the condition of GERD gets severe a person would face the problem of bleeding, ulcers, strictures and may possibly develop Barrett Esophagus (Kumar et al 2005; Hall & Guyton 2006). References KUMAR, V., ABBAS, A. K., FAUSTO, N., ROBBINS, S. L., & COTRAN, R. S. (2005).Ã Robbins and Cotran pathologic basis of disease. Philadelphia, Elsevier Saunders. Hall, J. E., & Guyton, A. C. (2006).Ã Guyton & Hall physiology review. Philadelphia: Elsevier Saunders. Top of Form Dore, M.
Saturday, February 8, 2020
Reaction paper - Essay Example As he toured Auschwitz, Cole described humanitarian structures such as a Ã¢â¬Å"disinfestation complex,Ã¢â¬ theater and swimming pool inside of the camp. These structures call into question the function of the prison. If prisoners were sent to Auschwitz to be murdered, why should the Germans provide hygiene, entertainment and exercise to them? Coles interview with Dr. Franciszek Piper, curator of the Auschwitz State Museum, is the focus of the video. Cole disputes the Holocausts existence because there is no proof, Ã¢â¬Å"theres no picture, plan or wartime document dealing with homicidal gas chambers or a plan to exterminate JewsÃ¢â¬ (Cole). He tries to provide a Ã¢â¬Å"perfectly normal explanationÃ¢â¬ for the materials and exhibits which define the Holocaust (Cole). Poison gas was used for disinfection, dead bodies were caused by a Typhus epidemic and discarded clothing came from naturally deceased prisoners. The interview with Dr. Piper is primarily concerned with the Auschwitz gas chamber. Cole questioned the function of this building because it had been changed since the end of the war. While Piper believed that four holes were drilled in the ceiling of this building for the purpose of killing prisoners, Cole believed that these holes were drilled after the camp was liberated by Soviet forces during the camps reconstruction. Cole points to aerial photographs as evidence of the new construction. Cole also cited the lack of Zyklon B residue in the chamber as proof that it was never used to kill humans. Cole then turned from the institution to the numbers. Traditionally, the Holocaust is stated to have killed eleven million Jews and non-Jews. These figures are based on Soviet claims made after the war which Cole does not accept. Cole compared it to American prison camps where, Ã¢â¬Å"anywhere from several hundred thousand to over two millionÃ¢â¬ Germans died (Cole). To him, this was e vidence that all camps of this era were
Wednesday, January 29, 2020
Consider the development Essay The word sonnet is the English translation of the Italian word sonetto, a little sound or song. A sonnet is a poem consisting of fourteen lines, ten syllables in English and Italian and generally twelve in French. There are three basic sonnet forms, the Petrarchan, which is an eight lined and a six lined (octave and sestet) sonnet with no rhyming couplet; the Spenserian, consisting of three quatrains and a couplet; finally the Shakespearian, consisting of three quatrains (four lines) and a couplet. There are different styles of sonnets all over the world. For example, France has its own unique structure that their sonneteers write in and the same with other countries. With all these different countries having different styles of writing that also means there are also different rhyming schemes. Reading sonnets is a great way of learning about different cultural aspects of life; for example during the seventeenth century the central theme of most sonnets was religion. During this time it gave people a great opportunity to learn about many different religions. The use of enjambment occurs in many sonnets. Enjambment is the running on of the thought from one line, couplet, or stanza to the next without a syntactical break The first sonneteer was Italian, his name was Francesco Petrarch. He was famous for a collection of Italian lyrics which include a long series of love poems. Petrarch wrote his poems about a lady called Laura, whom he met in a church. Laura became the central theme of his poetry. In total Petrarch wrote three hundred and sixty five sonnets. Petrarchs poems were meant to convey his love and devotion to the love of his life Laura. Sonnets moved to England in the sixteenth century. The seventeenth century saw the theme of sonnets change from love to religion. Donne is a good example of a sonneteer of religion. For two-hundred years a minute amount of sonnets were written. This was because they fell out of fashion. However during the nineteenth century sonneteers began to write about the theme of the natural world. William Wordsworth wrote poems such as Composed upon Westminster Bridge. War poetry became popular during the time of 1914-1918. This was because The First World War was happening at the time. War was on everybodys mind. The Poetry was read to the soldiers going off to war to motivate and encourage the soldiers to fight for their families and country. The poem Shall I Compare Thee written by William Shakespeare is about an unknown woman that Shakespeare compares to a summers day as summer is a picturesque time of year. The poem is written in the Shakespearian form. In the second line Shakespeare writes Thou art more lovely and more temperate This quotation informs the reader that although she cannot be compared to a summers day as she is more than the beauty of summer. Shakespeare writes Rough winds do shake the darling buds of Mai, this quotation is about the winds of summer; Shakespeare describes them as a type of rage. The woman could never be like summer as she is kind and caring. At the conclusion of the poem, (the rhyming couplet) Shakespeare writes So long as men can breathe or eyes can see, So long lives this, and this gives life to thee. This quotation informs the reader that she may die. However she will stay alive through the poem. The poem Composed Upon Westminster Bridge written in 1802 by William Wordsworth is about Wordsworth love of natural world and the city of London. The first line of the sonnet reads Earth has not anything to show more fair. In this quotation Wordsworth is sitting on Westminster Bridge looking across the beautiful city of London and is besotted with the picturesque view and feels the world has nothing to compare to it. William Wordsworth writes All bright and glittering in the smokeless air. This quotation informs the reader of the beautiful sunrise and how it glitters across the city. Wordsworth writes The river glideth at his own sweet will. This quotation means that the Thames has many bends on its path through the city of London and has not got a straight journey like other rivers. Wordsworth metaphorically states that the river glides freely. This sonnet is very popular and was voted 24th most popular poem in 1998. The mood of the sonnet is uplifting. The poem Death be not proud written by John Donne is about Donnes personal interpretation of death. John Donne does not fear death; he does not see it as a bad aspect in life. Donne writes Death, be not proud, though some have called thee mighty and dreadful, for thou art not so. This quotation informs the reader that some people may find death an awful, petrifying experience; however it is not, death is a new beginning. Donne writes Thourt slave to fate, chance, kings and desperate men, and dost with poison, war and sickness dwell. This quotation informs the reader that in life bad things will happen such as diseases and devastation. The mood of this poem is low key and dark. Donne writes One short sleep past, we wake eternally. This quotation informs the reader that after death our souls go to heaven and we awake eternally. John Donne was born in 1572 and died in 1631 at the age of 59. During Donnes lifetime this would have been considered an old age to die. There was a short life expectancy during this period because of all the disease and drug taking. The poem Peace written by Rupert Brooke is a war poem and it appealed to readers in the First World War as it informs them why their loved ones died in battle. Brooke was a very popular sonneteer as his poems would get the soldiers pumped up and ready for the gruesome activity that is war. Brooke encouraged people to be patriotic, to fight for their country and beliefs. Brook writes Leave the sick hearts that honour could move. This quotation conveys the fact that there are masses of casualties in a war just as there were in World War One. The sonnet The Vanity of his Passion written by Petrarch is addressed to his love, Laura. However he feels unreciprocated love. This could be for two reasons. Laura only exists in his mind or she is out of his league and could never fall in love with him. The sonnet is written in the first person; this is because Petrarch is expressing his love to Laura (There is a direct address to the lady). Petrarch uses many abstract nouns in his writing; he uses two in the title, vanity and passion. The reason for Petrarch using several abstract nouns is that it reflects the abstract nature of his love. Petrarch writes Throughout my song, by hopes and vain griefs bed; this quotation means that Petrarch recognises that he was vain ever to believe that she might ever love him. When Petrarch was younger he thought he was in love; he now realises what it means to be in passion drowned; Petrarch writes That worldly pleasure is a passing dream. This quotation informs that the love is short and cant last. His love is like a dream. The mood of the poem is very desolate as Petrarch wants something he is unable to achieve. In conclusion the central sonnet theme has not changed in hundreds of years, many are still written today. As time has progressed different forms have been introduced such as the Spenserian and the Shakespearian. My favourite sonnet is Shall I compare thee because Shakespeare uses many descriptive language associated with summer and his mysterious woman, this shows the depth of his love for her.
Tuesday, January 21, 2020
What is the function of Inspector Goole in J.B.PriestleyÃ¢â¬â¢s play, An Inspector Calls? An Inspector Calls was written in 1945 by John Boynton Priestley. The play was set in 1912 two years before the first world war so from this their would have been irony as the audience would know. The play is set in a dining room in the BirlingÃ¢â¬â¢s residence in Brumley, North Midlands which was a fictional industrial city. At the time the play was set the world was a very class conscience place with higher and lower class depending on one thing: money. The country was set up in two categories with the socialists which consists of the Political System in which ways of community and sharing are promoted and capitalists which is the political system which values private ownership and the individual. The country really was involved around capitalist values. For example there was no welfare state. In this essay I will be focusing on the main functions of the inspector. The inspectors role is a key to the plot and conclusion and delivers morals and principles and how the functions of the inspector get used in specific places throughout the play. The play opens with the Birling family and Gerald celebrating the engagement of Gerald and Sheila. It is dramatically effective because you get to see all the characters in one room therefore seeing their personalities, instead of them being introduced one-by-one. They are celebrating and at ease which means they are a little bit drunk. The mood is very relaxed and everyone having a nice time. From the stage directions it says the mood is Ã¢â¬Å"pink and intimateÃ¢â¬ . We learn from Mr.Birling that he is selfish and a capitalist from his speech. He sums himself up within the opening of the play saying Ã¢â¬Å"that a man has to mind his own business and look after himself and his own-and-Ã¢â¬ (act one page 11) this indicates that he is a selfish man and cares for his family only (Mr.Birling is a capitalist). The mood is soon to change from relaxed and chilled to harsh when the inspector arrives. At the last word of Mr. Birlings speech the door bell rings at the right time to create tension, the doorbell ring was purposely put their to create tension and to stop Birling preaching about capitalist views. Its clever even how one word Ã¢â¬Å"andÃ¢â¬ can be such a tensional word as the door bell rings. In the stage directions Ã¢â¬Å"the lighting should be pink and intimate until the inspector arrives, and then it should be brighter and harderÃ¢â¬ it changes to as if all the characters were being
Monday, January 13, 2020
The Jacksonian Period (1824-1848) had been celebrated as the era of the Ã¢â¬Å"common man. Ã¢â¬ To what extent did the period live up to its characterization? Consider two of the following in your response: Economic development, politics, and reform movements. The Jacksonian period, nicknamed the era of the Ã¢â¬Å"common man,Ã¢â¬ lived up to its characterization. President Andrew Jackson influenced the life of the common man forever. He brought politics to the common man by expanding voting rights, once a topic only discussed by the wealth elite.He partook in movements that reformed the nation, and bettered life for American citizens. Also, Jackson developed the economy in such a way that he gave reassurance to the common man, that he was economically safe; during this time, many Americans did not feel that they were in a state of economic stability, but Jackson gave them their piece of mind. This time period was a turning point in the history of America because Andrew Jackson recognized the nationÃ¢â¬â¢s problems, addressed the issues of the common man, and bettered the lives of most, if not all Americans.Jeffersonian Democracy was a new view brought to American politics during the early 19th century. American voting was revolutionized because direct voting methods, such as voting by voice were eliminated, and replaced by indirect voting methods, such as ballots. During this transformation, voter participation skyrocketed. By 1840, nearly 80 percent of adult white males journeyed to the polls. Voting popularity increased when property qualifications for voting and office holding were abolished.Under the new constitution, adopted in 1821, all adult white males were allowed to vote as long as they paid their taxes or had served their country. Years later, taxpaying qualifications were eliminated creating universal manhood suffrage for the first time, in America (http://w ww. digitalhistory. uh. edu/database/article_display. cfm? HHID=633). Although unive rsal white manhood suffrage was finally a reality, women and African Americans were still constrained from voting. Although, women and African Americans still could not vote, there was a huge change in politics.There was an increase in the interest in presidential elections; for the first time in American history, the election of 1828 was the focus of the public attention. All candidates, including Jackson, attempted to gain the support of the public by addressing common issues. Now, all governing bodies had become more responsive to public opinions, and individual Americans were getting the opportunity to voice their opinion in American politics. Before, during, and after his presidency, President Andrew Jackson partook in reform movements that bettered the American nation and the life of the common man.First off, Jackson attempted to deplete the national debt, through reforms. He ended the Federal Reserve, being the Second National Bank of the United States. When the bank asked co ngress for a renewal bill, Jackson vetoed this legislation. Jackson removed deposits from the national bank, and placed them in state banks. Andrew Jackson was the last American president to attempt to rid America of debt, through a series of reforms (http://www. examiner. com/la-county-nonpartisan-in-los-angeles/top-10-americans-for-monetary-reform-3-president-andrew-jackson).During his presidency, Jackson also strived for educational reforms. Although Jackson had little formal education himself, he saw the importance of educational reform in such ways to create taxes to support public schooling. During the age of Jackson, adults had the opportunity to achieve a higher education, and it was becoming mandatory for children to receive a formal education. Lastly, during this era, there were a series of movements that attempted to perfect the human condition through Ã¢â¬Å"cleans society of moral evils. During this time period, the Temperance Movement and the Mormon Movement created a new sense of community and an impersonal society (http://www. ethanlewis. org/history/downloads/guides/Ch12. pdf). There is no question that JacksonÃ¢â¬â¢s term was as a reform president; reforms to all aspects of modern society bettered the lives of the American people. When Jackson took office, one of the leading issues in congress concerned economic development policies.Andrew Jackson backed the system of protective tariffs, which fostered domestic industry along with federal subsidies for transportation projects. Jackson supported this American system, and saw that it was a way of securing economic independence and improving the countryÃ¢â¬â¢s strength (http://millercenter. org/academic/americanpresident/jackson /essays/biography/4). Jackson also ended the cycle of land speculation, in Eastern states, by relocating the Native Americans off of Eastern land. From this, new land opened up to Americans, who now had areas to expand.
Sunday, January 5, 2020
Diffusion is the movement of atoms, ions, or molecules from an area of higher concentration to one of lower concentration. The transport of matter continues until equilibrium is reached and there is a uniform concentration through the material. Examples of Diffusion Perfume is sprayed in one part of a room, yet soon it diffuses so that you can smell it everywhere.A drop of food coloring diffuses throughout the water in a glass so that, eventually, the entire glass will be colored.When steeping a cup of tea, molecules from the tea cross from the tea bag and diffuse throughout the cup of water.When shaking salt into water,Ã the salt dissolves and the ions move until they are evenly distributed.After lighting a cigarette, the smoke spreads to all parts of a room.After placing a drop of food coloring onto a square of gelatin, the color will spread to a lighter color throughout the block.Carbon dioxide bubbles diffuse from an open soda, leaving it flat.If you place a wilted celery stick in water, water will diffuse into the plant, making it firm again.Water diffuses into cooking noodles, making them bigger and softer.A helium balloon deflates a little bit every day as helium diffuses through the balloon into the air.If you place a sugar cube in wat er, the sugar will dissolve and evenly sweeten the water without having to stir it.