当前位置:文档之家› Quality-aware Self-Management for Service Processes in Service-Oriented Architectures

Quality-aware Self-Management for Service Processes in Service-Oriented Architectures

Quality-aware Self-Management for Service Processes in Service-Oriented Architectures
Quality-aware Self-Management for Service Processes in Service-Oriented Architectures

Quality-aware Self-Management for Service

Processes in Service-Oriented Architectures

Ste?en Bleul

Kassel University,Distributed Systems,bleul@vs.uni-kassel.de Abstract.One of the salient features of Service-Oriented Architectures

is that services can be deployed and removed at runtime.But service

replacement and management for service processes is a demanding task

in complex IT-Systems,especially under additional constraints like op-

timizing the Quality of Service of a service process.A self-managing

system is desired but missing.We have already achieved self-healing and

self-optimization with our service brokering system.We apply ontologies

to discover service alternatives and their QoS.In this paper we not only

present our work on quality-aware service discovery but also propose a

self-manageable infrastructure for service processes.The infrastructure

can be dynamically instantiated,con?gured and bound to management

endpoints with semantic service discovery.The approach not only auto-

mates the binding of service management systems of multiple vendors

but also the SLA monitoring and the ad-hoc integration of services in

service processes.

1Introduction

A Service-Oriented Architecture(SOA)is the ideal architecture for highly dy-namic systems especially for complex enterprise IT-Systems.The business logic of an enterprise can be directly implemented as services and arranged to business processes in the form of service compositions.A SOA directly re?ects the need for easy integration,reusability and change without a?ecting the course of business. When it comes to Service Management,any architecture for distributed appli-cations forfeits its salient advantages without some kind of self-management. Service management must ensure a certain level of quality which requires fast recognition and handling of service problems throughout the SOA.

An important building block for a self-manageable system is the Semantic Web.We have developed ontologies to describe service processes,services and their QoS.They allow automatic quality-aware binding of services to service processes at runtime[1].Whereas semantic service discovery is important for Service Management it is just the?rst step towards self-management.In this paper we present an approach for a self-manageable infrastructure.Newly de-ployed service processes,their management endpoints and management entities are automatically instantiated and connected.We apply semantic service dis-covery in order to support automatic con?guration of the infrastructure.The required management model and components are introduced in Section2.We

38Ste?en Bleul

present our achievements on quality-aware semantic service discovery for service processes in Section3.In Section4we discuss related work and the paper closes with a conclusion in Section5.

2Self-Management for Service Processes

Our achievements(see Section3)already enable self-properties inside a SOA and can be applied to self-management.The overall goal is a self-managing dis-tributed infrastructure for quality-aware service process management by using semantic service discovery to plug management components of service consumers and service vendors together.Service processes must be deployable at runtime and services must be dynamically found and bound to the service process.More-over,services must be managed with respect to their QoS which also requires dynamic instantiation and monitoring of Service Level Agreements(SLA).Man-agement of these services must be handled in a platform-and organisational-independent way by providing runtime information to and accepting manage-ment actions from all participating organisations.Without doubt,the impact of this work is dependent on the ability to integrate the resulting system in current IT-Organisations.Therefore,the dynamic con?guration of the infrastructure will have the ability to involve the local organisation’s reporting,change management or manual administration.

The necessary distributed infrastructure for SLA and service monitoring and Service Management must even be able to be dynamically instantiated in order to support service replication and integration of newly outsourced or bought ser-vices.This requires a general model for Service Management.We describe Service Management as an interaction between management interfaces.The manage-ment interfaces deal with providing information about a service state,processing service information or to submit management actions to change a service’s state. The interaction between management interfaces are described by its exchanging messages consisting of sensor information and management actions.Moreover, service process management is the accumulation of all management interfaces and interactions of the participating services and service managers.A service process can be managed in a platform-and organisational-independent way by routing sensory information to an arbitrary amount of management entities and by redirecting the resulting management actions to the Service Management in-terfaces.In our model we de?ne three types of services to enable a self-managing infrastructure:

–Sensor:A sensor is a service that produces state information about a service or service process.A sensor produces its output independently of other sen-sors(low level sensors)or is in need of the input of other sensors(high level sensors).For instance a low level sensor sends the availability information of a single service to s high level sensor that evaluates the availability of the related service processes.

Quality-aware Self-Management for Service Processes in SOAs39–SLA Monitor:An SLA Monitor is a speci?c high level sensor.The SLA Monitor accepts messages of sensors responsible for service quality dimen-sions,e.g.response time and price,and produces messages consisting of changes,warnings and violations.SLA Monitors are instantiated by SLA templates and can be connected hierarchical to ensure SLA-conformity through-out several service vendors and service processes.

–Manager:A Manager is a service that produces the transition from sen-sor information to management actions.We de?ne a platform-independent vocabulary to describe service states,quality dimensions and management actions as a set of properties.The postconditions of the rules are mapped on management actions.A Manager can be instantiated by a management template and replicated for several services or service processes.

Service Vendor Service Consumer

Fig.1.Example Con?guration of the Distributed Infrastructure.

We de?ne self-management of service processes by a feedback and control loop where sensors forward their information messages through SLA Monitors

to Managers and the Manager’s management actions are sent back to service management interfaces.An example can be found in Figure1.The infrastruc-ture supports an arbitrary amount of Sensors,SLA Monitors and Managers. Apart from the development of standardized components of an SLA Monitor or Manager the remaining scienti?c challenge is the automatic con?guration of the infrastructure.

