Archive

‘未分類’ 分類過的Archive

利用jQuery UI的datepicker製作datetime選擇器

2009年12月18日 Austin 尚無評論

使用法方:

<input type="hidden" id="t1" name="t1" value="2009-01-01 00:00:00" />
<script language="javascript">
$('#t1').datetime({
    dateFormat: "yy-mm-dd",
    defaultDate: $(this).val(),
    changeMonth: true,
    changeYear: true,
});
</script>

Plugin的程式碼:
閱讀全文…

JavaScript Date Object

2009年12月17日 Austin 尚無評論

JavaScript Date Object是一個用來處理日期及時間的物件
可由下列幾種方式建立:

// 取得目前的日期及時間
var d = new Date();

// 指定時間
var d = new Date(milliseconds);
var d = new Date(dateString);
var d = new Date(year, month, day, hours, minutes, seconds, milliseconds);

// 判斷輸入時間是否正確
if(isNaN(d.getTime())) {
    alert("Invalid Date!");
}

詳細用法請參考:JavaScript Date Object

Categories: Javascript, 未分類 Tags: ,

我的創意idv.tw + Google Apps

2009年10月22日 Austin 尚無評論

Step 1. 查詢想要註冊的網域名稱是否已經有人註冊
進入http://www.showking.tw/,點擊 "我的創意idv.tw體驗活動"
在下面表單內輸入想要申請的名稱,按下送出之後只要沒有出現 "已有人申請,請重新選擇"即可往下一步進行
閱讀全文…

Categories: Google, 未分類 Tags: ,

Google Maps路經規劃

2009年9月15日 Austin 尚無評論

忙錄了好一陣子Blog也荒廢了好久了
Google Maps一直很想碰,但都沒有時間所以不太敢碰>"<
結果剛好在ptt看到有人問Google Maps問題,就手癢了起來~~~
還沒有時間仔細研究,這問題之後也可能會遇到,先來記一下

ptt.cc 文章代碼(AID): #1Agx_S0P (Ajax)

問題1:送出後無法正常顯示?
解決:GDirections.load()的第二個參數是要用json來傳送

問題2:用完整地可以正常計算出路徑,但是只用"世新大學"跟"台北火車站"卻不行?
解決:補上Taiwan就可以了,例:"Taiwan 世新大學"跟"Taiwan 台北火車站",或是直接讓程式自己補上

function showAddress(address1,address2)  {
    directions.load("from: Taiwan "+address1+" to: Taiwan "+address2, { "locale": "zh_TW" });
}

測試網址:http://blog.gclin.org/gmap.php

參考資料:Google Maps API ReferenceGDirectionsGDirectionsOptions

可同時測試多個版本的IE測試器 – IETester

2009年5月12日 Austin 尚無評論

IETester 可在Vista及XP上測試IE8、IE7、IE 6和IE5.5顯示的結果與javascript,並且支援多國語言
IETester

官方網站:http://www.my-debugbar.com/wiki/IETester/HomePage
下載點:IETester v0.3.3

Categories: 未分類 Tags: ,

用C#寫Windows服務(Wndows service)含Timer及安裝專案

2009年5月11日 Austin 尚無評論

Step 1. 建立專案
檔案 => 新增 => 專案
選擇 Visual C# => Windows => Windows 服務 => 填寫相關訊息
建立專案

閱讀全文…

Categories: 未分類 Tags: , ,

速查表(Cheat Sheets)

2009年4月20日 Austin 尚無評論

關於作者:A Coding Fool: About Me
資料來源:A Coding Fool: Cheat Sheets

.NET String Formatting – This cheat sheet contains all of the standard and custom format string used to format dates, times, and numbers in .NET.

ASP.NET Life Cycle – This cheat sheet is a diagram of the events that occur throughout the ASP.NET Application and Page life cycle.

CSS – This cheat sheet list and describes all of the properties in the CSS2 specification.

Design Patterns – This cheat sheet describes and illustrates all of the Gang of Four design patterns.

HTML Character Entities – This cheat sheet all of the HTML 4 character entities references.

HTML Colors – This cheat sheet contains a chart of 1050 colors varied by hue, saturation, and brightness and a chart of Web-safe colors.

jQuery 1.3 – This cheat sheet is a quick reference to functions and properties in the jQuery 1.3 library.

LINQ Query Operators – This cheat sheet contains all of the standard query operators to be used with LINQ.

XHTML 1.1 – This cheat sheet contains elements and attributes available in the XHTML 1.1 specification.

vsftp Virtual User對MySQL認證 – 建立使用者

2009年4月14日 Austin 尚無評論

假設現在要建立一個使用者帳號test密碼testpss
並將登入後的根目錄指定到/xxx/abc

vsftp的帳號是存在vsftp這個資料庫內的users這個table
帳號的欄位是username,密碼是password
user_config_dir=/etc/vsftpd/vsftpd_user_conf/

Step 1. 建立帳號
進入資料庫執行下列語法

閱讀全文…

Categories: Linux, MySQL, 未分類 Tags: , , ,

jQuery plugins cookie

2009年4月13日 Austin 尚無評論

一種簡單,輕巧實用插件,讀、寫和刪除Cookies
下載:ZIPSVN

使用方法:

// 取得cookie
$.cookie('the_cookie');

// 設定cookie
$.cookie('the_cookie', 'the_value');

// 設定cookie,並指定7天後失效
$.cookie('the_cookie', 'the_value', { expires: 7 });

// 刪除(立即失效)
$.cookie('the_cookie', '', { expires: -1 });

// 刪除
$.cookie('the_cookie', null);

相關連結:Plugins | jQuery PluginsRepository
參考網站:Klaus Hartl – Stilbüro : Cookie Plugin for jQuery

Categories: jQuery, 未分類 Tags: , ,

利用PEAR的Auth+Net_POP3對Gmail做身份驗證

2009年4月1日 Austin 尚無評論

注意事項:
1. php_openssl這個extension是否有正常啟動
2. PEAR的Auth及Net_POP3是否已安裝
3. gmail帳號是否啟用,並且允許使用POP3收信
4. 不使用指定登入的網域,則帳號必須是完整的mail(例:xxxxx@gmail.com)

閱讀全文…

Categories: PHP, 未分類 Tags: , , , , ,