英文文献及翻译(计算机专业)
计算机专业英语翻译参考

1.(P1) Computer science deals with the theoretical foundations of information and computation, together withpractical techniques for the implementation and application of these foundations, such as programming language theory, computational complexity theory, computer graphics and human-computer interaction.计算机科学涉及信息和计算的理论基础,以及这些基础的实施和应用的实际技术,如编程语言理论,计算复杂性理论,计算机图形学和人机交互。
2.(P17) The most important piece of graphics hardware is the graphics card, which is the piece of equipment thatrenders out all images and sends them to a display. There are two types of graphics cards: integrated and dedicated. An integrated graphics card, usually by Intel for use in their computers, is bound to the motherboard and shares RAM (Random Access Memory) with the CPU, reducing the total amount of RAM available. This is undesirable for running programs and applications that use a large amount of video memory. A dedicated graphics card has its own RAM and Processor for generating its images, and does not slow down the computer.Dedicated graphics cards also have higher performance than integrated graphics cards. It is possible to have both dedicated and integrated graphics card, however once a dedicated graphics card is installed, the integrated card will no longer function until the dedicated card is removed.最重要的一块图形硬件是显卡,是一件呈现出所有的图像,并将它们发送到一个显示器的设备。
计算机专业英语及翻译Unit 10

Unit 10 Program DesignText 1 Computer LanguagesComputer languages have undergone dramatic evolution since the first electronic computers were built. Early on, programmers worked with the most primitive computer instructions—machine language. These instructions were represented by long strings of ones and zeroes. Soon, assembly language was invented. It maps machine instructions to human-readable mnemonics, such as ADD and MOV.In time, higher-level languages evolved, such as PASCAL, BASIC, COBOL, C, C++, and JA V A. These languages let people work with something approximating words and sentences, such as Let I = 100. These instructions were translated back into machine language by interpreters and compilers. An interpreter translates a program as it reads it, turning the program instructions, or code, directly into actions. A compiler translates the code into an intermediary form. This step is called compiling, and produces an object file. The compiler then invokes a linker, which turns the object file into an executable program.Because interpreters read the code as it is written and execute the code on the spot, interpreters are easy for the programmer to work with. Compilers, however, introduce the extra steps of compiling and linking the code, which is inconvenient. Because the time-consuming task of translating the source code into machine language has already been accomplished, compilers produce a program that is very fast each time it is run.The problems programmers are asked to solve have been changing. Today's programs use sophisticated "user-friendly interfaces," involving multiple windows, menus, and dialog boxes. The programs written to support this new approach are far more complex than those written just ten years ago. Generally, as programming requirements have changed, both languages and the techniques used for writing programs have evolved.参考译文计算机语言自从第一批电子计算机诞生以来,计算机语言已经发生了戏剧性的变化。
【计算机专业文献翻译】面向对象编程具有多方面的吸引力

英文文摘Why has object-oriented programming had such a sweeping impact on the software development community?Object-oriented programming appeals at multiple levels. For managers, it promises faster and cheaper development and maintenance. For analysts and designers, the modeling process becomes simpler and produces a clear, manageable design. For programmers, the elegance and clarity of the object model and the power of object-oriented tools and libraries makes programming a much more pleasant task, and programmers experience an increase in productivity. Everybody wins, it would seem.If there’s a downside, it is the expense of the learning curve. Thinking in objects is a dramatic departure from thinking procedurally, and the process of designing objects is much more challenging than procedural design, especially if you’re trying to create reusable objects.In the past, a novice practitioner of object-oriented programming was faced with a choice between two daunting tasks:1.Choose a language such as Smalltalk in which you had to learn a largelibrary before becoming productive.2.Choose C++ with virtually no libraries at all,and struggle through thedepths of the language in order to write your own libraries of objects.It is, in fact, difficult to design objects well –for that matter, it’s hard to design anything well. But the intent is that a relatively few experts design the best objects for others to consume. Successful OOP languages incorporate not just language syntax and a compiler, but an entire development environment including a significant library of well-designed, easy to use objects. Thus, the primary job of most programmers is to use existing objects to solve their application problems. The goal of this chapter is to show you whatobject-oriented programming is and how simple it can be.This chapter will introduce many of the ideas of Java and object-orientedpr ogramming on a conceptual level, but keep in mind that you’re not expected to be able to write full-fledged Java programs after reading this chapter. All the detailed descriptions and examples will follow throughout the course of this book.The progress of abstractionAll programming languages provide abstractions. It can be argued that the complexity of the problems you can solve is directly related to the kind and quality of abstraction. By “kind” I mean: what is it that you are abstracting? Assembly language is a small abstraction of the underlying machine. Manyso-called “imperative” languages that followed (such as FORTRAN, BASIC, and C) were abstractions of assembly language. These languages are big improvements over assembly language, but their primary abstraction still requires you to think in terms of the structure of the computer rather than the structure of the problem you are trying to solve. The programmer must establish the association between the machine model (in the “solution space”) and the model of the problem that is actually being solved (in the “problem space”). The effort required to perform this mapping, and the fact that it is extrinsic to the programming language, produces programs that are difficult to write and expensive to maintain, and as a side effect created the entire “programming methods” industry.The alternative to modeling the machine is to model the problem you’re trying to solve. Early languages such as LISP and APL chose particular views of the world (“all problems are ultimately lists” or “all problems are algorithmic”). PROLOG casts all problems into chains of decisions. Languages have been created for constraint-based programming and for programming exclusively by manipulating graphical symbols. (The latter proved to be too restrictive.) Each of these approaches is a good solution to the particular class of problem they’re designed to solve, but when you step outside of that domain they become awkward.The object-oriented approach takes a step farther by providing tools for the programmer to represent elements in the problem space. This representation is general enough that the programmer is not constrained to any particular type of problem. We refer to the elements in the problem space and their representations in the s olution space as “objects.” (Of course, you will also need other objects that don’t have problem-space analogs.) The idea is that the program is allowed to adapt itself to the lingo of the problem by adding new types of objects, so when you read the code d escribing the solution, you’re reading words that also express the problem. This is a more flexible and powerful language abstraction than what we’ve had before. Thus OOP allows you to describe the problem in terms of the problem, rather than in the terms of the solution. There’s still a connection back to the computer, though. Each object looks quite a bit like a little computer; it has a state, and it has operations you can ask it to perform. However, this doesn’t seem like such a bad analogy to objects in the real world; they all have characteristics and behaviors.译文为什么面向对象的编程会在软件开发领域造成如此震憾的影响?面向对象编程具有多方面的吸引力。
【计算机专业文献翻译】Java系统

