Friday, November 29, 2019

The Ethics Of Abortion Essays - Abortion In The United States

The Ethics Of Abortion Matchmaker.com: Sign up now for a free trial. Date Smarter! The Ethics Of Abortion Abortion is a very controversial subject that has been continually argued over for the past few years and probably many years to come. The main controversy is should abortion be legalized? First before we get into the many sides of abortion we must first define abortion. Abortion is the destruction of the fetus or unborn child while the child is still in the mothers womb. This can be done by almost anyone from the mother herself to back alley abortions and even to abortions by clinics set up especially for this purpose. There are two sides to this abortion topic the PRO-LIFE which is those who are against abortion altogether and the PRO- CHOICE or those who believe it is the womans right to choose if she wants to have an abortion. These two groups offer different solutions to problem. The pro-life solution is to have the child and basically live with it. They believe abortion is not an answer. The pro-choice solution is abortion because of reasons they feel are appropriate. Although abortion is morally and ethically wrong should it be legal for victims of rape or incest who have no other alternative? There is no real answer to this controversy, there are two sides to it though which have been arguing for many years over the subject. The first is the pro-life group. This group does not believe in the abortion factor. To understand where the pro-life stands we must first understand its beliefs and reasons for its beliefs. Then we can discuss what their solution to the abortion topic is. Pro-life believes that rape and incest are very emotional topics. "They often elicit throughout the population feelings of revulsion; people draw back from the issue of rape and incest. People don't know how to handle a person who is in that much pain. There is no quick fix. That is why it is difficult for even pro-life people to come to grips with the argument over abortion in cases of rape and incest." Some of those who are pro-life will allow abortion in these cases because they don't know what else they can do for the victim and except it as a rare case. But it is known that allowing abortion in these cases usually does not help the victim, instead it only worsens the problem because the victims needs are not being met. But what the facts suggest is that only a minority of rape and incest victims actually choose abortion. This is where pro-life has its biggest problem. Pro-life states that "Abortion is not usually chosen as the immediate solution for rape and incest victims but that is the prevailing belief of the general population. A woman has been raped and made pregnant: "Oh, she's got to have an abortion." No one has studied the rape and incest victims needs; abortion is presumed to fill her needs." Various studies and research indicate that rape and incest victims fall into a high-risk category of abortion. But what happens after a victim has an abortion? Jackie Baker a victim states: "I soon discovered that the aftermath of my abortion continued a long time after the memory of my rape had faded. I felt empty and horrible. Nobody told me about the emptiness and pain I would feel deep within causing nightmares and deep depressions. They all told me that after the abortion I could continue with my life as if nothing ever happened." (Reardon 21- 22) This is the story we hear from a lot of aborted women. Today in our society it is believed by most people that it is the womans fault just as much as the mans fault, if not more. many people think women are responsible for contributing to the rape itself. Then the rape victims feel self-blame and guilt. And even then a rape or incest victims family members or close friends may reinforce these negative feelings. Or they drop the problem because they don't know how to talk about it. We even see the same thing in the abortion experience. When a person becomes pregnant because of rape or incest there is a permanent symbol of the rape, at least until it is aborted. Women who have had abortions fear being rejected by God and loved ones. It is a very traumatic experience which takes time. The fact is that you are really telling your loved ones of a death in the family. Opinion polls have shown for years

Monday, November 25, 2019

RENE MARGRITTE, TIME TRANSFIXED

RENE MARGRITTE, TIME TRANSFIXED, 1938 Time transfixed by Rene Margritte is a surrealistic painting. By watching the painting We see a very sharp and clear painting with dark colors close to the red. The painting look so real that fools the eye and the observer has the impression that it is a computer graphic and not a real painting. The composition its ruled by straight diagonal lines. But there are some vertical lines to break the monotony and to relax our eye. Our vision goes straight to the fireplace because its the only object on white and attracts our attention. It is a strange composition. There is a fireplace and a train coming through it. Its the train that travels through the time. But why come through the fireplace? That because is surrealistic. On the top of the fireplace are two candles. The candles are not lit. But the painting is illuminated by natural light coming from the right. The candles symbolize the knowledge. In meddle of two candles is a black watch showing 1 oclock. The watch symbolizes time and the mystery of time! On the back is a mirror. It reflects only the shape of the candle and the watch and nothing else. There is void space on the mirror. Thats because the mirror symbolizes the mystery of the Universe and our ignorance for the mysteries that Universe hides and the forth dimension TIME. By seeing the painting the observers has the impression that there is void space in the room too. The mirror and the fireplace, which looks like an empty box, give that impression. We dont know if there is void space i! n the room because we see only a part of it. There are also implied lines. Its the painting line that goes from the left to the inside right and the light line that goes from right to inside left. Those lines meet together at an another horizontal line, which passes through the train and the watch. These lines give more focus to the train ...

Friday, November 22, 2019

Contract Performance Research Paper Example | Topics and Well Written Essays - 1250 words

Contract Performance - Research Paper Example The Federal acquisition Regulation provides federal agencies with different means of considering firms’ past performance and prior experience with regards to how well these firms have performed in similar work. Federal Acquisition Regulation The Federal Regulations Requirement sets particular regulations with respect to solicitation procedures, as well as conditions and terms of contracts performance of the firms offered the contract, procedures of terminating contracts and controlling cost (Cushman and Myers, 1999, p.1623). Federal agencies that offer contracts include U.S. Army Corps of Engineers (USACE), Public Buildings Service (PBS), and Customs and Border Protection (CBP). Contract awarding in these agencies are usually based on procurement decision by the respective departments. In this case, past contract performance data is mainly based on the above named agencies with respect to regulations, procedures, and policies applied in awarding contracts to firms. However, co ntract performance review results cannot be generalized to all federal agencies contract procurement with consideration top past performance and experience. Consideration of past performance and prior experience of firms by federal agencies is applied during three phases of awarding contracts. The three phases include preparing solicitations, responsibility determination, and proposal evaluation with regards to whether firms to be awarded contracts have the potential and capability to perform satisfactorily. In addition, Federal Acquisition Regulation provides a broad spectrum of decisions-making processes by federal agencies with respect to methods of acquisition, evaluation aspects, relative comparisons alongside past performance and prior experience. Nevertheless, contract performance consideration factors outweigh price factor among federal agencies when determining factors to consider in awarding contracts to firms. Federal agencies use negotiated procurements and sealed biddin g to award contracts to firms. Although sealed bidding focuses on lowest price bidder, it puts into consideration that all bidders have attained required performance standards and responsibility. Lowest-price technical selection process is used in awarding contracts that require a clearly defined technicality, where there are minimal chances of unsuccessful performance of the contracts. Negotiated procurements use one or more processes of source selection processes such as trade-off processes, which consider non-price aspects of evaluation. In contracts where development work is required, contract performance considerations can be achieved through best-value trade-off selection process when awarding the contracts. Decisions by federal agencies to award contracts to particular firms is based on factors of evaluation and sub factors that are of key significance and importance to contract performance consideration. The Federal Acquisition Regulation generally requires that every select ion decision-making process should evaluate costs of the contracts to the government alongside quality consideration factors of the service through putting into consideration non-cost evaluation aspects. According to FAR cost principles, the contractors should follow specific criteria such as billings, contract proposals, and claims submitted to the government. Cost accounting standards seek to provide governments with an opportunity

Wednesday, November 20, 2019

LAW OF TORTS Essay Example | Topics and Well Written Essays - 1500 words

LAW OF TORTS - Essay Example Trespass is identified as a form of redress in case of direct or indirect injury and the system also recognises other civil actions such as defamation as going to be explained in detail below. In the case of tort law, the person who suffers injuries is called a plaintiff and the person who has inflicted those injuries is called a defendant. It is of paramount importance for the claimant to be able to prove that the negligent behaviour of the defendant has caused injuries or loss of business. There are traditionally three elements in the tort action which the plaintiff has to prove in order to be successful in winning the claim. There is need to prove that the defendant owed the plaintiff a duty of care, the defendant breached that duty by falling below expected standards and the defendant’s conduct caused the plaintiff to suffer physical or economic harm (http://legal-dictionary.thefreedictionary.com/Tort+Law). Where it can be proved, recovery for loss can be effected by the court of law. As going to be discussed in detail below, there is need to establish three elements in tort action. Tort action also encompasses negligence which is described as the act of doing something a reasonable man would not do and a plaintiff must prove in such a case that the defendant owes a duty of care (Donoghue V. Stevenson 1932). The House of Lords in the case of Capiro Industries vs. Dickman (1990), proposed the adoption of the following conditions where the three stages should be taken into consideration which include; foreseeability, proximity as well as reasonability. In some cases it may not always follow that a duty of care exists but common sense ought to prevail to avoid an otherwise serious injury to another person or loss of business or profit. Due to the fact that a person may deliberately expose someone to danger or a situation which can cause losses leaves him liable to negligent behaviour where he is

Monday, November 18, 2019

An Assessment of Effectiveness of Dell's Organization Culture and Essay

An Assessment of Effectiveness of Dell's Organization Culture and Change - Essay Example Nevertheless, the concept of effectiveness should apply to all stakeholders in an organisation. This ensures harmony in all its operations, which has the end result of high performance. The current study examines the effectiveness exhibited by the dell management, in relation to how it has been able to effectively build an organisation culture, which pushed it up to its success. Background of the study In the past few decades, many organisations have changed their ways of doing business. This has been as a result of high competition. In particular, organisation culture and change has been one of the ways through which organizations have sought to focus on to maintain completive advantage (Harold 2009). In this regard, it is apparent that organisations have to analyse the best management practices through strategic plans that are aligned with organisation’s objectives, mission and vision statements (Hill & Jones 2008). These practices become a culture that an organisation shoul d endorse and cling on in order to achieve its objectives (Dyck and Neubert 2010). However, due to increased and the emergence of new technologies, any organisation that needs to survive in highly competitive market has to embrace such technologies (Marr 2010). This means that organisations should also create a culture of adopting innovations that are in line with their objectives (Daft and Lane 2010). Analysis of output control: a concept of organization culture In order to have a spectrum of what organisation culture and change entails, it is crucial to first understand what organisation culture is. This is an internal environment that establishes a personality for the organisation, which plays a part in influencing the behavior of its members (Flamholtz and Randle 2011). These could be summed up to mean core values and fundamental beliefs or an organisation. Studies have documented that an organisation with a strong culture, members act with shared understandings and commitment t o core values. Key elements of organisational culture involve innovation and risk taking, concern for people, team building and emphasis, and performance orientation (Phaditare 2011). With such deliberations, the focus of this paper will be on the case study on Dell Computers, which according to Bhattacharyya 2010, is argued to have been â€Å"able to achieve excellence by giving due emphasis on creating a positive work culture through pro-active human resource management practices† (18). In this regard, this paper aims at articulating on ways through which Dell’s organisational culture has enabled it achieve excellence. In order to have an efficient organization culture, an organization has to have efficient managers and the overall organizational structure. Dell’s organization structure is believed to forecast suitable performance in relation to its goals. For example, Dell’s reward system is linked to its goals, which help to motivate employees in orde r to improve performance. Nevertheless, Dell has created a culture of directions on each division on how to achieve its goals. Dell’s CEO Michael Dell, is argued to have tried to decentralize the authority to low-level employees. This has been an effective strategy that has facilitated company-customer relationship thus creating a customer service culture. Study objectives 1. To find out Dell’s elements of organ

Saturday, November 16, 2019

Exchange Rate Systems and Currency Crisis

Exchange Rate Systems and Currency Crisis Introduction Financial crisis occurs when the foreign value of a domestic currency unit falls. This thus results to the rise of the liabilities in the balance sheets of exposed economic units. It also afflicts the balance sheet of exposed economic units (Shiller, 2008). Banks get affected either directly or indirectly through their clients exposure. Currency crisis may indicate a dramatic drop in the exchange rate and it usually comes in the form of a breakdown of a unilaterally pegged exchange rate arrangement and also as an outcome of the balance of payment. 1. Under a fixed exchange-rate system, what automatic adjustments promote payments equilibrium? In a fixed exchange rate system, the exchange is not supposed to vary. Therefore, surplus and deficit elimination can be eliminated through government controls on payments and trades, and also by price change. In order to achieve this, the deficit nation is supposed to deflate the economy in order to encourage exports ( Mankiw, 2003). On the other hand a country experiencing surplus is supposed to stimulate its economy in order to discourage exports and at the same time encourage imports. Payment equilibrium can also be achieved through direct government restrictions on the importation of services and goods and loans and investments from foreign countries. 2. What is meant by the quantity theory of money? Quantity theory of money implies that value is determined by the relationship between supply and demand. This theory states that there is an association between the products sold and the money in the economy (Barro, 2008). Therefore, if the quantity of the money in the economy rises, the prices of products also rise thus resulting to inflation. This results to the buyers paying very high prices for the good and services they buy. Money is just like any other commodity and thus if its supply increase its value decreases. Therefore high supply of money in the economy results to price increase or inflation in order to cover up for the decreased value of the money. 3. When analyzing the income-adjustment mechanism, one must account for the foreign repercussion effect. Explain. Income adjusted mechanism has a foreign effect. It results to increase income for the surplus nation and at the same time it results to decrease in income of a deficit country. This is because imports of the surplus nation will result to decrease in income because they will substitute the home produced goods. This finally will result to reduced imports. On the other hand the deflated nation will experience a rise in its exports thus resulting to increase in income. 4. How does the J-curve effect relate to the time path of currency depreciation? The J-curve effect explains the time lag with which a currency depreciation or devaluation results to an improvement in the trade balance. The theoretical basis of the j-curve effect is the elasticitys approach to the balance of payment. This theory states that a currency depreciation or devaluation is anticipated to improve the trade balance by changing the relative prices of foreign and domestic goods (Carbaugh, 2008). When foreign good are made expensive in the home country and the home country goods are made cheaper in foreign countries, demand for imports will reduce and foreigners will buy more of the home countrys export. 5. How can currency depreciation-induced changes in household money balances promote payments equilibrium? In most developing countries, currency depreciation is used to cure balance of payment equilibrium after some time. Currency depreciation is as a result of economic development. Therefore if no democratic means available to achieve economic development, inflation can help by permitting capital formation while depreciation can restore balance of payment equilibrium (Davies, 2010). 6. What factors underlie a nations decision to adopt floating exchange rates or fixed exchange rates? Both floating and fixed exchange rate systems have advantages and disadvantages, therefore, no country can permit continuous floating exchange rate because it is not health for the economy (Madura, 2008). On the other hand, no country can allow fixed exchange rate particularly in globalization era. Therefore, a country tries to adopt a system that combines the advantages of the two systems. The extent to which the exchange rate of a country should be floating or fixed cannot be generalized. Thus depending on the needs of a countries economy and other factors, a country can come up with its own exchange rate system. 7. What factors contribute to currency crises? One of the factors that result to currency crisis is inconsistent government policies which may result to speculative attack to on a fixed exchange rate. Excessive domestic credit creation causes residents to exchange unwanted domestic currency with foreign currency therefore reducing the government stock of international reserves (Haner, 2008). Erosion of the stock reserves causes problems because to maintain the fixed price of foreign exchange , the government must have enough reserves to sell every time the price of foreign exchange is about to rise. 8. Present the case for and the case against a system of floating exchange rates. Floating exchange rate system is advantageous because the value of a currency will adjust to show the changing market condition (Wright, 2000). For example if UK inflation increases more than for its trading partners this would result to its products becoming expensive abroad. This would result to fall in demand for UK goods and services and also the demand for the pound. This in turn reduces the value of the currency thus making the exports relatively cheaper. On the other hand, floating exchange rate is disadvantageous because the value of the currency change regularly therefore making it difficult for firms to make plans. For example, UK buyers may not know what they will have to pay to import foreign products. Conclusion With an eye to international payments, every country has to come up with a payment system. Various degrees of flexibility of the rate of exchange are possible and it depends on the objectives of a countrys economic policy and on its economic environment which system is preferred.

Wednesday, November 13, 2019

The Common Cold :: essays research papers

The common cold has been plaguing humankind since the beginning of human existence. Even in these advanced times, there is no vaccine or cure. There are many symptoms that accompany the common cold. Some of these infamous symptoms are a runny nose, caused by inflammation of the nasal tissues, resulting in over production of mucus to trap the virus, and coughing. there are two different kinds or types of coughs that are common with colds. The first, is the less common dry hacking cough, these kinds are more likely to keep you up at night and just plainly annoy you than do any thing else. The other more common type of cough is the kind whose purpose is to expel mucus and or phlegm. These help to combat the cold by helping to expel the mucus that has the virus trapped in it. Other symptoms include a slight tingle or tickle in the back of the throat that usually turns into a sore throat and sneezing. Both of these symptoms are was for your body to help expel phlegm or mucus from the body. Another symptom is swelling of the face and or neck usually accompanied by pain around the eyes, nose, and forehead. This pain and swelling is caused by the introduction of the virus into your upper respiratory tract, therefore causing mucus building up in your nasal passages and then in your sinuses causing them both to become impacted. Many people complain of hoarseness, aches and pains in their joints, fever of about 101 degrees, and general aches and pains all over their bodies (Anthanasoid). There are at least two hundred different kinds of viruses that are known to cause what is known as the common cold, and an unknown number of undiscovered causes (Nourse 56). The virus who is usually responsible for a cold is called a rhinovirus, and it accounts for around thirty to fifty percent of all colds that afflict the adult part of the human population. The virus that is secondly responsible for most common colds, is called a coronavirus, and it is only different form a rhinovirus by a margin of few select proteins in it's molecular structure. The rhinovirus is so small that it can only be measured in milimicrons, one milimicron is about 1/25,000,000 of an inch, that means that about five hundred rhioviruses can fit on the point of a pin. That fact makes the rhinovirus and the coronavirus categorized in the medium territory. The virus cannot reproduce by itself. In fact scientists cannot even decide whether to classify it as an animal or a plant, because it is so primitive. To reproduce, the virus must first latch onto a nearby cell and inject it's genetic makeup into the

Monday, November 11, 2019

African Americans since 1865 Essay

It happens to be common knowledge that throughout history African Americans have been oppressed, segregated, and disregarded as civil human beings. In the dawn of history Africans were regarded as animals and as such they would do the job of animals, however this paper will look at their sacrifices and fights to be treated as equals. The abolishment of slavery brought on a war, not between two countries but a war that divided a country, one that is still spoken of today. The southern or â€Å"rebel† states rose against the President of the United States in retaliation of his and many others view that no man woman or child should be a slave. All people were created equal. Africans in politics Although four million African American slaves were now free they had codes placed against them, the Black Codes restricted the lives and movement of these people. In order to override the codes the 13th, 14th and 15th amendments were drafted and passed. Not only was slavery abolished but all slaves were now citizens and in such race could no longer be used to prevent the vote of a person. Africans now had a voice on who was elected and soon they had African Americans running for government offices. Corbould, C. (2009) Becoming African Americans: Black Public Life in Harlem, 1919-1939 Harvard University Press. Cambridge, MA, USA Harlem Renaissance African Americans soon were cast aside again, during the age of imperialism and leading into World War One Africans were struggling to make a life. Some fought in another war, this time not for their freedom but for the freedom from communism alongside their white counterparts. After the war ended blacks started to come together, the Harlem Renaissance was born. King, M. L. Jr. (2010) Stride Toward Freedom: The Montgomery Story. Beacon Press. Boston, MA, USA Black power movement 1954 to 1963 America saw a strong struggle for the advancement of civil rights, equality and desegregation. From every day citizens expressing their belief in being equal to their white counterparts to lawyers fighting for the equality all had deserved. These times were pivitol in an unstable America. Not only were there these movements of civil equality and black power but also a war in a far land that many Americans were against at the time. Inventions and impact From writers, inventors and powerful leaders throughout black history there are some that are household names and some that may be forgotten. I plan on taking a look back on those who through oppression continued to strive for better for themselves and for all. African Americans today Not long ago segregation was prominent, civil rights were abused, racism and hate were common. Today we have CEO’s, congressmen and senators, military leaders and the President of the United States who are all African Americans. No longer considered a minority in many’s eyes, African Americans have literally built themselves from slaves to leaders and teachers.

Saturday, November 9, 2019

Java Based Search Engine

ACKNOWLEDGMENT I express thanks and gratitude to Mr. †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦H. O. D computer science department, †¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦College for his encouraging support and guidance in carrying out the project. I would like to express gratitude and indebtedness to Mr†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦, for his valuable advice and guidance without which this project would not have seen the light of the day. I thank Mr†¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦Ã¢â‚¬ ¦ , project guide , GSS for his insistence on good programming technique which helped us to design and develop a successful model of an Chatting Tool. Name CONTENTS 1.STUDY & ANALYSIS PHASE 1. 1 INTRODUCTION 1. 1. 1 PURPOSE OF THE PROJECT 1. 1. 2 PROBLEM IN EXISTING SYSTEM 1. 1. 3 SOLUTION OF THESE PROBLEMS 1. 1. 4 SCOPE OF THE PROJECT 1. 1. 5 LIMITATIONS 1. 1. 6 HARDWARE & SOFTWARE SPECIFICATIONS 1. 1. 7 ORGANISATION PROFILE 2. PROJECT ANALYSIS 1. STUDY OF THE SYSTEM 2. INPUT & OUTPUT 3. PROCESS MODULES USED WITH JUSTIFICATION 3. DESIGN PHASE 1. DATAFLOW 2. UML DIAGRAMS 4. IMPLEMENTATION PHASE 5. TESTING 1. TYPES OF TESTING 1. COMPILING TEST 2. EXECUTION TEST 3. OUTPUT TEST 5. PROJECT CODING 6. OUTPUT SCREENS 7. CONCLUSION 8. BIBLOGRAPHYSTUDY PHASE INTRODUCTION: EXISTING SYSTEM With the advent of the Internet in the past decade, searching for information in various formats has been redefined by the internet search engines, most of them being based on information retrieval (IR) indexing techniques. IR-based searching, which usually allows formulation of queries with multiple words PROPOSED SYSTEM This Java application is basically a recursive file finder. You can search for files based on their filename, their contents, or both in selected directory and as well as sub directories of the specified directory.Engine is a graphical version of the well-known GREP utility, with an additional feature of traversing subdirectories. You can specify which directory to start looking in, which files to search through, and what pattern to look for in the files. The various fields expect regular expressions, like Global Regular Expression, ‘Engine’ has not only the graphical interface, but also a command-line interface. This is useful for quick searches through, say, a development tree. Engine requires the Java 2 Platform, Standard Edition version 1. 4 or higher. SOLUTION OF THESE PROBLEMSRegular expressions figure into all kinds of text-manipulation tasks. Searching and search-and-replace are among the more common uses, but regular expressions can also be used to test for certain conditions in a text file or data stream. You might use regular expressions, for example, as t he basis for a short program that separates incoming mail from incoming spam. In this case, the program might use a regular expression to determine whether the name of a known spammer appeared in the â€Å"From:† line of the email. Email filtering programs, in fact, very often use regular expressions for exactly this type of operation. SCOPE OF THE PROJECTEngine is a graphical version of the well-known GREP utility, with an additional feature of traversing subdirectories. The main aim of this project is to develop a java based recursive file finder. Engine is a graphical version of the well-known GREP utility, with an additional feature of traversing subdirectories LIMITATIONS Regular expressions tend to be easier to write than they are to read. This is less of a problem if you are the only one who ever needs to maintain the program (or sed routine, or shell script, or what have you), but if several people need to watch over it, the syntax can turn into more of a hindrance th an an aid.Ordinary macros (in particular, editable macros such as those generated by the major word processors and editors) tend not to be as fast, as flexible, as portable, as concise, or as fault-tolerant as regular expressions, but they have the advantage of being much more readable; even people with no programming background whatsoever can usually make enough sense of a macro script to change it if the need arises. For some jobs, such readability will outweigh all other concerns.As with all things in computing, it's largely a question of fitting the tool to the job. HARDWARE & SOFTWARE SPECIFICATIONS Environment: Java Runtime Environment version 1. 4 or better installed. Operating System: Any O. S. compatable with JVM Hard disk:10 GB Processor:PIII or higher ORGANIZATION PROFILE EMINENT SOFTWARE SOLUTIONS EMINENT TECHNOLOGIES (ET) is an IT Solution Provider for a dynamic environment where business and technology strategies converge.Our approach focuses on new ways of business co mbining IT innovation and adoption while also leveraging an organization's current IT assets. We work with large global corporations and new generation technology companies – to build new products or services and to implement prudent business and technology strategies in today's environment. EMINENT's range of expertise includes: Software Development Services Engineering Services Systems Integration Customer Relationship Management Supply Chain Management Product Development Electronic CommerceConsulting IT Outsourcing We apply technology with innovation and responsibility to achieve two broad objectives: Effectively address the business issues our customers face today Generate new opportunities that will help them stay ahead in the future This approach rests on: A strategy where we Architect, Integrate and Manage technology services and solutions — we call it AIM for success. A robust offshore development methodology and reduced demand on customer resources A focus on the use of reusable frameworks to provide cost and time benefitsWe combine the best people, processes and technology to achieve excellent results consistently. We offer customers the advantages of: Speed: We understand the importance of timing, of getting there before the competition. A rich portfolio of reusable, modular frameworks helps jump start projects. Tried and tested methodology ensures that we follow a predictable, low-risk path to achieve results. Our track record is testimony to complex projects delivered within and even before schedule. Expertise: Our teams combine cutting edge technology skills with rich domain expertise.What's equally important — we share a strong customer orientation that means we actually start by listening to the customer. We're focused on coming up with solutions that serve customer requirements today and anticipate future needs. A Full Service Portfolio: We offer customers the advantage of being able to Architect, Integrate and Manage tec hnology services. This means that they can rely on one, fully accountable source instead of trying to integrate disparate multi-vendor solutions. Services: GSS is providing its services to Sain medicaments Pvt.Ltd, Grace drugs and pharmaceuticals Private Limited Alka Drugs and Pharmaceuticals Pvt Ltd to name just a few with out rich experience and expertise in Information Technology we are in the best position to provide software solutions to distinct business requirements. PROJECT ANALYSIS STUDY OF THE SYSTEM This application can be mainly divided into two modules:- †¢ User Interface †¢ File Manipulation and filtering INPUT AND OUTPUT: User has to input the File Name or File Contents and he has to select the Drive or Directory in which searching has to be done.Application will search for the files matching with given criteria and shows the output in the text area of the application. PROCESS MODEL USED WITH JUSTIFICTION The model used here is a SPIRAL MODEL. This Model dem ands a direct consideration of technical risk at all stages of the project and if properly applied it reduces risk before they become problematic, hence it becomes easier to handle a project when using this kind of model where in the end user can evaluate the program at the end of each stage and suggest modification if required.PROJECT DESIGN DATA FLOW DIAGRAM 0th Level 1st Level 2nd Level 2nd Level 3rd Level UML DIAGRAMS USE CASE DIAGRAM [pic] CLASS DIAGRAM [pic] ACTIVITY DIAGRAM [pic] SEQUENCE DIAGRAM [pic] IMPLEMENTATION PHASE MODULES: 1. COMPONENT THIS IS THE FRONT END CONSOLE OF THE USER TO INTERACT WITH SEARCH ANALYZER. 2. TOOLBAR COORDINATIOR THIS MODULE HAS THE EMBEDED TOOLS WHICH ARE TO IMPLEMENT SEARCH. 3. MAP FINDER THIS MODULE IS MAPS THE SEARCH CORRESPONDING TO THE USERS QUERY. 4. DYNAMIC STATUS FINDERTHIS IS THE DYNAMIC MODULE WHICH GIVES THE STATUS OF THE SEARCH . 5. GREP GENERATOR GREP GENERATOR IS THE MAJOR MODULE ON WHICH THE SEARCH IS DONE BASED ON REGULAR EXPRESS IONS . OUTPUT SCREENS Engine view [pic] Browse [pic] Search [pic] Help [pic] Error [pic] PROJECT CODING CODE EXPLANATION Regular expressions simplify pattern-matching code Discover the elegance of regular expressions in text-processing scenarios that involve pattern matching Text processing often involves matching text against a pattern.Although Java's character and assorted string classes offer low-level pattern-matching support, that support commonly leads to complex code. To help you write simpler pattern-matching code, Java provides regular expressions with java. util. regex package. Text processing frequently requires code to match text against patterns. That capability makes possible text searches, email header validation, custom text creation from generic text (e. g. , â€Å"Dear Mr. Chakradhar† instead of â€Å"Dear Customer†), and so on. Java supports pattern matching via its character and assorted string classes.Because that low-level support commonly leads t o complex pattern-matching code, Java also offers regular expressions to help you write simpler code. After introducing regular expression terminology, the java. util. regex package's classes, and a program that demonstrates regular expression constructs, I explore many of the regular expression constructs that the Pattern class supports. I also examine the methods comprising Pattern and other java. util. regex classes. A practical application of regular expressions concludes my discussion.Regular expressions' long history begins in the theoretical computer science fields of automata theory and formal language theory. That history continues to Unix and other operating systems, where regular expressions are often used in Unix and Unix-like utilities: examples include awk (a programming language that enables sophisticated text analysis and manipulation-named after its creators, Aho, Weinberger, and Kernighan), emacs (a developer's editor), and grep (a program that matches regular expr essions in one or more text files and stands for global regular expression print).Regular expressions trace back to the work of an American mathematician by the name of Stephen Kleene (one of the most influential figures in the development of theoretical computer science) who developed regular expressions as a notation for describing what he called â€Å"the algebra of regular sets. † His work eventually found its way into some early efforts with computational search algorithms, and from there to some of the earliest text-manipulation tools on the Unix platform (including ed and grep). In the context of computer searches, the â€Å"*† is formally known as a â€Å"Kleene star. â€Å"A regular expression, also known as a regex or regexp, is a string whose pattern (template) describes a set of strings. The pattern determines what strings belong to the set, and consists of literal characters and meta characters, characters that have special meaning instead of a literal m eaning. The process of searching text to identify matches—strings that match a regex's pattern—is pattern matching. Java's java. util. regex package supports pattern matching via its Pattern, Matcher, and PatternSyntaxException classes: 1. Pattern objects, also known as patterns, are compiled regexes 2.Matcher objects, or matchers, are engines that interpret patterns to locate matches in character sequences, objects whose classes implement the java. lang. CharSequence interface and serve as text sources 3. PatternSyntaxException objects describe illegal regex patterns Code for mainwindow package jog. engine; import java. awt. *; import java. awt. event. *; import java. io. *; import java. net. URL; import java. util. prefs. *; import java. util. regex. *; import javax. swing. *; import javax. swing. filechooser. FileFilter; import jog. engine. *; public class MainWindow extends JFrame implements ActionListener, FileSearchListener { rotected Preferences preferences; pro tected JTextField lookInField; protected JTextField filePatternField; protected JTextField searchForField; protected JTextField excludeField; protected JCheckBox includeSubCheckBox; protected JList resultList; protected RunSearch runner; protected JButton browseButton; protected JButton helpButton; protected JButton startButton; protected JButton stopButton; protected JButton closeButton; protected JLabel status; protected JPanel cardPanel; protected CardLayout cardLayout; private boolean stopFlag; public MainWindow() { super(Bundle. getString(â€Å"AppTitle†)); addWindowListener(new WindowAdapter() public void windowClosing(WindowEvent event) { handleClose(); } }); preferences = Preferences. userRoot(). node(â€Å"com/bluemarsh/jrgrep†); Container pane = getContentPane(); GridBagLayout gb = new GridBagLayout(); pane. setLayout(gb); GridBagConstraints gc = new GridBagConstraints(); gc. insets = new Insets(3, 3, 3, 3); JLabel label = new JLabel(Bundle. getString(â€Å" lookInLabel†)); gc. anchor = GridBagConstraints. EAST; gb. setConstraints(label, gc); pane. add(label); String s = preferences. get(â€Å"lookIn†, â€Å"†); lookInField = new JTextField(s, 20); gc. anchor = GridBagConstraints. WEST; gc. fill = GridBagConstraints.HORIZONTAL; gc. weightx = 1. 0; gb. setConstraints(lookInField, gc); pane. add(lookInField); browseButton = new JButton(Bundle. getString(â€Å"browseLabel†)); browseButton. addActionListener(this); gc. anchor = GridBagConstraints. CENTER; gc. gridwidth = GridBagConstraints. REMAINDER; gc. fill = GridBagConstraints. NONE; gc. weightx = 0. 0; gb. setConstraints(browseButton, gc); pane. add(browseButton); label = new JLabel(Bundle. getString(â€Å"filePatternLabel†)); gc. anchor = GridBagConstraints. EAST; gc. gridwidth = 1; gb. setConstraints(label, gc); pane. add(label); s = preferences. get(â€Å"filter†, â€Å"†); ilePatternField = new JTextField(s, 20); gc. anchor = GridBagC onstraints. WEST; gc. fill = GridBagConstraints. HORIZONTAL; gc. gridwidth = GridBagConstraints. RELATIVE; gc. weightx = 1. 0; gb. setConstraints(filePatternField, gc); pane. add(filePatternField); Component glue = Box. createGlue(); gc. anchor = GridBagConstraints. CENTER; gc. fill = GridBagConstraints. NONE; gc. gridwidth = GridBagConstraints. REMAINDER; gc. weightx = 0. 0; gb. setConstraints(glue, gc); pane. add(glue); label = new JLabel(Bundle. getString(â€Å"searchForLabel†)); gc. anchor = GridBagConstraints. EAST; gc. fill = GridBagConstraints.NONE; gc. gridwidth = 1; gb. setConstraints(label, gc); pane. add(label); s = preferences. get(â€Å"searchFor†, â€Å"†); searchForField = new JTextField(s, 20); gc. anchor = GridBagConstraints. WEST; gc. fill = GridBagConstraints. HORIZONTAL; gc. gridwidth = GridBagConstraints. RELATIVE; gc. weightx = 1. 0; gb. setConstraints(searchForField, gc); pane. add(searchForField); helpButton = new JButton(Bundle. getStrin g(â€Å"helpLabel†)); helpButton. addActionListener(this); gc. anchor = GridBagConstraints. CENTER; gc. fill = GridBagConstraints. NONE; gc. gridwidth = GridBagConstraints. REMAINDER; gc. weightx = 0. 0; gb. etConstraints(helpButton, gc); pane. add(helpButton); label = new JLabel(Bundle. getString(â€Å"excludeLabel†)); gc. anchor = GridBagConstraints. EAST; gc. gridwidth = 1; gb. setConstraints(label, gc); pane. add(label); s = preferences. get(â€Å"exclude†, â€Å"†); excludeField = new JTextField(s, 20); gc. anchor = GridBagConstraints. WEST; gc. fill = GridBagConstraints. HORIZONTAL; gc. gridwidth = GridBagConstraints. RELATIVE; gc. weightx = 1. 0; gb. setConstraints(excludeField, gc); pane. add(excludeField); glue = Box. createGlue(); gc. anchor = GridBagConstraints. CENTER; gc. fill = GridBagConstraints. NONE; gc. ridwidth = GridBagConstraints. REMAINDER; gc. weightx = 0. 0; gb. setConstraints(glue, gc); pane. add(glue); includeSubCheckBox = new JC heckBox( Bundle. getString(â€Å"includeSubDirLabel†), true); includeSubCheckBox. setSelected(preferences. getBoolean( â€Å"recurse†, true)); gc. anchor = GridBagConstraints. WEST; gb. setConstraints(includeSubCheckBox, gc); pane. add(includeSubCheckBox); startButton = new JButton( Bundle. getString(â€Å"startSearchLabel†)); startButton. addActionListener(this); gc. gridwidth = 1; gb. setConstraints(startButton, gc); pane. add(startButton); status=new JLabel(â€Å"†); Color c=new Color(240,100,100); tatus. setForeground(c); gc. gridwidth = 1; gb. setConstraints(status, gc); pane. add(status); stopButton = new JButton(Bundle. getString(â€Å"stopLabel†)); stopButton. setEnabled(false); stopButton. addActionListener(this); gc. anchor = GridBagConstraints. CENTER; gc. gridwidth = GridBagConstraints. RELATIVE; gb. setConstraints(stopButton, gc); pane. add(stopButton); closeButton = new JButton(Bundle. getString(â€Å"closeLabel†)); closeButton . addActionListener(this); gc. gridwidth = GridBagConstraints. REMAINDER; gb. setConstraints(closeButton, gc); pane. add(closeButton); resultList = new JList(new ResultsListModel());JScrollPane scroller = new JScrollPane(resultList); cardPanel = new JPanel(new CardLayout()); cardLayout = (CardLayout) cardPanel. getLayout(); cardPanel. add(scroller, â€Å"list†); gc. gridwidth = GridBagConstraints. REMAINDER; gc. gridheight = GridBagConstraints. REMAINDER; gc. fill = GridBagConstraints. BOTH; gc. weightx = 1. 0; gc. weighty = 1. 0; gb. setConstraints(cardPanel, gc); pane. add(cardPanel); int width = preferences. getInt(â€Å"windowWidth†, 0); int height = preferences. getInt(â€Å"windowHeight†, 0); if (width == 0 && height == 0) { pack(); } else { setSize(width, height); } int top = preferences. getInt(â€Å"windowTop†, 100); nt left = preferences. getInt(â€Å"windowLeft†, 100); setLocation(left, top); stopFlag=false; } public void actionPerformed (ActionEvent event) { JButton button = (JButton) event. getSource(); //System. out. println(â€Å"action â€Å"+button); if (button == closeButton) { handleClose(); } else if (button == browseButton) { handleBrowse(); } else if (button == startButton) { status. setText(â€Å"Search Started†); //System. out. println(â€Å"Search started†); startSearch(); } else if (button == helpButton) { displayHelp(); } else if (button == stopButton) { //System. out. println(â€Å"Search stopped†); stopButton. setEnabled(false); runner. stop(); stopFlag=true; /int count=((ListModel)resultList. getModel()). getSize(); //status. setText(â€Å"Search Stopped â€Å"+count+† Files Found†); } } protected void displayHelp() { if (cardPanel. getComponentCount() < 2) { URL helpUrl = Bundle. getResource(â€Å"helpFile†); try { JEditorPane editor = new JEditorPane(helpUrl); editor. setEditable(false); JScrollPane scroller = new JScrollPane(editor); cardPanel. add(sc roller, â€Å"help†); } catch (IOException ioe) { searchFailed(ioe); return; } } cardLayout. show(cardPanel, â€Å"help†); } public void fileFound(FileFoundEvent event) { ResultsListModel model = (ResultsListModel) resultList. etModel(); model. addElement(event. getFile()); } protected void handleBrowse() { String dirStr = lookInField. getText(); JFileChooser fc; if (dirStr. equals(â€Å"†)) { String lastdir = preferences. get(â€Å"lastdir†, null); if (lastdir == null || lastdir. length() == 0) { lastdir = System. getProperty(â€Å"user. dir†); } fc = new JFileChooser(lastdir); } else { fc = new JFileChooser(dirStr); } fc. setFileSelectionMode(JFileChooser. DIRECTORIES_ONLY); if (fc. showOpenDialog(this) ! = JFileChooser. CANCEL_OPTION) { File dir = fc. getSelectedFile(); String path = dir. getPath(); lookInField. setText(path); references. put(â€Å"lastdir†, path); } } protected void handleClose() { preferences. putInt(â€Å"windowTopâ⠂¬ , getY()); preferences. putInt(â€Å"windowLeft†, getX()); preferences. putInt(â€Å"windowWidth†, getWidth()); preferences. putInt(â€Å"windowHeight†, getHeight()); preferences. put(â€Å"lookIn†, lookInField. getText()); preferences. put(â€Å"filter†, filePatternField. getText()); preferences. put(â€Å"searchFor†, searchForField. getText()); preferences. put(â€Å"exclude†, excludeField. getText()); preferences. putBoolean(â€Å"recurse†, includeSubCheckBox. isSelected()); System. exit(0); } public void searchComplete() { stopButton. etEnabled(false); //status. setText(â€Å"Search completed†); int count=((ListModel)resultList. getModel()). getSize(); if(count==0){ status. setText(â€Å"Search Completed No Files Found†); } if(stopFlag){ status. setText(â€Å"Search Stopped â€Å"+count +† Files Found†); stopFlag=false; }else{ status. setText(â€Å"Search Completed â€Å"+count +† Fil es Found†); } } public void searchFailed(Throwable t) { Object[] messages = {Bundle. getString(â€Å"exceptionOccurred†),t. getMessage()}; JOptionPane. showMessageDialog(this, messages, Bundle. getString(â€Å"errorTitle†), JOptionPane. ERROR_MESSAGE); } protected void startSearch() { cardLayout. how(cardPanel, â€Å"list†); ResultsListModel model = (ResultsListModel) resultList. getModel(); model. clear(); String dirStr = lookInField. getText(); if (dirStr == null || dirStr. length() == 0) { dirStr = â€Å". â€Å"; } File dir = new File(dirStr); if (! dir. exists()) { JOptionPane. showMessageDialog(this, Bundle. getString(â€Å"pathDoesNotExist†), Bundle. getString(â€Å"errorTitle†), JOptionPane. ERROR_MESSAGE); return; } String target = searchForField. getText(); String filter = filePatternField. getText(); String exclude = excludeField. getText(); try { Pattern. compile(target); Pattern. compile(filter); Pattern. ompile(exclude); } cat ch (PatternSyntaxException pse) { Object[] messages = {Bundle. getString(â€Å"invalidRegexPattern†), pse. getMessage()}; JOptionPane. showMessageDialog(this, messages, Bundle. getString(â€Å"errorTitle†),JOptionPane. ERROR_MESSAGE); return; } if (runner == null) { runner = new RunSearch(this); } runner. search(dir, target, filter, includeSubCheckBox. isSelected(), exclude); Thread th = new Thread(runner); th. start(); stopButton. setEnabled(true); } } Code for bundle package jog. engine; import java. net. URL; import java. util. MissingResourceException; import java. til. ResourceBundle; public class Bundle { private static ResourceBundle resourceBundle; static { resourceBundle = ResourceBundle. getBundle(Bundle. class. getName()); } public static ResourceBundle getBundle() { return resourceBundle; } public static URL getResource(String key) { String name = getString(key); return name == null ? null : Bundle. class. getResource(name); } public static String getString (String key) { try { return resourceBundle. getString(key); } catch (MissingResourceException mre) { return null; } } } Code for runsearch package jog. engine; import java. io. File; import jog. engine. *; mport java. lang. *; class RunSearch implements Runnable { protected File dir; protected String lookFor; protected String filter; protected boolean subDirs; protected String exclude; protected FileSearchListener listener; protected Searcher searcher; public RunSearch(FileSearchListener listener) { this. listener = listener; } public void run() { if (searcher == null) { searcher = new Searcher(); if (listener ! = null) { searcher. addSearchListener(listener); } } searcher. search(dir, lookFor, filter, subDirs, exclude); } public void search(File dir, String lookFor, String filter, boolean subDirs, String exclude) this. dir = dir; this. lookFor = lookFor; this. filter = filter; this. subDirs = subDirs; this. exclude = exclude; } public void stop() { //System. out. println(â€Å"Sea rcher is one:†+ isAlive()); System. out. println(â€Å"Searcher†); if (searcher ! = null) { searcher. stopSearching(); searcher=null; System. out. println(â€Å"Searcher one†); } //System. out. println(â€Å"Searcher is :†+ isAlive()); //System. out. println(â€Å"Searcher one†); } } Code for searcher package jog. engine; import java. io. *; import java. nio. *; import java. nio. channels. *; import java. nio. charset. *; import java. util. *; import java. til. regex. *; import javax. swing. event. EventListenerList; import jog. engine. *; class Searcher { protected static Pattern linePattern; protected static Charset charset; protected static CharsetDecoder decoder; protected EventListenerList searchListeners; protected volatile boolean stopSearch; protected Pattern targetPattern; protected Matcher targetMatcher; protected Pattern filterPattern; protected Matcher filterMatcher; protected Pattern excludePattern; protected Matcher excludeMatcher; sta tic { try { linePattern = Pattern. compile(â€Å". * ? â€Å"); } catch (PatternSyntaxException pse) { System. out. rintln(â€Å"Ye flipping gods! â€Å"); } charset = Charset. forName(â€Å"ISO-8859-1†); decoder = charset. newDecoder(); } public Searcher() { searchListeners = new EventListenerList(); } public void addSearchListener(FileSearchListener listener) { searchListeners. add(FileSearchListener. class, listener); } protected void fireDone() { if (searchListeners == null) { return; } Object[] listeners = searchListeners. getListenerList(); for (int i = listeners. length – 2; i >= 0; i -= 2) { if (listeners[i] == FileSearchListener. class) { FileSearchListener fsl = (FileSearchListener) listeners[i + 1]; fsl. earchComplete(); } } } protected void fireError(Throwable t) { if (searchListeners == null) { return; } Object[] listeners = searchListeners. getListenerList(); for (int i = listeners. length – 2; i >= 0; i -= 2) { if (listeners[i] == FileSearchLi stener. class) { FileSearchListener fsl = (FileSearchListener) listeners[i + 1]; fsl. searchFailed(t); } } } protected void fireFound(String match) { if (searchListeners == null) { return; } FileFoundEvent event = new FileFoundEvent(this, match); Object[] listeners = searchListeners. getListenerList(); for (int i = listeners. ength – 2; i >= 0; i -= 2) { if (listeners[i] == FileSearchListener. class) { FileSearchListener fsl = (FileSearchListener) listeners[i + 1]; fsl. fileFound(event); } } event = null; } public void removeSearchListener(FileSearchListener listener) { searchListeners. remove(FileSearchListener. class, listener); } public void search(File startIn, String target, String filter, boolean recurse, String exclude) { stopSearch = false; try { targetPattern = Pattern. compile(target); filterPattern = Pattern. compile(filter); if (exclude ! = null && exclude. length() > 0) { excludePattern = Pattern. ompile(exclude); } searchLow(startIn, recurse); } catch (IOExcepti on ioe) { fireError(ioe); } catch (PatternSyntaxException pse) { fireError(pse); } targetPattern = null; targetMatcher = null; filterPattern = null; filterMatcher = null; excludePattern = null; excludeMatcher = null; fireDone(); } protected void searchLow(File startIn, boolean recurse) throws IOException { String[] files = startIn. list(); if (files == null) { return; } for (int ii = 0; ii < files. length; ii++) { if (stopSearch) { break; } File file = new File(startIn, files[ii]); if (file. isFile() && file. canRead()) { String filename = file. etCanonicalPath(); if (filterMatcher == null) { filterMatcher = filterPattern. matcher(filename); } else { filterMatcher. reset(filename); } if (! filterMatcher. find()) { continue; } FileInputStream fis = new FileInputStream(file); FileChannel fc = fis. getChannel(); MappedByteBuffer bb = fc. map(FileChannel. MapMode. READ_ONLY, 0, fc. size()); CharBuffer cb = decoder. decode(bb); boolean matchFound = false; if ((targetPattern. flags() & Pa ttern. DOTALL) ! = 0) { if (targetMatcher == null) { targetMatcher = targetPattern. matcher(cb); } else { argetMatcher. reset(cb); } if (targetMatcher. find()) { matchFound = true; } } else { Matcher lm = linePattern. matcher(cb); while (lm. find()) { CharSequence cs = lm. group(); if (targetMatcher == null) { targetMatcher = targetPattern. matcher(cs); } else { targetMatcher. reset(cs); } if (targetMatcher. find()) { matchFound = true; } if (lm. end() == cb. limit()) { break; } } } if (matchFound) { fireFound(filename); } } else if (recurse && file. isDirectory()) { String dirname = file. getName(); if (excludePattern ! = null) { if (excludeMatcher == null) { excludeMatcher = excludePattern. atcher(dirname); } else { excludeMatcher. reset(dirname); } if (! excludeMatcher. find()) { searchLow(file, recurse); } } else { searchLow(file, recurse); } } } } public void stopSearching() { stopSearch = true; } } Code for filesearch listener package jog. engine; import java. util. EventListe ner; import jog. engine. FileFoundEvent; interface FileSearchListener extends EventListener { public void fileFound(FileFoundEvent event); public void searchComplete(); public void searchFailed(Throwable t); } Code for tty package jog. engine; import java. io. *; import java. util. regex. *; mport jog. engine. *; public class tty implements FileSearchListener { protected static int argIndex; protected static String excludeStr = â€Å"†; protected static String nameStr = â€Å"†; protected static void displayHelp() { String str = Bundle. getString(â€Å"ttyHelp1†); int i = 1; while (str ! = null) { System. out. println(str); i++; str = Bundle. getString(â€Å"ttyHelp† + i); } } public void fileFound(FileFoundEvent event) { System. out. println(event. getFile()); } protected static boolean processArgs(String[] args) { while (argIndex < args. length) { String arg = args[argIndex]; if (arg. equals(â€Å"-exclude†)) { rgIndex++; excludeStr = args[argInd ex]; } else if (arg. equals(â€Å"-h†) || arg. equals(â€Å"-help†) || arg. equals(â€Å"–help†)) { displayHelp(); return false; } else if (arg. equals(â€Å"-name†)) { argIndex++; nameStr = args[argIndex]; } else { break; } argIndex++; } return true; } public void searchComplete() {} public void searchFailed(Throwable t) { System. err. println(Bundle. getString(â€Å"exceptionOccurred†)); System. err. println(t. getMessage()); } public static void main(String[] args) { try { if (! processArgs(args)) { return; } } catch (ArrayIndexOutOfBoundsException aioobe) { System. err. println(Bundle. etString(â€Å"ttyMissingArguments†)); return; } if (argIndex == args. length) { System. err. println(Bundle. getString(â€Å"ttyMissingRequired†)); return; } String target = args[argIndex]; argIndex++; String dirStr = null; if (argIndex == args. length) { dirStr = â€Å". â€Å"; } else { dirStr = args[argIndex]; } File dir = new File(dirS tr); if (! dir. exists()) { System. err. println(Bundle. getString(â€Å"pathDoesNotExist†)); return; } try { Pattern. compile(target); Pattern. compile(nameStr); } catch (PatternSyntaxException pse) { System. err. println(Bundle. getString(â€Å"invalidRegexPattern†)); System. rr. println(pse. getMessage()); return; } Searcher searcher = new Searcher(); tty instance = new tty(); searcher. addSearchListener(instance); searcher. search(dir, target, nameStr, true, excludeStr); searcher. removeSearchListener(instance); } } Code for filefoundevent package jog. engine; import java. util. EventObject; class FileFoundEvent extends EventObject { protected String file; public FileFoundEvent(Object source, String file) { super(source); this. file = file; } public String getFile() { return file; } } Code for result list model package jog. engine; import java. util. Vector; import javax. wing. AbstractListModel; import jog. engine. *; class ResultsListModel extends AbstractListMod el { protected Vector listData; public ResultsListModel() { listData = new Vector(); } public void addElement(Object o) { listData. add(o); fireIntervalAdded(this, listData. size(), listData. size()); } public void clear() { int size = listData. size(); listData. clear(); fireIntervalRemoved(this, 0, size); } public Object getElementAt(int i) { try { return listData. elementAt(i); } catch (ArrayIndexOutOfBoundsException e) { return null; } } public int getSize() { return listData. size(); } } Code for main package jog. ngine; import jog. engine. *; public class Main { public static void main(String[] args) { new MainWindow(). show(); // new jog. searchdesk. MainWindow. show(); } } For a tool with full regex support, metacharacters like â€Å"*† and â€Å"? † (or â€Å"wildcard operators,† as they are sometimes called) are only the tip of the iceberg. Using a good regex engine and a well-crafted regular expression, one can easily search through a text file (or a hundred text files) searching for words that have the suffix â€Å". html† (but only if the word begins with a capital letter and occurs at the beginning of the line), replace the . tml suffix with a . sgml suffix, and then change all the lower case characters to upper case. With the right tools, this series of regular expressions would do just that: s/(^[A_Z]{1})([a-z]+). sgml/12. html/g tr/a-z/A-Z/ As you might guess from this example, concision is everything when it comes to crafting regular expressions, and while this syntax won't win any beauty prizes, it follows a logical and fairly standardized format which you can learn to rea+*d and write easily with just a little bit of practice. In a regular expression, everything is a generalized pattern.If I type the word â€Å"serendipitous† into my editor, I've created one instance of the word â€Å"serendipitous. † If, however, I indicate to my tool (or compiler, or editor, or what have you) that I'm now typing a regular expression, I am in effect creating a template that matches all instances of the characters â€Å"s,† â€Å"e,† â€Å"r,† â€Å"e,† â€Å"n,† â€Å"d,† â€Å"i,† â€Å"p,† â€Å"i,† â€Å"t,† â€Å"o,† â€Å"u,† and â€Å"s† all in a row. The standard way to find â€Å"serendipitous† (the word) in a file is to use â€Å"serendipitous† (the regular expression) with a tool like egrep (or extended grep): $ egrep â€Å"serendipitous† foobar ;hitsThis line, as you might guess, asks egrep to find instances of the pattern â€Å"serendipitous† in the file â€Å"foobar† and write the results to a file called â€Å"hits†. In the preceding examples, we have been using regular expressions that adhere to the first rule of regular expressions: namely, that all alphanumeric characters match themselves. There are other characters, however, that match in a mor e generalized fashion. These are usually referred to as the meta characters. Some meta characters match single characters. This includes the following symbols: . Matches any one character †¦]Matches any character listed between the brackets [^†¦]Matches any character except those listed between the brackets Suppose we have a number of filenames listed out in a file called â€Å"Important. files. † We want to â€Å"grep out† those filenames which follow the pattern â€Å"blurfle1†, â€Å"blurfle2†, â€Å"blurfle3,† and so on, but exclude files of the form â€Å"1blurfle†, â€Å"2blurfle†, â€Å"3blurfle† The following regex would do the trick: $ egrep â€Å"blurfle. † Important. files ;blurfles The important thing to realize here is that this line will not match merely the string â€Å"blurfle. (that is, â€Å"blurfle† followed by a period). In a regular expression, the dot is a reserved symbol (we'll ge t to matching periods a little further on). This is fine if we aren't particular about the character we match (whether it's a â€Å"1,† a â€Å"2,† or even a letter, a space, or an underscore). Narrowing the field of choices for a single character match, however, requires that we use a character class. Character classes match any character listed within that class and are separated off using square brackets.So, for example, if we wanted to match on â€Å"blurfle† but only when it is followed immediately by a number (including â€Å"blurfle1† but not â€Å"blurflez†) we would use something like this: $ egrep â€Å"blurfle[0123456789]† Important. files >blurfles The syntax here is exactly as it seems: â€Å"Find ‘blurfle' followed by a zero, a one, a two, a three, a four, a five, a six, a seven, an eight, or a nine. † Such classes are usually abbreviated using the range operator (â€Å"-â€Å"): $ egrep â€Å"blurfle[0-9]† Important. files >blurfles The following regex would find â€Å"blurfle† followed by any alphanumeric character (upper or lower case). egrep â€Å"blurfle[0-9A-Za-z]† Important. files >blurfles (Notice that we didn't write blurfle[0-9 A-Z a-z] for that last one. The spaces might make it easier to read, but we'd be matching on anything between zero and nine, anything between a and z, anything between A and Z, or a space. ) A carat at the beginning of the character class negates that class. In other words, if you wanted to find all instances of blurfle except those which end in a number, you'd use the following: $ egrep â€Å"blurfle[^0-9]† Important. files >blurfles Many regex implementations have â€Å"macros† for various character classes.In Perl, for example, d matches any digit ([0-9]) and w matches any â€Å"word character† ([a-zA-Z0-9_]). Grep uses a slightly different notation for the same thing: [:digit:] for digits and [:alnum:] for alpha numeric characters. The man page (or other documentation) for the particular tool should list all the regex macros available for that tool. Quantifiers The regular expression syntax also provides metacharacters which specify the number of times a particular character should match. ?Matches any character zero or one times *Matches the preceding element zero or more times +Matches the preceding element one or more times num}Matches the preceding element num times {min, max}Matches the preceding element at least min times, but not more than max times These metacharacters allow you to match on a single-character pattern, but then continue to match on it until the pattern changes. In the last example, we were trying to search for patterns that contain â€Å"blurfle† followed by a number between zero and nine. The regex we came up with would match on blurfle1, blurfle2, blurfle3, etc. If, however, you had a programmer who mistakenly thought that â€Å"blurfle† was supposed t o be spelled â€Å"blurffle,† our regex wouldn't be able to catch it.We could fix it, though, with a quantifier. $ egrep â€Å"blur[f]+le[0-9]† Important. files >blurfles Here we have â€Å"Find ‘b', ‘l', ‘u,' ‘r' (in a row) followed by one or more instances of an ‘f' followed by ‘l' and ‘e' and then any single digit character between zero and nine. † There's always more than one way to do it with regular expressions, and in fact, if we use single-character metacharacters and quantifiers in conjunction with one another, we can search for almost all the variant spellings of â€Å"blurfle† (â€Å"bllurfle,† â€Å"bllurrfle†, bbluuuuurrrfffllle†, and so on).One way, for example, might employ the ubiquitous (and exceedingly powerful) . * combination: $ egrep â€Å"b. *e† Important. files ;blurfles If we work this out, we come out with something like: â€Å"find a ‘b' followed by any c haracter any number of times (including zero times) followed by an ‘e'. † It's tempting to use â€Å". *† with abandon. However, bear in mind that the preceding example would match on words like â€Å"blue† and â€Å"baritone† as well as â€Å"blurfle. † Suppose the filenames in blurfle are numbered up to 12324, but we only care about the first 999: $ egrep â€Å"blurfle[0-9]{3}† Important. files >bluflesThis regex tells egrep to match any number between zero and nine exactly three times in a row. Similarly, â€Å"blurfle[0-9]{3,5}† matches any number between zero and nine at lest three times but not more than five times in a row. Anchors Often, you need to specify the position at which a particular pattern occurs. This is often referred to as â€Å"anchoring† the pattern: ^Matches at the start of the line $Matches at the end of the line Matches at the end of a word Matches at the beginning or the end of a word BMatches a ny charater not at the beginning or end of a word ^† and â€Å"$† are some of the most useful metacharacters in the regex arsenal–particularly when you need to run a search-and-replace on a list of strings. Suppose, for example, that we want to take the â€Å"blurfle† files listed in Important. files, list them out separately, run a program called â€Å"fragellate† on each one, and then append each successive output to a file called â€Å"fraggled_files. † We could write a full-blown shell script (or Perl script) that would do this, but often, the job is faster and easier if we build a very simple shell script with a series of regular expressions.We'd begin by greping the files we want to operate on and writing the output to a file. $ egrep â€Å"blurfle[0-9]† Important. file ;script. sh This would give us a list of files in script. sh that looked something like this: blurfle1 blurfle2 blurfle3 blurfle4 . . . Now we use sed (or the â⠂¬Å"/%s† operator in vi, or the â€Å"query-replace-regexp† command in emacs) to put â€Å"fragellate† in front of each filename and â€Å">>fraggled_files† after each filename. This requires two separate search-and-replace operations (though not necessarily, as I'll explain when we get to backreferences).With sed, you have the ability to put both substitution lines into a file, and then use that file to iterate through another making each substitution in turn. In other words, we create a file called â€Å"fraggle. sed† which contains the following lines: s/^/fraggelate / s/$/ >>fraggled_files/ Then run the following â€Å"sed routine† on script. sh like so: $ sed -f fraggle. sed script. sh >script2. sh Our script would then look like this: fraggelate blurfle1 >>fraggled_files fraggelate blurfle2 >>fraggled_files fraggelate blurfle3 >>fraggled_files raggelate blurfle4 >>fraggled_files . . Chmod it, run it, and you're done. Of course, this is a somewhat trivial example (â€Å"Why wouldn't you just run â€Å"fragglate blurfle* ;;fraggled_files† from the command line? â€Å"). Still, one can easily imagine instances where the criteria for the file name list is too complicated to express using [filename]* on the command line. In fact, you can probably see from this sed-routine example that we have the makings of an automatic shell-script generator or file filter. You may also have noticed something odd about that caret in our sed routine.Why doesn't it mean â€Å"except† as in our previous example? The answer has to do with the sometimes radical difference between what an operator means inside the range operator and what it means outside it. The rules change from tool to tool, but generally speaking, you should use metacharacters inside range operators with caution. Some tools don't allow them at all, and others change the meaning. To pick but one example, most tools would interpret [A-Za-z. ] as â€Å"Any character between A and Z, a and z or a period. † Most tools provide some way to anchor a match on a word boundary.In some versions of grep, for example, you are allowed to write: $ grep â€Å"fle>† Important. files ;blurfles This says: â€Å"Find the characters â€Å"f†, â€Å"l†, â€Å"e†, but only when they come at the end of a word. †  tells the regex engine to match any word boundary (whether it's at the beginning or the end) and B tells it to match any position that isn't a word boundary. This again can vary considerably from tool to tool. Some tools don't support word boundaries at all, and others support them using a slightly different syntax.The tools that do support word boundaries generally consider words to be bounded by spaces or punctuation, and consider numerals to be legitimate parts of words, but there are some variations on these rules that can effect the accuracy of your matches. The man page or other documentation should resolve the matter. Escape Characters By now, you're probably wondering how you go about searching for one of the special characters (asterisks, periods, slashes, and so on). The answer lies in the use of the escape character–for most tools, the backslash (â€Å"†).To reverse the meaning of a special character (in other words, to treat it as a normal character instead of as a metacharacter), we simply put a backslash before that character. So, we know that a regex like â€Å". *† finds any character any number of times. But suppose we're searching for ellipses of various lengths and we just want to find periods any number of times. Because the period is normally a special character, we'd need to escape it with a backslash: $ grep â€Å". *† Important. Files ;ellipses. files Unfortunately, this contribute to the legendary ugliness of regular expressions more than any other element of the syntax.Add a few escape characters, and a simple sed routine designed to replace a couple of URL's quickly degenerates into confusion: sed ‘s/http://etext. lib. virginia. edu//http://www. etext. virginia. edu/g To make matters worse, the list of what needs to be escaped differs from tool to tool. Some tools, for example, consider the â€Å"+† quantifier to have its normal meaning (as a ordinary plus sign) until it is escaped. If you're having trouble with a regex (a sed routine that won't parse or a grep pattern that won't match even though you're certain the pattern exists), try playing around with the escapes.Or better yet, read the man page. Alternation Alternation refers to the use of the â€Å"|† symbol to indicate logical OR. In a previous example, we used â€Å"blur[f]+le† to catch those instances of â€Å"blurfle† that were misspelled with two â€Å"f's†. Using alternation, we could have written: $ egrep â€Å"blurfle|blurffle† Important. files ;blurfles This means simply â€Å"Find either blur fle OR blurffle. † The power of this becomes more evident when we use parentheses to limit the scope of the alternative matches.Consider the following regex, which accounts for both the American and British spellings of the word â€Å"gray†: $ egrep â€Å"gr(a|e)y† Important. files ;hazy. shades Or perhaps a mail-filtering program that uses the following regex to single out past correspondence between you and the boss: /(^To:|^From:) (Seaman|Ramsay)/ This says, â€Å"Find a ‘To:' or a ‘From:' line followed by a space and then either the word ‘Seaman' or the word ‘Ramsay' This can make your regex's extremely flexible, but be careful! Parentheses are also meta characters which figure prominently in the use of . . . Back referencesPerhaps the most powerful element of the regular expression syntax, back references allows you to load the results of a matched pattern into a buffer and then reuse it later in the expression. In a previous example , we used two separate regular expressions to put something before and after a filename in a list of files. I mentioned at that point that it wasn't entirely necessary that we use two lines. This is because back references allow us to get it down to one line. Here's how: s/(blurfle[0-9]+)/fraggelate 1 >>fraggled_files/ The key elements in this example are the parentheses and the â€Å"1†.Earlier we noted that parentheses can be used to limit the scope of a match. They can also be used to save a particular pattern into a temporary buffer. In this example, everything in the â€Å"search† half of the sed routine (the â€Å"blurfle† part) is saved into a buffer. In the â€Å"replace† half we recall the contents of that buffer back into the string by referring to its buffer number. In this case, buffer â€Å"1†. So, this sed routine will do precisely what the earlier one did: find all the instances of blurfle followed by a number between zero and nine a nd replace it with â€Å"fragellate blurfle[some number] ;;fraggled files†.Backreferences allow for something that very few ordinary search engines can manage; namely, strings of data that change slightly from instance to instance. Page numbering schemes provide a perfect example of this. Suppose we had a document that numbered each page with the notation . The number and the chapter name change from page to page, but the rest of the string stays the same. We can easily write a regular expression that matches on this string, but what if we wanted to match on it and then replace everything but the number and the chapter name? //Page 1, Chapter 2/ Buffer number one (â€Å"1†) holds the first matched sequence, ([0-9]+); buffer number two (â€Å"2†) holds the second, ([A-Za-z]+). Tools vary in the number of backreference they can hold. The more common tools (like sed and grep) hold nine, but Python can hold up to ninety-nine. Perl is limited only by the amount of ph ysical memory (which, for all practical purposes, means you can have as many as you want). Perl also lets you assign the buffer number to an ordinary scalar variable ($1, $2, etc. ) so you can use it later on in the code block. a.OBJECT ORIENTED PROGRAMMING AND JAVA Object-oriented Programming was developed because of limitations found in earlier approaches of programming. To appreciate what OOP does, we need to understand what these limitations are and how they arose from traditional programming. PROCEDURAL LANGUAGES Pascal, C, Basic, FORTRAN, and similar languages are procedural languages. That is, each statement in the language tells the computer to do something: Get some input, add these numbers, divide by 6, display the output. A program in a procedural language is a list of instructions.For very small programs no other organizing principle (often called a paradigm) is needed. The programmer creates the list of instructions, and the computer carries them out. Division into Func tions When programs become larger, a single list of instructions becomes unwieldy. Few programmers can comprehend a program of more than a few hundred statements unless it is broken down into smaller units. For this reason the function was adopted as a way to make programs more comprehensible to their human creators. (The term functions is used in C++ and C.In other languages the same concept may be referred to as a subroutine, a subprogram, or a procedure. ) A program is divided into functions, and (ideally, at least) each function has a clearly defined purpose and a clearly defined interface to the other functions in the program. The idea of breaking a program into functions can be further extended by grouping a number of functions together into a larger entity called a module, but the principle is similar: grouping a number of components that carry out specific tasks.Dividing a program into functions and modules is one of the cornerstones of structured programming, the somewhat l oosely defined discipline that has influenced programming organization for more than a decade. Problems with Structured Programming As programs grow ever larger and more complex, even the structured programming approach begins to show signs of strain. You may have heard about, or been involved in, horror stories of program development. The project is too complex, the schedule slips, more programmers are added, complexity increases, costs skyrocket, the schedule slips further, and disaster ensues.Analyzing the reasons for these failures reveals that there are weaknesses in the procedural paradigm itself. No matter how well the structured programming approach is implemented, large programs become excessively complex. What are the reasons for this failure of procedural languages? One of the most crucial is the role played by data. Data Undervalued In a procedural language, the emphasis is on doing things–read the keyboard, invert the vector, check for errors, and so on. The subd ivision of a program into functions continues this emphasis. Functions do things just as single program statements do.What they do may be more complex or abstract, but the emphasis is still on the action. What happens to the data in this paradigm? Data is, after all, the reason for a program's existence. The important part of an inventory program isn't a function that displays the data, or a function that checks for correct input; it's the inventory data itself. Yet data is given second-class status in the organization of procedural languages. For example, in an inventory program, the data that makes up the inventory is probably read from a disk file into memory, where it is treated as a global variable.By global we mean that the variables that constitute the data are declared outside of any function, so they are accessible to all functions. These functions perform various operations on the data. They read it, analyze it, update it, rearrange it, display it, write it back to the dis k, and so on. We should note that most languages, such as Pascal and C, also support local variables, which are hidden within a single function. But local variables are not useful for important data that must be accessed by many different functions. Now suppose a new programmer is hired to write a function to analyze this nventory data in a certain way. Unfamiliar with the subtleties of the program, the programmer creates a function that accidentally corrupts the. This is easy to do, because every function has complete access to the data. It's like leaving your personal papers in the lobby of your apartment building: Anyone can change or destroy them. In the same way, global data can be corrupted by functions that have no business changing it. Another problem is that, since many functions access the same data, the way the data is stored becomes critical.The arrangement of the data can't be changed without modifying all the functions that access it. If you add new data items, for exa mple, you'll need to modify all the functions that access the data so that they can also access these new items. It will be hard to find all such functions, and even harder to modify all of them correctly. It's similar to what happens when your local supermarket moves the bread from aisle 4 to aisle 12. Everyone who patronizes the supermarket must figure out where the bread has gone, and adjust their shopping habits accordingly.What is needed is a way to restrict access to the data, to hide it from all but a few critical functions. This will protect the data, simplify maintenance, and offer other benefits as well. Relationship to the Real World Procedural programs are often difficult to design. The problem is that their chief components–functions and data structures–don't model the real world very well. For example, suppose you are writing a program to create the elements of a graphics user interface: menus, windows, and so on. Quick now, what functions will you need? What data structures?The answers are not obvious, to say the least. It would be better if windows and menus corresponded more closely to actual program elements. New Data Types There are other problems with traditional languages. One is the difficulty of creating new data types. Computer languages typically have several built-in data types: integers, floating-point numbers, characters, and so on. What if you want to invent your own data type? Perhaps you want to work with complex numbers, or two dimensional coordinates, or dates—quantities the built-in data types don’t handle easily.Being able to create your own types is called extensibility; you can extend the capabilities of the language. Traditional languages are not usually extensible. Without unnatural convolutions, you can’t bundle together both X and Y coordinates into a single variable called Point, and then add and subtract values of this type. The result is that traditional programs are more complex to write and maintain. The object oriented approach The fundamental idea behind object-oriented languages is to combine into a single unit both data and the functions that operate on that data.Such a unit is called an object. An object’s functions, called member methods in Java, typically provide the only way to access its data. If you want to read the item and return the value to you, you call a member function in the object. It will read the item and return the value to you. You can’t access the data directly. The data is hidden, so it is safe from accidental modification. Data and its functions are said to be encapsulated into a single entity. Data encapsulation and data hiding are key terms in the description of object oriented languages.If you want to modify the data in an object, you know exactly what functions interact with it: the member functions in the object. No other functions can access the data. This simplifies writing, debugging, and maintaining the progra m. A Java program typically consists of a number of objects, which communicate with each other by calling one another’s members functions. We should mention that what are called member functions in C++ are called methods in Java. Also, data items are referred to as instance variables. Calling an object’s member function is referred to as sending a message to the object.

Wednesday, November 6, 2019

Connections between 3 stories essays

Connections between 3 stories essays Are there any connections between the past three stories we read? The stories are To Build A Fire, A White Heron, and The Shipping News. In stories, I think you can always find some kind of connection, whether it be a miniscule little detail, or the plots of the stories are the same. In these three stories the connection I see is that the main character in each seems as though they are going to keep blubbering on in the world. In the end of each, these characters bring a peace of mind to the reader in that you know what happened to them for the most part. In To Build A Fire the man seems as though hes just going to keep on walking in the endless cold. Hes just going to keep on saying to himself, It really is cold out. Or, hes just going to keep on beating his frozen hands off his legs to get some feeling back in them. And, hes just going to keep on building a fire when the numbness in his limbs gets to be too unbearable. Finally, when he builds the second fire, it is put out by and avalanche of snow from the trees branches above. Then, his appendages get too numb to grasp at grass to start another fire, or to even kill the dog and keep warm in its carcass. So, he runs and runs, and gets the blood moving a bit, and after a while accepts the fact that he is going to freeze to death. With this new serenity, he gives in to the drowsiness associated with a person freezing to death, and drifts off to the eternal peace that awaits him. In A White Heron, Sylvia is a little girl who does nothing during the day except for to search around for her wandering cow. The cow hides among bushes and wanders around all day, and at the end of the day, Sylvia comes in search to take the cow home to be milked. She watches birds and animals all day long, and befriends a lot of them. Then comes along this ...

Monday, November 4, 2019

Chemistery Essay Example | Topics and Well Written Essays - 750 words - 1

Chemistery - Essay Example Suggest a suitable (iv) Using curly arrows, draw a mechanism to account for the synthetic transformations from 4 to 3 and then to 2.reagent for this reaction. Using curly arrows, draw a mechanism for this reaction. (ii) 2-Methoxybuta-1,3-diene (9) can react with ethyl propenoate (10) under thermal conditions. Identify the major product of this reaction. Use curly arrows to indicate the bond making and breaking steps which form the product. 3.Usnic acid (12) is a dibenzofuran derivative found in several lichen species and possesses a wide range of biological functions, including antibacterial properties. Usnic acid can be readily formed from compound 11, which can be prepared from compound 13 by a sequence of reactions. (Note: compound 13 is a minor tautomer of compound 13a.) Carry out a retrosynthetic analysis of compound 13, showing that 14 and 15 are the starting reagents. Your retrosynthetic analysis should clearly indicate the disconnections, the synthons thus generated and the reagents corresponding to each

Saturday, November 2, 2019

Tourism in Switzerland Literature review Example | Topics and Well Written Essays - 3000 words

Tourism in Switzerland - Literature review Example However, the impact has not been extensive because of a number of factors such as new types of tourism like health and medical tourism, strong financial services in the country, and ability of the industry players in the country to deal with the situation. Impact of Currency Fluctuation on Tourism in Switzerland Over the years, tourism has been one of the greatest phenomena that enhance human interactions, cultural exchanges, leisure activities, and economic advancements among other benefits. It is agreeable that people across the world learn new things and experience new things through tourism (Elliott and Johns, 1993). Tourism entails activities of individual or group of individuals travelling to destinations and staying in environments that are away from their usual environment for a particular period of time for leisure, pilgrimage, business and other purposes (Lundberg et al, 2005). Tourism has provided the human species with the opportunity to explore new environments and travel to various parts of the world with fewer restrictions, a scenario which would otherwise be unattainable. Due to tourism and benefits derived from it, countries hosting tourism destinations have relaxed their rules and laws on visitors visiting for tourism reasons (Reynard, 2008). Actually, in most cases, countr ies have offered both the social and economic incentives to encourage more tourists to visit their countries. Most, if not all countries in the world, have at least one or more tourist destinations (Bhatia, 2004). That fact notwithstanding, there are countries that are preferred by tourists more compared to other countries. This scenario can be attributed to a number of factors that include but are not limited to political stability in particular countries; types and qualities of tourist destinations in particular countries; socio-cultural factors; level of technological advancements; and economic factors such as currency fluctuation (Fyall & Garrod 2005). These factors not only affect the number of tourists visiting particular countries, but they also influence the frequency of their visits to those countries (Kirchgassner, 2009). In Europe, Switzerland is one of the most preferred tourist destinations. The history of tourism in Switzerland can be traced back to mid 19th century (S witzerland: Market profile, 2005). Since that time it has developed to become one of the most sophisticated industries in the country that has a considerable contribution to the country’s economy. Besides, tourism has enhanced trade and foreign relations of Switzerland with the rest of the world (Hopkins et al, 2002). The tourism infrastructure in Switzerland is one of the highly developed across the world, concentrated mostly in the cities and mountainous regions (Sommerville, 2011). Switzerland’s landscapes and Alpine climate are cited as one of the main tourists’ attractions in Switzerland. Along with that, Switzerland has one of the greatest and most diverse commercial hubs, thus making it the preferred destination for tourists (Edgell, 2008). The role of tourism in the economy of Switzerland is significant; it accounts for over four percent of the country’s Gross Domestic Product (GDP). Additionally, tourism industry in the country has helped in brid ging the unemployment rates as it creates employment opportunities both in the urban and rural areas (Datamonitor, 2010). Groux & Jesswein (2011) explain that tourism industry, just like most industries operating in the business environment, is subject to external environmental