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

英文文献及翻译(计算机专业)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。

合集下载

计算机专业英语翻译参考

计算机专业英语翻译参考

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

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系统

【计算机专业文献翻译】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的访问远程数据库的高效的标准软件体系结构

【计算机专业文献翻译】基于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 个字节。

5000字英文文献翻译

沈阳建筑大学毕业论文外文及翻译原文题目Android Application Fundamentals学院专业班级信息与控制工程学院计算机08-1学生姓名XXX 性别X指导教师XXX 职称XXX年月日外文及翻译英语原文Android Application FundamentalsAndroid applications are written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, an archive file with an .apk suffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.Once installed on a device, each Android application lives in its own security sandbox:●The Android operating system is a multi-user Linux system in which each applicationis a different user.●By default, the system assigns each application a unique Linux user ID (the ID isused only by the system and is unknown to the application). The system setspermissions for all the files in an application so that only the user ID assigned to thatapplication can access them.●Each process has its own virtual machine (VM), so an application's code runs inisolation from other applications.●By default, every application runs in its own Linux process. Android starts theprocess when any of the application's components need to be executed, then shutsdown the process when it's no longer needed or when the system must recovermemory for other applications.In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission.However, there are ways for an application to share data with other applications and for an application to access system services:●It's possible to arrange for two applications to share the same Linux user ID, in whichcase they are able to access each other's files. To conserve system resources,applications with the same user ID can also arrange to run in the same Linux processand share the same VM (the applications must also be signed with the samecertificate).●An application can request permission to access device data such as the user'scontacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, andmore. All application permissions must be granted by the user at install time.That covers the basics regarding how an Android application exists within the system. The rest of this document introduces you to:●The core framework components that define your application.●The manifest file in which you declare components and required device features foryour application.●Resources that are separate from the application code and allow your application togracefully optimize its behavior for a variety of device configurations.Application ComponentsApplication components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.Here are the four types of application components:ActivitiesAn activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one isindependent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture.An activity is implemented as a subclass of Activity and you can learn more about it in the Activities developer guide.ServicesA service is a component that runs in the background to perform long-runningoperations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it.A service is implemented as a subclass of Service and you can learn more about it inthe Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data inthe file system, an SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such as ContactsContract.Data) to read and write information abouta particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and mustimplement a standard set of APIs that enable other applications to perform transactions.For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcastannouncements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured.Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use.Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.A broadcast receiver is implemented as a subclass of BroadcastReceiver and eachbroadcast is delivered as an Intent object. For more information, see the BroadcastReceiver class.A unique aspect of the Android system design is that any application can start another application’s component. For example, if you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. When complete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application.When the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera application that captures a photo, that activity runs in the process that belongs to the camera application, not in your application's process. Therefore, unlike applications on most other systems, Android applications don't have a single entry point (there's no main()function, for example).Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.Activating ComponentsThree of the four component types—activities, services, and broadcast receivers—are activated by an asynchronous message called an intent. Intents bind individual components to each other at runtime (you can think of them as the messengers that request an action from other components), whether the component belongs to your application or another.An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.For activities and services, an intent defines the action to perform (for example, to "view" or "send" something) and may specify the URI of the data to act on (among other things that the component being started might need to know). For example, an intent might convey a request for an activity to show an image or to open a web page. In some cases, you can start an activity to receive a result, in which case, the activity also returns the result in an Intent (for example, you can issue an intent to let the user pick a personal contact and have it returned to you—the return intent includes a URI pointing to the chosen contact).For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").The other component type, content provider, is not activated by intents. Rather, it is activated when targeted by a request from a ContentResolver. T he content resolver handles all direct transactions with the content provider so that the component that's performing transactions with the provider doesn't need to and instead calls methods onthe ContentResolver object. This leaves a layer of abstraction between the content provider and the component requesting information (for security).There are separate methods for activating each type of component:∙You can start an activity (or give it something new to do) by passingan Intent to startActivity() or startActivityForResult() (when you want the activity to return a result).∙You can start a service (or give new instructions to an ongoing service) by passing an Intent to startService(). Or you can bind to the service by passingan Intent to bindService().∙You can initiate a broadcast by passing an Intent to methodslike sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast().∙You can perform a query to a content provider by calling query() ona ContentResolver.For more information about using intents, see the Intents and Intent Filters document. More information about activating specific components is also provided in the following documents: Activities, Services, BroadcastReceiver and Content Providers.Declaring componentsThe primary task of the manifest is to inform the system about the application's components. For example, a manifest file can declare an activity as follows:In the <application> element, the android:icon attribute points to resources for an icon that identifies the application.In the <activity> element, the android:name at tribute specifies the fu lly qualified class name of the Activity subclass and the android:label attributes specifies a string to use as the user-visible label for the activity.You must declare all application components this way:●<activity>elements for activities●<service> elements for services●<receiver>elements for broadcast receivers●<provider>elements for content providersActivities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run. However, broadcast receivers can be either declared in the manifest or created dynamically in code (as BroadcastReceiver objects) and registered with the system bycalling registerReceiver().Declaring component capabilitiesAs discussed above, in Activating Components, you can use an Intent to start activities, services, and broadcast receivers. You can do so by explicitly naming the target component (using the component class name) in the intent. However, the real power of intents lies in the concept of intent actions. With intent actions, you simply describe the type of action you want to perform (and optionally, the data upon which you’d like to perform the action) and allow the system to find a component on the device that can perform the action and start it. If there are multiple components that can perform the action described by the intent, then the user selects which one to use.The way the system identifies the components that can respond to an intent is by comparing the intent received to the intent filters provided in the manifest file of other applications on the device.When you declare a component in your application's manifest, you can optionally include intent filters that declare the capabilities of the component so it can respond to intents from other applications. You can declare an intent filter for your component by addingan <intent-filter>element as a child of the component's declaration element.For example, an email application with an activity for composing a new email might declare an intent filter in its manifest entry to respond to "send" intents (in order to send email). An activity in your application can then create an intent with the “send” action (ACTION_SEND), which the s ystem matches to the email application’s “send” activity and launches it when you invoke the intent with startActivity().For more about creating intent filters, see the Intents and Intent Filters document.Declaring application requirementsThere are a variety of devices powered by Android and not all of them provide the same features and capabilities. In order to prevent your application from being installed on devices that lack features needed by your application, it's important that you clearly define a profile for the types of devices your application supports by declaring device and software requirements in your manifest file. Most of these declarations are informational only and the system does not read them, but external services such as Google Play do read them in order to provide filtering for users when they search for applications from their device.For example, if your application requires a camera and uses APIs introduced in Android 2.1 (API Level 7), you should declare these as requirements in your manifest file. That way, devices that do not have a camera and have an Android version lower than 2.1 cannot install your application from Google Play.However, you can also declare that your application uses the camera, but doesnot require it. In that case, your application must perform a check at runtime to determine if the device has a camera and disable any features that use the camera if one is not available.Here are some of the important device characteristics that you should consider as you design and develop your application:Screen size and densityIn order to categorize devices by their screen type, Android defines two characteristics for each device: screen size (the physical dimensions of the screen) and screen density (the physical density of the pixels on the screen, or dpi—dots per inch). To simplify all the different types of screen configurations, the Android system generalizes them intoselect groups that make them easier to target.The screen sizes are: small, normal, large, and extra large.The screen densities are: low density, medium density, high density, and extra highdensity.By default, your application is compatible with all screen sizes and densities, because the Android system makes the appropriate adjustments to your UI layout and imageresources. However, you should create specialized layouts for certain screen sizes and provide specialized images for certain densities, using alternative layout resources, and by declaring in your manifest exactly which screen sizes your application supportswith the <supports-screens> element.For more information, see the Supporting Multiple Screens document.Input configurationsMany devices provide a different type of user input mechanism, such as a hardware keyboard, a trackball, or a five-way navigation pad. If your application requires a particular kind of input hardware, then you should declare it in your manifest with the <uses-configuration> e lement. However, it is rare that an application should require a certain input configuration.Device featuresThere are many hardware and software features that may or may not exist on a given Android-powered device, such as a camera, a light sensor, bluetooth, a certain version of OpenGL, or the fidelity of the touchscreen. You should never assume that a certain feature is available on all Android-powered devices (other than the availability of the standard Android library), so you should declare any features used by your application with the <uses-feature> element.Platform VersionDifferent Android-powered devices often run different versions of the Android platform, such as Android 1.6 or Android 2.3. Each successive version often includes additional APIs not available in the previous version. In order to indicate which set of APIs are available, each platform version specifies an API Level (for example,Android 1.0 is API Level 1 and Android 2.3 is API Level 9). If you use any APIs that were added to the platform after version 1.0, you should declare the minimum API Level in which those APIs were introduced using the <uses-sdk> element.It's important that you declare all such requirements for your application, because, when you distribute your application on Google Play, the store uses these declarations to filter which applications are available on each device. As such, your application should be available only to devices that meet all your application requirements.For more information about how Google Play filters applications based on these (and other) requirements, see the Filters on Google Play document.Application ResourcesAn Android application is composed of more than just code—it requires resources that are separate from the source code, such as images, audio files, and anything relating to the visual presentation of the application. For example, you should define animations, menus, styles, colors, and the layout of activity user interfaces with XML files. Using application resources makes it easy to update various characteristics of your application without modifying code and—by providing sets of alternative resources—enables you to optimize your application for a variety of device configurations (such as different languages and screen sizes).For every resource that you include in your Android project, the SDK build tools define a unique integer ID, which you can use to reference the resource from your application code or from other resources defined in XML. For example, if your application c ontains an image file named logo.png (saved in the res/drawable/ directory), the SDK tools generate a resource ID named R.drawable.logo, which you can use to reference the image and insert it in your user interface.One of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations. For example, by defining UI strings in XML, you can translate the strings into other languages and save those strings in separate files. Then, based on a language qualifier that you append to theresource directory's name (such as res/values-fr/for French string values) and the user's language setting, the Android system applies the appropriate language strings to your UI.Android supports many different qualifiers for your alternative resources. The qualifier is a short string that you include in the name of your resource directories in order to define the device configuration for which those resources should be used. As another example, you should often create different layouts for your activities, depending on the device's screen orientation and size. For example, when the device screen is in portrait orientation (tall), you might want a layout with buttons to be vertical, but when the screen is in landscape orientation (wide), the buttons should be aligned horizontally. To change the layout depending on the orientation, you can define two different layouts and apply the appropriate qualifier to each layout's directory name. Then, the system automatically applies the appropriate layout depending on the current device orientation.For more about the different kinds of resources you can include in your application and how to create alternative resources for various device configurations, see the Application Resources developer guide.中文译文安卓应用基础在Java编程语言编写的Android应用程序的Android的SDK工具编译代码以及与任何数据和到一个Android的包,一个归档文件档案资源的.apk后缀,所有的在一个单一的代码.apk文件被认为是一个应用程序,是Android的文件,供电设备来安装应用程序。

【计算机专业文献翻译】CNC

计算机专业中英文文献翻译CNCCNC stands for Computerized Numerical Control and has been around since the early1970s. prior to this, it was called NC,for numerical control. While people in most walks of life have never heard of this term, CNC has touched almost every form of manufacturing process in one way or another. If you'll be working in manufacturing, it's likely that you'll be dealing with CNC on a regular basis.Before CNCWhile there are exceptions to this statement,CNC machines typically replace (or work in conjunction with) some existing manufacturing processes. Take one of the simplest manufacturing processes,drilling holes,for example.A drill press can of course be used to machine holes. A person can place a drill in the drill chuck that is secured in the spindle of the drill press. They can then (manually) select the desired speed for rotation (commonly by switching belt pulleys), and activate the spindle. Then they manually pull on the quill lever to drive the drill into the workpiece being machined.As you can easily see, there is a lot of manual intervention required to use a drill press to holes. A person is required to do something almost every step along the way! While this manual intervention may be acceptable for manufacturing companies if but a small number of holes workpieces must be machined, as quantities grow, so does the likelihood for fatigue due to the tediousness of the operation. And do note that we've used one of the simplest machining operations(drilling) for our example. There are more complicated machining operations that would require a much higher skill level (and increase the potential for mistakes resulting in scrap workpieces) of the person running the conventional machine tool. (We commonly refer to style of machine that CNC is replacing as the conventional machine.)By comparison, the CNC equivalent for a drill press (possibly a CNC machining center or CNC drilling & tapping center) can be programmed to perform this operation in a much more automatic fashion. Everything that the drill press operator was doing manually will now be done by the CNC machine, including:placing thedrill in the spindle, activating the spindle,positioning the workpiece under the drill, machining the hole, and turning off the spindle.How CNC worksAs you might already have guessed,everything that an operator would be required to do with conventional machine tools is programmable with CNC machines. Once the machine is setup and running, a CNC machine is quite simple to keep running. In fact CNC operators tend to get quite bored during lengthy production runs because there is so little to do. With some CNC machines, some of the specific programmable functions.Motion controlAll CNC machine types share this commonalty: They all have two or more programmable directions of motion called axes. An axis of motion can be linear(along a straight line) or rotary(along a circular path). One of the first specifications that imply a CNC machine's complexity is how many axes it has. Generally speaking, the more axes, the more complex the machine.The axes of any CNC machine are required for the purpose of causing the motions needed for the manufacturing process. In the drilling example, these axes would position then tool over the hole to be machined (in two axes) and machine the hole (with the third axis). Axes are named with mon linear axis named X,Y,and Z. Common rotary names are A,B,and C. There are related to the coordinate system.Programmable accessoriesA CNC machine wouldn't be very helpful if all it could only move the workpiece in two or more axes. Almost all CNC machines are programmable in several other ways. The specific CNC machine type has a lot to do with its appropriate programmable accessories. Again,any required function will be programmable on full-blown CNC machine tools. Here are some examples for one machine type(machining centers).Automatic tool changerMost machining centers can hold many tools in a tool magazine. When required,the required tool can be automatically placed in spindle for machining.Spindle speed and activationThe spindle speed(in revolutions per minute) can be easily specified and the spindle can be turned on in a forward or reverse direction.It can also,of course, be turned off.CoolantMany machining operations require coolant for lubrication and cooling purposes. Coolant can be turned on and off from within the machine cycle.The CNC programThink of giving any series of step-by-step instructions. A CNC program is nothing more than another kind of instruction set. It's written in sentence-like format and the control will execute it in sequential order,step by step.A special series of CNC words are used to communicate what the machine is intended to do. CNC words begin with letter address(like F for feedrate,S for spindle speed,and X,Y,and Z for axis motion). When placed together in a logical method, a group of CNC words make up a command that resemble a sentence.The CNC controlThe CNC control will interpret a CNC program and active the series of commands in sequential order. As it reads the program, the CNC control will activate the appropriate machine functions, cause axis motion, and in general, follow the instructions given in the program.Along with interpreting the CNC program, the CNC control has several other purposes. All current model CNC controls allow programs to be modified(edited) if mistakes are found. The CNC control allows special verification functions(like dry run) to confirm the correctness of the CNC program. The CNC control allows certain important operator inputs to be specified separate from the program, like tool length values. In general, the CNC control allows functions of the machine to be manipulated.What is a CAM system?For simple applications (like drilling holes),the CNC program can developedmanually. That is ,a programmer will sit down to write the program armed only with pencil,paper, and calculator. Again, for simple applications,this may be the very best way to develop CNC programs.As applications get more complicated, and especially when new programs are required on a regular basis, writing programs manually becomes much more difficult.To simplify the programming process,a computer aided manufacturing (CAM) system can be used. A CAM system is a software program that runs on a computer(commonly a PC) that helps the CNC programmer with the programming process. Generally speaking, a CAM system will take the tediousness and drudgery out of programming.In many companies the CAM system will work with the computer aided design(CAD) drawing developed by the computer's design engineering department.This eliminates the need for redefining the workpiece configuration to the CAM system .The CNC programmer will simply specify the machining operations to be performed and the CAM system will create the CNC program(much like the manual programmer would have written) automatically.What is a DNC system?Once the program is developed (either manually or with a CAM system), it must be loaded into the CNC control. Tough the setup person could type the program right into the control, this would be like using the CNC machine as a very expensive typewrite. If the CNC program is developed with the help of a CAM system, then it is already in the form of a text file.If the program is written manually,it can be typed into any computer using a common word processor (though most companies use a special CNC text editor for this purpose). Either way, the program is in the form of a text file that can be transferred right into the CNC machine. A distributive numerical control (DNC) system is used for this purpose.A DNC system is nothing more than a computer that is networked with one or more CNC machines. Until only recently, rather crude serial communications protocol (RS-232C) had to be used for transferring programs. Newer controls have more current communications capabilities and can be networked in more conventional ways(Ethernet, etc.). Regardless of methods , the CNC program must of course be loaded into the CNC machine before it can be run.When Numerical Control is performed under computer supervision, it is called Computer Numerical Control (CNC). Computers are the control units of CNC machines. They are built in or linked to the machines via communications channels. When a programmer inputs some information in the program by tape and so on, the computer calculates all necessary data to get the job done.Today’s systems have computers control data, so they are called Computer Numerically Controlled Machines. For both NC and CNC systems, work principles are the same. Only the way in which the execution is controlled is different. Normally, new systems are faster, more powerful, and more versatile unit.The Construction of CNC MachinesCNC machine tools are complex assemblies. However, in general, any CNC machine tool consists of the following units: computers, control systems, drive motors and tool changers.According to the construction of CNC machine tools, CNC machines work in the following manner:(1) The CNC machine language, which is a programming language of binary notation used on computers, is not used on CNC machines.(2) When the operator starts the execution cycle, the computer translates binary codes into electronic pulses that are automatically sent to the machine’s power units. The control units compare the number of pulses sent and received.(3) When the motors receive each pulse, they automatically transform the pulses into rotations that drive the spindle and lead screw, causing the spindle rotation and slide or table movement. The part on the milling machine table or the tool in the lathe turret is driven to the position specified by the program.putersAs with all computers, the CNC machine computer works on binary principle using only two characters 1 and 0, for information processing precise time impulses from the circuit. There are two states, a state with voltage, 1, and a state without voltage, 0. Series of ones and zeroes are the only states that the computer distinguishes are called machine language, and it is the only language the computer understands. When creating the program, the programmer does not care about themachine language. He or she simply uses a list of codes and keys in the meaningful information.Special built-in software compiles the program into the machine language and the machine moves the tool by its servomotors. However, the programmability of the machine is dependent on whether there is a computer in the machine’s control. If there is a minicomputer programming, say, a radius (which is a rather simple task), the computer will calculate all the points on the tool path.On the machine without a minicomputer, this may prove to be a tedious task, since the programmer must calculate all the points of intersection on the tool path. Modern CNC machines use 32-bit processors in their computers that allow fast and accurate processing of information.2.Control systemsThere are two types of control systems on NC/CNC machines: the open loop and the closed loop. The type of control loop used determines the overall accuracy of the machine.The open-loop control system does not provide positioning feedback to the control unit. The movement pulses are sent out by the control and they are received by a special type of servomotor called a stepper motor.The number of pulses that the control sends to the stepper motor controls the amount of the rotation of the motor. The stepper motor then proceeds with the next movement command. Since this control system only counts pulses and cannot identify discrepancies in positioning, the machine will continue this inaccuracy until somebody finds the error.The open-loop control can be used in applications in which there is no change in load conditions, such as the NC drilling machine.The advantage of the open-loop control system is that it is less expensive, since it does not require the additional hardware and electrics needed for positioning feedback. The disadvantage is the difficulty of detecting a positioning error.In the closed-loop control system, the electronic movement pulses are sent from the control to the servomotor, enabling the motor to rotate with each pulse. The movements are detected and counted by a feedback device called a transducer. With each step of movement, a transducer sends a signal back to the control, which compares the current position of the driven axis with the programmed position. When the number of pulses sent and received matches, the control starts sending out pulses for the next movement.Closed-loop systems are very accurate. Most have an automatic compensation for error, since the feedback device indicates the error and the control makes the necessary adjustments to bring the slide back to the position. They use AC, DC or hydraulic servomotors.Position measurement in NC machines can be accomplished through direct or indirect methods. In direct measuring systems, a sensing device reads a graduated scale on the machine table or slide for linear movement. This system is more accurate because the scale is built into the machine and backlash (the play between two adjacent mating gear teeth) in the mechanisms is not significant.In indirect measuring systems, rotary encoders or resolves convert rotary movement to translation movement. In this system, backlash can significantly affect measurement accuracy. Position feedback mechanisms utilize various sensors that are based mainly on magnetic and photoelectric principles.3.Drive MotorsThe drive motors control the machine slide movement on NC/CNC equipment. They come in four basic types: stepper motors, DC servomotors, AC servomotors and fluid servomotors.Stepper motors convert a digital pulse generated by the microcomputer unit (MCU) into a small step rotation. Stepper motors have a certain number of steps that they can travel. The number of pulses that the MCU sends to the stepper motor controls the amount of the rotation of the motor.Stepper motors are mostly used in applications where low torque is required.Stepper motors are used in open-loop control systems, while AC, DC or hydraulic servomotors are used in closed-loop control systems.Direct current (DC) servomotors are variable speed motors that rotate in response to the applied voltage. They are used to drive a lead screw and gear mechanism. DC servomotors provide higher-torque output than stepper motors.Alternative current (AC) servomotors are controlled by varying the voltage frequency to control speed. They can develop more power than a DC servomotor. They are also used to drive a lead screw and gear mechanism.Fluid or hydraulic servomotors are also variable speed motors. They are able to produce more power, or more speed in the case of pneumatic motors than electric servomotors. The hydraulic pump provides energy to values that are controlled by the MCU.4.Tool ChangersMost of the time, several different cutting tools are used to produce a part. The tools must be replaced quickly for the next machining operation. For this reason, the majority of NC/CNC machine tools are equipped with automatic tool changers, such as magazines on machining centers and turrets on turning centers. Typically, an automatic tool changer grips the tool in the spindle, pulls it out, and replaces it with another tool.On most machines with automatic tool changers, the turret or magazine can rotate in either direction, forward or reverse.Tool changers may be equipped for either random or sequential selection. In random tool selection, there is no specific pattern of tool selection. On the machining center, when the program calls for the tool, it is automatically indexed into waiting position, where it can be retrieved by the tool-handling device. On the turning center, the turret automatically rotates, bringing the tool into position.While the specific intention and application for CNC machines vary from one machine type to another, all forms of CNC have common benefits. Here are but a few of the more important benefits offered by CNC equipment.The first benefit offered by all forms of CNC machine tools is improved automation. The operator intervention related to producing workpieces can be reduced or eliminated. Many CNC machine can run unattended during their entire machining cycle, freeing the operator to do other tasks. This gives the CNC user several side benefits including reduced operator fatigue, fewer mistakes caused by human error, and consistent and predictable machining time for each workpiece. Since the machine will be running under program control, the skill level required of the CNC operator (related to basic machining practice) is also reduced as compared to a machinist producing workpieces with conventional machine tools.The second major benefit of CNC technology is consistent and accurate workpieces. Today's CNC machines boast almost unbelievable accuracy and repeatability specification. This means that once a program is verified, two,ten, or one thousand identical workpieces can be easily produced with precision and consistency.A third benefit offer by most forms of CNC machine tools is flexibility.Since these machines are run from programs, running a different workpiece is almost as easy as easy loading a different program. Once a program has been verified and executed for one production run, it can be easily recalled the next time the workpiece is to be run.This leads to yet another benefit, fast change overs. Since these machinesare very easy to set up and run, and since programs can be easily loaded,they allow very short setup time. This is imperative with today's just-in-time(JIT) product requirements.Motion control - the heart of CNCThe most basic function of any CNC machine is automatic,precise,and consistent motion control. Rather than applying completely mechanical devices to cause motion as is required on most conventional machine tools,CNC machines allow motion control in a revolutionary manner. All forms of CNC equipment have two or more directions of motion,called axes.These axes can be precisely and automatically positioned along their lengths of travel.The two most common axis types are linear(driven along a straight path) and rotary(drive along a circular path).Instead of causing motion by turning cranks and handwheels as is required on conventional machine tools. CNC machines allow motions to be commanded though programmed commands. Generally speaking ,the motion rate ( feedrate ) are programmable with almost all CNC machine tools.A CNC command executed within the control tells the drive motor to rotate a precise number of times.The rotation of the drive motor in turn rotates the ball screw. And the ball screw drives the linear axis(slide).A feedback device (linear scale) on the slide allows the control to confirm that the commanded number of rotations has taken place.数控技术CNC代表计算机数(字)控(制),自20世纪70年代以来一直受到人们的关注。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档