毕业论文外文翻译ASP横幅广告系统

上传人:痛*** 文档编号:139895962 上传时间:2022-08-22 格式:DOC 页数:12 大小:83.50KB
收藏 版权申诉 举报 下载
毕业论文外文翻译ASP横幅广告系统_第1页
第1页 / 共12页
毕业论文外文翻译ASP横幅广告系统_第2页
第2页 / 共12页
毕业论文外文翻译ASP横幅广告系统_第3页
第3页 / 共12页
资源描述:

《毕业论文外文翻译ASP横幅广告系统》由会员分享,可在线阅读,更多相关《毕业论文外文翻译ASP横幅广告系统(12页珍藏版)》请在装配图网上搜索。

1、ASP Banner Ad SystemTo the Reader from Joe:This is a user-submitted tutorial by the author above. I have read the tutorial and set the format to fit HTML Goodies, but for the most part have not changed the language. I chose this tutorial because many readers have been asking for more ASP tutorials.

2、This is a great one.Sorry I cannot show you the event here. The HTML Goodies servers do not offer ASP. I will tell you though that if you run IE5.0 or better, open the contents of the zip file into a directory and it runs just fine.If you havent already, you may want to read my introductoryASP tutor

3、ialbefore this one. If not, then enjoy. There may be a point in your web design career, where your site becomes real popular. That is when companies become interested in advertising on your site. A Banner Ad system can be built to control all those advertisements that you are so willing to display,

4、for a price. Active Server Pages makes it very easy to create a banner ad system. So easy, that the Microsoft ASP developers created an AdRotator component for the occasion. Before you begin reading this article, make sure you download the support material below.The files included aread.txtbanner.as

5、p3 banner imagesclicks.aspexample.aspredirect.aspad.txtIn order for the AdRotator component to work, you must configure a text file. This text file contains all the banner ad properties. However, The text file must follow a certain format. The first four lines are as follows:REDIRECT redirect.aspWID

6、TH 400HEIGHT 50*REDIRECTWhen a banner is clicked, the AdRotator component goes to a preliminary page. This page is called a redirect page. The redirect page handles any extra programming events before directing a user to the banners destination. In this example banner system, I called the preliminar

7、y file redirect.asp.WIDTHThis sets the width of the banner ad image. The value must be in pixels.HEIGHTThis sets the height of the banner ad image. The value must be in pixels.*The asterisk tells the AdRotator component that it is about to acquire banner ad information. The asterisk is required.Once

8、 you define the general properties above the asterisk, then comes the list of banners to display. In thead.txtfile, there are three banners defined below the asterisk.banner1.jpgHTMLG20banner2.jpgY30banner3.jpgD30Each banner requires four lines of properties, which follow the format below:Image file

9、nameWeb Address DescriptionBanner WeightImage FileThe image filename can be a fully qualified web address or relative name that points to the image. If the image is in a different folder, then you also include the folder name as well.( banner1.jpg, or foldername/banner.jpg)Web AddressThe web address

10、 can be a page on your site or a fully qualified web address that leads to another site.DescriptionThe description will be displayed as a tool tip. When you rest your mouse over the banner, the description pops up.Banner WeightThe banner weight determines how much a banner is displayed. The AdRotato

11、r component adds all of the banner weights and determines the probability or percent chance of a particular banner being displayed. A banner with a higher weight has better a better probability.NOTE:You can disable a banners property by substituting with a dash.banner3.jpg-D30The example entry above

12、 would create a banner ad that does not have a web address.Banner.aspThis file uses the AdRotator component and analyzes the contents of the ad.txt file. Below is the code.sub banner(strTarget)dim bannerad, htmlset bannerad = server.CreateObject(MSWC.adrotator)bannerad.TargetFrame = strTargethtml =

13、bannerad.GetAdvertisement(ad.txt)Response.Write htmlend subThe first thing to note is that the ASP was written with VBScript. The second thing to note is that the code is written inside a sub procedure calledbanner(strTarget).For those of you who do not know, a sub procedure allows you to group toge

