Monday, September 30, 2019

Alcoholic Anonymous Essay

Recently, I attended an A.A. meeting, which stands for, alcoholic anonymous. The meeting I went to was located in Penfield, NY at 1601 Jackson Road, area code 14526. It was called the Yellow House. When I walked in, everyone was very welcoming and nice. Many people stared at me intensely as I entered the Yellow House. I think they thought I was a recovering alcoholic, until I explained to them later that I was there to listen and observe for a school project for my drugs and behavior class. The place was very cozy inside, had a number of chairs lined up for everyone to sit down and coffee ready to drink. I sat down in one of the chairs. A lady came up to me and handed me a coin that said â€Å"24 hours recovery†; this was before I had the chance to tell her that I was there to observe for a school project. I guess when you go to an alcoholic anonymous meeting for the first time you get awarded a 24 hour recovery coin to make you feel good and know you’re doing something good to help you recover from your alcoholic addiction. The meeting started promptly at 5:30 P.M. like it said it would. The leaders read out announcements and let everybody know if someone new has showed up. If you’re new joining alcoholics anonymous, you introduce yourself by saying your name and stating you are an alcoholic, and then everyone else in the room say â€Å"hi†¦Ã¢â‚¬  whatever your name is to make you feel welcome. Then the person can either talk more about why they came or stop talking and then another person will randomly say their name and why they are attending and so on. There was a vast majority of adults and older people in their 50s or 60s. There were a couple grandfathers, grandmothers and one or two kids my age. I sat next to a kid who was around the same age as me and I felt shocked that he would be attending this type of meeting at such a young age. As the stories from the crowd of people kept going on, I recognized everyone clapping very deliberately and diligent at everyone’s accomplishments for the most little to no importance scenarios, for instance, a man got up and said he had been sober for 90 days and everyone clapped for a really long time. I also realized everyone laughed at everything that was the least bit funny to make it feel like a warm, comfortable, atmosphere. There are meetings every night at this place in Penfield at 5:30 P.M. Each meeting has a different name every night. The meeting I went to was called a â€Å"First Step† meeting. It was for people attending the yellow house or an alcoholic anonymous meeting somewhere for the first time and admitting they are an alcoholic and that they want to get sober. When you start the program, you commit yourself to following a â€Å"12 step program† and attending 90 days of alcoholics anonymous. The first step states â€Å"We admitted we were powerless over alcohol-that our lives had become unmanageable.† And when you finish the program, you end with the last step, step number twelve, which states: â€Å"Having had a spiritual awakening as the result of these steps, we tried to carry this message to alcoholics, and to practice these principles in all our affairs.† Attending the alcoholics anonymous groups around the world has changed many recovering alcoholics lives and brought stability to their mind body and soul.

Sunday, September 29, 2019

Honda vs Toyota Essay

