Thursday, November 28, 2019

A Comparative Analysis of Public free essay sample

The study would try to throw some insights into the existing services provided by the banks and the gap between the customer expectations, perceptions and the actual state of performance. The results of the study would be able to recognize the lacunae in the system and thus provide key areas where improvement is required for better performance and success ratio. 1. 2 Research Objectives: (1) To find out the level of expectation and the level of perception of the customers from the services offered by the banks. 2) To compare the level of perception and expectation of the services offered by the banks. This instrument has been widely used by researchers, but still, there are some controversies in its applicability across different service industries. In some studies the five dimensions of the instrument (determinants) have been found to be unstable across different types of services. Therefore, the tool should be applied very carefully and the set of determinants and attributes used should be adapted to the specific situation. We will write a custom essay sample on A Comparative Analysis of Public or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page †¢ Chi-Square test of independence The test is applied when there are two  categorical variables  from a single population. It is used to determine whether there is a significant association between the two variables. For example, in an election survey, voters might be classified by gender (male or female) and voting preference (Democrat, Republican, or Independent). We could use a chi-square test for independence to determine whether gender is related to voting preference. This approach consists of four steps: (1) state the hypotheses, (2) formulate an analysis plan, (3) analyze sample data, and (4) interpret results. 1. Hypothesis: A chi- square test for independence has been conducted for knowing the relation between the age group and the preference towards the two types of banks. Preference towards public/private sector banks and age group are independent of each other. ? H1: Preference towards public/private sector banks and age group are dependent of each other. 1. 8 Limitations of the Study: ? Respondents may give biased answers for the required data. Some of the respondents did not like to respond. In our study we have included 50 customers of each bank because of time limit. The world of commercial banking is undergoing a deep transformation as a result of marketable instruments competing with loans and demand deposits. Because of this strong competition, commercial banks are struggling to make acceptable margins from their traditional business entering into investment banking. Increasing competition has forced banks to search for more income at the expense of more risk. Banks that lent heavily to Asia in search of better returns than those available in Western markets are now being blamed for bad credit decisions. The Asian crisis has renewed interest on credit risk management casting doubts on the effectiveness of current credit regulations. Technological changes have also heightened competition by making it easier to imitate bank services. The traditional advantage of physical proximity to clients given by extended networks of branches has vanished. Banks have to compete with money market mutual funds for deposit business, commercial papers, and medium-term notes for bank loans. As margins are squeezed, commercial banks in the United States and Europe have been forced to cut costs and branches while diversifying into pensions, insurance, asset management, and investment banking. In the United States, many banks call themselves financial service companies even in their reported financial statements. Diversification, however, has not always proved to be an effective strategy, and many banks have had to revert to a concentrated business. These examples illustrate how commercial banks are reinventing themselves, not just once but many times. All these changes are creating an identity crisis for old-fashioned bankers, leading to the key question, â€Å"What is a bank today? † The question is difficult, but evidence suggests that the concept of banking is being modified and the traditional barriers among financial service Sub industries (retail banking, private banking, investment banking, asset management, insurance, etc. ) are vanishing. Illustrating what an entity does or serves for often is a useful way to define it. The identity crisis of banks—especially commercial banks—stems from the deep and rapid changes in their traditional body of activities (particularly retail and corporate banking). On the other hand, investment banking, private banking, and banc assurance are the most profitable and fastest growing segments of the financial service industry. As banks undertake new activities, they also incur new risks. Since boundaries among sub industries are weakening, if not vanishing, banks—like all other financial service companies—must redefine themselves in terms of the products they offer and the customers they serve. The way banks pursue this redefinition is through a strategic repositioning in the financial service industry. All these factors represent a new challenge for commercial banks, provided this definition still has a unique meaning. Increased competition, diversification, new products, and new geographic markets mean that both the spectrum of risks and the risk profile for banks are dramatically changing. Defining a Bank in 2010 The scenario commercial banks face today differs greatly from that of the past. Diversification among sub industries is defining an environment where banks compete with other financial-service companies to provide mutually exclusive products and services to the same customers. Traditional branch banking is under the threat of new competitors and technological innovation, leading some analysts to wonder whether banks are dying. Most likely what is dying is the old-fashioned concept of the bank and a new scenario is emerging. Banks are changing as economic markets integrate, providing opportunities for diversification. Only 15 to 20 years ago, most Western banks generated 90% of revenue from interest income. Now this percentage has fallen to 60%, sometimes as low as 40%. New sources of income, such as fee-based income from investment services and derivatives, are becoming increasingly relevant for the income statements of commercial banks. During the same period, the pattern of banking activities has changed through interactions with the developing security markets. The well-known phenomenon of disintermediation that has taken place in all Western countries since the 1970s has progressively reduced the monopoly of banks over the collection of savings from customers. This has created much tougher competition among financial service companies and has forced banks to find new and diversified sources of income. The traditional core business of commercial banks has been retail and corporate banking. As retail and corporate banking become less and less profitable, banks are diversifying into new businesses to stop the decline of profits. Investment banking, for example, is estimated to be worth US$14 million, with an annual growth rate of about 14% up to 2010. Derivative based earnings for larger commercial banks now account for about 15 to 20% of the total earnings. The drawback is that volatility of earnings has dramatically increased. The management of these new types of risk—typically, market risk and credit risk on traded assets—requires competence and expertise. Hence, the risk profile of commercial banks is changing as a consequence of diversification. Capital markets are playing a key role in defining the bank of the twenty-first century, but they are also making banks riskier. In fact, with a few exceptions, AAA ratings for banks have disappeared and consequently the importance of market risk management is being emphasized. Future competition will not be played in the classic retail banking industry that, at least in continental Europe (but not in the United Kingdom), is only slightly profitable. Global competition will take place in asset management and investment banking. Not casually, huge U. S. investment banks are merging among themselves and with asset management firms. Alliances and takeovers are occurring also on a transatlantic basis, confirming the global characters of these two sub industries (the most related to global capital markets). The following trends are affecting the banking industry and most likely will shape the competition in the next several years: †¢ The market share for financial services that banks hold is declining, while securities firms, mutual funds, and finance companies are getting a growing share of available customers. In the United States, the share of total assets held by banks and other depository institutions relative to all financial intermediaries fell from 56% in 1982 to 42% in 1991, and this downward tendency is likely to continue. Banks will face growing competition from financial service companies and nonbank firms. †¢ Disintermediation is making traditional banking less and less necessary, leading to consolidation. The natural shrinkage of the market share held by commercial banks started this process in the past decade, but it has dramatically accelerated in the past few years because of global competition. †¢ To remain competitive, commercial banks will have to exploit new sources of income: Offering new services (selling mutual funds or insurance policies). Charging customers with noninterest fees. Offering new services through the phone and the web, Entering into joint ventures with independent companies, Entering new geographic markets yielding higher returns. †¢ Banks will need more expertise to manage new sources of risk. Market risk management models must become an integral part of a bank’s risk management culture. RETAIL BANKING [pic] The two main forces changing the competitive environment in retail banking are technological change and aggressive new competitors: 1. Technological change is creating huge problems for traditional banks with extended and costly branch networks. The major technological issues affecting the retail banking business are the rise of telephone banking and the impressive diffusion of the Web-based banking. These innovations make branch networks less important and national boundaries irrelevant. Computer banking, either through the Internet or proprietary networks, is gaining a growing and growing importance. 2. New unrelated competitors are entering the retail banking market. In the United Kingdom, the country’s two biggest retailers, Sainsbury’s and Tesco, have gone into partnership with the Bank of Scotland and the Royal Bank of Scotland, respectively. Sainsbury’s Bank offers a savings account, two credit cards, and personal loans and mortgages, with more services to follow. Tesco Personal Finance offers only a savings account and a credit card, but aims to expand its range. These trends do not indicate that traditional branch banking is going to die, but that the competitive scenario is changing. High-street banks have expensive branch networks and relatively outdated procedures, with far greater operating costs than their new, more flexible rivals.