3Achievements

In the context of the DFG-funded project ADDO[2]we developed an ontology,a service discovery algorithm and system architecture for Semantic Service Discov-ery[1].The resulting system not only discovers services but integrates them by

40Ste?en Bleul

solving mediation problems.The results have been proven to be important build-ing blocks for automated service integration and have been published at several international conferences[1,3,4]and workshops[5,6].We have developed an ontology schema for describing service functional and non-functional properties. For the?rst time a semantic discovery system can be employed in a SOA.More-over,the system’s management interface can be used to realize self-properties, e.g.self-healing and self-optimization,inside a SOA which is discussed in[6].We intend to apply the results in the following approaches:

–Semantic Service Discovery:The interfaces of services,sensors,SLA Monitors and Managers are described by semantic service descriptions.Se-mantic Service Discovery will be utilized to map sensor information on ser-vice processes and more speci?c to the participating services.

–Semantic Service Composition:Semantic Service Composition discovers an execution of auxiliary services that can transform sensor information,

e.g.calculating performance for a service process.Here we apply our award

winning semantic composition system[7].

–Quality-aware Service Discovery:Services are discovered with respect to their QoS.The matching result is used as a template to instantiate an SLA Monitor.

–Semantic Service Mediation:Semantic Service Mediation is applied to bridge syntactic di?erences between management systems,their exchanging messages and interface behavior.

The ADDO ontology can be divided into several sub-ontologies.The most important part is the Service Level Ontology introduced in[5].Our ontology not only allows semantic description of a service’s performance but also a Ser-vice Level Requirement(SLR)which describes the QoS requirement of service processes.Along with our discovery algorithm it allows quality-aware semantic service discovery.The algorithm automatically creates Service Level Agreements with respect to a service vendor’s Service Level O?er and the service consumer’s SLR.We can also reason about contract alternatives,like a cheaper version of a Service Level Agreement in exchange for an expense like lower performance.

The Service Process Ontology describes service processes along with service roles and their functionality[3].The ontology allows reasoning for required ser-vices in conjunction to the service execution language BPEL4WS.Discovered services are bound to BPEL processes and the system can distinguish between several versions of the same description.Even if an existing BPEL process be-comes unavailable due to faulting of participating services the system can switch to an older version or alternative process description.

Our extension of the OWL-S ontology and the implemented mediator ad-dress mediation capabilities between services[1].Service interfaces may di?er in syntactic details,e.g.di?erent identi?ers for parameters,di?erent service opera-tions.Furthermore,our ontology schema o?ers the?exibility to specify aspects like optional but not necessary service operations and parameters.In most cases such di?erences can be bridged with a service mediator at runtime.These me-diators are realised as proxy services and developed in an EAI project.Their

Quality-aware Self-Management for Service Processes in SOAs41 cumbersome development causes a major lack of?exibility inside a SOA.The implementation even takes di?erent message formats into consideration.This technique allows automatic message transformation which can solve most medi-ation problems that occur with Web Services.

4Related Work

Web Service standards are especially important for this work.The OASIS WSDM (WSDM)[8]consists of speci?cations for Web Service Endpoints and standard-ized messages for Service Management.We use them to de?ne service interfaces and messages formats for the resulting infrastructure.Also the OASIS Web Ser-vice Noti?cation(WSN)[9]standard is an important part as it o?ers a model to disseminate data,events and management actions.

We use IBM’s Web Service Level Agreements(WSLA)[10]and the Grid Communitys Web Service Agreements(WS-A)[11]to develop our SLA Monitor. They are related to our SL-Ontology.They de?ne a schema for the XML-based description of SLAs.Furthermore,WS-A de?nes interfaces and message formats for SLA-Management and a Web Service implementation named Cremona[12].

The projects METEOR-S[13]and AMIGO also develop ontologies and apply semantics for Service Management.Their results are especially important for quality-aware service discovery and for developing ontologies for service processes but they do not de?ne the required platform-and organisational-independent distributed management infrastructure.

The Dialogue Interaction Speci?cation Language(DISL)[14]is the base for our service manager.It includes a control model consisting of rules,data types and?ow control to specify behaviour and an interpreter implemented as a ser-vice.We are currently adjusting DISL for Service Management in order to specify management behaviour without detailed knowledge of the exchanged messages and management endpoints.In[15]we have already shown an example on how the interpreter can be used for interaction driven control of distributed compo-nents.

5Conclusion

In order to enable self-manageable service processes we propose a standardized infrastructure consisting of management interfaces,message formats and man-agement components and to apply semantic service discovery to bind them to their respective management endpoints.This allows not only immediate deploy-ment of service processes and enforcement of their contracts but also the uti-lization of management interfaces of multiplies parties.The development of the required building blocks on existing standards and demands in IT-Organisations is a challeging task but also comply with our achievements and proceedings.

42Ste?en Bleul

References

1.Bleul,S.,Zapf,M.,Geihs,K.:Flexible Automatic Service Brokering for SOAs.

In:Proceedings on10th IFIP/IEEE Symposium on Integrated Management(IM 2007),Munich,Germany(2007)

2.Geihs,K.,Bleul,S.:(Automatic Service Brokering in Service oriented Architec-

tures)Project Homepage:http://www.vs.uni-kassel.de/research/addo/.

