Thursday, December 26, 2019

An Explanation of Buffering in C++

Buffer is a generic term  that refers to a block of computer memory that serves as a temporary placeholder. You might encounter the term in your computer, which uses RAM as a buffer, or in video streaming where a section of the movie you are streaming downloads to your device to stay ahead of your viewing. Computer programmers use buffers as well. Data Buffers in Programming In computer programming, data can be placed  in a software buffer before it is processed. Because writing data to a buffer is much faster than a direct operation, using a buffer while programming in C and C makes a lot of sense and speeds up the calculation process. Buffers come in handy when a difference exists between the rate data is received and the rate it is processed.   Buffer vs. Cache A buffer is temporary storage of data that is on its way to other media or storage of data that can be modified non-sequentially before it is read sequentially. It attempts to reduce the difference between input speed and output speed. A cache also acts as a buffer, but it stores  data that  is expected to be read several times to reduce the need to access slower storage.   How to Create a Buffer in C++ Usually, when you open a file, a buffer is created. When you close the file, the buffer is flushed. When working in C, you can create a buffer by allocating  memory in this manner: char* buffer new char[length]; When you want to free up the memory allocated to a buffer, you do so like this: delete[ ] buffer; Note: If your system is low on memory, the benefits of buffering suffer. At this point, you have to find a balance between the size of a buffer and the available memory of your computer.

Wednesday, December 18, 2019

American Foreign Policy During World War II - 1909 Words

