今天突然心血來潮Google了一下Cisco Router撥接搜尋到設定方法:
設備:Cisco 1750 + WIC-1ENET=
IOS需求:IP/ADSL PLUS 以上的版本
ADSL:中華電信10M/2M PPPoE (D-Link ATU-R)
以下是設定範例,供大家參考:
!
vpdn enable
!
vpdn-group pppoe
request-dialin
protocol pppoe
!
interface Ethernet0
no ip address
full-duplex
pppoe enable
pppoe-client dial-pool-number 1
!
interface FastEthernet0
ip address 10.0.0.1 255.255.255.0
ip nat inside
speed auto
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
encapsulation ppp
dialer pool 1
dialer-group 1
ppp pap sent-username xxxxxxxx@hinet.net password 0 2xxxxxx
!
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer1
no ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer1 overload
!
!
!
access-list 1 permit any
dialer-list 1 protocol ip permit
!
來源:http://redhat.ecenter.idv.tw/bbs/showthread.php?threadid=55036
2010年7月4日 星期日
在JavaScript使用Trim
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.Rtrim = function()
{
return this.replace(/(\s*$)/g, "");
}
資料來源:http://www.uhostdev.com/big5/html/a_WebTech/JavaScript/2010/0211/586.html
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
String.prototype.Rtrim = function()
{
return this.replace(/(\s*$)/g, "");
}
資料來源:http://www.uhostdev.com/big5/html/a_WebTech/JavaScript/2010/0211/586.html
2010年4月19日 星期一
2010年1月24日 星期日
在ASP.NET實作一個WebService
接到隔避高層的指示,要做一個WebService,功能是要傳送檔案。
於是我用最簡單的想法實作一個,以下是我的流程
1.找到要讀取的檔案
2.將該檔案讀入,使其成為一個Byte()
3.將該Byte()轉成Base64字串回傳
完畢!
但不知道為什麼?只要檔案是JPG檔,回傳就會當掉,且只有JPG是如此?
其他.png,.pdf,.doc,.bmp,.txt皆正常。
做了幾個測試,嘗試在WEB Service中處理或解讀該Byte()就會掛掉!
轉成字串->傳不出來
直接回傳Byte() ->傳不出來
直接顯示byte()各個內容組成字串->傳不回來
直接回傳該byte().toString()->這倒是正常回傳成"Object Byte[]"
於是我用最簡單的想法實作一個,以下是我的流程
1.找到要讀取的檔案
2.將該檔案讀入,使其成為一個Byte()
3.將該Byte()轉成Base64字串回傳
完畢!
但不知道為什麼?只要檔案是JPG檔,回傳就會當掉,且只有JPG是如此?
其他.png,.pdf,.doc,.bmp,.txt皆正常。
做了幾個測試,嘗試在WEB Service中處理或解讀該Byte()就會掛掉!
轉成字串->傳不出來
直接回傳Byte() ->傳不出來
直接顯示byte()各個內容組成字串->傳不回來
直接回傳該byte().toString()->這倒是正常回傳成"Object Byte[]"
訂閱:
文章 (Atom)