3.Bleul,S.,Zapf,M.,Geihs,K.:Automatic Service Process Administration by Se-

mantic Service Discovery.In:Proceedings of the7th Conference Internationale sur les Nouvelles Technologies de la Repartition(NOTERE2007),Marrakech,Maroc (2007)

4.Bleul,S.,Weise,T.,Geihs,K.:Making a Fast Semantic Service Composition Sys-

tem Faster.In:Proceedings of the2007IEEE Joint Conference on E-Commerce Technology(CEC’07)and Enterprise Computing,E-Commerce and E-Services (EEE’07),Tokyo,Japan(2007)

5.Bleul,S.,Weise,T.:An Ontology for Quality-Aware Service Discovery.In:Proc.

First International Workshop on Engineering Service Compositions(WESC’05).

(2005)35–42

6.Bleul,S.,Zapf,M.:Ontology-Based Self-Organization in Service-Oriented Archi-

tectures.In:Proceedings of the Workshop SAKS2007,VDE(2007)

7.Bleul,S.,Weise,T.,Geihs,K.:Large-scale service composition in semantic service

discovery.In:Proceedings of the IEEE Joint Conference on E-Commerce Technol-ogy(CEC’06)and Enterprise Computing E-Commerce and E-Services(EEE’06), Springer Press(2006)427–429

8.Murray, B.,Wilson,K.,Ellison,M.:Web Services Distributed Management

(WSDM).Organization for the Advancement of Structured Information Standards (OASIS).(2006)

9.Graham,S.,Hull,D.,Murray,B.:OASIS Web Services Noti?cation(WSN).Or-

ganization for the Advancement of Structured Information Standards(OASIS).

(2006)

10.Dan,A.,et al.:Web Service Level Agreement(WSLA)Language Speci?cation.

International Business Machines Corporation(IBM).(2002)

11.Aiello,M.,Frankova,G.,Malfatti,D.:What’s in an Agreement?An Analysis

and an Extension of WS-Agreement.Int.Conf.on Service-Oriented Computing (ICSOC)(2005)

12.Ludwig,H.,Dan,A.,Kearney,R.:Cremona:An Architecture and Library for

Creation and Monitoring of WS-Agreents.In:Proceedings of the International Conference on Service Oriented Computing(ICSOC’04),ACM(2004)65–74 13.Verma,K.,et al.:The METEOR-S Approach for Con?guring and Executing Dy-

namic Web Processes,LSDIS Technical Report(2005)

14.Schaefer,R.,Mueller,W.,Bleul,S.:A Dialog Model for Multi Device Interfaces

with Di?erent Modalities.In:Proceedings of Human Computer Interaction(HCI) International2005.(2005)

15.Schaefer,R.,Bleul,S.:Towards Object Oriented,UIML-based Interface Descrip-

tions for Mobile Devices.In:Proceedings of the6th International Conference on Computer-Aided Design of User Interfaces(CADUI2006).(2006)

[批处理]计算时间差的函数etime

[批处理]计算时间差的函数etime 计算时间差的函数etime 收藏 https://www.doczj.com/doc/fb7694566.html,/thread-4701-1-1.html 这个是脚本代码[保存为etime.bat放在当前路径下即可:免费内容: :etime <begin_time> <end_time> <return> rem 所测试任务的执行时间不超过1天// 骨瘦如柴版setlocal&set be=%~1:%~2&set cc=(%%d-%%a)*360000+(1%%e-1%%b)*6000+1%%f-1% %c&set dy=-8640000 for /f "delims=: tokens=1-6" %%a in ("%be:.=%")do endlocal&set/a %3=%cc%,%3+=%dy%*("%3>> 31")&exit/b ---------------------------------------------------------------------------------------------------------------------------------------- 计算两个时间点差的函数批处理etime 今天兴趣大法思考了好多bat的问题,以至于通宵 在论坛逛看到有个求时间差的"函数"被打搅调用地方不少(大都是测试代码执行效率的) 免费内容: :time0

::计算时间差(封装) @echo off&setlocal&set /a n=0&rem code 随风@https://www.doczj.com/doc/fb7694566.html, for /f "tokens=1-8 delims=.: " %%a in ("%~1:%~2") do ( set /a n+=10%%a%%100*360000+10%%b%%100*6000+10%% c%%100*100+10%%d%%100 set /a n-=10%%e%%100*360000+10%%f%%100*6000+10%%g %%100*100+10%%h%%100) set /a s=n/360000,n=n%%360000,f=n/6000,n=n%%6000,m=n/1 00,n=n%%100 set "ok=%s% 小时%f% 分钟%m% 秒%n% 毫秒" endlocal&set %~3=%ok:-=%&goto :EOF 这个代码的算法是统一找时间点凌晨0:00:00.00然后计算任何一个时间点到凌晨的时间差(单位跑秒) 然后任意两个时间点求时间差就是他们相对凌晨时间点的时间数的差 对09这样的非法8进制数的处理用到了一些技巧,还有两个时间参数不分先后顺序,可全可点, 但是这个代码一行是可以省去的(既然是常被人掉用自然体

英语作文关于共享单车的篇精编

