Archive for category Uncategorized

Date: September 5th, 2010
Cate: Uncategorized

關於 JSON 的新物件

請參考 Wishare 的 Handler/HistoryPush.aspx.vb

Date: September 4th, 2010
Cate: Uncategorized

Windows 2008 AD Domain 取消密碼複雜性

Open Group Policy Management Console (Start / Run / GPMC.MSC), open the Domain, and right-click and Edit the “Default Domain Policy”. Then dig into the “Computer Configuration”, “Windows Settings”, “Security Settings”, “Account Policies”, and modify the password complexity requirements setting.
Ref: http://yhlin.tw/?p=69

Date: July 16th, 2010
Cate: Uncategorized

SQL Server 2008 的 Join 方式 (當 View 的查詢變的很慢時)

在 SQL Server 2008 中, 對 View 之主要 Table 的欄位欄詢時, 該欄位有建立 Index, 但似乎沒有使用到. 因為資料量很大, 所以要花很多時間, 尤某是有用到 Top 時.
Solution:
把所有和該 Table 相關的 Join 改為 Left Join 或 Right Join, 以告知 SQL Server 該 Table 所有的資料都會被選出來, 這樣 SQL 就會使用該 Table 的 Index 了.

Date: July 16th, 2010
Cate: Uncategorized

SQL 2008 Maintenance Planes 無法執行

當執行時出現 sqlserver error 15404 could not obtain information about windows nt group user … 的訊息
1. 修改 Maintenance Plan 的 Connection(上方有一個 Manage Connections)
2. 修改 SQL Server Agent 中的相對應的 Job (我是改成 sa)

Date: July 6th, 2010
Cate: Uncategorized

IIS 開啟 Gzip 時, IE 下載 zip 檔會有問題

真是一個鳥問題, 要把 .ZIP 的 MIME Type 由 application/x-zip-compressed 改為 application/octet-stream 才行
Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
Right-click the server (local computer) tree, where server (local computer) is the name of your IIS server, and then click Properties.
Click MIME Types.
Scroll down the registered MIME type list to find the .zip entry.
Click the .zip [...]

Date: February 18th, 2010
Cate: Uncategorized

Javascript 字串的擴充 functions

一些 Javascript 的 String 擴充功能:
Substr
myVar = substr2(myVar, x, y); //Your function
myVar = myVar.substr(x, y); //built-in function
Trim
String.prototype.trim = function(){return
(this.replace(/^[\s\xA0]+/, “”).replace(/[\s\xA0]+$/, “”))}
startsWith
String.prototype.startsWith = function(str)
{return (this.match(“^”+str)==str)}
 endsWith
String.prototype.endsWith = function(str)
{return (this.match(str+”$”)==str)} 
Examples:
var myStr = “  Earth is a beautiful planet  ”;
var myStr2 = myStr.trim();  
//==“Earth is a beautiful planet”;
if (myStr2.startsWith(“Earth”)) // returns TRUE
if (myStr2.endsWith(“planet”)) // returns TRUE
if (myStr.startsWith(“Earth”))
// returns FALSE due to the leading spaces…
if [...]

Date: December 10th, 2009
Cate: Uncategorized

刪除 Postfix Queue 中的資料 – 電子報發送時的問題處理

刪除 Postfix Queue 中的資料