標籤

ASP.NET MVC (29) Visual C# (15) JQuery (10) Plugins (8) JQuery Plugins (6) JavaScript (6) MySQL (5) CSS (4) LinQ (4) Mac OS (4) CentOS (3) Design Pattern (3) Entity Framework (3) IIS (3) Python (3) Windows (3) php (3) Docker (2) LAMP (2) SQL Server (2) WCF (2) .NET (1) .NET Core (1) AWS (1) Browser (1) GIS (1) IE (1) Internet Security (1) Linux (1) Platform (1) React (1) SEO (1) Testing (1) VMware (1) Windows 7 (1) cookie (1) curl (1) laravel (1) phpBB (1) session (1) 中古屋 (1) 透天 (1) 閒言閒語 (1) 面試 (1) 鳥松 (1)

2012年9月4日 星期二

[Windows] MSDN開放下載 Windows Server 2012正式版

MSDN開放下載 Windows Server 2012正式版囉 總共有五個版本
有訂閱的人可以下載來玩玩看~


Windows Server 2012 Standard
零售
您已索取 0 個金鑰 (共 ? 個金鑰)
Windows Server 2012 Datacenter
零售
您已索取 0 個金鑰 (共 ? 個金鑰)
Windows Server 2012 Storage Server Workgroup
零售
您已索取 0 個金鑰 (共 ? 個金鑰)
Windows Server 2012 Storage Server Standard
零售
您已索取 0 個金鑰 (共 ? 個金鑰) 
Windows Server 2012 Foundation
零售
您已索取 0 個金鑰 (共 ? 個金鑰) 


WIKI 有版本差異比較表,上面的取得金鑰連結無作用,請登入自己的MSDN帳戶下載。

2011年11月10日 星期四

[JavaScript] function statement requires a name

function statement requires a name
---

在ASP MVC中使用 Ajax:
@Ajax.ActionLink("刪除", "Delete", new { id = item.Id },
new AjaxOptions()
{
HttpMethod= "Delete",
Confirm="你確定要刪除嗎?",
OnSuccess = "function() { alert('hello'); }"
})

改為下面這樣就好了:
OnSuccess = "(function() { alert('hello'); })()"

Reference :

Javascript anonymous functions in Firefox 7

2011年11月9日 星期三

伺服器 '' 上的 MSDTC 無法使用。

昨天懶得重開電腦,就直接休眠了,結果今天早上run程式的時候就發生這個錯誤:

'/' 應用程式中發生伺服器錯誤。

伺服器 'XX\SQL2008R2' 上的 MSDTC 無法使用。

描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.Data.SqlClient.SqlException: 伺服器 'XX\SQL2008R2' 上的 MSDTC 無法使用。

原始程式錯誤: ...

---
後來發現是 Distributed Transaction Coordinator (MSDTC) 這個服務停止了,所以只要有包含交易(Transaction)的區段都會出錯,把服務重新啟動一次就好囉。


2011年10月17日 星期一

[LinQ] 將多個判斷條件合併,使用And或Or

我希望可以使用And與Or來合併LinQ語法中的判斷式,例如:



//名稱包含關鍵字
Expression< Func< Models.Product, bool>> productNameContainsKeyword =
c => c.Name.Contains(input.Keyword);

//價格大於多少
Expression< Func< Models.Product, bool>> productPriceMoreThan =
c => c.Price >= priceFrom.Value;

//兩個條件And
var result = (from s in contex.ProductSet.Where(
productDecriptContainsKeyword.And(productPriceMoreThan)
)


Cool~



很好玩的實作方式:

[ASP.NET MVC] 定義自訂欄位驗證屬性並且在clinet端驗證

perform the client side validation for custom attribute

欄位自己驗證,不須其他欄位,看這個:


驗證中必須含有其他欄位,很不錯的解答:

---


2011年10月16日 星期日

[ASP.NET MVC] 快取( Cache ) 的機制

MVC 中有內建屬性可以控制是否要再Client端作cache,也有Server-cache的機制,如果我們是某個partialView要快取在server,則直接在Action上使用:
[System.Web.Mvc.OutputCache(Duration = 60)]


或者直接操作比較底層的東西:


---
保哥這篇很棒:


[GIS] 何謂TWD67 / 97 、WGS84、TM2

TWD67 / 97 、WGS84 是大地基準(Datum)

TM2 : 二度分帶 是指大地座標系統

座標有分為經緯度座標( 立體地球 ),以及平面座標 ( UTM )等,

而平面座標示由立體投影而來,以2D(平面)畫3D(立體),那就一定會有失真問題。

一些不錯的資訊: