Which method implementations will write the given string to a file named "file", using UTF8 encoding?() IMPLEMENTATION a: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.write(msg); fw.close(); } IMPLEMENTATION b: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("file"), "UTF8"); osw.write(msg); osw.close(); } IMPLEMENTATION c: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.setEncoding("UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION d: public void write(String msg) throws IOException { FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION e: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter( new OutputStream(new File("file")), "UTF8" ); osw.write(msg); osw.close(); }
Write a memo in about 50 words. You are Human Resources Manager. Your company is going to provide the staff with training in E-Commerce. There will be two course levels: intermediate level and advanced level. The training course will be given on Saturdays for five weeks. Write a memo to department managers: ·Informing them of the coming training course; ·Asking them to encourage the staff to participate; ·Asking them to help obtain the names of the interested staff.
Practice 6 You should spend about 40 minutes on this task. Write about the following topic: News media is more influential nowadays. Some people think it is a negative development. To what extent do you agree or disagree? You should write at least 250 words.
Why did Mr. Eldridge write to Ms. Brancato?
Directions: You are planning to study abroad. Write a letter of inquiry to (1) give your brief personal information; (2) ask for the terms of admission into that university; (3) ask for the possibility of getting a scholarship. You should write about 100 words. Do not sign your own name at the end of the letter. Use "Li Ming" instead. You don't need to write the address.
Practice 2 Directions: Read the following text(s) and write an essay to 1) summarize the main points of the text(s), 2) make clear your own viewpoint, and 3) justify your stand. In your essay, make full use of the information provided in the text(s). If you use more than three consecutive words from the text(s), use quotation marks (“ ”). You should write 160—200 words on the ANSWER SHEET. It is all very well to blame traffic congestion, the cost of petrol and the hectic pace of modern lift, but manners on the roads are becoming deplorable. Everybody knows that nicest men become monsters behind the wheel. It is all very well again to have a tiger in the tank, but to have one in the drivers seat is completely another awkward and difficult situation. You might tolerate the odd mad hog, but nowadays the well-mannered motorist is the exception to the rule. Perhaps the situation calls for a “Be Kind to Other Drivers” campaign; otherwise it may get completely out of hand. Road courtesy is not only good manners, but good sense too. It takes the most levelheaded and good-tempered of drivers to resist the temptation to retaliate when subjected to uncivilized behavior. On the other hand, a little courtesy goes a long way towards relieving the tensions and frustrations of motoring. A friendly nod or a wave of acknowledgement in response to an act of courtesy helps to create an atmosphere of goodwill and tolerance so necessary in modern traffic conditions. But such acknowledgements of courtesy are all too rare today. Many drivers nowadays don't even seem able to recognize courtesy when they see it. Lorry drivers say they have almost abandoned the practice of signaling cars to overtake when the road is clear, because many of the cars took too long to pass. Their drivers couldn't be bothered to select a lower gear. Others, after overtaking, slowed down again and hogged the road. They manufacture them by force, using their direction indicators as a threat rather than a warning. Slanting matches and even punch-ups(打架斗殴)are quite common. It can't be long before we hear of pistols and knives being used: we can then call our dual carriageways, and solve a spelling problem in the process. Driving is essentially a state of mind. However technically skilled a driver may be, he can't be all advanced motorist if he is always arrogant and aggressive.
Practice 4 Read the following text(s) and write an essay to 1) summarize the main points of the text(s), 2) make clear your own viewpoint, and 3) justify your stand. In your essay, make full use of the information provided in the text(s). If you use more than three consecutive words from the text(s), use quotation marks (“ ”). You should write 160—200 words on the ANSWER SHEET. The information and computer technologies have boosted the efficiency and convenience of people’s work and study. Their application in school education has provided teachers and students with new approaches to knowledge and information. There is a heated discussion about whether computers will replace teachers. The following are the supporters’ and opponents’ opinions. Supporters: With the advanced computer and Internet, children can get the learning material whenever they want. Online teaching is becoming more and more popular that students can get planned lessons online. After each class, there is homework for them to do. Both the learning and practice can be done on computers. From computers students can learn something that they are interested in so that they won’t be restricted to the subjects that they are taught at school. Therefore, students will have the opportunity to achieve an all-around development. Opponents: Students need to communicate with teachers and get instructions from them whenever they have troubles in their study. Computers are only cold devices that will affect children’s ability to have face-to-face communication. Education is not only about imparting the knowledge, but also being a useful person. So students need to learn some useful values to be a good person which sometimes cannot be easily learned from computers. Children who use computer will learn to communicate with machines instead of people. There is a risk that they will be a generation of social illiterates.
Using vi, you want to save changes to the file myfile with :w!, but vi complains it cannot write to the file. Therefore, you want to check the write permissions on the file. To do this without leaving vi, you type:()
You lost the PRODSTD tablespace, which was read/write. The tablespace was read/x7fonly when the last backup was performed. How would you recover the tablespace?()
You didn't have to write the essay if you didn't want to. It was()