(一) 假定你是红星中学初三学生李华。你的美国朋友Jim在给你的邮件中提到他对中国新近出现的一种共享单车“mobike”很感兴趣,并请你做个简要介绍。请你给Jim回信,内容包括: 1. 这种单车的使用方法(如:APP查看车辆、扫码开锁等); 2. 这种单车的优势; 3. 你对这种单车的看法。 注意:1. 词数不少于80; 2. 开头和结尾已给出,不计入总词数。 提示词:智能手机smartphone, 二维码the QR code 参考范文 Dear Jim, I’m writing to tell you more about the new form of sharing bike mobike mentioned in your latest letter. It’s very convenient to use if you have a smartphone. What you do is find a nearest mobikethrough the APP, scan the QR code on the bike, and enjoy your trip. Compared to other forms of sharing bike, the greatest advantage of mobike is that you can easily find one and never worry about where to park it. It is becoming a new trend as a means of transportation, which relieves the traffic pressure and does good to the environment as well. Hope to ride a mobike with you in China. Yours, Li Hua (二) 最近很多大城市都投放了共享单车(shared bikes),比如摩拜单车(Mobike)、Ofo共享单车等。由于它们方便停放,骑车也能起到锻炼身体的作用,作为代步工具很受大家欢迎。但是,各地也出现了很多毁车现象,比如刮掉车上的二维码(QR code)、上私锁等。 你对这种现象怎么看?你对共享单车公司有什么建议吗?写一篇符合逻辑的英语短文,80词左右。 参考词汇:bike-sharing companies 共享单车公司,Mobike 和Ofo 是两家共享单车公司,convenience 方便,register登记 参考范文 The shared bikes like Mobike and Ofo bring great convenience to people. You needn’t lock them by simply using your smart phone. They can take you where the subway and bus don’t go. And they can be left anywhere in public for the next user. However, bad things happen. Some people damage the QR code on the bike, or use their own lock, which causes trouble to other users. In my opinion, it’s difficult to turn these people’s ideas in a short time. Therefore, bike-sharing companies like Mobike and Ofo need to do something. For example, those who damage the bike should pay for their actions. Also, because people use their real name toregister as a user, it’s a good way to connect to one’s personal credit. In the end, what I want to say is to take good care of public services. (三) 共享单车(bicycle sharing)已成为时下最热的话题之一,请你就这一话题写一篇短文。内容须包括三方面:1. 共享单车蓬勃发展,成为社会热潮;2. 共享单车带来便利,但也存在问题;3. 我对解决问题的建议。 参考范文 Bicycle Sharing With the development of technology, bicycle sharing comes into people's lives. It becomes more and more popular and much news reported it. At the same time, we should see that there are some problems caused by bicycle sharing. On one side, bicycle sharing makes it very convenient of people traveling. You can find a bicycle anywhere at any time when you want to go out for a cycling, and the price of one trip is very low. It can save time for people. On the other side, its management is not perfect. Even kids can open the lock and ride the bicycle, there is no doubt that such behavior is very dangerous.

延时子程序计算方法

学习MCS-51单片机,如果用软件延时实现时钟,会接触到如下形式的延时子程序:delay:mov R5,#data1 d1:mov R6,#data2 d2:mov R7,#data3 d3:djnz R7,d3 djnz R6,d2 djnz R5,d1 Ret 其精确延时时间公式:t=(2*R5*R6*R7+3*R5*R6+3*R5+3)*T (“*”表示乘法,T表示一个机器周期的时间)近似延时时间公式:t=2*R5*R6*R7 *T 假如data1,data2,data3分别为50,40,248,并假定单片机晶振为12M,一个机器周期为10-6S,则10分钟后,时钟超前量超过1.11秒,24小时后时钟超前159.876秒(约2分40秒)。这都是data1,data2,data3三个数字造成的,精度比较差,建议C描述。

上表中e=-1的行(共11行)满足(2*R5*R6*R7+3*R5*R6+3*R5+3)=999,999 e=1的行(共2行)满足(2*R5*R6*R7+3*R5*R6+3*R5+3)=1,000,001 假如单片机晶振为12M,一个机器周期为10-6S,若要得到精确的延时一秒的子程序,则可以在之程序的Ret返回指令之前加一个机器周期为1的指令(比如nop指令), data1,data2,data3选择e=-1的行。比如选择第一个e=-1行,则精确的延时一秒的子程序可以写成: delay:mov R5,#167 d1:mov R6,#171 d2:mov R7,#16 d3:djnz R7,d3 djnz R6,d2

djnz R5,d1 nop ;注意不要遗漏这一句 Ret 附: #include"iostReam.h" #include"math.h" int x=1,y=1,z=1,a,b,c,d,e(999989),f(0),g(0),i,j,k; void main() { foR(i=1;i<255;i++) { foR(j=1;j<255;j++) { foR(k=1;k<255;k++) { d=x*y*z*2+3*x*y+3*x+3-1000000; if(d==-1) { e=d;a=x;b=y;c=z; f++; cout<<"e="<

介绍北京的英语作文(2)