14、ther a bunch of code that can be reused over and over. Like a function, it takes an argument, such as a word or variable. In the code above the argument is strTarget.Unlike a function, a sub-procedure does not return any values, it just executes the code inside line by line.Inside the sub I declare

15、two variables.dim bannerad, htmlNext I store the AdRotator component inside the bannerad variable. When storing a component inside a variable you use the set keyword. Since we are programming server-side with ASP, we use server.CreateObject to summon the component. MSWC.adrotator is the component ke

16、y or name value.set bannerad = server.CreateObject(MSWC.adrotator)Next I use a property of the AdRotator called TargetFrame. This property is equivalent to:The target-value can be one of the values below:_blankOpens the destination link in a new browser window._topOpens the destination link on top o

17、f the web page._parentOpens the destination link within a parent frame._newOpens the destination link in a new browser window.Next, I use an AdRotator method or function called GetAdvertisement and stored its results in the html variable. Notice that the GetAdvertisement takes the name of the ad ban

18、ner text file as an argument.html = bannerad.GetAdvertisement(ad.txt)Finally, I want to print the contents of the html variable. This prints the code that displays the banner images.Response.Write htmlRedirect.aspThis is the file that is processed before someone is redirected to the banners web addr

19、ess. Inside this file, we can capture information like how many times a particular banner is clicked and so on. To start things off, I defined a variable called strUrl.Dim strUrlNext I store a querystring value inside this new variable.strUrl = Request.Querystring(url)A querystring is nothing more t

20、han a bunch of name/value pairs attached to a web address. When a user clicks on a banner, the AdRotator component attaches a querystring to the redirect file. So if we were to click banner1.jpg, defined in ad.txt, we would end up with a redirect web address that looks like so.Redirect.asp?url=&imag

21、e=banner1.jpgIn essence assigning Request.Querystring(url) to strUrl, is the same as assigning to it.Finally, I check to see which banner was clicked. I accomplish this with the VBSCript inStr( ) function.if instr(strUrl, htmlgoodies) then Application.Lockapplication(htmlgoodies) = application(htmlg

22、oodies) + 1Application.UnLockResponse.ClearResponse.Redirect strUrlend ifThe inStr( ) function returns the number position of a sub-word (sub-string) within another word (string). The format is as followsInStr(main word, sub-word)If the sub-word exist within the main word, then the function will equ

23、al a number greater-than zero or true. If the sub-word does not exist, then the function will equal zero or false. In the example above, I check to see if htmlgoodies exist within . Since the answer is true, then the code inside the if. then. statement will execute.Inside the if. then. I use an appl

24、ication variable. An application variable is native to ASP. Application variables store information as long as a web application exist, a web application ceases to exist when say someone shuts off the web hosting server. The beauty of an application variable is that you can define it on one web page

25、 and use it in other web pages within your web application. The downfall is that the users computer must have cookies enabled.Anyways, the code adds one to the application variable, every time a banner is clicked. After one is added, the code redirects to the banners web page. So if banner1 was clic

26、ked then you shall be redirected to .Response.Redirect strUrlExample.aspThis is an example page that uses the banner ad system. When you refresh the page, you should most likely see a different banner. Whenever you want to insert the banner ad on a page, you can use the SSI directive below.Once you

27、include the file above, then you can call the sub-procedure inside the banner.asp file like so.Call banner(_blank)Notice that I supply one of the values for the TargetFrame as an argument. So if the banner is clicked, then the web page should open up in a separate browser window.Clicks.aspThis is a

28、very simple page that displays the number of clicks per banner ad. To display the number of times a banner was clicked, you just print the contents of the application variables that were created inside redirect.asp. Pretty nifty.ASP横幅广告系统乔给读者的话:这是一个由用户提交上述笔者的教程。我已经阅读教程和设置格式,以适应的HTML超值,但大部分都没有改变的语言。我

29、选择了这个教程,因为很多读者已经要求更多的ASP教程。这是一个伟大的。对不起,我不能告诉你这里的事件。服务器的HTML超值不提供的ASP。我会告诉你,不过,如果你运行的IE5.0或更高,打开zip文件的内容到一个目录,它运行得很好。如果你还没有,你可能会想读这之前我介绍的ASP教程。如果没有,那么享受。可能会出现在你的网页设计生涯中,在您的网站变成真正的流行点。这是当企业成为您的网站上刊登广告感兴趣。可以建立一个横幅广告系统,控制所有你所以愿意以优惠的价格,以显示这些广告。Active Server Pages的,使得它很容易地创建一个横幅广告系统。那么容易,微软的ASP开发人员创建了一个组件

30、之际的“AdRotator”。在你开始阅读本文之前,确保你下载下面的支撑材料。这些文件包括ad.txtbanner.asp3 banner imagesclicks.aspexample.aspredirect.aspad.txt为了AdRotator组件来工作,你必须配置一个文本文件。这个文本文件包含了所有的横幅广告属性。然而,文本文件必须遵循一定的格式。前四行如下.REDIRECT redirect.aspWIDTH 400HEIGHT 50*重定向当点击旗帜“的AdRotator”组件去一个初步的页面。此页被称为重定向页面。重定向页面处理指导用户横幅目的地之前,任何额外的编程事件。在这个

31、例子中的旗帜,我称为“redirect.asp”初步文件。宽度此设置的横幅广告图片的宽度。该值必须以像素为单位。高度这设置的横幅广告形象的高度。该值必须以像素为单位。*星号告诉的“AdRotator”的组成部分,这是有关收购横幅广告信息。星号是必需的。一旦你定义了星号以上的一般性质,然后是列表显示的横幅。在ad.txt文件,有星号下面定义了三个横幅。banner1.jpgHTMLG20banner2.jpgY30banner3.jpgD30每个旗帜需要四行属性,按照下面的格式.图像的文件名网址描述旗帜重量影像档图像的文件名可以是一个完全合格的网络地址或相对指向图像的名称。如果图像是在不同的文件

32、夹,那么你还包括文件夹的名称。(banner.jpg)网址网络地址可以是您的网站或完全限定的网络地址,导致另一个网站的页面。描述说明将显示为工具提示。当你休息的旗帜,你的鼠标,弹出的描述。旗帜重量多少显示的一面旗帜,旗帜重量决定。“的AdRotator”组件添加了所有的旗帜权和决定的可能性或正在显示一个特定的横幅的机会。具有较高的权重的旗帜,具有较好的一个更好的概率。注意:您可以禁用代以破折号1横幅财产。banner3.jpg-D30上面的条目示例将创建一个横幅广告,没有一个网址。banner.asp此文件使用“的AdRotator”组件和分析的ad.txt文件内容。下面是代码。sub ban

33、ner(strTarget)dim bannerad, htmlset bannerad = server.CreateObject(MSWC.adrotator)bannerad.TargetFrame = strTargethtml = bannerad.GetAdvertisement(ad.txt)Response.Write htmlend sub首先要注意的是用VBScript编写的ASP。第二件事要注意的是,代码内编写一个子过程称为横幅(strTarget)。对于那些你谁也不知道,子过程允许你组合到一起一堆代码可以一遍又一遍地重复使用。就像一个函数,它需要一个参数,如一个字或变量

34、。在上述参数的代码是strTarget。不像一个函数,子过程不返回任何值,它只是按行内执行的代码。内子,我声明两个变量.dim bannerad, html接下来,我将内部的“bannerad”变量“AdRotator的”组成部分。存储组件内部变量当您使用设定的关键字。因为我们是用ASP编程服务器端,我们使用Server.CreateObject,召唤组件。的“MSWC.adrotator”组件键或名称值。set bannerad = server.CreateObject(MSWC.adrotator)接下来,我使用“的AdRotator”称为“TargetFrame”的属性。此属性相当于.

35、目标的值可以是下列值之一._blankOpens the destination link in a new browser window._topOpens the destination link on top of the web page._parentOpens the destination link within a parent frame._newOpens the destination link in a new browser window.接下来,我使用“的AdRotator”的方法或函数称为“GetAdvertisement”,其结果存储在变量的“HTML”。请注意