The Honda Company was founded by Soichiro Honda . Soichiro Honda was a racer, a businessman, and a manufacturer. But most of all he was a dreamer. He dreamed of a better way of making piston rings, founded a small company, and began production. He dreamed of giving people everywhere an economical form of transportation, and began producing small motorcycles, including one built in 1949 called the D-Type Dream. Soichiro Honda started Honda Motor Company in 1948, at the age of 41. Honda of America Mfg. has been committed to building quality products for their customers and quality communities where their associates live and work. Their Fundamental Beliefs are Respect for the Individual and The Three Joys. The three joys are Joy of Buying, The Joy of Selling and The Joy of Creating  which express Honda’s belief and desire that each person working in, or coming into contact with the company, directly or through or products, should share a sense of joy through that experience. Hondas company principle is â€Å"Maintaining a global viewpoint, we are dedicated to supplying products of the highest quality, yet at a reasonable price, for worldwide customer satisfaction. † Honda Management Policies are Proceed always with ambition and youthfulness, Respect sound theory, develop fresh ideas and make the most effective use of time. Also Enjoy your work, and encourage open communications, Strive constantly for a harmonious flow of work, Be ever mindful of the value of research and endeavor. Honda follows a philosophy they call â€Å"The Racing Spirit†. This philosophy is summarized by Seek the Challenge, Being ready on Time, Teamwork, Quick Response, and Winner Takes All. Honda seeks to minimize waste throughout the entire manufacturing process. This starts with designing production processes, parts logistics, energy management systems and other operations in ways to reduce their impact on the environment. Improving the energy efficiency of Honda factories is the single biggest focus to reduce the environmental impact of its manufacturing operations. As a result, Honda plants are leaders in reducing CO2  and other greenhouse gases. Honda views solid waste generated in their factories as the inefficient use of raw materials. From this perspective, Honda has established a waste management hierarchy at its manufacturing operations with the ideal of producing no downstream waste. The Toyoda Automatic Loom company was founded by Sakichi Toyoda, a prolific inventor, based on his groundbreaking designs. Toyota has a Production System which is steeped in the philosophy of â€Å"the complete elimination of all waste† imbuing all aspects of production in pursuit of the most efficient methods. Toyota Motor Corporation’s vehicle production system is a way of making things that is sometimes referred to as a lean manufacturing system or a Just-in-Time system, and has come to be well known and studied worldwide. This production control system has been established based on many years of continuous improvements. Based on the basic philosophies of jidoka and Just-in-Time, the TPS can efficiently and quickly produce vehicles of sound quality, one at a time, that fully satisfy customer requirements. The concept of jidoka is Highlighting or visualization of problems which is basically the idea that quality must be built in during the manufacturing process. The Just-In-Time concept is basically productivity improvement which means making only what is needed, when it is needed, and in the amount needed. Toyota has seven guiding principles. The first principle is honor the language and spirit of the law of every nation and undertakes open and fair business activities to be a good corporate citizen of the world. The second principle is respect the culture and customs of every nation and contribute to economic and social development through corporate activities in their respective communities. The third principle is Dedicate our business to providing clean and safe products and to enhancing the quality of life everywhere through all of our activities. the forth principle is Create and develop advanced technologies and provide outstanding products and services that fulfill the needs of customers worldwide. The fifth principle is Foster a corporate culture that enhances both individual creativity and the value of teamwork, while honoring mutual trust and respect between labor and management. The sixth principle is pursue growth through harmony with the global community via innovative management. The last principle is Work with business partners in research and manufacture to achieve stable, long-term growth and mutual benefits, while keeping ourselves open to new partnerships. Toyotas has for Action Guidelines. The first guideline is take on the challenge of achieving zero emissions at all stages. The second guideline is Business partners are partners in creating a better environment, Cooperate with associated companies. The third guideline is As a member of society actively participate in social actions. The last guideline is toward better understanding actively disclose information and promote environmental awareness. The four basic policies are contribution toward a prosperous 21st century society, pursue all possible environmental technologies, develop a voluntary improvement plan, and build close and cooperative relationships with a wide spectrum of individuals and organizations

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

Friday, September 27, 2019

Titration Lab Report Example | Topics and Well Written Essays - 750 words

Titration - Lab Report Example In the case of the titration of NaOH with dilute HCl and dilute H2SO4 this point is marked by the sudden and stable change in the color of the base-indicator mixture following titration with the acid. This experiment will determine the volume of the acid used when the end point is reached after 0.1M sodium hydroxide is titrated with hydrochloric acid and sulphuric acid of unknown molarities using phenolphthalein indicator. While wearing safety glasses and a lab coat 100 cm3 of NaOH (aq) was collected in a large beaker. A burette was clamped firmly and filled with dilute HCl  ­(aq) until the bottom of the meniscus of the acid was on the zero line. 25.00 cm3 of the NaOH solution was pipetted (with caution) into a conical flask and then four drops of phenolphthalein indicator added. This flask was then placed on a white tile that was placed directly underneath the burette’s tap. Acid from the burette was added rapidly into the conical flask until the red colour disappeared. The volume of the acid added was noted down as the rough value. The burette was then filled again with dilute HCl (aq) to the zero mark and another 25.00 cm3 of NaOH (aq) cautiously pipetted into a second conical flask and four drops of phenolphthalein added. The acid was then added rapidly until within 2 cm3 of the reading noted earlier, at which point it was added slowly until the colour of the solution in the conical flask just disappeared. The volume of acid used was recorded. These last two steps of the experiment were repeated two more times, after which the entire experiment was repeated again, using dilute H2SO4 (aq) instead of dilute HCl (aq). In this experiment, phenolphthalein was used as the indicator. During the titration, the acid was allowed to mix with the base. In doing so, the pH values changed from basic (>7) towards 7. At the end point, the pH was neutral as this is the point when there are equal amounts of base and acid in the mixture. The chemical equations