9.4 翻译The Java I/O SystemCreating a good input/output (I/O) system is one of the more difficult tasks for the language designer.This is evidenced by the number of different approaches. The challenge seems to be in covering all eventualities. Not only are there different sources and sinks of I/O that you want to communicate with (files, the console, network connections, etc.), but you need to talk to them in a wide variety of ways (sequential, random-SQLServer2000, buffered, binary, character, by lines, by words, etc.).The Java library designers attacked this problem by creating lots of classes. In fact, there are so many classes for Java’s I/O system that it can be intimidating at first (ironically, the Java I/O design actually prevents an explosion of classes). There was also a significant change in the I/O library after Java 1.0, when the original byte-oriented library was supplemented with char-oriented, Unicode-based I/O classes. In JDK 1.4, the nio classes (for “new I/O,” a name we’ll still be usi ng years from now) were added for improved performance and functionality. As a result, there are a fair number of classes to learn before you understand enough of Java’s I/O picture that you can use it properly. In addition, it’s rather important to unders tand the evolution history of the I/O library, even if your first reaction is “don’t bother me with history, just show me how to use it!” The problem is that without the historical perspective, you will rapidly become confused with some of the classes and when you should and shouldn’t use them.This chapter will give you an introduction to the variety of I/O classes in the standard Java library and how to use them.The File classBefore getting into the classes that actually read and write data to streams, we’ll look at a utility provided with the library to assist you in handling file directory issues.The File class has a deceiving name; you might think it refers to a file, but it doesn’t. It can represent either the name of a particular file or the names of a set of files in a directory. If it’s a set of files, you can ask for that set using the list( ) method, which returns an array of String. It makessense to return an array rather than one of the flexible container classes, because the number of elements is fixed, and if you want a different directory listing, you just create a different File object. In fact, “FilePath” would have been a better name for the class. This section shows an example of the use of this class, including the associated FilenameFilter interface.A directory listerSuppose you’d like to see a directory listing. The File object can be listed in two ways. If you call list( ) with no arguments, you’ll get the full list that the File object contains. However, if you want a restricted list—for example, if you want all of the files with an extension of .java—then you use a “directory filter,” which is a class that tells how to select the File objects for display.The DirFilter class “implements” the interface FilenameFilter. It’s useful t o see how simple the FilenameFilter interface is:public interface FilenameFilter {boolean accept(File dir, String name);}It says all that this type of object does is provide a method called accept( ). The whole reason behind the creation of this class is to provide the accept( ) method to the list( ) method so that list( ) can “call back” accept( ) to determine which file names should be included in the list. Thus, this structure is often referred to as a callback. More specifically, this is an example of the Strategy Pattern, because list( ) implements basic functionality, and you provide the Strategy in the form of a FilenameFilter in order to complete the algorithm necessary for list( ) to provide its service. Because list( ) takes a FilenameFilter object as its argument, it means that you can pass an object of any class that implements FilenameFilter to choose (even at run time) how the list( ) method will behave. The purpose of a callback is to provide flexibility in the behavior of code.DirFilte r shows that just because an interface contains only a set of methods, you’re not restricted to writing only those methods. (You must at least provide definitions for all the methods in an interface, however.) In this case, the DirFilter constructor is also created.The accept( ) method must accept a File object representing the directory that a particular file is found in, and a String containing the name of that file. You might choose to use or ignore either of these arguments, but you will probably at least use the file name. Remember that the list( ) method is calling accept( ) for each of the file names in the directory object to see which one should be included; this is indicated by the boolean result returned by accept( ).To make sure the element you’re working with is only the file name and contains no path information, all you have to do is take the String object and create a File object out of it, then call getName( ), which strips away all the path information (in a platform-independent way). Then accept( ) uses a regular expression matcher object to see if the regular expression regex matches the name of the file. Using accept( ), the list( ) method returns an array.Input and outputI/O libraries often use the abstraction of a stream, which represents any data source or sink as an object capable of producing or receiving pieces of data. The stream hides the details of what happens to the data inside the actual I/O device.The Java library classes for I/O are divided by input and output, as you can see by looking at the class hierarchy in the JDK documentation. By inheritance, everything derived from the InputStream or Reader classes have basic methods called read( ) for reading a single byte or array of bytes. Likewise, everything derived from OutputStream or Writer classes have basic methods called write( ) for writing a single byte or array of bytes. However, you won’t generally use these methods; they exist so that other classes can use them—these other classes provide a more useful interface. Thus, you’ll rarely create your stream object by using a single class, but instead will layer multiple objects together to provide your desired functionality. The fact that you create more than one object to create a single resulting stream is the primary re ason that Java’s stream library is confusing.It’s helpful to categorize the classes by their functionality. In Java 1.0, the library designers started by deciding that all classes that had anything to do with input would be inherited from InputStream, and all classes that were associated with output would be inherited from OutputStream.Types of InputStreamInputStream’s job is to represent classes that produce input from different sources. These sources can be:1.An array of bytes.2. A String object.3. A file.4. A “pipe,” which works like a physical pipe: You put things in at one end and they come outthe other.5. A sequence of other streams, so you can collect them together into a single stream.6.Other sources, such as an Internet connection. (This is covered in Thinking in EnterpriseJava.)Each of these has an associated subclass of InputStream. In addition, the FilterInputStream is also a type of InputStream, to provide a base class for "decorator" classes that attach attributes or useful interfaces to input streams. This is discussed later.Types of OutputStreamThis category includes the classes that decide where your output will go: an array of bytes (no String, however; presumably, you can create one using the array of bytes), a file, or a “pipe.”In addition, the FilterOutputStream provides a base class for "decorator" classes that attach attributes or useful interfaces to output streams.Adding attributes and useful interfacesThe use of layered objects to dynamically and transparently add responsibilities to individual objects is referred to as the Decorator pattern. (Patterns are the subject of Thinking in Patterns (with Java) at .) The decorator pattern specifies that all objects that wrap around your initial object have the same interface. This makes the basic use of the decorators transparent—you send the same message to an object whether it has been decorated or not. This is the reason for the existence of the “filter” classes in the Java I/O library: The abstract “filter” class is the base class for all thedecorators. (A decorator must have the same interface as the object it decorates, but the decorator can also extend the interface, which occurs in several of the “filter” classes).Decorators are often used when simple subclassing results in a large number of classes in order to satisfy every possible combination that is needed—so many classes that it becomes impractical. The Java I/O library requires many different combinations of features, and this is the justification for using the decorator pattern.There is a drawback to the decorator pattern, however. Decorators give you much more flexibility while you’re writing a program (since you can easily mix and match attributes), but they add complexity to your code. The reason that the Java I/O library is awkward to use is that you must create many classes—the “core” I/O type plus all the decorators—in order to get the single I/O object that you want.The classes that provide the decorator interface to control a particular InputStream or OutputStream are the FilterInputStream and FilterOutputStream, which don’t have very intuitive names. FilterInputStream and FilterOutputStream are derived from the base classes of the I/O library, InputStream and OutputStream, which is the key requirement of the decorator (so that it provides the common interface to all the objects that are being decorated).Reading from an InputStream with FilterInputStreamThe FilterInputStream classes accomplish two significantly different things. DataInputStream allows you to read different types of primitive data as well as String objects. (All the methods start with “read,” such as readByte( ), readFloat( ), etc.) This, along with its companion DataOutputStream, allows you to move primitive data from one place t o another via a stream. These “places” are determined by the classes in TableThe remaining classes modify the way an InputStream behaves internally: whether it’s buffered or unbuffered, if it keeps track of the lines it’s reading (allowing you to ask for line numbers or set the line number), and whether you can push back a single character. The last two classes look a lot like support for building a compiler (that is, they were probably added to support the construction of the Java compiler), so you proba bly won’t use them in general programming.You’ll need to buffer your input almost every time, regardless of the I/O device you’re connecting to, so it would have made more sense for the I/O library to make a special case (or simply a method call) for unbuffered input rather than buffered input.Writing to an OutputStream with FilterOutputStreamThe complement to DataInputStream is DataOutputStream, which formats each of the primitive types and String objects onto a stream in such a way that any DataInputStream, on any machine, can read them. All the methods start with “write,” such as writeByte( ), writeFloat( ), etc.The original intent of PrintStream was to print all of the primitive data types and String objects in a viewable format. This is different from DataOutputStream, whose goal is to put data elements on a stream in a way that DataInputStream can portably reconstruct them.The two important methods in PrintStream are print( ) and println( ), which are overloaded to print all the various types. The difference between print( ) and println( ) is that the latter adds a newline when it’s done.PrintStream can be problematic because it traps all IOExceptions (You must explicitly test the error status with checkError( ), which returns true if an error has occurred). Also, PrintStream doesn’t internationalize properly and doesn’t handle line breaks in a platform-independent way.Readers & WritersJava 1.1 made some significant modifications to the fundamental I/O stream library. When you see the Reader and Writer classes, your first thought (like mine) might be that these were meant to replace the InputStream and OutputStream classes. But that’s not the case. Although some aspectsof the original streams library are deprecated (if you use them you will receive a warning from the compiler), the InputStream and OutputStream classes still provide valuable functionality in the form of byte-oriented I/O, whereas the Reader and Writer classes provide Unicode-compliant,character-based I/O. In addition:1.Java 1.1 added new classes into the InputStream and OutputStream hierarchy, so it’s obviousthose hierarchies weren’t being replaced.2.There are times when you must use classes from the “byte” hierarchy in combination withclasses in the “character” hierarchy. To accomplish this, there are “adapter” classes:InputStreamReader converts an InputStream to a Reader and OutputStreamWriter converts an OutputStream to a Writer.The most important reason for the Reader and Writer hierarchies is for internationalization. The old I/O stream hierarchy supports only 8-bit byte streams and doesn’t handle the 16-bit Unicode characters well. Since Unicode is used for internationalization (and Java’s native char is 16-bit Unicode), the Reader and Writer hierarchies were added to support Unicode in all I/O operations. In addition, the new libraries are designed for faster operations than the old.As is the practice in this book, I will attempt to provide an overview of the classes, but assume that you will use the JDK documentation to determine all the details, such as the exhaustive list of methods.Sources and sinks of dataAlmost all of the original Java I/O stream classes have corresponding Reader and Writer classes to provide native Unicode manipulation. However, there are some places where the byte-oriented InputStreams and OutputStreams are the correct solution;in particular, the java.util.zip libraries are byte-oriented rather than char-oriented. So the most sensible approach to take is to try to use the Reader and Writer c lasses whenever you can, and you’ll discover the situations when you have to use the byte-oriented libraries, because your code won’t compile.Off by itself: RandomSQLServer2000FileRandomSQLServer2000File is used for files containing records of known size so that you can move from one record to another using seek( ), then read or change the records. The records don’t have to be the same size; you just have to be able to determine how big they are and where they are placed in the file.At first it’s a litt le bit hard to believe that RandomSQLServer2000File is not part of the InputStream or OutputStream hierarchy. However, it has no association with those hierarchies other than that ithappens to implement the DataInput and DataOutput interfaces (which are also implemented by DataInputStream and DataOutputStream). It doesn’t even use any of the functionality of the existing InputStream or OutputStream classes; it’s a completely separate class, written from scratch, with all of its own (mostly native) methods. The reason for this may be that RandomSQLServer2000File has essentially different behavior than the other I/O types, since you can move forward and backward within a file. In any event, it stands alone, as a direct descendant of Object.Essentially, a RandomSQLServer2000File works like a DataInputStream pasted together with a DataOutputStream, along with the methods getFilePointer( ) to find out where you are in the file, seek( ) to move to a new point in the file, and length( ) to determine the maximum size of the file. In addition, the constructors require a second argument (identical to fopen( ) in C) indicating whether you are just randomly reading (“r”) or reading and writing (“rw”). There’s no support for write-only files, which could suggest that RandomSQLServer2000File might have worked well if it were inherited from DataInputStream.The seeking methods are available only in RandomSQLServer2000File, which works for files only. BufferedInputStream does allow you to mark( ) a position (whose value is held in a single internal variable) and reset( ) to that position, but this is limited and not very useful.Most, if not all, of the RandomSQLServer2000File functionality is superceded in JDK 1.4 with the nio memory-mapped files.Input streams1. Buffered input fileTo open a file for character input, you use a FileInputReader with a String or a File object as the file name. For speed, you’ll want that file to be buffered so you give the resulting reference to the constructor for a BufferedReader. Since BufferedReader also provides the readLine( ) method, thisis your final object and the interface you read from. When you reach the end of the file, readLine( ) returns null so that is used to break out of the while loop.The String s2 is used to accumulate the entire contents of the file (including newlines that must be added since readLine( ) strips them off). s2 is then used in the later portions of this program. Finally, close( ) is called to close the file. Technically, close( ) will be called when finalize( ) runs, and this is supposed to happen (whether or not garbage collection occurs) as the program exits. However, this has been inconsistently implemented, so the only safe approach is to explicitly call close( ) for files.Section 1b shows how you can wrap System.in for reading console input. System.in is an InputStream, and BufferedReader needs a Reader argument, so InputStreamReader is brought in to perform the adaptation.2. Input from memoryThis section takes the String s2 that now contains the entire contents of the file and uses it to create a StringReader. Then read( ) is used to read each character one at a time and send it out to the console. Note that read( ) returns the next byte as an int and thus it must be cast to a char to print properly.3. Formatted memory inputTo read “formatted” data, you use a DataInputStream, which is a byte-oriented I/O class (rather than char-oriented). Thus you must use all InputStream classes rather than Reader classes. Of course, you can read anything (such as a file) as bytes using InputStream classes, but here a String is used. To convert the String to an array of bytes, which is what is appropriate for a ByteArrayInputStream, String has a getBytes( ) method to do the job. At that point, you have an appropriate InputStream to hand to DataInputStream.If you read the characters from a DataInputStream one byte at a time using readByte( ), any byte value is a legitimate result, so the return value cannot be used to detect the end of input. Instead, you can use the available( ) method to find out how many more characters are available. Here’s an example that shows how to read a file one byte at a time://: c12:TestEOF.java// Testing for end of file while reading a byte at a time.import java.io.*;public class TestEOF {// Throw exceptions to console:public static void main(String[] args)throws IOException {DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream("TestEOF.java")));while(in.available() != 0)System.out.print((char)in.readByte());}} ///:~Note that available( ) works differently depending on what sort of medium you’re reading from; it’s literally “the number of bytes that can be read without blocking.” With a file, this means the whole file, but with a different kind of stream this might not be true, so use it thoughtfully.You could also detect the end of input in cases like these by catching an exception. However, the use of exceptions for control flow is considered a misuse of that feature.4. File outputThis example also shows how to write data to a file. First, a FileWriter is created to connect to the file. You’ll virtually always want to buffer the output by wrapping it in a BufferedWriter (try removing this wrapping to see the impact on the performance—buffering tends to dramatically increase performance of I/O operations). Then for the formatting it’s turned into a PrintWriter. The data file created this way is readable as an ordinary text file.As the lines are written to the file, line numbers are added. Note that LineNumberInputStream is not used, because it’s a silly class and you don’t need it. As shown here, it’s trivial to keep track of your own line numbers.When the input stream is exhausted, readLine( ) re turns null. You’ll see an explicit close( ) for out1, because if you don’t call close() for all your output files, you might discover that the buffers don’t get flushed, so they’re incomplete.Output streamsThe two primary kinds of output streams are separated by the way they write data; one writes it for human consumption, and the other writes it to be reacquired by a DataInputStream. The RandomSQLServer2000File stands alone, although its data format is compatible with the DataInputStream and DataOutputStream.5. Storing and recovering dataA PrintWriter formats data so that it’s readable by a human. However, to output data for recovery by another stream, you use a DataOutputStream to write the data and a DataInputStream to recover the data. Of course, these streams could be anything, but here a file is used, buffered for both reading and writing. DataOutputStream and DataInputStream are byte-oriented and thus require the InputStreams and OutputStreams.If you use a DataOutputStream to write the data, then Java guarantees that you can accurately recover the data using a DataInputStream—regardless of what different platforms write and read the data. This is incredibly valuable, as anyone knows who has spent time worrying aboutplatform-specific data issues. That problem vanishes if you have Java on both platforms.When using a DataOutputStream, the only reliable way to write a String so that it can be recovered by a DataInputStream is to use UTF-8 encoding, accomplished in section 5 of the example using writeUTF( ) and readUTF( ). UTF-8 is a variation on Unicode, which stores all characters in two bytes. If you’re working with ASCII or mostly ASCII characters (which occupy only seven bits), this is a tremendous waste of space and/or bandwidth, so UTF-8 encodes ASCII characters in a single byte, and non-ASCII characters in two or three bytes. In addition, the length of the string is stored in the first two bytes. However, writeUTF( ) and readUTF( ) use a special variation of UTF-8 for Java (which is completely described in the JDK documentation for those methods) , so if youread a string written with writeUTF( ) using a non-Java program, you must write special code in order to read the string properly.With writeUTF( ) and readUTF( ), you can intermingle Strings and other types of data using a DataOutputStream with the knowledge that the Strings will be properly stored as Unicode, and will be easily recoverable with a DataInputStream.The writeDouble( ) stores the double number to the stream and the complementary readDouble( ) recovers it (there are similar methods for reading and writing the other types). But for any of the reading methods to work correctly, you must know the exact placement of the data item in the stream, since it would be equally possible to read the stored double as a simple sequence of bytes, or as a char, etc. So you must either have a fixed format for the data in the file, or extra information must be stored in the file that you parse to determine where the data is located. Note that object serialization (described later in this chapter) may be an easier way to store and retrieve complex data structures.6. Reading and writing random SQLServer2000 filesAs previously noted, the RandomSQLServer2000File is almost totally isolated from the rest of the I/O hierarchy, save for the fact that it implements the DataInput and DataOutput interfaces. So you cannot combine it with any of the aspects of the InputStream and OutputStream subclasses. Even though it might make sense to treat a ByteArrayInputStream as a random-SQLServer2000 element, you can use RandomSQLServer2000File only to open a file. You must assume a RandomSQLServer2000File is properly buffered since you cannot add that.The one option you have is in the second constructor argument: you can open a RandomSQLServer2000File to read (“r”) or read and write (“rw”).Using a RandomSQLServer2000File is like using a combined DataInputStream and DataOutputStream (because it implements the equivalent interfaces). In addition, you can see that seek( ) is used to move about in the file and change one of the values.With the advent of new I/O in JDK 1.4, you may want to consider using memory-mapped files instead of RandomSQLServer2000File.Piped streamsThe PipedInputStream, PipedOutputStream, PipedReader and PipedWriter have been mentioned only briefly in this chapter. This is not to suggest that they aren’t useful, but their value is not apparent until you begin to understand multithreading, since the piped streams are used to communicate between threads.Standard I/OThe term standard I/O refers to the Unix concept (which is reproduced in some form in Windows and many other operating systems) of a single stream of information that is used by a program. All the program’s input can come from stan dard input, all its output can go to standard output, and all of its error messages can be sent to standard error. The value of standard I/O is that programs can easily be chained together, and one program’s standard output can become the standard input fo r another program. This is a powerful tool.Reading from standard inputFollowing the standard I/O model, Java has System.in, System.out, and System.err. Throughout this book, you’ve seen how to write to standard output using System.out, which is already prewrapped as a PrintStream object. System.err is likewise a PrintStream, but System.in is a raw InputStream with no wrapping. This means that although you can use System.out and System.err right away, System.in must be wrapped before you can read from it.译文:Java I/O 系统对编程语言的设计者来说,创建一套好的输入输出(I/O)系统,是一项难度极高的任务。
计算机专业英语课文翻译(第四版)

