Monday, September 30, 2019

Letter to Congress Essay

My name is Vanessa, I am a Registered Nurse currently enrolled in the BSN program at University of Phoenix. I am writing this letter to identify a healthcare bill and discuss its impact on direct service delivery in the public healthcare setting. The letter also presents the cons and pros of the bill, in addition to summarizing the impact of the bill on healthcare coverage and patient care. The aim of the letter is to request your support for the bill. The healthcare bill that needs your support in order to ensure successful implementation and improved healthcare services delivery is a bill that offers healthcare coverage for illegal immigrants not covered by the Affordable Care Act. The Bill is called Healthcare for All. State Senator Ricardo Lara (D-33) sponsors it. The bill aims to extend healthcare insurance coverage to people not covered in the ACA Act (Russ, 2014). The most important aspect of the bill is that it seeks to ensure that healthcare is affordable and accessible to a ll people in the country. The bill is motivated by the fact that failure to provide coverage will create gaps in service delivery. It requires your support because it targets to lower the rates of uninsured citizens through the expansion of healthcare insurance coverage. It is important to note that several pros are associated with the bill. Some of the pros of the Act include introduction of mechanisms such as mandates, subsidies and insurance exchanges to illegal immigrants. The strategy assures that illegal immigrants in States such as California will receive the same healthcare insurance plans afforded to citizens of California. Under this bill, illegal immigrants will be given premium cost sharing reductions and subsidies. The mechanisms increase the coverage and  affordability of healthcare insurance. The bill dubbed Healthcare for All will provide coverage to uninsured residents through the expansion of the existing Act (Russ, 2014). Additionally, it will create new healthc are insurance exchanges, which will enable undocumented people to purchase coverage. The objective of the bill is to create a healthy state where everyone can access affordable and quality healthcare coverage. Under the Bill, undocumented people will qualify for Medicaid coverage that has been fully paid by the state. The bill presents a required solution that addresses inadequate compensation systems and inefficiencies of state healthcare systems. The bill needs your support because it will offer two options to the undocumented immigrants. The first option is the extension of Medicaid to people, who earn below the poverty level. The second option is insurance exchange to people who earn above the poverty level. It will help in minimizing overcrowding in emergency rooms. The main disadvantage of the Act is that it creates new taxes, particularly on citizens. Providing illegal immigrants in California with healthcare insurance is an expensive venture because it will force citizens to pay more taxes in order to address the healthcare needs of illegal immigrants (Russ, 2014). Based on these findings, I request your support for the bill. It is clear that the pros of the bill will improve healthcare service delivery in a holistic manner without the need to discriminate against the illegal immigrants. Supporting the bill shows your constituents and public that you seek to improve the healthcare sector and service delivery. The main impact of the bill is the reduction of the number of uninsured people. Your support is needed in order for Congress to pursue solutions to practical problems that millions of Americans face. Thank you for your time. Sincerely References Jonas, S., Goldsteen, R. L., Goldsteen, K., & Jonas, S. (2013). Jonas’ introduction to the U.S. health care system. New York: Springer Pub. Co. Russ, K. (2014). California Senator Offers Controversial Bill To Cover Healthcare Costs For Illegal Immigrants Not Covered By ACA. Justice Foundation in Defense of Veterans. Los Angeles.

Sunday, September 29, 2019

Nature of Work

Marine Biology also refers to Biological Sciences or Biological Oceanography. Marine Science is the general term for research conducted in oceans and coastal or inland waters connected to the sea. This particular field is probably the best known to the public. Marine Biology deals with the study of micro and living organisms such as plants, animals, viruses, and bacteria in oceans, estuaries, and other bodies of salt water. In the feild of Marine Biology you plan, participate in, and administer research programs for government experiment stations such as private research centers, manufactoring irms, and medical service industries. Tools and equipment for this career includes lab animals, X-Ray and other lab equipment, computers, spectrophotometers, collections of specimens, and a Starting no later than high school, a Marine Biologist should obtain a solid education in as many basic sciences as possible including chemistry, physics, and biology. Mathematics is essential. Plane geometry, trigonometry, solid geometry, and two years of algebra are recommended. Good English is no less important, for both written and oral reports are a big part of Marine Biology. The tudy of a foreign language, especially French, German, or Russian should begin early. Degrees in this study are offered only to college graduate students. Most entry level jobs minimally require a Bachelors degree in a natural science from an accredited college or university. Doctoral degree holders face competition for independent research positions. Those with a Bachelors degree or Masters degree in biological sciences can expect better opportunities for nonresearch In order to be a Marine Biologist or in any line of work, you have to be really dedicated to your job. This is the job I have always wanted ever since I was a little girl. I always loved the water especially the ocean. I think there is so much to discover about it and there are so many marine animals yet to be revealed. If I ever do become a Marine Biologist I either want to work in the laboratory or work in the field. I think it would be interesting to travel to different parts of oceans and discover what kind of plants and animals hide beneath the deep blue waters. Laboratory technicians and testers can acquire more education experience. They can work their way up through research ositions and may reach administrative posts in government or industry. As a rule, high paying postions of prestige go to those with a Ph. D degree and a history of successful research. C. Earnings and Working Conditions Marine Biologists may work in a laboratory, classroom, museum and industrial setting, a botanical garden or zoo, or in a field. They may either work alone or with engineers, technicians, and other scientists at various stages of research or product development. Working conditions vary with the kind of work they do. Indoor work areas may be quiet, well lighted, and air-conditioned. Those who work n laboratories or industrial settings must keep work areas very clean. Ventilation systems generally provide protection from dust, fumes, and odors. Special precautions are taken to protect those scientists who work with infectuous creatures or poisonous chemicals. While working in the field some Marine Biologists travel to coral reefs in tropical seas and ocean waters in cooler climates having to work a The earnings of a Marine Biologist are complicated. Most of these researchers recieve a salary directly from an employer. They write proposals in order to have their research ideas funded by private and overnment agencies. The quality of their results often determines whether they recieve money for future efforts, and consequently, whether they work and for how long. The salaries of a Marine Biologist comes down to each persons education, experience, and At the present time the profession of Marine Biology is one of the least crowded of the science fields. There are only a few thousand Marine Biologists in research, with less than three thousand graduates working and teaching in the United States. Since there is a limited number, opportunities in research are few and competition is stiff.

Saturday, September 28, 2019

The role of motivation in management Essay Example | Topics and Well Written Essays - 1750 words