Sunday, November 24, 2019

Free Essays on Margaret Sanger And The New Era Of Women

Imagine a world that is overpopulated with children. The number one reason why families are poor are due to the fact that they have too many children. But in today’s society overpopulation is not a problem due to the wonderful birth-control movement of Margaret Sanger. In the early 1900s sexual relations were used for the sole purpose of procreation, but as society changes, sexual relations became more for recreational purposes more than procreation purposes. The 1920s brought forth a new era for the middle class women. A woman’s role was most indefinitely redefined. Motherhood was no longer seen as every woman’s maternal instinct and was claimed to be not sufficient enough for child rearing. Now mothers were expected to seek and rely on the advice of professionals such as doctors, nurses, and trained educators in nursery school and kindergartens. Up until this point, this was the only role that women knew. These changes devalued what had been a very important and consuming activity. In order to compensate the loss of this very important role, many women now turned to another role: being a wife and companion to their husband. Previously women were consumed with the role of being a mother more so than the role of being a wife. But now a woman’s relationship with her husband assumed a greatly enhanced importance. Therefore, a woman’s sexual relationship with their husband was not solely considered a means of procreation, but now it was considered important and a very pleasurable experience. This also led to romantic love because a women’s sexual relationship was now more open. Obviously, the more â€Å"relations† a husband and wife would have, the more children they would have. This led to the importance and the growing interest in birth control. The pioneer of the American birth-control movement was Margaret Sanger who began her career as a promoter of the diaphragm and other birth control devices. She believed ... Free Essays on Margaret Sanger And The New Era Of Women Free Essays on Margaret Sanger And The New Era Of Women Imagine a world that is overpopulated with children. The number one reason why families are poor are due to the fact that they have too many children. But in today’s society overpopulation is not a problem due to the wonderful birth-control movement of Margaret Sanger. In the early 1900s sexual relations were used for the sole purpose of procreation, but as society changes, sexual relations became more for recreational purposes more than procreation purposes. The 1920s brought forth a new era for the middle class women. A woman’s role was most indefinitely redefined. Motherhood was no longer seen as every woman’s maternal instinct and was claimed to be not sufficient enough for child rearing. Now mothers were expected to seek and rely on the advice of professionals such as doctors, nurses, and trained educators in nursery school and kindergartens. Up until this point, this was the only role that women knew. These changes devalued what had been a very important and consuming activity. In order to compensate the loss of this very important role, many women now turned to another role: being a wife and companion to their husband. Previously women were consumed with the role of being a mother more so than the role of being a wife. But now a woman’s relationship with her husband assumed a greatly enhanced importance. Therefore, a woman’s sexual relationship with their husband was not solely considered a means of procreation, but now it was considered important and a very pleasurable experience. This also led to romantic love because a women’s sexual relationship was now more open. Obviously, the more â€Å"relations† a husband and wife would have, the more children they would have. This led to the importance and the growing interest in birth control. The pioneer of the American birth-control movement was Margaret Sanger who began her career as a promoter of the diaphragm and other birth control devices. She believed ...