1.2 总线互连总线是连接两个或多个设备的通信通路。
总线的关键特征是,它是一条共享传输介质。
多个设备连接到总线上,任一个设备发出的信号可以为其他所有连接到总线上的设备所接收。
如果两个设备同时传送,它们的信号将会重叠,引起混淆。
因此,一次只能有一个设备成功地(利用总线)发送数据。
典型的情况是,总线由多条通信通路或线路组成,每条线(路)能够传送代表二进制1和0的信号。
一段时间里,一条线能传送一串二进制数字。
总线的几条线放在一起能同时并行传送二进制数字。
例如, 一个8位的数据能在8条总线线上传送。
计算机系统包含有多种不同的总线,它们在计算机系统层次结构的各个层次提供部件之间的通路。
连接主要计算机部件(处理机, 存储器, I/O)的总线称为系统总线。
系统总线通常由50~100条分立的(导)线组成。
每条线被赋予一个特定的含义或功能。
虽然有许多不同的总线设计,但任何总线上的线都可以分成三个功能组:数据线、地址线和控制线。
此外可能还有为连接的模块提供电源的电源线。
数据线提供系统模块间传送数据的路径,这些线组合在一起称为数据总线。
典型的数据总线包含8、16或32根线,线的数量称为数据总线的宽度。
因为每条线每次传送1位,所以线的数目决定了每次能同时传送多少位。
数据总线的宽度是决定系统总体性能的关键因素。
地址线用于指定数据总线上数据的来源和去向。
例如,如果处理机希望从存储器中读一个字的数据,它将所需要字的地址放在地址线上。
显然,地址总线的宽度决定了系统最大可能的存储器容量。
控制线用来控制对数据线和地址线的访问和使用。
由于数据线和地址线被所有部件共享,因此必须用一种方法来控制它们的使用。
控制信号在系统模块之间传送命令和定时信息。
定时信息指定了数据和地址信息的有效性,命令信号指定了要执行的操作。
大多数计算机系统使用多总线,这些总线通常设计成层次结构。
图1.3显示了一个典型的高性能体系结构。
一条局部总线把处理机连接到高速缓存控制器,而高速缓存控制器又连接到支持主存储器的系统总线上。
【计算机专业文献翻译】基于Java的访问远程数据库的高效的标准软件体系结构

