Dev@Free

          zJun's Tech Weblog

               摘要: Java Socket簡單入門例子.  閱讀全文
          posted @ 2007-07-24 19:01 zJun's帛羅閣 閱讀(2300) | 評論 (1)編輯 收藏
          摘自: ziyang之窩


          有兩個表:

          Menu,Privilege,他們是多對多關系,有一個中間表menu_privilege,在Menu中有privileges List字段,而在privilege中則沒有menu List字段,因為privilege不想依賴于Menu。但我們要根據Privilege得到其所有的Menu,則HQL應該這樣寫:

          Query?query? = ?session.createQuery( " select?menu?from?Menu?menu?left?join?menu.privileges?p?where?p.id=:id " );
          ????????????????
          query.setParameter(
          " id "
          ,?privilege.getId());
          return
          ?query.list();
          posted @ 2007-07-24 18:22 zJun's帛羅閣 閱讀(2510) | 評論 (0)編輯 收藏
          Dear all:
          result love(boy, girl)
          {
            if ( boy.有房() and boy.有車() )
             {boy.set(nothing);
              return girl.嫁給(boy); }
            if ( girl.愿意等() )
            {
          while( ! (boy.賺錢 > 100,000 and girl.感情 > 8 )
             {for ( day=1; day <=365; day++)
              {if ( day == 情人節 )
               if ( boy.give girl(玫瑰) )
                girl.感情++;
               else
                girl.感情--;
               if( day == girl.生日)
               if ( boy.give girl(玫瑰) )
                girl.感情++;
               else
                girl.感情--;
                boy.拼命賺錢();
                }
               }

            if ( boy.有房() and boy.有車() )
             { boy.set(nothing);
           return girl.嫁給(boy);
           }
              年齡++;
             girl.感情--;
            return girl.goto( another_boy);
          }

          (注:稍懂點C語言的應該都能看懂吧!)
          posted @ 2007-03-09 14:03 zJun's帛羅閣 閱讀(928) | 評論 (1)編輯 收藏
               摘要: 組件(Component)類必須在類一級定義@Embeddable注解.

          在特定的實體的關聯屬性上使@Embedded和@AttributeOverride注解可以覆蓋該屬性對應的嵌入式對象的字段映射:  閱讀全文
          posted @ 2007-03-07 16:17 zJun's帛羅閣 閱讀(3015) | 評論 (0)編輯 收藏
               摘要: 1.簡單主鍵:
          使用@Id注解可以將實體bean中的某個屬性定義為標識字段.使用 @GeneratedValue注解可以定義標識字段的生成策略:

          AUTO - 可以是identity類型的字段,或者sequence類型或者table類型,取決于不同的底層數據庫.
          TABLE - 使用表保存id值
          IDENTITY - identity字段
          SEQUENCE - sequence  閱讀全文
          posted @ 2007-03-07 15:49 zJun's帛羅閣 閱讀(2554) | 評論 (0)編輯 收藏
               摘要: 1. 基本屬性映射
          通過 @Basic 可以聲明屬性的存取策略:
          @Basic(fetch=FetchType.EAGER) 即時獲取(默認的存取策略)
          @Basic(fetch=FetchType.LAZY) 延遲獲取  閱讀全文
          posted @ 2007-03-07 15:13 zJun's帛羅閣 閱讀(2102) | 評論 (0)編輯 收藏
               摘要: Displaytag1.1支持在外部實現大數據量分頁。主要有兩種方式實現:

          Displaytag 1.1 offers two alternative ways for working with partial lists:

          the first one uses the valuelist pattern, and requires that the object that you give to displaytag implements the org.displaytag.pagination.PaginatedList interface. You can pass this object to displaytag as an usual list, and it will extract paging and sorting information from it. This way is more recommended if you have to build your backend layer and you can easily  閱讀全文
          posted @ 2007-02-08 11:35 zJun's帛羅閣 閱讀(7451) | 評論 (20)編輯 收藏

          1.打開 Google主頁

          2.把瀏覽器地址欄清空,再將下面的內容復制到地址欄內:

          javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

          3.回車....

          posted @ 2007-02-02 14:41 zJun's帛羅閣 閱讀(732) | 評論 (0)編輯 收藏
               摘要: Launchy,一款免費開源軟件實現了鍵盤快捷啟動程序的功能。

          你只需要輸入程序的名稱,Launchy就可以自動幫你匹配出你想要運行的程序:  閱讀全文
          posted @ 2007-02-02 14:36 zJun's帛羅閣 閱讀(1133) | 評論 (0)編輯 收藏
               摘要: Table
          Table用來定義entity主表的name,catalog,schema等屬性。
          元數據屬性說明:
          name: 表名
          catalog: 對應關系數據庫中的catalog
          schema:對應關系數據庫中的schema
          UniqueConstraints:定義一個UniqueConstraint數組,指定需要建唯一約束的列   閱讀全文
          posted @ 2007-01-24 15:46 zJun's帛羅閣 閱讀(21988) | 評論 (0)編輯 收藏
               摘要: Apache的Jakata項目的POI子項目,目標是處理ole2對象。 POI可以到 http://www.apache.org/dyn/closer.cgi/jakarta/poi/ 下載。...  閱讀全文
          posted @ 2007-01-22 17:59 zJun's帛羅閣 閱讀(22235) | 評論 (6)編輯 收藏
               摘要: 方法一:循環元素刪除
          方法二:通過HashSet剔除
          方法三:刪除ArrayList中重復元素,保持順序  閱讀全文
          posted @ 2007-01-18 13:48 zJun's帛羅閣 閱讀(4639) | 評論 (0)編輯 收藏
          更新列表: http://dev.rubyonrails.org/browser/spinoffs/prototype/CHANGELOG

           下載:  http://dev.rubyonrails.org/browser/trunk/railties/html/javascripts/prototype.js
          posted @ 2007-01-17 18:01 zJun's帛羅閣 閱讀(762) | 評論 (0)編輯 收藏
               摘要: As per the documentation on MySQL I moved the storage of passwords from using Password() to using MD5(). I read a number of places that stated that this was a method that couldn't be reversed and it was far more secure than the previous method. I was feeling confident that life was about to get a little more secure. While going through my daily RSS feeds and mailing lists for SpikeSource, I happenned upon a thread about someone discussing how easy it was to break MD5 hashes. It was a simple matt  閱讀全文
          posted @ 2007-01-17 16:22 zJun's帛羅閣 閱讀(2593) | 評論 (0)編輯 收藏
               摘要: name="resultList" 將記錄集存在session或者request中的鍵值
          pagesize="100" 每頁顯示100條數據
          sort="external" 外部排序
          id="row" 表格id值,用于程序得相關的參數
          partialList="true" 分段從數據庫中讀數據
          size="resultSize" 記錄的總條數,用于計算總頁數  閱讀全文
          posted @ 2007-01-17 15:04 zJun's帛羅閣 閱讀(5304) | 評論 (3)編輯 收藏
               摘要: Apache jakarta 各項目主要用途及簡單說明 來源出處:http://www.javaworld.com.tw/jute/post/view?bid=11&id=1672 為了讓大...  閱讀全文
          posted @ 2007-01-16 17:07 zJun's帛羅閣 閱讀(1433) | 評論 (0)編輯 收藏
          一定得是N層結構,
          層數越多越好,層少了用戶會誤會我們不重視,
          什么數據訪問層呀,實體控制層啊,能給他加上的全加上。
              
          程序員一定都得是老鳥,30以下基本不考慮,
          還得清一色的外企空降兵,
          都有10年以上編程經驗的那種,用過的語言越多越好,
          編程都不帶查MSDN的,牛吧!
          程序員個個都配IBM筆記本,
          CPU要3G以上的,內存硬盤和屏幕都要最大的,
          擴展槽別剩下,能插上的全插上。
          能安的操作系統全安上,開機一屏幕上就一堆系統等你選,
          倍有面子!
              
          系統平臺就得是J2EE,人家競爭對手除了C++就是JAVA,
          你要用一.NET都不好意思和別人打招呼。
          你說這樣的系統設計出來得賣多少錢?
          我覺得怎么也得100萬吧?
          100萬,那是單機版!
          1000萬起!
          你還別嫌太貴,還不免實施服務費。
          你得研究有錢用戶得心理,
          愿意花1000萬買這套軟件用的,
          根本不在乎再多花上幾百萬!
              
          什么叫軟件泡沫你知道么?
          軟件泡沫就是做都做最復雜的,
          用就得用最貴的,還得特難用,顯得用戶水平高。
          所以我們搞軟件的口號就是:
          不求好用,但求費勁!
          posted @ 2007-01-12 17:36 zJun's帛羅閣 閱讀(499) | 評論 (0)編輯 收藏
               摘要: 參考文檔:使用 Spring 更好地處理 Struts 動作

          可以通過三種方式實現Spring管理Struts Action:
          1.使用 Spring 的 ActionSupport 類整合 Structs
          2.使用 Spring 的 DelegatingRequestProcessor 覆蓋 Struts 的 RequestProcessor
          3.將 Struts Action 管理委托給 Spring 框架   閱讀全文
          posted @ 2007-01-08 16:57 zJun's帛羅閣 閱讀(1846) | 評論 (0)編輯 收藏
               摘要: DCBP連接池的簡單使用方法。  閱讀全文
          posted @ 2006-11-10 13:49 zJun's帛羅閣 閱讀(1225) | 評論 (3)編輯 收藏
               摘要: 元字符及其在正則表達式中行為的列表  閱讀全文
          posted @ 2006-10-11 13:52 zJun's帛羅閣 閱讀(2265) | 評論 (0)編輯 收藏
          僅列出標題
          共5頁: 上一頁 1 2 3 4 5 下一頁 

          導航

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          統計

          常用鏈接

          留言簿(15)

          隨筆分類

          隨筆檔案

          相冊

          收藏夾

          博客

          文檔

          站點

          論壇

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 密山市| 寻乌县| 达州市| 大庆市| 搜索| 利川市| 西充县| 集贤县| 方城县| 宁南县| 临安市| 乐业县| 彝良县| 尉犁县| 丹凤县| 尼木县| 林周县| 壶关县| 右玉县| 石泉县| 溆浦县| 德清县| 宽甸| 鹰潭市| 托里县| 忻城县| 上饶市| 津南区| 田阳县| 尚义县| 定南县| 黄陵县| 武平县| 疏附县| 龙江县| 浦城县| 祁东县| 晴隆县| 会泽县| 通渭县| 岚皋县|