介绍北京的英语作文(2) AsBeijinghasbeenconfirmedhomecityofOlympics2008,the spiritofgreenOlympics,scientificOlympicsandhumanizedOlymp icwillsurelybringmoreandmorechangestoBeijing,promotethed evelopmentofsportsandOlympicsinChinaaswellasintheworld,a ndstrengthenthefriendlycommunicationsbetweenChineseandf oreignpeople. 篇六:Beijing BeijingisthecapitalofPeoplesRepublicofChinaandthenation scentreforpolitics,economyandculture.Itenjoysalongandrichhis tory.Therearenumerousheritagesitesandwonderfulexamplesof ancientarchitecture,suchastheworld-famousGreatWall,theTem pleofHeavenandtheForbiddenCity. Besidessightseeingplaces,therearemanydeliciousfoodsuch asPekingducksandBeijingsnacks.Beijingisreallyagoodplacetotr avel. 篇七:Beijing AsthecaptainofChina,Beijinghasbeenthemostpopularcityofchina。SomoreandmorepeoplewanttovisitBeijing.

用c++编写计算日期的函数

14.1 分解与抽象 人类解决复杂问题采用的主要策略是“分而治之”,也就是对问题进行分解,然后分别解决各个子问题。著名的计算机科学家Parnas认为,巧妙的分解系统可以有效地系统的状态空间,降低软件系统的复杂性所带来的影响。对于复杂的软件系统,可以逐个将它分解为越来越小的组成部分,直至不能分解为止。这样在小的分解层次上,人就很容易理解并实现了。当所有小的问题解决完毕,整个大的系统也就解决完毕了。 在分解过程中会分解出很多类似的小问题,他们的解决方式是一样的,因而可以把这些小问题,抽象出来,只需要给出一个实现即可,凡是需要用到该问题时直接使用即可。 案例日期运算 给定日期由年、月、日(三个整数,年的取值在1970-2050之间)组成,完成以下功能: (1)判断给定日期的合法性; (2)计算两个日期相差的天数; (3)计算一个日期加上一个整数后对应的日期; (4)计算一个日期减去一个整数后对应的日期; (5)计算一个日期是星期几。 针对这个问题,很自然想到本例分解为5个模块,如图14.1所示。 图14.1日期计算功能分解图 仔细分析每一个模块的功能的具体流程: 1. 判断给定日期的合法性: 首先判断给定年份是否位于1970到2050之间。然后判断给定月份是否在1到12之间。最后判定日的合法性。判定日的合法性与月份有关,还涉及到闰年问题。当月份为1、3、5、7、8、10、12时,日的有效范围为1到31;当月份为4、6、9、11时,日的有效范围为1到30;当月份为2时,若年为闰年,日的有效范围为1到29;当月份为2时,若年不为闰年,日的有效范围为1到28。

图14.2日期合法性判定盒图 判断日期合法性要要用到判断年份是否为闰年,在图14.2中并未给出实现方法,在图14.3中给出。 图14.3闰年判定盒图 2. 计算两个日期相差的天数 计算日期A (yearA 、monthA 、dayA )和日期B (yearB 、monthB 、dayB )相差天数,假定A 小于B 并且A 和B 不在同一年份,很自然想到把天数分成3段: 2.1 A 日期到A 所在年份12月31日的天数; 2.2 A 之后到B 之前的整年的天数(A 、B 相邻年份这部分没有); 2.3 B 日期所在年份1月1日到B 日期的天数。 A 日期 A 日期12月31日 B 日期 B 日期1月1日 整年部分 整年部分 图14.4日期差分段计算图 若A 小于B 并且A 和B 在同一年份,直接在年内计算。 2.1和2.3都是计算年内的一段时间,并且涉及到闰年问题。2.2计算整年比较容易,但

汽车利弊英语作文4篇

[标签:标题] 篇一:关于汽车的英语作文 好的 Nowadays, with the rapid improvement of people’s living standards, cars have become an indispensable part of people's lives,so that more and more people have a car of their own, especially in cities. It brings some benefits for us but also causes many problems at the same time. For one thing,there’s no doubt that cars provide much convenience for people to go where they want to quickly and easily. Especially on weekday,driving a car can save a lot of time for us to go to work.When some places are too far away from our home, driving our own car is also convenient, we can go wherever we want. However,for another, too many cars will lead to the pressure of public transport, a series of problems will appear.First of all,it will bring about more air pollution,a large amount of polluted air given off by cars do great harm to our health.What’s more, as the existing roads are not so wide for the increasing number of cars,undoubtedly,traffic jams will become more and more serious. Last but not least, cars also place burden on the public facilities in providing more parking lots. As far as I am concerned,everything has its advantages and disadvantages. It’s high time that effective action must be token to limit the ever growing number of cars, the government should take measures to control the air pollution from the cars. Some roads should be widened and more new roads should be constructed. Only in this way,will people benefit from the popularity of cars. 坏的 Nowadays, with the rapid improvement of people's living standards, cars have become an indispensable part of people's lives,so that more and more people have a car of their own, especially in cities.It brings some benefit for us but also causes many problems at the same time. For one thing,it's no doubt that that cars provide much convenience for people to go where they want to quickly and easily. Especially on weekday,driving a car can save a lot of time for us to go to work.When some places are too far away from our home, driving our own car is also convenient, we can go wherever we want. However,for another, too many cars will lead to the pressure of public transport, a series of problems will appear.First of all,it will bring about more air pollution,a large amount of polluted air given off by cars do great harm to our health .What's more, as the existing roads are not so wide for the increasing number of cars,undoubtedly,traffic jams will become more and more serious. Last but not least, cars also place burden on the public facilities in providing more parking lots. As far as I am concerned,everything has its advantages and disadvantages. It's high time that effective action must be token to limit the ever growing number of cars, the government should take measures to control the air pollution from the cars. Some roads should be widened and more new roads should be constructed. Only in this way,will people benefit from the popularity of cars. 篇二:雅思作文高分范文:私家车的利与弊 智课网IELTS备考资料 雅思作文高分范文:私家车的利与弊