Thursday, November 21, 2019

Why have the western and melodrama featured so prominently in genre Essay

Why have the western and melodrama featured so prominently in genre criticism - Essay Example 2). The sentiment was rather exaggerated yet films shown in different forms of media such as television, theaters and video cassete are absolutely the channel of the general public’s entertainment and are the embodiment of a democratic cultural framework. However, the primary significance of the film industry in the creation of pleasure for the general public does not necessarily imply that it can be a dimension of the cultural and historical indication. But the reality that films get in touch with the mass audience means that they represent some of the unconsious and conscious experiences of the general public, or probably a considerable portion of it (MacBean 1975, p. 48). Nevertheless, in the case of the American film industry, it is painstaking for many art scholar and historian to discern the relationship between Hollywood films and popular consciousness from the time 1940s until the contemporary period. The popular mind itself is multifaceted. It is inticately divided into different categories such as age, gender, ethnicity and social class and is habitually inconsistent and unstable in response. During the late sixties and early seventies, in the span of four or five years, the general movie audience shifted away from compassion towards social deviance of Bonnie and Clyde (1967) to the justice and regulate vigilantism of Dirty Harry (1971), and it is uncertain if that constant alteration of movie preference is in commune with some deep-seated transformation of popular feeling. However, it is probable that these divergent outlooks toward wickedness and crime coexisted in the American society, and the films further influence the already heteregenous American public. Likewise, it is difficult to determine the factors that contribute to the popular success of a particular film (Neale 1981, p. 11). For instance, did the movie Rambo garner its popularity because of its political underto ne such as

