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

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

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

    Dev@Free

    zJun's Tech Weblog

    2006年8月14日

    http://ubuntu.dormforce.net/

    Ubuntu 12.04 Precise Pangolin:

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

    使用說明
    打開Software Manager,點擊Edit⇒Software Sources
    在Download from中選擇Other
    選擇China⇒mirrors.ustc.edu.cn
    點擊Choose Server
    posted @ 2012-06-05 00:55 zJun's帛羅閣 閱讀(1119) | 評論 (0)編輯 收藏
    a wonderful Eclipse plugin:  WindowBuilder, which can be used to develope Swing/SWT UI:

    WindowBuilder is built as a plug-in to Eclipse and the various Eclipse-based IDEs (RAD, RSA, MyEclipse, JBuilder, etc.). The plug-in builds an abstract syntax tree (AST) to navigate the source code and uses GEF to display and manage the visual presentation.

    Develop Java graphical user interfaces in minutes for Swing, SWT, RCP and XWT with WindowBuilder Pro's WYSIWYG, drag-and-drop interface. Use wizards, editors and intelligent layout assist to automatically generate clean Java code, with the visual design and source always in sync.

    The project website: http://www.eclipse.org/windowbuilder/

    To install the plugin in Eclipse: http://www.eclipse.org/windowbuilder/download.php

    posted @ 2012-05-31 18:44 zJun's帛羅閣 閱讀(600) | 評論 (0)編輯 收藏
    Example:
    abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452
    aer 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452

    UNIX:

    display the no of occurance and the record
    > sort f1.txt|uniq -c
       2 abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
       1 aer 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
       2 tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452

    display only the duplicate records
    > sort f1.txt|uniq -d
    abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452

    display distinct records
    > sort f1.txt|uniq
    abc 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    aer 1000 3452 2463 2343 2176 7654 3452 8765 5643 3452
    tas 3420 3562 2123 1343 2176 7654 3252 8765 5643 3452

    Reference:
    How to find Duplicate Records in a text file
    Shell: How To Remove Duplicate Text Lines

    Windows:

    Notepad++ can sort by line, and remove the duplicate lines at the same time.
    1. Open the menu under: TextFX-->TextFX Tools
    2. Make sure "sort outputs only unique..." is checked
    3. select a block of text (ctrl-a to select the entire document).
    4. click "sort lines case sensitive" or "sort lines case insensitive"

    posted @ 2012-04-11 12:10 zJun's帛羅閣 閱讀(472) | 評論 (0)編輯 收藏

    1.安裝JAVA環境

    sudo apt-get install sun-java5-jre

    2.下載tomcat: http://tomcat.apache.org/

    3.解壓tomcat

    $sudo tar zxvf apache-tomcat-7.0.26.tar.gz -C /opt
    $sudo mv /opt/apache-tomcat-7.0.26.tar.gz /opt/tomcat

    4.啟動tomcat

    $sudo /opt/tomcat/bin/startup.sh

    如果能看到下列提示,就表明啟動成功了!

    >Using CATALINA_BASE: /opt/tomcat
    >Using CATALINA_HOME: /opt/tomcat
    >Using CATALINA_TMPDIR: /opt/tomcat/temp
    >Using JRE_HOME: /usr/lib/j2sdk1.5-sun

    打開Firefox,在地址欄中輸入http://localhost:8080,如果出來Tomcat的缺省界面,說明測試通過!

    5.停止Tomcat服務

    $sudo /opt/tomcat/bin/shutdown.sh

    posted @ 2012-03-28 01:18 zJun's帛羅閣 閱讀(709) | 評論 (0)編輯 收藏
    1.下載安裝 RubyInstaller: http://rubyforge.org/frs/?group_id=167&release_id=46588

    2. 檢查 RubyGems 版本,須高于 1.3.6
    gem -v
    3.如果版本不是最新,可以通過下面的命令更新至最新版本:
    gem update --system
    gem uninstall rubygems-update
    4.安裝 Rails:
    gem install rails
    posted @ 2012-03-27 18:30 zJun's帛羅閣 閱讀(807) | 評論 (0)編輯 收藏
    1.按照github上的指南配置(http://help.github.com/win-set-up-git/)基礎的git環境。

    2.在github上創建一個Repository。

    3.在Eclipse中通過“Eclipse Marketplaces”,在Market Places里安裝egit。

    4.在Eclipse中生public key, 并添加到GitHub Repository中。
    Eclipse中通過:performance -> SSH2 -> Key Management -> Gernerate RSA Key 生成 SSH 的 public key。
    在GitHub中通過:edit your profile -> ssh key -> Add SSH Key 添加SSH Key, 把上面生成的 public key 拷貝到這里,保存。

    5.Eclipse里File菜單,Import,即可從git導入剛添加到git的項目了。

    6.修改,并提交。在項目上點右鍵–>team–>commit。commit是commit到本機的git庫,而push才是同步到github。
    posted @ 2012-03-27 01:16 zJun's帛羅閣 閱讀(3016) | 評論 (0)編輯 收藏
    1.下載最新版 Eclipse:
    官方下載:http://www.eclipse.org/downloads/

    2.解壓下載的壓縮包:
    $sudo tar xvfz eclipse-SDK-3.1.2-linux-gtk.tar.gz -C /opt

    這個時候,就可以在 /opt 文件夾中看到出現了一個eclipse的文件夾,雙擊其中的eclipse文件就可以運行eclipse了。

    3.在菜單設置Eclipse選項:
    $gedit ~/.local/share/applications/eclipse-user.desktop

    插入一下內容:
    [Desktop Entry]
    Comment=Java IDE
    Name=Eclipse
    Exec=/opt/eclipse/eclipse
    Encoding=UTF-8
    Terminal=false
    Type=Application
    Categories=Application;Development;
    Icon=/opt/eclipse/icon.xpm

    posted @ 2012-03-27 01:00 zJun's帛羅閣 閱讀(640) | 評論 (0)編輯 收藏

    方法1: 用SET PASSWORD命令

      mysql -u root

      mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');

    方法2:用mysqladmin

      mysqladmin -u root password "newpass"

      如果root已經設置過密碼,采用如下方法

      mysqladmin -u root password oldpass "newpass"

    方法3: 用UPDATE直接編輯user表

      mysql -u root

      mysql> use mysql;

      mysql> UPDATE user SET Password = PASSWORD('newpass') WHERE user = 'root';

      mysql> FLUSH PRIVILEGES;

    方法4: 在丟失root密碼的時候,可以這樣

      mysqld_safe --skip-grant-tables&

      mysql -u root mysql

      mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root';

      mysql> FLUSH PRIVILEGES;

    ---------------------------------------

    經測試,方法三修改成功,其他三種方法沒有測試。

    posted @ 2012-03-17 22:53 zJun's帛羅閣 閱讀(515) | 評論 (0)編輯 收藏

    一.問題環境:
      Eclipse3.4 + Tomcat6.0.20
    二.問題現象:
      在Eclipse下啟動Tomcat6時,控制臺會有下面警告信息
      警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:...' did not find a matching property.
    三.詳細解決辦法:
       1.打開服務器視圖:窗口 > 顯示視圖 > 服務器 > 服務器
       2.雙擊服務器列表中的Tomcat,打開“服務器概述”窗口
       3.選中"Publish module contexts to separate XML files"選項。
       小提示:如果Tomcat處于啟動狀態,請先停止,否則,在保存服務器設置時,提示不能保存。

    posted @ 2012-03-17 22:52 zJun's帛羅閣 閱讀(851) | 評論 (0)編輯 收藏

    Here is a simple way to generate a analyze report by using FindBugs plugins in RSA:

    • Using FindBugs to scan the code and save the result as XML file
    • the XML report is in a bad format for reading, we can use XSL file to make it easy and clear to read:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="summary.xsl"?>
    • Use Internet Explore to open the XML report, now we get a report:
    Note: FindBugs provided following xsl files for different format:

    1、default.xsl;
    2、fancy.xsl;
    3、fancy-hist.xsl;
    4、plain.xsl;
    5、summary.xsl;

    posted @ 2012-03-17 22:46 zJun's帛羅閣 閱讀(459) | 評論 (0)編輯 收藏
         摘要: GZIP
    1. Compressing a File in the GZIP Format
    2. Uncompressing a File in the GZIP Format

    ZIP
    1. Creating a ZIP File
    2. Listing the Contents of a ZIP File
    3. Retrieving a Compressed File from a ZIP File   閱讀全文
    posted @ 2008-06-03 23:02 zJun's帛羅閣 閱讀(1348) | 評論 (1)編輯 收藏
         摘要: 使用 JSEclipse,JavaScript 程序員現在有了自己的 Eclipse 插件,該插件將提供許多重要功能來輔助開發 JavaScript 應用程序。像 Eclipse 多年來為 Java? 語言和其他語言提供了易用性一樣,JSEclipse 為 JavaScript 開發人員提供了同樣的優點。  閱讀全文
    posted @ 2008-01-29 17:20 zJun's帛羅閣 閱讀(12365) | 評論 (1)編輯 收藏
    分享一個不錯的編寫properties文件的Eclipse插件(plugin),有了它我們在編輯一些簡體中文、繁體中文等 Unicode文本時,就不必再使用native2ascii編碼了。您可以通過Eclipse中的軟件升級(Software Update)安裝此插件,步驟如下:
    1、展開Eclipse的Help菜單,將鼠標移到Software Update子項,在出現的子菜單中點擊Find and Install;
    2、在Install/Update對話框中選擇Search for new features to install,點擊Next;
    3、在Install對話框中點擊New Remote Site;
    4、在New Update Site對話框的Name填入“PropEdit”或其它任意非空字符串,在URL中填入http://propedit.sourceforge.jp/eclipse/updates/;
    5、在Site to include to search列表中,除上一步加入的site外的其它選項去掉,點擊Finsih;
    6、在彈出的Updates對話框中的Select the features to install列表中將所有結尾為“3.1.x”的選項去掉(適用于Eclipse 3.2版本的朋友);
    7、點擊Finish關閉對話框;
    8、在下載后,同意安裝,再按提示重啟Eclipse,在工具條看到形似vi的按鈕表示安裝成功,插件可用。此時,Eclpise中所有properties文件的文件名前有綠色的P的圖標作為標識。
    posted @ 2008-01-24 22:41 zJun's帛羅閣 閱讀(21910) | 評論 (4)編輯 收藏
         摘要: 在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files錯誤.....,查找的解決辦法如下:  閱讀全文
    posted @ 2007-10-16 20:55 zJun's帛羅閣 閱讀(100578) | 評論 (3)編輯 收藏
         摘要: 要對資料庫管理系統進行操作,最基本的就是使用SQL(Standard Query Language)語句,大部份的資料庫都支援標準的SQL語句,然而也有一些特定於資料庫的SQL語句,應用程式配合SQL語句進行資料庫查詢時,若使用到特定於資料庫的SQL語句,程式本身會有相依於特定資料庫的問題。

    使用Hibernate時,即使您不了解SQL的使用與撰寫,也可以使用它所提供的API來進行SQL語句查詢,org.hibernate.Criteria對SQL進行封裝,您可以從Java物件的觀點來組合各種查詢條件,由Hibernate自動為您產生SQL語句,而不用特別管理SQL與資料庫相依的問題。  閱讀全文
    posted @ 2007-10-11 16:22 zJun's帛羅閣 閱讀(15460) | 評論 (0)編輯 收藏

    整理自: SpringSide中文論壇


    實際執行任務的Class: CourseService
    public ? class ?CourseService? {?

    ??
    public ? void ?sendCourseEnrollmentReport()
    {?
    ????System.out.println(
    " HelloWorld "
    );?
    ??}
    ?

    }

    調度任務的Class: TaskApp
    import ?org.springframework.beans.factory.BeanFactory;?
    import
    ?org.springframework.beans.factory.xml.XmlBeanFactory;?
    import
    ?org.springframework.core.io.FileSystemResource;?

    public ? class ?TaskApp?
    {?

    ??
    public ? static ? void ?main(String[]?args)? throws ?Exception?
    {?
    ????BeanFactory?factory?
    = ? new ?XmlBeanFactory( new ?FileSystemResource(? " WebRoot/WEB-INF/classes/scheduleTask.xml "
    ));?
    ????factory.getBean(
    " z "
    );?
    ??}
    ?
    ????
    }
    ?

    配置調度執行任務的配置文件: scheduleTask.xml
    <? xml?version="1.0"?encoding="UTF-8" ?> ?
    <! DOCTYPE?beans?PUBLIC?"-//SPRING//DTD?BEAN//EN"?"http://www.springframework.org/dtd/spring-beans.dtd" >
    ?
    < beans >
    ?
    ??
    <!-- 起動Bean -->
    ?
    ??
    < bean? id ="z" ?class ="org.springframework.scheduling.quartz.SchedulerFactoryBean" >
    ?
    ????
    < property? name ="triggers" >
    ?
    ??????
    < list >
    ?
    ????
    < ref? bean ="cronReportTrigger" ? />
    ?
    ??????
    </ list >
    ?
    ????
    </ property >
    ?
    ??
    </ bean >
    ?
    ??
    <!-- 實際的工作Bean -->
    ?
    ??
    < bean? id ="courseService" ?class ="CourseService" >

    ??
    </ bean > ?
    ??
    <!-- jobBean用于設定啟動時運用的Bean與方法 -->
    ?
    ??
    < bean? id ="scheduledReportJobDetail" ?class ="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" >
    ?
    ????
    < property? name ="targetObject" >
    ?
    ????
    < ref? bean ="courseService" ? />
    ?
    ????
    </ property >
    ?
    ????
    < property? name ="targetMethod" >
    ?
    ??????
    < value > sendCourseEnrollmentReport </ value >
    ?
    ????
    </ property >
    ?
    ??
    </ bean >
    ?
    ??
    <!-- 定時器設定起動頻率&啟動時間我設的是每5秒起動一次?(0?0?4?*?*??每日四點起動.) -->
    ?
    ??
    < bean? id ="cronReportTrigger" ?class ="org.springframework.scheduling.quartz.CronTriggerBean" >
    ?
    ????
    < property? name ="jobDetail" >
    ?
    ????
    < ref? bean ="scheduledReportJobDetail" ? />
    ?
    ????
    </ property >
    ?
    ????
    < property? name ="cronExpression" >
    ?
    ??????
    < value > 10,15,20,25,30,35,40,45,50,55?*?*?*?*?? </ value >
    ?
    ????
    </ property >
    ?
    ??
    </ bean >
    ?
    </ beans >

    關于配置文件中參數cronExpression的說明:
    字段?允許值?允許的特殊字符?
    秒?
    0 - 59 ? ,
    ?-?*?/?
    分?
    0 - 59 ? ,
    ?-?*?/?
    小時?
    0 - 23 ? ,
    ?-?*?/?
    日期?
    1 - 31 ? ,
    ?-?*???/?L?W?C?
    月份?
    1 - 12 ?或者?JAN-DEC? ,
    ?-?*?/?
    星期?
    1 - 7 ?或者?SUN-SAT? ,
    ?-?*???/?L?C?#?
    年(可選)?留空
    , ? 1970 - 2099 ? , ?-?*?/?

    表達式意義:
    " 0?0?12?*?*?? " ?每天中午12點觸發?
    " 0?15?10???*?* "
    ?每天上午10:15觸發?
    " 0?15?10?*?*?? "
    ?每天上午10:15觸發?
    " 0?15?10?*?*???* "
    ?每天上午10:15觸發?
    " 0?15?10?*?*???2005 "
    ?2005年的每天上午10:15觸發?
    " 0?*?14?*?*?? "
    ?在每天下午2點到下午2:59期間的每1分鐘觸發?
    " 0?0/5?14?*?*?? "
    ?在每天下午2點到下午2:55期間的每5分鐘觸發?
    " 0?0/5?14,18?*?*?? "
    ?在每天下午2點到2:55期間和下午6點到6:55期間的每5分鐘觸發?
    " 0?0-5?14?*?*?? "
    ?在每天下午2點到下午2:05期間的每1分鐘觸發?
    " 0?10,44?14???3?WED "
    ?每年三月的星期三的下午2:10和2:44觸發?
    " 0?15?10???*?MON-FRI "
    ?周一至周五的上午10:15觸發?
    " 0?15?10?15?*?? "
    ?每月15日上午10:15觸發?
    " 0?15?10?L?*?? "
    ?每月最后一日的上午10:15觸發?
    " 0?15?10???*?6L "
    ?每月的最后一個星期五上午10:15觸發?
    " 0?15?10???*?6L?2002-2005 "
    ?2002年至2005年的每月的最后一個星期五上午10:15觸發?
    " 0?15?10???*?6#3 "
    ?每月的第三個星期五上午10:15觸發?
    0 ? 6
    ?*?*?*??????????每天早上6點??
    0 ?*/ 2
    ?*?*?*????????每兩個小時??
    0 ? 23 - 7 / 2 8
    ?*?*?*??晚上11點到早上8點之間每兩個小時,早上八點??
    0 ? 11 ? 4 ?*? 1 - 3
    ???????每個月的4號和每個禮拜的禮拜一到禮拜三的早上11點??
    0 ? 4 ? 1 ? 1 ?*??????????1月1日早上4點?

    Download:
    Quartz

    相關文檔:
    http://blog.csdn.net/ezerg/archive/2004/09/24/115894.aspx
    http://blog.csdn.net/yujiebo025/archive/2005/09/13/479049.aspx
    http://blog.csdn.net/mengz/archive/2005/01/13/252267.aspx
    http://blog.csdn.net/jorwang/archive/2005/05/12/374111.aspx
    http://blog.csdn.net/Mailbomb/archive/2005/10/26/517128.aspx
    http://blog.csdn.net/stonecai/archive/2007/01/06/1475745.aspx
    http://landerchan.spaces.live.com/Blog/cns!8759A7C5A9737DC!116.entry
    http://hanxinyu.javaeye.com/blog/37000
    http://www.onjava.com/pub/a/onjava/2004/03/10/quartz.html
    posted @ 2007-09-05 19:40 zJun's帛羅閣 閱讀(3831) | 評論 (0)編輯 收藏
         摘要: JDK 5 新增一些特性來簡化開發,這些特性包括泛型,for-each 循環,自動裝包/拆包,枚舉,可變參數, 靜態導入 。使用這些特性有助于我們編寫更加清晰,精悍,安全的代碼。  閱讀全文
    posted @ 2007-08-17 23:27 zJun's帛羅閣 閱讀(880) | 評論 (0)編輯 收藏
    < ec:table  items ="itemList"  var ="item"  action ="${pageContext.request.contextPath}/query.do"
    retrieveRowsCallback
    ="limit"  
    filterRowsCallback
    ="limit"
     
    sortRowsCallback
    ="limit"
      >

     
    < ec:exportXls  fileName ="CouponList.xls"  tooltip ="導出 Excel" />
    < ec:row >
        
    < ec:column  property ="rowcount"  cell ="rowCount"  sortable ="false"  title ="序號" />
        
    < ec:column  property ="id"  title ="編號" />
        
    < ec:column  property ="type"  title ="種類" >
              ${typeMap[item.type]}
        
    </ ec:column >
        
    < ec:column  property ="name"  title ="名稱" />
        
    < ec:column  property ="beginDate"  title ="開始時間"  cell ="calendar"  format ="date"   />
        
    < ec:column  property ="endDate"  title ="結束時間"  cell ="calendar"  format ="date"   />
        
    < ec:column  property ="state"  title ="狀態" >
            ${statusmap[coupon.status]}
        
    </ ec:column >
        
    < ec:column  property ="edit"  title ="操作"  sortable ="false"  viewsAllowed ="html"
                           style
    ="width: 56px;text-align: center" >
                    
    < href ="<c:url value=" /security/user.do?method =selectRoles&userId=${user.id}"  /> ">  < img
                            
    src ="<c:url value=" /images/icon/16x16/manage.gif" /> " border="0"/>  </ A >

                
    </ ec:column >
            
    </ ec:row >
        
    </ ec:table >

    其中:
         
    retrieveRowsCallback="limit"
         filterRowsCallback="limit"
         sortRowsCallback="limit"
    指定了callback函數 limit

    在controller 中的處理:
      /**
      * 列表查看
    */

    protected   void  onList(HttpServletRequest request,HttpServletResponse response, ModelAndView mav)  throws  Exception  {
       Limit limit 
    =
     ExtremeTablePage.getLimit(request);
       Map map 
    =  WebUtils.getParametersStartingWith(request,  " search_ "
    );
       Page page
    =
    service.queryForPage(map,ExtremeTablePage.getSort(limit),limit.getPage(), limit.getCurrentRowsDisplayed());
       mav.addObject(
    " itemList "
    , page.getResult());
       mav.addObject(
    " totalRows "
    ,page.getTotalCount());
    }
    posted @ 2007-08-08 00:02 zJun's帛羅閣 閱讀(2723) | 評論 (1)編輯 收藏
    摘自: chinaunix

    SELECT ??S.SID?SESSION_ID,?S.USERNAME,?DECODE(LMODE,? 0 ,? ' None ' ,? 1 ,? ' Null ' ,? 2 ,? ' Row-S?(SS) ' ,? 3 ,? ' Row-X?(SX) ' ,?? 4 ,? ' Share ' ,? 5 ,? ' S/Row-X?(SSX) ' ,?? 6 ,? ' Exclusive ' ,?TO_CHAR(LMODE))?MODE_HELD,?DECODE(REQUEST,? 0 ,? ' None ' ,? 1 ,? ' Null ' ,? 2 ,? ' Row-S?(SS) ' ,? 3 ,? ' Row-X?(SX) ' ,? 4 ,? ' Share ' ,? 5 ,? ' S/Row-X?(SSX) ' ,? 6 ,? ' Exclusive ' ,?TO_CHAR(REQUEST))?MODE_REQUESTED,?O.OWNER || ' . ' || O. OBJECT_NAME || ' ?( ' || O.OBJECT_TYPE || ' ) ' ,?S.TYPE?LOCK_TYPE,?L.ID1?LOCK_ID1,?L.ID2?LOCK_ID2?
    FROM
    ?V$LOCK?L,?SYS.DBA_OBJECTS?O,?V$SESSION?S?
    WHERE ?L.SID? = ?S.SID? AND ??L.ID1? = ?O. OBJECT_ID

    執行上記SQL語句,可以查尋到數據庫中的鎖的情報.

    SESSION_ID, USERNAME,??MODE_HELD,??MODE_REQUESTED, OBJECT_NAME, LOCK_TYPE, LOCK_ID

    分別是 擁有鎖的SESSION_ID,擁有鎖的USERNAME,鎖的執行模式MODE_HELD,鎖的請求MODE_REQUESTED,鎖所在的數據庫對象名
    ,鎖的類型,鎖的ID
    posted @ 2007-07-27 18:23 zJun's帛羅閣 閱讀(14616) | 評論 (0)編輯 收藏
         摘要: Java中的多線程使用synchronized關鍵字實現同步.為了避免線程中使用共享資源的沖突,當線程進入synchronized的共享對象時,將為共享對象加上鎖,阻止其他的線程進入該共享對象.但是,正因為這樣,當多線程訪問多個共享對象時,如果線程鎖定對象的順序處理不當話就有可能線程間相互等待的情況,即常說的: 死鎖現象.  閱讀全文
    posted @ 2007-07-24 19:02 zJun's帛羅閣 閱讀(3227) | 評論 (1)編輯 收藏
         摘要: Java Socket簡單入門例子.  閱讀全文
    posted @ 2007-07-24 19:01 zJun's帛羅閣 閱讀(2294) | 評論 (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帛羅閣 閱讀(2507) | 評論 (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帛羅閣 閱讀(921) | 評論 (1)編輯 收藏
         摘要: 組件(Component)類必須在類一級定義@Embeddable注解.

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

    AUTO - 可以是identity類型的字段,或者sequence類型或者table類型,取決于不同的底層數據庫.
    TABLE - 使用表保存id值
    IDENTITY - identity字段
    SEQUENCE - sequence  閱讀全文
    posted @ 2007-03-07 15:49 zJun's帛羅閣 閱讀(2550) | 評論 (0)編輯 收藏
         摘要: 1. 基本屬性映射
    通過 @Basic 可以聲明屬性的存取策略:
    @Basic(fetch=FetchType.EAGER) 即時獲取(默認的存取策略)
    @Basic(fetch=FetchType.LAZY) 延遲獲取  閱讀全文
    posted @ 2007-03-07 15:13 zJun's帛羅閣 閱讀(2097) | 評論 (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帛羅閣 閱讀(7445) | 評論 (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帛羅閣 閱讀(728) | 評論 (0)編輯 收藏
         摘要: Launchy,一款免費開源軟件實現了鍵盤快捷啟動程序的功能。

    你只需要輸入程序的名稱,Launchy就可以自動幫你匹配出你想要運行的程序:  閱讀全文
    posted @ 2007-02-02 14:36 zJun's帛羅閣 閱讀(1125) | 評論 (0)編輯 收藏
         摘要: Table
    Table用來定義entity主表的name,catalog,schema等屬性。
    元數據屬性說明:
    name: 表名
    catalog: 對應關系數據庫中的catalog
    schema:對應關系數據庫中的schema
    UniqueConstraints:定義一個UniqueConstraint數組,指定需要建唯一約束的列   閱讀全文
    posted @ 2007-01-24 15:46 zJun's帛羅閣 閱讀(21983) | 評論 (0)編輯 收藏
         摘要: Apache的Jakata項目的POI子項目,目標是處理ole2對象。 POI可以到 http://www.apache.org/dyn/closer.cgi/jakarta/poi/ 下載。...  閱讀全文
    posted @ 2007-01-22 17:59 zJun's帛羅閣 閱讀(22229) | 評論 (6)編輯 收藏
         摘要: 方法一:循環元素刪除
    方法二:通過HashSet剔除
    方法三:刪除ArrayList中重復元素,保持順序  閱讀全文
    posted @ 2007-01-18 13:48 zJun's帛羅閣 閱讀(4636) | 評論 (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帛羅閣 閱讀(756) | 評論 (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帛羅閣 閱讀(2584) | 評論 (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帛羅閣 閱讀(5302) | 評論 (3)編輯 收藏
         摘要: Apache jakarta 各項目主要用途及簡單說明 來源出處:http://www.javaworld.com.tw/jute/post/view?bid=11&id=1672 為了讓大...  閱讀全文
    posted @ 2007-01-16 17:07 zJun's帛羅閣 閱讀(1430) | 評論 (0)編輯 收藏
    一定得是N層結構,
    層數越多越好,層少了用戶會誤會我們不重視,
    什么數據訪問層呀,實體控制層啊,能給他加上的全加上。
        
    程序員一定都得是老鳥,30以下基本不考慮,
    還得清一色的外企空降兵,
    都有10年以上編程經驗的那種,用過的語言越多越好,
    編程都不帶查MSDN的,牛吧!
    程序員個個都配IBM筆記本,
    CPU要3G以上的,內存硬盤和屏幕都要最大的,
    擴展槽別剩下,能插上的全插上。
    能安的操作系統全安上,開機一屏幕上就一堆系統等你選,
    倍有面子!
        
    系統平臺就得是J2EE,人家競爭對手除了C++就是JAVA,
    你要用一.NET都不好意思和別人打招呼。
    你說這樣的系統設計出來得賣多少錢?
    我覺得怎么也得100萬吧?
    100萬,那是單機版!
    1000萬起!
    你還別嫌太貴,還不免實施服務費。
    你得研究有錢用戶得心理,
    愿意花1000萬買這套軟件用的,
    根本不在乎再多花上幾百萬!
        
    什么叫軟件泡沫你知道么?
    軟件泡沫就是做都做最復雜的,
    用就得用最貴的,還得特難用,顯得用戶水平高。
    所以我們搞軟件的口號就是:
    不求好用,但求費勁!
    posted @ 2007-01-12 17:36 zJun's帛羅閣 閱讀(493) | 評論 (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帛羅閣 閱讀(1836) | 評論 (0)編輯 收藏
         摘要: DCBP連接池的簡單使用方法。  閱讀全文
    posted @ 2006-11-10 13:49 zJun's帛羅閣 閱讀(1217) | 評論 (3)編輯 收藏
         摘要: 元字符及其在正則表達式中行為的列表  閱讀全文
    posted @ 2006-10-11 13:52 zJun's帛羅閣 閱讀(2260) | 評論 (0)編輯 收藏
         摘要: 1.如果存在就更新,不存在就插入用一個語句實;
    2.分頁算法;
    3.抽取/刪除重復記錄;  閱讀全文
    posted @ 2006-10-10 16:49 zJun's帛羅閣 閱讀(1051) | 評論 (2)編輯 收藏
         摘要: EssentialPIM 是一套非常不錯的個人時間日程安排軟件,它具有相當方便的操作接口,讓使用者能夠對于所排定的行程一目了然,而每一個事件也都允許使用者進行夾檔,讓你可以把例如會議結果、計劃案等數據附帶于該記錄中。往后,使用者就能夠直接對所輸入的數據進行搜尋,讓你不論在何時都能夠找到該事件發生時的一些特定信息。  閱讀全文
    posted @ 2006-10-09 15:10 zJun's帛羅閣 閱讀(891) | 評論 (0)編輯 收藏
         摘要: Windows Live Writer
    MS推出的寫日志工具,一個桌面程序,需要在本地安裝,并且需要安裝 .NET Framework SDK.界面UI十分友好,支持主要的Blog API,包括:Windows Live Spaces,RSD ,Metaweblog API,Movable Type API 和 WordPress.  閱讀全文
    posted @ 2006-09-30 15:45 zJun's帛羅閣 閱讀(595) | 評論 (2)編輯 收藏
         摘要: JSTL包含以下的標簽:
    常用的標簽:如 c:out、c:remove、c:catch、c:set等
    條件標簽:如 c:if、c:when、c:choose、c:otherwise等
    URL標簽:如 c:import、c:redirect 和 c:url 等
    XML標簽:如 xml:out 等
    國際化輸出標簽:如 fmt:timeZone 等
    SQL標簽:如 sql:query、sql:update、sql:transaction 等  閱讀全文
    posted @ 2006-09-28 16:12 zJun's帛羅閣 閱讀(1967) | 評論 (0)編輯 收藏
         摘要: 在SpringSide里翻到一個好東西: jodd:form  閱讀全文
    posted @ 2006-09-20 16:21 zJun's帛羅閣 閱讀(1835) | 評論 (0)編輯 收藏

     使用forward的話,網址列上並不會出現被轉發的目標位址,而且forward是在Web應用程式之內進行,可以訪問Web應用程式的隱藏目錄,像是WEB-INF,然而forward只能在Web應用程式中進行,不能指定至其它的Web應用程式位址。

     使用redirect的話,是要求客戶端瀏覽器重新發出一個指定的請求位址,因此網址列上會出現被重導的目錄位址,重導的請求是由瀏覽器發出,所以不能訪問Web應用程式中的隱藏目錄,像是WEB-INF,然而重導是重新要求一個網頁,所以可以指定至其它的Web應用程式位址。

    posted @ 2006-09-19 18:33 zJun's帛羅閣 閱讀(505) | 評論 (0)編輯 收藏
         摘要: Hibernate中支持3種形式實現繼承關系:
    1. Table per concrete class 表與子類之間獨立一對一關系
    2. Table per subclass 每個子類對應一張子表,并與主類共享主表
    3. Table per class hierarchy 表與類一對多關系  閱讀全文
    posted @ 2006-08-16 15:15 zJun's帛羅閣 閱讀(1170) | 評論 (0)編輯 收藏
         摘要: 數據庫中提供了兩種字段類型 Blob 和 Clob 用于存儲大型字符串或二進制數據(圖片)。
    Blob 采用單字節存儲,適合保存二進制數據,如圖片文件。
    Clob 采用多字節存儲,適合保存大型文本數據。
      閱讀全文
    posted @ 2006-08-15 16:39 zJun's帛羅閣 閱讀(5388) | 評論 (1)編輯 收藏
         摘要: 手機可以有多少創意應用?無疑的,日本絕對是重要的指標,但也別忽略歐洲電信業者的企圖,他們不只將手機當做是通話的工具,它可以變成貼身的秘書、全天候無休的最佳伴游,當然也會是幫助你隨時掌控周遭動態變化的秘密狗仔,十二種行動生活提案,讓你每天的生活更有行動力!  閱讀全文
    posted @ 2006-08-15 10:44 zJun's帛羅閣 閱讀(1182) | 評論 (0)編輯 收藏
         摘要: Oralce中的to_date()函數用于將字符串轉換為日期對象,具體使用格式為: to_date( string, [ format_mask ], [ nls_language ] )
    1. ORA-01810: format code appears twice
    2. ORA-01722: invalid number   閱讀全文
    posted @ 2006-08-14 18:24 zJun's帛羅閣 閱讀(2256) | 評論 (1)編輯 收藏

    導航

    <2006年8月>
    303112345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    統計

    常用鏈接

    留言簿(15)

    隨筆分類

    隨筆檔案

    相冊

    收藏夾

    博客

    文檔

    站點

    論壇

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 大香人蕉免费视频75| 好紧我太爽了视频免费国产| 国产a视频精品免费观看| 亚洲AV无码专区国产乱码4SE| 亚洲人AV在线无码影院观看| 一二三四免费观看在线视频中文版| 久久久久亚洲AV无码网站| 最近2019中文免费字幕在线观看 | 亚洲乱码卡三乱码新区| 亚洲免费观看在线视频| 亚洲日本在线播放| 中国在线观看免费高清完整版| 亚洲人成伊人成综合网久久| 黄页网站免费在线观看| 涩涩色中文综合亚洲| 日本一道在线日本一道高清不卡免费| 中文字幕亚洲码在线| 暖暖免费高清日本中文| 边摸边吃奶边做爽免费视频网站| 亚洲黄黄黄网站在线观看| 在线免费视频你懂的| 西西人体44rt高清亚洲| 69式互添免费视频| 亚洲风情亚Aⅴ在线发布| 一本久久综合亚洲鲁鲁五月天| 精品久久久久久无码免费 | 亚洲色偷偷av男人的天堂| 色播精品免费小视频| 亚洲人成电影网站免费| 久久亚洲国产成人影院网站| 免费黄网站在线看| 亚洲第一成人在线| 免费吃奶摸下激烈视频| 国产三级在线免费| 狠狠色香婷婷久久亚洲精品| 免费萌白酱国产一区二区| 在线成人精品国产区免费| 亚洲一卡二卡三卡四卡无卡麻豆 | 国产亚洲精品成人AA片新蒲金| 午夜爽爽爽男女免费观看影院| 成人区精品一区二区不卡亚洲|