<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    小菜毛毛技術分享

    與大家共同成長

      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 小菜毛毛 閱讀(302) | 評論 (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 小菜毛毛 閱讀(445) | 評論 (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 小菜毛毛 閱讀(366) | 評論 (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 小菜毛毛 閱讀(359) | 評論 (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 小菜毛毛 閱讀(529) | 評論 (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 小菜毛毛 閱讀(2035) | 評論 (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 小菜毛毛 閱讀(358) | 評論 (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 小菜毛毛 閱讀(1571) | 評論 (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 小菜毛毛 閱讀(1266) | 評論 (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 小菜毛毛 閱讀(208) | 評論 (0)編輯 收藏

    僅列出標題
    共17頁: First 上一頁 9 10 11 12 13 14 15 16 17 下一頁 
    主站蜘蛛池模板: 国产精品亚洲片在线花蝴蝶| 久久久久久久综合日本亚洲| 好爽好紧好大的免费视频国产| 男女超爽刺激视频免费播放| 99热这里只有精品免费播放| 少妇无码一区二区三区免费| 美女内射无套日韩免费播放 | 亚洲国产二区三区久久| 国产亚洲精品va在线| 亚洲国产精品成人久久| 亚洲人成影院在线| 亚洲成a人片77777群色| 国产精品亚洲午夜一区二区三区| 91在线亚洲精品专区| 亚洲av无码不卡久久| 亚洲欧美aⅴ在线资源| 亚洲AV第一成肉网| 九九免费久久这里有精品23| 你懂的网址免费国产| 伊人久久免费视频| 国产精品免费观看久久| 国产精品免费播放| 国产亚洲人成A在线V网站| 亚洲国产精品久久久天堂| 亚洲经典在线中文字幕| 亚洲日本久久久午夜精品| 亚洲AV无码专区国产乱码不卡| 国产亚洲福利一区二区免费看 | 亚洲成av人片在线看片| 亚洲精品美女网站| 瑟瑟网站免费网站入口| 国产特黄一级一片免费| 2021国内精品久久久久精免费| 中文字幕av无码无卡免费| 免费大学生国产在线观看p| 亚洲永久无码3D动漫一区| 亚洲精品国产电影午夜| 亚洲av无码专区在线电影天堂| 两个人看的www视频免费完整版| 97免费人妻在线视频| 免费看美女被靠到爽的视频|