<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

    2007年8月17日

    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帛羅閣 閱讀(599) | 評論 (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環(huán)境

    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服務(wù)

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

    posted @ 2012-03-28 01:18 zJun's帛羅閣 閱讀(708) | 評論 (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帛羅閣 閱讀(806) | 評論 (0)編輯 收藏
    1.按照github上的指南配置(http://help.github.com/win-set-up-git/)基礎(chǔ)的git環(huán)境。

    2.在github上創(chuàng)建一個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導(dǎo)入剛添加到git的項目了。

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

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

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

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

    插入一下內(nèi)容:
    [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帛羅閣 閱讀(639) | 評論 (0)編輯 收藏

    方法1: 用SET PASSWORD命令

      mysql -u root

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

    方法2:用mysqladmin

      mysqladmin -u root password "newpass"

      如果root已經(jīng)設(shè)置過密碼,采用如下方法

      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;

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

    經(jīng)測試,方法三修改成功,其他三種方法沒有測試。

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

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

    posted @ 2012-03-17 22:52 zJun's帛羅閣 閱讀(849) | 評論 (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帛羅閣 閱讀(458) | 評論 (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帛羅閣 閱讀(1347) | 評論 (1)編輯 收藏
         摘要: 使用 JSEclipse,JavaScript 程序員現(xiàn)在有了自己的 Eclipse 插件,該插件將提供許多重要功能來輔助開發(fā) JavaScript 應(yīng)用程序。像 Eclipse 多年來為 Java? 語言和其他語言提供了易用性一樣,JSEclipse 為 JavaScript 開發(fā)人員提供了同樣的優(yōu)點。  閱讀全文
    posted @ 2008-01-29 17:20 zJun's帛羅閣 閱讀(12364) | 評論 (1)編輯 收藏
    分享一個不錯的編寫properties文件的Eclipse插件(plugin),有了它我們在編輯一些簡體中文、繁體中文等 Unicode文本時,就不必再使用native2ascii編碼了。您可以通過Eclipse中的軟件升級(Software Update)安裝此插件,步驟如下:
    1、展開Eclipse的Help菜單,將鼠標(biāo)移到Software Update子項,在出現(xiàn)的子菜單中點擊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列表中將所有結(jié)尾為“3.1.x”的選項去掉(適用于Eclipse 3.2版本的朋友);
    7、點擊Finish關(guān)閉對話框;
    8、在下載后,同意安裝,再按提示重啟Eclipse,在工具條看到形似vi的按鈕表示安裝成功,插件可用。此時,Eclpise中所有properties文件的文件名前有綠色的P的圖標(biāo)作為標(biāo)識。
    posted @ 2008-01-24 22:41 zJun's帛羅閣 閱讀(21909) | 評論 (4)編輯 收藏
         摘要: 在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files錯誤.....,查找的解決辦法如下:  閱讀全文
    posted @ 2007-10-16 20:55 zJun's帛羅閣 閱讀(100577) | 評論 (3)編輯 收藏
         摘要: 要對資料庫管理系統(tǒng)進行操作,最基本的就是使用SQL(Standard Query Language)語句,大部份的資料庫都支援標(biāo)準的SQL語句,然而也有一些特定於資料庫的SQL語句,應(yīng)用程式配合SQL語句進行資料庫查詢時,若使用到特定於資料庫的SQL語句,程式本身會有相依於特定資料庫的問題。

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

    整理自: SpringSide中文論壇


    實際執(zhí)行任務(wù)的Class: CourseService
    public ? class ?CourseService? {?

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

    }

    調(diào)度任務(wù)的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 "
    );?
    ??}
    ?
    ????
    }
    ?

    配置調(diào)度執(zhí)行任務(wù)的配置文件: 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用于設(shè)定啟動時運用的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 >
    ?
    ??
    <!-- 定時器設(shè)定起動頻率&啟動時間我設(shè)的是每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 >

    關(guān)于配置文件中參數(shù)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點觸發(fā)?
    " 0?15?10???*?* "
    ?每天上午10:15觸發(fā)?
    " 0?15?10?*?*?? "
    ?每天上午10:15觸發(fā)?
    " 0?15?10?*?*???* "
    ?每天上午10:15觸發(fā)?
    " 0?15?10?*?*???2005 "
    ?2005年的每天上午10:15觸發(fā)?
    " 0?*?14?*?*?? "
    ?在每天下午2點到下午2:59期間的每1分鐘觸發(fā)?
    " 0?0/5?14?*?*?? "
    ?在每天下午2點到下午2:55期間的每5分鐘觸發(fā)?
    " 0?0/5?14,18?*?*?? "
    ?在每天下午2點到2:55期間和下午6點到6:55期間的每5分鐘觸發(fā)?
    " 0?0-5?14?*?*?? "
    ?在每天下午2點到下午2:05期間的每1分鐘觸發(fā)?
    " 0?10,44?14???3?WED "
    ?每年三月的星期三的下午2:10和2:44觸發(fā)?
    " 0?15?10???*?MON-FRI "
    ?周一至周五的上午10:15觸發(fā)?
    " 0?15?10?15?*?? "
    ?每月15日上午10:15觸發(fā)?
    " 0?15?10?L?*?? "
    ?每月最后一日的上午10:15觸發(fā)?
    " 0?15?10???*?6L "
    ?每月的最后一個星期五上午10:15觸發(fā)?
    " 0?15?10???*?6L?2002-2005 "
    ?2002年至2005年的每月的最后一個星期五上午10:15觸發(fā)?
    " 0?15?10???*?6#3 "
    ?每月的第三個星期五上午10:15觸發(fā)?
    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

    相關(guān)文檔:
    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 新增一些特性來簡化開發(fā),這些特性包括泛型,for-each 循環(huán),自動裝包/拆包,枚舉,可變參數(shù), 靜態(tài)導(dǎo)入 。使用這些特性有助于我們編寫更加清晰,精悍,安全的代碼。  閱讀全文
    posted @ 2007-08-17 23:27 zJun's帛羅閣 閱讀(879) | 評論 (0)編輯 收藏

    導(dǎo)航

    <2007年8月>
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    統(tǒng)計

    常用鏈接

    留言簿(15)

    隨筆分類

    隨筆檔案

    相冊

    收藏夾

    博客

    文檔

    站點

    論壇

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产91精品一区二区麻豆亚洲| 免费国产草莓视频在线观看黄| 亚洲人成伊人成综合网久久久| 黄页网站在线观看免费高清| 精品国产污污免费网站入口在线| 亚洲色大情网站www| 久久亚洲精品无码aⅴ大香 | 亚洲日本中文字幕| 亚洲美女在线国产| 午夜神器成在线人成在线人免费 | 亚洲av无码一区二区乱子伦as | 黄色毛片免费在线观看| 中文字幕 亚洲 有码 在线 | 在线观看特色大片免费视频| 四虎国产精品永久免费网址| 精品熟女少妇aⅴ免费久久| 曰批免费视频播放在线看片二| 亚洲国产美女精品久久久| 亚洲制服在线观看| 久久精品国产亚洲av水果派| 亚洲国产精品一区二区第一页| 成人午夜亚洲精品无码网站| 五月天婷亚洲天综合网精品偷| 日韩免费三级电影| 女人张开腿等男人桶免费视频| 日本最新免费网站| 100部毛片免费全部播放完整| 免费无码又爽又刺激高潮视频| 免费人成黄页在线观看日本| a在线观看免费视频| 99视频在线观看免费| a视频在线免费观看| 中文字幕无码免费久久| 精品视频在线免费观看| 日本免费一区二区久久人人澡 | 亚洲高清无在码在线电影不卡| 久久亚洲中文字幕精品有坂深雪| 亚洲成在人天堂在线| 亚洲黄网站wwwwww| 亚洲乱码一二三四区乱码| 亚洲人成自拍网站在线观看|