The role of motivation in management - Essay Example Post WWII, the concepts of mass production, economy and scale, and uniform production methods brought businesses to leadership in their respective fields. During these years the labor pool was made up most significantly of men who learned to be successful by following orders and following through until they were told differently. This is a mindset which created an effective military machine, and brought economic success back to their home country. However, today's labor pool is significantly different. The workers are educated, and have been taught to think as well as work. Today's workers want to know, and to some extent feel connected to the 'why' behind their tasks as well as the 'what' of their daily tasks. To a great extent, these workers no longer hold to the ideals of the previous generation, and are no longer motivated to work for a secure paycheck, and a 30 year career path. Today's workers are looking for an emotional connection, or what researchers call a psychological contract (Clair et. al, 2001) between themselves and their employers in order to feel personally connected to their position. Hence, business a usual, expecting workers to be satisfied by following orders and completing tasks, is no longer a corporate culture which will build a successful organization. CF&F may not yet realize the problems for which it is headed. Surrounded by a corporate culture which has successfully built the organization, the CEO, board and other top executives may not yet be aware of the extent to which the employee dissatisfaction can undermine the organization. We could say that the organization must tame the unruly beast of employee unrest before it begins to negatively affect production, quality, and profits. The company needs to tame the problem before the organization begins to suffer profit decay due to increased costs associated with increased turnover. The following recommendations will use the acronym T.A.M.E. to form a recommendation for change. For the duration of this recommendation, T.A.M.E. stands for: Transformation of the company culture by training upper and middle management in transformational leadership. Authority disbursement from the hands of the upper management to the department heads and workers. Mentoring transformational leaders at every level. They will learn within a measured level of accountability how to lead and transform those under them Empowerment of each department to control their immediate environment and business variables in order to maximize efficiency, and employee moral. Basis for the recommendation Tom Peters and Robert Waterman published Mc Kinney's 7-S Model in their article "Structure Is Not Organization" (1980) and in "In Search of Excellence" (1982). The model starts on the premise that an organization is not just structure, but consists of seven elements: Those seven elements are differentiated into so called hard S's and soft S's. The hard elements (green circles) are feasible and easy to identify. They can typically be found in strategy statements, corporate plans, and organizational charts. The four soft S's however, are less

Friday, September 27, 2019

