已經有兩年沒來更新網址了~~
Abe2k 你過的還好嗎?
你的成長還在繼續嗎?
正面的力量
歡迎各位的來到,請隨意找個地方坐下,即將為你撥映「生活點滴」。
2018/5/10
2016/11/25
移動 Outlook2013 OST等檔案到非C槽, 以釋出C槽空間。
Step.1
Copy "C:\Users\(登入名稱)\AppData\Local\Microsoft\Outlook" 至 "D:\DirJunction\Outlook"Step.2
Rename "C:\Users\(登入名稱)\AppData\Local\Microsoft\Outlook" 為 "Outlook_"Step.3
mklink "C:\Users\(登入名稱)\AppData\Local\Microsoft\Outlook" "D:\DirJunction\Outlook"Step.4
Step4.1 開啟Outlook , 檢查是否正常開啟Step4.2 檢視 D:\DirJunction\Outlook 檔案修改時間是否可正常修改。表示Outlook 已讀取新位置檔案
Step4.3 檢視 C:\Users\(登入名稱)\AppData\Local\Microsoft\Outlook 檔案修改時間已沒有變動。表示Outlook 已不再讀取舊檔案位置。
Step.5
確認無誤後。刪除原C槽資料夾資料。(危險)Delete "C:\Users\(登入名稱)\AppData\Local\Microsoft\Outlook_" 檔案夾。
釋放C槽空間。
2014/11/25
Get Windows account by NodeJS with Nope-SSPI
- Install nodeJS application.
- Install nodeJS module
- npm install express@3.4.3
- npm install node-sspi
- Create a app.js file
- Exec the app.js file
- Open IE or Chrome Browser then browser the url "http:\\localhost:3000 "
Reference: https://www.npmjs.org/package/node-sspi
NodeJS Reading List
陸續補充中....
Authentication
User Authentication With Passport.jshttp://mherman.org/blog/2013/11/11/user-authentication-with-passport-dot-js/#.VHMEutKUffI
passport-windowsauth
https://www.npmjs.org/package/passport-windowsauth
◎Windows SSPI server-side authentication for Node
https://www.npmjs.org/package/node-sspi
The SSPI will get the client user windows account by IE or Chrome.
But needed express@3.4.4 (the latest version will compile error.)
[more code...]
◎Windows SSPI server-side authentication for Node
https://www.npmjs.org/package/node-sspi
The SSPI will get the client user windows account by IE or Chrome.
But needed express@3.4.4 (the latest version will compile error.)
[more code...]
Authorize
cansecurity
https://www.npmjs.org/package/cansecurityMail helper
nodemailer
2014/11/21
Mongoose shutdown immediately when start it on Window, exec "mongod --repair" on Mongoose\Bin .
Shutdown message:
Mongoose shutdown immediately when start it on Window,
exec "mongod --repair" on '~Mongoose\Bin '.
Then restart mongod service.
Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
exec "mongod --repair" on '~Mongoose\Bin '.
Then restart mongod service.
2014/8/12
System.ArgumentException: The specified string is not in the form required for a subject.(指定字串不在主旨的必要表單中)
當操作.Net 寄信時, 若信件主旨會隨 User KeyIn 資料而有所變動時,
以上狀況就有可能發生了.
發生原因為:
信件主旨中含有 (\r) 或 (\n) 的狀況~~慘遭Mail Server 退信.
報錯:
解決辦法:
置換 寄信當下的主旨內容
this._mailsubject = subject.Replace("\r", "").Replace("\n", "");
以上狀況就有可能發生了.
發生原因為:
信件主旨中含有 (\r) 或 (\n) 的狀況~~慘遭Mail Server 退信.
報錯:
解決辦法:
置換 寄信當下的主旨內容
this._mailsubject = subject.Replace("\r", "").Replace("\n", "");
2013/12/2
資料類型優先順序 Data Type Precedence (Transact-SQL)
當一個運算子結合兩個不同資料類型的運算式時,資料類型優先順序的規則,會指定將低優先順序的資料類型,轉換為高優先順序的資料類型。 如果轉換不是支援的隱含轉換,就會傳回錯誤。 如果這兩個運算元運算式的資料類型相同,則作業結果就含有該資料類型。
eg. Table [T1] 有 Column [C1] 設計為 varchar, 存放數字資料
比對條件下 select * from T1 where c1 = 1
SQL Server 需先將 C1 欄位都先轉型成int (此時也有可能發生轉型失敗)才進行比對.
SQL Server 會使用下列資料類型優先順序:
eg. Table [T1] 有 Column [C1] 設計為 varchar, 存放數字資料
比對條件下 select * from T1 where c1 = 1
SQL Server 需先將 C1 欄位都先轉型成int (此時也有可能發生轉型失敗)才進行比對.
SQL Server 會使用下列資料類型優先順序:
- 使用者自訂資料類型 (最高)
- sql_varian t
- xml
- datetimeoffset
- datetime2
- datetime
- smalldatetime
- date
- time
- float
- real
- decimal
- money
- smallmoney
- bigint
- int
- smallint
- tinyint
- bit
- ntext
- text
- image
- timestamp
- uniqueidentifier
- nvarchar (包括 nvarchar(max) )
- nchar
- varchar (包括 varchar(max) )
- char
- varbinary (包括 varbinary(max) )
- binary (最低)
2013/11/20
2013/7/24
updatepanel 回傳檔案
UpdatePanel 若使用 <asp:AsyncPostBackTrigger > 回傳檔案(Response.WriteFile)會失效。
可改用<asp:PostBackTrigger> 使用。
PS.
Response.Write 需自製HTTP Header
if (CurrentPage.Request.Browser.Browser.ToUpper() == "IE")
{
CurrentPage.Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(FileName, System.Text.Encoding.UTF8));
} else
{
CurrentPage.Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName);
}
CurrentPage.Response.BinaryWrite(ms.ToArray());
//CurrentPage.Response.WriteFile(File);
可改用<asp:PostBackTrigger> 使用。
Response.Write 需自製HTTP Header
{
CurrentPage.Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(FileName, System.Text.Encoding.UTF8));
{
訂閱:
文章 (Atom)