Friday, May 22, 2020

Comments for Ruby Code (Usage, Single, and Multi-Line)

Comments in your Ruby code are notes and annotations meant to be read by other programmers. The comments themselves are ignored by the Ruby interpreter, so the text inside the comments isnt subject to any restrictions. Its usually good form to put comments before classes and methods as well any piece of code that may be complex or unclear. Using Comments Effectively Comments should be used to give background information or annotate difficult code. Notes that simply say what the next line of straightforward code does are not only obvious but also add clutter to the file. Its important to take care not to use too many comments and to be sure the comments made in the file are meaningful and helpful to other programmers. The Shebang Youll notice that all Ruby programs start with a comment that begins with #!. This is called a shebang and is used on Linux, Unix and OS X systems. When you execute a Ruby script, the shell (such as bash on Linux or OS X) will look for a shebang at the first line of the file. The shell will then use the shebang to find the Ruby interpreter and run the script. The preferred Ruby shebang is #!/usr/bin/env ruby, though you may also see #!/usr/bin/ruby or #!/usr/local/bin/ruby. Single-Line Comments The Ruby single-line comment begins with the # character and ends at the end of the line. Any characters from the # character to the end of the line are completely ignored by the Ruby interpreter. The # character doesnt necessarily have to occur at the beginning of  the line; it can occur anywhere. The following example illustrates a few uses of comments. #!/usr/bin/env ruby # This line is ignored by the Ruby interpreter # This method prints the sum of its arguments def sum(a,b)   Ã‚  puts ab end sum(10,20) # Print the sum of 10 and 20 Multi-Line Comments Though often forgotten by many Ruby programmers, Ruby does have multi-line comments. A multi-line comment begins with the begin token and ends with the end token. These tokens should start at the beginning of the line and be the only thing on the line. Anything between these two tokens is ignored by the Ruby interpreter. #!/usr/bin/env ruby begin Between begin and end, any number of lines may be written. All of these lines are ignored by the Ruby interpreter. end puts Hello world! In this example, the code would execute as Hello world!

Friday, May 8, 2020

Mental Disabilities And The Death Penalty - 1259 Words

