小菜毛毛技术分享

与大家共同成长

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  164 Posts :: 141 Stories :: 94 Comments :: 0 Trackbacks

#

目标:
本文主要介绍如何定义实体的主、次标识符。

一、标识符
标识符是实体中一个或多个属性的集合,可用来唯一标识实体中的一个实例。要强调的是,CDM中的标识符等价于PDM中的主键或候选键。
每个实体都必须至少有一个标识符。如果实体只有一个标识符,则它为实体的主标识符。如果实体有多个标识符,则其中一个被指定为主标识符,其余的标识符就是次标识符了。

二、如果定义主、次标识符
1)选择某个实体双击弹出实体的属性对话框。在Identifiers选项卡上可以进行实体标识符的定义。如下图所示



2)选择第一行“主标识符”,点击属性按钮或双击第一行“主标识符”,弹出属性对话框,如图所示

3)选择"Attributes"选项卡,再点击“Add Attributes”工具,弹出如图所示窗口,选择某个属性作为标识符就行了。

待续。

0
0
(请您对文章做出评价)
posted @ 2009-08-13 15:19 小菜毛毛 阅读(267) | 评论 (0)编辑 收藏

目标:
本文主要介绍属性的标准检查约束、如何定义属性的附加检查。

一、定义属性的标准检查约束
标准检查约束是一组确保属性有效的表达式。在实体属性的特性窗口,打开如图所示的检查选项卡。


在这个选项卡可以定义属性的标准检查约束,窗口中每项的参数的含义,如下
参数 说明
Minimum 属性可接受的最小数
Maximum  属性可接受的最大数
Default 属性不赋值时,系统提供的默认值
Unit 单位,如公里、吨、元
Format 属性的数据显示格式
Lowercase 属性的赋值全部变为小写字母
Uppercase 属性的赋值全部变为大写字母
Cannot modify 该属性一旦赋值不能再修改
List Of Values 属性赋值列表,除列表中的值,不能有其他的值
Label 属性列表值的标签

二、定义属性的附加检查
当Standard checks 或Rules 不能满足检查的要求时,可以在Additional Checks选项卡的Server子页上,通过SQL语句中使用%MINMAX%、%LISTVAL%、%RULES%、%UPPER%、%LOWER%几个变量来定义Standard和Rule,如图所示


%MINMAX%、%LISTVAL%、%UPPER%、%LOWER%
在Standard Check中定义的Minimum 和Maximum、List values 、uppervalues、lowervalues

%RULES%
在Rules特性窗口Expression选项卡中定义的有效性规则表达式


待续。
posted @ 2009-08-13 15:17 小菜毛毛 阅读(416) | 评论 (0)编辑 收藏

目标:
本文主要介绍PowerDesigner概念数据模型以及实体、属性创建。

一、新建概念数据模型
1)选择File-->New,弹出如图所示对话框,选择CDM模型(即概念数据模型)建立模型。


2)完成概念数据模型的创建。以下图示,对当前的工作空间进行简单介绍。(以后再更详细说明)


3)选择新增的CDM模型,右击,在弹出的菜单中选择“Properties”属性项,弹出如图所示对话框。在“General”标签里可以输入所建模型的名称、代码、描述、创建者、版本以及默认的图表等等信息。在“Notes”标签里可以输入相关描述及说明信息。当然再有更多的标签,可以点击 "More>>"按钮,这里就不再进行详细解释。


二、创建新实体
1)在CDM的图形窗口中,单击工具选项版上的Entity工具,再单击图形窗口的空白处,在单击的位置就出现一个实体符号。点击Pointer工具或右击鼠标,释放Entitiy工具。如图所示

2)双击刚创建的实体符号,打开下列图标窗口,在此窗口“General”标签中可以输入实体的名称、代码、描述等信息。


三、添加实体属性
1)在上述窗口的“Attribute”选项标签上可以添加属性,如下图所示。


注意:
数据项中的“添加属性”和“重用已有数据项”这两项功能与模型中Data Item的Unique code 和Allow reuse选项有关。
P列表示该属性是否为主标识符;D列表示该属性是否在图形窗口中显示;M列表示该属性是否为强制的,即该列是否为空值。

如果一个实体属性为强制的,那么, 这个属性在每条记录中都必须被赋值,不能为空。

2)在上图所示窗口中,点击插入属性按钮,弹出属性对话框,如下图所示。

注意:这里涉及到域的概念,即一种标准的数据结构,它可应用至数据项或实体的属性上。在以下的教程中将另立章节详细说明。

待续。

posted @ 2009-08-13 15:09 小菜毛毛 阅读(337) | 评论 (0)编辑 收藏

目标:
本文主要介绍PowerDesigner中概念数据模型 CDM的基本概念。

一、概念数据模型概述
数据模型是现实世界中数据特征的抽象。数据模型应该满足三个方面的要求:
1)能够比较真实地模拟现实世界
2)容易为人所理解
3)便于计算机实现

概念数据模型也称信息模型,它以实体-联系(Entity-RelationShip,简称E-R)理论为基础,并对这一理论进行了扩充。它从用户的观点出发对信息进行建模,主要用于数据库的概念级设计。

通常人们先将现实世界抽象为概念世界,然后再将概念世界转为机器世界。换句话说,就是先将现实世界中的客观对象抽象为实体(Entity)和联系(Relationship),它并不依赖于具体的计算机系统或某个DBMS系统,这种模型就是我们所说的CDM;然后再将CDM转换为计算机上某个DBMS所支持的数据模型,这样的模型就是物理数据模型,即PDM。

CDM是一组严格定义的模型元素的集合,这些模型元素精确地描述了系统的静态特性、动态特性以及完整性约束条件等,其中包括了数据结构、数据操作和完整性约束三部分。
1)数据结构表达为实体和属性;
2)数据操作表达为实体中的记录的插入、删除、修改、查询等操作;
3)完整性约束表达为数据的自身完整性约束(如数据类型、检查、规则等)和数据间的参照完整性约束(如联系、继承联系等);


二、实体、属性及标识符的定义
实体(Entity),也称为实例,对应现实世界中可区别于其他对象的“事件”或“事物”。例如,学校中的每个学生,医院中的每个手术。
每个实体都有用来描述实体特征的一组性质,称之为属性,一个实体由若干个属性来描述。如学生实体可由学号、姓名、性别、出生年月、所在系别、入学年份等属性组成。

