2013/09/18

[JavaScript] 回上一頁 script

 完整可用, 並已測試於下列瀏覽器: IE, FF, Safari, Chrome, Opera, Maxthon
<a href="#" onclick="javascript:window.history.back(-1);return false;"Back</a>
記得最終的 return false; 一定要加

2013/09/16

[SQL Server] 無法安裝資料庫圖表支援物件

在 SQL Server 建立各資料表間的關連, 最好用的功具就是 "資料庫圖表"

而今日將資料庫掛載在不同的 SQL Server 主機卻出現以下錯誤訊息:
無法安裝資料庫圖表支援物件,因為此資料庫沒有有效的擁有者。若要繼續,請先使用 [資料庫屬性] 對話方塊的 [檔案] 頁面,或使用 ALTER AUTHORIZATION 陳述式,將資料庫擁有者設定為有效的登入,然後再加入資料庫圖表支援物件。

要解決此問題, 請在該資料庫上按右鍵->屬性
選擇檔案, 並在 "擁有者" 的地方指定一個具有效登入的使用者即可

2013/05/16

JCrop - Fixing strange bug in Safari and Chrom

This is ok in Firefox, but somehow it works weird in Chrome.

$.Jcrop($('#cropbox'),options);

Doing below changes. All work fine in IE, Firefox, Safari, and Chrome!

$('#cropbox').Jcrop(options); 
var jcrop = $('#cropbox').data('Jcrop'); 
jcrop.setOptions(newOptions);

Good to go forward!

2012/01/31

32-bit DLLs 使用於 64-bit OS 發生 BadImageFormatException 錯誤之解決方法

今日在 64-bit 的主機使用 VS2010 編譯一支過去寫的程式
突然出現 BadImageFormatException 的錯誤訊息
原程式使用 VS2008 編譯, 當時好像沒有出現該錯誤, 或是我原本使用的 32-bit 主機來編譯
Anyway, 只是因為有一小段 code 要修改, 且把整個程式升級成 VS2010 的專案才浮現的錯誤
還好在看完 MSDN 上的 troubleshooting 之後, 動手變更編譯的 Target CPU: Any CPU 改成 x86 就搞定了



參考 MSDN 的分享:

32-bit DLLs on a 64-bit OS

This exception can occur when a .NET application running on a 64-bit platform attempts to load a DLL that does not support native 64-bit execution. If the application is built in platform-agnostic (i.e. "Any CPU") mode, it will launch in 64-bit mode on the host operating system, leading to this problem. To fix this, you can force the application to run in 32-bit mode by compiling for x86 architecture explicitly, forcing the program to launch in WoW64 mode on the 64-bit system, and allowing the 32-bit DLL to be accessed.

2011/06/22

釋放 Firefox cache 佔據硬碟空間

最近 C 槽空間慢慢被侵蝕

其中一個是常用的瀏覽器 Firefox -- 預設 cache 指定在使用者的資料夾內
不知不覺就被吃掉了不少空間

想要把 cache 資料夾指定到其他地方去, 步驟如下:
  1. 在網址列鍵入:“about:config”,開啟設定頁面
  2. 新增項目:“browser.cache.disk.parent_directory”, 屬性為字串、值為快取資料夾的完整路徑
  3. 重新啟動 Firefox,設定即生效

2011/05/01

日曆與通訊錄同步化 - 為您的 Apple 裝置設定 Google Sync

除了使用 CalDAV 方式同步更新日暦外,亦可使用 Exchange 來同步更新 郵件/日暦/通訊錄
若只有單純一個日暦要更新的話,直接選取 Exchange 方式即可(或有多個要同步,還是請你選擇 CalDAV 方式)

此方式皆可應用於 iPhone 及 iPad 的設定上!

CalDAV - Google 日曆同步功能設定 (適用 iPhone, iPad, Mac OSX)

iPad 2 新玩具到手,當然要快快同步手邊資訊

已經使用 Google Calendar 的朋友們,可以利用以下方法幫你的裝置做資料同步!

CalDAV - CalDAV 日曆同步功能

與您的裝置進行同步,請遵循下列步驟:

1. 開啟 iPad 裝置主畫面上的 [設定]
2. 開啟 [電子郵件/聯絡資訊/行事曆]
3. 選取 [加入帳號]
4. 選取 [其他]
5. 選取 [加入 CalDAV 帳號]

輸入您的帳戶資訊:
在 [伺服器] 欄位中,輸入 [ www.google.com ]
在 [使用者名稱] 欄位中,輸入完整的「Google 帳戶」Email (例如: xxx@gmail.com)
在 [密碼] 欄位中,輸入您的「Google 帳戶」密碼
在 [描述] 欄位中,輸入您想在帳戶中顯示的名稱

選取畫面 [下一步] 設定完成之後,請開啟 iPad 的 [日曆] 應用程式,系統將自動開始同步

根據預設,您的裝置只會與主要日曆同步。
如果要同步處理其他日曆,請至:https://www.google.com/calendar/syncselect

(「Google Apps」使用者可以前往  https://m.google.com/sync/settings/  https://www.google.com/calendar/hosted/your_domain/iphoneselect ,使用您的實際網域名稱取代「'your_domain」。)
選取您要同步的日曆,然後按一下 [儲存]。您選取的日曆會在下一次同步時顯示在裝置上。



2014/2/11 更新筆記