36、,“GetAdvertisement”广告横幅文本文件作为一个参数的名称。html = bannerad.GetAdvertisement(ad.txt)最后,我想打印的“HTML”变量的内容。打印显示的横幅图片的代码。回复于HTMLredirect.asp这是被处理的文件之前,有人被重定向到的横幅网页地址。在这个文件中,我们可以抓住这样一个特定的旗帜多少次被点击等信息。要开始做事了,我定义了一个名为“strURL的变量。Dim strUrl接下来,我将这个新变量内查询字符串值。strUrl = Request.Querystring(url)一个QueryString是什么比一堆连接到一个网

37、址的名称/值对。当用户点击旗帜,“AdRotator的”组件重视querystring的重定向文件。因此,如果我们点击banner1.jpg定义,ad.txt的,我们将结束重定向网页地址看起来像这样.Redirect.asp?url=&image=banner1.jpg在本质分配“的Request.QueryString(”URL“)”strURL的“,是一样的,作为分配它。最后,我请检查被点击的旗帜。我与VBScriptINSTR()函数完成。if instr(strUrl, htmlgoodies) thenApplication.Lockapplication(htmlgoodies)

38、= application(htmlgoodies) + 1Application.UnLockResponse.ClearResponse.Redirect strUrlend ifINSTR()函数返回在另一个单词(字符串)子字(子串)的位置。格式如下:InStr(main word, sub-word)如果分词存在于主词,那么该函数将等于大于零或真实的数字。如果不存在分词,那么该函数将等于零或虚假。我在上面的例子,请检查如果“htmlgoodies”的内存在。既然答案是真的,那么内,如果代码.然后.语句将执行。在if.然后.我使用的应用程序变量。一个应用程序变量是本地的ASP。只要作为一

39、个Web应用程序中存在的应用程序变量存储信息,web应用程序不再存在时,说有人关闭网站托管服务器。应用程序变量的好处是,你可以定义一个网页,并使用其他的网页,在你的web应用。倒台是在用户的计算机必须启用Cookie。不管怎么说,代码添加一个应用程序变量,每被点击时的一面旗帜。一个被添加后,代码重定向到横幅网页。所以如果Banner1产品被点击,那么你应重定向“”的。Response.Redirect strUrlExample.asp这是一个例子页面,使用横幅广告系统。当你刷新页面,你应该最有可能看到一个不同的旗帜。每当你要插入页面上的横幅广告,你可以使用SSI指令.一旦你有上面的文件,然后

40、你可以调用子过程里,像这样的banner.asp文件.呼叫旗帜的(“_blank”)Call banner(_blank)请注意,我提供一个为“TargetFrame”作为一个参数值。因此,如果被点击的旗帜,然后在网页应开辟一个单独的浏览器窗口。Clicks.asp这是一个非常简单的页面,显示每横幅广告的点击数。要显示的横幅被点击的次数,你只是打印的应用程序创建的变量内“redirect.asp”的内容。非常漂亮。五分钟搞定5000字毕业论文外文翻译,你想要的工具都在这里!在科研过程中阅读翻译外文文献是一个非常重要的环节,许多领域高水平的文献都是外文文献,借鉴一些外文文献翻译的经验是非常必要的

41、。由于特殊原因我翻译外文文献的机会比较多,慢慢地就发现了外文文献翻译过程中的三大利器:Google“翻译”频道、金山词霸(完整版本)和CNKI“翻译助手。具体操作过程如下: 1.先打开金山词霸自动取词功能,然后阅读文献; 2.遇到无法理解的长句时,可以交给Google处理,处理后的结果猛一看,不堪入目,可是经过大脑的再处理后句子的意思基本就明了了; 3.如果通过Google仍然无法理解,感觉就是不同,那肯定是对其中某个“常用单词”理解有误,因为某些单词看似很简单,但是在文献中有特殊的意思,这时就可以通过CNKI的“翻译助手”来查询相关单词的意思,由于CNKI的单词意思都是来源与大量的文献,所以