届毕业设计(论文)英文参考文献英文文献1:Efficiency of standard software architectures for Java-based access to remote databases文献出处,年,Vol.卷(期) Dipartimento di Elettronica ed Informatica, University of Padua, Padua, Italy Accepted 14 December 1998作者:N. Zingirian M.Maresca S. Nalin英文文献2:Performance comparison of dynamic web platforms文献出处,年,Vol.卷(期) Department of Computer Science and Engineering, Indian Institute of Technology-Bombay, Mumbai 400 076, IndiaAT&T Labs, 200 Laurel Ave, Middletown, NJ 07748, USA Received7 August 2002; accepted 7 August 2002作者:Varsha Apte Tony Hansen Paul Reeser学生院系专业名称学生班级学生姓名学生学号学生层次英文文献1译文:基于Java的访问远程数据库的高效的标准软件体系结构摘要:新颖的客户端服务器体系结构利用WEB技术越来越有利于远程数据库存取,其结构是在客户端采取WEB浏览器作为图形用户界面,在服务器端采取传统的SQL数据库管理系统(DBMSs)。
目前,在标准浏览器和具体DBMSs之间的活动是由一定数量的基于上一代浏览器中的Java 虚拟机的软件结构支持。
这些软件结构, 从开放性和灵活性问题看似乎很好, 但在数据库存取方面却存在不足。
【计算机专业文献翻译】21世纪的高级编程语言

