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

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

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

    Duran's technical life
    踏踏實(shí)實(shí)學(xué)技術(shù),認(rèn)認(rèn)真真做研究。

    2005年6月1日

    從MySql5中運(yùn)行本地腳本創(chuàng)建數(shù)據(jù)庫(kù),當(dāng)插入中文字段時(shí)發(fā)生“data too long for column”錯(cuò)誤。上網(wǎng)一查,發(fā)現(xiàn)多字節(jié)用戶大都碰到了這種情況。google搜索網(wǎng)上的解決方法大都是要將數(shù)據(jù)庫(kù)的編碼方式為GBK或UTF8,可我在安裝MySql時(shí)就選擇了UTF8格式。原來錯(cuò)誤原因是本地的腳本文件不是UTF8編碼的,用記事本或UltraEdit將編碼轉(zhuǎn)為UTF8后問題解決。再次強(qiáng)調(diào),JSP頁面,數(shù)據(jù)庫(kù)聯(lián)接接方式,數(shù)據(jù)庫(kù)創(chuàng)建,…,都須一致使用UTF8編碼!

    BTW,MySql最近借著Web2.0的浪潮風(fēng)頭很勁啊,techn orati(好像這幾天被GFW filter了),flickr,del.icio.us等一批網(wǎng)站都是用了MySql。MySql還專門在首頁開了一大塊來炫耀。
    posted @ 2006-07-14 19:12 Duran's technical life 閱讀(9186) | 評(píng)論 (4)編輯 收藏
     
    Installed JDK6 (Mustang) beta and Eclipse3.2 . As Sun promised , Swing library, especially the?WindowsLookAndFeel feels much better. It’s hard to tell the difference between a Swing drawn window and a WINXP native window. Developing Java desktop applications is worth considering. Mattise, a free easy-to-use WYSIWYG Swing UI designer, is the only reason for many to use the tedious NetBeans. Recently, Genuitec provided Matisse4Eclipse, which is?an implementation of Matisse that integrates its functionality into MyEclipse Workbench to enable the easy creation of Swing applications with Eclipse. So the only reason to use NetBeans has gone.
    posted @ 2006-07-13 22:17 Duran's technical life 閱讀(1037) | 評(píng)論 (0)編輯 收藏
     
    去年7月決定考研后暫停了對(duì)Java技術(shù)的學(xué)習(xí)。錄研上后專心開發(fā)導(dǎo)師負(fù)責(zé)的項(xiàng)目,到4月份從深圳出差回來后又忙著做畢設(shè)??煲荒甑臅r(shí)間沒跟新這,幾乎都要abandon了。百度剛開放了百度空間的注冊(cè),不過看起來不咋的。選國(guó)外的BSP會(huì)面臨隨時(shí)偉大的GFW過濾掉的后果??偟膩碚f,BlogJava還是很適合post技術(shù)方面的東西,優(yōu)點(diǎn)是流量大,被google收錄快;缺點(diǎn)就是沒有trackback。前幾天下午跑到圖書館看了看上半年的程序員,新鮮玩意并不多。SOA,這個(gè)被預(yù)測(cè)為06年最熱點(diǎn)的技術(shù),并沒有什么有趣的文章,或許這個(gè)名詞還是沒有個(gè)明確的含義和應(yīng)用。在學(xué)校里,IBM的SOA大賽倒是舉辦的風(fēng)風(fēng)火火。JavaEE5,JDK 6的發(fā)布還是給Java界帶來不少有趣又實(shí)用的新東東,比如annotation,persistence API和script supporting。得跟上技術(shù)前進(jìn)的步伐了,以后技術(shù)的筆記還是發(fā)這里,平日的雜想就寫在我的MSN space上。
    posted @ 2006-07-13 22:14 Duran's technical life 閱讀(329) | 評(píng)論 (0)編輯 收藏
     

    @title [筆記]事務(wù)處理

    #1 Transaction Propagation Behavior
    Required:Excute within a current tx, create a new one if none exists.
    Supports: Excute within a current tx, execute without a tx if none exsits.
    Mandatory: Excute within a current tx, throw an exception if none exists.
    Requires New: Create a new tx and excute within the tx, suspend the current tx if one exists.
    Not Supported: Excute without a tx, suspend the current tx if none exsits.
    Never: Excute without a tx, throw an exception if a tx exsits.

    #2 Transaction Isolation Level[1]
    #2.1 Concurrent Problem
    Dirty Reads: 臟讀(臟數(shù)據(jù)指已更新,還沒提交的數(shù)據(jù))。事務(wù)T1讀取到事務(wù)T2中的臟數(shù)據(jù)。

    Unrepeatable Reads: 不可重復(fù)讀。事務(wù)T1檢索到某行后,事務(wù)T2更新并提交了該行,若事務(wù)T2再次檢索該行,則會(huì)看到不一樣的結(jié)果。

    Phantom Reads: 虛讀。事務(wù)T1檢索到符合某條件的行集后,事務(wù)T2插入并提交了滿足該條件的新行,若事務(wù)T2再次按該條件檢索,則會(huì)看到以前不存在的行“Phantom”。

    #2.2 Isolation Level
    +---------------+-------+------------------+-----------+
    |Isolation Level|Phantom|Unrepeatable Reads|Dirty Reads|
    +---------------+-------+------------------+-----------+
    |Read Uncommited|   Y   |         Y        |     Y     |
    +---------------+-------+------------------+-----------+
    |Read Commited  |   Y   |         Y        |     N     |
    +---------------+-------+------------------+-----------+
    |Repeatable Read|   Y   |         N        |     N     |
    +---------------+-------+------------------+-----------+
    |Serializable   |   N   |         N        |     N     |
    +---------------+-------+------------------+-----------+

    #3 Timeout

    #4 ReadOnly Transaction
    只讀事務(wù)保證了多條查詢SQL的在事務(wù)級(jí)別的讀一致性。JDBC和數(shù)據(jù)庫(kù)會(huì)對(duì)只讀事務(wù)做一些優(yōu)化。

    [1] C.J.Date, An Introduction to Database Systems 7th.

    posted @ 2005-09-09 13:09 Duran's technical life 閱讀(715) | 評(píng)論 (1)編輯 收藏
     

    iteration::two Cairngorm 0.99 開發(fā)指南
    @author sakis
    @version 0.1

    #0
    MXML優(yōu)點(diǎn):使用方便,XML代碼簡(jiǎn)潔易懂
    缺點(diǎn):事件、函數(shù)、界面描混在一起。程序規(guī)模大了難于開發(fā)維護(hù)。

    #1
    Cairngorm框架是iterationtwo推出的號(hào)稱基于JEE Best Practice的Flex程序開發(fā)的light-weight framework。(恩,light-weight這個(gè)詞還真是流行呢)。目前最新版本為0.99。

    Cairngorm的結(jié)構(gòu)如下:
    org
    └─nevis
        └─cairngorm
            ├─application
            │      CairngormApplication.as
            │
            ├─business
            │      Responder.as
            │      ServiceLocator.as
            │
            ├─commands
            │      Command.as
            │      SequenceCommand.as
            │
            ├─control
            │      Event.as
            │      EventBroadcaster.as
            │      FrontController.as
            │
            ├─model
            │      ModelLocator.as
            │
            ├─view
            │      ViewHelper.as
            │      ViewLocator.as
            │
            └─vo
                    ValueObject.as


    #2
    下面給大家簡(jiǎn)單介紹Cairngorm的實(shí)現(xiàn)思路。

    #2.1
    Command/FrontController將Event與Viwe分離。
    FrontController實(shí)現(xiàn)Singleton模式(以下簡(jiǎn)寫為SP)。所有自定義的Command在要在FrontController構(gòu)造函數(shù)中實(shí)例化并以關(guān)聯(lián)數(shù)組的方式注冊(cè)FrontController#addCommand(eventType:String, commandInstance:Command)。EventBroadcaster實(shí)現(xiàn)SP。Event類的結(jié)構(gòu)為{type:eventType, data:eventData}。我們通過EventBroadcaster#broadcastEvent(eventType:String, eventData:Object)發(fā)布Event。Event發(fā)布后,與eventType對(duì)應(yīng)的command instance執(zhí)行Command#execute(event:Event)。

    BTW:在Cairngorm的源碼中,eventType、commandName、eventName混用,我統(tǒng)一用eventType。

    #2.2
    ServiceLocator將Remote Service聲明與View分離。
    ServiceLocator實(shí)現(xiàn)SP。在Cairngorm的demo中,又通過Delegate對(duì)象解除Command/Responder和ServiceLocator之間的依賴。這個(gè)Delegate做的事情其實(shí)意義不大,就是調(diào)用ServiceLocator中的Method,設(shè)置莫個(gè)Responder為相應(yīng)遠(yuǎn)程方法的handler。個(gè)人覺得無謂地增加了代碼量,而且Delegate對(duì)象也沒實(shí)現(xiàn)SP,也就是說我們每次調(diào)用一次Remote Service中的Method,都要new一個(gè)Delegate對(duì)象,實(shí)在浪費(fèi)。

    #2.3
    ViewLocator/ViewHelper將View(MXML)中夾雜的function與View分離。
    ViewHelper有點(diǎn)意思,當(dāng)一個(gè)ViewHelper在某個(gè)MXML頁面中聲明時(shí),如<view:LoginViewHelper id="loginViewHelper" />。ViewHelper能自動(dòng)取得所在MXML對(duì)象的引用,并通過ViewLocator#register(id, this:ViewHelper)將自身注冊(cè)到ViewLocator中。ViewLocator實(shí)現(xiàn)SP。借助ViewLocator/ViewHelper,我們就可以方便的調(diào)用不同MXML頁面中的方法。

    #2.4
    ModelLocator是一個(gè)marker interface,程序中Model可以放在某個(gè)ModelLocator方便調(diào)用。

    #2.5
    ValueObject也是一個(gè)marker interface, 基本不需要。

    #3
    Cairngorm.99給我們開發(fā)Flex程序提供了很不錯(cuò)的架構(gòu)模式,M/V/C/Remote之間可以做到完全解構(gòu)。但在實(shí)際開發(fā)時(shí)沒有必要死扣,代碼結(jié)構(gòu)清晰有活力就好。

    posted @ 2005-09-07 21:49 Duran's technical life 閱讀(883) | 評(píng)論 (0)編輯 收藏
     

    Hibernate一對(duì)一關(guān)聯(lián)實(shí)用介紹

    #0
    書和文檔上寫的都不是特清楚的。自己記下來。

    #1 Using a PK association

    #1.1 POJO with XDolclet annotation
    public class Customer {
     /**
      * @return Returns the shoppingCart.
      * @hibernate.many-to-one cascade="delete" column="shopping_cart_id"
      *  unique="true" foreign-key="FK_SHOPPING_CART__CUSTOMER"
      */
     public ShoppingCart getShoppingCart() {
      return shoppingCart;
     }
    }

    public class ShoppingCart {
     /**
      * @return Returns the customer.
      * @hibernate.one-to-one property-ref="shoppingCart"
      */
     public Customer getCustomer() {
      return customer;
     }
    }

    property-ref="shoppingCart" 告訴Hibernate ShoppingCart#customer和Customer#shoppingCart是反向的關(guān)系。所以Hibernate知道如何從ShoppingCart#getCustomer中檢索到相應(yīng)的customer對(duì)象。取出某個(gè)Customer對(duì)象時(shí),Hibernate會(huì)生成DEBUG SQL:324 - 3中的SQL語句。

    #1.2 HBM
    Customer.hbm.xml
    <many-to-one
        name="shoppingCart"
        class="ShoppingCart"
        cascade="delete"
        outer-join="auto"
        foreign-key="FK_SHOPPING_CART__CUSTOMER"
        column="shopping_cart_id"
    />

    ShoppingCart.hbm.xml
    <one-to-one
        name="customer"
        class="Customer"
        cascade="none"
        outer-join="auto"
        constrained="false"
        property-ref="shoppingCart"
    />

    #1.3 SCHEMA SQL
    create table CUSTOMER (
        ID bigint generated by default as identity (start with 1),
        SHOPPING_CART_ID bigint,
        primary key (ID)
    )

    create table SHOPPING_CART (
        ID bigint generated by default as identity (start with 1)
        primary key (ID)
    )

    alter table CUSTOMER
        add constraint FK_SHOPPING_CART__CUSTOMER
        foreign key (SHOPPING_CART_ID)
        references SHOPPING_CART

    #1.4 Query SQL
    DEBUG SQL:324 - 1
    select customer0_.ID as ID, customer0_.SHOPPING_CART_ID as SHOPPING2_3_, customer0_.USERNAME as USERNAME3_, customer0_.PWD as PWD3_
    from CUSTOMER customer0_
    where customer0_.USERNAME=? and customer0_.PWD=?

    DEBUG SQL:324 - 2
    select shoppingca0_.ID as ID0_, shoppingca0_.TOTAL as TOTAL8_0_
    from SHOPPING_CART shoppingca0_
    where shoppingca0_.ID=?

    DEBUG SQL:324 - 3
    select customer0_.ID as ID1_, customer0_.SHOPPING_CART_ID as SHOPPING2_3_1_, customer0_.USERNAME as USERNAME3_1_, customer0_.PWD as PWD3_1_, shoppingca1_.ID as ID0_, shoppingca1_.TOTAL as TOTAL8_0_
    from
     CUSTOMER customer0_
     left outer join
     SHOPPING_CART shoppingca1_
     on customer0_.SHOPPING_CART_ID=shoppingca1_.ID
    where customer0_.SHOPPING_CART_ID=?


    #2 Using a FK association

    #2.1 POJO with XDolclet annotation
    public class Customer {
     /**
      * @return Returns the shoppingCart.
      * @hibernate.one-to-one cascade="delete"
      */
     public ShoppingCart getShoppingCart() {
      return shoppingCart;
     }
    }

    public class ShoppingCart {
     /**
      * @return Returns the id.
      * @hibernate.id generator-class="foreign"
      * @hibernate.generator-param name="property" value="customer"
      */
     public Long getId() {
      return id();
     }

     /**
      * @return Returns the customer.
      * @hibernate.one-to-one constrained="true" foreign-key="FK_CUSTOMER__SHOPPING_CART"
      */
     public Customer getCustomer() {
      return customer;
     }
    }

    constrained="true" 告訴Hibernate ShoppingCart的PK還應(yīng)該是一個(gè)FK,這個(gè)FK引用Customer的PK。還需要多做一點(diǎn)工作,聲明ShoppingCart的PK生成策略是foreign,對(duì)應(yīng)ShoppingCart#customer。這和上面一句話不是一個(gè)意思嘛,F(xiàn)T~~

    #2.2 HBM
    Customer.hbm.xml
    <one-to-one
        name="shoppingCart"
        class="ShoppingCart"
        cascade="delete"
        outer-join="auto"
        constrained="false"
    />

    ShoppingCart.hbm.xml
    <id
        name="id"
        column="id"
        type="java.lang.Long"
    >
        <generator class="foreign">
     <param name="property">customer</param>
        </generator>
    </id>

    <one-to-one
        name="customer"
        class="Customer"
        cascade="none"
        outer-join="auto"
        constrained="true"
    />

    #2.3 SCHEMA SQL
    create table CUSTOMER (
        ID bigint generated by default as identity (start with 1),
        primary key (ID)
    )

    create table SHOPPING_CART (
        ID bigint not null,
        TOTAL integer,
        primary key (ID)
    )

    alter table SHOPPING_CART
        add constraint FK_CUSTOMER__SHOPPING_CART
        foreign key (ID)
        references CUSTOMER

    #2.4 Query SQL
    DEBUG SQL:324 -
    select customer0_.ID as ID, customer0_.USERNAME as USERNAME3_, customer0_.PWD as PWD3_
    from CUSTOMER customer0_
    where customer0_.USERNAME=? and customer0_.PWD=?

    DEBUG SQL:324 -
    select shoppingca0_.ID as ID0_, shoppingca0_.TOTAL as TOTAL8_0_
    from SHOPPING_CART shoppingca0_
    where shoppingca0_.ID=?

    這個(gè)“真正”的one-to-one的好處是少條關(guān)聯(lián)SQL語句,看到了嗎?

    posted @ 2005-09-06 13:16 Duran's technical life 閱讀(4193) | 評(píng)論 (2)編輯 收藏
     
    1  Open the Apache Tomcat configuration app in sys tray, and on the "Java" tab, bump up the initial memory pool size and the maximum memory pool size to 512 Initial and 768 Max, click Ok.
    2  In \Program Files\Apache software Foundation\Tomcat 5.0\bin\catalina.bat, in the last section immediately after "rem Execute Java with the applicable properties", insert this line, set CATALINA_OPTS=-mx1024m. Save the file.
    posted @ 2005-08-12 17:38 Duran's technical life 閱讀(1597) | 評(píng)論 (0)編輯 收藏
     

    在google里敲了“HelloWolrd”,再點(diǎn)“手氣不錯(cuò)”,出來了這樣一個(gè)頁面:http://www2.latech.edu/~acm/HelloWorld.shtml

    Hello World!

    Welcome to the ACM "Hello World" project. Everyone has seen the Hello World program used as a first exposure to a new language or environment. We are attempting to collect examples for as many languages and related programming environments (shells etc.) as possible.


    Aproximate number of examples:204     <----wow~~~
    This page has been accessed 33274 times.
    Last updated: January 20, 2005   


    看看C的,經(jīng)典HelloWorld
    #include <stdio.h>
    main()
    {
      for(;;)
          {
              printf ("Hello World!\n");
          }
    }


    這也是HelloWolrd?!
    a 1986 entry from Bruce Holloway:

    #include "stdio.h"
    #define e 3
    #define g (e/e)
    #define h ((g+e)/2)
    #define f (e-g-h)
    #define j (e*e-g)
    #define k (j-h)
    #define l(x) tab2[x]/h
    #define m(n,a) ((n&(a))==(a))

    long tab1[]={ 989L,5L,26L,0L,88319L,123L,0L,9367L };
    int tab2[]={ 4,6,10,14,22,26,34,38,46,58,62,74,82,86 };

    main(m1,s) char *s; {
        int a,b,c,d,o[k],n=(int)s;
        if(m1==1){ char b[2*j+f-g]; main(l(h+e)+h+e,b); printf(b); }
        else switch(m1-=h){
            case f:
                a=(b=(c=(d=g)<<g)<'<g)<<g;
                return(m(n,a|c)|m(n,b)|m(n,a|d)|m(n,c|d));
            case h:
                for(a=f;a=e)for(b=g<<g;b<n;++b)o[b]=o[b-h]+o[b-g]+c;
                return(o[b-g]%n+k-h);
            default:
                if(m1-=e) main(m1-g+e+h,s+g); else *(s+g)=f;
                for(*s=a=f;a<e;) *s=(*s<<e)|main(h+a++,(char *)m1);
            }
    }

    曾經(jīng)最短的HelloWorld(Jari.Arkko@lmf.eua.ericsson.se
    jar.1.c
    char*_="Hello world.\n";

    ln -s /dev/tty jar.1.o
    cc -c jar.1.c



    現(xiàn)在最短的HelloWorld (Jyrki Holopainen)
    ";main(){puts("Hello World!");}char*C=".c  
    char*_=__FILE__;

    posted @ 2005-08-09 09:38 Duran's technical life 閱讀(625) | 評(píng)論 (0)編輯 收藏
     

    抵達(dá)深圳

    在中國(guó)改革開放的貞操牌坊,更加強(qiáng)烈感受了GCD領(lǐng)導(dǎo)下的中國(guó)特色的社會(huì)主義和諧社會(huì)。羅湖區(qū)1w的小套間,隨處可見benz和BMW。晚上去吃海鮮,一盤盤的叫不上名來,味道倒是鮮美:-)

    實(shí)習(xí)第一天

    XX信息公司研發(fā)部實(shí)習(xí)員工登記,領(lǐng)工卡,認(rèn)識(shí)組員,了解項(xiàng)目情況,做了一天需求分析,easy。在公司里寫程序的感覺和學(xué)校不大一樣,一邊寫一邊就能聽到boss在隔壁辦公室訓(xùn)斥某人。小小的不滿:液晶顯示器不多,自然輪不到我。小小小的不滿:QQ不能用就算了,msn好像都不能用。

    posted @ 2005-07-14 18:07 Duran's technical life 閱讀(627) | 評(píng)論 (0)編輯 收藏
     

    性能比較:Java全面超越C++?
    這樣的八卦炒作貼也能在java.csdn.net上置頂,真是無語了~我只想對(duì)csdn說:“你太差了!”
    《程序員》每期都會(huì)買,是因?yàn)槲覜]的選擇。作為一本技術(shù)刊物,《程序員》不是保持中立,而是摻雜了太多的商業(yè)立場(chǎng)和利益。高水平的文章也有,但遠(yuǎn)遠(yuǎn)不夠。該雜志一主編感嘆沒有對(duì)手,說《DDJ China》“幾乎是一個(gè)合格的對(duì)手了”。說的極端和刻薄一點(diǎn),《DDJ》是軟件開發(fā)的學(xué)術(shù)刊物,csdn、《程序員》只能算是程序員的娛樂新聞雜志。

    這是一個(gè)署名“周星星”的同學(xué)對(duì)原文的評(píng)論。
    周星星 發(fā)表于2005-06-16 5:01 PM 
    “很明顯,C++的編譯器不如java的JIT和HotSpot編譯器,因?yàn)镴IT和HotSpot編譯器能針對(duì)CPU指令集進(jìn)行人優(yōu)化、能在運(yùn)行時(shí)根據(jù)使用頻率對(duì)method進(jìn)行內(nèi)聯(lián)和優(yōu)化。而C++的靜態(tài)編譯器永遠(yuǎn)也做不到這些”
    --- 無知了吧,現(xiàn)存于世的C++編譯器,無論是VC++,還是Intel C++,還是g++,都能針對(duì)特定CPU進(jìn)行優(yōu)化;而Java的所謂動(dòng)態(tài)優(yōu)化只是做了部分(不是全部)C++靜態(tài)優(yōu)化的工作;事實(shí)上,真正的動(dòng)態(tài)優(yōu)化不是任何一個(gè)高級(jí)語言所能做到的,C++不能,C不能,Java更不能,必須內(nèi)嵌匯編才能做到這一點(diǎn)。

    “JDK1.0時(shí),java的速度是C++的20到40分之一。而到了jdk1.4時(shí),java的性能則是C++的三分之一到2倍(通常C++是java的1.2倍到1.5倍)??上н@分報(bào)告沒有jdk1.4以后的數(shù)據(jù),而后面的報(bào)告我們將看到在jdk1.4.2時(shí),java性能全面超過C++?!?
    --- 有個(gè)10歲的小孩子對(duì)她30母親說:“9年前我的年齡是妳的1/21,我現(xiàn)在的年齡是妳的1/3,隨著這種趨勢(shì)的發(fā)展,在未來我的年齡就可以超過妳?!?
    Java的速度也許可以接近C++,但永遠(yuǎn)不可能達(dá)到C++一樣快,更不可能超過C++,因?yàn)榻忉尦绦虮仨氁笤绦騺斫忉寛?zhí)行,所以永遠(yuǎn)達(dá)不到一樣的速度。

    “Java寫的數(shù)據(jù)庫(kù)的性能是C++寫的數(shù)據(jù)庫(kù)性能的近600倍!”
    --- 天方夜譚,如果真的這樣,MS SQL為什么不用Java來編寫,Oracle為什么不用Java來編寫,MySQL為什么不用Java來編寫?

    “伯克利大學(xué)和Lawrence伯克利國(guó)家實(shí)驗(yàn)室的一份報(bào)告證明:IBM的JDK比GCC更快”
    --- 伯克利大學(xué)真的有這個(gè)報(bào)告嗎?真是玷污伯克利的威名,把JDK和GCC放在一起比,如同把“長(zhǎng)度”和“重量”這兩種不同性質(zhì)的東西放在一起比。

    “用純java寫的JDK底層要比用C++寫JDK底層要快”
    --- 暈,“純java寫的JDK”,教你Java的老師被你氣跳樓了。

    posted @ 2005-06-17 12:31 Duran's technical life 閱讀(730) | 評(píng)論 (1)編輯 收藏
     

    環(huán)境:Hibernate 2.1.7 + MySQL4.1(MySQL的編碼已設(shè)置為utf8)
    問題:通過Hibernate向MySQL寫入中文后,通過Hibernate取回?cái)?shù)據(jù),在console中打印java對(duì)象顯示正常。但在MySQL Query Browser中看到的是亂碼,傳給前端的Flex也是亂碼。
    原因:Hibernate的基礎(chǔ)還是JDBC,所以一樣需要設(shè)置characterEncoding!
    解決方法
    在hibernate.cfg.xml中應(yīng)該這樣寫

    <property name="connection.url">jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=UTF-8</property>
    如果用hibernate.properties
    #hibernate.connection.url jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8

    ps:處理中文的話,characterEncoding用GBK一樣可以。
    但字節(jié)編碼問題最好的解決方法還是統(tǒng)一使用UTF-8?。?!
    posted @ 2005-06-10 21:35 Duran's technical life 閱讀(15935) | 評(píng)論 (13)編輯 收藏
     
    Degrees and what they mean:
     BS  I can code, do basic technical work
     MS  More design responsibility and more independence
    PhD  Research, teaching, or architecting/design
    posted @ 2005-06-10 12:35 Duran's technical life 閱讀(528) | 評(píng)論 (0)編輯 收藏
     
    GUI編程太繁瑣,而且感覺相對(duì)而言“技術(shù)含量”不高。討厭也得學(xué)啊,畢竟寫的程序要通過GUI暴露給用戶。
    有的人笑話java的跨平臺(tái)是幌子,一次編寫,到處調(diào)試。我倒想問,怎樣該被稱做“幌子”。不同的操作系統(tǒng)之間的差異本來就很大,做到完全統(tǒng)一從原理上就是永遠(yuǎn)不可能的。就像寫的再好的模擬器也只能達(dá)到99%的模擬程度!Swing其實(shí)已經(jīng)不錯(cuò)了,隨著jdk更新的每個(gè)版本都能有所改進(jìn)。但是仍然遠(yuǎn)沒達(dá)到讓人滿意的地步。一是表現(xiàn)力仍然很差,看Swing做的軟件Together、NetBeans……界面真的好丑!也看了一些第三方公司自己擴(kuò)展Swing做出的demo,效果還不錯(cuò)。要價(jià)幾k美刀,也不知開發(fā)效率如何。二就是開發(fā)效率仍然過低?!氨梢暋眝b、pb這樣的RAD工具,寫出來的代碼混亂沒架構(gòu),但是它們做GUI的效率很高。
    最期待的表現(xiàn)層技術(shù)還是M$的Avalon,M$雖然討厭,但它的開發(fā)環(huán)境對(duì)程序員是最友善的。
    說說Flex。Flex學(xué)習(xí)曲線不大,各種UI Component超好用。不爽的ActionScript語法好別扭,不習(xí)慣?,F(xiàn)有的官方reference文檔太少了,更新又慢,例子也少得很。做東西時(shí)沒有pattern模仿,自己摸蠻痛苦而且寫出來的代碼也覺得有些cuo。
    posted @ 2005-06-07 23:18 Duran's technical life 閱讀(565) | 評(píng)論 (0)編輯 收藏
     

    Martin Fowler是ThoughtWorks的首席科學(xué)家。從80年代開始,他就一直從事軟件開發(fā)的工作。在80年代中期,他對(duì)面向?qū)ο箝_發(fā)這個(gè)新領(lǐng)域發(fā)生了興趣。他擅長(zhǎng)在商業(yè)信息系統(tǒng)中加入面向?qū)ο蟮乃枷搿r(shí)至21世紀(jì),他又在UML推廣普及、領(lǐng)域建模、企業(yè)應(yīng)用開發(fā)和敏捷方法等方面建樹卓著,被稱為軟件開發(fā)的教父。

    可惜他只去上海、北京,眼巴巴地看著啊。

    posted @ 2005-06-01 23:31 Duran's technical life 閱讀(287) | 評(píng)論 (0)編輯 收藏
     
    以前沒人考研的時(shí)候都是開考研動(dòng)員大會(huì),現(xiàn)在人招多了輔導(dǎo)員又開始勸大家條件不好的就盡量去找工作,呵呵??瓷弦粚镁蜆I(yè)單位名單里居然連“安利(中國(guó))日用品有限公司”都有,真是暈菜死。
    posted @ 2005-06-01 23:24 Duran's technical life 閱讀(289) | 評(píng)論 (0)編輯 收藏
     
    主站蜘蛛池模板: 国产在亚洲线视频观看| 亚洲精品高清视频| 四虎国产精品免费视| 女人18毛片水真多免费播放| 成年性羞羞视频免费观看无限| 波多野结衣免费在线| 无码一区二区三区AV免费| 18国产精品白浆在线观看免费| 国产91免费视频| 国产精品成人免费一区二区 | 成人免费午夜无码视频| 日韩在线播放全免费| 久久久久免费看成人影片| 日韩电影免费在线观看中文字幕| 日本人成在线视频免费播放| 久久久久久久岛国免费播放| 在线人成精品免费视频| 中文字幕乱码免费视频| 夜夜嘿视频免费看| 四只虎免费永久观看| 国产精品亚洲玖玖玖在线观看| 亚洲精品蜜桃久久久久久| 亚洲影院在线观看| 亚洲va乱码一区二区三区| 亚洲精品无码久久| 一个人免费观看视频在线中文| 国产午夜无码精品免费看动漫| 最近中文字幕高清免费中文字幕mv | 亚洲av成人一区二区三区观看在线 | 亚洲尹人香蕉网在线视颅| 亚洲精品第一综合99久久| 国产亚洲精品美女久久久久| 中国内地毛片免费高清| 57pao国产成永久免费视频| 成人免费无码大片A毛片抽搐色欲| 免费国产真实迷j在线观看| 亚洲va无码va在线va天堂| 国产人成亚洲第一网站在线播放| 美女视频黄视大全视频免费的| 免费在线中文日本| 成人免费在线视频|