Thursday, September 26, 2019

An Analysis of Robert V. Remini's Andrew Jackson Versus the Cherokee Essay

An Analysis of Robert V. Remini's Andrew Jackson Versus the Cherokee Nation - Essay Example Their rationale was that since â€Å"they no longer threatened white settlements,† then they should not be expelled from their lands in Georgia and relocated to the Indian territory, which is located in present-day Oklahoma (48). In addition to this national sentiment against the proposed Indian Removal Act, various individuals that politically represented the Cherokees – John Ross, John Ridge and Major Ridge – sought audience with Jackson on a possible compromise regarding the looming Indian removal, but to no avail (51-53). Perhaps, two other instances that showed the resolve of the Cherokees was when a number of Cherokee chiefs went to Washington in an effort to prevent the signing of the treaty, and when John Ross encouraged the Indians to ignore the newly signed treaty (53-56). Although the author does not mention it, the Cherokees were partly to blame for what happened to them two years after the Indian Removal Act was signed. Had they only remained obedien t to Jackson and the laws of the state, the bloodshed of 1838 would not have been as worse. Much of the blame also rested upon John Ross. Unlike his contemporaries John Ridge and Major Ridge, who were more liberal-minded and were willing to make compromises with the government, John Ross approached the issue rather conservatively and â€Å"acted imprudently and made impossible demands on the President† (52). Among the rather outrageous requests of Ross in behalf of the Cherokee people included a five-year protection of the Indians using federal troops as well as $20 million for the â€Å"reimbursement for losses† (53). Even after Jackson’s rejection of such requests, Ross remained stubborn and encouraged the Indians to remain in their territory even after the two-year deadline had elapsed (55-56). It was, however, the Indians themselves who suffered the consequences as many of them were slaughtered by federal troops and many more suffered in â€Å"The Trail of Tears† (56). If only Ross had not maintained his pride and had only explained to his people the wisdom in obedience, the Cherokees would not have been massacred and would even have perhaps thanked Ross for it. The author, however, puts the blame lightly on the Cherokees and Ross and somehow considers Andrew Jackson the man behind the murders: â€Å"He had become obsessed about removal† (56). Sharp Knife, as Jackson was called by the Cherokees, despite the ruling of the Supreme Court in 1831, perhaps influenced the passing of the law in 1830 â€Å"prohibiting white men from entering an Indian country† (48). Jackson also asked Schermerhorn to secretly negotiate the treaty with the Treaty Party of the Cherokees in an effort to advance the signing of the Indian Removal Act (53). Moreover, Jackson did not show any mercy or concern for the large delegation of Indian chiefs who went to Washington in 1835 (53-54). Lastly, the man who called himself the â€Å"Great Fathe r† of the Indians was the one who â€Å"regularly badgered [President] Van Buren about enforcing the treaty† (56). These were all proofs that Andrew Jackson did not play the game fairly and tried to outsmart the Cherokees by resorting to secret tactics just to have the treaty signed and have the Indians removed in no time.

Discussion #3 STAT Essay Example | Topics and Well Written Essays - 250 words

Discussion #3 STAT - Essay Example All one needs to find a course or topic is either visit the site overview, or browse the courses by departments. Advanced search is another option that can be used to find a particular topic. â€Å"Probability and Statistics in Engineering† is one of the courses offered by MIT which makes part of the curriculum of the Civil and Environmental Engineering. Topics discussed in depth in this course include but are not limited to fundamentals of probability, conditional distributions, hypothesis testing and Bayesian analysis. â€Å"Introduction to Probability and Statistics† is one such course offered by this website that is most closely related to what we have studied in the course as it gives an insight into the basics of probability and statistics. Topics in this course include basic models of probability, confidence intervals and linear regression. The best feature of this website is that the course content is supported with exams as well as their solutions. In this sense, this website is a complete online source of