外文文献阅读与翻译第1章英文原文Scripting: Higher Level Programming for the 21st Century1 IntroductionFor the last fifteen years a fundamental change has been occurring in the way people write computer programs. The change is a transition from system programming languages such as C or C++ to scripting languages such as Perl or Tcl. Although many people are participating in the change, few people realize that it is occurring and even fewer people know why it is happening. This article is an opinion piece that explains why scripting languages will handle many of the programming tasks of the next century better than system programming languages.Scripting languages are designed for different tasks than system programming languages, and this leads to fundamental differences in the languages. System programming languages were designed for building data structures and algorithms from scratch, starting from the most primitive computer elements such as words of memory. In contrast, scripting languages are designed for gluing: they assume the existence of a set of powerful components and are intended primarily for connecting components together. System programming languages are strongly typed to help manage complexity, while scripting languages are typeless to simplify connections between components and provide rapid application development.Scripting languages and system programming languages are complementary, and most major computing platforms since the 1960's have provided both kinds of languages. The languages are typically used together in component frameworks, where components are created with system programming languagesand glued together with scripting languages. However, several recent trends, such as faster machines, better scripting languages, the increasing importance of graphical user interfaces and component architectures, and the growth of the Internet, have greatly increased the applicability of scripting languages. These trends will continue over the next decade, with more and more new applications written entirely in scripting languages and system programming languages used primarily for creating components.1.1 2 Scripting languagesScripting languages such as Perl[9], Python[4], Rexx[6], Tcl[8], Visual Basic, and the Unix shells represent a very different style of programming than system programming languages. Scripting languages assume that there already exists a collection of useful components written in other languages. Scripting languages aren't intended for writing applications from scratch; they are intended primarily for plugging together components. For example, Tcl and Visual Basic can be used to arrange collections of user interface controls on the screen, and Unix shell scripts are used to assemble filter programs into pipelines. Scripting languages are often used to extend the features of components but they are rarely used for complex algorithms and data structures; features like these are usually provided by the components. Scripting languages are sometimes referred to as glue languages or system integration languages.In order to simplify the task of connecting components, scripting languages tend to be typeless: all things look and behave the same so that they are interchangeable. For example, in Tcl or Visual Basic a variable can hold a string one moment and an integer the next. Code and data are often interchangeable, so that a program can write another program and then execute it on the fly. Scripting languages are often string-oriented, since this provides a uniform representation for many different things.A typeless language makes it much easier to hook together components. There are no a priori restrictions on how things can be used, and all components and values are represented in a uniform fashion. Thus any component or value can be used in any situation; components designed for one purpose can be used for totally different purposes never foreseen by the designer. For example, in the Unix shells, all filter programs read a stream of bytes from an input and write a string of bytes to an output; any two programs can be connected together by attaching the output of one program to the input of the other. The following shell command stacks three filters together to count the number of lines in the selection that contain the word "scripting":select | grep scripting | wcThe select program reads the text that is currently selected on the display and prints it on its output; the grep program reads its input and prints on its output the lines containing "scripting"; the wc program counts the number of lines on its input. Each of these programs can be used in numerous other situations to perform different tasks.The strongly typed nature of system programming languages discourages reuse. Typing encourages programmers to create a variety of incompatible interfaces ("interfaces are good; more interfaces are better"). Each interface requires objects of specific types and the compiler prevents any other types of objects from being used with the interface, even if that would be useful. In order to use a new object with an existing interface, conversion code must be written to translate between the type of the object and the type expected by the interface. This in turn requires recompiling part or all of the application, which isn't possible in the common case where the application is distributed in binary form.To see the advantages of a typeless language, consider the following Tcl command:button .b -text Hello! -font {Times 16} -command {puts hello}This command creates a new button control that displays a text string in a 16-point Times font and prints a short message when the user clicks on the control. It mixes six different types of things in a single statement: a command name (button), a button control (.b), property names (-text, -font, and -command), simple strings (Hello! and hello), a font name (Times 16) that includes a typeface name (Times) and a size in points (16), and a Tcl script (puts hello). Tcl represents all of these things uniformly with strings. In this example the properties may be specified in any order and unspecified properties are given default values; more than 20 properties were left unspecified in the example.The same example requires 7 lines of code in two methods when implemented in Java. With C++ and Microsoft Foundation Classes, it requires about 25 lines of code in three procedures (see [7]for the code for these examples). Just setting the font requires several lines of code in Microsoft Foundation Classes:CFont *fontPtr = new CFont();fontPtr->CreateFont(16, 0, 0,0,700, 0, 0, 0, ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,DEFAULT_PITCH|FF_DONTCARE, "Times New Roman");buttonPtr->SetFont(fontPtr);Much of this code is a consequence of the strong typing. In order to set the font of a button, its SetFont method must be invoked, but this method must be passed a pointer to a CFont object. This in turn requires a new object to be declared and initialized. In order to initialize the CFont object its CreateFont method must be invoked, but CreateFont has a rigid interface that requires 14 different arguments to be specified. In Tcl, the essential characteristics of the font (typeface Times, size 16 points) can be used immediately with no declarations or conversions. Furthermore, Tcl allows the behavior for the button to be included directly in the command that creates the button, while C++ and Java require it to be placed in a separately declared method.(In practice, a trivial example like this would probably be handled with a graphical development environment that hides the complexity of the underlying language: the user enters property values in a form and the development environment outputs the code. However, in more complex situations such as conditional assignment of property values or interfaces generated programmatically, the developer must write code in the underlying language.)It might seem that the typeless nature of scripting languages could allow errors to go undetected, but in practice scripting languages are just as safe as system programming languages. For example, an error will occur if the font size specified for the button example above is a non-integer string such as xyz. The difference is that scripting languages do their error checking at the last possible moment, when a value is used. Strong typing allows errors to be detected at compile-time, so the cost of run-time checks is avoided. However, the price to be paid for this efficiency is restrictions on how information can be used: this results in more code and less flexible programs.Another key difference between scripting languages and system programming languages is th at scripting languages are usually interpreted whereas system programming languages are usually compiled. Interpreted languages provide rapid turnaround during development by eliminating compile times. Interpreters also make applications more flexible by allowing users to program the applications at run-time. For example, many synthesis and analysis tools for integrated circuits include a Tcl interpreter; users of the programs write Tcl scripts to specify their designs and control the operation of the tools. Interpreters also allow powerful effects to be achieved by generating code on the fly. For example, a Tcl-based Web browser can parse a Web page by translating the HTML for the page into a Tcl script using a few regular expression substitutions. It then executes the Tcl script to render the page on the screen.Scripting languages are less efficient than system programming languages, in part because they use interpreters instead of compilers but also because their basic components are chosen for power and ease of use rather than an efficient mapping onto the underlying hardware. For example, scripting languages often use variable-length strings in situations where a system programming language would use a binary value that fits in a single machine word, and scripting languages often use hash tables where system programming languages use indexed arrays.Fortunately, the performance of a scripting language isn't usually a major issue. Applications for scripting languages are generally smaller than applications for system programming languages, and the performance of a scripting application tends to be dominated by the performance of thecomponents, which are typically implemented in a system programming language.Scripting languages are higher level than system programming languages, in the sense that a single statement does more work on average. A typical statement in a scripting language executes hundreds or thousands of machine instructions, whereas a typical statement in a system programming language executes about five machine instructions (see Figure 1). Part of this difference is because scripting languages use interpreters, which are less efficient than the compiled code for system programming languages. But much of the difference is because the primitive operations in scripting languages have greater functionality. For example, in Perl it is about as easy to invoke a regular expression substitution as it is to invoke an integer addition. In Tcl, a variable can have traces associated with it so that setting the variable causes side effects; for example, a trace might be used to keep the variable's value updated continuously on the screen. Because of the features described above, scripting languages allow very rapid development for applications that are gluing-oriented.To summarize, scripting languages are designed for gluing applications. They provide a higher level of programming than assembly or system programming languages, much weaker typing than system programming languages, and an interpreted development environment. Scripting languages sacrifice execution speed to improve development speed.中文翻译脚本语言:21世纪的高级编程语言1.简介在过去的十五年里,人们编写计算机程序的方法发生了根本的转变。
计算机科学与技术 外文翻译 英文文献 中英对照