Between the end of the First World War and the start of World War II, American foreign policy gradually changed and evolved in order to fit the beliefs of the country as a whole and adapt to new international situations. World War I had not been particularly well received by the American public, with the vast majority of the people condemning U.S. involvement; they believed that the war had only hurt them and that the glorious country of America should no longer get involved in foreign wars and affairs. In essence, America was disillusioned by the experience of World War I, and such disillusionment would have a tremendous influence on how the U.S dealt with foreign events and incidents for decades to come. It cannot be stressed enough how stubborn the general public was in maintaining isolation after the end of the first World War. The diplomatic failures regarding the League of Nations and recovery had sullied the experience for the American people, and they were content to retreat into their domestic shell, desperately trying to be blissfully unaware of the events going around them all over the world. A speech by Warren G. Harding in October of 1920 reflected the general American attitude at the time; in it, he lambasted the League of Nations and criticized the fact that it was a blow at America’s constitutional integrity (Doc A). Harding, like the rest of the American people, had turned his back on the world. Fortunately, this mentality would not last; as World War IIShow MoreRelatedAmerican Foreign Policy During World War II1565 Words   |  7 PagesAmerican foreign policy shifted drastically from the birth of the new nation to the beginning of the 20th century. George Washington’s Farewell Address in 1796 left an admonition for the nation and isolationist roots from its founding President; however, by the early 1900s, William McKinley and other American Presidents took part in imperialistic foreign policy that represented a complete digressi on from Washington’s doctrine. After World War I and before the impending Second World War, AmericanRead MoreKorean War : The Cold War1598 Words   |  7 Pagesthat had already seen two appallingly destructive and costly World wars, just as the Cold War between the Soviet Union and the United States broke due to their ideological differences after World War II, in the midst of the Cold War was the Korean War. The Korean War began on June 25, 1950 when the North Korean People’s Army poured across the 38th parallel, a border between South and North Korea, to attack South Korea. The size of the war quickly grew as it began to involve countries like China, SovietRead MoreEssay on Consequences of the World War II1306 Words   |  6 PagesIn the World War I individual rights and civil liberty have died. The wartime controls had replaced the free enterprise, exchange controls and import-export regulations had replaced the free trade. The inflation had undermined the sanctit y of property. The war had shrunk the rights of individuals and enhanced the power of the State. The politicizing of economic and social life means that every dispute and every disagreement were now become the matter of national interest. This rivalry had startedRead MoreAmerica, An Ever Changing World Superpower1504 Words   |  7 PagesAmerica, an Ever-Changing World Superpower America has been viewed in a wide variety of ways on the global stage. From the Progressive Era to containment, the view of the United States as a world power has changed dramatically. The country went through a large process of adopting an isolationist policy during the Progressive Era. This isolationist view was also present pre and post-World War I. After the bombing of Pearl Harbor, America took a bold stance and using its industrial power pushed itselfRead MoreComparative Critique of Kennans American Diplomacy and Williams the Tragedy of American Diplomacy1279 Words   |  6 Pagesunderstanding of American diplomatic history during the period of 1900-1950. Kennans book, American Diplomacy, offers a sharp critique with its focus on American mistakes, specifically examining the absence of direction in American foreign policy and with the end result of American strength and insecurity at the start of the Cold War. Williams, in his book The Tragedy of American Diplomacy, pursues a different but still critical perspective by asserting that American policy was largely motivatedRead MoreAmerican Foreign Policy After The Great Depression1390 Words   |  6 Pagesparadigm of American foreign policy completely shifted from the Isolationism to Interventionism for valid reasons. First the economic and socially challenging home front crisis of the Great Depression kept American citizens and politicians busy with domestic policy. Additionally the disillusionment of people with WWI caused America to avoid war at all costs. However, the rising threat of fascism in Europe forced America to defend democracy and help its allies. The first shift was seen when foreign policyRead MoreThe Truman Doctrine1364 Words   |  6 PagesDevelopment of American Foreign Policy during the Cold War On March 12, 1947, President Harry S. Truman defined United States foreign policy in the context of its new role as a world superpower. Many historians consider his speech to Congress as the words that officially started the Cold War. The Truman Doctrine was a major break from U.S. historical trends of isolationist foreign policy. His speech led to the Cold War policy of containment. Moreover, it served as a precedent for future U.S. policy of interventionismRead MoreThe Trends Of Foreign Policy And National Security1653 Words   |  7 PagesAmerican foreign policy has gradually changed since the birth of our nation. On July 4, 1891, John Quincy Adams addressed the Senate and House of Representatives during a powerful Independence Day speech designed to prevent an alliance with the Greeks against the Ottoman Empire. Although sympathetic to their cause, he warned against involving America in other states’ affairs, stating,† America does not go abroad in search of monst ers to destroy. She is the well-wisher to Freedom and independenceRead MoreAs Senator Arthur Vandenberg Famously Stated In 1947, â€Å"We1579 Words   |  7 Pagesthe water’s edge.† Vandenberg’s declaration suggests that domestic policy differences should not affect how the United States conducts itself abroad. This notion is especially relevant in understanding the discrepancies – or lack thereof – between foreign and domestic policy in the modern United States. Since its founding, the United States has prided itself on its exceptionalism, with many of its leaders endorsing a â€Å"foreign policy driven more by domestic values than by the vagaries of internationalRead MoreThe Articles Of Confederation And The Constitution1130 Words   |  5 Pages After America won its independence from Great Britain in 1783, the Articles of Confederation were created to serve as the basis of American democracy. Years subsequent to the creation of the Articles of Confederation, delegates from all states, with the exception of Rhode Island, assembled in Philadelphia, Pennsylvania to mend the weaknesses the Articles displayed throughout its practice. This meeting on September 17, 1787, resulted in the newly drafted terms for which the United States democracy

Monday, December 9, 2019

Critical Response free essay sample

