string[] AAA = { "abc", "def", "ghi", "jkl", "mno" };
string[] BBB = { "def", "jkl", "mno" };
// 交集
var temp1 = AAA.Intersect(BBB);
// 差集
var temp2 = AAA.Except(BBB);
// 聯集
var temp3 = AAA.Union(BBB);
2011年10月20日 星期四
LINQ 的集合操作
LINQ 的集合操作。
將十進制的 Unicode 碼轉回文字
紀錄一下將十進制的 Unicode 碼,轉回文字的方式。
int unicodeInt = 21452; byte[] byteArray = new byte[2]; byteArray[0] = (byte)(unicodeInt); byteArray[1] = (byte)(unicodeInt >> 8); string unicodeString = Encoding.Unicode.GetString(byteArray);就像這樣。
2011年9月29日 星期四
[jQuery] 取得連結內容,將其放到容器中。
jQuery 取得連結內容後,將內容放到容器中。
網頁連結
// jQuery
$(document).ready(function () {
$(".link").click(function () {
$("div#container").empty().load($(this).attr('href'));
return false;
});
});
標籤:
jQuery
2011年7月25日 星期一
[SQL Server] 筆記 "限制的使用者"
最近從人家那拿來的 DB 備份,還原後總是會在 db 後面加上(限制的使用者),
運作上感覺是沒什麼問題,可是總覺得那字樣很礙眼,哈哈。
Google 到的方法,筆記一下。
運作上感覺是沒什麼問題,可是總覺得那字樣很礙眼,哈哈。
Google 到的方法,筆記一下。
ALTER DATABASE [YourDBName] SET MULTI_USER WITH ROLLBACK IMMEDIATE;就這樣...
訂閱:
意見 (Atom)