Wednesday, September 25, 2019

Decision in paradise part II Case Study Example | Topics and Well Written Essays - 1000 words

Decision in paradise part II - Case Study Example The People of Kava settle down but within a short while, they are quickly disoriented by yet another catastrophe that they all too well expected to happen. Our company is here to improve the well being of the people of Kava. The already established company intends to change the island a found paradise. It is so lost in a series of confusing and intertwined events to realize that it is a have by itself. The majority of Kava Island's population is aged 15 years and below. It is a culturally diverse island with a combination of people with 50% coming from indigenous tribes, French, Americans, Africans, and Spanish. The people of Kava are basically of indigenous belief. As a matter of, 50% of the people have an indigenous faith while the rest is a mixture of English, French and Spanish. The main economic activity is farming of spices, cocoa bananas and coffee. They also are involved in extraction of petroleum. The company will step by step take full advantage of these terrible disasters in Kava and turn them into opportunities. Whatever it is that we have to do however must be beneficial to both our company and the population of kava. After all, that's what intelligent business people do. As on employee of this company, I will have to adopt a decision making model that will help me turning this around. The main source of our strength is that the management of t... It is particularly impressed by the company's progress and development. The organization is efficient in all the operative departments, this includes the HR, Finance, Strategic planning, Marketing among others. The organizational structure and process is also reputable. For instance, the departments are decentralized for fast and effective decision, making. The threat is mainly the catastrophic nature f this land. Projects can be cut short or even destroyed try the numerous natural disasters. This however is our greatest opportunity as we will capitalize on re-carpeting, renovating and rebuilding the mess left behind by the calamities. Our only weakness is the workforce we have. The employees are not well versed with disaster management; the workers also require more expertise. To make a greater impact in the island and reap even more benefits, the company's human resources department intends to recruit more workers who must also be experienced. Various training and development measures will be put in place to empower the employees that we are currently having. To implement this the manager in the human resources department will organize for both on-the-job and off-the-job training. The employees who are based in the technical departments will be scheduled for on-the-job training while the rest will settle for seminars, workshops and other forms of training. To motivate the workers, the management will make a point of consulting them when doing the performance appraisal; they will also be consulted when making important decisions. To ensure that they do not resist organizational change, the workers will be involved actively in proposing the necessary changes in the company's management, strategic options and business expansion. In

Tuesday, September 24, 2019

Is now a good time to buy shares in Marks & Spencer PLC (500words) Essay

Is now a good time to buy shares in Marks & Spencer PLC (500words) - Essay Example A historical review of the financial performance of the firm would suggest that its performance during last five years have remained consistent i.e. the overall revenue of the firm increased from $14.726Billion, in 2004, to $17.990 Billion in 2008- a growth of more than 22%. It is also critical to note however that the firm recorded negative growth in revenue during 2005 & 2006. (Hoovers.com, 2008). Operating Profit of the company showed an improved performance by recording a growth of over 65% during the same period i.e. Operating Income was $1.461 Billion in 2004, whereas in March 2008, it was 2.415Billion. The Net Operating Cash flows during last five years have been positive and have shown considerable growth from 2004 to 2008. Net Operating Cash Flows were $633.5 Million in 2004, whereas during 2008, Marks & Spencer recorded net positive cash flows of $2.133Billion. Return on equity remained consistent during last five years i.e. 0.6% in 2004 & 1.2% in 2008.

Monday, September 23, 2019

Perioperative practice Essay Example | Topics and Well Written Essays - 1000 words