Wednesday, November 20, 2019

Marketing (Relevant to an Australian company) Essay

Marketing (Relevant to an Australian company) - Essay Example The brewery is open to the public and contains a cafà ©/restaurant. The company operates in one industry, being brewing, and in one main geographical segment, being Australia. Its Chairman is Ian Cochrane and CEO is Jason Marinko. It was founded in 2000 by a group that included directors Howard Cearns, Adrian Fini, and Nic Trimboli with a passion to make (and drink) a particular style of beer .It makes a specific style of pale ale that displays great balance of flavour and refreshment. Because of its ability to deliver a unique flavour experience the brewery has won a number of Australian International Beer Awards. It has been named Champion International Brewery (2002), Champion Australasian Brewery (2002) and the Pale Ale has been named Champion Ale (2002, 2007) and Champion Bottled Ale in 2001.1 (About Us) Macro environment Forces (Kotler,154)2 are the non controllable forces that shapes opportunities and controls threats for the business. The social, economic, legal, political and technological environment comes under this category. Australia is currently ninth3 on the World League Table for beer drinking and while low and full-strength brews were once the staple drink at all Aussie events, their popularity is waning, as theyre replaced by imported and domestic premium beers, wines and pre-mixed, ready-to-drink spirit.The beer consumption by females has gone up considerably and consumers are trading up to premium products to confirm social status. ( Low-carb beer and ready-mix bourbon top of the list for silly season drinkers,30/11/2006) As the corporate world becomes more environment conscious, there is a strong pressure on the organisations to become environment friendly. The corporates now believe in developing properties that add value to the community. In this direction,the company has plans to build a brewing facility that

Monday, November 18, 2019

Heidelberg Project Research Paper Example | Topics and Well Written Essays - 1750 words

Heidelberg Project - Research Paper Example The Heidelberg Project has persisted despite this notion. Hope Among the Ruins 3 Hope Among the Ruins: The Heidelberg Project and Urban Renewal Detroit belongs to the phantom legacy of American cities whose best days have always seemed to lay ahead. From its earliest days, Detroit has been a â€Å"city of the future† that never quite got there, starting with the imposition of the grid system in the 18th century to the near-mania for urban renewal of the 20th century. In a sense, Detroit’s â€Å"renewal† has been just around the corner ever since the Depression era, from which David Sheridan claims the city has never fully recovered (Sheridan, 1999). Economic disparity and the blight that accompanies it are part and parcel of this lamentable phenomenon, symptoms of a seemingly unattainable future. In this reality, all that’s left to those who live in poor and forgotten neighborhoods is a form of aesthetic protest that makes itself felt by decorating the bli ghted landscape, by reminding those in power that giving over rundown buildings to artistic expression can, in a real sense, bring about â€Å"urban renewal.† A sardonic comment The persistence and popularity of Tyree Guyton’s Heidelberg Project is a spectacular manifestation of what has been called an angry artistic expression of frustration over willful civic neglect. Guyton’s organic creation is what Robert Zecker has called a sardonic comment on â€Å"the poverty existing in the parts of postindustrial cities that have all but been abandoned by cash-starved civic governments† (Zecker, 2008). The art that was created from abandoned houses and refuse â€Å"were often harsh critiques of the abandonment many Detroiters felt, facing vacant 4 houses; weedy fields overgrown with discarded refrigerators and baby buggies; and a city administration incapable of offering city services†¦Ã¢â‚¬  (Ibid, 2008). But the Heidelberg Project is more than just conf rontation, it is a revolutionary gesture that says the future is not a thing that mayors, city councils and chambers of commerce bestow on a city. Guyton and those who have followed his example have reserved for themselves the power to effect change†¦even if change comes via the imposition of polka dots. Evidently, the city of Detroit, which dismembered the project on two occasions came to agree, if only in a tacit way. The city â€Å"gave up on its original goal of bulldozing the Heidelberg Project houses and finally started marketing (Guyton’s) artistic creations as tourist destinations† (Ibid, 2008). Art as urban renewal In a very real sense, the Heidelberg Project became art as urban renewal, though it didn’t start out that way. The notion of art and architecture sanctioned by the city was turned inside-out in Detroit. If it wasn’t bulldozed or razed and rebuilt as part of an ambitious political initiative, renewal couldn’t be considered l egitimate if it didn’t come out of an urban planner’s computer. This was the way Detroit had always planned for progress. But the throngs of locals and out-of-town tourists that experienced Guyton’s creations, and the newspaper and journal articles that chronicled the project, could hardly be ignored. And when the Detroit Institute of Art accepted some samples of the project as exhibits, there was no denying that traditional concepts of urban renewal and civic identity had been

