序列化:

          1ObjectOutputStream oos = new ObjectOutputStream(new java.util.zip.GZIPOutputStream(
          2                        new FileOutputStream(outputFile)));
          3            oos.writeObject(obj);
          4            oos.close();

          反序列化:

          1ObjectInputStream ois = new ObjectInputStream(new java.util.zip.GZIPInputStream(
          2                        new FileInputStream(userFile)));
          3            Object obj = ois.readObject();
          4            ois.close();
          posted @ 2005-06-23 18:39 羅明 閱讀(786) | 評(píng)論 (0)編輯 收藏
           

          一直都在做綜合設(shè)計(jì),由于項(xiàng)目采用了Eclipse RCP,而且我以前也沒有接觸過Eclipse Plugin和RCP,只是學(xué)過一點(diǎn)SWT和看過幾個(gè)RCP的例子,所以現(xiàn)在做起來比較“郁悶”,一邊是快樂地學(xué)習(xí)未來最熱門的新技術(shù)(希望是哦),一邊是為時(shí)不時(shí)蹦出的錯(cuò)誤而不知所措,而苦惱。

          最可惡的是還要按部就班的寫文檔,本來在紙上已經(jīng)畫好了用戶界面,但為了付諸文檔還必須在Visio里畫一遍。還有一些東西不知道怎么填,本來想刪掉一些的,明明知道老師不會(huì)去翻那些文檔,但還是沒敢那樣做。

          Contributing to Eclipse看到了第6章,但是一直沒有時(shí)間寫心得,可能是心里還感覺寫B(tài)log是一種浪費(fèi)時(shí)間的東東吧,這樣子可不好,我得多練練。

          剛剛畫完時(shí)序圖,e的不行了,趁這個(gè)時(shí)間寫篇Blog,放松一下,理理頭緒,待會(huì)還得繼續(xù)寫數(shù)據(jù)庫的設(shè)計(jì)流程呢。

          突然有個(gè)體會(huì):好吧,讓暴風(fēng)雨來得更猛烈些吧!

          Go on, be a tiger!

           

          posted @ 2005-06-22 15:49 羅明 閱讀(139) | 評(píng)論 (0)編輯 收藏
           
          ttttt在我的回復(fù)中說的:

          我發(fā)現(xiàn),好像是firefox好使,ie不好使,
          大家都用firefox上吧!~~~~~

          Go on,be a tiger.

          posted @ 2005-06-21 10:12 羅明 閱讀(151) | 評(píng)論 (0)編輯 收藏
           
          都做什么去了,Robaggio也不來了,pat
          posted @ 2005-06-21 10:07 羅明 閱讀(122) | 評(píng)論 (0)編輯 收藏
           

          真希望快一點(diǎn)得到結(jié)果,對(duì)自己對(duì)家人也得有個(gè)交代啊。

          不知道過去那邊是做什么,我希望別做外包,多做一點(diǎn)項(xiàng)目。而且希望是Java的,呵呵

          既鍛煉實(shí)戰(zhàn)能力,又有很多Money,何樂而不為呢。

          不過現(xiàn)在想還有點(diǎn)早,呵呵

          posted @ 2005-06-19 18:21 羅明 閱讀(149) | 評(píng)論 (0)編輯 收藏
           

          粗略看了一下回復(fù)頁面的源碼和相關(guān)的JS文件(通過查看源文件看的,我現(xiàn)在還沒搞到asp源碼呢),感覺有兩個(gè)地方比較可疑,一個(gè)是validatePage變量(具體名字忘了,大概就是這個(gè)意思),還有一個(gè)validateFeedback,都在一個(gè)JS文件中。根據(jù)代碼邏輯,只要它們兩個(gè)當(dāng)中有一個(gè)為false,我們寫的回復(fù)就不能貼上去。

          是不是變量的值弄錯(cuò)了或者頁面和回復(fù)不符合標(biāo)準(zhǔn)

          btw:出事那天我寫了一篇《這樣可以使用戶不能關(guān)閉IE嗎? 》,發(fā)布之后我上了一下QQ,等我再看Blog的時(shí)候,ttttt已經(jīng)在那篇文章上留言了,

          # re: 這樣可以使用戶不能關(guān)閉IE嗎? Remove Comment 1478
          js吧,有個(gè)什么onClose事件好像
                                                                                                                                                 6/12/2005 8:49 PM | ttttt


          當(dāng)我寫好了我的回復(fù)準(zhǔn)備提交時(shí),submit按鈕就不好使了,沒有反應(yīng)。
          所以accident應(yīng)該就是這個(gè)時(shí)間段發(fā)生的,但不知道ttttt是誰?可以問一下那天是怎么操作的,呵呵。

          不能回復(fù)確是一件不爽的事啊。

          posted @ 2005-06-19 18:12 羅明 閱讀(216) | 評(píng)論 (1)編輯 收藏
           

          1) Improve your math skill.
          2) Improve your English skill.
          3) Improve your computer science skill.
          4) Improve your communication skill.
          5) Remove BS from your vocabulary, learn from everyone, as long as they have one thing stronger than you.
          6) Try define every vague term you're using precisely.
          7) Do not stop at surface, think deeper, dig deeper.
          8) Do not stop at surface, think higher, look at bigger picture.
          9) Be the best at your current job, learn something new, and then try to get a better job.
          10) Help people less experienced than you.
          11) Believe you can be expert too, reward yourself for your progress, even if it's small.
          12) Do something grand with your life, realize your childhood dream.
          13) Enjoy life.
          14) Pass it to your kids.

          posted @ 2005-06-17 23:04 羅明 閱讀(171) | 評(píng)論 (0)編輯 收藏
           

          為了打好做Plugin的基礎(chǔ),今天特地借了本《Contributing to Eclipse》,其實(shí)應(yīng)該是買一本的,這本書這么經(jīng)典。聽說這本書是從Eclipse的內(nèi)部構(gòu)架來講的,對(duì)于快速入門Plugin的開發(fā)可能不是特別合適,但沒有發(fā)現(xiàn)書店有別的關(guān)于SWT或Plugin的書,555

          好了,開始切入正題,Go Go Go

          《Contributing to Eclipse》分為四個(gè)循環(huán),第一個(gè)循環(huán)是第零個(gè)循環(huán)(hahaha)。

          第零個(gè)循環(huán)介紹了Eclipse的基礎(chǔ)架構(gòu),然后通過編寫一個(gè)最簡(jiǎn)單的HelloWorld Plugin帶我們走進(jìn)Contributing的大門。

          先說說這里列出的比較重要的概念:
          Eclipse分為三層:Platform、JDT、PDE。其中PDE是對(duì)JDT的擴(kuò)展,提供了插件開發(fā)支持。

          Platform又分為兩層:Core(Workspace、Runtime)、UI(Workbench、JFace、SWT)。
          下面分別介紹一下:
          Runtime --- 定義了插件的基礎(chǔ)設(shè)施。啟動(dòng)時(shí)發(fā)現(xiàn)所有可用插件并管理插件的加載。
          Workspace --- 管理一個(gè)或多個(gè)頂級(jí)項(xiàng)目。
          SWT(Standard Widget Toolkit)--- 提供圖形顯示功能,定義了一組標(biāo)準(zhǔn)窗體組件。
          JFace --- 建立在SWT上的一組比較小的UI框架,提供對(duì)常用UI任務(wù)的支持。
          Workbench --- Eclipse的UI聚合體,核心要素是編輯器、視圖(View)和視角(Perspective)。
          其中視角(Perspective)定義了各工作臺(tái)部件的可視化排列方式。

          All Right. That's how you get it.
          Go on, be a tiger.

          posted @ 2005-06-17 22:53 羅明 閱讀(1903) | 評(píng)論 (4)編輯 收藏
           
          SWT里的Right to Left Style,將Menu設(shè)為SWT.RIGHT_TO_LEFT就可以了,以前沒看到過這種效果,不知道別的語言可不可以這樣。
          倒窗口.JPG
          posted @ 2005-06-17 08:20 羅明 閱讀(646) | 評(píng)論 (2)編輯 收藏
           

          剛才看了Examples里的Web Browser實(shí)例,感覺特別像一個(gè)Rss Reader里的簡(jiǎn)易瀏覽器。

          上software.hit.edu.cn看Flash沒有問題,打開一個(gè)Word文檔也OK,應(yīng)該是內(nèi)嵌了IE吧。

          看了代碼也只發(fā)現(xiàn)一個(gè)setLocation(URL),沒有跟本地系統(tǒng)聯(lián)系的代碼,難道SWT里的Browser本身就內(nèi)嵌了IE。

          以前也聽說過SWT是不用虛擬機(jī)的(是嗎?),都是調(diào)用本地的dll,只是現(xiàn)在親眼目睹了。

          這不有點(diǎn)像AWT嗎?!

          posted @ 2005-06-17 04:30 羅明 閱讀(406) | 評(píng)論 (0)編輯 收藏
           

          這就是定制的Controls?有什么特別的地方嗎?我好像也沒看出來

          CCombo就是一個(gè)ComboBox,不過可以設(shè)為Flat,這樣比較酷。

          CLabel有一個(gè)Shadow相關(guān)的屬性,可以設(shè)置IN或OUT(就是突出或凹進(jìn),這是Label啊!搞得這么花哨)。

          CTabFolder在視覺上有些改進(jìn),也是Flat Style,看著看著就忍不住想碰一下。當(dāng)Size縮小時(shí),CTabItem可以隱藏起來,在右上方顯示一個(gè)下拉雙箭頭,還顯示了隱藏的Item數(shù)目,應(yīng)該就是Eclipse里的那種風(fēng)格了。
          CTabFolder.JPG

          StyledText,顧名思義。比較特別的:可以將句子Strikeout,就是在選擇的句子上劃一條“刪除線”。

          TableTree跟上節(jié)Controls里講的Tree差不多。有一個(gè)SWT.FULL_SELECTION Style不知道有什么用

          例子看完了,休息...休息一下。

          posted @ 2005-06-17 04:01 羅明 閱讀(440) | 評(píng)論 (0)編輯 收藏
           
          我們來看一下Swt Controls,所有的控件應(yīng)該都在這里了。
          首先是Button,里面的TOGGLE(按下不彈起)、FLAT(平平的,跟DotNet里的Flat Style差不多)和ARROW(一個(gè)方向箭頭,可以指定方向)挺好玩的,組合一下會(huì)有多重效果(用 | 來組合,如SWT.ARROW | SWT.FLAT | SWT.PUSH)。

          再看看Canvas(畫布),SWT.NO_REDRAW_RESIZE屬性設(shè)置resize時(shí)畫布不重畫,想起了小田老師的實(shí)驗(yàn)1,呵呵。Caret顯示一個(gè)光標(biāo),不知道是干什么用的。還有一個(gè)Fill Damaged Area With Color,看源代碼也沒弄懂,不就是畫幾個(gè)五顏六色的Rectangle嗎,要單獨(dú)列出來嗎?

          第三是ComboBox,Style是SWT.DROP_DOWN時(shí)是下拉列表,SWT.SIMPLE是將所有選項(xiàng)都平鋪在板子上的ComboBox。

          CoolBar也是工具欄咯,只不過比一般的ToolBar漂亮(SWT里還有ToolBar)不知道Item Styles中的SWT.DROP_DOWN有什么用,好像只對(duì)Toggle Item起作用。工具欄里可以放Text了。(后補(bǔ) -> 發(fā)現(xiàn)DROP_DOWN的功能了:Item被隱藏時(shí)顯示一個(gè)擴(kuò)展箭頭。剛才說的Toggle Item其實(shí)是Radio)

          Dialog有四個(gè)Model Style:SWT.MODELESS、SWT.PRIMARY_MODAL、SWT.APPLICATION_MODAL、SWT.SYSTEM_MODAL(不知道PRIMARY_MODAL是做什么用的)

          ToolBar里可以加入ComboBox

          Tree可以有Multiple Columns和Header。甚至還能顯示行列,簡(jiǎn)直就是Tree和Table的結(jié)晶。

          例子看完了,休息...休息一下。
          posted @ 2005-06-17 03:20 羅明 閱讀(748) | 評(píng)論 (0)編輯 收藏
           

          假如不考研的話,我就要在這一段時(shí)間多弄弄技術(shù)了,決定學(xué)學(xué)Eclipse的plugin和RCP,于是首先得學(xué)SWT。

          上次看了幾篇中文的paper,知道了SWT的基本應(yīng)用,現(xiàn)在該動(dòng)動(dòng)手了(盡管我向來都提倡君子動(dòng)口不動(dòng)手的,呵呵),當(dāng)然是首先看看swt都能干什么啦,最好的下手之處就是swt examples。

          運(yùn)行環(huán)境就是Eclipse啦,我的Eclipse本來不打算換的,我已經(jīng)裝了RC1(那天下RC2也是一位朋友要用,我的電腦上從3.0.1到3.1RC2都有,pat),但聽說RC2超級(jí)快,所以也解壓縮試一下。說了這么多廢話,真有點(diǎn)對(duì)不起觀眾,555

          現(xiàn)在看看怎么運(yùn)行SWT Examples,我們啟動(dòng)Eclipse,從Help的Welcome里選擇Samples,單擊SWT下面的紅圓圈,鏈接到download examples(我在Update里設(shè)了代理,速度馬馬虎虎),自動(dòng)安裝完examples后,單擊OutLine里的run examples,不要害怕,這時(shí)會(huì)彈出一個(gè)Eclipse的啟動(dòng)畫面,不要認(rèn)為哪里做錯(cuò)了,對(duì),這就是Examples的Laucher。在Laucher打開的workbench里選擇Window->Show View->Other,選擇Swt Examples里的例子。現(xiàn)在可以慢慢看了。

          posted @ 2005-06-17 01:39 羅明 閱讀(470) | 評(píng)論 (0)編輯 收藏
           
          rt~
          posted @ 2005-06-16 23:27 羅明 閱讀(169) | 評(píng)論 (0)編輯 收藏
           

          An even faster way to get up and running with WebLogic Platform 8.1

          BEA, VMware and Red Hat have partnered to provide a single, easy to install package that gives you everything you need to be quickly up and running with BEA WebLogic Platform 8.1 on Red Hat Enterprise Linux.

          The VMware image provided here can be installed on your VMware Workstation, which may be running on a Linux or Microsoft Windows box. After installing the image, you will have a fully operational WebLogic Platform 8.1 system running on a virtual Red Hat Enteprise Linux. No fuss, no additional installation necessary.

          source: http://dev2dev.bea.com/wlplatform/vmware/

          posted @ 2005-06-16 03:56 羅明 閱讀(322) | 評(píng)論 (0)編輯 收藏
           

          我們?cè)贗E里編輯blog時(shí),如果按下關(guān)閉按鈕,會(huì)彈出一個(gè)確認(rèn)對(duì)話框,點(diǎn)“取消”之后IE不會(huì)關(guān)閉。

          這是不是能實(shí)現(xiàn)rt功能?是什么促使對(duì)話框的彈出,是JS還是內(nèi)嵌的word或其他?

          以前有人問過怎么避免用戶誤關(guān)閉IE,當(dāng)時(shí)覺得不可能實(shí)現(xiàn)(那不成病毒網(wǎng)頁了嗎?),現(xiàn)在發(fā)現(xiàn)好像還是可以的,山外有山啊!!!

          得出一個(gè)道理: 多接觸一點(diǎn)東西,趁現(xiàn)在年輕

          posted @ 2005-06-13 04:45 羅明 閱讀(368) | 評(píng)論 (0)編輯 收藏
           
          我還納悶baggio的圖片是怎么弄上去的呢,一直都忘記問了。
          posted @ 2005-06-12 20:48 羅明 閱讀(157) | 評(píng)論 (0)編輯 收藏
           

          今天看一個(gè)Rails on Ruby的視頻時(shí),那位高手在一個(gè)文件夾上單擊右鍵(具體是rails文件夾,),在彈出的菜單上單擊Open Command Window Here(諸位的菜單上有嗎?),隨即打開的cmd進(jìn)入了選中的文件夾,這可是一個(gè)創(chuàng)新啊,再不用copy + paste了。所以我決定做一個(gè),用百度搜了一篇添加windows右鍵菜單的文章,照著做了一下,后來又參考了Far(一個(gè)類似rar的壓縮工具,目前在我的右鍵菜單上寄居,當(dāng)時(shí)裝著玩的)的command知道了“選擇目錄”的參數(shù):%1 。于是一個(gè)類似Open Command Window Here的功能實(shí)現(xiàn)了

          具體步驟:regedit -> HKEY_CLASSES_ROOT -> Folder -> shell -> 新建/項(xiàng):Open in cmd -> 在Open in cmd上新建/項(xiàng):Command -> 設(shè)置Command的默認(rèn)值為:C:\WINDOWS\system32\cmd.exe %1

          呵呵,大功告成

          posted @ 2005-06-10 17:12 羅明 閱讀(1685) | 評(píng)論 (6)編輯 收藏
           

          Yesterday, Steve Jobs proudly announced the 3rd major transition in Apple's history. After the move from the 68000 family to the PowerPC and after the move from MacOS 9 to beloved MacOS X, Apple will move from PowerPC to Intel x86 family. And Steve Jobs confirmed the rumors: Apple compiled and built all its applications and releases of MacOS X for x86. "Just in case" said Jobs.

          Why does it has to do with Java anyway? Well moving from one CPU architecture to another will demand a lot of work from the Mac community. Sure it won't be as hard as moving from MacOS 9 to MacOS X, but still, it's huge. As usual, Apple takes care of easing the pain: Xcode 2.1 can generate PowerPC and x86 binaries. Best, you can generate them in one single universal (or "fat") executable. MacOS X will also be shipped with Rosetta (Steve Jobs maybe want to be seen as the Champollion of IT), a runtime library to run PowerPC binaries on x86.

          Despite these (wonderful) tools, nothing will be as easy as porting your Java apps from MacOS X PPC to MacOS X x86. You'll just have nothing to do. Jobs even emphasized this point when, speaking about the amount of work required to port existing applications to x86, he explained that neither Dashboard Widgets nor Java apps will need the slighest change. Unfortunately he deceived us. Some Dashboard Widgets will need a bit of work, at least a new build.

          That's why we are the winners in this transition. We can rejoice to get a user friendly, stable and elegant OS on our well known x86 hardware and still enjoy our favorite development platform without bothering a minute about it.

          If you needed a proof of the advantage of hardware decoupled bytecode, you got it right in front of you my friends. We live interesting times and I'm glad I'm not talking about server side or mobile stuff.

          P.S: This is one more reason to check out the Quaqua Look and Feel and to contribute. As WinLAF, this look and feel aims to fix the glitches and minor bugs in comparison to the native look and feel.

          Source: http://weblogs.java.net/blog/gfx/archive/2005/06/apple_moves_to.html

          posted @ 2005-06-08 12:25 羅明 閱讀(232) | 評(píng)論 (0)編輯 收藏
           
          垂直:jScrollPane.getVerticalScrollBar().setValue(jScrollPane.getVerticalScrollBar().getMaximum());

          水平方向類似!
          posted @ 2005-06-07 21:00 羅明 閱讀(429) | 評(píng)論 (0)編輯 收藏
          僅列出標(biāo)題
          共14頁: First 上一頁 6 7 8 9 10 11 12 13 14 下一頁 
           
          主站蜘蛛池模板: 蕉岭县| 和田市| 将乐县| 东丽区| 宕昌县| 伊春市| 越西县| 耒阳市| 丰宁| 余干县| 潼南县| 保亭| 建平县| 陆丰市| 南丹县| 东丽区| 务川| 花莲县| 杂多县| 阿勒泰市| 秭归县| 湘乡市| 化德县| 广灵县| 福贡县| 博白县| 青岛市| 二连浩特市| 祁东县| 汝城县| 财经| 郎溪县| 车致| 从化市| 金平| 故城县| 舞阳县| 宣威市| 孙吴县| 滕州市| 建始县|