42、它的吻合率很高。 另外,在翻译过程中最好以“段落”或者“长句”作为翻译的基本单位,这样才不会造成“只见树木,不见森林”的误导。四大工具: 1、Google翻译: google,众所周知,谷歌里面的英文文献和资料还算是比较详实的。我利用它是这样的。一方面可以用它查询英文论文,当然这方面的帖子很多,大家可以搜索,在此不赘述。回到我自己说的翻译上来。下面给大家举个例子来说明如何用吧比如说“电磁感应透明效应”这个词汇你不知道他怎么翻译,首先你可以在CNKI里查中文的,根据它们的关键词中英文对照来做,一般比较准确。 在此主要是说在google里怎么知道这个翻译意思。大家应该都有词典吧,按中国人的办法,把

43、一个一个词分着查出来,敲到google里,你的这种翻译一般不太准,当然你需要验证是否准确了,这下看着吧,把你的那支离破碎的翻译在google里搜索,你能看到许多相关的文献或资料,大家都不是笨蛋,看看,也就能找到最精确的翻译了,纯西式的!我就是这么用的。 2、CNKI翻译: CNKI翻译助手,这个网站不需要介绍太多,可能有些人也知道的。主要说说它的有点,你进去看看就能发现:搜索的肯定是专业词汇,而且它翻译结果下面有文章与之对应(因为它是CNKI检索提供的,它的翻译是从文献里抽出来的),很实用的一个网站。估计别的写文章的人不是傻子吧,它们的东西我们可以直接拿来用,当然省事了。网址告诉大家,有兴趣的

44、进去看看,你们就会发现其乐无穷!还是很值得用的。 3、网路版金山词霸(不到1M): 4、有道在线翻译:翻译时的速度:这里我谈的是电子版和打印版的翻译速度,按个人翻译速度看,打印版的快些,因为看电子版本一是费眼睛,二是如果我们用电脑,可能还经常时不时玩点游戏,或者整点别的,导致最终SPPEED变慢,再之电脑上一些词典(金山词霸等)在专业翻译方面也不是特别好,所以翻译效果不佳。在此本人建议大家购买清华大学编写的好像是国防工业出版社的那本英汉科学技术词典,基本上挺好用。再加上网站如:google CNKI翻译助手,这样我们的翻译速度会提高不少。具体翻译时的一些技巧(主要是写论文和看论文方面) 大家大

45、概都应预先清楚明白自己专业方向的国内牛人,在这里我强烈建议大家仔细看完这些头上长角的人物的中英文文章,这对你在专业方向的英文和中文互译水平提高有很大帮助。 我们大家最蹩脚的实质上是写英文论文,而非看英文论文,但话说回来我们最终提高还是要从下大工夫看英文论文开始。提到会看,我想它是有窍门的,个人总结如下: 1、把不同方面的论文分夹存放,在看论文时,对论文必须做到看完后完全明白(你重视的论文);懂得其某部分讲了什么(你需要参考的部分论文),在看明白这些论文的情况下,我们大家还得紧接着做的工作就是把论文中你觉得非常巧妙的表达写下来,或者是你论文或许能用到的表达摘记成本。这个本将是你以后的财富。你写论

46、文时再也不会为了一些表达不符合西方表达模式而烦恼。你的论文也降低了被SCI或大牛刊物退稿的几率。不信,你可以试一试 2、把摘记的内容自己编写成检索,这个过程是我们对文章再回顾,而且是对你摘抄的经典妙笔进行梳理的重要阶段。你有了这个过程。写英文论文时,将会有一种信手拈来的感觉。许多文笔我们不需要自己再翻译了。当然前提是你梳理的非常细,而且中英文对照写的比较详细。 3、最后一点就是我们往大成修炼的阶段了,万事不是说成的,它是做出来的。写英文论文也就像我们小学时开始学写作文一样,你不练笔是肯定写不出好作品来的。所以在此我鼓励大家有时尝试着把自己的论文强迫自己写成英文的,一遍不行,可以再修改。最起码到最后你会很满意。呵呵,我想我是这么觉得的。

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!