A Farewell to Arms a Critical Response BY sate92 What can be more excruciatingly painful than knowing that you are about to lose a loved one, and yet can be but a spectator to the closure? How helpless does one feel, attempting to reclaim that stolen treasure? Yet one clings on to desperate hope. One last plea. One last prayer. Dont let her die. Oh God, please dont let her die. The extract from Ernest Hemingways A Farewell to Arms deals with the plight of a husband dreading his wifes verdict. His wife has delivered a stillborn child, and is ighting for her own life. The protagonist is distressed and escapes to a caf © to pacify his frets. His anxiety has numbed him so, that he begins to take notice of inconsequential details of the order of things. The author has employed a very unique way to bring out the protagonists state of mind. We will write a custom essay sample on Critical Response or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page The sentences are terse and specific and irrelevant to the situation. It conveys how disoriented he is. He seems to talk about the random, abstract objects and on-goings Just because they happen to be present and not with any purpose. Emotionally, he is preoccupied with concerns about his wifes health and thus he narrates his observations in a detached and matter of fact way. His experience of premonitions and intuitions has been subtly brought in through the lines Suddenly I knew I had to get back and Something dropped inside me. I admire the manner in which the text shows the building emotions of the husband and gradually reveals the aspects of his personality. Even before he has heard of her haemorrhage, he is in a whirl, thus showing he is an on he edge person. He comes across as a man, deeply devoted to his wife. She seems to be the centre of his universe, as he passes off the death of their child as tolerable in comparison to losing her. Although he has realised that her death is inevitable, he frantically prays to God to save her. He repeatedly begs for her life. It shows his desperation and need to have her back with him. With every repetition, the impact becomes progressively emphatic, until it tears your heart and his tears become your Critical response free essay sample 1. If Fred were a Utilitarian, what would he do? Utilitarianism is a consequentialist theory where right and wrong depends on the consequences of one’s actions for everyone who might be affected by them. In other words, utilitarian individuals are trying to bring the best system to the society than any other system. Sometimes utilitarianism is summarized as the maximum well-being for the maximum number. We know that life is full with situations that are difficult to solve without damage to anyone and it is the case of Fred. As we read, Fred is a worker of Greyarea Inc. , a company that produces cigarettes. For the protection of the company, Fred has signed a confidentiality agreement that unable him to leak out any kind of information to the public that could affect the company’s benefits. Greyarea Inc. could sue Fred if he decides to tell the public that the cigarettes are harmful as he found in his research. We will write a custom essay sample on Critical response or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page If Fred decides to tell the truth about the cigarettes real effects, it does not make sense that he would be right or wrong. But focusing in that Fred is utilitarian, he would want to tell the public the real consequences of Greyarea Inc. cigarettes and what could happen if they continue buying those cigarettes. But he could not ignore that his decision could affect his own economic stability and also his family and his career. As I mentioned before, Fred’s moral beliefs would tell him that he best state of things is that in which the sum of what is valuable is as high as possible and so much more important than himself and the consequences of them. 2. If Fred were a Deontologist (Kant), what would he do? Deontologist refers to an ordered set of duties and moral obligations of the professionals of a certain subject. People have an obligation and are forced to their duty.  Also, people need to act from their duty if they want to act morally in the right way. Kant argued that we do not need to think or to know the possible consequences of our action, but we need to know what made those actions right or wrong. Everybody has duty to do something without importance if the person wants to do it or not. In the case gave us in class about Fred, he would do the opposite action of what he could do as a utilitarian. As we mentioned in the previous question, he could not do the best alternative for the welfare of the society that is to inform them about the consequences of Greyarea Inc.  cigarettes. As a Deontologist, Fred would follow his duty and moral obligations and respect what he decided to follow in the agreement that he signed. This situation is viewed positively by the company, which will not be affected in their negotiations. Fred believes that the right thing is to do not break his confidentially agreement that he signed and follow his duty and not produce any issue by keeping quiet. Doing this Fred would then continue doing his obligations at his job receiving a salary and benefits from the company. Also, he will continue supporting his family economically.

Monday, December 2, 2019

Should Capital Punishment to Be Abolished or Not free essay sample