实体集(Entity Set)是具体相同类型及相同性质实体的集合。例如学校所有学生的集合可定义为“学生”实体集,“学生”实体集中的每个实体均具有学号、姓名、性别、出生年月、所在系别、入学年份等性质。

实体类型(Entity Type)是实体集中每个实体所具有的共同性质的集合,例如“患者”实体类型为:患者{门诊号,姓名,性别,年龄,身份证号.............}。实体是实体类型的一个实例,在含义明确的情况下,实体、实体类型通常互换使用。

实体类型中的每个实体包含唯一标识它的一个或一组属性,这些属性称为实体类型的标识符(Identifier),如“学号”是学生实体类型的标识符,“姓名”、“出生日期”、“信址”共同组成“公民”实体类型的标识符。

有些实体类型可以有几组属性充当标识符,选定其中一组属性作为实体类型的主标识符,其他的作为次标识符。

三、实体、属性及标识符的表达



待续!

posted @ 2009-08-13 15:05 小菜毛毛 阅读(334) | 评论 (0)编辑 收藏

log4j入门与提高-实例讲解

关键字: log4j,输出到控制台,日志文件,日志文件分天,日志邮件

官方网站:http://logging.apache.org/log4j/index.html:

 

废话不多说,切入主题,下面都是基础的应用。后面我会写有关扩展的应用,使它更听话。

 

读取配置文件

Java代码 复制代码
  1. package org.cjj.log4j.config.xml;   
  2.   
  3. import java.net.URL;   
  4.   
  5. import org.apache.log4j.xml.DOMConfigurator;   
  6.   
  7. /**  
  8.  * 单实例 读取log4j配置文件,初始化log4j  
  9.  *   
  10.  * @author cjj  
  11.  *   
  12.  */  
  13. public class Log4jXMLConfig   
  14. {   
  15.     private static Log4jXMLConfig instance;   
  16.   
  17.     public static synchronized Log4jXMLConfig initia()   
  18.     {   
  19.         if (instance == null)   
  20.         {   
  21.             return new Log4jXMLConfig();   
  22.         }   
  23.         return instance;   
  24.     }   
  25.   
  26.     private Log4jXMLConfig()   
  27.     {   
  28.         final URL url = Log4jXMLConfig.class.getResource("log4j.xml");   
  29.         DOMConfigurator.configure(url);   
  30.     }   
  31. }  

 

配置文件

Xml代码 复制代码
  1. <?xml version="1.0" encoding="UTF-8" ?>  
  2. <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">  
  3. <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">  
  4.   
  5.     <!-- ========================== 自定义输出格式说明================================ -->  
  6.     <!-- %p 输出优先级,即DEBUG,INFO,WARN,ERROR,FATAL -->  
  7.     <!-- #%r 输出自应用启动到输出该log信息耗费的毫秒数  -->  
  8.     <!-- #%c 输出所属的类目,通常就是所在类的全名 -->  
  9.     <!-- #%t 输出产生该日志事件的线程名 -->  
  10.     <!-- #%n 输出一个回车换行符,Windows平台为“\r\n”,Unix平台为“\n” -->  
  11.     <!-- #%d 输出日志时间点的日期或时间,默认格式为ISO8601,也可以在其后指定格式,比如:%d{yyy MMM dd HH:mm:ss,SSS},输出类似:2002年10月18日 22:10:28,921  -->  
  12.     <!-- #%l 输出日志事件的发生位置,包括类目名、发生的线程,以及在代码中的行数。举例:Testlog4.main(TestLog4.java:10)  -->  
  13.     <!-- ========================================================================== -->  
  14.        
  15.     <!-- ========================== 输出方式说明================================ -->  
  16.     <!-- Log4j提供的appender有以下几种:  -->  
  17.     <!-- org.apache.log4j.ConsoleAppender(控制台),  -->  
  18.     <!-- org.apache.log4j.FileAppender(文件),  -->  
  19.     <!-- org.apache.log4j.DailyRollingFileAppender(每天产生一个日志文件), -->  
  20.     <!-- org.apache.log4j.RollingFileAppender(文件大小到达指定尺寸的时候产生一个新的文件),  -->  
  21.     <!-- org.apache.log4j.WriterAppender(将日志信息以流格式发送到任意指定的地方)   -->  
  22. <!-- ========================================================================== -->  
  23. <!-- 输出到日志文件  -->  
  24.     <appender name="filelog_appender"  
  25.         class="org.apache.log4j.RollingFileAppender">  
  26.         <!-- 设置File参数:日志输出文件名 -->  
  27.         <param name="File" value="log/testlog4jxml_all.log" />  
  28.         <!-- 设置是否在重新启动服务时,在原有日志的基础添加新日志 -->  
  29.         <param name="Append" value="true" />  
  30.         <!-- 设置文件大小 -->  
  31.         <param name="MaxFileSize" value="1MB" />  
  32.         <!-- 设置文件备份 -->  
  33.         <param name="MaxBackupIndex" value="10000" />  
  34.         <!-- 设置输出文件项目和格式 -->  
  35.         <layout class="org.apache.log4j.PatternLayout">  
  36.             <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p (%c:%L)- %m%n" />  
  37.         </layout>  
  38.     </appender>  
  39.   
  40. <!-- 输出到日志文件 每天一个日志  -->  
  41.     <appender name="filelog_daily" class="org.apache.log4j.DailyRollingFileAppender">      
  42.         <param name="File" value="log/daily.log" />      
  43.         <param name="DatePattern" value="'daily.'yyyy-MM-dd'.log'" />      
  44.         <layout class="org.apache.log4j.PatternLayout">      
  45.             <param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss\} %-5p] [%t] (%c:%L) - %m%n" />      
  46.         </layout>      
  47.     </appender>    
  48.   
  49. <!-- 输出到控制台中 -->  
  50.     <appender name="console" class="org.apache.log4j.ConsoleAppender">  
  51.         <layout class="org.apache.log4j.PatternLayout">  
  52.             <param name="ConversionPattern"  
  53.                 value="%d{yyyy-MM-dd HH:mm:ss} %-5p: %m%n" />  
  54.             <!-- "%-5p: [%t] [%c{3}.%M(%L)] | %m%n" -->  
  55.         </layout>  
  56.     </appender>  
  57.   
  58. <appender name="EMAIL_QQ" class="org.apache.log4j.net.SMTPAppender">  
  59.         <param name="Threshold" value="INFO"/>  
  60.         <param name="BufferSize" value="128" />  
  61.         <param name="SMTPHost" value="smtp.qq.com" />  
  62.         <param name="SMTPUsername" value="cjjvictory" />  
  63.         <param name="SMTPPassword" value="***" />  
  64.         <param name="From" value="cjjvictory@qq.com" />  
  65.         <param name="To" value="cjjvictory@gmail.com" />  
  66.         <param name="Subject" value="测试邮件发送" />  
  67.         <param name="LocationInfo" value="true" />  
  68.         <param name="SMTPDebug" value="true" />  
  69.         <layout class="org.cjj.log4j.extend.PatternLayout_zh">  
  70.             <param name="ConversionPattern" value="[%d{ISO8601}] %-5p %c %m%n"/>  
  71.         </layout>  
  72.     </appender>  
  73.   
  74. <!--- 异步测试,当日志达到缓存区大小时候执行所包的appender -->  
  75.     <appender name="ASYNC_test" class="org.apache.log4j.AsyncAppender">      
  76.      <param name="BufferSize" value="10"/>      
  77.      <appender-ref ref="EMAIL_QQ"/>  
  78.    </appender>  
  79.   
  80.  <!-- 设置包限制输出的通道 -->  
  81.     <category name="org.cjj" additivity="false">  
  82.                <!-- 日志输出级别,起码可以有5个级别,可以扩展自己的级别,邮件发送必须是ERROR级别不好用,所以最后自己扩展一个邮件发送级别 -->  
  83.         <level value="ERROR" />  
  84.         <appender-ref ref="filelog_daily" />  
  85.         <appender-ref ref="daily_appender" />  
  86.         <appender-ref ref="console" />  
  87.         <appender-ref ref="ASYNC_test" />  
  88.  </category>  
  89.   
  90. </log4j:configuration>  

 