To Build or Buy (Modell's Sporting Goods) Assignment

To Build or Buy (Modell's Sporting Goods) - Assignment Example ia, Connecticut, New Jersey, Rhode Island, New Hampshire, Delaware, Massachusetts, Maryland, Virginia, and the District of Columbia (Modell’s Sporting Goods, 2013). Exclusive Brand Offerings: the business will offer its customers high-quality goods at competitive prices, which are marketed under exclusive brands. The business will invest in procurement and development staff that sources performance-based goods that are targeted to the enthusiast of sporting for sale under brands. The company’s private label products will present value to its customers at every price point and offer it with high gross. Competitive Pricing: The business will position itself to be aggressive on price, but the business will not endeavor to be a price leader. The business will maintain a strategy of matching its competitors advertised prices. In the case, a customer discovers that a competitor has a lower price of an item; the business will lower its price. In addition, under the "Right Price Promise," just in case within 30 days of buying an item from the company, the buyer finds a lower price by a competitor, the company will refund the difference. The business will seek to offer value to customers and uphold a reputation as the main provider of value. Broad collection of Brand Name products: the business will deal with a variety of popular brands including Columbia, Nike, North Face, Callaway, Under Armor, Adidas, and private label products sold under names that include Walter Hagen and Ativa, which are found in its stores. The breadth of its product selections in every group of sporting goods provides customers a variety of price points. Genuine Sporting Goods Retailer: The business history will be a retailer of authentic athletic products, footwear and apparel, which implies that it will offer athletic merchandise that is of high quality and intended to improve customers’ performance. The business will believe that its customers seek authentic, real product offerings, and

Thursday, September 26, 2019

Critical appraisal of a nursing research study article Essay

Critical appraisal of a nursing research study article - Essay Example ties are being carried, it is important that there be an effective system by which these researches can be appraised to determine their validity and reliability. Wood (2010) explain that reliable research studies provide quality information that can be used in making changes that can cause better and effective systems and human environment. One of the ways of making such a process is conducting a critical appraisal process; critical appraisal can be defined as the process involving careful and systematic examination of research for judging its trustworthiness, relevance and value for their particular contexts. According to White (2008) critical appraisal is very important especially for health professionals, considering the fact that they handle critical matters of human life. Many of the research studies that are carried out on human and animal health are often treated with great esteem considering the changing health problems and challenges in the human environment (Pignone 2005, p. 67). According to Armstrong (2012) an effective healthcare process can only be managed by an application of effective and reliable strategies derived from research studies, which underpins the need for their critical appraisal. This paper examines a critical appraisal for a research that was conducted on the participation of patients in the NHS Bowel Cancer screening programs. The critical appraisal of this research process will undertake the qualitative approach, examining the methodology that was used and its effectiveness (Wake 2013, p. 31). In this case, it will be possible to assess the effectiveness of the research process. According to McCabe (2009) qualitative research processes are known to use approaches that deliver quality information from resource persons, most of whom are carefully selected for the research process. The process of critical appraisal aims at assisting people to develop necessary skills that can help to make sense of various scientific evidences. This

Wednesday, September 25, 2019

International Management Essay Example | Topics and Well Written Essays - 2000 words

International Management - Essay Example Although ethnically diverse teams play a critical role in the success of companies due to the flexibility, receptiveness, and resource utilization that are expected of them (Marquardt and Horvath 2001), the management of cultural differences and conflict has become a challenge for many international organization. Diversity in culture can bring about misunderstanding, adverse relationships, and weak performance, thus the need to effectively manage geographic distances, facilitate control and coordination matters, establish strong communication, and maintain team consistency. Because of this crucial need, numerous studies, even early research such as that of Hofstede and Trompenaars, have been carried out to explain cultural variations in the working environment and the successful management of these differences among employees. Theories on Cultural Dimensions Through my experience as international director, I have learned about the essential components behind a successful expatriate assignment. Theories of cultural dimensions from well-known researchers such as Hofstede (1980) have been of good use in explaining why people are culturally different from each other. National culture plays a crucial part in understanding a workforce that is ethnically diverse as explained through Hofstede’s (1980) cultural dimensions including power distance, individualism, masculinity, uncertainty avoidance, and long term orientation. Power distance indicates the acceptance and expectation of the society, especially the less powerful individuals, that power can be unequally distributed, thus representing inequality. Anyone who has had experience in international studies can point out that all countries and societies have demonstrated inequality in wealth and power distribution, although some are more unjust than the others. Individualism refers to ho w people are integrated into groups; for instance, individualist societies tend to establish loose relationships among its members and each individual is expected to attend to himself and his family while collectivist ones are likely to stay committed to such relations and demonstrate unwavering loyalty to each other. Masculinity indicates how gender roles are distributed; men’s values significantly differ from those of the women such as in terms of assertiveness, competitiveness, compassion, and modesty. The index for uncertainty avoidance suggests how societies can tolerate and accept ambiguity, or whether or not they can find comfort in uncertain and unplanned situations. Unstructured circumstances are often different from the normal conditions and cultures that aim to avoid uncertainty place their efforts in minimizing the likelihood of ambiguous situations through the implementation of strict rules and regulations to ensure control over all. On the other hand, cultures t hat are accepting of uncertainty are

Tuesday, September 24, 2019

Business report Essay Example | Topics and Well Written Essays - 2500 words

Business report - Essay Example Abstract: This report looks at the influence culture has had on the world of business. The report closely examines the methodology used to conduct business between different companies with different origins of country. The report focuses on the communication barrier that is caused to due to the difference in the two cultures and the main issues that arise when conducting business. The report discusses the rules suggested when negotiating, the various phases of a negotiation and the steps that need to be followed while conducting business with organizations from different cultures. The report concludes stating that conducting business in a country according to the cultural norms of that country dramatically improves the chances of success. Foreword: With the concept of multinational business on the rise there is a need for many to effectively communicate with individuals from different parts of the world having different backgrounds, beliefs, and cultures. Organizations have to be pre pared when they conduct business in different countries. ... Aims: The main aim of this report is to discuss the various cultural and communication issues that arise while conducting business in different countries and particularly in UAE. The report also aims to provide various approaches that can be made to ensure success within the business world of the United Arab Emirates. Introduction: Effective communication is important for an organization to function and perform day to day activities smoothly. The expansion of business to different geographic locations around the globe has brought new challenges for the business world. The difference in customs and languages causes difficulty in effective communication within an organization. Cross cultural communication relates to an area of study that deals with communication between different individuals from different cultural and ethnic background. The main issue that arises in cross cultural communication is the different language being used in different countries. The second is proper advertisi ng and understanding the targeted audience of a particular country. The third thing to consider would be the norms of the culture. Fourth would be their customs. Last would be the political influences within a country. These five factors should be addressed when conducting business overseas or when employing individuals from different ethnic and cultural background. Issues: Language barrier Language barrier is a term used to describe the difficulties people face when they do not have a common language to communicate. To counter the effects of the language barrier either one of the two parties or both have to learn a new language. The services of an interpreter can be sought

Monday, September 23, 2019

You Choose Topic Essay Example | Topics and Well Written Essays - 1000 words

You Choose Topic - Essay Example pending on the situation of the company, some issues may carry a sense of urgency while others could be put on the back burner but it must be kept in mind that all ethical issues will need to be tackled sooner or later. An ethical issue which comes up as soon as a company decides to hire or to recruit an individual is the personality of that individual. Since management begins with recruitment and hiring, the two central ethical issues for a company undergoing the recruitment process can be understood as the need to follow anti-discrimination rules and to observe equal opportunity laws (Lockwood, 2005). Simply put, all candidates must be viewed and hired based on their strengths and weaknesses as applicants without any undue weight to their race, age, physical abilities or gender except in situations where such requirements become a part of the job (Alleyne, 2005). As reported by Clarke (2005), even though a lot remains to be done in this particular field there are laws to protect companies as well as individuals from discrimination based on these particular issues. Personality testing on the other hand, is one issue which is not clearly defined by the law and is very easy to circumnavigate during the interview process. In terms of psychology, it is understood that certain personality types are better at certain jobs than others and even though personality itself is complex to define, the generally accepted notion of personality has been the collection of behavioral properties as well as the thoughts and ideas of a person. The earlier work in this field was done by Jung which was later expanded by others. While we may say that person X has a cheerful personality, scientists prefer to classify personality in three models including Factorial models, typologies and circumplexes which are connected with how they perform at work (Clarke & Robertson, 2005). This process can be used to profile candidates but modern discussions of ethics in HR also question if such a

Sunday, September 22, 2019

Has the death penalty in the United States run its course Research Paper

Has the death penalty in the United States run its course - Research Paper Example History of Death Penalty Death penalty law was first established way back in eighteenth century B.C. in the Code of King Hammaurabi of Babylon. In Britain, hanging became the most common method of executing death sentence in the tenth century A.D. However, in the following century, William the conqueror banned all method of capital punishment for any crime. Again, in the sixteenth century some 72,000 people were executed for capital offences like conducting wedding with a Jew, not admitting to a crime, and treason. Since death penalty is a severe form of punishment, the juries did not convict many defendants if the offense was not grave and this called for reforms in the death penalty in Britain. America was influenced mostly by Britain in the methods of death penalty. When the Europeans settled in the newly found land of America, they continued with their practice of capital punishment. In America, the first ever execution that took place was of Captain George Kendall in the Jamesto wn colony of Virginia in 1608. His crime was that he was a spy for Spain. All colonies did not have the same laws of death penalty. The first implementation held in Massachusetts Bay Colony was in 1630 although Capital Laws of New England were not established until years later. Duke’s Laws of 1665 were put into effect in the New York colony and under these laws capital crimes included striking one’s parents or atheism. Attempts to reform the death penalty occurred for the first time in America when Thomas Jefferson initiated a bill to review Virginia's death penalty laws. According to this law crimes that were to be punishable by death penalty were murder and treason. This law was defeated by one vote. In the nineteenth century many states of America brought down the incidence of their capital crimes. Many states like Rhode Island and Wisconsin abolished the death penalty, although most states continued with their practice of capital punishment. Some states increased t he number of offences to be liable to be punished by death penalty, mainly those committed by the slaves. During the civil war, anti slavery movement began more prominent and as such opposition to the death penalty declined. "Progressive Period" of reform began in the twentieth century in America. During the period 1907-17, death penalty was completely withdrawn in six states. Three states kept treason and first-degree murder of a law enforcement official as the only capital crimes. However, this reform did not last for long due to the chaotic atmosphere in America in the wake of the Russian revolution. In addition to that, America participated in World War I and during this period there were severe class conflicts and the socialists became a threat to capitalism. Due to this reason five of the six states which abolished death penalty again established the law of death penalty. In the 1950s, the number of death penalties made a steep drop as many allied nations either abolished or l imited the death penalty. (â€Å"History of the Death Penalty†) Cost of Execution From economic standpoint it is debatable whether death penalty is sufficiently effective for prevention of criminal activities. There are methods that have been proved to be effective for prevention of crime, but resources that are used for the implementation of death penalty are not available for establishing those methods. Costs involved in death penalty cases are much higher

Saturday, September 21, 2019

Crime and Social Issues Essay Example for Free

Crime and Social Issues Essay Many crime problems in my area which are creating difficulties for peoples day by day. I have seen many crimes have been done in my area. * Snatching * Drugs dealing * Shop lifting * Stabbing * Gang fighting * Theft and robbed * The area where I live is ok; I have been robbed for my money a couple of times – nothing too bad. But my friends live in a really bad estate. Theres always stuff going on there. People are shot and stabbed all the time. * It all starts with people getting rude with each other. One person is rude to someone else, and then the victim goes and gets their gang for revenge. Sometimes its just two gangs fighting and punching each other. But on this estate, its nearly always killing. Guns and knives are everywhere. * Its always worse when the gang hires someone else to do the killing. They only give a description of the person they want taken care of. So the hit man hasnt even seen the guy hes going to shoot before. Sometimes they shoot the wrong person. Then, if the person who was killed by mistake was in a gang, their gang goes and gets revenge. So it never ends. * Im most worried about knife crime, because you can get knives anywhere – from the kitchen, shops and people from round the estates. My friend’s big brother was stabbed in the chest with a knife, because he was involved in some bad stuff. * In my school its not so bad because they check us for weapons. The only weapons were allowed are compasses. * Im not so afraid of gangs, because they dont have a reason to go after me. But my friends Dad got involved in drugs. Now hes got some gangs after him because of some trouble that happened. * When I visit my mates on the estate, I feel more protected than afraid, because I know my friends and their brothers are looking out for me. People there recognise me now, so I know even the drug dealers would look after me on their patches. They know Im not causing any trouble. But Id be very; very afraid for my life there if no-one was looking out for me. Snatching: About 10 houses in front of me was this young lady walking by a car parked along the grass patch outside one of the terrace houses. As she was reaching the rear end of this clean decent looking Silver Proton Waja, I noticed the engine started and the left rear passenger doors window was being wound down. Suddenly a man emerged out of the rear passenger doors window his entire torso! And making a grab of this ladies handbag!!!! As this man emerged from the cars window, the Silver Proton Waja was pulling out of its parking position slowly not in a hurry with the man from within just dragging the lady and her handbag along until she gave it up!! Then they drove off slowly no hurry!!! Conclusion: My report about crime problem in my area which I have describe in my report, we should do safety every time and inform to police about any crime or suspicious activities in area or any surrounding area.

Friday, September 20, 2019

Activist Reflector Theorist And Pragmatist

Activist Reflector Theorist And Pragmatist Activists engage oneself totally without unfairness in fresh ideals. It makes them passionate concerning everything new. Whiles Theorists adjust and incorporate observe into difficult however reasonably theories. They choose to be perfectionists who will not take it easy until stuff are organised moreover Pragmatists are eager on experimenting ideas, skills and theories to see if that work in practice. They completely look out for new ideas and acquire the first chance toward testing applications. Lastly Reflectors are fond of reserved to deliberate on experiences and examine them from numerous perspectives. They gather information first hand and like to reflect about it carefully prior to conclusion Honey and Mumford (1982). Furthermore, (Smith, 2003) indicates that, majority of people have a preference in relating to participating in, taking in and processing report to permit individuals to learn. People take on diverse learning styles where best allows people to learn more excellent way. So far, there has been a huge test with the aim to change a persons learning style (Sprenger, 2003). Conversely, students and a lot of professionals note down that, learning achieved from practical experience is more meaningful and relevant than that acquired in the lecture room (Quinn 2000). Making certain that, any student that has a good learning outcome, it is imperative that the learning setting is sensibly, competently, and sensitively helpful to everyone learning within it. Clarke et al. (2003) remarks that, nursing training adds high price on knowledge in the clinical environment; the quality of these clinical setting has a considerable influence on learning process for student nursing. Honey and Mumford (1992) talks about four different learning styles; they portray learners as activists, pragmatists, theorists and reflectors. They added that, though lots of individual had two or more learning styles they may also had a one style preference. To guarantee myself a good learning experience on placement, it was essential for me as student nurse to be conscious about all preferred learning style as practice training is crucial element of nursing program. During placement, in discussion with my mentor, it was established that she preferred a more practical experience therefore she favoured a pragmatist approach to learning. I therefore incorporated her preferred learning style into my planned as a student nurse. Morton-Cooper and Palmer (2000) support that though, in placement the mentor acts as a teacher, it is required for a student nurse to mature into the progress of their learning needs. However to the results of the Honey and Mumford learning style questionnaire, I agree to a high reflector mindset. I consent with the greater part of the report of a reflector, which totally describes me. A Reflector is a careful person who prefers to take a back seat in group discussions (Honey and Mumford, 1992). Being less assertive and tending to hold back from participation, I believe that I will work well and learn more efficiently if play around an activist, as one would be able to encourage me to tackle situations via a more straight out approach. This would enhance my participation in group activities and discussions. According to the result of my learning style questionnaire, Honey and Mumford (1992) test says, I am a very attentive person, as this is one of the potentials of a reflector. I totally consent along this because I constantly akin to pay attention to each person in the group attentively. The opportunity of gaining from diverse viewpoint and different angles has help with my findings. Nonetheless, a likely weakness that I have found within me as a reflector is that, I take too long in doing certain duties. For instance, all through my previous assignment, I spent lengthy time to finish it, because my preparation stage took me a long to get ready. I used up a long time in searching for ideas prior to starting my assignment, this may be due to me, being extra careful on how am going to write this assignment. Even though, this brings out my careful mindset, I do not have the same opinion with the report that someone who is reflector does not take risks. I sometimes like to tread out of my ease to experience new things I have never done before to expand my knowledge. For instance, I chose to leave my home and common environment in London to study in Hertfordshire. Kenworthy and Nicklin (2000) comments, the more relaxed and secure a student feels inside the surroundings, there is expectation that successful learning will take place and the student will be encourage towards learning. Moreover, prior to starting this programme for a student nurse, it is essential to know that, at present we have diverse learning theories and styles to think about. Reece and Walker 2003) utter that there has been write down concerning the means in which people learn and many theories on the ways of effectively learning. The talk was that, the key theories are Behaviorism, Cognitive and Humanism. Regarding, the Behaviorism theory, the learning surroundings is essential to knowledge, and if this surroundings is accurate, learning comes as links are done among incentive, reaction and support (Quinn, 2000a). The Cognitive theory indicate learning like an internal procedure that include high order rational actions like remembrance, thoughts, analytic, insight and way of thinking. (Hand 2006). With Humanistic learning theory (Maslow 1968) is based on the faith that human own two basic desires, a call for growth and a call for positive view through others. It also shows as the most holist ic approach because it is interested in the way in which it compel and inspire of a person to learn. (Reece and Walker 2003) support that these theories too relay on largely on the pressure of the surroundings that might hold back or assist the learning path. In addition, it is vital for me to enhance my learning skill as a reflector. I have planned a number of ways to use prior to, through, and following lectures to help me succeed in this programme. As my weaker style is activist, the initial part of my plan is to create opportunities to initiate and to participate and have have fun in group discussion in class. These give me a head up as to situation that will possibly require action without planning in the lectures. (Heath 2001) support that, discovery of learning strategies in union with person learner preferences is key action in keeping and developing the value of learning programme. The improved potential learning opportunity and result gain from such discovery might have a supportive impact on student nurse. Moreover, when I realise my preferred learning style and the teaching style of my mentor in practice is different. I work out an action plan to support myself and to go on to succeed on this programme, I have to support my weaker style to get used to classroom environment by accepting my preferred learning style, though I am Reflector learner. Nevertheless, research establishes that, growing variety of tuition means used have not been connected with an enhancement knowledge result. However, the truth is that, throughout developing studentsà ¢Ã¢â€š ¬Ã¢â€ž ¢ understanding of their individual learning style, student are enhanced to take charge for their own learning, which improved their learning results (Fritz 2002) Upon reflection, I think learning styles assist me to recognise myself and allow me to identify how to develop myself. With the assessment outcome, I discern and know myself better and have learned from different learning styles. This has thought me why understanding of learning styles is useful to me as a student nurse. Nursing practice Reflects has been positive as the 1980à ¢Ã¢â€š ¬Ã¢â€ž ¢s (Jasper 2003). (Johns 1995) indicate the practice of reflection can be use to evaluate, realisation and study through our live experience. (Jasper 2003) too support that reflective practice is another means you can gain knowledge from experience. In terms of training for healthcare professions, it is identified as a fundamental instrument intended for students to build the relations connecting theory and practice. As a student nurse, it is important for me to realise the worth of reflecting upon my experiences in learning to enhance my prospect learning. In a nut shell, all the way through this module, I boast of higher comprehension and important consciousness of different learning styles. I have been confident towards my own prefer learning style; hence enable me toward completely support myself in my weaker style. Understanding learning styles has undoubtedly revealed the force that it can have on me as student nurse. I currently believe that, I am more prepared to incorporate my preferred learning styles into practice. Since this will be real a huge profit to my prospect profession.

Thursday, September 19, 2019

The Consequences of Drinking and Driving Essay example -- Criminal Jus

The facts are plain and simple, that alcohol and driving do not mix. About three in every ten Americans will be involved in an alcohol related crash at some time in their lives. Every single injury and death caused by drunk driving is totally preventable. To curb this national travesty, concerned Americans need to examine the problems, the effects, and the solutions to drunk driving. First of all, America has had a problem with drunk driving since Ford perfected the assembly line. Alcoholism is a problem in and of itself, but combined with driving can have a wide range of effects. The consequences of this reckless behavior can include a first time DUI or licenses suspension; a small fender bender, or worst of all a deadly crash. Most drivers that have only one or two drinks feel fine, and assume they are in control, which is irresponsible and dangerous. Alcohol is a depressant that slows down the body's ability to react and impairs judgment. To drive well, you need to be able to have a quick reaction time to avoid accidents. Unfortunately, people continue to drink and drive. However,...

Wednesday, September 18, 2019

The Tomorrow City by Monica Hughes :: Hughes Tomorrow City

The Tomorrow City by Monica Hughes The plot of this book centres around two adolescents, David and Caro and an evil supercomputer which aspires to control the futuristic city of Thompsonville.   Dr. Henderson, Caro's Father creates the "perfect" computer designed to solve all of the problems of Thompsonville by gaining almost complete power of the city.   The computer then begins to make rash decisions of it's own. It decides that humans are incapable of making decisions of there own and soon devises a method of controlling the minds of everyone in the city.   Ã‚  Ã‚  Ã‚   Only two young people, Caro and David, are not manipulated by the computer.   They band together and work out a strategy to disable the computer.   The two make a daring infiltration of the building that the computer is located and after a traumatic episode in which Caro is blinded, the computer is destroyed and the city is returned to it's previous state.   The theme of the book is to show that technology is not a perfect solution to the many problems faced by man.   By using a product of technology, the computer, and showing how it was supposed to be a perfect solution to the city's problems, yet it made a grave error in calculations, the author is saying that many problems faced by man cannot be solved by the use of technology.   Technology played a negative role in this book.   The computer, the major aspect of technology used in this book, used its capabilities to immorally rule the citizens and the city of Thompsonville.   The computer transmitted hypnotic signals through peoples T.V. sets and would use them to carry out it's will to ultimately control the city.   It then discarded anything or anyone who were useless to it's purpose including the elderly and the sick. One of the major arguments that the author uses to emphasize the theme is the significant malfunctioning of the computer.   It was designed to be flawless and solve the numerous problems of the city.   But, the computer's rationing is shown throughout the book to be poor.   Ã‚  Ã‚  Ã‚     Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   The methods in which it goes about solving the city's problems

Tuesday, September 17, 2019

Are Cultures Diminished or Enhanced Through the Process of Globalization?

Are cultures diminished or enhanced through the process of Globalization? An essay by Jaclyn Macdonald- 389686 Globalization offers opportunities but presents problems. Connectivity between cultures is developing at an exponential rate. This has ramifications for individual cultures. Increased interaction, principally through new media and greater global mobility creates opportunities to enhance cultures but it carries with it the risk of cultural erosion as external influences may overwhelm attitudes, beliefs and values.Globalization is defined as ‘a process in which worldwide economic, political, cultural and social relations become increasingly connected across time and space’ (Thompson, 1995, 149). Globalization is not a modern phenomenon and has its precedents in the empires of Spain, France and Britain among others. The progressive development of economic and political ties of these colonial powers took decades or centuries to come to realization.The rapidity of th is process has been greatly accelerated by the technological and communication developments of recent decades that have facilitated a dramatic increase in global economic, political, cultural and social integration. Consequently, the world has become increasingly interdependent in the areas of travel, communications, trading and finances, all of which contribute towards frequent cultural interactions and greater mobility of people. Globalization brings about a rapidly developing and ever increasing density of the network of interconnections and interdependencies that characterize present-day social life. Globalization lies at the heart of modern culture; culture practices lie at the heart of globalization. This is the reciprocal relationship’ (Tomlinson, 1999). Globalization alone does not determine the shape and character of culture nor is culture the only influence on globalization. Edward Tyler defined culture as ‘that complex whole which includes knowledge, belief, art, morals, law, custom, and any other capabilities acquired by man as a member of society (Thompson, 1991). The evolution of echnology, primarily new social media, has created opportunities for individuals to choose to embrace or dismiss the aspects of the cultures they are exposed to. Additionally, they can run the risk of losing parts of their own cultures to a wave of foreign influences. ‘One of the most widespread theories of cultural globalization is the idea that the world is becoming more uniform and standardized, through a technological, commercial and cultural synchronization emanating from the West’ (Lange, Meier, 2009, 56).Theorists who support cultural homogenization insist that the spread of globalization has lead to an erosion of cultures and traditions. This view infers globalization to be a euphemism for western cultural imperialism, proposing ethnocentricity will eventually eradicate individual cultures. Identity is commonly deemed fundamental to huma n experience ‘Identity is people’s source of meaning and experience’ (Castells, 1997: 6). The ethnocentric view does not recognize that globalization invariably causes individual culture as David Morley comments, migrants ‘moved from a world in which . . identity was not a central concern, to one in which they were pressed . . . to adopt a particular form of individuality’ (Rantanen, 2005). Manuel Castells writes; ‘Our world and our lives are being shaped by the conflicting trends of globalization and identity’. Opposing homogenization theories, Castells explores ‘the widespread surge of powerful expressions of collective identity that challenge globalization . . . on behalf of cultural singularity and people’s control over their lives and environment’ (Castells, 1997: 2).While homogenization theorists suggest that a ‘global culture’ will dominate all others, Castells proposes that the need for identity d rives cultures to remain individual and as such, globalization thus proliferates cultural identities rather than diminishing them. Global homogenization has an impact on culture by directly affecting the production and use of commodities, social relationships, and the dominance of religion in societies. Homogenization†¦ does not affect how people relate to each other and how they find meaning and purpose in life. It leaves largely untouched the freedom and agency of the subjects in the creating and changing culture, both as individual and as groups (Friedman, 1994). Increasing global mobility has produced a fear of the deterioration of cultures however, people are not merely objects of cultural influences but rather, subjects able to consciously discard or assimilate culture. This choice to embrace culture is now augmented.Integrating cultures can contribute to increasing nationalism due to the human need for sense of belonging and identity, Hall writes; ‘when the era of nation-states in globalization begins to decline, one can see a regress to a very defensive and highly dangerous from of national identity which is driven by a very aggressive form of racism (Rantanen, 2005; 97). Nationalism has thrived to accomplish this sense of belonging throughout history and though national identity may not be everlasting it remains today despite increased global mobility.National identities no longer rely on physical location due to media facilitation as people have gained the ability to communicate and access information to connect to their nation. International students at the University of Melbourne encounter this threat to their national identities. They are submerged in a new location for three years or more with cultures incongruent to that of their homeland. They are faced with the diversity of cosmopolitan Melbourne and the culture of the university itself. Isolated from their native culture, international students would easily become overwhelmed by th e lifestyle of their new surroundings.However, through communication programs like Skype, Facebook, and Twitter they are able to stay in closer contact and with greater ease than students in previous times. People of individual cultures naturally relate to others who share their culture and this bond is immediately apparent when viewing the social relationships on the Melbourne University campus. Students of similar backgrounds, ethnicities and languages can often group together on the university campus, insulating themselves from other cultures.Some groups speak in their primary language in order to distinguish themselves from others and of course to communicate more effectively. The difficulty inherent in this is that language can be divisive as well as inclusive. It can be a deterrent to other students initiating a conversation if they feel excluded. Cultural interaction in tutorials is less divided than in the open and unsupervised areas of campus. Though friendships are often f ormed between those of similar cultures, the interactive style of learning typically deems social groups irrelevant.Students necessarily have to communicate more in tutorials with other people. Australia’s tertiary institutions ‘have an important role to play in the shaping of young peoples’ identities and in the development of active citizenship in an increasingly multicultural and globalized society’ (Mansouri, Lobo, 2011). Multicultural tertiary campuses can offer many advantages for their students by facilitating greater social understanding of cultural differences and similarities. Creating a educational environment which nurtures and manages cultural diversity effectively is not an easy task. This management depends on the professional management and governance of teaching and learning activities’, which allows students to develop their full potential’ (Grobler et al. 2006). Increasing numbers of international students have brought abou t a level of insecurity driven by the belief that common values are being eroded because they are distanced from their native lifestyles. The concept, termed deterritorialization, explains the way in which events outside of our immediate localities, ‘action(s) at a distance’ – are increasingly consequential for our experience.Students with migrant backgrounds, who were born in Australia or have lived here for many years, ‘may have issues with their hybrid identity; mediating between two cultures, that of their parents and that of mainstream Australian society’ (Butcher, 2004; 215-216). Specifically, it is argued that people worldwide now develop a bicultural identity, which distracts from their local heritage. When students leave their home country to study in Australia, they are breaking the physical connection to their local heritage. Modern culture is less determined by location because location is increasingly penetrated by ‘distanceâ€℠¢ (Giddens, 1991).Before the advances of communication technologies, people were only aware of their physical surroundings, which limited their reception of information and cultural influences. ‘Places provide an anchor of shared experiences between people and continuity over time†¦ It enables people to define themselves and to share experiences with others and form themselves into communities’ (Bennett, 1998, 103). Global mobility has increased through the process of globalization, which breaks the physical bond between cultural groups.Modern technology works to reconnect people through communication rather than place. ‘In conditions of modernity, place becomes increasingly phantasmagoric: that is to say, locales are thoroughly penetrated and shaped in terms of social influences quite distant from them. (Giddens, 1990: 18-19)’. The customary method of social interaction has in many cultures progressed into global online communication rather than tradi tional face-to-face interaction. The change in interaction method has produced new social relationships. The decreased need for place in communication is evolutionary in culture.People are no longer determined by their physical surroundings as technology provides them with a choice of the information they receive. ‘When we communicate through telephone, radio, or computer, we are physically no longer determined by where and who we are socially (Meyrowitz, 1985: 115). The processes of globalization has evolved concurrently with media technologies, causing telecommunications to be described as the ‘central nervous system’ of the very process of globalization (Castells 1996, Mansell 1994). Media is vital for providing cultural and symbolic resources worldwide, contributing to its success.Barker has observed, ‘globalization has increased the range of sources and resources available for the construction of identity’ (Barker, 1997). According to many theori sts, the sense of place has been fundamentally changed by the arrival of media and communications. ‘Our world is becoming senseless to many because, for the first time in modern history, we are relatively without place; we are part of a global world’. (Meyrowitz, 1985). What many theorists of place have failed to acknowledge is the increasing connectivity, not only between global places, but also within places.Audiences ‘naturally gravitate towards programming choices that appear most relevant or proximate to their own context and thus allow them to seek the pleasure of recognition of their own culture’ (Straubhaar, 1991) or ‘ultimately people like to see something close to their lives’ (Hong, 1998). The process of globalization creates many benefits for enhancing cultures. The evolution of technology, has most significantly, created opportunities for individuals to view culture as a preference rather than compulsory.People are now able to make an informed decision about their adoption of culture through increased information access, ‘the combination of economic, technical, social and cultural resources held by media organizations had meant that ‘quantatively and qualitively†¦ the media have established a decisive and fundamental leadership in the cultural sphere’ (Hall, 1977, p. 341). Many external influences threaten to diminish cultural individuality however; it is the evolutionary influence of globalization, which has allowed culture to be an individual’s choice, which truly enhances culture. References Appadurai, Arjun. Modernity at large: cultural dimensions of globalization. Minneapolis, Minn. : University of Minnesota Press, 1996. †¢ ? Barker, James, Bernard William Tenenbaum, and Fiona Woolf. Governance and regulation of power pools and system operators an international comparison. Washington, D. C. : World Bank, 1997. †¢ ? Bennett, David. Multicultural states rethinking difference and identity. London: Routledge, 1998. †¢ ? Castells, Manuel. The rise of the network society. Malden, Mass. : Blackwell Publishers, 1996. †¢ ? Castells, Manuel. The power of identity. Malden, Mass. Blackwell, 1997. †¢ ? Coppens, Peter. Ideal man in classical sociology: the views of Comte, Durkheim, Pareto, and Weber. University Park: Pennsylvania State University Press, 1976. †¢ ? Durkheim, Emile, and George E. G. Catlin. The rules of sociological method. London: Royal National Institute for the Blind, 1976. Print. †¢ ? Flew, Terry. Understanding global media. Basingstoke [England: Palgrave Macmillan, 2007. †¢ ? Friedman, Jonathan. Cultural identity and global process. London: Sage Publications, 1994. †¢ ? Giddens, Anthony. â€Å"Chapter 2. † The consequences of modernity.Stanford, Calif. : Stanford University Press, 1990. 18-19. †¢ ? Giddens, Anthony. Modernity and self-identity: self and society in the late modern age. Stanford, Calif. : Stanford University Press, 1991. †¢ ? Hall, Alex. Scandal, sensation, and social democracy: the SPD press and Wilhelmine Germany 1890-1914. Cambridge: Cambridge University Press, 1977. †¢ ? Hall, Stuart. Modernity and its futures. Cambridge: Polity Press in association with the Open University, 1992. †¢ ? Hall, Stuart. Modernity and its futures. Cambridge: Polity Press in association with the Open University, 1992. ? Hong, Junhao. The internationalization of television in China: the evolution of ideology, society, and media since the reform. Westport, Conn. : Praeger, 1998. †¢ Lange, Hellmuth, and Lars Meier. The new middle classes globalizing lifestyles, consumerism and environmental concern. Dordrecht: Springer, 2009. †¢ ? Mansell, Robin E.. The Management of information and communication technologies: emerging patterns of control. London: Aslib, 1994. †¢ ? Mansouri, Fethi. Migration, citizenship, and intercultural relat ions: looking through the lens of social inclusion.Farnham, Surrey: Ashgate, 2011. †¢ ? Meyrowitz, Joshua. No sense of place: the impact of electronic media on social behavior. New York: Oxford University Press, 1985. †¢ Rantanen, Terhi. The media and globalization. London: SAGE, 2005. †¢ ? Straubhaar, Thomas, and Klaus F. Zimmermann. Towards a European migration policy. Munchen: Volkswirtschaftliche Fakultat der Ludwig-Maximilians-Universitat Munchen, 1991. †¢ Thompson, J. B. The Media and Modernity. Cambridge: Polity. 1995. †¢ ? Tomlinson, John. Globalization and culture. Chicago: University of Chicago Press, 1999.

Monday, September 16, 2019

Alcohol Abuse Among the Elderly Essay

Alcohol abuse among the elderly is a widespread problem through the United States. It is hard to discover by physicians and medical providers, because many of these people have been abusing alcohol secretly for years. The population is extremely unlikely to admit that they have problems with alcohol, especially during a routine health care visit. As many as 15% of the population over 65 may be heavy drinkers, although this number is hard to pin down. Elderly people usually drink due to depression, loneliness and lack of social support. Most alcohol abuse comes from a lifetime history; whereas others develop alcoholic drinking patterns later in life. Alcoholism accounts for more than 15% of health care costs in the elderly. It is associated with an estimated 100,000 deaths per year in the United States. Alcohol consumption can produce both benefits and risks. In terms of benefits, men who drink two to six alcoholic beverages per week have decreased mortality rates and lower cardiovascular disease when compared with abstainers. On the negative side, two studies of 300,000 men demonstrated increased mortality among those consuming more than 2 to 3 drinks daily. Women, are more affected by less alcohol than men, perhaps because they have a lower blood volume, and so it’s distribution and decreased activity for gastric alcohol dehydrogenase are increased. The primary care physician plays an important role in making the diagnosis and in helping the older alcoholic receive proper medical and psychological care. As patients grow older, and develop conditions that require prescription and over the counter medications, opportunities for dangerous alcohol/drug interactions increase. Elderly patients should be encouraged to monitor their alcohol intake so that it does not conflict with their medications. When a problem is identified, begin by counseling patients and the family. Increased social support may be all that is needed to stop excessive alcohol consumption by some older patients. Reference Butler, Robert (June, 1998) Alcoholism and the later years. Geriatrics pg. 1-2.

Sunday, September 15, 2019

Boston Consulting SWOT Analysis Essay

Boston Consulting Group has clearly defined that their biggest asset is their people. The group offers an extensive training and summer internship program to prepare the interested, highly experience and motivated future consultant of Boston Consulting. The group offers services in 43 countries and their experienced and trained pool of consultants come from a diversity of experiences and culture. Boston consulting also assures their clients that a collaborative work team is the one priority. Strategic Planning Boston Consulting Group believes in strategic planning as a whole, meaning with their client involved. The group strives on strategic planning and is their biggest driven agenda with entering a new client. The group does not operate on policies of templates and redundant reorganizing of the company. They welcome ideas and creative suggestions for an effective strategic planning. Every client is different in culture and operations. In every client the group searches for new ideas and works with the collaborative approach to its client for strategic success. The group believes that working day to day and side by side with the client allows a higher output of productivity and achieving company goals. This approach also gives us the consulting group a greater experience of their industry and allows for venturing in other market growths for the client and fosters other learning experiences for our consultants. The firm creates a five-year plan for its clients and assists in every step to implement the plan through operational planning. Stakeholders As presented in the SWOT analysis one of our external stakeholders include outside businesses and the general business population. The group also provides pro bono work for many non-profit agencies and provides consulting advice such as in the high technology area and also advice to implementation assistance. The firm also specializes in the turn around approach that  implements the operational and strategic planning. This will allow for a quicker response for companies that need immediate assistance and assist with company growing pains. Once the strategic plans are identified and agreed upon an operational plan is put in place to roll out and go live on implementing the plan for company successes, quick results, and goals completed. Company and clients successes greatly impact the internal stakeholders as well. Other ideas and experiences are obtained throughout the reorganization of a company or even its restructure. All parties involved leave the completion with gained knowledg e and a sense of satisfaction once an operational plan is completed. Conclusion Once voids in a company has been identified and focused on it allow for the firm to recommend other ideas for the company for continued future success and even other joint ventures if any. In conclusion, Boston consulting group was #8 on the Fortune 100 list of best companies to work for and # 3 in 2014. Employees have identified the company’s culture as busy, flexible and ever changing. A place for new and extensive ever-moving assignments all over the world. The company has worked in China and focused on the studies in operations and strategy, to overcome challenges in the China operations. Benchmarks and global strategies were discussed in this study. It is the second of four in a series of special reports on China by The Boston Consulting Group and Knowledge@Wharton. Listed below is an image of their SWOT analysis. Part of the weaknesses of the SWOT analysis is the tough competitors, which in Boston consulting groups case is McKinsey and Bain. Strengths Weaknesses BCG focuses on assisting companies with and efficient and effective business strategy and planning BCG has been unsuccessful to international markets  1st company to be awarded as the â€Å"Best place to work for† Tough competition from other consulting groups means market share is limited Employees have a diverse experience for the robust skill set for the job Opportunities Threats Getting into international business and evolving new concept there rather than sticking only strategy Stiff competition from existing consulting industry players Their green initiatives can create a new opportunity of consultation for them Companies are not setting up their own knowledge and training centers in house. Also larger companies are setting up their own training and knowledge center in house to avoid high consulting fees. However the training and experience will never compare to the actual employees that have years of hands on past experiences or and extensive education background. Boston consulting group continues to strive for the best and grow in more countries and work with a larger diversity in its near future. As #3 in the list of Fortune 500 companies for 2014, BCG will continue to excel in all areas of corporate America and its ever-changing business industry and current challenges. The company and its leaders also provide many business publications for their clients and the general public. Clients and employees alike have found great relationships, learning experiences and continued healthy relationships with Boston consulting group. Reference http://www.bcg.com/about_bcg/default.aspx. (2014). Boston Consulting Group. Retrieved from http://www.bcg.com/about_bcg/default.aspx The Boston Consulting Group SWOT Analysis, (2014). Boston Consulting Group SWOT Analysis, 1-7

Lord of the Flies Essay

In society there are leaders for examples Presidents and Prime Ministers. These leaders need to have certain characteristics, which include respect, maintaining order, and to protect the people. When these leaders start to ignore their responsibilities the society starts to get uncontrollable and mistakes will happen. For an example when leaders ignore protection and safety their actions undermine the groups ability to function, also when leaders ignore respect their actions undermine the groups ability to function. All of this happens in the story written by William Golding Lord of the Flies. All in all when leaders ignore their responsibilities their actions undermine the groups ability to function. To begin, when leaders ignore respect their actions undermine the groups ability to function. When Ralph gets assigned Chief by a vote he makes the rules where some of Jacks choir boys will go hunting and some watch the fire so it does not go out. When Ralph and Jack got into a fight about how Jack does not help out the group with their hunting, and how they are just wasting time because they barely catch a pig or any food for the group he disrespects them: â€Å"Boys armed with sticks.† (Golding,127) This shows that Ralph does not really care for them and their skills that they seem to have according to Jack. After Ralph had said this Jack left the group and asked anybody who wanted to join him could do so if they wanted to. After Jack left with his group him and Ralph are always fighting now but one occasion it gets a little out of hand: â€Å"You’re a beast and a swine you bloody, bloody thief!† (Golding,177) After Ralph said this it made Jack furious he stole Piggys glasses for fire for themselves instead of asking for it he just took it. After this was said Jack also killed Piggy. Ralph being leader and ignoring respect undermines the groups ability to function. As leader, Jack also fails to respect people and keep peace. Jack disobeys Ralphs orders to have to choir boys watch the fire because Jack feels that they need the men to hunt and not get rescued. When the fire went out it could of saved them in that time frame as a symbol of help but he decides to disrespect Ralph and not listen to his orders: â€Å"We had to have them in the hunt.† (Golding,69) After Ralph confronted Jack about the fire going out he refused that he was wrong although he knew he disobeyed Ralphs orders, which in the end could of resulted in getting rescued by the boat that drove by. Now Jack in his own group decided that they need to attack Ralphs camp and steal Piggys specs so they can have fire instead of just asking him: â€Å"Ralph remember what we came for. The fire. My specs.† (Golding,161) Jack invaded Ralphs camp here to steal Piggys glasses to have fire. As Jack said that he came for fire and that the specs were his, although the specs are Piggys. Piggy even asked Jack to give back his glasses but he refused and killed Piggy. Jack is just disrespecting Piggy and Ralph here not listening to them at all. Jack refusal to have respect undermines the groups ability to function. Both boys, clearly fail in their responsibility to have respect. Ralph being voted leader should have respect for others and enforce it instead of ignoring it, having thee problems caused the group to fall apart. Jack on the other intentionally disrespected everybody in the group to get what he wanted . In both cases, however, when leaders ignore respect, their actions undermine the groups ability to function. To begin, when leaders ignore protection and safety their actions undermine ability to function. Ralph being the leader of the group tries to keep it safe for everyone to live so he decides that they need to make shelters for the group. Ralph is trying to make the shelters for everyone but no one will help him except Simon because he failed to maintain order from everyone: â€Å"But you like it!†¦You want to hunt! While I-† (Golding,125) Ralph is clearly upset here with Jack of how he wont help them make the shelters while they go out and hunt for pigs. Ralph not being able to control the group early on had failed him now, since no one will listen to him they have a lack of safety due to them not have shelters for them sleep in. Also at camp the boys have to sleep in the dark one night when the fire burned out: â€Å"We cant get any more wood Ralph not in the dark not at night† (Golding, 125) As shown here there is a lack of protection due to not having the fire at night because it resembles hope. That night they had no hope they had fear. The fear of darkness was scaring the littluns and some others to go in the forest to get wood to keep the fire burning. Jack also fails in his responsibility to keep it safe and protected. During the storm when everybody was dancing, Simon was walking to all the boys and Jack thought he was the beast and went to attack him: â€Å"Kill the beast! Cut his throat! Spill his blood! Do him in!† (Golding,141) Jack is not having safety for the group because he is getting them to kill a human who they think is the beast which is not. After they killed Simon they realised how small the beast was and the found out that it was Simon. Jack saying â€Å"Kill the beast! Cut his throat! Spill his blood! Do him in!† got the group all hyped up and not paying attention who or what the beast was and they just acted and attacked it. After Jack killed Piggy and killed the conch, he attacked Ralph and saying he is the new chief: â€Å"See? See? There isn’t a tribe anymore! The conch is gone†¦ Im Chief† (Golding, 181) Jack is furious here just after he killed Piggy he threatened Ralph that he would do the same. Jack is totally ignoring safety and protection is actually doing the complete opposite ignoring it a killing other people in his tribe. When Jack ignored his responsibility to maintain protection and safety it undermines the groups ability to function. Both boys, clearly fail in keeping the island safe and protected. Ralph tried to protect the group but since he joked around when he was first chief no one took him serious when he needed them to help. Jack totally ignored safety and did the opposite he tortured people, and also killed people. In both cases, however, when leaders ignore their responsibilities to maintain safety and protection it undermines the groups ability to function. In conclusion, when leaders ignore their responsibilities their actions undermine the groups ability to function. When leaders ignore protection and safety their actions undermine the groups ability to function, also when leaders ignore respect their actions undermine the groups ability to function. If all of this happened in our life, we would all become epic fails, just like how everyone did in this book.

Saturday, September 14, 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.