An eye for an eye would make the whole world blind. Mahatma Gandhi. This is a famous quote that many people cite when they pitch for the abolishment of capital punishment (death penalty) from the judicial process. The lengthy list of the terms which are not quite acceptable in a democracy begins with terms like capital punishment and death penalty. That, however, doesnt mean that this form of punishment is not acceptable in a democracy. In fact, two of the largest democracies in the world India and the United States of America, both have the provision for capital punishment as a part of their legal system. Indeed, the decision that capital punishment may be the appropriate sanction in extreme cases is an expression of the communitys belief that certain crimes are themselves so grievous an affront to humanity that the only adequate response may be the penalty of death. We will write a custom essay sample on Should Capital Punishment to Be Abolished or Not or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page Capital punishment is a barbarous survival from a less enlightened and refined age; it is incongruous and incompatible with our present standard of civilization and humanity. It has been abolished by many states and countries, and we must look forward to the day when the other governments will follow suit Capital punishment, also known as Death penalty, is essentially the execution of an individual as punishment for offense by a state. The crimes which can lead to capital punishment are called capital crimes or capital offenses. Earlier, the killing of criminals and political opponents was prevalent in almost every civilization. With the time, nearly all European and several Pacific Area states (counting Australia, New Zealand and Timor Leste), and Canada have abolished death penalty. The majority of states in Latin America have absolutely abolished capital punishment, however, a few countries, like Brazil, use death penalty only in special situations, for example, treachery committed during wartime. There are still quite a few states and countries that retain the use of capital punishment, including the United States (the federal government and 36 of its states), Guatemala, majority of the Caribbean, Japan, India, and Africa (Botswana and Zambia). In almost all retentionist countries, capital punishment is granted as a penalty for planned murder, espionage, treachery, or as part of military justice. Recently, the case of Mohammad Afzal, a terrorist who was found guilty of instigating the attack on the Indian Parliament House, has cropped up the controversy regarding the Indian law of capital punishment. Right to Life Capital Punishment in India In India, capital punishment is granted for different crimes, counting murder, initiating a child’s suicide, instigating war against the government, acts of terrorism, or a second evidence for drug trafficking. Death penalty is officially permitted though it is to be used in the ‘rarest of rare’ cases as per the judgement of Supreme Court of India. Amongst the retentionist countries around the world, India has the lowest execution rate with just 55 people executed since independence in 1947. Since the condition of the ‘rarest of rare’ is not exactly defined, sometimes even less horrific murders have been awarded capital punishment owing to poor justification by lawyers. Since 1992, there are about 40 mercy petitions pending before the president. The proposals for abolition of death sentence for petty offences was brought about but there was a lot of hue and cry from lawyers , judges and parliamentarians and the so called protectors of social order. Six times the House of Commons passed the bill and six times the House of Lords rejected the same. With the passage of time, the voice for abolition of death penalty grew stronger over the world especially in Britain. However, in spite of opposition, the bill was passed and the number of cases in which capital punishment was awarded was reduced year after year and death penalty was reserved for offences like murder and treason. Currently, in the world 133 countries have abolished capital punishment dejure or defacto. 64 countries have retained it. Bangladesh is one of them. (source: Amnesty International Website) In UK , death penalty was abolished in 1965 except for offences of treason and certain forms of piracy and offences committed by members of the Armed Forces during wartime. In India , the recent trend is clearly towards the abolition of death sentence. Before the amendment of Criminal Procedure Code in 1955, it was obligatory for a court to give reasons for not awarding death sentence in case of murder. Under the Criminal Procedure Code, 1973, the court has to record reasons for awarding death sentence. A compassionate alternative of life imprisonment is gaining judicial ground in India . In a leading case of Bachan Sing v. State of Punjab(1980) 2 SCC 684,the Supreme Court held by a majority of four to one that the provisions of death sentence as an alternative punishment for murder in section 302 of Penal Code was not unreasonable and was in the public interest. The dissenting view of Justice Bhagwati was that instead of death sentence, the sentence of life imprisonment should be imposed. He put emphasis on barbarity and cruelty involved in death sentence. It is irrevocable and cannot be recalled. It extinguishes the flame of life for ever. It is destructive of the right to life which is the most precious right of all, a right without which enjoyment of no other right is possible. Justice Bhagwati rejects the view that death penalty acts as a deterrent against potential murderers. According to him, this view is a myth which has been carefully nurtured by a society which is actuated not so much by logic or reason as by a sense of retribution. Conclusion It has been pledged in the preamble of the republics constitution that equality and justice will be secured for all citizens. The liberation heroes had dedicated their lives with a view to establishing a welfare state in which fundamental human rights and freedoms and respect for the dignity and worth of the human person shall be guaranteed. Protection against cruel, inhuman, or degrading punishment is a fundamental right under art. 35 (4) of the constitution. So time has come to reconsider death sentence as a means of punishment. The worlds trend is precisely towards the correction of the offenders in lieu of inflicting cruel, inhuman and degrading punishment. Bangladesh as a democratic country cannot lag behind. The state is undergoing cumulative increase of crimes owing to a great deal of factors such as lack of good governance, absence of rule of law, corruption, patronisation of terrorists, wide gap between the haves and have-nots, confrontational politics and so on. Instead of giving emphasis on removing these factors, we are wrongly attempting to check crimes by inflicting exemplary punishment. What is a rarest of rare case? In the Bachan Singh judgment of 1980, the Supreme Court ruled that the death penalty should be used only in the rarest of rare cases. More than a quarter of a century later, it is clear that through the failure of the courts and the State authorities to apply consistently the procedures laid down by law and by that judgment, the Courts strictures remain unfulfilled. In a judgment delivered in December 2006, a Supreme Court bench admitted the Courts failure to evolve a sentencing policy in capital cases (Aloke Nath Dutta and ors. . State of West Bengal (MANU/SC/8774/2006)). The bench examined judgments over the past two decades in which the Supreme Court adjudicated upon whether a case was one of the rarest of the rare or not and concluded: What would constitute a rarest of rare case must be determined in the fact situation obtaining in each case [sic]. We have also noticed hereinbefore that different criteria have been adopted by different benches of th is Court, although the offences are similar in nature. Because the case involved offences under the same provision, the same by itself may not be a ground to lay down any uniform criteria for awarding a death penalty or a lesser penalty as several factors therefore are required to be taken into consideration. The frustration of the Court was evident when it stated: No sentencing policy in clear cut terms has been evolved by the Supreme Court. What should we do? In that particular ruling, the Court commuted the appellants death sentence. On the same day, however, another bench of the Supreme Court upheld the death sentence imposed on an appellant who had convicted of murdering his wife and four children (Bablu @ Mubarik Hussain v. State of Rajasthan (AIR 2007 SC 697)). After referring to the importance of reformation and rehabilitation of offenders as among the foremost objectives of the administration of criminal justice in the country, the judgment merely referred to the appellants declaration of the murders as evidence of his lack of remorse. There was no discussion of the specific situation of the appellant, the motive for the killings or the possibility of reform in his case. Death Penalty Statistics A look at the death penalty statistics of the world reveals that around 90 percent of the countries have already abolished the death penalty. These countries include Portugal, Venezuela, France, Canada, etc. This, however, hasnt turned out to be as fruitful as expected, because some of the major countries in the world, including China, India and the United States, still ontinue the use of death penalty execution as a part of their legal system. Statistics also reveal that approximately 80 percent of the death penalty executions the world over, come from the Asian countries, with China at the forefront with the highest execution rate in the world. In fact, the number of executions in China alone in 2008 was double the number of executions in the rest of the world combined for that year. CONSTITUTIONALITY OF DEATH PENALTY IN INDIA Imposing of death sentence is one thing that always gets more attention to be discussed, including from the view of constitutional validity in each countries. A serious discussion regarding to death sentence in Indonesia, whether it should be continued or abolished, has come up before the Court after some applicant applied a petition to Indonesian Constitutional Court in order to challenge the constitutionality of death penalty in Drugs and Narcotic Act against the provision of Rights to Life on Indonesian Constitution, 1945. This article is the first chapter of several other chapters with the topic of â€Å"death penalty† which will be flattened on the following days. *** The provision of death penalty as an alternative punishment for murder under s. 302, IPC[1] was challenged as constitutionally invalid being violate of Arts. 14,[2] 19[3] and 21[4] of the Constitution in a series of cases. It was contended in Jagmohan Singh v. State of U. P. [5] that the constitutional validity of death sentence has to be tested with reference to Arts. 14 and 19 besides Art. 1 of the Constitution as the right to life is fundamental to the enjoyment of all these freedoms as contained in Art. 19 of the Constitution. It was further contended that the Code of Criminal Procedure prescribed the procedure of finding guilt of an accused but regarding the sentence to be awarded under s. 302, IPC the unguided and uncontrolled discretion has been left to the Judge to decide the sentence to be awarded. The Supreme Court held that the death sentence as an alternative punishment under s. 302, IPC s not unreasonable and it is in the public interest and the procedural safeguard provided to the accused under the Code of Criminal Procedure is not unreasonable leaving the discretion with the judge to sentence an accused, convicted for murder either to death or life imprisonment Death sentence as an alternative punishment for life was held valid. Though the court did not accept the contention that the validity of the sentence to death has to be tested in the light of Arts. 14 and 10 of the Constitution. But in Rajendra Prasad v. State of U. P. 6] the court accepted the proposition that the validity of the death sentence can be tested with reference to Arts. 14, 19 and 21 of the Constitution. The Supreme Court suggested that in exceptional circumstances death sentence should be imposed only when public interest, social defence and public order would warrant. Such extreme penalty should be imposed in extreme cir cumstances. The court in Barchan Singh v. State of Punjab[7] upheld that constitutional validity of death sentence. The court reasoned that penal law does not attract Art. 19(1) of the Constitution. If the impact of the law on nay of the rights under Art. 19(1) is merely incidental, indirect, remote or collateral, Art. 19 would not be available for testing its validity. Accordingly, the court held that s. 302, IPC for its validity would not require to qualify the test of Art. 19. The procedure provided in the Code of Criminal Procedure for imposing capital punishment for murder cannot be said to be unfair, unreasonable and unjust. But Justice Bhagwati in his dissenting judgment held that s. 302, IPC and s. 354(3), Cr PC violation of Arts. 4 and 21 as these provisions confers unguided power on the court which irrational and arbitrary. Thus, death sentence should be imposed in the rarest of the rare case. The Supreme Court in Machhi Sing v State of Punjab[8] laid down the broad outlines of the circumstances when death sentence should be imposed. It should be considered whether there is something uncommon about the crime and the compelling circumstances for imposing death sentence after giving maximum weight age of the mitigating circumstances which is favour of the accused. Jumman Kahn was facing the gallows on being sentenced to death for having brutally raped and strangulated to death a six year old girl named Sakina. The convict challenged the death sentence and its constitutionality. [9] It was argued that death penalty is not only outmoded, unreasonable, cruel and unusual punishment but also defies the dignity of the individual and the issue needs reconsideration which stands like sentinel over human misery, degradation and oppression. The Supreme Court while endorsing its earlier view as to the constitutionality of death sentence held that the failure to impose death sentence is such grave cases here it is a crime against the society, particularly in case of murders with extreme brutality will bring to naught the sentence of death penalty provided by s. 302 of IPC. The only punishment which the convict deserves for having committed the reprehensible and gruesome murder of the innocent child to satisfy his lust is nothing but death as a measure of social necessity and also a means of deterring other potential offenders. The Supreme Court in earlier case Banchan Singh v. State Punjab[10] upheld the constitutional validity of imposition of death sentence as an alternative to life imprisonment and it was further that it is not violate of Arts. 14 and 21 of the Constitution. Chief Justice Chandrachud expressing the view of the three Judges of the Supreme Court in Sher Singh v State of Punjab[11] held that death sentence is constitutionally valid and permissible within the constrains of the rule in Bachan Singh (supra). This has to be accepted as the law of the land. The decisions rendered by this court after full debate has to be accepted without mental reservation until they are set aside. The challenge touching the constitutionality of the death sentence also surfaced in Triveniben v State of Gujarat[12] and in Allauddin’s case[13] and the Supreme Court asserted affirmatively that the Constitution does not prohibit the death penalty. It is in the rare cases, the legislature in its wisdom, considered it necessary impose the extreme punishment of death to deter others and to protect the society. The choice of sentence is left with the rider that the judge may visit the convict with extreme punishment provided there exist special reasons for doing so.