Friday, November 15, 2019

Operating Systems Tasks and Programming Lab

Operating Systems Tasks and Programming Lab Lab Activity 1 Operating Systems Tasks and Programming a) Future of operating systems. [Report on the future of operating systems here] b) Programming activity C++ #include using namespace std; int main() { ÂÂ   int id = 6669447; string name = Salman Mohammed Fazal; int counter = 0; for (int i = 0; i cout counter++; //increment counter if (counter == id[-1]) { //if counter = last character of ID cout counter = 0; //reset counter } } } JAVA public class test { public static void main(String[] args) { int id = 6669447; String name = Salman Mohammed Fazal; int counter = 0; for (int i = 0; i System.out.print(name.charAt(i)); //print character counter++; //increment counter if (counter == id[-1]) { //when counter is last character of ID System.out.println(); //new line counter = 0; //reset counter } } } } PYTHON name = Salman Mohammed Fazal id = 6669447 for i in range (0, len(name), int(id[-1])): #for every n characters print(name[i:i+ int(id[-1]))]) #slice and print string Code Outcome (same for all) Lab Activity 2 Linux Command Line (Commands and outcomes from a series of small tasks that require use of a number of Linux commands) How made Portfolio1 directory read/write/executable only for you and your group. That is, not for others.ÂÂ   Show evidence of this with ls command. How downloaded the script http://www.centerkey.com/tree/tree.sh to your home directory using wget and make it executable. Making Directories How created a 207se directory in your Portfolio1 directory. How created numbered directories for the labs. i.e. lab1 and lab2 etc. Evidence of transferring lab1 activity into appropriate directory Evidence of make directory activities using tree.sh Display todays date and using the cal command show the month that you were born. Move into the lab1 directory and use the appropriate command to show the current directory What is talk, write and wall are for The Talk command is used for exchanging messages with other users who are logged on the same network. The Write command is used to send messages to users in the same network. This one-way only. The Wall command is used to send messages to all the users in the entire network. This is limited to the admins only. ÂÂ  What command prevents the effects of those three commands from interrupting you. To prevent users from interrupting you, you can use the Mesg command. This command basically enables or disables users from writing to your terminal. Mesg y to Allow access and Mesg n to deny access. The song in song.txt. Using wc the number of words and lines in the file. Using grep to get the lines containing and and the number of the lines contain and in the document Use cat to show the contents of the file. Appropriate Linux command to see if the two files differ and how they differ. Use sort to sort the file and redirect the output to a new file called song2.txt Use sort and rev to reverse the sorted contents of song.txt and append the output to song2.txt Total memory used and the total memory available Find out how you can display your username on the screen. List the processes that are running. What are the differences between the Linux commands less, more and most. The more command works similarly to the cat command by displaying contents of a file, however the more command, you view bits of the text (a screenful), and is in a forward-scrollable manner. The less command is similar to the more command, however with this it is possible to scroll both, forward and backward. The most command is more like the less command, but the only difference is, it is possible to view several files at once with this command. The basic syntax for these commands are: more less Lab Activity 4 Bootloader Brief description of the Lab activity and what you did This weeks task was to create a bootloader using Assembly which included my student details and a triangle of dots. We then have to boot the bootloader with bochs. Boot pragma linux with bochs Make a bootloader that displays your student details and triangle Commented bootloader code to display your student details and triangle [BITS 16] [ORG 0x7C00] top: ;; Put 0 into ds (data segment) ;; Cant do it directly mov ax,0x0000 mov ds,ax ;; si is the location relative to the data segment of the ;; string/char to display mov si, msg call writeString ; See below jmp $ ; Spin writeString: mov ah,0x0E ; Display a chacter (as before) mov bh,0x00 mov bl,0x07 nextchar: Lodsb ; Loads [SI] into AL and increases SI by one ;; Effectively pumps the string through AL cmp al,0 ; End of the string? jz done int 0x10 ; BIOS interrupt jmp nextchar done: ret msg db Name: Salman Fazal,13,10, Email: [emailprotected], 13,10, Fav Module: 207SE ;), 13,10, DOB: 01/08/1996 21 ,13,10, Std ID: 6669447 ; Null-terminated times 510-($-$$) db 0 dw 0xAA55 Output from Bochs showing student details and triangle Lab Activity 6 Memory Management Memory Allocation Activities Due to the code outputs being too long, I have just snipped a portion of the result, however all of my answers match with the results in the code. * NULL = Memory address not allocated. First-Fit Best-Fit Worst-Fit Paging Activities FIFO 4 2 7 7 5 6 3 9 3 2 2 Page Entry 0 4 4 4 4 5 5 5 9 9 9 9 Page Entry 1 2 2 2 2 6 6 6 6 2 2 Page Entry 2 7 7 7 7 3 3 3 3 3 Page Fault F F F H F F F F H F H Page Fault Total: 8 4 2 7 7 5 6 3 9 3 2 2 Page Entry 0 4 4 4 4 4 6 6 6 6 6 6 Page Entry 1 2 2 2 2 2 3 3 3 3 3 Page Entry 2 7 7 7 7 7 9 9 9 9 Page Entry 3 5 5 5 5 5 2 2 Page Fault F F F H F F F F H F H Page Fault Total: 8 RANDOM 4 2 7 7 5 6 3 9 3 2 2 Page Entry 0 4 4 4 4 5 6 6 6 6 2 2 Page Entry 1 2 2 2 2 2 2 9 9 9 9 Page Entry 2 7 7 7 7 3 3 3 3 3 Page Fault F F F H F F F F H F H Page Faults Total: 8 4 2 7 7 5 6 3 9 3 2 2 Page Entry 0 4 4 4 4 4 4 4 9 9 9 9 Page Entry 1 2 2 2 2 2 2 2 2 2 2 Page Entry 2 7 7 7 7 3 3 3 3 3 Page Entry 3 5 6 6 6 6 6 6 Page Fault F F F H F F F F H H H Page Fault Total: 7 The random algorithm did not give me the same result as the way I solved it. This is because There is no specific rule/method on what memory block to be replaced. Each time a process needs to be moved to a memory block, a random memory block is chosen in order to swap the process. Evidence of running code Lab Activity 7 Buffer Brief description of the Buffer Activity This weeks task involved using buffers in terms of reading and writing from a file Commented Buffer.c code #include //library for file control options #include //library for general purpose tools #include //header file #include //file IO #define BUF_SIZE 500 //sets buffer size to 500 #define OUTPUT_MODE 0700 //defines the output mode, sets file permissions int main(int argc, char *argv[]) { //Define variables int in_fd, out_fd; //hold associated numbers on both files int rd_size = 1; //hold amount of bytes in buffer (final should be 500) int wr_size; //hold amount of bytes on the output file char buf[BUF_SIZE]; //initialise buffer and its size if (argc != 3) //check for correct number of arguments exit(1); //exit if too many or too few parameters in_fd = open(argv[1], O_RDONLY); //open file to read from (read only) //if file isnt found, variable will have a negative number if (in_fd exit(2); //exit if files empty out_fd = creat(argv[2], OUTPUT_MODE); //create the output file //if file isnt created, variable will have a negative number if (out_fd exit(3); //exit if cannot write to the file while (rd_size > 0) { //while characters (in file) still exist: rd_size = read(in_fd, buf, BUF_SIZE); //read the file into buffer if (rd_size exit(4); //exit if error while reading wr_size = write(out_fd, buf, rd_size); //write from buffer into file if (wr_size close(in_fd); close(out_fd); //close both of the files if error found exit(5); //exit if error while writing } } } Update the code to so that it prints if an error has occurred or if a file is successfully created with the content of the review in it. After running code what is in hamlet.txt #include //library for file control options #include //library for general purpose tools #include //header file #include //file IO #define BUF_SIZE 500 //sets buffer size to 500 #define OUTPUT_MODE 0700 //defines the output mode, sets file permissions int main(int argc, char *argv[]) { //Define variables int in_fd, out_fd; //hold associated numbers on both files int rd_size = 1; //hold amount of bytes in buffer (final should be 500) int wr_size; //hold amount of bytes on the output file char buf[BUF_SIZE]; //initialise buffer and its size if (argc != 3) { //check for correct number of arguments printf(Error: Invalid number of parameters passed.); exit(1); //exit if too many or too few parameters } in_fd = open(argv[1], O_RDONLY); //open file to read from (read only) //if file isnt found, variable will have a negative number if (in_fd printf(Error: File not found.); exit(2); //exit if files empty } out_fd = creat(argv[2], OUTPUT_MODE); //create the output file //if file isnt created, variable will have a negative number if (out_fd printf(Error: File not created.); exit(3); //exit if cannot write to the file } while (rd_size > 0) { //while characters (in file) still exist: rd_size = read(in_fd, buf, BUF_SIZE); //read the file into buffer if (rd_size printf(Error: Cant read from file.); exit(4); //exit if error while reading } wr_size = write(out_fd, buf, rd_size); //write from buffer into file if (wr_size close(in_fd); close(out_fd); //close both of the files if error found exit(5); //exit if error while writing } } printf(Operation Successful!); } After compiling and running the code, the hamlet.txt file contained the exact same text that was in the main review.txt file Evidence: Updated buffer.c code to show how many character are read to buffer, how many character read at a time into the buffer, how many words in the document and how many times the buffer is filled #include //library for file control options #include //library for general purpose tools #include //header file #include //file IO #define BUF_SIZE 500 //sets buffer size to 500 #define OUTPUT_MODE 0700 //defines the output mode, sets file permissions int main(int argc, char *argv[]) { //Define variables int in_fd, out_fd; //hold associated numbers on both files int rd_size = 1; //hold amount of bytes in buffer (final should be 500) int wr_size; //hold amount of bytes on the output file char buf[BUF_SIZE]; //initialise buffer and its size int rd_count = 0, buf_count = 0, wd_count = 0; if (argc != 3) { //check for correct number of arguments printf(Error: Invalid number of parameters passed.); exit(1); //exit if too many or too few parameters } in_fd = open(argv[1], O_RDONLY); //open file to read from (read only) //if file isnt found, variable will have a negative number if (in_fd printf(Error: File not found.); exit(2); //exit if files empty } out_fd = creat(argv[2], OUTPUT_MODE); //create the output file //if file isnt created, variable will have a negative number if (out_fd printf(Error: File not created.); exit(3); //exit if cannot write to the file } while (rd_size > 0) { //while characters (in file) still exist: rd_size = read(in_fd, buf, BUF_SIZE); //read the file into buffer if (rd_size printf(Error: Cant read from file.); exit(4); //exit if error while reading } if (rd_size == 500){ //if read, rd_count += 500; buf_count += 1; //increment character and buffer counter } else{ rd_count += rd_size; } for (int i=0; i if(buf[i] == ) wd_count+=1; //increment if space found } wr_size = write(out_fd, buf, rd_size); //write from buffer into file if (wr_size printf(Successfully written to file!n); close(in_fd); close(out_fd); //close both files printf(Total number of characters read is: %d.n, rd_count); printf(Total number of words: %d.n, wd_count); printf(Buffer filled %d times.n, buf_count); exit(5); } } } Impact of changing buffer size I altered the buffer 3 times, the first was changing the size to 1000, the second was 1300 and the third was 2000. What I noticed was as the buffer size increases, the amount of times the buffer is filled decreases as the buffer is able to fill in more characters each time. Below is a screen shot of when the buffer size was set to 2000: We can see the buffer at this time was filled 0 times, meaning the entire text was placed into the buffer. Updated buffer.c code to compare if two files are the same #include //library for file control options #include //library for general purpose tools #include //header file #include //file IO #define BUF_SIZE 500 //sets buffer size to 500 #define OUTPUT_MODE 0700 //defines the output mode, sets file permissions int main(int argc, char *argv[]) { //Define variables int in_fd, in_fd2; //hold associated numbers on both files int rd_size = 1; //hold amount of bytes in buffer (final should be 500) int rd_size2 = 1; char buf[BUF_SIZE]; //initialise buffer and its size char buf2[BUF_SIZE]; //initialise buffer and its size //int rd_count = 0, buf_count = 0, wd_count = 0; if (argc != 3) { //check for correct number of arguments printf(Error: Invalid number of parameters passed.); exit(1); //exit if too many or too few parameters } in_fd = open(argv[1], O_RDONLY); //open first file to read from if (in_fd printf(Error: File not found.); exit(2); //exit if files empty } in_fd2 = open(argv[2], O_RDONLY); //open second file to read from //if file isnt found, variable will have a negative number if (in_fd2 printf(Error: File not found.); exit(3); //exit if files empty } while (rd_size > 0 rd_size2 > 0) { //while characters (in file) still exist: rd_size = read(in_fd, buf, BUF_SIZE); //read file 1 to buffer rd_size2 = read(in_fd2, buf2, BUF_SIZE); //read file 2 to buffer if (rd_size printf(Error: Cant read from file.); exit(4); } for (int i=0; i if(buf[i] != buf2[i]){ //if characters of the 2 files are not the same: printf(The files are not the same!); close(in_fd); close(in_fd2); exit(5); //print message and close } } } printf(YESSSSSS!! The files are the same.); //if code passes the loop, theyre the same! } Comparison of review.txt and hamlet.txt Comparison of hamlet.txt and review_observer.txt Lab Activity 8 Cache Buffer Brief Description of Cache Buffer Activity This weeks task was to alter the cache_reader.c file and complete the cr_read_byte function. Additionally, we also had to add a count of the total number of bytes and the number of times the buffer was filled. Commented implementation of the cr_read_byte function char cr_read_byte(cr_file* f){ /* 1. check if buffer needs refilling 2. return currently pointed character 3. move pointer to next character */ if(f->usedbuffer >= f->bufferlength){ refill(f); } char currentChar = f->buffer[f->usedbuffer]; f->usedbuffer++; return currentChar; } Comment updated code to show that each byte is being read, and when the buffer is being refilled. To show that the buffer is being refilled, I added a print statement each time the buffer refills in the cr_read_byte() function. Also the next part of the question will show that the buffer is being refilled and the bytes are being read by keeping a count each time that happens. *The code for this part of the question is combined with the next part (cache_reader.c). (I set the buffer to 200) Commented updated code showing to show how many bytes were read in total, and how many times the buffer was refilled In this part, I had to update the code in 3 different files, below are the screenshots of every update I made: cache_reader.h In this sec

