import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.net.URL; import java.net.URLConnection;
透過錯誤經驗,分享科技與遊戲當中的技術,提醒自己及瀏覽此網誌的人,避免踏進相同的陷阱。
本網誌只提供技術概要及合法軟件連結(如有)。
如閣下因下載、安裝、設定資料等操作,導致任何損失,請自行承擔風險及處理,在下不會負責。
2011-06-29
利用 Java 發送 HTTP POST 請求 (Using Java to send HTTP Request with POST method)
Labels:
Java
,
programming
2011-06-06
讓 Spreadsheet Excel Writer 的字串斷行 (Line Break in Spreadsheet Excel Writer)
先編寫一個使用 Spreadsheet Excel Writer 輸出 Excel 檔案的 php 文件
並在儲存格中加入 \n 來將字串
Write a simple PHP file using Spreadsheet Excel Writer to export Excel file
並在儲存格中加入 \n 來將字串
Write a simple PHP file using Spreadsheet Excel Writer to export Excel file
Labels:
Apache OpenOffice
,
Excel
,
LibreOffice
,
OpenOffice.org
,
PEAR
2011-04-04
Bio Hazard Zero (Ø) / Resident Evil Zero (Ø) 地圖 (Map)
地圖一覽
Labels:
Bio Hazard Ø
,
Bio Hazard Zero
,
Game
,
Resident Evil Ø
,
Resident Evil Zero
Bio Hazard / Resident Evil Remake 地圖 (Map)
地圖一覽
Labels:
Bio Hazard Remake
,
Game
,
Resident Evil Remake
2011-03-23
在 OpenOffice.org Calc 重覆列印列或欄 (Repeat printing row(s) or column(s) in OpenOffice.org Calc)
格式 -> 列印範圍 -> 編輯
選取合適的範圍、重覆的列或欄,然後按確定
但有時會出現錯誤
Format -> Print Ranges -> Edit
Select the suitable range, repeat row(s) or column(s), then press OK
However, sometimes an error will occur
Labels:
OpenOffice.org
2011-03-09
恢復 Ubuntu 的音量控制台 (Restore Ubuntu Volume Control Panel)
當升級 Ubuntu 系統後,有機會遺失音量控制台的快速啟動
雖然可以從 系統 > 偏好設定 > 聲音 來設定音量
這方法雖然可行,但只調整音量的情況下,顯得比較繁複
Sometimes after Upgrade your Ubuntu System, Volume Control Panel will be lost.
Although you can configure your System Volume in System > Preferences > Sound Preferences,
It is a tedious method that only increase, decrease or mute the volume.
雖然可以從 系統 > 偏好設定 > 聲音 來設定音量
這方法雖然可行,但只調整音量的情況下,顯得比較繁複
Sometimes after Upgrade your Ubuntu System, Volume Control Panel will be lost.
Although you can configure your System Volume in System > Preferences > Sound Preferences,
It is a tedious method that only increase, decrease or mute the volume.
2011-02-24
使用 Java 上載檔案至 FTP 伺服器 (Use Java to upload file to FTP Server)
import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import sun.net.TelnetOutputStream; import sun.net.ftp.FtpClient;
Labels:
FTP
,
Java
,
programming
2011-02-05
武器 VS Nemesis (Weapon VS Nemesis)
遊戲中正規武器對 Nemesis 的傷害數值
Labels:
Bio Hazard 3
,
Game
,
Resident Evil 3
2011-01-11
為 Ubuntu 增加字型 (Add font types in Ubuntu)
將字型檔案放置在 /usr/share/fonts/truetype 中
不過為了容易整理文件,建議先在 /usr/share/fonts/truetype 中建立一個資料夾
不過為了容易整理文件,建議先在 /usr/share/fonts/truetype 中建立一個資料夾
2011-01-01
讓 Windows Bootloader 載入 GRUB
為避免格式化 Ubuntu 後導致不能起動 Windows ,所以不讓 GRUB 成為 MBR
但使用 Windows 預設的 Bootloader 又不能列出非 Windows 的作業系統,所以需要改寫 C:\boot.ini
注意:胡亂改寫 C:\boot.ini 的會導致所有作業系統不能起動
If you use GRUB as MBR, after format Ubuntu partition GRUB will erase also
However, after re-build Windows Bootloader as MBR, GRUB2 will be replaced, and Ubuntu cannot be started for booting
So, how could let Windows Bootloader as MBR and boot up Ubuntu after GRUB2 is replaces
但使用 Windows 預設的 Bootloader 又不能列出非 Windows 的作業系統,所以需要改寫 C:\boot.ini
注意:胡亂改寫 C:\boot.ini 的會導致所有作業系統不能起動
If you use GRUB as MBR, after format Ubuntu partition GRUB will erase also
However, after re-build Windows Bootloader as MBR, GRUB2 will be replaced, and Ubuntu cannot be started for booting
So, how could let Windows Bootloader as MBR and boot up Ubuntu after GRUB2 is replaces
Labels:
Bootloader
,
GRUB2
,
Master Boot Record
,
MBR
,
Ubuntu
,
Windows
修復 Ubuntu 的 MBR (Recover Ubuntu GRUB as MBR)
GRUB 是一種出名的 Bootloader
但當 GRUB 被其他 Bootloader 覆蓋,如何重新讓 GRUB 成為 MBR ?
GRUB is a popular Bootloader.
However, how could we recover GRUB is covered by other Bootloader ?
但當 GRUB 被其他 Bootloader 覆蓋,如何重新讓 GRUB 成為 MBR ?
GRUB is a popular Bootloader.
However, how could we recover GRUB is covered by other Bootloader ?
Labels:
Bootloader
,
GRUB2
,
Linux
,
Master Boot Record
,
MBR
,
Ubuntu
修復 Windows 的 MBR (Recover Windows Bootloader as MBR)
若電腦系統曾經運行 Windows 與 Ubuntu 雙系統
當 Ubuntu 被格式化後,由於會連同 GRUB 一拼刪除,若果 MBR 被 Ubuntu 覆寫 MBR 不會引導 Windows 的 Bootloader
因此將會導致沒有 Bootloader 起動 Windows
若要重新起動 Windows 便需要修復 MBR 引導 Windows 的 Bootloader
If the computer run with Windows and UBunut 2 Systems
After you format Ubuntu, you should recover Windows Bootloader as Master Boot Record, otherwise you cannot boot to Windows Partition
You need to recover Windows Bootloader to boot the Windows Partition
當 Ubuntu 被格式化後,由於會連同 GRUB 一拼刪除,若果 MBR 被 Ubuntu 覆寫 MBR 不會引導 Windows 的 Bootloader
因此將會導致沒有 Bootloader 起動 Windows
若要重新起動 Windows 便需要修復 MBR 引導 Windows 的 Bootloader
If the computer run with Windows and UBunut 2 Systems
After you format Ubuntu, you should recover Windows Bootloader as Master Boot Record, otherwise you cannot boot to Windows Partition
You need to recover Windows Bootloader to boot the Windows Partition
Labels:
Bootloader
,
Master Boot Record
,
MBR
,
Windows
2010-12-21
Regular Expression 測試 3 (Regular Expression Test 3)
只利用 Regex 來測試字串是否符合日期格式
共 512 個字元
共 512 個字元
Labels:
Regular Expression
Regular Expression 測試 2 (Regular Expression Test 2)
只利用 Regex 來測試字串是否符合 IPv4 格式
共 158 個字元
共 158 個字元
Labels:
Regular Expression
2010-12-19
Regular Expression 測試 1 (Regular Expression Test 1)
只利用 Regex 來測試字串是否符合24小時制時間格式
共 80 個字元
共 80 個字元
Labels:
Regular Expression
2010-11-27
更改 Ubuntu 的 Button Layout (Modify button layout in Ubuntu)
Ubuntu10.04+ 的按鈕排放在左邊,變成與 Mac OS 相似的設定
這種設定使部分習慣使用 Windows 或各種 Linux (安裝 X Window System) 的用家或多或少構成不便
Ubuntu 允許使用者更改按鈕的擺放位置
The button layout move to the left side in Ubuntu10.04+, like Mac OS
This settings inconvenience the tranditional user of Windows or Linux (install with X Window System)
Ubuntu allow user to modify the button layout
這種設定使部分習慣使用 Windows 或各種 Linux (安裝 X Window System) 的用家或多或少構成不便
Ubuntu 允許使用者更改按鈕的擺放位置
The button layout move to the left side in Ubuntu10.04+, like Mac OS
This settings inconvenience the tranditional user of Windows or Linux (install with X Window System)
Ubuntu allow user to modify the button layout
PHP UTF-8 編碼與 session 及 header 問題 (Solving BOM of UTF-8 File Encoding problem with PHP session and header)
網絡上不少跨語言網頁大部分都是以 UTF-8 作為編碼
但利用 UTF-8 編碼編寫 PHP 文件使用到 session 及 header 時便會發生問題
UTF-8 編碼的文件會在文件檔頭加上 3個bytes 的資料,這 3個bytes 稱為 BOM - Byte Order Mark
在標準制式下 UTF-8 的這 3個bytes 分別是:
第一個byte - 0xef
第二個byte - 0xbb
第三個byte - 0xbf
UTF-8 is a popular File Encoding on the internet.
However, when we use UTF-8 with PHP using session and header there are some error occurs.
UTF-8 file has 3 bytes of data at the beginning of file, this 3 bytes called BOM - Byte Order Mark
The standard of UTF-8 file of this 3 bytes is:
1st byte - 0xef
2nd byte - 0xbb
3rd byte - 0xbf
但利用 UTF-8 編碼編寫 PHP 文件使用到 session 及 header 時便會發生問題
UTF-8 編碼的文件會在文件檔頭加上 3個bytes 的資料,這 3個bytes 稱為 BOM - Byte Order Mark
在標準制式下 UTF-8 的這 3個bytes 分別是:
第一個byte - 0xef
第二個byte - 0xbb
第三個byte - 0xbf
UTF-8 is a popular File Encoding on the internet.
However, when we use UTF-8 with PHP using session and header there are some error occurs.
UTF-8 file has 3 bytes of data at the beginning of file, this 3 bytes called BOM - Byte Order Mark
The standard of UTF-8 file of this 3 bytes is:
1st byte - 0xef
2nd byte - 0xbb
3rd byte - 0xbf
Labels:
PHP
,
programming
2010-11-17
Windows VISTA / Windows 7 不能使用 VBScript 的 CommanDialog (VBScript CommonDialog in Windows VISTA and Windows 7)
不少人在 Windows 處理簡單的程序時,往往會用到 VBScript
而使用 VBScript 涉及檔案存取時不少人都會想到使用 File Dialog 讓使用者有一個具 GUI 的檔案選擇工具
VBScript is a light, useful programming language (script) in Windows OS
We can write a VBS with notepad or any text editor
We always select a file with File Dialog
File Dialog is a user-friendly GUI for user to select a specific file
而使用 VBScript 涉及檔案存取時不少人都會想到使用 File Dialog 讓使用者有一個具 GUI 的檔案選擇工具
VBScript is a light, useful programming language (script) in Windows OS
We can write a VBS with notepad or any text editor
We always select a file with File Dialog
File Dialog is a user-friendly GUI for user to select a specific file
Labels:
programming
,
VBScript
,
Windows
2010-10-18
利用 PEAR 製作 Excel 檔案 (Use PEAR to create an Excel file)
PEAR 為 PHP Extension and Application Repository 的簡稱
是一種以 PHP 物件導向的設計的程式庫
PEAR is the abbreviation of PHP Extension and Application Repository
是一種以 PHP 物件導向的設計的程式庫
PEAR is the abbreviation of PHP Extension and Application Repository
Labels:
Excel
,
PEAR
,
PHP
,
programming
2010-10-11
Bio Hazard Remake / Resident Evil Remake Chris Invisible Enemy Hard
Labels:
Bio Hazard Remake
,
Game
,
Resident Evil Remake
訂閱:
文章
(
Atom
)