附件1:外文资料翻译译文大容量存储器由于计算机主存储器的易失性和容量的限制, 大多数的计算机都有附加的称为大容量存储系统的存储设备, 包括有磁盘、CD 和磁带。
相对于主存储器,大的容量储存系统的优点是易失性小,容量大,低成本, 并且在许多情况下, 为了归档的需要可以把储存介质从计算机上移开。
术语联机和脱机通常分别用于描述连接于和没有连接于计算机的设备。
联机意味着,设备或信息已经与计算机连接,计算机不需要人的干预,脱机意味着设备或信息与机器相连前需要人的干预,或许需要将这个设备接通电源,或许包含有该信息的介质需要插到某机械装置里。
大量储存器系统的主要缺点是他们典型地需要机械的运动因此需要较多的时间,因为主存储器的所有工作都由电子器件实现。
1. 磁盘今天,我们使用得最多的一种大量存储器是磁盘,在那里有薄的可以旋转的盘片,盘片上有磁介质以储存数据。
盘片的上面和(或)下面安装有读/写磁头,当盘片旋转时,每个磁头都遍历一圈,它被叫作磁道,围绕着磁盘的上下两个表面。
通过重新定位的读/写磁头,不同的同心圆磁道可以被访问。
通常,一个磁盘存储系统由若干个安装在同一根轴上的盘片组成,盘片之间有足够的距离,使得磁头可以在盘片之间滑动。
在一个磁盘中,所有的磁头是一起移动的。
因此,当磁头移动到新的位置时,新的一组磁道可以存取了。
每一组磁道称为一个柱面。
因为一个磁道能包含的信息可能比我们一次操作所需要得多,所以每个磁道划分成若干个弧区,称为扇区,记录在每个扇区上的信息是连续的二进制位串。
传统的磁盘上每个磁道分为同样数目的扇区,而每个扇区也包含同样数目的二进制位。
(所以,盘片中心的储存的二进制位的密度要比靠近盘片边缘的大)。
因此,一个磁盘存储器系统有许多个别的磁区, 每个扇区都可以作为独立的二进制位串存取,盘片表面上的磁道数目和每个磁道上的扇区数目对于不同的磁盘系统可能都不相同。
磁区大小一般是不超过几个KB; 512 个字节或1024 个字节。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
英文文献及翻译(计算机专业)The increasing complexity of design resources in a net-based collaborative XXX common systems。
design resources can be organized in n with design activities。
A task is formed by a set of activities and resources linked by logical ns。
XXX managementof all design resources and activities via a Task Management System (TMS)。
which is designed to break down tasks and assign resources to task nodes。
This XXX。
2 Task Management System (TMS)TMS is a system designed to manage the tasks and resources involved in a design project。
It poses tasks into smaller subtasks。
XXX management of all design resources and activities。
TMS assigns resources to task nodes。
XXX。
3 Collaborative DesignCollaborative design is a process that XXX a common goal。
In a net-based collaborative design environment。
n XXX n for all design resources and activities。
4 Task nXXX is the process of XXX for better management of resources and activities。
as well as more XXX of the task as a whole。
TMS XXX for effective management of all design resources and activities。
5 n Management SystemAn n management system is a system that manages the storage and retrieval of n。
In a net-based collaborative design environment。
an n management system is essential for managing the diverse and complex design resources。
TMS serves as an n management system by XXX。
In summary。
TMS XXX as an n management system。
TMS allows for efficient management of all design resources and XXX n for all design resources and activities.With the increasing demand for advanced design methods。
numerous design tools have emerged to support new XXX。
designing in a web XXX management system。
Design partners can be located anywhere over the net with their own ns。
ranging from independent experts to teams of employees。
In this article。
we will discuss a task management system (TMS) that manages XXX design resources in n with the activities.Compared to common n management systems (IMS) such as product data management systems and document management systems。
TMS can manage the entire design process。
It consists of two tiers that make it much more XXX.Overall。
TMS is an essential tool for XXX process and its flexible structure make it a XXX.The lower tier of the TMS consists of nal common IMS。
while the upper XXX activity management through a tree-likestructure。
This structure XXX about how to carry out a design project。
The ning paradigm of the TMS varies depending on the project's scale and purpose。
This structure allows TMS to separate its data model from its logic mode。
XXX。
particularly in large-scale projects.In a net-based collaborative design environment。
XXX among team members。
allowing for real-XXX.XXX has led to the development of TMS。
The need for XXX.Overall。
TMS is an essential tool in net-based XXX manage tasks and resources。
facilitate n。
and separate data XXX.During a net-based collaborative design process。
designers shift from working on a single PC to a LAN or even a WAN。
Design partners XXX。
even if they are XXX。
people from any terminal on the net can interactively exchange n and send data to authorized roles via their design tools。
The Co Design Spaceprovides a set of tools to help design partners XXX design n。
with the aim of XXX.The management of resources and activities in a net-XXX is critical。
The Co Design XXX。
It allows for the sharing of data and resources。
as well as the n of activities among design partners。
The platform also enables the management of design processes。
including the tracking of progress。
the n of resources。
and the nof potential issues.One of the key advantages of a net-based collaborative XXXis that it allows for real-time XXX。
regardless of their n。
The Co Design Space provides a range of n tools。
including chat。
video conferencing。
and screen sharing。
XXX.Another advantage of a net-XXX is that it allows for the n of different design tools and are。
The Co Design Space supports a range of design tools。
including CAD are。
n tools。
and project management tools。
This XXX。
with all design data and n storedin a single n.In n。
a net-based collaborative XXX partners。
includingreal-time n。
the n of different design tools。
and the XXX activities。
with the aim of XXX.XXX of the design environmental has XXX: XXX increase in the number of design partners。
XXX。
XXX。
To address this。
an XXX designers when needed.One XXX management system (IMS)。
An IMS offers a database。
file systems。
and in/out interfaces to manage resources。
For instance。