E-Mail Icon Generator
想得到漂亮E-mail的圖標(biāo)嗎?
到這個(gè)網(wǎng)站: http://services.nexodyne.com/email/index.php
在
這個(gè)位置
選中你自己的郵箱和用戶名,然后點(diǎn)下面的 Generate 按鈕就可以了
這個(gè)是我的一個(gè)Gmail的郵箱,現(xiàn)在注冊(cè)Gmail需要邀請(qǐng)函,如果有人需要
可以發(fā)一個(gè)郵件給我,我會(huì)回一封邀請(qǐng)函給你。
下面這個(gè)是qq的郵箱:
把平常收集到的和遇到的一些小問題列出來,以備不時(shí)之需.
也歡迎大家把自己的收藏跟貼.
import java.io.ByteArrayInputStream;
import java.io.InputStream;
String ? str ? = ? "";//add ? your ? string ? content
InputStream ? inputStream ? = ? new ? ByteArrayInputStream(str.getBytes());
2. String和數(shù)字互相轉(zhuǎn)換
1 如何將字串 String 轉(zhuǎn)換成整數(shù) int?
? 有兩個(gè)方法:
? 1). int i = Integer.parseInt([String]); 或
????? i = Integer.parseInt([String],[int radix]);
? 2). int i = Integer.valueOf(my_str).intValue();
? 注: 字串轉(zhuǎn)成 Double, Float, Long 的方法大同小異.
2 如何將整數(shù) int 轉(zhuǎn)換成字串 String ?
? 1.) String s = String.valueOf(i);
? 2.) String s = Integer.toString(i);
? 3.) String s = "" + i;
? 注: Double, Float, Long 轉(zhuǎn)成字串的方法大同小異.
作者: ynmc
原文地址:
http://m.tkk7.com/ynmc/archive/2006/06/26/55149.html歡迎轉(zhuǎn)載,請(qǐng)保留出處.
在用DWR傳輸xml文檔(document)或者節(jié)點(diǎn)(Element)的時(shí)候,通過DWR Debug頁面從函數(shù)中直接取返回?cái)?shù)據(jù)時(shí),由于DWR對(duì)于Firefox的支持度比IE好的原因,在FireFox下面能正常運(yùn)行,在IE下會(huì)報(bào)[Ojbect Error]。我用DWR1.1和DWR M2兩個(gè)版本都進(jìn)行了測(cè)試,都會(huì)報(bào)出同樣的錯(cuò)誤。
關(guān)于這個(gè)錯(cuò)誤,我已經(jīng)和DWR的作者joe walker通過user-list聯(lián)系過,他表示由于時(shí)間的問題,在ie下面的確有一些bug沒有來得及處理。
同時(shí),我又做了一些測(cè)試,發(fā)現(xiàn)其實(shí)這個(gè)問題確實(shí)如Joe后來回復(fù)的郵件所說,是個(gè)沒有什么意義的小問題。在IE下其實(shí)也是可以傳遞Document或者Element數(shù)據(jù)的,只是在DWR Debug頁面下,直接從函數(shù)中返回Document或者Element時(shí),DWR彈出的顯示元素的對(duì)話框。這個(gè)時(shí)候DWR隱式的將Document或者Element對(duì)象轉(zhuǎn)換成了String,而DWR對(duì)FireFox支持的較好,沒有問題,而在IE中就會(huì)彈出Object Error錯(cuò)誤。
所以對(duì)實(shí)際應(yīng)用來講,這個(gè)bug完全可以忽略,因?yàn)槌薲ebug以外,在使用中沒有任何影響。
Joe 最后回復(fù)了郵件,也給出了處理辦法,他的意思是這種情況出現(xiàn)的比較少,意義不大(我就是聽他說了這句話之后發(fā)現(xiàn)了開始自己的理解有誤,看來多與人交流是非常重要的啊。)
下面是郵件原文:
From: Joe Walker <
joseph.walker@...>
Subject:
Re: Re: [new user]problem: can't send/return DOM object?
Newsgroups:
gmane.comp.java.dwr.user
Date: 2006-06-26 08:32:37 GMT
(1 day and 48 minutes ago)
Expires: This article
expires on 2006-07-10
The DOM converter will convert from browser DOM objects to server
side DOM objects, but it wasn't designed to convert from browser
strings to SS DOM.
How do you parse a browser string into a browser DOM?
This can't be done without some cross-browser tweaks. Take a look at
DWREngine._unserializeDocument(). It is a private method to DWREngine,
so you should not use it directly, but you can copy it.
DWREngine._unserializeDocument = function(xml) {
? var dom;
? if (window.DOMParser) {
??? var parser = new DOMParser();
??? dom = parser.parseFromString(xml, "text/xml");
??? if (!dom.documentElement || dom.documentElement.tagName == "parsererror") {
????? var message = dom.documentElement.firstChild.data;
????? message += "\n" + dom.documentElement.firstChild.nextSibling.firstChild.data;
????? throw message;
??? }
??? return dom;
? }
? else if (
window.ActiveXObject) {
??? dom = DWREngine._newActiveXObject(DWREngine._DOMDocument);
??? dom.loadXML(xml);
??? // What happens on parse fail with IE?
??? return dom;
? }
? else {
??? var div = document.createElement
('div');
??? div.innerHTML = xml;
??? return div;
? }
};
There
is bug in IE is that I mentioned in a previous post. The bug is that
HTML nodes do not have the DOM properties to allow DWR to marshall them
properly. This might be something that DWR can work around, but to date
I have never seen the need to fix the bug. Sending the browser HTML DOM
to the server isn't all that useful since the server gave it to the
browser in the first place.
Joe.
目前的ajax框架中DWR的文檔是做的比較好的,這也有利于廣大的開發(fā)者。
DWR 官方站點(diǎn):
http://getahead.ltd.uk/dwr/
DWR User-list(作者會(huì)經(jīng)常對(duì)在這里提出的問題進(jìn)行回答,目前已經(jīng)有約5000條記錄):
http://news.gmane.org/gmane.comp.java.dwr.user
最后感謝Joe Walker,他不僅寫出了DWR,還非常熱心的回答了我和其它user的問題。
最近一直在做Web,用到ajax框架DWR,很少有地方專門討論這個(gè)東東的,希望大家能一起交流交流。
這是本人第一次加入團(tuán)隊(duì),希望能好好學(xué)習(xí),天天向上。
新開java的blog,并加入Jlive團(tuán)隊(duì)。