Wednesday, November 13, 2019

Shakespeares Biography Essay -- essays research papers fc

SHAKESPEARE’S BIOGRAPHY Shakespeare’s Biography   Ã‚  Ã‚  Ã‚  Ã‚  William Shakespeare was a great writer who lead a very interesting life. In fact, he is often though of as â€Å"the greatest write of his time.†   Ã‚  Ã‚  Ã‚  Ã‚  As a child, William Shakespeare started his education at around the age of â€Å"six or seven at Stratford grammar school, also known as the King’s New School of Stratford-upon-Avon.†(Brooke pg23) It would be most likely that Shakespeare’s lessons would focus around â€Å"Latin composition and the study of Latin authors like Seneca, Cicero, Ovid, Vigil, and Horace.†(Brooke pg23) Shakespeare’s schooling did not last long however, when he was removed from school at the age of thirteen due to his father’s financial and social difficulties. This did not stop young Shakespeare from furthering his education however, and he began to write several plays, such as â€Å"Menaechmi.† It is impossible to trace what happened to Shakespeare from the time he left school till the time he re-emerged as an actor, so these years are rightfully referred to as his â€Å"lost years.† There is, however, a vital piece of information that emerges from this time, it is when Shakespeare betroths a pregnant orphan by the name of Anne Hathaway.   Ã‚  Ã‚  Ã‚  Ã‚  Being at the age of eighteen, Shakespeare was fully aware of what love was. In his abuse of it with his slightly older mistress (by eight years), he managed to impregnate her. He immediately wed...