Mental Disabilities and the Death Penalty Image a life where you have difficulty defending yourself and nobody can clearly understand you. Now visualize trying to convince others that you are innocent of a crime. Since the early 80s, more than sixty mentally ill criminals have been executed the US (Mental Illness on Death Row). This paper will discuss the relationship between the law and the challenges faced by mentally criminals from tries to appeals and execution. It provides examples of some of the more famous cases of the execution of the mentally ill and describes current legislative. But we would try answer the whether the mentally disabled criminals should be charged with a death penalty. Throughout this paper, we will use Borromeo s definition of someone with mental issues. He stated mental retardation is a lifelong condition of impaired or incomplete mental development... ( Borromeo 178). Some examples of these illnesses include but are not limited to major depression, bipolar disorder, post traumatic stress disorde r and borderline personality disorder . Since 1976, all capital trials in the US are divided into two phases. The first phase is when they question is whether the defendant is innocent or not. If the defendant is found guilty then he or she is eligible for the death penalty. In the second phase of the trial the jury will decide whether to recommend a life sentence or a death sentence for the defendant. These phases include interrogation, mitigation,Show MoreRelatedA Study On Death Row Inmates Essay1722 Words   |  7 Pagespsychiatrist at New York University, Dr. Lewis, has conducted a study on death-row inmates, how their brains work and what affect the damage had on their conviction. By doing so Dr. Lewis paved the way for other researchers, such as Kent Kiehl and Jonathan H. Pincus to study the brains of violent criminals looking for a answer as to whether or not these criminals should be incarcerated. Over time research has been conducted focusing on mental illnesses and brain damage as the cause of violent acts inste adRead MoreThe Court For Hear Death Penalty Cases897 Words   |  4 Pagesarticle, â€Å"Supreme Court to Hear Death Penalty Cases,† in The New York Times; Adam Liptak talks about two different death penalty cases to be heard in October 2016. Case number 15-8049, Buck v. Stephens, is to be heard over whether or not race should one of the factors associated with future dangerousness. Buck, an African American male, was convicted for killing his former girlfriend and her friend, in front of her children. Buck is being sentenced for the death penalty because Texas law allows thatRead MoreThe Death Penalty Laws Date1505 Words   |  7 Pagesestablished death penalty laws date as far back as the Eighteenth Century B.C. in the Code of King Hammurabi of Babylon, which codified the death penalty for 25 different crimes (History of the Death Penalty 1). Executions back then relied on more torturous methods without regard to the executed. As the use of the Death Penalty was issued out, its popularity spread throughout the neighboring countries and has become more refined for modern use. In June of 2004, â€Å"New York’s death penalty law was declaredRead MoreThe Death Penalty Is Not A Moral Form Of Society906 Words   |  4 Pagesmurderers by doing the exact thing that they were convicted for? Today, in the United States, the death penalty is an inalienable part of society and its legal system that many are in favor of, but one that many are also strongly against. The death penalty is hypocritical, is not a deterrent, is much more costly than life in prison and is sometimes a wrongful conviction. The death penalty is not a moral form of the justice this nation is built around. Everyone makes mistakes, although someRead MoreThe Effects Of Capital Punishment On Society1516 Words   |  7 Pagesthat were punishable by death in its infancy in America ranged from stealing fruit to murder. Capital punishment met its turning point from a simple punishment of all crimes to only extremely violent crimes in the mid nineteenth century (â€Å"Part I: History of†, 2014). Capital punishment has had a turbulent history, filled with multiple question as to what crimes should be punishable by death. Many articles have been written on how certain crimes can be deemed punishable by death. It is questionable whetherRead MoreThe Death Penalty Was The Babylonian King Hammurabi1539 Words   |  7 PagesName: Victoria Ming Topic: The Death Penalty I. Intro/Background A. History: 1. An early supporter of the death penalty was the Babylonian King Hammurabi. In his set of laws, he set the legal punishment â€Å"an eye for an eye†. This popular phrase was used to punish criminals with death for 25 crimes, although murder was not one of them. 2. By the 10th Century BC, hanging, drowning, boiling, and burning, were added as ways for punishing simple crimes, or even for actions that today would not be consideredRead MoreThe Death Penalty Is An Act Of Justice1217 Words   |  5 PagesSince the Supreme Court ruled in favor of the death penalty in 1976, there have been 1,434 executions in the United States (Death Penalty Information Center). Today, a debate quickly erupts when discussing the death penalty as a form of punishment in America’s Criminal Justice system. Some perceive the Death Penalty as an act of justice, while others believe it is unconstitutional. There are currently 31 death penalty states and 19 non-death penalty states in the U.S. Although opponents view thisRead MoreArgumentative Essay On The Death Penalty989 Words   |  4 Pagescommonly known as the Death Penalty. The Death Penalty is killing someone as a punishment for a crime through legal terms. In 2014, six hundred thirty-four people that are 18 years and older out of one thousand seventeen people were in favor of the death penalty (Gallup). We use this punishment to serve justice for the life of the victim that has been taken. I am in favor of the death penalty and it should be issued in all states for people who commit heinous crimes. The death penalty is constitutionalRead MoreThe Death Penalty Is An Effective Deterrent1359 Words   |  6 PagesOn the other hand, the anti-death penalty arguments claim that the death penalty is oppressive toward lower class and people of color, wasting the limited resources, and it often hurt innocent people. American Civil Liberties Union (ACLU) stated that the death penalty is not an effective deterrent because it is not applied consistently, as there is only a small fraction of first-degree murders who received death sentence, and even then they do not represent the worst cases of murders. Most of theRead MoreCapital Punishment Is Not A Better Than Life Imprisonment1400 Words    |  6 Pagesguidelines for what is punishable by death, but mostly murder or other capital offenses are what is punished. Capital punishment is not a better answer than life imprisonment. Capital punishment is wrong because there is a possibility of killing an innocent or mentally ill person, there is no evidence that it is deters crime, the cost is extremely expensive, and there is inconsistency in choosing a punishment for crime. Many people have been sentenced to death for a crime they did not commit. Innocent

Wednesday, May 6, 2020

India Water Pollution Free Essays

What  is  India  Doing  to  Control  Water  Pollution   Caused  by  Sewage  Waste? Studies  found  that  sewage  waste  is  the  main  cause  of  water  pollution  in  India. The  problem  is caused  by  the  poor  treatment  of  dumping  sewage  and  the  failure  to  maintain  sewage  treatment  plants. The  Central  Pollution  Control  Board,  a  company  that  monitors  environmental  issues  in  India,  has created  the  National  Water  Quality  Monitoring  Network,  which  monitors  the  quality  of  waters  all  year. We will write a custom essay sample on India Water Pollution or any similar topic only for you Order Now The  network  monitors  waters  all  over  India. Samples  of  water  are  taken  frequently  and  checked  for bacteria  and  other  harmful  substances  within  the  water. Other  ways  of  sewage  treatment  include  air flotation,  dual  media  filter,  activated  carbon  filter,  sand  filtration  and  sludge  drying  beds. These  methods all  take  place  in  sewage  treatment  plants. Water  treatment  plants  are  very  expensive  and  are  needed  to be  maintained  constantly. Removal  of  sludge  is  said  to  be  the  most  untreated  area  of  water  treatment. This  is  because  of  the  poor  design  and  poor  maintenance  of  the  sludge  treatments. India  has  set  policies to  control  sewage  pollution  in  water. he  Ministry  of  Environment  and  Forests  has  created  financial  and technical  support  systems  to   promote  the  proper  treatment  of  water. The  problem  with  India’s  water treatment  is  that  the  government  is  not  putting  enough  effort  into  making  the  water  Ã‚  usable  for  its  citizens. The  government  should  promote  the  health  hazards  and  future  issues  of  water  pollution  so  the  citizens can  learn  to  treat  their  water  better. Informing  citizens  is  also  a  way  of  treatment  because  people  will  be aware  of  the  issues  water  pollution  will  cause  for  them  and  therefore  they  will  take  action. How to cite India Water Pollution, Papers