邮件乱码问题:

 

邮件发送的布局采用了org.cjj.log4j.extend.PatternLayout_zh,因为原来的org.apache.log4j.PatternLayout会有乱码,所以重写一个方法既可。可能方法有点野蛮,所以那位有好的方法还请指教。

 

Java代码 复制代码
  1. package org.cjj.log4j.extend;   
  2.   
  3. import org.apache.log4j.PatternLayout;   
  4.   
  5. public class PatternLayout_zh extends PatternLayout   
  6. {   
  7.     @Override  
  8.     public String getContentType()   
  9.     {   
  10.         return "text/html;charset=GBK";   
  11.     }   
  12. }  
 
posted @ 2009-08-06 08:41 小菜毛毛 阅读(513) | 评论 (0)编辑 收藏

datagrid.mxml-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
     creationComplete="srv.send()"><!-- 发送HTTPService请求-->
   
    <mx:Script >
        <![CDATA[
            import mx.collections.XMLListCollection;
            import mx.collections.ArrayCollection;
            import mx.rpc.events.ResultEvent;
            [Bindable]
            private var users:XML;

          private  function resultUsers(event:ResultEvent):void{//处理结果
          users = XML(event.result);
          datagrid.dataProvider=users.children();//XMLList
         
          }
        ]]>
    </mx:Script>
   
    <mx:HTTPService url="user.xml" useProxy="false" id="srv" resultFormat="xml" result="resultUsers(event)"><!--处理结果函数-->
       
    </mx:HTTPService>
        <mx:Panel x="416" y="75" width="458" height="269" layout="absolute" id="panel" title="用户信息" fontSize="14" fontWeight="bold" fontFamily="Verdana" color="#BB8BDD" borderStyle="solid" borderThickness="3" borderColor="#0E0505" cornerRadius="20" themeColor="#A3C2D8" alpha="0.85" backgroundColor="#FFFFFF" backgroundAlpha="0.84">
                <mx:DataGrid x="32" y="10" width="374" height="193" id="datagrid" enabled="true" fontSize="13" fontWeight="bold" textAlign="center" color="#526BBE" borderColor="#C0C8CC" themeColor="#A9B1B3" alpha="0.86" alternatingItemColors="[#E9E9E9, #EFF8F9]" borderStyle="inset">
                    <mx:columns>
                        <mx:DataGridColumn headerText="ID" dataField="ID"/>
                        <mx:DataGridColumn headerText="姓名" dataField="name"/>
                        <mx:DataGridColumn headerText="年龄" dataField="age"/>
                    </mx:columns>
                </mx:DataGrid>             
        </mx:Panel>
</mx:Application>

--------------------user.xml--------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<users>
    <user>
       <ID>213001</ID>
       <name>飞机</name>
       <age>22</age>
   </user>
   <user>
       <ID>213003</ID>
       <name>痞子</name>
       <age>23</age>
   </user>
   <user>
       <ID>213006</ID>
       <name>嗨嗨</name>
       <age>22</age>
   </user>
   <user>
       <ID>213013</ID>
       <name>小强</name>
       <age>21</age>
   </user>
   <user>
       <ID>213015</ID>
       <name>萧萧</name>
       <age>22</age>
   </user>
   <user>
       <ID>213016</ID>
       <name>小敏</name>
       <age>22</age>
   </user>
</users>

文章出处:http://www.diybl.com/course/4_webprogram/xml/xml_js/200855/113849.html

posted @ 2009-07-30 23:07 小菜毛毛 阅读(2011) | 评论 (0)编辑 收藏

用actionscript给服务器请求添加参数难免会很麻烦,使用mx:request标签就可以解决这一问题,可以把他
嵌套到HTTPService标签中实现参数的提交。如下例所示:
Xml代码 复制代码
  1. <mx:request>  
  2.       <txtPara>{txtPara.text}</txtPara>  
  3.  </mx:request>  