Perioperative practice - Essay Example times the patient is not in a position to take decisions regarding health care for reasons such as being under medication, labor, mental illness, so in that case ‘Consent is not needed when patients are incompetent to give it (young children, unconscious patients, etc (Len Doyal, 1997) Research studies have shown that ‘there might be language/literacy problems in obtaining informed consent.’ (Lloyd, Cathy E. and Johnson, et al., 2008) In such cases, the medical faculty gives a thorough explanation of the best procedures to the patient based on her other health related problems. By informing our patient completely on the nature of all the decisions and procedures, in addition to the alternatives and interventions available, she was in a better position to participate in the decision-making process by weighing the pros and cons and finally giving consent because of the legal and ethical right at her disposal. According to (Campbell, et al., 1998) â€Å"Integrated care pathways are structured multidisciplinary care plans which detail essential steps in the care of patients with a specific clinical problem and describe the expected progress of the patient† Understanding on the part of the patient as well as the doctor about the Care planning pathway, puts them in a better position to make preparations before the actual operation can take place. (Scott I, 1999) explains that integrated care pathways â€Å"are an opportunity to identify good practice, remove bad practice, identify and apply evidence, identify education and training needs and appreciate the skills and contributions of all professionals and care sectors.† This step is very important because it helps the patient to understand all the risks and benefits involved in the process and also the areas of ambiguity. After a clear discussion the physician got the consent of our patient on a written document and explained to her that she was not a mere spectator but played a vital role in the decision making

Sunday, September 22, 2019

Preliminary Screening of Bioactive Natural Products Essay Example for Free

Preliminary Screening of Bioactive Natural Products Essay The plants which are used to cure diseases are called medicinal plants. This property of plants is due to the presence of certain chemicals namely Phytochemicals which include alkaloids, Glycosides, flavanoids, volatile oils, vitamins, resins, gums etc. These chemicals terminate the growth of micro organisms by obstructing one or many metabolic activities of microbes. World Health Organisation has estimated that perhaps 80 % of the Earth’s inhabitants rely upon traditional medicine for their primary health care needs and a major part of this therapy involves the use of plant extracts or their active principles. Plants form the major resource in the preparation of drugs in many ancient systems of medicine like Ayurveda, Unani, Homoeopathy, Naturopathy, Siddha and Allopathy. Our present work mainly aims at the screening of Bioactive compounds present in wood and fruit of Terminalia pallida Brandis Terminalia pallida is a semi evergreen tree belongs to the family Combretaceae and its telugu name is called Tella-Karaka. Wood and fruit are highly medicated due to the prescence of bioactive compounds. These parts are widely used by the tribals of various districts of Andhra Pradesh to cure diarrhoea, peptic ulcers and diabetes. Fresh plant parts were collected, shade dried and ground in to coarse powder. Extraction of Bioactive compounds can be done with different type of solvents for further phytochemical analysis. Results obtained in the present study reveals the presence of Flavanoids, Indoles, Leucoanthocyanins, steroids, Phenols, Saponins, Tanins in the wood of Terminalia Pallida. Fruits consist of all the above bioactive compounds along with alkaloids. These bioactive compounds are responsible for antidiarrhoeatic, anti-ulcer and anti-diabetic properties of the plant. The present communication attempts to assess the status of phytochemical properties in wood and fruits of Terminalia Palllida , Brandis to develop the awareness among the local people. It is also useful to the advanced research in the Pharmacertical field.

Saturday, September 21, 2019

Strategic Management Industry Structures And Dynamics Business Strategy Essay

Strategic Management Industry Structures And Dynamics Business Strategy Essay Introduction: Dell Company was founded in 1984 by Michael Dell. It is the worlds largest direct-sale computer vendor; Dell Inc. is now also the leading seller of computer systems in the world, capturing a global market share of more than 15 percent. Dell markets desktop personal computers, notebook computers, network servers, workstations, handheld computers, monitors, printers, high-end storage products, and a variety of computer peripherals and software. In this part I will use Porters Five Forces to analysis Dells great success in the industry. Force 1: The Degree of Rivalry. The PC industry consists of a number of companies; hence the threat from industry competitors is high. Due to the product being highly standardized and shifting costs between brands is low, there is fierce competition which leads to lower margins and profitability in the market. The PC industry can be described as a high competitive industry. For Dell the main competitors are IBM, Apple, HP, TOSHIBA, Gateway etc. Dell uses several strategies to reduce the competitive rivalry between existing players. Firstly Dell differentiated its sales from other competitors. Dell used the direct sales strategy since 1984. To sell PCs directly to consumers, by passing retail stores and system integrators and offering limited customer support but dramatically lower prices. For years, that direct, low-cost sales model worked perfectly. It allowed Dell to make high margins while selling computer gear for less than its rivals. As a result, it now holds a leading 17.9% share of the world PC market and has grown much faster than competitors Hewlett-Packard and IBM. With thousands of phone and fax orders daily, $5 million in daily Internet sales, and daily contacts between the field sales force and customers of all types, the company kept its finger on the market pulse, quickly detecting shifts in sales trends and getting prompt feedback on any problems with its products. If the company got more than a few similar complaints, the information was relayed immediately to design engineers. When design flaws or components defects were found, the factory was notified and the problem corrected within a matter of days. Management believed Dells ability to respond quickly gave it a significant advantage over rivals, particularly over PC makers in Asia, which made large production runs and sold standardized products through retail channels. Dell saw its direct sales approach as a totally customer-driven system that allowed quick transitions to new generations of components and PC models. i Secondly Dell provided good customer service to compete with its rivals. In 1986 the company began providing a guarantee of free on-site service for a year with most of its PCs after users complained about having to ship their PCs back to Austin for repairs. Dell contracted with local service providers to handle customer requests for repairs; on-site service was provided on a next-day basis. Dell also provided its customers with technical support via a toll-free number, fax, and e-mail. Dell received close to 40,000 e-mail messages monthly requesting service and support and had 25 technicians to process the requests. iiBundled service policies were a major selling point for winning corporate accounts. If a customer preferred to work with his or her own service provider, Dell gave that provider the training and spare parts needed to service the customers equipment. Force 2: The Threat of new Entry. Firstly, Dell created a brand image to reduce the threat of new entries by advertising. Dell was the first computer company to use comparative ads. Its advertisements have appeared in several types of media including television, the Internet, magazines, catalogs and newspapers. Secondly, Dell cuts its price or offering free bonus products in the effect to maintain its market share. In 2006, Dell cut its price in an effort to maintain its 19.2% market share. However, this also cut profit-margins by more than half, from 8.7 to 4.3 percent. To maintain the strategy Dell continuing to accept the online and telephone purchase. The brand loyalty and the low price built up a barrier of entry for the new companies. Force 3: The Threat of Substitutes. Other devices like PDA, handheld electronics etc. are now coming out with features similar to PCs. The mobilebility is the key factor of the competition. Dell generate a smaller size laptop called mini which only has a 10.1 inch screen and only sells at the price under  £200 which is even lower than some of the handheld electronics. With the efficiency of mobile and the same function, for example Wi-Fi and Bluetooth, Dell protects its market share against those substitutes. Force 4: Bargaining Power of Customers. Dell built up its brand loyalty to reduce the bargaining power of customers. First, Dell had its own system and strategy to manage the relationship with customers. Since Dell use the direct sale strategy, customers can buy Dells products from the website or ordered by phone or fax. The customers then can personalize their computer by choosing the configuration of the computer (e.g. RAM, processors, and hard-disk capacity). On the Dells website from which people can directly choose, buy and give feedback, it divided the customers into four major groups home users, small medium business, public sector and large enterprise. Dell then treats different groups differently by offering the special service they need from different groups. For instance, Dell provides special solutions and services for higher education. Such as data consolidation and management, HPC (high performance computing environments), wireless solution, connected classroom etc. Because of its direct sale strategy, Dell can easily track the service for any individual buyers. All the buyer information will be stored in its system; dell can differentiate customers and send relevant product information and services to different customers. These special strategies in selling upgrade its brand image among customers. Second, Dell uses the advertisements to help building up its brand image. On the website, TV, newspaper, high street, people can easily find dells advertising. Those can not only increase dells market activity but also increase its brand pride. Force 5: Reducing the Bargaining Power of Suppliers. Dell has a special understanding on the SCM (supply chain management). Dells strategy is to limit the amount of supplier but pick up some outstanding supplier all over the world. Each supplier has a very close relationship with Dell in long-term. Dell uses its huge globe market to share its business with its entire suppliers. For instance, Dell built a assemble factory in Malaysia, its supplier from Ireland soon built a factory in there as well in order to gain a geographic efficiency. Dell had its assemble factories all over the world which relatively close to its suppliers. This will save a lot of transport costs. The double-win strategy makes the supply chain works well. With the double-win strategy and constant relationship, Dell will be able to ask lower price from the suppliers and reduce the bargaining power from them. Market part: Segmentation Introduction: Michael Dell emphasized the significant status of customers to the companys business by stating Finding ways to get close to your customers is critical to your success. Since different people would have different need from the computer, Dell divided its customers into several segments by discovering special needs from each segment. In the year 1994, the customer group was only divided by two primary customer and normal customer. In that year the assets of Dell is 3.5billion USD. In July 1996 Dell launched its online website www.dell.com. On the website primary client are divided into three segments which are large company, medium company and government education. Customers can easily choose and buy the products directly with advices and helps from dell.com. The assets of Dell rocketed up to 7.8 billion USD in that year. However in 1997, Dell continued differentiating its customer for more segments. Government education segment was divided to State Local Government, Federal Government and education. Small company and home users were also been created as individual segments. The net revenue of Dell was 12 billion in that year. On todays Dells website, people will be able to follow the tips and choose a suitable computer in few minutes. Whats more, customers can personalize their chosen computer by changing the configuration of the computer (e.g. color, RAM, processors, and hard-disk capacity). With this direct sale through different segments, Dell can start to assemble the computer once the transaction has been made. The inventory can then be limited as low as zero. Not like Dells competitors, Dell does not need many warehouses all over the world which will save a lot of costs for the company. Although on todays Dell.com, customers are divided into a lot segments. However, literally customers are differentiated into two segments; Relationship customers in opposing Transaction customers. Although Dell intends to build and maintain a good relationship with all customers, it also becomes clear, that the company would regard some customers more relationship worthy than others, by analyzing customer value. The relationship customers are mainly large enterprise and government etc. which occupied 40% of Dells entire customer. Transaction customers are small business and home users which have percentage of 30 among customers. The remaining 30 percentage customer is regarded as a mixed customer. The advantage for dividing customers in different segment is that the company would be able to analysis how it can encourage the customers to buy its product. For individual users or small business price is the priority. Those customers are regarded as more price insensitive. So for home and small business users the price is slightly lower than its competitors e.g. HP, Toshiba and Sony. For bigger customers such as the government or enterprise, they consider more than the price but consequent services and supports. Take large enterprise for instance, Dell supports a lots of specific services and solutions for running the business. Like Infrastructure Consulting service which is basically a plan for simplifying IT infrastructure, helping reduce operating costs while freeing up resources for new business initiatives.iii Also, Dell runs a program called Dell business Creditiv. This is the same as a loan offered by Dell, but with no interest rate and anytime to pay off the balance. Business without enough cash flow would like to take that program. One of the Dells competitors is IBM, it has a clearly customer segmentation but different from Dell. IBM is more focusing on Business and Industry market. In a simply word it is even more focusing on the Big customers. Similar as Dell did for big client, but even did more specific for the segmentation. For Dell there is no segment for industries like Aerospace, Chemicals and petroleum. More segmentation on large customers also brings more services and solutions for all kinds of industries. One of IBMs famous solutions is offering the security management for Wimbledonv. It provided the security solution for players, staff, media and spectators around the world. Conclusion: Dells market share was No.2 in 2009, IBM was far behind. But since Dells customer groups is much bigger than IBMs. In 2006 IBM sold its PC department to Lenovo, Lenovo used IBMs brand to product and sell IBMs ThinkPad series. It is very difficult to compare which segmentation is better. But for the large business users, IBM is a very strong competitor against Dell, Its high performance computer and advanced technical solutions and services makes IBM the biggest company for larger business and industries. i scribd.com Dell operation ii McGraw Hill Dell Computer Corporation mhhe.com/business/management/thompson/11e/case/dell5.html iii Dell.com Large Enterprise service iv Dell.com business credit v IBM.com Wimbledon case study

Friday, September 20, 2019

E-Commerce Makes Life Better ! Essay -- E-Commerce Internet

E-Commerce Makes Life Better ! E-commerce means that the company runs their business online, not like the traditional business way. We have to go the shopping mall or store to get goods that we need, E-Business is the enabling of electronic communication between any two or more participants in a business relationship. It helps companies capture abroad business field, cost saving, and market opportunity. E-commerce is an important factor that is making people’s lives more efficient. This is the report according to the survey I did in IUP. Seven out of ten people say they prefer to buy goods from e-commerce. The reason is they said that it is convenient and time saving. According to the survey most of them agree that the service is fast. For an example, the delivery is fast. If you purchase something from e-commerce you will get the stuff within two weeks time. Beside that, the price is slightly cheaper than those goods in the shopping mall. But it depends on season, if you buy goods during the clearance season, such as New Year sale, summer sale or winter sales goods in the shopping mall probably will be cheaper than goods that offer in the e-commerce. Seven out of ten people prefer market form, which mean that you know the price and information. You can buy it on the spot. So it saves time compared to bid form. If you choose bid form to buy things, most of the time you can get it cheaper but it take a longer time. And you can’t confirm that you will get the product. So that the reason why most of them choose market form. In addition, the product quality more or less the same as the product in the shopping center. For the security aspect. I had to interview a girl. He... ...sides that, you also can learn other things from e-commerce. Such as we can learn more about the business cycle, and what consumer needs. So you know what kind of product that is suitable in that period of time. For an example, remote-control car and cameras are the best product to sell during the summer, because most of the people like to do outdoor activities, so that kind of product is easy to sell. In conclusion, e-commerce makes our life much more easier, because it saves time, we can get our goods with in a short period of time, other than that it connects to businesses around the world, we can buy goods that we can’t get from the local market. The last thing we also can get goods that are not available in the shopping mall and with the cheaper price. As I know, using e-commerce to shop online is the right choice for because it is so convenient.

Thursday, September 19, 2019

Women in Music Entertainment Essay -- Alicia Keys Gwen Stefani Essays

Women in Music Entertainment There are so many talented female artists in music today that it's hard not to think of some right off the top of my head. Not only do they have great voices, but they're successful and confident, not to mention pretty darn rich! Some of these artists knew that they were going to become a star while they were still in diapers. The two females that I will be highlighting are two of the younger musical talents that are out in the industry at this time. They both worked hard to get to where they are today by starting off with many of the same dreams and aspirations many of us women share. These women have contributed so much at such a young age that it's almost hard to believe. Music is such a strong influence to many people today. It's especially nice when you can relate to the message that the singer is trying to provide. Sometimes it's almost as if the person is singing about your life or a situation that you are also going through. Music can heal, it can bring joy, pain, forgiveness, and realization to many of the problems we face today as women, or just as people. The first talented musician that I would like to talk about is a beautiful young woman who is pretty new on the scene, Miss Alicia Keys. Alicia Keys, who is biracial, grew up in Manhattan, New York, with her ultra-supportive mother, who put Alicia through piano lessons at the age of five. She studied classical music, and grew up to collaborate it with a jazz/hip-hop/R&B soul kind of sound. Not only can this girl sing and play the piano, she also writes her own music. Highly sought after by different record labels, Alicia Keys was signed to Arista Records in 1998. There, she continued the proc... ...o a whole new level. Gwen is always ever changing and an inspiration to many people. Her look is so different from others with her unique fashion and personality. She has even collaborated with other types of artists such as "Moby," and rapper "Eve." Gwen has graced the covers of numerous magazines, and her videos can be seen about everyday on MTV. "I'm going to be myself. I can't pretend I don't like to wear lipstick. I can't pretend that I didn't grow up playing Barbie," she said. "I guess a lot of girls feel the same way. I feel really kind of proud for that fact. I never thought I'd influence anyone," said Gwen in her interview. Well Gwen, you don't have to pretend. You're at the top, and making great music. I like you just the way you are. I'm sure many would agree! Oh, and keep on the lookout for No Doubts new CD â€Å"Rock Steady† set to come out on December 11th.