Excel中如何计算日期差

Excel中如何计算日期差: ----Excel中最便利的工作表函数之一——Datedif名不见经传,但却十分好用。Datedif能返回任意两个日期之间相差的时间,并能以年、月或天数的形式表示。您可以用它来计算发货单到期的时间,还可以用它来进行2000年的倒计时。 ----Excel中的Datedif函数带有3个参数,其格式如下: ----=Datedif(start_date,end_date,units) ----start_date和end_date参数可以是日期或者是代表日期的变量,而units则是1到2个字符长度的字符串,用以说明返回日期差的形式(见表1)。图1是使用Datedif函数的一个例子,第2行的值就表明这两个日期之间相差1年又14天。units的参数类型对应的Datedif返回值 “y”日期之差的年数(非四舍五入) “m”日期之差的月数(非四舍五入) “d”日期之差的天数(非四舍五入) “md”两个日期相减后,其差不足一个月的部分的天数 “ym”两个日期相减后,其差不足一年的部分的月数 “yd”两个日期相减后,其差不足一年的部分的天数

表1units参数的类型及其含义 图1可以通过键入3个带有不同参数的Datedif公式来计算日期的差。units的参数类型 ----图中:单元格Ex为公式“=Datedif(Cx,Dx,“y”)”得到的结果(x=2,3,4......下同) ----Fx为公式“=Datedif(Cx,Dx,“ym”)”得到的结果 ----Gx为公式“=Datedif(Cx,Dx,“md”)”得到的结果 现在要求两个日期之间相差多少分钟,units参数是什么呢? 晕,分钟你不能用天数乘小时再乘分钟吗? units的参数类型对应的Datedif返回值 “y”日期之差的年数(非四舍五入) “m”日期之差的月数(非四舍五入) “d”日期之差的天数(非四舍五入) “md”两个日期相减后,其差不足一个月的部分的天数 “ym”两个日期相减后,其差不足一年的部分的月数 “yd”两个日期相减后,其差不足一年的部分的天数 假设你的数据从A2和B2开始,在C2里输入下面公式,然后拖拉复制。 =IF(TEXT(A2,"h:mm:ss")

单片机C延时时间怎样计算

C程序中可使用不同类型的变量来进行延时设计。经实验测试,使用unsigned char类型具有比unsigned int更优化的代码,在使用时 应该使用unsigned char作为延时变量。以某晶振为12MHz的单片 机为例,晶振为12M H z即一个机器周期为1u s。一. 500ms延时子程序 程序: void delay500ms(void) { unsigned char i,j,k; for(i=15;i>0;i--) for(j=202;j>0;j--) for(k=81;k>0;k--); } 计算分析: 程序共有三层循环 一层循环n:R5*2 = 81*2 = 162us DJNZ 2us 二层循环m:R6*(n+3) = 202*165 = 33330us DJNZ 2us + R5赋值 1us = 3us 三层循环: R7*(m+3) = 15*33333 = 499995us DJNZ 2us + R6赋值 1us = 3us

循环外: 5us 子程序调用 2us + 子程序返回2us + R7赋值 1us = 5us 延时总时间 = 三层循环 + 循环外 = 499995+5 = 500000us =500ms 计算公式:延时时间=[(2*R5+3)*R6+3]*R7+5 二. 200ms延时子程序 程序: void delay200ms(void) { unsigned char i,j,k; for(i=5;i>0;i--) for(j=132;j>0;j--) for(k=150;k>0;k--); } 三. 10ms延时子程序 程序: void delay10ms(void) { unsigned char i,j,k; for(i=5;i>0;i--) for(j=4;j>0;j--) for(k=248;k>0;k--);

介绍北京的英语作文1篇 .doc

介绍北京的英语作文1篇 篇一MyFamily Ilovemyfamily,becauseIhaveahappyfamily. MyfatherisanEnglishteacher.HisnameisJacky.Heisthirty-eight.Helikesplay ingbasketball.What’smymotherjop?Issheateacher?Yes,you’reright!Mymotherisverykindandnice,sheisthirty-seven.Mymotherisalways laboriouswork.Ilovemyparents! OnStaurdayandSunday,Ioftengotothelibraryandplaythepiano,Myfathergot oplaybasketball.Sometimes,wewatchTVandlistentomusicathome. Ilovemyfamily.BecauseI’mveryhappytolivewithmyparentstogether! 篇二MyFamily MyFamily Everyonehasafamily.Weliveinitandfeelverywarm.Therearethreepersonsin myfamily,mymother,fatherandI.Welivetogetherveryhappilyandtherearema nyinterestingstoriesaboutmyfamily. Myfatherisahard-workingman.Heworksasadoctor.Healwaystrieshisbesttoh elpevery,patientandmakepatientscomfortable.Butsonetimesheworkssohard thathecan”trememberthedate.

汽车的重要性《英语作文》

汽车的重要性《英语作文》 The automobile has become one of the most important means/ways of transportation in the world since it was invented. The automobile has completely changed the lifestyles of almost all the people in the world. In the past, animals like horses and camels were used for traveling and transporting goods. Automobiles are more comfortable and faster. Automobiles have also made it possible for us to transport large quantities of goods and people at the same time. Besides, the invention of the automobile has provided jobs for millions of people all over the world. 翻译: 汽车已经成为世界上最重要的交通工具之一,因为它是发明的。汽车已经完全改变了世界上几乎所有的人的生活方式。 在过去,像马和骆驼的动物被用来运送货物。汽车更舒适,更快速。汽车也使我们能够在同一时间运送大量货物和人。 此外,汽车的发明为全世界上百万的人提供了工作。

51单片机延时时间计算和延时程序设计

一、关于单片机周期的几个概念 ●时钟周期 时钟周期也称为振荡周期,定义为时钟脉冲的倒数(可以这样来理解,时钟周期就是单片机外接晶振的倒数,例如12MHz的晶振,它的时间周期就是1/12 us),是计算机中最基本的、最小的时间单位。 在一个时钟周期内,CPU仅完成一个最基本的动作。 ●机器周期 完成一个基本操作所需要的时间称为机器周期。 以51为例,晶振12M,时钟周期(晶振周期)就是(1/12)μs,一个机器周期包 执行一条指令所需要的时间,一般由若干个机器周期组成。指令不同,所需的机器周期也不同。 对于一些简单的的单字节指令,在取指令周期中,指令取出到指令寄存器后,立即译码执行,不再需要其它的机器周期。对于一些比较复杂的指令,例如转移指令、乘法指令,则需要两个或者两个以上的机器周期。 1.指令含义 DJNZ:减1条件转移指令 这是一组把减1与条件转移两种功能结合在一起的指令,共2条。 DJNZ Rn,rel ;Rn←(Rn)-1 ;若(Rn)=0,则PC←(PC)+2 ;顺序执行 ;若(Rn)≠0,则PC←(PC)+2+rel,转移到rel所在位置DJNZ direct,rel ;direct←(direct)-1 ;若(direct)= 0,则PC←(PC)+3;顺序执行 ;若(direct)≠0,则PC←(PC)+3+rel,转移到rel 所在位置 2.DJNZ Rn,rel指令详解 例:

MOV R7,#5 DEL:DJNZ R7,DEL; rel在本例中指标号DEL 1.单层循环 由上例可知,当Rn赋值为几,循环就执行几次,上例执行5次,因此本例执行的机器周期个数=1(MOV R7,#5)+2(DJNZ R7,DEL)×5=11,以12MHz的晶振为例,执行时间(延时时间)=机器周期个数×1μs=11μs,当设定立即数为0时,循环程序最多执行256次,即延时时间最多256μs。 2.双层循环 1)格式: DELL:MOV R7,#bb DELL1:MOV R6,#aa DELL2:DJNZ R6,DELL2; rel在本句中指标号DELL2 DJNZ R7,DELL1; rel在本句中指标号DELL1 注意:循环的格式,写错很容易变成死循环,格式中的Rn和标号可随意指定。 2)执行过程

我想去北京英语作文

三一文库(https://www.doczj.com/doc/fb7694566.html,) 〔我想去北京英语作文〕 我想去北京的英语作文如何写?那么,下面是小编给大家整理收集的我想去北京英语作文,供大家阅读参考。 我想去北京英语作文1 I’d like to go to a beautiful place. I think it would be Beijing. Beijing is not only our capital city, but also a famous city with long history and wonderful culture. Beijing is also China’s political and cultural center. There’re many old places of great interest, such as the Great Wall, the Summer Palace, the Forbidden City, the Temple of Heaven, and Tiananmen Square. Once you see Tiananmen Square, you will think of Beijing. It has been the symbol of Beijing since 1949. 我想去北京英语作文2 I went to Beijing more than eight times. Beijing is the capital of China. It’s a big city. I am very familiar with Beijing. It takes an hour and forty minutes from Nantong to Beijing by plane. There are many tall buildings in Beijing. It’s a modern city. My family visited the Great Wall, the Summer

excel中计算日期差工龄生日等方法

excel中计算日期差工龄生日等方法 方法1:在A1单元格输入前面的日期,比如“2004-10-10”,在A2单元格输入后面的日期,如“2005-6-7”。接着单击A3单元格,输入公式“=DATEDIF(A1,A2,"d")”。然后按下回车键,那么立刻就会得到两者的天数差“240”。 提示:公式中的A1和A2分别代表前后两个日期,顺序是不可以颠倒的。此外,DATEDIF 函数是Excel中一个隐藏函数,在函数向导中看不到它,但这并不影响我们的使用。 方法2:任意选择一个单元格,输入公式“="2004-10-10"-"2005-6-7"”,然后按下回车键,我们可以立即计算出结果。 计算工作时间——工龄—— 假如日期数据在D2单元格。 =DA TEDIF(D2,TODAY(),"y")+1 注意:工龄两头算,所以加“1”。 如果精确到“天”—— =DA TEDIF(D2,TODAY(),"y")&"年"&DATEDIF(D2,TODAY(),"ym")&"月"&DATEDIF(D2,TODAY(),"md")&"日" 二、计算2003-7-617:05到2006-7-713:50分之间相差了多少天、多少个小时多少分钟 假定原数据分别在A1和B1单元格,将计算结果分别放在C1、D1和E1单元格。 C1单元格公式如下: =ROUND(B1-A1,0) D1单元格公式如下: =(B1-A1)*24 E1单元格公式如下: =(B1-A1)*24*60 注意:A1和B1单元格格式要设为日期,C1、D1和E1单元格格式要设为常规. 三、计算生日,假设b2为生日

=datedif(B2,today(),"y") DA TEDIF函数,除Excel2000中在帮助文档有描述外,其他版本的Excel在帮助文档中都没有说明,并且在所有版本的函数向导中也都找不到此函数。但该函数在电子表格中确实存在,并且用来计算两个日期之间的天数、月数或年数很方便。微软称,提供此函数是为了与Lotus1-2-3兼容。 该函数的用法为“DA TEDIF(Start_date,End_date,Unit)”,其中Start_date为一个日期,它代表时间段内的第一个日期或起始日期。End_date为一个日期,它代表时间段内的最后一个日期或结束日期。Unit为所需信息的返回类型。 “Y”为时间段中的整年数,“M”为时间段中的整月数,“D”时间段中的天数。“MD”为Start_date与End_date日期中天数的差,可忽略日期中的月和年。“YM”为Start_date与End_date日期中月数的差,可忽略日期中的日和年。“YD”为Start_date与End_date日期中天数的差,可忽略日期中的年。比如,B2单元格中存放的是出生日期(输入年月日时,用斜线或短横线隔开),在C2单元格中输入“=datedif(B2,today(),"y")”(C2单元格的格式为常规),按回车键后,C2单元格中的数值就是计算后的年龄。此函数在计算时,只有在两日期相差满12个月,才算为一年,假如生日是2004年2月27日,今天是2005年2月28日,用此函数计算的年龄则为0岁,这样算出的年龄其实是最公平的。 本篇文章来源于:实例教程网(https://www.doczj.com/doc/fb7694566.html,) 原文链接:https://www.doczj.com/doc/fb7694566.html,/bgruanjian/excel/631.html

汽车英文演讲稿

汽车英文演讲稿 篇一:汽车英语演讲稿 Good morning everyone ,today, the topic of my lecture(演讲) is “Do you love automobiles('tmbilz)”. before I start my speech ,I want to ask a question,did there anybody present had seen the movie”the Fast and the Furious['fjrs]”.There are many cars of different styles in the movie,for example ,when you see the movie,you can find roadsters(跑车) just like Porsche(保时捷) GT3,sports utility (通用的)vehicles (车)SUV such as Volkswagen ['f:lks,va:gn]Touareg ['twɑ:reɡ](大众途锐),even armored cars ,all of them are so powerful and beautiful. When I was a child,I dreamed I can have a car like FORD GT 40,this racing bike(跑车) is amazing and fantastic,but as time goes on ,my hobby is changing,now my favorite car is Jeep Rubicon,this is a car I really want ,it’s dynamic performance(性能) and off-road (越野) performance is top-ranking(一流的) ,which other ordinary SUV is unable to compare; the shape and color of this car is magnificent (华丽的) [mg'nfs()nt],and it’s gear-shift system(齿轮转

小学一年级介绍北京的英语作文

小学一年级介绍北京的英语作文 Beijing is an ancient city with a long history. Back in 3000 years ago in Zhou dynasty, Beijing, which was called Ji at the moment, had been named capital of Yan. Thereafter, Liao, Jin, Yuan, Ming and Qing dynasty all made Beijing their capital. Therefore, Beijing was famous for "Capital of a thousand years". The long history leaves Beijing precious cultural treasure. Winding for several kilometers in Beijing area, the Great Wall is the only man-made structure that could been seen in the space. The Summer Palace is a classic composition of ancient royal gardens, and the Forbidden City is the largest royal palaces in the world. Tiantan is where the emperor used to fete their ancestors, and also the soul of Chinese ancient constructions. The four sites above has been confirmed world cultural heritage by UNESCO. However, the best representatives for Beijing are the vanishing Hutongs and square courtyards. Through hundreds of years, they have become symbol of Beijing's life. Tian'anmen square being still brilliant today with cloverleaf junctions and skyscrapers everywhere, the old-timey scene and modern culture are combined to present a brand new visage of Beijing. As Beijing has been confirmed home city of Olympics 2008, the spirit of "green Olympics, scientific Olympics and humanized Olympic" will surely bring more and more changes to Beijing, promote the development of sports and Olympics in China as well as in the world, and strengthen the friendly communications between Chinese and foreign people. 北京是一个有着悠久历史的古城。 早在 3000 年前的周朝,北京,这叫霁,被命 名为首都燕。此后,辽、金、元、明、清都是北京首都。因此,北京著名的一千年 的“资本”。 悠久的历史使北京宝贵的文化瑰宝。绕组在北京地区几公里,长城是唯一的 人造结构,可以在空间。 颐和园是古代皇家园林的经典组合,和故宫是世界上最大 的皇家宫殿。 天坛是皇帝用来祭祀他们的祖先的地方,也是中国古代建筑的灵魂。 上面的四个网站已经确认被联合国教科文组织世界文化遗产。然而,北京最好的 代表是消失的胡同和广场庭院。数百年来,他们已经成为北京的生活的象征。天 安门广场到处都在今天依然灿烂的蝶式路口和摩天大楼的,古色古香的场景和现 代文化相结合,提出一个全新的北京的面貌。 随着北京 2008 年奥运会已被证实的家乡,精神的“绿色奥运、科技奥
1/5

相关主题
文本预览
相关文档 最新文档