其中txtPara是发送到服务器端参数的名城,标签体是参数值,而标签体的值就是下方文本框的值。
以下是完整的mxml文件:
Xml代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >  
  3.     <mx:Script>     
  4.       <![CDATA[    
  5.         import mx.rpc.events.ResultEvent;                
  6.         import mx.controls.Alert;                        
  7.         private function httpHandle(e:ResultEvent):void   
  8.         {  
  9.             Alert.show(e.result.Result);  
  10.         }  
  11.         ]]>     
  12.     </mx:Script>     
  13.     <mx:HTTPService id="myHttp" url="http://localhost:8080/myflex/http" showBusyCursor="true" result="httpHandle(event);" useProxy="false">  
  14.         <mx:request>  
  15.             <txtPara>{txtPara.text}</txtPara>  
  16.         </mx:request>  
  17.     </mx:HTTPService>  
  18.     <mx:Panel title="TEST HTTPService" width="368" height="140" x="78" y="30" layout="absolute">  
  19.         <mx:Label text="PARA" x="110" y="26"/>     
  20.         <mx:TextInput id="txtPara" x="161" y="24" width="95"/>    
  21.         <mx:Label text="The para sent to service is:" x="58" y="53"/>  
  22.         <mx:Label x="126" y="53" id="lblResult"/>     
  23.         <mx:Button label="Submit" click="myHttp.send()" x="277" y="53"/>      
  24.     </mx:Panel>  
  25. </mx:Application>  

在服务器端就可以从request中取到txtPara参数的值,这里没有做过多处理,只是在后端取到这个值又通过xml形式返还到客户端。
这是例子运行的截图:


mx:request组件一般是结合mx:form组件一起使用,flex提供了完备的数据校验功能,如对字符串的校验mx:StringValidator、
对电话号码验证的mx:PhoneNumberValidator、对日期验证的mx:DateValidator、对电子邮件验证的mx:EmailValidator、对邮编验证
的mx:ZipCodeValidator等等。下面这个示例来自Flex的在线文档,主要展示flex的form验证功能,没有数据的提交。

Xml代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <!-- Simple example to demonstrate Form layout container. -->  
  3. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">  
  4.     <mx:Panel title="Form Container Example" height="75%" width="75%"    
  5.         paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">  
  6.         <mx:Text width="100%" color="blue"  
  7.             text="Moving from one form field to another triggers the validator."/>  
  8.         <mx:Form width="100%" height="100%">  
  9.             <mx:FormHeading label="Enter values into the form."/>  
  10.             <mx:FormItem label="First name">  
  11.                 <mx:TextInput id="fname" width="200"/>  
  12.             </mx:FormItem>  
  13.             <mx:FormItem label="Date of birth (mm/dd/yyyy)">  
  14.                 <mx:TextInput id="dob" width="200"/>  
  15.             </mx:FormItem>  
  16.             <mx:FormItem label="E-mail address">  
  17.                 <mx:TextInput id="email" width="200"/>  
  18.             </mx:FormItem>  
  19.             <mx:FormItem label="Age">  
  20.                 <mx:TextInput id="age" width="200"/>  
  21.             </mx:FormItem>  
  22.             <mx:FormItem label="SSN">  
  23.                 <mx:TextInput id="ssn" width="200"/>  
  24.             </mx:FormItem>  
  25.             <mx:FormItem label="Zip">  
  26.                 <mx:TextInput id="zip" width="200"/>  
  27.             </mx:FormItem>  
  28.             <mx:FormItem label="Phone">  
  29.                 <mx:TextInput id="phone" width="200"/>  
  30.             </mx:FormItem>  
  31.         </mx:Form>  
  32.     </mx:Panel>  
  33.   
  34.     <mx:StringValidator source="{fname}" property="text" minLength="4" maxLength="12"/>  
  35.     <mx:PhoneNumberValidator source="{phone}" property="text"/>  
  36.     <mx:DateValidator source="{dob}" property="text"/>  
  37.     <mx:EmailValidator source="{email}" property="text"/>  
  38.     <mx:NumberValidator source="{age}" property="text" integerError="Enter Integer value"  
  39.         minValue="18" maxValue="100" domain="int"/>  
  40.     <mx:SocialSecurityValidator source="{ssn}" property="text"/>  
  41.     <mx:ZipCodeValidator source="{zip}" property="text"/>  
  42. </mx:Application>  

示例运行的截图:
 
posted @ 2009-07-28 13:55 小菜毛毛 阅读(337) | 评论 (0)编辑 收藏

