本科生英文文献翻译格式要求
本科毕业设计(论文)外文翻译基本规范
本科毕业设计(论文)外文翻译基本规范一、要求1、与毕业论文分开单独成文。
2、两篇文献。
二、基本格式1、文献应以英、美等国家公开发表的文献为主(Journals from English speaking countries)。
2、毕业论文翻译是相对独立的,其中应该包括题目、作者(可以不翻译)、译文的出处(杂志的名称)(5号宋体、写在文稿左上角)、关键词、摘要、前言、正文、总结等几个部分。
3、文献翻译的字体、字号、序号等应与毕业论文格式要求完全一致。
4、文中所有的图表、致谢及参考文献均可以略去,但在文献翻译的末页标注:图表、致谢及参考文献已略去(见原文)。
(空一行,字体同正文)5、原文中出现的专用名词及人名、地名、参考文献可不翻译,并同原文一样在正文中标明出处。
二、毕业论文(设计)外文翻译(一)毕业论文(设计)外文翻译的内容要求外文翻译内容必须与所选课题相关,外文原文不少于6000个印刷符号。
译文末尾要用外文注明外文原文出处。
原文出处:期刊类文献书写方法:[序号]作者(不超过3人,多者用等或et al表示).题(篇)名[J].刊名(版本),出版年,卷次(期次):起止页次.原文出处:图书类文献书写方法:[序号]作者.书名[M].版本.出版地:出版者,出版年.起止页次.原文出处:论文集类文献书写方法:[序号]作者.篇名[A].编著者.论文集名[C]. 出版地:出版者,出版年.起止页次。
要求有外文原文复印件。
(二)毕业论文(设计)外文翻译的撰写与装订的格式规范第一部分:封面1.封面格式:见“毕业论文(设计)外文翻译封面”。
普通A4纸打印即可。
第二部分:外文翻译主题1.标题一级标题,三号字,宋体,顶格,加粗二级标题,四号字,宋体,顶格,加粗三级标题,小四号字,宋体,顶格,加粗2.正文小四号字,宋体。
第三部分:版面要求论文开本大小:210mm×297mm(A4纸)版芯要求:左边距:25mm,右边距:25mm,上边距:30mm,下边距:25mm,页眉边距:23mm,页脚边距:18mm字符间距:标准行距:1.25倍页眉页角:页眉的奇数页书写—浙江师范大学学士学位论文外文翻译。
毕业论文 外文翻译格式
毕业论文外文翻译格式毕业论文外文翻译格式在撰写毕业论文时,外文翻译是一个重要的环节。
无论是引用外文文献还是翻译相关内容,都需要遵循一定的格式和规范。
本文将介绍一些常见的外文翻译格式,并探讨其重要性和应用。
首先,对于引用外文文献的格式,最常见的是使用APA(American Psychological Association)格式。
这种格式要求在引用外文文献时,先列出作者的姓氏和名字的首字母,然后是出版年份、文章标题、期刊名称、卷号和页码。
例如:Smith, J. D. (2010). The impact of climate change on biodiversity. Environmental Science, 15(2), 145-156.在翻译外文文献时,需要注意保持原文的准确性和完整性。
尽量避免意译或添加自己的解释,以免歪曲原文的意思。
同时,还需要在翻译后的文献后面加上“译者”和“翻译日期”的信息,以便读者可以追溯翻译的来源和时间。
其次,对于翻译相关内容的格式,可以参考国际标准组织ISO(International Organization for Standardization)的格式。
这种格式要求在翻译相关内容时,先列出原文,然后是翻译后的文本。
例如:原文:The importance of effective communication in the workplace cannot be overstated.翻译:工作场所有效沟通的重要性不容忽视。
在翻译相关内容时,需要注意保持原文的意思和语气。
尽量使用准确的词汇和语法结构,以便读者能够理解和接受翻译后的内容。
同时,还需要在翻译后的文本后面加上“翻译者”和“翻译日期”的信息,以便读者可以追溯翻译的来源和时间。
此外,对于长篇外文文献的翻译,可以考虑将其分成若干章节,并在每个章节前面加上章节标题。
这样可以使读者更容易理解和阅读翻译后的内容。
毕业设计(论文)外文资料和译文格式要求(模板)
成都东软学院外文资料和译文格式要求一、译文必须采用计算机输入、打印,幅面A4。
外文资料原文(复印或打印)在前,译文在后,于左侧装订。
二、具体要求1、至少翻译一篇内容与所选课题相关的外文文献。
2、译文汉字字数不少于4000字。
3、正文格式要求:宋体五号字。
译文格式参见《译文格式要求》,宋体五号字,单倍行距。
纸张纸张为A4纸,页边距上2.54cm、下2.54cm、左3.17cm、右3.17cm。
装订外文资料原文(复印或打印)在前,译文在后封面封面的专业、班级、姓名、学号等信息要全部填写正确。
封面指导教师必须为讲师以上职称,若助教则需要配备一名讲师协助指导。
讲师在前,助教在后。
指导教师姓名后面空一个中文空格,加职称。
页眉页眉说明宋体小五,左端“XX学院毕业设计(论文)”,右端“译文”。
页眉中的学院名称要与封面学院名称一致。
字数本科4000字。
附:外文资料和译文封面、空白页成都东软学院外文资料和译文专业:软件工程移动互联网应用开发班级:2班姓名:罗荣昆学号:12310420216指导教师:2015年 12月 8日Android page layoutUsing XML-Based LayoutsW hile it is technically possible to create and attach widgets to our activity purely through Java code, the way we did in Chapter 4, the more common approach is to use an XML-based layout file. Dynamic instantiation of widgets is reserved for more complicated scenarios, where the widgets are not known at compile-time (e g., populating a column of radio buttons based on data retrieved off the Internet).With that in mind, it’s time to break out the XML and learn how to lay out Android activities that way.What Is an XML-Based Layout?As the name suggests, an XML-based layout is a specification of widgets’ relationships to each other—and to their containers (more on this in Chapter 7)—encoded in XML format. Specifi cally, Android considers XML-based layouts to be resources, and as such layout files are stored in the res/layout directory inside your Android project.Each XML file contains a tree of elements specifying a layout of widgets and their containers that make up one view hierarchy. The attributes of the XML elements are properties, describing how a widget should look or how a container should behave. For example, if a Button element has an attribute value of android:textStyle = "bold", that means that the text appearing on the face of the button should be rendered in a boldface font style.Android’s SDK ships with a tool (aapt) which uses the layouts. This tool should be automatically invoked by your Android tool chain (e.g., Eclipse, Ant’s build.xml). Of particular importance to you as a developer is that aapt generates the R.java source file within your project, allowing you to access layouts and widgets within those layouts directly from your Java code. Why Use XML-Based Layouts?Most everything you do using XML layout files can be achieved through Java code. For example, you could use setTypeface() to have a button render its textin bold, instead of using a property in an XML layout. Since XML layouts are yet another file for you to keep track of, we need good reasons for using such files.Perhaps the biggest reason is to assist in the creation of tools for view definition, such as a GUI builder in an IDE like Eclipse or a dedicated Android GUI designer like DroidDraw1. Such GUI builders could, in principle, generate Java code instead of XML. The challenge is re-reading the UI definition to support edits—that is far simpler if the data is in a structured format like XML than in a programming language. Moreover, keeping generated XML definitions separated from hand-written Java code makes it less likely that somebody’s custom-crafted source will get clobbered by accident when the generated bits get re-generated. XML forms a nice middle ground between something that is easy for tool-writers to use and easy for programmers to work with by hand as needed.Also, XML as a GUI definition format is becoming more commonplace. Microsoft’s XAML2, Adobe’s Flex3, and Mozilla’s XUL4 all take a similar approach to that of Android: put layout details in an XML file and put programming smarts in source files (e.g., JavaScript for XUL). Many less-well-known GUI frameworks, such as ZK5, also use XML for view definition. While “following the herd” is not necessarily the best policy, it does have the advantage of helping to ease the transition into Android from any other XML-centered view description language. OK, So What Does It Look Like?Here is the Button from the previous chapter’s sample application, converted into an XMLlayout file, found in the Layouts/NowRedux sample project. This code sample along with all others in this chapter can be found in the Source Code area of .<?xml version="1.0" encoding="utf-8"?><Button xmlns:android="/apk/res/android"android:id="@+id/button"android:text=""android:layout_width="fill_parent"android:layout_height="fill_parent"/>The class name of the widget—Button—forms the name of the XML element. Since Button is an Android-supplied widget, we can just use the bare class name. If you create your own widgets as subclasses of android.view.View, you would need to provide a full package declara tion as well.The root element needs to declare the Android XML namespace:xmlns:android="/apk/res/android"All other elements will be children of the root and will inherit that namespace declaration.Because we want to reference this button from our Java code, we need to give it an identifier via the android:id attribute. We will cover this concept in greater detail later in this chapter.The remaining attributes are properties of this Button instance:• android:text indicates the initial text to be displayed on the button face (in this case, an empty string)• android:layout_width and android:layout_height tell Android to have the button’swidth and height fill the “parent”, in this case the entire screen—these attributes will be covered in greater detail in Chapter 7.Since this single widget is the only content in our activity, we only need this single element. Complex UIs will require a whole tree of elements, representing the widgets and containers that control their positioning. All the remaining chapters of this book will use the XML layout form whenever practical, so there are dozens of other examples of more complex layouts for you to peruse from Chapter 7 onward.What’s with the @ Signs?Many widgets and containers only need to appear in the XML layout file and do not need to be referenced in your Java code. For example, a static label (TextView) frequently only needs to be in the layout file to indicate where it should appear. These sorts of elements in the XML file do not need to have the android:id attribute to give them a name.Anything you do want to use in your Java source, though, needs an android:id.The convention is to use @+id/... as the id value, where the ... represents your locally unique name for the widget in question. In the XML layout example in the preceding section, @+id/button is the identifier for the Button widget.Android provides a few special android:id values, of the form @android:id/.... We will see some of these in various chapters of this book, such as Chapters 8 and 10.We Attach These to the Java How?Given that you have painstakingly set up the widgets and containers in an XML layout filenamed main.xml stored in res/layout, all you need is one statement in your activity’s onCreate() callback to use that layout:setContentView(yout.main);This is the same setContentView() we used earlier, passing it an instance of a View subclass (in that case, a Button). The Android-built view, constructed from our layout, is accessed from that code-generated R class. All of the layouts are accessible under yout, keyed by the base name of the layout file—main.xml results in yout.main.To access our identified widgets, use findViewById(), passing in the numeric identifier of the widget in question. That numeric identifier was generated by Android in the R class asR.id.something (where something is the specific widget you are seeking). Those widgets are simply subclasses of View, just like the Button instance we created in Chapter 4.The Rest of the StoryIn the original Now demo, the button’s face would show the current time, which would reflect when the button was last pushed (or when the activity was first shown, if the button had not yet been pushed).Most of that logic still works, even in this revised demo (NowRedux). However,rather than instantiating the Button in our activity’s onCreate() callback, we can reference the one from the XML layout:package youts;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.widget.Button; import java.util.Date;public class NowRedux extends Activity implements View.OnClickListener { Button btn;@Overridepublic void onCreate(Bundle icicle) { super.onCreate(icicle);setContentView(yout.main);btn=(Button)findViewById(R.id.button);btn.setOnClickListener(this);upd ateTime();}public void onClick(View view) { updateTime();}private void updateTime() {btn.setText(new Date().toString()); }}The first difference is that rather than setting the content view to be a view we created in Java code, we set it to reference the XML layout (setContentView(yout.main)). The R.java source file will be updated when we rebuild this project to include a reference to our layout file (stored as main.xml in our project’s res/l ayout directory).The other difference is that we need to get our hands on our Button instance, for which we use the findViewById() call. Since we identified our button as @+id/button, we can reference the button’s identifier as R.id.button. Now, with the Button instance in hand, we can set the callback and set the label as needed.As you can see in Figure 5-1, the results look the same as with the originalNow demo.Figure 5-1. The NowRedux sample activity Employing Basic WidgetsE very GUI toolkit has some basic widgets: fields, labels, buttons, etc. Android’s toolkit is no different in scope, and the basic widgets will provide a good introduction as to how widgets work in Android activities.Assigning LabelsThe simplest widget is the label, referred to in Android as a TextView. Like in most GUI toolkits, labels are bits of text not editable directly by users. Typically, they are used to identify adjacent widgets (e.g., a “Name:” label before a field where one fills in a name).In Java, you can create a label by creating a TextView instance. More commonly, though, you will create labels in XML layout files by adding a TextView element to the layout, with an android:text property to set the value of the label itself. If you need to swap labels based on certain criteria, such as internationalization, you may wish to use a resource reference in the XML instead, as will be described in Chapter 9. TextView has numerous other properties of relevance for labels, such as:• android:typeface to set the typeface to use for the label (e.g., monospace) • android:textStyle to indicate that the typeface should be made bold (bold), italic (italic),or bold and italic (bold_italic)• android:textColor to set the color of the label’s text, in RGB hex format (e.g., #FF0000 for red)For example, in the Basic/Label project, you will find the following layout file:<?xml version="1.0" encoding="utf-8"?><TextView xmlns:android=/apk/res/androidandroid:layout_width="fill_parent"android:layout_height="wrap_content"android:text="You were expecting something profound?" />As you can see in Figure 6-1, just that layout alone, with the stub Java source provided by Android’s p roject builder (e.g., activityCreator), gives you the application.Figure 6-1. The LabelDemo sample applicationButton, Button, Who’s Got the Button?We’ve already seen the use of the Button widget in Chapters 4 and 5. As it turns out, Button is a subclass of TextView, so everything discussed in the preceding section in terms of formatting the face of the button still holds. Fleeting ImagesAndroid has two widgets to help you embed images in your activities: ImageView and ImageButton. As the names suggest, they are image-based analogues to TextView and Button, respectively.Each widget takes an android:src attribute (in an XML layout) to specify what picture to use. These usually reference a drawable resource, described in greater detail in the chapter on resources. You can also set the image content based on a Uri from a content provider via setImageURI().ImageButton, a subclass of ImageView, mixes in the standard Button behaviors, for responding to clicks and whatnot.For example, take a peek at the main.xml layout from the Basic/ImageView sample project which is found along with all other code samples at : <?xml version="1.0" encoding="utf-8"?><ImageView xmlns:android=/apk/res/androidandroid:id="@+id/icon"android:layout_width="fill_parent"android:layout_height="fill_parent"android:adjustViewBounds="true"android:src="@drawable/molecule" />The result, just using the code-generated activity, is shown in Figure 6-2.Figure 6-2. The ImageViewDemo sample applicationFields of Green. Or Other Colors.Along with buttons and labels, fields are the third “anchor” of most GUI toolkits. In Android, they are implemented via the EditText widget, which is a subclass of the TextView used for labels.Along with the standard TextView properties (e.g., android:textStyle), EditText has many others that will be useful for you in constructing fields, including:• android:autoText, to control if the fie ld should provide automatic spelling assistance• android:capitalize, to control if the field should automatically capitalize the first letter of entered text (e.g., first name, city) • android:digits, to configure the field to accept only certain digi ts • android:singleLine, to control if the field is for single-line input or multiple-line input (e.g., does <Enter> move you to the next widget or add a newline?)Beyond those, you can configure fields to use specialized input methods, such asandroid:numeric for numeric-only input, android:password for shrouded password input,and android:phoneNumber for entering in phone numbers. If you want to create your own input method scheme (e.g., postal codes, Social Security numbers), you need to create your own implementation of the InputMethod interface, then configure the field to use it via android: inputMethod.For example, from the Basic/Field project, here is an XML layout file showing an EditText:<?xml version="1.0" encoding="utf-8"?><EditTextxmlns:android=/apk/res/androidandroid:id="@+id/field"android:layout_width="fill_parent"android:layout_height="fill_parent"android:singleLine="false" />Note that android:singleLine is false, so users will be able to enter in several lines of text. For this project, the FieldDemo.java file populates the input field with some prose:package monsware.android.basic;import android.app.Activity;import android.os.Bundle;import android.widget.EditText;public class FieldDemo extends Activity { @Overridepublic void onCreate(Bundle icicle) { super.onCreate(icicle);setContentView(yout.main);EditText fld=(EditText)findViewById(R.id.field);fld.setText("Licensed under the Apache License, Version 2.0 " + "(the \"License\"); you may not use this file " + "except in compliance with the License. You may " + "obtain a copy of the License at " +"/licenses/LICENSE-2.0");}}The result, once built and installed into the emulator, is shown in Figure 6-3.Figure 6-3. The FieldDemo sample applicationNote Android’s emulator only allows one application in the launcher per unique Java package. Since all the demos in this chapter share the monsware.android.basic package, you will only see one of these demos in your emulator’s launcher at any one time.Another flavor of field is one that offers auto-completion, to help users supply a value without typing in the whole text. That is provided in Android as the AutoCompleteTextView widget and is discussed in Chapter 8.Just Another Box to CheckThe classic checkbox has two states: checked and unchecked. Clicking the checkbox toggles between those states to indicate a choice (e.g., “Ad d rush delivery to my order”). In Android, there is a CheckBox widget to meet this need. It has TextView as an ancestor, so you can use TextView properties likeandroid:textColor to format the widget. Within Java, you can invoke: • isChecked() to determi ne if the checkbox has been checked• setChecked() to force the checkbox into a checked or unchecked state • toggle() to toggle the checkbox as if the user checked itAlso, you can register a listener object (in this case, an instance of OnCheckedChangeListener) to be notified when the state of the checkbox changes.For example, from the Basic/CheckBox project, here is a simple checkbox layout:<?xml version="1.0" encoding="utf-8"?><CheckBox xmlns:android="/apk/res/android"android:id="@+id/check"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="This checkbox is: unchecked" />The corresponding CheckBoxDemo.java retrieves and configures the behavior of the checkbox:public class CheckBoxDemo extends Activityimplements CompoundButton.OnCheckedChangeListener { CheckBox cb;@Overridepublic void onCreate(Bundle icicle) { super.onCreate(icicle);setContentView(yout.main);cb=(CheckBox)findViewById(R.id.check);cb.setOnCheckedChangeListener(this);}public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {if (isChecked) {cb.setText("This checkbox is: checked");}else {cb.setText("This checkbox is: unchecked");}}}Note that the activity serves as its own listener for checkbox state changes since it imple ments the OnCheckedChangeListener interface (via cb.setOnCheckedChangeListener(this)). The callback for the listener is onCheckedChanged(), which receives the checkbox whose state has changed and what the new state is. In this case, we update the text of the checkbox to reflect what the actual box contains.The result? Clicking the checkbox immediately updates its text, as you can see in Figures 6-4 and 6-5.Figure 6-4. The CheckBoxDemo sample application, with the checkbox uncheckedFigure 6-5. The same application, now with the checkbox checkedTurn the Radio UpAs with other implementations of radio buttons in other toolkits, Android’s radio buttons are two-state, like checkboxes, but can be grouped such that only one radio button in the group can be checked at any time.Like CheckBox, RadioButton inherits from CompoundButton, which in turn inherits fromTextView. Hence, all the standard TextView properties for font face, style, color, etc., are available for controlling the look of radio buttons. Similarly, you can call isChecked() on a RadioButton to see if it is selected, toggle() to select it, and so on, like you can with a CheckBox.Most times, you will want to put your RadioButton widgets inside of aRadioGroup. The RadioGroup indicates a set of radio buttons whose state is tied, meaning only one button out of the group can be selected at any time. If you assign an android:id to your RadioGroup in your XML layout, you can access the group from your Java code and invoke:• check() to check a specific radio button via its ID (e.g., group.check(R.id.radio1))• clearCheck() to clear all radio buttons, so none in the group are checked• getCheckedRadioButtonId() to get the ID of the currently-checked radio button (or -1 if none are checked)For example, from the Basic/RadioButton sample application, here is an XML layout showing a RadioGroup wrapping a set of RadioButton widgets: <?xml version="1.0" encoding="utf-8"?> <RadioGroupxmlns:android=/apk/res/androidandroid:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent" ><RadioButton android:id="@+id/radio1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Rock" /><RadioButton android:id="@+id/radio2"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Scissors" /><RadioButton android:id="@+id/radio3"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Paper" /></RadioGroup>Figure 6-6 shows the result using the stock Android-generated Java forthe project and this layout.Figure 6-6. The RadioButtonDemo sample application Note that the radio button group is initially set to be completely unchecked at the outset. To pre-set one of the radio buttons to be checked, use either setChecked() on the RadioButton or check() on the RadioGroup from within your onCreate() callback in your activity.It’s Quite a ViewAll widgets, including the ones previously shown, extend View, and as such give all widgets an array of useful properties and methods beyond those already described.Useful PropertiesSome of the properties on View most likely to be used include:• Controls the focus sequence:• android:nextFocusDown• android:nextFocusLeft• android:nextFocusRight• android:nextFocusUp• android:visibility, which controls wheth er the widget is initially visible• android:background, which typically provides an RGB color value (e.g., #00FF00 for green) to serve as the background for the widgetUseful MethodsYou can toggle whether or not a widget is enabled via setEnabled() and see if it is enabled via isEnabled(). One common use pattern for this is to disable some widgets based on a CheckBox or RadioButton selection.You can give a widget focus via requestFocus() and see if it is focused via isFocused(). You might use this in concert with disabling widgets as previously mentioned, to ensure the proper widget has the focus once your disabling operation is complete.To help navigate the tree of widgets and containers that make up an activity’s overall view, you can use:• get Parent() to find the parent widget or container• findViewById() to find a child widget with a certain ID• getRootView() to get the root of the tree (e.g., what you provided to the activity via setContentView())Android 页面布局使用XML进行布局虽然纯粹通过Java代码在activity上创建和添加部件,在技术上是可行的,我们在第4章中做的一样,更常见的方法是使用一种基于XML的布局文件。
英文参考文献格式
英文参考文献格式篇一:英语论文参考文献格式要求英语专业本科毕业论文参考文献格式要求I.文内引用(一)直接引用1.引用中的省略原始资料的引用:在正文中直接引用时,应给出作者、年份,并用带括号的数字标出页码。
若有任何资料省略,使用英文时,应用3个省略号在句中标出(),中文用6个();若两句间的资料省略,英文应用4个省略号标出(‥‥),中文用6个()。
若要在直接引用插入自己的解释,应使用方括号[ ]。
若在资料中有什么错误拼写、错误语法或标点错误会使读者糊涂,应在引用后立即插入[sic],中文用[原文如此]。
下面是一些示例:例一:The DSM IV defines the disorder [dysthymic] as being in a chronically depressed mood that occurs for most of the day more days than not for at least two years (Criterion A) .... In children, the mood may be irritable rather than depressed, and the required minimum duration is only one year (APA, 1994, p. 345).例二:Issac (1995) states that bipolar disorder is not only uncommon but may be the most diagnostic entity in children and adolescents in similar settings .... and may be the most common diagnosis in adolescents who are court-remanded to such settings (p.275).2.大段落引用当中文引用超过160字时,不使用引号,而使用“块”的形式(引用起于新的一行,首行缩进4个空格,两端对齐,之后每行都缩进)。
本科生英文文献翻译格式要求
外文文献翻译格式要求:外文文献翻译是本科生毕业的过程之一,有些格式需要我们注意一下。
(1)摘要,关键词:宋体五号(其中“摘要”和“关键词”为宋体五号加粗),行间距设置为18磅,段前段后间距设置为行,对齐方式选择“两端对齐”方式;各个关键词之间以分号(;)或者(,)隔开,最后一个关键词后不加标点;(2)正文一级标题:采用黑体小三号加粗,行间距设置为20磅,段前段后间距设置为行,一般采用“1 引言”样式,其中1和“引言”之间用一个空格分开;正文二级标题:采用黑体小三号,行间距设置为20磅,段前段后间距设置为行,一般采用“系统原理”样式,其中1和“系统原理”之间用一个空格分开;;一级标题和二级标题采用“左对齐”方式;(3)正文内容:采用宋体小四号,行间距设置为20磅,段前段后间距设置为0行,首行缩进2字符,正文对齐方式在段落格式设置中选择“两端对齐”,遇正文中有公式的,设置该行(段)行间距为“单倍行距”(4)插图:请设置图片版式为“浮于文字上方”,并勾选“居中”,图片大小根据版面,按比例适当进行缩放,图示说明采用“图 1 主控制器的结构图”样式置于图下,图序与说明以一个空格字符间隔,图示说明采用宋体五号,居中对齐,行间距设置为“单倍行距”,段前段后距设置为行;(5)表格:在表格属性中选择“居中”对齐方式,表格说明采用“表1 两种方法试验数据比较”样式置于表格上方,表序与说明以一个空格字符间隔,表格说明采用宋体五号,居中对齐,行间距设置为“单倍行距”,段前段后距设置为行;(6)参考文献:“参考文献”格式同一级标题格式,参考文献内容采用宋体五号,行间距设置为18磅,段前段后间距设置为0行,对齐方式选择“左对齐”方式,其中出现的标点一律采用英文标点;以上摘要,关键词,正文,标题及参考文献中出现的英文字符和数字,一律设置为“Times New Roman”字体。
外文文献翻译附于开题报告之后:第一部分为译文,第二部分为外文文献原文,译文与原文均需单独编制页码(底端居中)并注明出处。
关于翻译英文文献的相关要求
关于翻译英文文献的相关要求
按照学校要求,本科毕业论文的参考文献中至少有两篇为外文文献,且需要提交不少于3000字的外文文献翻译,因此,本次要求学生将自己参考文献中的一篇翻译成中文。
上交材料时,将英文原稿直接打印,后面附上中文翻译稿,两项装订到一起即可,放入论文档案袋中。
英文原稿,如果是PDF格式的直接打印即可。
如果是Word格式,最好是按照下载的原格式打印,否则按照times new roman字体打印,字号为12号。
中文译稿格式如下:
文章标题:宋体,小三,加粗,居中
一级标题,宋体,四号,加粗,靠左对齐
二级以上标题,宋体,小四,靠左对齐
正文,宋体,小四。
外文翻译及外文原文(参考格式)
外文翻译要求:1、外文资料与毕业设计(论文)选题密切相关,译文准确、质量好。
2、阅读2篇幅以上(10000字符左右)的外文资料,完成2篇不同文章的共2000汉字以上的英译汉翻译3、外文资料可以由指导教师提供,外文资料原则上应是外国作者。
严禁采用专业外语教材文章。
4、排序:“一篇中文译文、一篇外文原文、一篇中文译文、一篇外文原文”。
插图内文字及图名也译成中文。
5、标题与译文格式(字体、字号、行距、页边距等)与论文格式要求相同。
下页附:外文翻译与原文参考格式2英文翻译 (黑体、四号、顶格)外文原文出处:(译文前列出外文原文出处、作者、国籍,译文后附上外文原文)《ASHRAE Handbook —Refrigeration 》.CHAPTER3 .SYSTEM Practices for ammonia 3.1 System Selection 3.2 Equipment3.10 Reciprocating Compressors第3章 氨制冷系统的实施3.1 系统选择在选择一个氨制冷系统设计时,须要考虑一些设计决策要素,包括是否采用(1)单级压缩(2)带经济器的压缩(3)多级压缩(4)直接蒸发(5)满液式(6)液体再循环(7)载冷剂。
单级压缩系统基本的单级压缩系统由蒸发器、压缩机、冷凝器、储液器(假如用的话)和制冷剂控制装置(膨胀阀、浮球阀等)。
1997 ASHRAE 手册——“原理篇”中的第一章讨论了压缩制冷循环。
图1.壳管式经济器的布置外文翻译的标题与译文中的字体、字号、行距、页边距等与论文格式相同。
英文原文(黑体、四号、顶格)英文翻译2(黑体,四号,顶格)外文原文出处:(黑体,四号,顶格)P. Fanning. Nonlinear Models of Reinforced and Post-tensioned Concrete Beams. Lecturer, Department of Civil Engineering, University College Dublin. Received 16 Jul 2001.非线形模型钢筋和后张法预应力混凝土梁摘要:商业有限元软件一般包括混凝土在荷载做用下非线性反应的专用数值模型。
本科生英文文献翻译格式要求
本科生英文文献翻译格式要求
翻译英文文献是本科生学习和研究的重要环节之一、在进行英文文献
翻译时,要求严谨、规范,以确保翻译结果准确、准确。
以下是本科生英
文文献翻译的一般格式要求:
1.标题:在翻译文献的标题处,应准确、简洁地翻译出原文的标题。
翻译后的标题应该置于原文标题的下方,并用加粗的字体显示。
4.主体内容:主体内容是英文文献的核心部分,应该全面、准确地翻译。
在翻译主体内容时,应注意不要改变原文的结构和意义,并尽量使用
符合学科特点的术语和词汇。
5.结论:结论是对整篇文献的总结和归纳。
翻译结论时,应准确地译
出原文的意思,并清晰地表达出来。
6.引用文献:如果原文中引用了其他文献,应该在翻译文献中注明出处,并按照相应的格式进行引用。
常见的引用格式包括APA、MLA等。
总体而言,整篇文献的翻译应该准确、准确地传达原文的意义,同时
符合学术规范和格式要求。
在翻译过程中,应注意用词准确、语法正确,
尽量避免出错。
此外,还需要注意文献的语言风格,以确保翻译结果通顺、自然。
外文译文(格式要求)
外文文献译文格式如下文献题目上角标(上角标以脚注形式给出原文的文献来源,文献来源标注请注意按照指导手册中关于参考文献的要求列出,必须真实可查)原文作者姓名(英文)译者姓名包括信息(班级学号姓名 [译])(译文正文)一、************(一级标题)(一)***********(二级标题)……注意:尽量保持译文完整,整篇翻译(包括摘要、关键词等),如有省略,请译出标题后加(略),中间内容可部分省略,但是结论最好要译出,此外文末有参考文献的译出参考文献字样,后面加(略)。
译文正文的格式要求同论文正文的格式,包括字体,行间距,页边距,图表等所有格式,详见指导手册。
黑色字体为格式说明项,红色字体为需要的信息。
所有文中所出现的序号请按照指导手册要求修改,例如一、()一……等。
外文原文的打印可以直接原文打印,若原文太长,可转换为word打印所译内容,其他省略翻译的列上标题后写略。
原文打印可不必再写文献来源,只需在打印的原文第一页上方空白处按序写上“班级学号姓名”等信息。
转换为word打印的,需按照指导手册要求调整好打印格式,并在标题后以脚注形式标注原文来源信息(指导手册要求)。
在打印的word原文第一页上方空白处写上“班级学号姓名”等信息(此时不需加[译]的字样)。
所有打印文件页脚上注意自动生成页码(如译文范文)。
定稿时发送的文件名称改成(专业班级学号姓名-外文原文)。
若是译文的话则文件名为(专业班级学号姓名-外文译文)。
其他文件定稿时也是这个要求。
范文:(见下一页)韩国**对经济影响的分析①原作者名可直接用英文经济学 061*班 2006*****6 张三[译][摘要] 本文研究的目的*******的影响。
在探讨*****影响各行业的产出、就业、收入、增值和进口中应用了投入产出模型。
*******************。
根据研究的结果,得出结论*********的作用。
[关键词] ***** 投入-产出模型 **效应 **效应一、引言在当今经济全球化***************。
毕业设计(论文)外文资料和译文格式要求
东北大学东软信息学院外文资料和译文格式要求一、译文必须采用计算机输入、打印,幅面A4。
外文资料原文(复印或打印)在前,译文在后,于左侧装订。
二、具体要求1、至少翻译一篇内容与所选课题相关的外文文献。
2、译文汉字字数不少于4000字。
3、正文格式要求:宋体五号字。
附:外文资料和译文封面、空白页外文资料和译文专业:班级:姓名:学号:指导教师:2010年12月23日5.2.5. Read/Write Spin LocksRead/write spin locks have been introduced to increase the amount of concurrency inside the kernel. They allow several kernel control paths to simultaneously read the same data structure, as long as no kernel control path modifies it. If a kernel control path wishes to write to the structure, it must acquire the write version of the read/write lock, which grants exclusive access to the resource. Of course, allowing concurrent reads on data structures improves system performance.Figure 5-2 illustrates two critical regions (C1 and C2) protected by read/write locks. Kernel control paths R0 and R1 are reading the data structures in C1 at the same time, while W0 is waiting to acquire the lock for writing. Kernel control path W1 is writing the data structures inC2, while both R2 and W2 are waiting to acquire the lock for reading and writing, respectively.Figure 5-2. Read/write spin locksEach read/write spin lock is a rwlock_t structure; its lock field is a 32-bit field that encodes two distinct pieces of information:∙ A 24-bit counter denoting the number of kernel control paths currently reading the protected data structure. The two's complement value of this counter is stored in bits 023 of the field.∙An unlock flag that is set when no kernel control path is reading or writing, and clear otherwise. This unlock flag is stored in bit 24 of the field.Notice that the lock field stores the number 0x01000000 if the spin lock is idle (unlock flag set and no readers), the number 0x00000000 if it has been acquired for writing (unlock flag clear and no readers), and any number in the sequence 0x00ffffff, 0x00fffffe, and so on, if it has been acquired for reading by one, two, or more processes (unlock flag clear and the two's complement on 24 bits of the number of readers). As the spinlock_t structure, the rwlock_t structure also includes a break_lock field.The rwlock_init macro initializes the lock field of a read/write spin lock to 0x01000000 (unlocked) and the break_lock field to zero.5.2.5.1. Getting and releasing a lock for readingThe read_lock macro, applied to the address rwlp of a read/write spin lock, is similar to thespin_lock macro described in the previous section. If the kernel preemption option has been selected when the kernel was compiled, the macro performs the very same actions as those of spin_lock( ), with just one exception: to effectively acquire the read/write spin lock in step 2, the macro executes the _raw_read_trylock( ) function:int _raw_read_trylock(rwlock_t *lock){atomic_t *count = (atomic_t *)lock->lock;atomic_dec(count);if (atomic_read(count) >= 0)return 1;atomic_inc(count);return 0;}The lock fieldthe read/write lock counteris accessed by means of atomic operations. Notice, however, that the whole function does not act atomically on the counter: for instance, the counter might change after having tested its value with the if statement and before returning 1. Nevertheless, the function works properly: in fact, the function returns 1 only if the counter was not zero or negative before the decrement, because the counter is equal to 0x01000000 for no owner, 0x00ffffff for one reader, and 0x00000000 for one writer.If the kernel preemption option has not been selected when the kernel was compiled, theread_lock macro yields the following assembly language code:movl $rwlp->lock,%eaxlock; subl $1,(%eax)jns 1fcall _ _read_lock_failed1:where _ _read_lock_failed( ) is the following assembly language function:_ _read_lock_failed:lock; incl (%eax)1: pausecmpl $1,(%eax)js 1block; decl (%eax)js _ _read_lock_failedretThe read_lock macro atomically decreases the spin lock value by 1, thus increasing the number of readers. The spin lock is acquired if the decrement operation yields a nonnegative value; otherwise, the _ _read_lock_failed( ) function is invoked. The function atomically increases the lock field to undo the decrement operation performed by the read_lock macro, and then loops until the field becomes positive (greater than or equal to 1). Next, _ _read_lock_failed( ) tries to get the spin lock again (another kernel control path could acquire the spin lock for writing right after the cmpl instruction).Releasing the read lock is quite simple, because the read_unlock macro must simply increase the counter in the lock field with the assembly language instruction:lock; incl rwlp->lockto decrease the number of readers, and then invoke preempt_enable( ) to reenable kernel preemption.5.2.5.2. Getting and releasing a lock for writingThe write_lock macro is implemented in the same way as spin_lock( ) andread_lock( ). For instance, if kernel preemption is supported, the function disables kernel preemption and tries to grab the lock right away by invoking_raw_write_trylock( ). If this function returns 0, the lock was already taken, thus the macro reenables kernel preemption and starts a busy wait loop, as explained in the description of spin_lock( ) in the previous section.The _raw_write_trylock( ) function is shown below:int _raw_write_trylock(rwlock_t *lock){atomic_t *count = (atomic_t *)lock->lock;if (atomic_sub_and_test(0x01000000, count))return 1;atomic_add(0x01000000, count);return 0;}The _raw_write_trylock( ) function subtracts 0x01000000 from the read/write spin lock value, thus clearing the unlock flag (bit 24). If the subtraction operation yieldszero (no readers), the lock is acquired and the function returns 1; otherwise, the function atomically adds 0x01000000 to the spin lock value to undo the subtraction operation.Once again, releasing the write lock is much simpler because the write_unlock macro must simply set the unlock flag in the lock field with the assembly language instruction:lock; addl $0x01000000,rwlpand then invoke preempt_enable().5.2.6. SeqlocksWhen using read/write spin locks, requests issued by kernel control paths to perform a read_lock or a write_lock operation have the same priority: readers must wait until the writer has finished and, similarly, a writer must wait until all readers have finished.Seqlocks introduced in Linux 2.6 are similar to read/write spin locks, except that they give a much higher priority to writers: in fact a writer is allowed to proceed even when readers are active. The good part of this strategy is that a writer never waits (unless another writer is active); the bad part is that a reader may sometimes be forced to read the same data several times until it gets a valid copy.Each seqlock is a seqlock_t structure consisting of two fields: a lock field of type spinlock_t and an integer sequence field. This second field plays the role of a sequence counter. Each reader must read this sequence counter twice, before and after reading the data, and check whether the two values coincide. In the opposite case, a new writer has become active and has increased the sequence counter, thus implicitly telling the reader that the data just read is not valid.A seqlock_t variable is initialized to "unlocked" either by assigning to it the value SEQLOCK_UNLOCKED, or by executing the seqlock_init macro. Writers acquire and release a seqlock by invoking write_seqlock( ) and write_sequnlock( ). The first function acquires the spin lock in the seqlock_t data structure, then increases the sequence counter by one; the second function increases the sequence counter once more, then releases the spin lock. This ensures that when the writer is in the middle of writing, the counter is odd, and that when no writer is altering data, the counter is even. Readers implement a critical region as follows:unsigned int seq;do {seq = read_seqbegin(&seqlock);/* ... CRITICAL REGION ... */} while (read_seqretry(&seqlock, seq));read_seqbegin() returns the current sequence number of the seqlock; read_seqretry() returns 1 if either the value of the seq local variable is odd (a writer was updating the data structure when the read_seqbegin( ) function has been invoked), or if the value of seq does not match the current value of the seqlock's sequence counter (a writer started working while the reader was still executing the code in the critical region).Notice that when a reader enters a critical region, it does not need to disable kernel preemption; on the other hand, the writer automatically disables kernel preemption when entering the critical region, because it acquires the spin lock.Not every kind of data structure can be protected by a seqlock. As a general rule, the following conditions must hold:∙The data structure to be protected does not include pointers that are modified by the writers and dereferenced by the readers (otherwise, a writer couldchange the pointer under the nose of the readers)∙The code in the critical regions of the readers does not have side effects (otherwise, multiple reads would have different effects from a single read) Furthermore, the critical regions of the readers should be short and writers should seldom acquire the seqlock, otherwise repeated read accesses would cause a severe overhead. A typical usage of seqlocks in Linux 2.6 consists of protecting some data structures related to the system time handling (see Chapter 6).5.2.7. Read-Copy Update (RCU)Read-copy update (RCU) is yet another synchronization technique designed to protect data structures that are mostly accessed for reading by several CPUs. RCU allows many readers and many writers to proceed concurrently (an improvement over seqlocks, which allow only one writer to proceed). Moreover, RCU is lock-free, that is, it uses no lock or counter shared by all CPUs; this is a great advantage over read/write spin locks and seqlocks, which have a high overhead due to cache line-snooping and invalidation.How does RCU obtain the surprising result of synchronizing several CPUs without shared data structures? The key idea consists of limiting the scope of RCU as follows:1.Only data structures that are dynamically allocated and referenced by meansof pointers can be protected by RCU.2.No kernel control path can sleep inside a critical region protected by RCU.When a kernel control path wants to read an RCU-protected data structure, it executes the rcu_read_lock( ) macro, which is equivalent to preempt_disable( ). Next, the reader dereferences the pointer to the data structure and starts reading it. As stated above, the reader cannot sleep until it finishes reading the data structure; the end of the critical region is marked by the rcu_read_unlock( ) macro, which is equivalent to preempt_enable( ).Because the reader does very little to prevent race conditions, we could expect that the writer has to work a bit more. In fact, when a writer wants to update the data structure, it dereferences the pointer and makes a copy of the whole data structure. Next, the writer modifies the copy. Once finished, the writer changes the pointer to the data structure so as to make it point to the updated copy. Because changing the value of the pointer is an atomic operation, each reader or writer sees either the old copy or the new one: no corruption in the data structure may occur. However, a memory barrier is required to ensure that the updated pointer is seen by the other CPUs only after the data structure has been modified. Such a memory barrier is implicitly introduced if a spin lock is coupled with RCU to forbid the concurrent execution of writers.The real problem with the RCU technique, however, is that the old copy of the data structure cannot be freed right away when the writer updates the pointer. In fact, the readers that were accessing the data structure when the writer started its update could still be reading the old copy. The old copy can be freed only after all (potential) readers on the CPUs have executed the rcu_read_unlock( ) macro. The kernel requires every potential reader to execute that macro before:∙The CPU performs a process switch (see restriction 2 earlier).∙The CPU starts executing in User Mode.∙The CPU executes the idle loop (see the section "Kernel Threads" in Chapter 3).In each of these cases, we say that the CPU has gone through a quiescent state.The call_rcu( ) function is invoked by the writer to get rid of the old copy of the data structure. It receives as its parameters the address of an rcu_head descriptor (usually embedded inside the data structure to be freed) and the address of a callback function to be invoked when all CPUs have gone through a quiescent state. Once executed, the callback function usually frees the old copy of the data structure.The call_rcu( ) function stores in the rcu_head descriptor the address of the callback and its parameter, then inserts the descriptor in a per-CPU list of callbacks. Periodically, once every tick (see the section "Updating Local CPU Statistics" in Chapter 6), the kernel checks whether the local CPU has gone through a quiescent state. When all CPUs have gone through a quiescent state, a local taskletwhose descriptor is stored in the rcu_tasklet per-CPU variableexecutes all callbacks in the list.RCU is a new addition in Linux 2.6; it is used in the networking layer and in the Virtual Filesystem.5.2.8. SemaphoresWe have already introduced semaphores in the section "Synchronization and Critical Regions" in Chapter 1. Essentially, they implement a locking primitive that allows waiters to sleep until the desired resource becomes free.Actually, Linux offers two kinds of semaphores:∙Kernel semaphores, which are used by kernel control paths∙System V IPC semaphores, which are used by User Mode processesIn this section, we focus on kernel semaphores, while IPC semaphores are described in Chapter 19.A kernel semaphore is similar to a spin lock, in that it doesn't allow a kernel control path to proceed unless the lock is open. However, whenever a kernel control path tries to acquire a busy resource protected by a kernel semaphore, the corresponding process is suspended. It becomes runnable again when the resource is released. Therefore, kernel semaphores can be acquired only by functions that are allowed to sleep; interrupt handlers and deferrable functions cannot use them.A kernel semaphore is an object of type struct semaphore, containing the fields shown in the following list.countStores an atomic_t value. If it is greater than 0, the resource is free that is, itis currently available. If count is equal to 0, the semaphore is busy but noother process is waiting for the protected resource. Finally, if count isnegative, the resource is unavailable and at least one process is waiting for it.waitStores the address of a wait queue list that includes all sleeping processes that are currently waiting for the resource. Of course, if count is greater than orequal to 0, the wait queue is empty.sleepersStores a flag that indicates whether some processes are sleeping on thesemaphore. We'll see this field in operation soon.The init_MUTEX( ) and init_MUTEX_LOCKED( ) functions may be used to initialize a semaphore for exclusive access: they set the count field to 1 (free resource with exclusive access) and 0 (busy resource with exclusive access currently granted to the process that initializes the semaphore), respectively. The DECLARE_MUTEX and DECLARE_MUTEX_LOCKED macros do the same, but they also statically allocate the struct semaphore variable. Note that a semaphore could also be initialized with an arbitrary positive value n for count. In this case, at most n processes are allowed to concurrently access the resource.5.2.8.1. Getting and releasing semaphoresLet's start by discussing how to release a semaphore, which is much simpler than getting one. When a process wishes to release a kernel semaphore lock, it invokes the up( ) function. This function is essentially equivalent to the following assembly language fragment:movl $sem->count,%ecxlock; incl (%ecx)jg 1flea %ecx,%eaxpushl %edxpushl %ecxcall _ _uppopl %ecxpopl %edx1:where _ _up( ) is the following C function:__attribute__((regparm(3))) void _ _up(struct semaphore *sem){wake_up(&sem->wait);}The up( ) function increases the count field of the *sem semaphore, and then it checks whether its value is greater than 0. The increment of count and the setting of the flag tested by the following jump instruction must be atomically executed, or else another kernel control path could concurrently access the field value, with disastrousresults. If count is greater than 0, there was no process sleeping in the wait queue, so nothing has to be done. Otherwise, the _ _up( ) function is invoked so that one sleeping process is woken up. Notice that _ _up( ) receives its parameter from the eax register (see the description of the _ _switch_to( ) function in the section "Performing the Process Switch" in Chapter 3).Conversely, when a process wishes to acquire a kernel semaphore lock, it invokes the down( ) function. The implementation of down( ) is quite involved, but it is essentially equivalent to the following:down:movl $sem->count,%ecxlock; decl (%ecx);jns 1flea %ecx, %eaxpushl %edxpushl %ecxcall _ _downpopl %ecxpopl %edx1:where _ _down( ) is the following C function:__attribute__((regparm(3))) void _ _down(struct semaphore * sem){DECLARE_WAITQUEUE(wait, current);unsigned long flags;current->state = TASK_UNINTERRUPTIBLE;spin_lock_irqsave(&sem->wait.lock, flags);add_wait_queue_exclusive_locked(&sem->wait, &wait);sem->sleepers++;for (;;) {if (!atomic_add_negative(sem->sleepers-1, &sem->count)) {sem->sleepers = 0;break;}sem->sleepers = 1;spin_unlock_irqrestore(&sem->wait.lock, flags);schedule( );spin_lock_irqsave(&sem->wait.lock, flags);current->state = TASK_UNINTERRUPTIBLE;}remove_wait_queue_locked(&sem->wait, &wait);wake_up_locked(&sem->wait);spin_unlock_irqrestore(&sem->wait.lock, flags);current->state = TASK_RUNNING;}The down( ) function decreases the count field of the *sem semaphore, and then checks whether its value is negative. Again, the decrement and the test must be atomically executed. If count is greater than or equal to 0, the current process acquires the resource and the execution continues normally. Otherwise, count is negative, and the current process must be suspended. The contents of some registers are saved on the stack, and then _ _down( ) is invoked.Essentially, the _ _down( ) function changes the state of the current process from TASK_RUNNING to TASK_UNINTERRUPTIBLE, and it puts the process in the semaphore wait queue. Before accessing the fields of the semaphore structure, the function also gets the sem->wait.lock spin lock that protects the semaphore wait queue (see "How Processes Are Organized" in Chapter 3) and disables local interrupts. Usually, wait queue functions get and release the wait queue spin lock as necessary when inserting and deleting an element. The _ _down( ) function, however, uses the wait queue spin lock also to protect the other fields of the semaphore data structure, so that no process running on another CPU is able to read or modify them. To that end, _ _down( ) uses the "_locked" versions of the wait queue functions, which assume that the spin lock has been already acquired before their invocations.The main task of the _ _down( ) function is to suspend the current process until the semaphore is released. However, the way in which this is done is quite involved. To easily understand the code, keep in mind that the sleepers field of the semaphore is usually set to 0 if no process is sleeping in the wait queue of the semaphore, and it is set to 1 otherwise. Let's try to explain the code by considering a few typical cases. MUTEX semaphore open (count equal to 1, sleepers equal to 0)The down macro just sets the count field to 0 and jumps to the nextinstruction of the main program; therefore, the _ _down( ) function is notexecuted at all.MUTEX semaphore closed, no sleeping processes (count equal to 0, sleepers equal to 0)The down macro decreases count and invokes the _ _down( ) function withthe count field set to -1 and the sleepers field set to 0. In each iteration of theloop, the function checks whether the count field is negative. (Observe thatthe count field is not changed by atomic_add_negative( ) because sleepers isequal to 0 when the function is invoked.)∙If the count field is negative, the function invokes schedule( ) tosuspend the current process. The count field is still set to -1, and thesleepers field to 1. The process picks up its run subsequently insidethis loop and issues the test again.∙If the count field is not negative, the function sets sleepers to 0 and exits from the loop. It tries to wake up another process in thesemaphore wait queue (but in our scenario, the queue is now empty)and terminates holding the semaphore. On exit, both the count fieldand the sleepers field are set to 0, as required when the semaphore isclosed but no process is waiting for it.MUTEX semaphore closed, other sleeping processes (count equal to -1, sleepers equal to 1)The down macro decreases count and invokes the _ _down( ) function withcount set to -2 and sleepers set to 1. The function temporarily sets sleepers to 2, and then undoes the decrement performed by the down macro by addingthe value sleepers-1 to count. At the same time, the function checks whethercount is still negative (the semaphore could have been released by theholding process right before _ _down( ) entered the critical region).∙If the count field is negative, the function resets sleepers to 1 andinvokes schedule( ) to suspend the current process. The count field isstill set to -1, and the sleepers field to 1.∙If the count field is not negative, the function sets sleepers to 0, tries to wake up another process in the semaphore wait queue, and exitsholding the semaphore. On exit, the count field is set to 0 and thesleepers field to 0. The values of both fields look wrong, becausethere are other sleeping processes. However, consider that anotherprocess in the wait queue has been woken up. This process doesanother iteration of the loop; the atomic_add_negative( ) functionsubtracts 1 from count, restoring it to -1; moreover, before returningto sleep, the woken-up process resets sleepers to 1.So, the code properly works in all cases. Consider that the wake_up( ) function in _ _down( ) wakes up at most one process, because the sleeping processes in the wait queue are exclusive (see the section "How Processes Are Organized" in Chapter 3).Only exception handlers , and particularly system call service routines , can use the down( ) function. Interrupt handlers or deferrable functions must not invoke down( ),because this function suspends the process when the semaphore is busy. For this reason, Linux provides the down_trylock( ) function, which may be safely used by one of the previously mentioned asynchronous functions. It is identical to down( ) except when the resource is busy. In this case, the function returns immediately instead of putting the process to sleep.A slightly different function called down_interruptible( ) is also defined. It is widely used by device drivers, because it allows processes that receive a signal while being blocked on a semaphore to give up the "down" operation. If the sleeping process is woken up by a signal before getting the needed resource, the function increases the count field of the semaphore and returns the value -EINTR. On the other hand, if down_interruptible( ) runs to normal completion and gets the resource, it returns 0. The device driver may thus abort the I/O operation when the return value is -EINTR.Finally, because processes usually find semaphores in an open state, the semaphore functions are optimized for this case. In particular, the up( ) function does not execute jump instructions if the semaphore wait queue is empty; similarly, the down( ) function does not execute jump instructions if the semaphore is open. Much of the complexity of the semaphore implementation is precisely due to the effort of avoiding costly instructions in the main branch of the execution flow.5.2.9. Read/Write SemaphoresRead/write semaphores are similar to the read/write spin locks described earlier in the section "Read/Write Spin Locks," except that waiting processes are suspended instead of spinning until the semaphore becomes open again.Many kernel control paths may concurrently acquire a read/write semaphore for reading; however, every writer kernel control path must have exclusive access to the protected resource. Therefore, the semaphore can be acquired for writing only if no other kernel control path is holding it for either read or write access. Read/write semaphores improve the amount of concurrency inside the kernel and improve overall system performance.The kernel handles all processes waiting for a read/write semaphore in strict FIFO order. Each reader or writer that finds the semaphore closed is inserted in the last position of a semaphore's wait queue list. When the semaphore is released, the process in the first position of the wait queue list are checked. The first process is always awoken. If it is a writer, the other processes in the wait queue continue to sleep. If it is a reader, all readers at the start of the queue, up to the first writer, are also woken up and get the lock. However, readers that have been queued after a writer continue to sleep.Each read/write semaphore is described by a rw_semaphore structure that includes the following fields:countStores two 16-bit counters. The counter in the most significant word encodesin two's complement form the sum of the number of nonwaiting writers(either 0 or 1) and the number of waiting kernel control paths. The counter inthe less significant word encodes the total number of nonwaiting readers andwriters.wait_listPoints to a list of waiting processes. Each element in this list is arwsem_waiter structure, including a pointer to the descriptor of the sleepingprocess and a flag indicating whether the process wants the semaphore forreading or for writing.wait_lockA spin lock used to protect the wait queue list and the rw_semaphorestructure itself.The init_rwsem( ) function initializes an rw_semaphore structure by setting the count field to 0, the wait_lock spin lock to unlocked, and wait_list to the empty list. The down_read( ) and down_write( ) functions acquire the read/write semaphore for reading and writing, respectively. Similarly, the up_read( ) and up_write( ) functions release a read/write semaphore previously acquired for reading and for writing. The down_read_trylock( ) and down_write_trylock( ) functions are similar todown_read( ) and down_write( ), respectively, but they do not block the process if the semaphore is busy. Finally, the downgrade_write( ) function atomically transforms a write lock into a read lock. The implementation of these five functions is long, but easy to follow because it resembles the implementation of normal semaphores; therefore, we avoid describing them.5.2.10. CompletionsLinux 2.6 also makes use of another synchronization primitive similar to semaphores: completions . They have been introduced to solve a subtle race condition that occurs in multiprocessor systems when process A allocates a temporary semaphore variable, initializes it as closed MUTEX, passes its address to process B, and then invokes down( ) on it. Process A plans to destroy the semaphore as soon as it awakens. Later。
外文参考文献及翻译稿的要求与格式
百度文库- 让每个人平等地提升自我!外文参考文献及翻译稿的要求及格式一、外文参考文献的要求1、外文原稿应与本研究项目接近或相关联;2、外文原稿可选择相关文章或节选章节,正文字数不少于1500字。
3、格式:外文文献左上角标注“外文参考资料”字样,小四宋体。
1.5倍行距。
标题:三号,Times New Roman字体加粗,居中,行距1.5倍。
段前段后空一行。
作者(居中)及正文:小四号,Times New Roman字体,首行空2字符。
4、A4纸统一打印。
二、中文翻译稿1、中文翻译稿要与外文文献匹配,翻译要正确;2、中文翻译稿另起一页;3、格式:左上角标“中文译文”,小四宋体。
标题:宋体三号加粗居中,行距1.5倍。
段前、段后空一行。
作者(居中)及正文:小四号宋体,数字等Times New Roman字体,1.5倍行距,首行空2字符。
正文字数1500左右。
4、A4纸统一打印。
格式范例如后所示。
百度文库 - 让每个人平等地提升自我!外文参考文献Implementation of internal controls of small andmedium-sized pow erStephen Ryan The enterprise internal control carries out the strength to refer to the enterprise internal control system execution ability and dynamics, it is the one whole set behavior and the technical system, is unique competitive advantage which the enterprise has; Is a series of …………………………标题:三号,Times New Roman字体加粗,居中,行距1.5倍。
外文翻译撰写规范
第一部分:格式篇
1.外文翻译封面中从“院系”——“指导老师”旁边的下划线请保持长度一致。
2.封面中“原文出处”信息应该完整,同参考文献中的外文文献格式。
3.先中文后英文,中文页码为阿拉伯数字,英文页码为罗马数字。
4.中英文上方第一行都是文章或者书的名称,第二行是出处。
5.字间距为标准,行距为固定值,设置值为23。
如标题与标题、标题与段落之
间间距明显较大时,请选定标题并选择“段落”检查间距中“段前”、“段后”
是否是0行。
6.中文文章段落中出现除序号外的阿拉伯数字或英文应用Times New Roman字
体。
第二部分:内容篇
1.必须是英文文献翻译成中文,不能中文翻译成英文。
2. 英文文献必须是外国人写的,不能只是中国人发表的外文论文。
3.外文文献只要和所写课题相关即可,不用完全一致。
如课题为审计风险,如果找不到审计风险的外文,也可以找审计相关的外文即可。
4.关键词前后翻译必须一致,英文缩写在中文翻译中第一次出现时必须翻译出全称。
5.不能仅仅依靠翻译软件,翻译的中文应检查是否语句通顺,是否有词不达意的情况。
毕业论文英文翻译要求(通用版)(范文模版)
毕业论文英文翻译要求(通用版)(范文模版)第一篇:毕业论文英文翻译要求(通用版)(范文模版)本科毕业设计(论文)英文翻译要求翻译的文章应与毕业设计课题或专业知识相关的文献,要求翻译1-2篇,合计中文字数不少于3000字。
外文翻译应包括:外文题目,作者、出版日期和出版社,翻译内容的起止页码,外文原文,然后是中文题目,作者、出版日期和出版社,中文翻译。
外文翻译所用的文献,应主要选自学术期刊或学术会议的文章,其次是教科书或其他书籍。
英文原文和翻译均作为毕业论文附录,同时给出英文原文的出处,如果是网上下载的原文请给出网址。
第二篇:毕业论文英文翻译武汉科技大学本科毕业设计外文翻译Automatic Statistical Process Control of a CNC Turning Centre Using Tool Offsets and Tool ChangeP.R.Gibson and K.HoangDepartment of Mechanical Engineering, University of Wollongong, Australia School of Mechanical and Manufacturing Engineering, University of New South Wales, Australia 数控车削中心刀补及换刀的自动统计过程控制P.R.Gibson and K.Hoang澳大利亚伍伦贡大学机械工程系,新威尔士大学机械制造工程学院武汉科技大学本科毕业设计外文翻译该论文涉及了自动统计过程控制(ASPC)在数控车削中刀补和换刀的自动周期测量上的运用。
由于当今制造对快速稳定的控制系统的需求,而且为了实现较高的产出率,一个闭环ASPC系统已被采用。
我们引入了自动周期测量技术,以全面测量该系统。
关键字:工艺规划;数控;车削简介今天,所有制造行业都面临着采用更加经济高效的质量控制系统,以满足客户的需求这一问题。
毕业设计(论文)外文资料和译文格式要求(模板)
1、至少翻译一篇内容与所选课题相关的外文文献。
2、译文汉字字数不少于2000字。
3、正文格式要求:宋体五号字。
附:外文资料和译文封面、空白页
大连东软信息技术职业学院
外文资料和译文
专业:
班级:
姓名:
学号:
指要求模板毕业论文格式模板外文翻译模板外文译文java外文及译文论文格式模板毕业答辩ppt模板应届毕业生简历模板毕业生简历模板毕业论文模板
大连东软信息技术职业学院
外文资料和译文格式要求
一、译文必须采用计算机输入、打印,幅面A4。外文资料原文(复印或打印)在前,译文在后,于左侧装订。
外文文献翻译格式要求
外文文献翻译格式要求
外文文献中文翻译的格式要求通常包括以下几个方面:
2.翻译稿的标题应与原文保持一致,通常在文献翻译稿的第一页的中间位置,使用加粗、居中排版。
3.每一段落开始时空两行,段落间距可以根据需要适当调整。
4. 翻译稿中的引用部分,应在文中用中括号标注原文引用部分的位置,如 "[Original text]"
5.翻译稿中的图表、表格等内容,需要在相应位置插入,并在上方标明图表或表格编号,并在下方进行说明。
7.在翻译稿的最后,需要标注翻译人员的签名,并附上日期。
总之,翻译稿与原文应尽量保持一致,在排版和格式上遵循一定的要求和规范。
具体格式要求也可以根据翻译机构或期刊的要求进行调整。
专业文献翻译要求和表格
专业文献翻译要求和表格
一、要求
1、外文文献翻译的内容必须和毕业论文(设计)相关。
为近5年发表的、没有翻译过的论文或专著,并将其作为参考文献。
2、外文文献具体资料由指导教师推荐或指定。
3、不少于5000英文单词(若文章太长,可翻译一部分)。
国外作者姓名可不翻译。
译文一般不少于3000汉字。
4、翻译须独立完成,使用便捷翻译工具一经发现即按重做论处。
5、按先译文后原文顺序装订
二、译文格式
1、论文题目。
三号字,黑体,加粗,居中,上下各空一行
2、作者姓名(不翻译)。
小四号字,Times New Roman字体,居中,上下各空一行
3、作者单位。
五号字,宋体,段前、段后各空0.5行,居中
4、摘要(含关键词)。
五号字,宋体,1.35倍行距
5、正文:小四号字,宋体,1.35倍行距。
6、参考文献。
五号字,作者可不翻译(Times New Roman字体),其余5号宋体。
1.35倍行距。
7、页面设置:装订线0.5cm,上2.5cm,下2.0cm,左2.5cm,右2.0cm。
原文置于外文后一起装订。
,
译文
学院:
专业:
学号:
姓名:
指导教师:
江苏科技大学年月日。
格式要求4 外文文献翻译封面格式及要求
备注: 1.从所引用的与毕业设计(论文)内容相近的外文文献中选择一篇 或一部分进行翻译(不少于 3000 实词) ; 2.外文文献翻译的装订分两部分,第一部分为外文文献的中文翻 译,第二部分为外文文献原文(原文打印、复印均可) ; 3.外文文献正文按毕业设计(论文)格式排版,两部分内容不能联 排,用分页符分页。
毕业设计(论文)外文文献翻译
宋体三号,加粗,1.5 倍行距 宋体三号,居中,1.5 倍行距
院
系:
年级专业: 姓 学 附 名: 号: 件:
即所翻译文献英文名称,三 号宋体字, 1.5 倍行距, 若标 题较长,写分两行写,较短, 则将后一空行删除。
宋体五号字,单倍行距
指导老师评语:
指导教师签名: 年 月 日
英文翻译格式要求
英文翻译格式要求
一、英文翻译内容
1、要有标题,作者及作者单位,正文,以即最后的参考文献。
2、最好是英文上有什么,中文也应有相应的翻译。
人名和地名可以不翻译,但中文上要有该内容,即可以不翻译而用英文写在中文上。
二、格式要求
1、页面设置:自定义:210mm×297mm(或A4)
边距:上:20mm,下:20mm,
左:25mm, 右:25mm
2、标题用大于小四号的字,,自己调整字号大小,最好以一行写完为好。
正文中文字号为小四号字,宋体,行间距1.5倍。
正文英文及数字用The new Roman 字体。
三、图和表的要求
1、图
图题用五号字,所有图在放在合适的位置,图的大小以能看清图的内容为好。
2、表
表头用五号字,表居中放置。
外文文献翻译格式
外文文献翻译格式
外文文献翻译格式一般需包括以下内容:
1. 文献翻译的题目:对外文文献的标题进行翻译,并在翻译后的题目前加上“外文文献翻译:”。
2. 文献的出处:包括外文文献的作者名称、文献标题、原文出版信息等。
3. 翻译的正文:按照文章的段落,将外文文献逐段翻译成中文。
在翻译的文本前后加上序号,以示区分。
4. 翻译的语言风格:外文文献翻译应注重语言风格的保持。
翻译时要根据文章的风格,选择适当的中文表达方式,保持原文的句子结构和词汇用法。
5. 原文和译文对照:将原文和译文对照排列,方便读者对照阅读。
可以将原文和译文分别排列在左右两栏中,或者将原文和译文分别放在不同的页面上,便于对照阅读。
6. 翻译中的注释:如果有部分内容翻译困难或有待解释的地方,在翻译文中添加注释。
注释的格式一般为在译文后面加上方括号,括号内的文字为注释内容。
7. 译者的信息:在文献翻译末尾一般会加上译者的姓名,并注明译者的专业领域或者工作单位。
总之,外文文献翻译格式需要将原文翻译成中文,保持原文的结构和风格,并加上适当的注释和对照,方便读者阅读和理解。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
外文文献翻译格式要求:
外文文献翻译是本科生毕业的过程之一,有些格式需要我们注意一下。
(1)摘要,关键词:宋体五号(其中“摘要”和“关键词”为宋体五号加粗),行间距设置为18磅,段前段后间距设置为0.5行,对齐方式选择“两端对齐”方式;
各个关键词之间以分号(;)或者(,)隔开,最后一个关键词后不加标点;
(2)正文一级标题:采用黑体小三号加粗,行间距设置为20磅,段前段后间距设置为0.5行,一般采用“1 引言”样式,其中1和“引言”之间用一个空格分开;
正文二级标题:采用黑体小三号,行间距设置为20磅,段前段后间距设置为0.5行,一般采用“2.1 系统原理”样式,其中1和“系统原理”之间用一个空格分开;;
一级标题和二级标题采用“左对齐”方式;
(3)正文内容:采用宋体小四号,行间距设置为20磅,段前段后间距设置为0行,首行缩进2字符,正文对齐方式在段落格式设置中选择“两端对齐”,遇正文中有公式的,设置该行(段)行间距为“单倍行距”
(4)插图:请设置图片版式为“浮于文字上方”,并勾选“居中”,图片大小根据版面,按比例适当进行缩放,图示说明采用“图 1 主控制器的结构图”样式置于图下,图序与说明以一个空格字符间隔,图示说明采用宋体五号,居中对齐,行间距设置为“单倍行距”,段前段后距设置为0.5行;
(5)表格:在表格属性中选择“居中”对齐方式,表格说明采用“表1 两种方法试验数据比较”样式置于表格上方,表序与说明以一个空格字符间隔,表格说明采用宋体五号,居中对齐,行间距设置为“单倍行距”,段前段后距设置为0.5行;
(6)参考文献:“参考文献”格式同一级标题格式,参考文献内容采用宋体五号,行间距设置为18磅,段前段后间距设置为0行,对齐方式选择“左对齐”方式,其中出现的标点一律采用英文标点;
以上摘要,关键词,正文,标题及参考文献中出现的英文字符和数字,一律设置为“Times New Roman”字体。
外文文献翻译附于开题报告之后:第一部分为译文,第二部分为外文文献原文,译文与原文均需单独编制页码(底端居中)并注明出处。
本附件为封面,封面上不得出现页码。
因此,可以将封面、译文和原文分为3节,然后分别对此3节分别添加页码,页码
分节及设置页码方法如下:
1.将光标定位到需要分节的地方,选择“插入”菜单
下的“分隔符”,如图1所示,选择“下一页”后“确定”。
图1 插入分隔符
2.在需要设置页码的页面,选择“插入”菜单下的“页
码”,如图2所示:
图2 插入页码
在插入下一节的页码时,可能会遇到连续编页码的情况(如译文编页码到12页,原文第一页可能显示为13),此时可以在原文一节重新选择“插入”-》“页码”,出现图2后,选择“格式”,弹出图3所示的对话框中的“续前节”改选择为“起始页码”,并将其后编辑框中数字设置为1,确定即可。
图3 重新开始编号。