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

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

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

    2009年3月27日

    多線程總結 todo

    http://lavasoft.blog.51cto.com/62575/27069/

    posted @ 2012-03-26 11:06 luofeng225| 編輯 收藏

    異常處理

         摘要:   閱讀全文

    posted @ 2011-07-18 12:09 luofeng225 閱讀(271) | 評論 (0)編輯 收藏

    如何娶到比爾·蓋茨的女兒

         摘要:   閱讀全文

    posted @ 2011-07-18 12:09 luofeng225 閱讀(501) | 評論 (0)編輯 收藏

    Log4j 雜記

         摘要: Log4j 雜記  閱讀全文

    posted @ 2011-07-15 21:13 luofeng225 閱讀(296) | 評論 (0)編輯 收藏

    內部類

         摘要: 簡單的說,內部(inner)類指那些類定義代碼被置于其它類定義中的類;而對于一般的、類定義代碼不嵌套在其它類定義中的類,稱為頂層(top-level)類。對于一個內部類,包含其定義代碼的類稱為它的外部(outer)類。
    成員內部類
    局部內部類
    匿名類
    靜態內部類  閱讀全文

    posted @ 2011-07-15 09:34 luofeng225 閱讀(259) | 評論 (0)編輯 收藏

    final

         摘要: final  閱讀全文

    posted @ 2011-07-15 09:29 luofeng225 閱讀(222) | 評論 (0)編輯 收藏

    盡量買國外作者出的書。

         摘要: 軟件開發方面的書籍還是國外作者出的好!  閱讀全文

    posted @ 2011-07-15 09:18 luofeng225 閱讀(341) | 評論 (0)編輯 收藏

    互聯網不適合螺絲釘員工

         摘要: 中國軟件企業主要做的是外包類項目,提供行業應用的解決方案。在這種企業里面,技術只是一顆螺絲釘,起主導作用的是行業里經驗豐富的人,純做技術的路很窄。而在國外,技術人員有很寬闊的發展路線,可以在技術領域鉆研得很深。此外,國內很多領域的軟件項目,均是利用國外的成型技術,比如數據庫用Oracle的、中間件用IBM的。這樣,利潤最厚的部分都被國外企業掙了。國內企業利潤薄,投入也會小,導致國內軟件行業技術人員發展的路也就窄了很多。  閱讀全文

    posted @ 2011-02-25 15:20 luofeng225 閱讀(349) | 評論 (0)編輯 收藏

    35歲:我還能做程序員嗎?

         摘要:   閱讀全文

    posted @ 2009-10-19 18:51 luofeng225 閱讀(1363) | 評論 (3)編輯 收藏

    立足于中間件 迎接美好的SOA時代

         摘要: 即是Service Oriented Architecture簡稱,SOA是一種模式架構,SOA具體實現目前有多種選擇: Services(Web服務)、CORBA和JINI。因此,WebServices不等于SOA。
      閱讀全文

    posted @ 2009-09-18 19:48 luofeng225| 編輯 收藏

    印度Infosys公司

         摘要:   閱讀全文

    posted @ 2009-09-05 21:23 luofeng225 閱讀(2208) | 評論 (0)編輯 收藏

    Infosys的人才哲學

         摘要:   閱讀全文

    posted @ 2009-09-05 20:58 luofeng225 閱讀(376) | 評論 (0)編輯 收藏

    從軟件技術高手到百萬富翁的三條捷徑

         摘要: CSDN總裁蔣濤為來賓做了開場白,他談到了從軟件技術高手到百萬富翁的三條捷徑。  閱讀全文

    posted @ 2009-09-01 10:41 luofeng225 閱讀(281) | 評論 (0)編輯 收藏

    Red Hat以3.5億美元收購中間件廠商JBoss

         摘要:   閱讀全文

    posted @ 2009-08-08 00:36 luofeng225 閱讀(283) | 評論 (0)編輯 收藏

    迪米特原則

         摘要: 迪米特原則  閱讀全文

    posted @ 2009-07-02 23:15 luofeng225 閱讀(659) | 評論 (0)編輯 收藏

    組合/聚合復用原則

         摘要: 組合/聚合復用原則 【5,Composition/Aggregation Reuse Principle(CARP)  閱讀全文

    posted @ 2009-07-02 23:09 luofeng225 閱讀(1326) | 評論 (0)編輯 收藏

    接口隔離原則

         摘要: 接口隔離原則 Interface Segregation Principle(ISP)  閱讀全文

    posted @ 2009-07-02 23:03 luofeng225 閱讀(279) | 評論 (0)編輯 收藏

    依賴倒轉原則

         摘要:   閱讀全文

    posted @ 2009-07-02 22:59 luofeng225 閱讀(1155) | 評論 (3)編輯 收藏

    里氏代換原則

         摘要:   閱讀全文

    posted @ 2009-07-02 22:53 luofeng225 閱讀(452) | 評論 (0)編輯 收藏

    開-閉”原則

         摘要:   閱讀全文

    posted @ 2009-07-02 22:36 luofeng225 閱讀(250) | 評論 (0)編輯 收藏

    簡單工廠模式

         摘要: 創建模式之一 簡單工廠模式   閱讀全文

    posted @ 2009-07-02 22:31 luofeng225 閱讀(218) | 評論 (0)編輯 收藏

    異常處理誤區

         摘要: 好文章,學習!  閱讀全文

    posted @ 2009-06-30 00:35 luofeng225 閱讀(243) | 評論 (0)編輯 收藏

    OGNL

         摘要: 它是一種功能強大的表達式語言(Expression Language,簡稱為EL),通過它簡單一致的表達式語法,可  閱讀全文

    posted @ 2009-06-18 17:02 luofeng225 閱讀(223) | 評論 (0)編輯 收藏

    內連接,外連接,自然連接

         摘要: 內連接

    外連接

    左外連接
    右外連接
    完全外連接
    自然連接
      閱讀全文

    posted @ 2009-06-02 23:24 luofeng225 閱讀(1677) | 評論 (0)編輯 收藏

    Struts.xml

         摘要: 常用,待更新  閱讀全文

    posted @ 2009-05-31 00:16 luofeng225 閱讀(535) | 評論 (0)編輯 收藏

    struts2的struts.properties配置文件詳解

         摘要: Struts 2框架有兩個核心配置文件:
    struts.xml和struts.properties

    其中struts.xml文件主要負責管理應用中的Action映射,以及該Action包含的Result定義等。除此之外,Struts 2框架還包含一個struts.properties文件,該文件定義了Struts 2框架的大量屬性,開發者可以通過改變這些屬性來滿足應用的需求。  閱讀全文

    posted @ 2009-05-30 23:43 luofeng225 閱讀(266) | 評論 (0)編輯 收藏

    傳奇軟件公司Borland被收購

         摘要:   閱讀全文

    posted @ 2009-05-10 19:48 luofeng225 閱讀(280) | 評論 (0)編輯 收藏

    甲骨文CEO埃里森:沒有誰能逃出我的掌握

         摘要:   閱讀全文

    posted @ 2009-05-10 19:44 luofeng225 閱讀(281) | 評論 (0)編輯 收藏

    Yahoo! UI Library簡介

         摘要: Yahoo! User Interface Library(簡稱yui) 是一個使用Javascrīpt編寫的工具和控件庫。它利用DOM腳本,DHTML和AJAX來構造具有豐富交互功能的Web程序。  閱讀全文

    posted @ 2009-05-10 19:20 luofeng225 閱讀(829) | 評論 (0)編輯 收藏

    Apache Commons工具集簡介

         摘要: 常用有 commons-logging,FileUtils,StringUtils,,,,,,,  閱讀全文

    posted @ 2009-05-10 10:20 luofeng225 閱讀(251) | 評論 (0)編輯 收藏

    PL/SQL Developer

         摘要:   閱讀全文

    posted @ 2009-05-08 00:46 luofeng225 閱讀(197) | 評論 (0)編輯 收藏

    object 標簽 -- 在網頁中嵌入除圖片外的多媒體

         摘要: classid -- 關聯一個應用程序,執行嵌入內容的應用程序在windows系統中的唯一id(不能改變此id,否則程序將出現異常),  閱讀全文

    posted @ 2009-05-05 00:02 luofeng225 閱讀(875) | 評論 (0)編輯 收藏

    html dl dt dd 標簽

         摘要: html dl dt dd 標簽  閱讀全文

    posted @ 2009-05-04 23:52 luofeng225 閱讀(3814) | 評論 (1)編輯 收藏

    CRUD

         摘要:   閱讀全文

    posted @ 2009-04-28 20:32 luofeng225 閱讀(211) | 評論 (0)編輯 收藏

    Embed標簽

         摘要:   閱讀全文

    posted @ 2009-04-27 00:13 luofeng225 閱讀(248) | 評論 (0)編輯 收藏

    struts2 strus.xml中result類型及含義(轉)

         摘要:   閱讀全文

    posted @ 2009-04-26 23:08 luofeng225 閱讀(227) | 評論 (0)編輯 收藏

    Struts2 中 Result的 Chain Result,Redirect Action Result,Redirect Result 三者之間的區別

         摘要: Chain Result,Redirect Action Result,Redirect Result 三者之間的區別  閱讀全文

    posted @ 2009-04-26 23:04 luofeng225 閱讀(2648) | 評論 (0)編輯 收藏

    Redirect Action Result

         摘要:   閱讀全文

    posted @ 2009-04-26 22:59 luofeng225 閱讀(448) | 評論 (0)編輯 收藏

    RIA(Rich Internet Applications)富互聯網應用

         摘要: 了解 RIA(Rich Internet Applications)富互聯網應用  閱讀全文

    posted @ 2009-04-26 22:25 luofeng225| 編輯 收藏

    基于Web的打印方案比較分析

         摘要:   閱讀全文

    posted @ 2009-04-23 11:58 luofeng225 閱讀(198) | 評論 (0)編輯 收藏

    推薦一款Java反編譯器,比較好用

         摘要: http://www.tkk7.com/xmatthew/archive/2008/10/28/237203.html  閱讀全文

    posted @ 2009-04-21 19:43 luofeng225 閱讀(397) | 評論 (2)編輯 收藏

    Oracle(甲骨文)宣布以74億美元收購Sun

         摘要:   閱讀全文

    posted @ 2009-04-21 10:10 luofeng225 閱讀(296) | 評論 (0)編輯 收藏

    UltraEdit, 設置語法高亮顯示

         摘要: UltraEdit 是一塊非常知名的編輯器,支持的語法達到100余種。可是,支持這么多的語法,你會配置嗎?  閱讀全文

    posted @ 2009-04-17 23:11 luofeng225 閱讀(8018) | 評論 (1)編輯 收藏

    屬性編輯器

         摘要: 屬性編輯器,自定義屬性編輯器  閱讀全文

    posted @ 2009-04-12 23:35 luofeng225 閱讀(265) | 評論 (0)編輯 收藏

    Spring中bean的基本xml配置

         摘要: 裝配bean的不同設置方式,
      閱讀全文

    posted @ 2009-04-12 23:05 luofeng225 閱讀(924) | 評論 (0)編輯 收藏

    Singleton(單態)

         摘要: Singleton(單態)設計模式  閱讀全文

    posted @ 2009-04-11 01:46 luofeng225 閱讀(221) | 評論 (0)編輯 收藏

    Strategy(策略)

         摘要: Strategy 設計模式  閱讀全文

    posted @ 2009-04-11 01:35 luofeng225 閱讀(199) | 評論 (0)編輯 收藏

    認識設計模式

         摘要: 簡單認識設計模式  閱讀全文

    posted @ 2009-04-11 01:09 luofeng225 閱讀(208) | 評論 (0)編輯 收藏

    關于程序員

         摘要: 軟件程序員尤其需要規劃??!  閱讀全文

    posted @ 2009-04-10 20:13 luofeng225 閱讀(244) | 評論 (0)編輯 收藏

    MD5加密

         摘要:   閱讀全文

    posted @ 2009-04-07 10:54 luofeng225 閱讀(170) | 評論 (0)編輯 收藏

    使用J2SE API讀取Properties文件的六種方法

         摘要: 如題  閱讀全文

    posted @ 2009-04-07 10:16 luofeng225 閱讀(177) | 評論 (0)編輯 收藏

    Perl了解

         摘要:   閱讀全文

    posted @ 2009-04-06 14:45 luofeng225| 編輯 收藏

    InnoDB和MyISAM是在使用MySQL最常用的兩個表類型

         摘要: InnoDB和MyISAM是在使用MySQL最常用的兩個表類型  閱讀全文

    posted @ 2009-04-06 14:34 luofeng225| 編輯 收藏

    IO流大概

         摘要: java IO流基礎  閱讀全文

    posted @ 2009-04-01 00:00 luofeng225 閱讀(204) | 評論 (0)編輯 收藏

    UI,用戶界面User Interface的縮寫

         摘要:   閱讀全文

    posted @ 2009-03-30 23:09 luofeng225 閱讀(745) | 評論 (0)編輯 收藏

    getHibernateTemplate().getSessionFactory().getCurrentSession()

         摘要: 區別

    getHibernateTemplate().getSessionFactory().openSession()

    getHibernateTemplate().getSessionFactory().getCurrentSession()
      閱讀全文

    posted @ 2009-03-29 23:03 luofeng225 閱讀(2705) | 評論 (0)編輯 收藏

    Jbpm

         摘要: 簡單介紹,jBPM,全稱是Java Business Process Management,是一種基于J2EE的輕量級工作流管理系統。  閱讀全文

    posted @ 2009-03-29 17:38 luofeng225 閱讀(474) | 評論 (0)編輯 收藏

    云計算:分布式網絡服務可靠性分析

         摘要: 了解云計算  閱讀全文

    posted @ 2009-03-29 17:33 luofeng225 閱讀(300) | 評論 (0)編輯 收藏

    Spring一些基本概念

         摘要: Aop,Ioc,pointcut,。。  閱讀全文

    posted @ 2009-03-29 11:47 luofeng225 閱讀(204) | 評論 (0)編輯 收藏

    常用的UML圖

         摘要: 簡述最常用的UML圖:用例圖、類圖、序列圖、狀態圖、活動圖、組件圖和部署圖  閱讀全文

    posted @ 2009-03-29 02:00 luofeng225 閱讀(965) | 評論 (0)編輯 收藏

    VO ,PO ,BO,QO, DAO ,POJO,概念

         摘要:   閱讀全文

    posted @ 2009-03-28 16:07 luofeng225 閱讀(14016) | 評論 (1)編輯 收藏

    不定數組

     

    同一種類型的參數,調用前又不知道是幾個?可以考慮定義有一個不定數組的函數(方法)。


    /**
     * 根據hql查詢,直接使用HibernateTemplate的find函數.
     * @param values 可變參數
     */
     public List find(String hql, Object... values) {
      //Assert.hasText(hql);
      return getHibernateTemplate().find(hql, values);
     }

    posted @ 2009-03-28 14:34 luofeng225 閱讀(239) | 評論 (0)編輯 收藏

    group by,order by ,having

         摘要: 區別 group by,order by,having,where  閱讀全文

    posted @ 2009-03-28 14:26 luofeng225 閱讀(3572) | 評論 (0)編輯 收藏

    ==與equals的區別

         摘要: 徹底區別  閱讀全文

    posted @ 2009-03-28 14:24 luofeng225 閱讀(193) | 評論 (0)編輯 收藏

    switch case


    關于java中switch使用的一些說明
    switch(表達式)
    {
    case 常量表達式1:語句1;
    ....
    case 常量表達式2:語句2;
    default:語句;
    }

    default就是如果沒有符合的case就執行它,default并不是必須的.
    case后的語句可以不用大括號.
    switch語句的判斷條件可以接受int,byte,char,short,不能接受其他類型.
    一旦case匹配,就會順序執行后面的程序代碼,而不管后面的case是否匹配,直到遇見break,利用這一特性可以讓好幾個case執

    行統一語句.例如:switch(x){case 1:case 2:case3: System.out.println("haha");                break;case4:

    System.out.println("hehe");}

    posted @ 2009-03-28 14:22 luofeng225 閱讀(162) | 評論 (0)編輯 收藏

    最常用的選擇器

         摘要: 標簽選擇器,id選擇器,類選擇器,群組選擇器,派生選擇器  閱讀全文

    posted @ 2009-03-28 14:17 luofeng225 閱讀(135) | 評論 (0)編輯 收藏

    Css 優先級

    關鍵字: css selector

    CSS樣式定義多了,常常出現顯示效果與預期不一致的情況。其中很大一部分原因在于起作用的樣式。

    1.多個選擇器可能會選擇同一個元素,有3個規則,從上到下重要性降低:
          !important的用戶樣式
          !important的作者樣式
          作者樣式
          用戶樣式
          瀏覽器定義的樣式

    2.
    CSS規范為不同類型的選擇器定義了特殊性權重,特殊性權重越高,樣式會被優先應用。
    權重設定如下:
    html選擇器,權重為1;
    類選擇器,權重為10;
    id選擇器,權重為100;
    這里還有一種情況:在html標簽中直接使用style屬性,這里的style屬性的權重為1000;
    即如下情況:
    #x34y {color:red}
    <.  p id=x34y style="color:green">  優先選擇style=""設定的樣式。

    例子:
    h1{color:blue}  權重為1
    p  em{color:yellow}  權重為2
    .warning{color:red}  權重為10
    p.note em.dark{color:grag}  權重為22
    #main{color:black}  權重為100     這里還有一種情況:
    權重一樣時如何處理?

    3.CSS樣式的層疊原則——誰離我近,誰說了算。
    當權重一樣時,會采用“層疊原則” 后定義的會被應用。
    如:p{color:yellow}
            p{color:red}
    作用到這里   <. p >我的什么顏色呢?< /p>
    結果會是red的。


    4.CSS樣式的特殊標記——誰有特權,誰說了算。
    如果有人看不順眼,非得要自己說了算,那可以搞點特權,如下即可
    p {color:blue !important;}
    加上!important;可將自己權重設為最高。
    http://zjq-blog.javaeye.com/blog/159469

    posted @ 2009-03-28 14:13 luofeng225 閱讀(179) | 評論 (0)編輯 收藏

    js中innerHTML與innerText的用法與區別

    用法:

    <div id="test">
       <span style="color:red">test1</span> test2
    </div>

    在JS中可以使用:

    test.innerHTML:

      也就是從對象的起始位置到終止位置的全部內容,包括Html標簽。

      上例中的test.innerHTML的值也就是“<span style="color:red">test1</span> test2 ”。

    test.innerText: 

      從起始位置到終止位置的內容, 但它去除Html標簽 

      上例中的text.innerTest的值也就是“test1 test2”, 其中span標簽去除了。

    test.outerHTML:

      除了包含innerHTML的全部內容外, 還包含對象標簽本身。

      上例中的text.outerHTML的值也就是<div id="test"><span style="color:red">test1</span> test2</div>


    完整示例:

    <div id="test">
       <span style="color:red">test1</span> test2
    </div>

    <a href="javascript:alert(test.innerHTML)">innerHTML內容</a>
    <a href="javascript:alert(test.innerText)">inerHTML內容</a>
    <a href="javascript:alert(test.outerHTML)">outerHTML內容</a>

    特別說明:

      innerHTML是符合W3C標準的屬性,而innerText只適用于IE瀏覽器,因此,盡可能地去使用innerHTML,而少用innerText,如果要輸出不含HTML標簽的內容,可以使用innerHTML取得包含HTML標簽的內容后,再用正則表達式去除

     

     

    HTML標簽,下面是一個簡單的符合W3C標準的示例:

    <a href="javascript:alert(document.getElementById('test').innerHTML.replace(/<.+?>/gim,''))">無HTML,符合W3C標準</a>

    posted @ 2009-03-28 14:09 luofeng225 閱讀(8441) | 評論 (4)編輯 收藏

    Struts2 iterator標簽集合中元素為數組的顯示

     

  • <s:iterator value="collection1" status="status">  
  •     <s:property value="collection1[#status.index][0]"/>  
  •     <s:property value="collection1[#status.index][1]"/>  
  • </s:iterator>  
  •  

     

    說明:[#status.index][?]" ,指示遍歷數組指定的腳標元素,

    如果你不知道數組的長度呢?
    //以下是遍歷數組每一個元素
    <s:iterator value="total" status="stuts">
         
           <s:iterator value="total[#stuts.index]" >
                     <s:property/><br>    
           </s:iterator>
          
    </s:iterator>
    http://windring.javaeye.com/blog/108170

    posted @ 2009-03-28 14:08 luofeng225 閱讀(2306) | 評論 (1)編輯 收藏

    absolute與relative

    作者小毅的博客:http://andymao.com/ 

    很多朋友問過我absolute與relative怎么區分,怎么用?我們都知道absolute是絕對定位,relative是相對定位,但是這個絕對與相對是什么意思呢?絕對是什么地方的絕對,相對又是相對于什么地方而言的呢?那他們又有什么樣的特性,可以做出什么樣的效果呢?關于兩者之間又有什么樣的技巧呢?下面我們就來一一解讀。

     

     

    Absolute,CSS中的寫法是:position:absolute; 他的意思是絕對定位,他是參照瀏覽器的左上角,配合TOP、RIGHT、BOTTOM、LEFT(下面簡稱TRBL)進行定位,在沒有設定TRBL,默認依據父級的做標原始點為原始點。如果設定TRBL并且父級沒有設定position屬性,那么當前的absolute則以瀏覽器左上角為原始點進行定位,位置將由TRBL決定。

    一般來講,網頁居中的話用Absolute就容易出錯,因為網頁一直是隨著分辨率的大小自動適應的,而Absolute則會以瀏覽器的左上角為原始點,不會應為分辨率的變化而變化位置。很多人出錯就在于這點上出錯。而網頁居左其特性與Relative很相似,但是還是有本質的區別的。

     

     

    Relative,CSS中的寫法是:position:relative;  他的意思是相對定位,他是參照父級的原始點為原始點,無父級則以BODY的原始點為原始點,配合TRBL進行定位,當父級內有padding等CSS屬性時,當前級的原始點則參照父級內容區的原始點進行定位。

    有時我們還需要依靠z-index來設定容器的上下關系,數值越大越在最上面,數值范圍是自然數。當然有一點要注意,父子關系是無法用z-index來設定上下關系的,一定是子級在上父級在下。

    http://www.blueidea.com/tech/web/2006/4249.asp

    posted @ 2009-03-28 14:04 luofeng225 閱讀(152) | 評論 (0)編輯 收藏

    SQL重復記錄查詢

     

    SQL重復記錄查詢


    1、查找表中多余的重復記錄,重復記錄是根據單個字段(peopleId)來判斷
    select * from people
    where peopleId in (select   peopleId from   people group by   peopleId having count (peopleId) > 1)

    2、刪除表中多余的重復記錄,重復記錄是根據單個字段(peopleId)來判斷,只留有rowid最小的記錄
    delete from people
    where peopleId in (select   peopleId from people group by   peopleId   having count (peopleId) > 1)
    and rowid not in (select min(rowid) from   people group by peopleId having count(peopleId )>1)

    3、查找表中多余的重復記錄(多個字段)
    select * from vitae a
    where (a.peopleId,a.seq) in   (select peopleId,seq from vitae group by peopleId,seq having

    count(*) > 1)

    4、刪除表中多余的重復記錄(多個字段),只留有rowid最小的記錄
    delete from vitae a
    where (a.peopleId,a.seq) in   (select peopleId,seq from vitae group by peopleId,seq having count(*) > 1)
    and rowid not in (select min(rowid) from vitae group by peopleId,seq having count(*)>1)

    5、查找表中多余的重復記錄(多個字段),不包含rowid最小的記錄
    select * from vitae a
    where (a.peopleId,a.seq) in   (select peopleId,seq from vitae group by peopleId,seq having

    count(*) > 1)
    and rowid not in (select min(rowid) from vitae group by peopleId,seq having count(*)>1)

    (二)
    比方說
    在A表中存在一個字段“name”,
    而且不同記錄之間的“name”值有可能會相同,
    現在就是需要查詢出在該表中的各記錄之間,“name”值存在重復的項;
    Select Name,Count(*) From A Group By Name Having Count(*) > 1
    如果還查性別也相同大則如下:
    Select Name,sex,Count(*) From A Group By Name,sex Having Count(*) > 1

    (三)
    方法一
    declare @max integer,@id integer
    declare cur_rows cursor local for select
    主字段,count(*) from 表名 group by 主字段 having

    count(*) >; 1
    open cur_rows
    fetch cur_rows into @id,@max
    while @@fetch_status=0
    begin
    select @max = @max -1
    set rowcount @max
    delete from 表名 where 主字段 = @id
    fetch cur_rows into @id,@max
    end
    close cur_rows
    set rowcount 0

    方法二

    有兩個意義上的重復記錄,一是完全重復的記錄,也即所有字段均重復的記錄,

    二是部分關鍵字段重復的記錄,比如Name字段重復,而其他字段不一定重復或都重復可以忽略。

      1、對于第一種重復,比較容易解決,使用
    select distinct * from tableName

      就可以得到無重復記錄的結果集。

      如果該表需要刪除重復的記錄(重復記錄保留1條),可以按以下方法刪除
    select distinct * into #Tmp from tableName
    drop table tableName
    select * into tableName from #Tmp
    drop table #Tmp

      發生這種重復的原因是表設計不周產生的,增加唯一索引列即可解決。

      2、這類重復問題通常要求保留重復記錄中的第一條記錄,操作方法如下

      假設有重復的字段為Name,Address,要求得到這兩個字段唯一的結果集
    select identity(int,1,1) as autoID, * into #Tmp from tableName
    select min(autoID) as autoID into #Tmp2 from #Tmp group by Name,autoID
    select * from #Tmp where autoID in(select autoID from #tmp2)

      最后一個select即得到了Name,Address不重復的結果集(但多了一個autoID字段,實際寫時可以寫

    在select子句中省去此列)

    (四)查詢重復
    select * from tablename

    where id in (select id from tablename group by id having count(id) > 1)

                                                                --from 網絡

    http://hi.baidu.com/zeronet/blog/item/27c41046d2c0060a6b63e596.html

    posted @ 2009-03-28 13:03 luofeng225 閱讀(1430) | 評論 (0)編輯 收藏

    Spring雜記


    這兩個包區別,開始一直沒注意。

    org.springframework.orm.hibernate3???????????? Package providing integration of Hibernate3 with Spring concepts.
    org.springframework.orm.hibernate???????? Package providing integration of Hibernate 2.1 with Spring concepts.

    最后說一點,由于hibernate進行了一次版本更新,因此存在hibernate3和hibernate兩個包(如:import org.springframework.orm.hibernate3.support.HibernateDaoSupport;)。用hibernate3.x,一定使用hibernate3包。


    http://doc.javanb.com/spring-framework-reference-zh-2-0-5/ch12s02.html

    posted @ 2009-03-27 14:34 luofeng225 閱讀(171) | 評論 (0)編輯 收藏

    <2009年3月>
    22232425262728
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234

    導航

    統計

    公告

    我曾經聽到這么一個故事: 一個年輕的程序員問一個老程序員(一個比較牛逼的公司的CTO) 年輕程序員: 你為什么這么牛X., 就好像沒有你不會的。老程序員: 積累的。年輕程序員: 怎么才能積累到您的程度呢。我每天都在積累。但是似乎都沒有感覺到進步。老程序員: 我從20歲開始做到了一件事情,直到今天,而且盡可能地保證不間斷。年輕程序員: 到底是什么? 老程序員: 我每天保證自己有2個小時在學習新的東西。

    常用鏈接

    留言簿(3)

    隨筆分類

    隨筆檔案

    文章分類

    相冊

    收藏夾

    Java Website

    java技術博客

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲国产91在线| 永久免费AV无码国产网站| 亚洲免费人成视频观看| 久久亚洲AV无码西西人体| 成人免费福利电影| **aaaaa毛片免费| 免费播放在线日本感人片| 免费无遮挡无遮羞在线看| 日韩亚洲国产高清免费视频| 久久久久亚洲av无码专区| 久久久久亚洲AV无码专区网站| 四虎www免费人成| 99re热免费精品视频观看| 免费A级毛片av无码| 国产免费一区二区三区在线观看| 男人j进女人p免费视频| 风间由美在线亚洲一区| 国产成+人+综合+亚洲专| 亚洲最大黄色网站| 亚洲美女在线观看播放| 亚洲一区免费观看| 亚洲va无码va在线va天堂| 中文字幕日韩亚洲| 亚洲日韩在线观看| 亚洲国产av无码精品| 亚洲电影日韩精品| 亚洲精品高清在线| 亚洲精品亚洲人成在线观看下载| 四虎影视精品永久免费网站| 日韩午夜免费视频| 国产在线98福利播放视频免费| 全免费a级毛片免费看无码| 午夜成年女人毛片免费观看| 黄页网站免费观看| 欧美日韩国产免费一区二区三区| 国产高清不卡免费在线| 91香蕉成人免费网站| 男人的好看免费观看在线视频 | 日本不卡高清中文字幕免费| 全免费一级毛片在线播放| 国产午夜影视大全免费观看 |