最近学习flex,参考了不少网上的资料,特别是 中国flex开发者(http://www.flexer.cn/)。flex数据交互是一个关键,做个学习总结,请flex老鸟指正!

flex和后端的数据交互有很多方式,flex可以使用ActionScript读写文件(xml、txt)的形式存储显示数据,
Flex 3.0中新增了对本地数据库(.db格式)操作的类,可用于读取本地的数据库数据。新增了对PDF数据
操作的类,可用于读取PDF数据。

xml文件方式

XML优点是简单小巧、存储方便、检索快速。所以,XML常用于数据存储和数据交换。Flex 3.使用URLLoader类可方便地传输XML数据。
使用XML方式传输数据的步骤如下所示。
新建名为"tree.xml"文件,用以存储XML数据:
Xml代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <menus>  
  3.     <node label="Mail">  
  4.         <node label="Inbox"/>  
  5.         <node label="Personal Folder">  
  6.             <node label="Demo"/>  
  7.             <node label="Personal"/>  
  8.             <node label="Saved Mail"/>  
  9.             <node label="bar"/>  
  10.         </node>  
  11.         <node label="Calendar"/>  
  12.         <node label="Sent"/>  
  13.         <node label="Trash"/>  
  14.     </node>  
  15. </menus>  

xml文件的读写我们可以用FileStream类来实现:
读取xml文件:
Javascript代码 复制代码
  1. var testXML:XML;   
  2. var file:File = File.documentsDirectory.resolvePath("tree.xml");   
  3. var fileStream:FileStream = new FileStream();   
  4. fileStream.open(file, FileMode.READ);   
  5. testXML = XML(fileStream.readUTFBytes(fileStream.bytesAvailable));   
  6. fileStream.close();  

写回xml文件
Javascript代码 复制代码
  1. var testXML:XML=<content>content</content>......;   
  2. var file:File = File.documentsDirectory.resolvePath("tree.xml");   
  3. var fileStream:FileStream = new FileStream();   
  4. fileStream.open(file, FileMode.WRITE);   
  5. var outputString:String = '<?xml version="1.0" encoding="utf-8"?>\n';   
  6. outputString += testXML.toXMLString();   
  7. fileStream.writeUTFBytes(outputString);   
  8. fileStream.close();  

需要说明一下的是文件打开方式:FileMode
READ --设置文件打开方式为只读
WRITE--设置文件打开方式为写数据。文件不存在,则创建;文件存在,则覆盖原有数据。
APPEND--设置文件打开方式为追加。文件不存在,则创建;文件存在,则新数据从文件末尾开始增加。
UPDATE--设置文件打开方式为读写。文件不存在,则创建。设置该模式通常用于随机读写访问文件。可以从文件的任意位置读取,写入数据时,只有写入位置的存在字节被覆盖,其他所有字节不受影响。

这里我们使用URLRequest类来加载xml数据,编写应用程序初始化处理函数loadXML。
变量,用以指明XML文件路径。
public function loadXML():void//应用程序初始化处理函数
{
    //定义URLRequest实例,指定文件地址。
    var request:URLRequest=new URLRequest("tree.xml");
    loader.load(request);//加载XML文件
    loader.addEventListener(Event.COMPLETE,completeHandle);     //添加加载完成时的监听
}

loader.addEventListener(Event.COMPLETE,completeHandle)语句表示添加对XML加载完成事件的监听。一旦加载完成执行
completeHandle函数。完成剩余MXML代码。剩余代码包括completeHandle函数,<mx:Tree>组件设计等。
以下代码是完整的MXML代码。
Java代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>   
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontFamily="simsun"    
  3.     fontSize="12" layout="absolute" width="242" height="442" creationComplete="loadXML()">   
  4.     <mx:Script>   
  5.           <![CDATA[   
  6.             import mx.collections.ArrayCollection;    
  7.             import mx.rpc.events.ResultEvent;          
  8.             public var loader:URLLoader=new URLLoader();   
  9.             public var menus:XML=new XML();            
  10.             public function loadXML():void             
  11.             {   
  12.                 var request:URLRequest=new URLRequest("tree.xml");   
  13.                 loader.load(request);    
  14.                 loader.addEventListener(Event.COMPLETE,completeHandle);   
  15.             }   
  16.             public function completeHandle(e:Event):void  
  17.             {   
  18.                 menus=XML(loader.data);               
  19.                 var results:XMLList=menus.node;       
  20.                 tree.dataProvider=results;    
  21.             }   
  22.           ]]>   
  23.     </mx:Script>   
  24.   
  25.     <mx:Tree id="tree" x="10" y="35" width="218" height="397" labelField="@label" />   
  26.     <mx:Label x="10" y="10" text="Tree Nodes From XML File"/>   
  27.  </mx:Application>  

这是运行结果截图:



<mx:HTTPService>组件方式


<mx:HTTPService>组件可与所有的后端程序交互。例如,ASP、ASP.Net、JSP、PHP等。
以下是一个<mx:HTTPService>组件语法示例:
<mx:HTTPService id="feedRequest" url="http://localhost:8080/myflex/helloworld?para_1=para_1&para_2=para_2" result="showResult(event)" />
id唯一标识该组件,url是数据提交的地址,可以在地址后面添加参数,提交到后端进行处理,处理后
再返回Flex可识别的数据类型,如数组型、XML型、Object型等。

<mx:HTTPService>组件返回的数据存储于ResultEvent类中。使用<mx:HTTPService>组件的result事件可处理HTTP程序返回的数据。
eg. <mx:HTTPService result="处理函数名">

返回的数据存储于ResultEvent类的result属性下。各种数据的具体位置与HTTP程序的处理结果有关。
数据返回后的处理方法示例:
Java代码 复制代码
  1. import mx.rpc.events.ResultEvent;                          
  2. import mx.controls.Alert;                                 
  3.   
  4. private function showResult(e:ResultEvent):void  
  5. {   
  6.     Alert.show(e.result as String);                       
  7. }  


来一个简单的例子会让你更加明白的!

这是客户端mxml的源代码:
Xml代码 复制代码
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >  
  3.     <mx:Script>     
  4.       <![CDATA[    
  5.         import mx.rpc.events.ResultEvent;                
  6.         import mx.controls.Alert;                     
  7.           
  8.         private var arr:Array=new Array();               
  9.         private function addHandle():void             
  10.         {  
  11.             myHttp.url="http://localhost:8080/myflex/sum";                                                       
  12.             if(arr.length>0)                             
  13.                 myHttp.url+="?";  
  14.             for(var i:int=0;i<arr.length;i++)             
  15.             {  
  16.                 if(i!=arr.length-1)  
  17.                     myHttp.url+="num="+arr[i].para.toString()+"&";  
  18.                 else  
  19.                     myHttp.url+="num="+arr[i].para.toString();  
  20.             }  
  21.             Alert.show(myHttp.url);  
  22.             myHttp.send();                         
  23.         }  
  24.           
  25.         private function addData():void           
  26.         {  
  27.             var obj:Object=new Object();             
  28.             obj.para=txtPara.text;                  
  29.             arr.push(obj);                          
  30.             dg.dataProvider=arr;                     
  31.             txtPara.text="";                       
  32.             dg.validateNow();                        
  33.         }  
  34.           
  35.         private function delData():void           
  36.         {  
  37.             arr=new Array();                               
  38.             dg.dataProvider=arr;                   
  39.             dg.validateNow();                        
  40.         }  
  41.           
  42.         private function httpHandle(e:ResultEvent):void  
  43.         {  
  44.             lblResult.text=e.result.sumTag;  
  45.         }  
  46.         ]]>     
  47.     </mx:Script>     
  48.     <mx:HTTPService id="myHttp" showBusyCursor="true" result="httpHandle(event);" useProxy="false"/>  
  49.     <mx:Panel title="测试HTTPService" width="368" height="334" x="78" y="30" layout="absolute">  
  50.         <mx:Label text="叠加参数:" x="110" y="26"/>  
  51.         <mx:TextInput id="txtPara" x="161" y="24" width="95"/>    
  52.         <mx:DataGrid id="dg" x="76" y="64" height="166" width="179">  
  53.             <mx:columns>  
  54.                 <mx:DataGridColumn dataField="para" headerText="参数列表"/>  
  55.             </mx:columns>  
  56.         </mx:DataGrid>  
  57.         <mx:Button label="添加" click="addData();" x="277" y="26"/>     
  58.         <mx:Button label="删除" click="delData();" x="277" y="64"/>     
  59.         <mx:Label text="叠加结果是:" x="58" y="253"/>  
  60.         <mx:Label x="126" y="253" id="lblResult"/>     
  61.         <mx:Button label="计算" click="addHandle();" x="277" y="249"/>      
  62.     </mx:Panel>  
  63. </mx:Application>  

"http://localhost:8080/myflex/sum"是一个servlet的映射地址,actionscript方法addHandle将每一个数字参数添加到url映射地
址后面并且向服务器发送请求,addData方法把输入的数字显示到下方列表,delData方法删除整个列表,httpHandle方法处理服务器
的返回值。其中e.result.sumTag表示取得xml返回数据中sumTag标签中的内容。
以下是servlet中对接收参数的处理:
Java代码 复制代码
  1. public void doPost(HttpServletRequest request, HttpServletResponse response)   
  2.             throws ServletException, IOException   
  3.     {   
  4.         String[] para = request.getParameterValues("num");   
  5.         int sum = 0;   
  6.         if (para != null)   
  7.         {   
  8.             for (int i = 0; i < para.length; i++)   
  9.             {   
  10.                 if (para[i] != null && !"".equals(para[i]))   
  11.                 {   
  12.                     sum = sum + Integer.parseInt(para[i]);   
  13.                 }   
  14.             }   
  15.         }   
  16.         response.getWriter().print(   
  17.                 "<?xml version=\"1.0\" encoding=\"utf-8\"?><sumTag>" + sum   
  18.                         + "</sumTag>");   
  19.     }  


下面是例子运行的截图:


下一次学习总结一下<mx:WebService>组件和RemoteObject及其他的交互方式!
posted @ 2009-07-28 13:53 小菜毛毛 阅读(1551) | 评论 (0)编辑 收藏

flex与java--Blazeds学习(配置)
先简单说一下Blazeds,简单的讲Blazeds就是flex与java平台进行交互的工具,当然不仅限于java语言,也包括运行在java平台上的其他语言,关于这方面可以google下。
   其实BlazeDS可以看成是LCDS的一个子集,而且是一个开源产品,在一般的项目中完全可以替代LCDS,现在有三个版本,其中Turnkey版内置了Tomcat和 Flex 3 SDK,还包含blazeds.war、ds-console.war和samples.war;Binary Distribution版只包括blazeds.war,此为最简配置;而Source则包含blazeds的Java源代码,如果想做二次开发就下载这个。
下图是Adobe官方的Blazeds与LCDS的对比,
 
现在知道什么地方该用哪个了吧
好了不多说了,看看如何配置:
目前来说有三种方式:
第一种:flex工程与java工程相互独立;
第二种:Flex工程整合Java项目;
第三种:java项目中加入flex;
其中第一种和第三种在配置上很相似。
简单说一下:
 
第一种:
1、当然是先建一个java工程,把需要的包导入,配置文件写好,web.xml参考Blazeds的例子,导入Tomcat就ok;
2、然后建一个flex工程,在Server Technology处选择J2EE,然后选择使用LCDS,next;
3、Web root选择你发布到tomcat中的java工程目录,Root URL写入你要再浏览器中访问该项目的url,Context root写你的java工程名;
4、请确保已经开启tomcat服务,然后点击Valdate Configuration按钮,没有任何错误提示点击Finish即完成项目创建,此flex项目中最后的编译swf文件都会保存在tomcat下的工程目录的一个(flex项目名称)-debug文件夹中,当然你也可以更改这个路径就在output folder那,如下图:
 
5、注意:项目建好后右击工程选择属性->flex complier,flex sdk version 一定要更改,一般选default SDK就可以了,不要使用默认的serverSDK,这一步很重要,因为你建的是LCDS支持的项目,LCDS是支持服务器端编译的,Blazeds并不支持,这也是为什么有些人配置Blazeds不能够正常编译的原因。
 
第二种:Flex工程整合Java项目,这里使用MyEclipse+flexBuilder插件版
1、创建Flex工程,勾选Use remote object access service,next。
2、 配置J2EE服务器,我们这里使用Tomcat,Target runtime:选择一个Tomcat的runtime,没有就新建一个,只需要指定Tomcat的安装目录即可;设定上下文路径和blazeds.war的位置,如图:
 
3.  设置输出文件的路径,改为webRoot就可以;
4、以下全部采用默认配置就可以,点击finish;
5、把flex工程变为myEclipse的web工程,右击项目选择MyEclipse->add web project capabilities....,注意不要覆盖web.xml,右击工程选择属性进行其他配置。
 
第三种:
1、在已有的java工程上右击选择flex project nature->add flex project nature;
2、以后操作同第一种,不在详述。
posted @ 2009-07-23 17:12 小菜毛毛 阅读(1241) | 评论 (0)编辑 收藏

1. 不用说?…

  It goes without saying that子句

  = (It is) needless to say (that)子句

  = It is obvious that子句

  = Obviously, S. + V.

  例︰不用说早睡早起是值得的。

  It goes without saying that it pays to keep early hours.

  2. …是不可能的; 无法…

  There is no Ving

  = There is no way of Ving.

  = There is no possibility of Ving.

  = It is impossible to V.

  = It is out of the question to V.

  = No one can V.

  = We cannot V.

  例︰不可否认的?成功的事业关键在于健康的身心。

  There is not denying that successful business lies in a healthy body and mind.

  3. 我深信…

  I am greatly convinced (that)子句

  = I am greatly assured (that)子句

  例︰我深信预防是于治疗。

  I am greatly convinced that prevention is better than cure.

  4. 在各种…之中?…

  Among various kinds of …, …

  = Of all the …, …

  例︰在各种运动中?我尤其喜欢慢跑。

  Among various kinds of sports, I like jogging in particular.

  5. …是很容易证明的。

  It can be easily proved (that)子句

  例︰时间最珍贵是很容易证明的。

  It can be easily proved that nothing is more precious than time.

  6. …无论如何强调都不为过

  … cannot be overemphasized

  例︰交通安全的重要性无论如何强调都不为过。

  The importance of traffic safety cannot be overemphasized.

  7. 就我的看法?…;我认为…

  In my opinion, …

  = To my mind, …。

  = As far as I am concerned, …

  = I am of the opinion that子句

  例︰就我的看法?打电动玩具既花费时间也有害健康。

  In my opinion, playing video games not only takes much time but is also harmful to health.

  8. (A) 每个人都知道…

  Everyone knows (that)子句

  (B) 就我所知?…

  As far as my knowledge is concerned, …

  例︰就我所知?下列方法对我帮助很大。

  As far as my knowledge is concerned, the following ways are of great help to me.

  9. 毫无疑问地?…

  There is no doubt (that)子句

  例︰毫无疑问地?近视在我国的年轻人中是一个严重的问题。

  There is no doubt that near-sightedness is a serious problem among the youth of our country.

  10. 根据我个人经验?…

  According to my personal experience, …

  = Based on my personal experience, …

  例︰根据我个人经验?微笑已带给我许多好处。

  According to my personal experience, smile has done me a lot of good.

·                                 11. 在我认识的人当中?也许没有一个人比…更值得我尊敬。

  Of all the people I know, perhaps non deserves my respect more than …

  例︰在我认识的人当中?也许没有一个人比我的英文老师张老师更值得我尊敬。

  Of all the people I know, perhaps non deserves my respect more than Miss Chang, my English teacher.

  12. 在我的求学过程中?我忘不了…

  In the course of my schooling. I will never forget …

  例︰在我的求学过程中?我忘不了学习英文所遭到的大困难。

  In the course of my schooling. I will never forget the great difficulty I encountered in learning English.

  13. (A) 随着人口的增加?… With the increase/growth of the population, …

  (B) 随着科技的进步, … With the advance of science and technology, …

  例︰随着台湾经济的快速发展?许多社会问题产生了。

  With the rapid development of Taiwan's economy, a lot of social problems have come to pass.

  14. (A) 在这信息的年代?…扮演重要的角色。

  In the age of information and communication, … plays an important role.

  (B) 在今日工业社会中?…是生命不可或缺的。

  In today's industrial society, … is indispensable to life.

  例︰在这信息的年代?计算机扮演非常重要的角色。

  In this age of information and communication, the computer plays an extremely important role.

  15. 在讨论…?一个人不得不承认…。

  In dealing with …, one cannot but admit (that)子句

  例︰在讨论未来的职业?一个人不得不承认尽早决定未来的职业很重要。

  In dealing with one's future career, one cannot but admit that it is very important to decide one's future career as early as possible.

  16. 世上没有什么比…更令我高兴。

  Nothing in the world can delight me so much as …

  例︰世上没有什么比到快餐店吃汉堡更令我高兴。

  Nothing in the world can delight me so much as having hamburgers in fast-food restaurants.

  17. … 是必要的 It is necessary that S (should) V

  … 是重要的 It is important/essential that S (should) V

  … 是适当的 It is proper that S (should) V

  … 是紧急的 It is urgent that S (should) V

  例︰我们当保持公共场所清洁是应当的。

  It is proper that we (should) keep the public places clean.

  18. 每当我听到…?我就忍不住感到兴奋。Whenever I hear …, I cannot but feel excited.

  每当我做…? 我就忍不住感到悲伤。 Whenever I do …, I cannot but feel sad.

  每当我想到…?我就忍不住感到紧张。Whenever I think of …, I cannot but feel nervous.

  每当我遭遇…?我就忍不住感到害怕。Whenever I meet with …, I cannot but feel frightened.

  每当我看到… 我就忍不住感到惊讶。Whenever I see …, I cannot but feel surprised.

  例︰每当我想到我家附近那一条清澈的小溪?我就忍不住感到悲伤。

  Whenever I think of the clean brook near my home, I cannot but feel sad.

  = Every time I think of the clean brook near my home, I cannot help feeling sad.

  19. 据说… It is said (that)子句

  一般认为… It is thought (that)子句

  大家都知道… It is known (that)子句

  据报导… It is reported (that)子句

  一般预料… It is expected (that)子句

  一般估计… It is estimated (that)子句

  一般相信… It is believed (that)子句

  例︰一般相信阅读增加我们的知识、扩大我们的心胸。

  It is believed (that) reading increases our knowledge and broadens our mind.

  20. …的主要理由是…

  The main reason why ……… is (that)子句

  例︰青少年犯罪的主要理由是社会环境日一败坏。

  The main reason why the juveniles commit crimes is that social environment is becoming worse.

·                                 21. 俗语说得好:「…」。

  Well goes an old saying, “…”

  = As an old saying goes(runs, says), “…”

  = An old saying goes, “…”

  = It's an old saying (that)子句

  例︰俗话说得好:「诚实为上策」。

  As an old saying goes, “Honesty is the best policy.”

  22. (A) …用下列方法… … in the following ways.

  (B) …有三个主要理由。 … for three major reasons.

  (C) 要…?至少我们可做三件事。 To …, there are at least three things we can do.

  例︰(A) 我用下列方法增加信心。

  I increase my confidence in the following ways.

  (B) 人们学外语有三个理由。

  People learn a foreign language for three major reasons.

  (C) 为了维护健康?我们每天至少可做三件事。

  To keep healthy, there are at least three things we can do every day.

  II. 用于文章承转句

  23. 那就是(说)…;亦即…

  That is to say, …

  = That is, …

  = Namely, …

  例︰我们生活需有规律。也就是说?早睡早起?戒除烟酒。

  We need to live a regular life. That is, we can keep good hours and refrain from smoking and drinking in the daily activities.

  24. (A) 基于这个理由?… For this reason, …

  (B) 为了这个目的?… For this purpose, …

  例︰基于这个理由?我已决定把行医作为未来的职业。

  For this reason, I have decided to take practicing medicine as my future career.

  25. 我们有理由相信…

  We have reasons to believe (that)子句

  例︰我们有理由相信体罚应该严格禁止。

  We have reasons to believe that corporal punishment should be strictly prohibited.

  26. 事实上?…

  As a matter of fact, …

  = In fact, …

  例︰事实上?健康才是最重要。

  As a matter of fact, it is health that counts.

  27. (A) 例如?… For example, …

  (B) 拿…做例子 Take … for example.

  例︰例如?我们盲目地提高生活水准?却降低生活品质。

  For example, we elevate the living standards blindly, but lower the quality of life.

  28. 此外?我们不应忽视…

  Besides (In addition), we should not neglect …

  例︰此外?我们不应忽视每个人都想要一个温馨祥和的社会。

  In addition, we should not neglect that everyone wants a friendly and peaceful society.

  29. 相反地?…

  on the contrary, …

  = by contrast, …

  例︰相反地?少数学生似乎还在鬼混。

  On the contrary, a few students, it seems, are still fooling around.

  30. 另一方面?…

  on the other hand, …

  例︰政府应严格执法?另一方面?大众也应该培养减少污染的好习惯。

  The government should enforce laws strictly. On the other hand, the public also should develop the good habit of reducing pollution.

·                                 31. 然而?很可惜的是…

  However, it is a pity that子句

  例︰然而?很可惜的是他总是临时抱佛脚。

  However, it is a pity that he should always cram at the eleventh hour.

  32. 换言之?…

  in other words, …

  = to put it differently

  例︰换言之?我会尽最大的努力达成我的目标。

  In other words, I will try my best to attain (gain, live up to) my goal.

  33. 别人可能认为这是事实?但我不是。我认为…

  It may be true as assumed by others, but I don't. I believe that子句

  例︰别人可能认为这是事实?但我不是。我认为…

  It may be true as assumed by others, but I don't. I believe that if you have strong determination and perseverance, the success will certainly come to you in the end.

  34. 从此之后?我已发现…

  Ever since then, I have found that子句

  例︰从此之后?我已发现…

  Ever since then, I have found smile the best way to avoid any possible conflicts in our daily lives.

  35. 这样说来?假如……?当然毫无疑问地…。

  In this light, if…, there can surely be no doubt (that) 子句

  例︰这样说来?假如我们能善用时间?当然毫无疑问地我们会成功。

  In this light, if we can make good use of time, there can surely be no doubt that we will get somewhere.

  36. 更严重的是?…。

  What is more serious is (that)子句

  例︰更严重的是?我们不珍惜野生动物。

  What is more serious is that we do not cherish the wildlife.

  37. 鉴于社会的实际需要?…。

  In view of the practical need of society, …。

  例︰鉴于社会的实际需要?愈来愈多人对学英语有兴趣。

  In view of the practical need of society, there are more and more people interested in learning English.

  III. 用于文章结论句

  38. 如果能实践这三点?…。

  If one can really put the three points into action (practice), …

  例︰如果能实践这三点?…。

  If one can really put the three points into action(practice), he will surely be able to live a healthy and happy life.

  39. 做这些简单之事?我们一定可以…。

  By doing these simple things, we surely can …。

  例︰做这些简单之事?我们一定可以快乐出门平安回家。

  By doing these simple things, we surely can go out of the door happily and come back home safe every day.

  40. 如此?我相信…。

  In this way, I believe (that)子句

  例︰如此?我相信大家能够像我一样?享受乘坐公车的乐趣。

  In this way, I believe that all the people may be able to enjoy the bus ride like me.

·                                  41. 实践这些?…。

  By putting them (the above) into practice, …。

  例︰实践这些?在智育方面我一直能不断进步。

  By putting them(the above) into practice, I have been able to make constant progress in intellectual education.

  42. (A) 唯有符合此三项要求?我们才能…。

  Only by living up to the three requirements, can we …。

  (B) 唯有通力合作?我们才能…。

  Only with combined efforts, can we …。

  例︰唯有通力合作?我们才能期望台湾不久有新的面貌。

  Only with combined efforts, can we expect Taiwan to take a new face in due course.

  43. 最后?但并非最不重要?…。

  Last but no least, …。

  例︰最后?但并非最不重要?教育上的缺失是助长青少年犯罪的原因。

  Last but no least, the shortcoming in education is the cause contributing to juvenile delinquency.

  44. 这证据显示~的重要性在怎么强调都不为过。

  This evidence shows that the importance of ~ cannot be overemphasized.

  例︰这证据显示交通安全的重要性在怎么强调都不为过。

  This evidence shows that the importance of traffic safety cannot be overemphasized.

  45. 由于这些理由?我…。

  For these reasons, I …。

  例︰由于这些理由?我认为在台湾接受大学教育是明智的。

  For these reasons, I think that receiving college education in Taiwan is wise.

  46. 总而言之?…。

  In conclusion, …

  = To sum up, …

  例︰总而言之?好国民应该遵守交通规则。

  In conclusion, a good citizen should abide by traffic regulations.

  47. 因此?我们能下个结论?那就是…。

  We can, therefore, come to the conclusion (that)子句

  例︰因此?我们能下个结论?那就是世上自由罪珍贵。

  We can, therefore, come to the conclusion that nothing is so precious as freedom in the world.

  48. 如果我们能做到如上所述?毫无疑问地?…。

  If we can do as mentioned above, there can be no doubt (that)子句

  例︰如果我们能做到如上所述?毫无疑问地?我们就能精通英语

  If we can do as mentioned above, there can be no doubt that we can master English

  49. 因此?这就是…的原因。

  Thus, this is the reason why …。

  例︰因此?这就是我重感冒的原因。

  Thus, this is the reason why I caught a bad cold.

  50. 所以?我们应该了解…。

  Therefore, we should realize (that)子句

  例︰所以?我们应该了解学英文不能没有字典。

  Therefore, we should realize that in learning English we cannot do without a dictionary.

·                                  51. 因此?由上列的讨论我们可以明了…。

  We, therefore, can make clear from the above discussion (that)子句

  例︰因此?由上列的讨论我们可以明了毅力可以克服任何困难。

  We, therefore, can make clear from the above discussion that perseverance can overcome any difficulty.

  52. 1. 从~观点来看?…。 From the ~ point of view, …。

  2. 根据~的看法?…。 According to ~ point of view, …。

  例︰从政治的观点来看?这是一个很复杂的问题。

  From the political point

 

posted @ 2009-07-22 23:10 小菜毛毛 阅读(189) | 评论 (0)编辑 收藏

仅列出标题
共17页: First 上一页 9 10 11 12 13 14 15 16 17 下一页