我會(huì)走向何方

          我又該走向何方

          BlogJava 首頁 新隨筆 聯(lián)系 聚合 管理
            15 Posts :: 2 Stories :: 17 Comments :: 0 Trackbacks

          #

          主要是java方面的開發(fā),如果你知道python就更好,如果你是那種認(rèn)為"什么語言都一樣"就最好
          當(dāng)然,你如果聽過jstl、spring、hibernate、lucence等opensource會(huì)更好
          由于是處于創(chuàng)業(yè)期的團(tuán)隊(duì),需要從前臺(tái)照顧到后臺(tái),所以希望你的js也很出色,當(dāng)然同樣,你如果聽過jquery、prototype、ext-js等opensource會(huì)更好


          有興趣的兄弟可以訪問的網(wǎng)站 http://www.j.cn

          可以直接簡(jiǎn)歷發(fā)到我的郵箱 hama916@gmail.com

          當(dāng)然提供業(yè)界領(lǐng)先的待遇標(biāo)準(zhǔn)與晉升機(jī)會(huì)(落了俗套)

          對(duì)了,歡迎北京本地實(shí)習(xí)生(外地就算了,提供不了宿舍),希望你的年輕、激情為我們的團(tuán)隊(duì)帶來活力:-)
          posted @ 2009-03-30 11:44 hama 閱讀(101) | 評(píng)論 (0)編輯 收藏

          How do I configure Tomcat to support remote debugging?

          The short answer is to add the following options when the JVM is started:
          -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
          There are a number of ways you can do this depending on how you normally start Tomcat:

          • Set environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket and then start tomcat using catalina jpda start(sh catalina.sh jpda start).
          • If you run Tomcat using service wrapper, check the documentation for the service to determine how to set the required JVM options.
          • If you start Tomcat from within an IDE, check the documentation for the IDE to determine how to set the required JVM options.

          Using catalina start and CATALINA_OPTS

          Alternatively, you can set the java program's command-line arguments for the JPDA settings. For Tomcat, you specify them in the CATALINA_OPTS environment variable and the catalina.sh or catalina.bat script adds the value of the environment variable to the java command that starts Tomcat; for example:

          bash:

          declare -x CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
          $JWSDP_HOME/bin/catalina.sh start

          csh:

          setenv CATALINA_OPTS "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
          $JWSDP_HOME/bin/catalina.sh start

          Windows:

          set JPDA_TRANSPORT=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
          %JWSDP_HOME%\bin\catalina start
          The port does not need to be set to 8000, it may be any value appropriate for your system.

          Whilst this is very useful in development it should not be used in production because of both security and performance implications.


          How do I remotely debug Tomcat using Eclipse?

          This answer assumes that you have a project set up with all of the fixings and have some idea of what you're doing in this respect. If not then thats really outside the scope of this topic and more in the scope of you needing to go to eclipse.org and read up on how to use your ide, and maybe practice a little bit before you come back to this. We're also going to assume you have some idea of what a debugger is and how to use one.

          Make sure tomcat is started and that your app is deployed and the sources, etc are all defined as resources in your app. If you have a servlet or something, set a breakpoint where its sure to hit on the next request. Go to "Run->Debug...". Click on "Remote Java Applications", then click "New". Type in the title and all. Notice that port 8000 from the Tomcat instructions. Save and run. Eclipse will connect to the VM that Tomcat is running under. Wow, that was easy! Now go type the url to submit to your servlet or whatever in your browser. Boom you hit the breakpoint right? Have fun!

          posted @ 2007-02-06 09:02 hama 閱讀(3116) | 評(píng)論 (0)編輯 收藏

          由于公司的項(xiàng)目前期是給外包團(tuán)隊(duì)做的,接手的時(shí)候我們自己和外包團(tuán)隊(duì)都需要更新代碼,但因?yàn)楹贤膯栴},所以我們不能直接修改外包團(tuán)隊(duì)CVS上的代碼, CVS的版本分支問題搞的頭好大!
          當(dāng)然問題圓滿解決!!!感謝車東!!!

          CVS Branch:項(xiàng)目多分支同步開發(fā)

          確認(rèn)版本里程碑:多個(gè)文件各自版本號(hào)不一樣,項(xiàng)目到一定階段,可以給所有文件統(tǒng)一指定一個(gè)階段里程碑版本號(hào),方便以后按照這個(gè)階段里程碑版本號(hào)導(dǎo)出項(xiàng)目,同時(shí)也是項(xiàng)目的多個(gè)分支開發(fā)的基礎(chǔ)。

          cvs tag release_1_0

          開始一個(gè)新的里程碑
          cvs commit -r 2 標(biāo)記所有文件開始進(jìn)入2.x的開發(fā)

          注意:CVS里的revsion和軟件包的發(fā)布版本可以沒有直接的關(guān)系。但所有文件使用和發(fā)布版本一致的版本號(hào)比較有助于維護(hù)。

          版本分支的建立
          在開發(fā)項(xiàng)目的2.x版本的時(shí)候發(fā)現(xiàn)1.x有問題,但2.x又不敢用,則從先前標(biāo)記的里程碑:release_1_0導(dǎo)出一個(gè)分支 release_1_0_patch
          cvs rtag -b -r release_1_0 release_1_0_patch proj_dir

          一些人先在另外一個(gè)目錄下導(dǎo)出release_1_0_patch這個(gè)分支:解決1.0中的緊急問題,
          cvs checkout -r release_1_0_patch
          而其他人員仍舊在項(xiàng)目的主干分支2.x上開發(fā)

          在release_1_0_patch上修正錯(cuò)誤后,標(biāo)記一個(gè)1.0的錯(cuò)誤修正版本號(hào)
          cvs tag release_1_0_patch_1

          如果2.0認(rèn)為這些錯(cuò)誤修改在2.0里也需要,也可以在2.0的開發(fā)目錄下合并release_1_0_patch_1中的修改到當(dāng)前代碼中:
          cvs update -j release_1_0_patch_1


          posted @ 2007-01-31 11:45 hama 閱讀(1062) | 評(píng)論 (0)編輯 收藏


          <script>
          function f(m,n){
          ?var r = Math.round(Math.random()*(n-m))+m;
          ?alert(r);
          }
          f(0,23);
          </script>

          posted @ 2007-01-30 16:02 hama 閱讀(196) | 評(píng)論 (0)編輯 收藏

               摘要: 將excel數(shù)據(jù)整理成sql語句 ??1 package ?com.fangq.excel2sql; ??2 ??3 import ?java.io.BufferedReader; ??4 ...  閱讀全文
          posted @ 2006-10-05 07:56 hama 閱讀(1283) | 評(píng)論 (0)編輯 收藏

            “美國最好閉嘴并保持沉默!”

            8月17日,BBC(英國廣播公司)的廣播節(jié)目中,為反駁布什政府對(duì)中國軍費(fèi)開支增長(zhǎng)的指責(zé),中國常駐聯(lián)合國日內(nèi)瓦辦事處及瑞士其他國際組織代表沙祖康大使出言直率

            “美國的軍費(fèi)占全球軍費(fèi)開支的一半,而中國的人口是美國的五六倍。為什么指責(zé)中國?”隨后,沙祖康提高嗓音,“美國該如何做,這是美國的主權(quán),但美國不應(yīng)告訴中國該如何做!”

            在談及臺(tái)灣未來是否可能宣布“獨(dú)立”時(shí),沙祖康更是直言不諱:“臺(tái)灣宣布‘獨(dú)立’的那一刻,不管誰支持它,中國都將別無選擇。……在這個(gè)問題上,任何人都不應(yīng)該有任何幻想。我們將不惜一切代價(jià)。”

            沙祖康還補(bǔ)充道:“對(duì)于中國,一寸領(lǐng)土比生命更有價(jià)值。在這一點(diǎn)上,我們永遠(yuǎn)不會(huì)退縮。”

            這一系列大膽言論,讓西方大跌眼鏡,也讓國人頗感意外。而惟有熟悉沙祖康的人知道,這是其一貫風(fēng)格。

            “典型的現(xiàn)實(shí)主義外交”

            一向大膽敢言的沙祖康本來就不乏擁躉。隨著BBC節(jié)目的播放,半個(gè)月來,“沙式語錄”迅速風(fēng)靡網(wǎng)上中文論壇和博客。讓美國人“Shut up”的英文講話錄音甚至被網(wǎng)民剪輯出來,放到網(wǎng)上供人下載。

            為何沙祖康的這段發(fā)言受到網(wǎng)民如此追捧??清華大學(xué)軍控問題專家李彬教授評(píng)價(jià)說,“(沙祖康)說的是實(shí)話。”

            在個(gè)人風(fēng)格上,這個(gè)農(nóng)民出身、喜愛看武俠小說的外交官承認(rèn)“不大相信外交辭令”,他也不諱言自己講話粗,習(xí)慣有話都擺在桌面上談。美國報(bào)紙對(duì)沙氏講話風(fēng)格的評(píng)論是“令人吃驚的坦率(surprisingly frank)”。在李彬看來,沙祖康的外交思路屬于比較典型的現(xiàn)實(shí)主義,雖然他自己未必意識(shí)到。

            “現(xiàn)實(shí)主義的思路就是按照國家利益和實(shí)力來計(jì)算國家之間的互動(dòng)。這樣的思路簡(jiǎn)明、清晰,容易理解。沙祖康用此思路進(jìn)行交流時(shí),對(duì)方當(dāng)然會(huì)感覺到‘坦率’。”

            李彬說,“此外,沙祖康負(fù)責(zé)軍控外交的時(shí)期也是中國實(shí)質(zhì)性參與國際軍控的時(shí)期,國家投入的研究力度很大。在很多實(shí)質(zhì)性軍控問題上,中國必須表達(dá)明確的態(tài)度,而且也有對(duì)策研究基礎(chǔ)做這樣的表態(tài)。在開始階段,外國人對(duì)這些坦率確實(shí)比較吃驚。”

          posted @ 2006-08-31 22:26 hama 閱讀(239) | 評(píng)論 (0)編輯 收藏

          StudentDTO.java
          package?com.fangq.collections;
          /**
          ?*?
          ?*?
          @author?fangq
          ?*
          ?
          */

          public?class?StudentDTO?{
          ????
          private?String?xm;//姓名
          ????private?String?xh;//學(xué)號(hào)
          ????private?String?nl;//年齡
          ????public?String?getNl()?{
          ????????
          return?nl;
          ????}

          ????
          public?void?setNl(String?nl)?{
          ????????
          this.nl?=?nl;
          ????}

          ????
          public?String?getXh()?{
          ????????
          return?xh;
          ????}

          ????
          public?void?setXh(String?xh)?{
          ????????
          this.xh?=?xh;
          ????}

          ????
          public?String?getXm()?{
          ????????
          return?xm;
          ????}

          ????
          public?void?setXm(String?xm)?{
          ????????
          this.xm?=?xm;
          ????}

          ????
          }

          StudentComparator.java
          package?com.fangq.collections;

          import?java.util.Comparator;
          /**
          ?*?按dto的某個(gè)字段排序
          ?*?
          @author?fangq
          ?*
          ?
          */

          public?class?StudentComparator?implements?Comparator{

          ????
          public?int?compare(Object?arg0,?Object?arg1)?{
          ????????
          //?TODO?Auto-generated?method?stub
          ????????if(arg0?instanceof?StudentDTO&&arg1?instanceof?StudentDTO){
          ????????????StudentDTO?dto1?
          =?(StudentDTO)arg0;
          ????????????StudentDTO?dto2?
          =??(StudentDTO)arg1;
          ????????????
          int?nl1?=?Integer.parseInt(dto1.getNl());
          ????????????
          int?nl2?=?Integer.parseInt(dto2.getNl());
          ????????????
          if(nl1<nl2)
          ????????????????
          return?-1;
          ????????????
          else?if(nl1==nl2)
          ????????????????
          return?0;
          ????????????
          else
          ????????????????
          return?1;
          ????????????
          ????????}

          ????????
          return?-1;
          ????}


          ????

          }

          TestComparator.java
          package com.fangq.collections;

          import java.util.Arrays;

          import org.apache.commons.lang.math.RandomUtils;
          /**
          ?*
          ?* @author?fangq
          ?*/
          public class TestComparator {
          ?public static void main(String[] args){
          ??StudentDTO[] dtos = new StudentDTO[10];
          ??for(int i=0;i<dtos.length;i++){
          ???dtos[i] = new StudentDTO();
          ???dtos[i].setXh("xh"+i);
          ???dtos[i].setXm("xm"+i);
          ???dtos[i].setNl(String.valueOf(i+RandomUtils.nextInt(20)));
          ??}
          ??System.out.println("排序前===============");
          ??for(int j=0;j<dtos.length;j++)
          ??System.out.println("姓名:"+dtos[j].getXm()+"年齡:"+dtos[j].getNl());
          ??
          ??Arrays.sort(dtos,new StudentComparator());
          ??System.out.println("排序后===============");
          ??for(int k=0;k<dtos.length;k++)
          ??System.out.println("姓名:"+dtos[k].getXm()+"年齡:"+dtos[k].getNl());
          ??
          ?}
          }

          posted @ 2006-08-26 16:10 hama 閱讀(1430) | 評(píng)論 (0)編輯 收藏

          ?

          package ?com.fangq.collections;
          /**
          ?*?后進(jìn)先出
          ?*?自動(dòng)擴(kuò)容2倍
          ?*?
          @author ?new
          ?*
          ?
          */

          public ? class ?Stack? {
          ????
          private ?Object[]?stack;
          ????
          private ? int ?max;
          ????
          private ? int ?top;
          ????
          public ?Stack() {
          ????????stack?
          = ? new ?Object[ 20 ];
          ????????max?
          = ? 20 ;
          ????????top?
          = ? - 1 ;
          ????}

          ????
          public ?Stack( int ?s) {
          ????????stack?
          = ? new ?Object[s];
          ????????max?
          = ?s;
          ????????top
          =- 1 ;
          ????}

          ????
          public ? void ?push(Object?o)? throws ?Exception {
          ????????
          if (o == null )
          ????????????
          throw ? new ?Exception( " 不允許空值 " );
          ????????top
          ++ ;
          ????????
          if (top > max - 1 ) {
          ????????????System.out.println(
          " 開始擴(kuò)容 " );
          ????????????max?
          = ?max * 2 ;
          ????????????Object[]?oldStack?
          = ?stack;
          ????????????Object[]?newStack?
          = ?? new ?Object[max];
          ????????????System.arraycopy(oldStack,
          0 ,newStack, 0 ,top);
          ????????????stack?
          = ?newStack;
          ????????}

          ????????System.out.println(
          " top=====> " + top);
          ????????System.out.println(
          " max=====> " + max);
          ????????stack[top]?
          = ?o;?
          ????}

          ????
          public ?Object?pop() {
          ????????
          return ?stack[top -- ];
          ????}

          ????
          public ? static ? void ?main(String[]?args) {
          ????????Stack?s?
          = ?? new ?Stack( 10 );
          ????????
          try {
          ????????????
          for ( int ?i = 1 ;i < 22 ;i ++ ) {
          ????????????????s.push(String.valueOf(i));
          ????????????}

          ????????????System.out.println(s.pop());
          ????????????System.out.println(s.pop());
          ????????}
          catch (Exception?e) {
          ????????????e.printStackTrace();
          ????????}

          ????}

          }

          posted @ 2006-08-26 09:35 hama 閱讀(228) | 評(píng)論 (0)編輯 收藏

          今天在看jdk源碼的時(shí)候發(fā)現(xiàn)居然有個(gè)
          @author? Li Gong
          一看就是個(gè)中國人,后來上網(wǎng)一搜???? 宮力
          Li Gong自從JXTA項(xiàng)目正式啟動(dòng),到2001年4月正式發(fā)布,到2001年6月JavaOne上的介紹就一直擔(dān)任JXTA項(xiàng)目的工程指導(dǎo)及首席設(shè)計(jì)師。此前,在JDK 1.1和1.2版本的開發(fā)期間,他主管著Java安全和網(wǎng)絡(luò)小組。他在清華大學(xué)獲得了學(xué)士和碩士學(xué)位,從劍橋大學(xué)獲得了博士學(xué)位。他是IEEE Internet Computing和ACM TISSEC的編委會(huì)成員,也在IEEE S&P、IEEE CSFW和ACM CCS擔(dān)任要職。他擁有6項(xiàng)美國專利,已經(jīng)撰寫了60篇技術(shù)論文和2本書,并且于1994年獲得了IEEE通信組織頒發(fā)的Leonard G. Abraham獎(jiǎng)。目前,他在北京擔(dān)任Sun公司的中國工程研究所的總經(jīng)理。
          posted @ 2006-07-24 22:33 hama 閱讀(2262) | 評(píng)論 (6)編輯 收藏

          jvm隨著應(yīng)用程序(java application)而生而滅,當(dāng)一個(gè)application開始時(shí),jvm的生命就開始了,當(dāng)application結(jié)束時(shí),jvm的生命也結(jié)束了。在一臺(tái)機(jī)器上同時(shí)運(yùn)行多個(gè)application時(shí)會(huì)生成多個(gè)jvm實(shí)例!

          java Test

          該命令的java,告訴操作系統(tǒng)開始運(yùn)行java虛擬機(jī),Test 必須有main方法,是該application線程的起點(diǎn),其他所有線程都由這個(gè)初始線程啟動(dòng)

          在java虛擬機(jī)內(nèi)部有兩種線程:一種是守護(hù)線程,一種非守護(hù)線程。守護(hù)線程通常是虛擬機(jī)自己使用的,比如執(zhí)行垃圾收集的線程。當(dāng)然java也可以把創(chuàng)建的線程標(biāo)記為守護(hù)線程

          而由main開始的線程就是一個(gè)非守護(hù)線程,只要還有任何非守護(hù)線程運(yùn)行,java虛擬機(jī)就任然存活,當(dāng)application中的所有非守護(hù)線程都結(jié)束時(shí),java虛擬機(jī)也會(huì)自動(dòng)退出,假若安全管理器允許,程序也可以通過調(diào)用Runtime或System的exit()方法來退出虛擬機(jī)實(shí)例jvm.JPG
          posted @ 2006-07-23 18:59 hama 閱讀(749) | 評(píng)論 (0)編輯 收藏

          僅列出標(biāo)題
          共2頁: 1 2 下一頁 
          主站蜘蛛池模板: 鄂托克前旗| 宣威市| 逊克县| 三原县| 迭部县| 乐昌市| 襄垣县| 高州市| 瑞丽市| 杭锦旗| 镇原县| 灌南县| 古田县| 沂水县| 玉林市| 镇安县| 桃园市| 邳州市| 建平县| 安溪县| 长兴县| 阿巴嘎旗| 岫岩| 边坝县| 新乡县| 桐城市| 阿图什市| 新竹市| 巫溪县| 孟津县| 报价| 舞钢市| 平山县| 从化市| 朝阳区| 台前县| 石阡县| 玉龙| 舒城县| 长顺县| 苗栗市|