<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2026368564523045877</id><updated>2024-10-12T02:35:39.489+08:00</updated><category term=".NET"/><category term="C#"/><category term="ASP.NET MVC"/><category term="SQL Server"/><category term="TDD"/><category term="自動測試"/><category term="ASP.NET Core"/><category term="AWD"/><category term="Ford"/><category term="Javascript"/><category term="Kuga"/><category term="LINQ"/><category term="Linked Server"/><category term="NuGet"/><category term="SignalR"/><category term="TDCi"/><category term="Visual Studio"/><category term="android"/><category term="jQuery"/><title type='text'>Frank&#39;s blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-1130064613318271431</id><published>2020-08-09T22:35:00.000+08:00</published><updated>2020-08-09T22:35:08.314+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET Core"/><title type='text'>ASP.NET Core 3.1 on CentOS 8</title><summary type="text">最近有個案子，環境限定 CentOS + PostgreSQL 而且還要 HA(High availability) 的架構。是我完全不熟的東西，在經過多方摸索以後，把相關安裝設定方式記錄一下。

首先提到 HA，正式環境是用 L4 Switch 做 Round Robin AA，由於 L4 Switch 不是我玩的起的硬體，所以 Google 了一下，看看有沒有什麼替代方案？於是找到了富人用 L4 Switch，窮人用 Linux HAProxy！

那我們準備三個 VM 分別是 HAProxy, Web 1, Web2 IP 分配如下：

  
    
      ServerIP
    
    
      HAProxy192.168.0.130
      Web 1192.168.0.131
      Web 2192.168.0.132
    
  


所以我們</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/1130064613318271431/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/1130064613318271431' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/1130064613318271431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/1130064613318271431'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2020/08/aspnet-core-31-on-centos-8.html' title='ASP.NET Core 3.1 on CentOS 8'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-7078079923031107805</id><published>2015-10-25T22:33:00.001+08:00</published><updated>2015-10-25T22:33:45.528+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="TDD"/><category scheme="http://www.blogger.com/atom/ns#" term="自動測試"/><title type='text'>自動測試與 TDD 實務開發(使用C#) Day 2 心得</title><summary type="text">回顧從第一天的基礎觀念說明，以及介紹一些好用的工具(很重要！因為要容易導入，先決條件就是，簡單好用、容易上手不會造成太多的負擔。)，再告訴我們如何將需求轉化為測試案例。
 第二天告訴我們，如何簡單容易(第二次了！)的建立整合測試保護目前已有的程式，接著透過重構來償還這些技術債務，最後再將重構後的程式建立單元測試加以驗證與保護。

 而且！這課程是帶著你一步一步地做，讓你實際去體會：從需求出發，建立測試案例，然後將測試案例逐步地完成測試，你的程式就完成了；和你看了需求直接想程式該怎麼寫，其實差不了多少。

 當思維從看到需求直接想 code 
怎麼寫，轉化為如何透過測試案例講清楚需求，慢慢地就會感覺到這樣寫程式，很輕鬆，不會有多餘的程式產生。不然很容易落入一種寫很爽，但是會用到的沒多
少！一旦真的要用可能還不符合需求......那不是很浪費生命嗎?生命應該要浪費在美好的事物上，電視上不是常</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/7078079923031107805/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/7078079923031107805' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7078079923031107805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7078079923031107805'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2015/10/tdd-c-day-2.html' title='自動測試與 TDD 實務開發(使用C#) Day 2 心得'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-5474490741475454990</id><published>2015-10-18T00:20:00.000+08:00</published><updated>2015-10-18T16:23:13.941+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="TDD"/><category scheme="http://www.blogger.com/atom/ns#" term="自動測試"/><title type='text'>自動測試與 TDD 實務開發(使用C#) Day 1 筆記</title><summary type="text">前言==========
這次運氣不錯，有幸報到第四梯的課程，
其實在第三梯的時候就想報名了，不過剛好有兩位好友先後結婚，
只好期待 Joey 的第四梯了！
也感謝 Joey 用心準備與持續精進的課程內容，
這應該也是一種早買早享受(提早進入這領域)，晚買享折扣(學到更多)的概念吧！

對課程有興趣，或是想要導入測試來強化產品，真的大力推薦 Joey 課程，網址如下：
https://skilltree.my/events/mbh
一定是物超所值的。

另外是他的粉絲團『91 敏捷開發之路』
https://www.facebook.com/91agile
以及點部落『In 91』
http://www.dotblogs.com.tw/hatelove

心得==========
第一天的主軸在於：

【老闆是花錢請你來寫 production code 不是來寫測試的！】

重點還是在</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/5474490741475454990/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/5474490741475454990' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5474490741475454990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5474490741475454990'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2015/10/tdd-c-day-1.html' title='自動測試與 TDD 實務開發(使用C#) Day 1 筆記'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-4306141865877698444</id><published>2015-10-10T16:17:00.001+08:00</published><updated>2015-10-10T16:22:55.830+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWD"/><category scheme="http://www.blogger.com/atom/ns#" term="Ford"/><category scheme="http://www.blogger.com/atom/ns#" term="Kuga"/><category scheme="http://www.blogger.com/atom/ns#" term="TDCi"/><title type='text'>Ford 24小時免費試駕</title><summary type="text">首先感謝福特萬達汽車的方副理，從他那邊取得 24h 試駕體驗券一張，

再和桃園艾維士確認有 TDCi 的日期後便預約取車了。

取車當天有個小插曲，google map 導航居然帶我到和運租車......

我當時滿心雀躍想要開 Kuga 也沒注意招牌，

直接進門說『我要取車......』，真是太丟臉了。



糗事不多說，接著我們來驗明正身，打開引擎蓋！



引擎室的配置和 Focus MK 2.5 還挺像的。








正副駕駛車門都有貼的活動貼紙！





Kuga 銘牌



TDCi AWD



這尾燈還不錯！



原廠18吋的鋁圈



擁有全景天窗的車頂。



讓我們從後車門進入吧！（因為我比較關心後座，哈哈！）





這是展示間，以及上次在 Costco 看到的椅背角度，

因為登記客貨車的關係，所以會多加一些橫桿，

導致乘坐時會覺得很挺，不舒服</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/4306141865877698444/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/4306141865877698444' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4306141865877698444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4306141865877698444'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2015/10/ford-kuga-24.html' title='Ford 24小時免費試駕'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUxjP0jzUWTGDeX-UZRT7mzu21WoQrmsORHJBUCrQ81T2RUrRnUFSe4tiM2ktpU_Lvo-RmsLRi0gUXci15X4tRZ8h2SeEbGjM-opp6m-bMVK9NIbbdqpA3HNf7q1uSZ5qVHwpxa7ElekGx/s72-c/P1040074.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-6958503698327773357</id><published>2015-07-28T11:17:00.000+08:00</published><updated>2015-07-28T11:17:39.427+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NuGet"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>NuGet 快取導致 Install-Package -Version 失效，Update-Package 回應沒有更新</title><summary type="text">最近 Visual Studio 2015 發行了，馬上裝來體驗一下，

結果開啟 Visual Studio 2013 就有些怪怪的了！？
〈是不是裝 2015 造成的我還真不確定。〉

首先是 NuGet 套件管理器主控台 Update-Package 指令下下去，
所有套件都說沒有更新！？

但是對已經存在的套件直接下 Install-Package 卻會裝新版！
這什麼黑魔法！？

然後&amp;nbsp;Install-Package&amp;nbsp;指定安裝套件的版本(-Version X.XX)失敗！











後來發現似乎是快取惹的禍，所以就要來清除快取了。
先到【工具 / NuGet 套件管理員 / 套件管理員設定 】




































進入畫面後

























點選【清除套件快取】</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/6958503698327773357/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/6958503698327773357' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6958503698327773357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6958503698327773357'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2015/07/nuget-install-package-version-update.html' title='NuGet 快取導致 Install-Package -Version 失效，Update-Package 回應沒有更新'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm9Pd_oivaSETRnkQQSnJiW4OtjiU45vU5lHIUO_vfJxaKAS-nRu0uie27agC7cDwMT2DJ1S4WIY5HzqkClL78Hp1qoEZodin7K2hjjO0M7OXAMZ2wOdLeacKgnjkv1d6vom-HMxAQXnLl/s72-c/%25E8%259E%25A2%25E5%25B9%2595%25E5%25BF%25AB%25E7%2585%25A7+2015-07-28+10.23.24.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-6755038522160158176</id><published>2013-02-23T14:23:00.000+08:00</published><updated>2013-02-23T14:23:11.949+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="SignalR"/><title type='text'>SignalR 初體驗</title><summary type="text">
最近有個需求，就是研究類似 facebook, plurk 等即時更新 client 畫面的技術，

技術細節可以 google &quot;long-polling&quot; 就會有需多相關文章，

也剛好，去年七月左右 Microsoft 推出了&amp;nbsp;SignalR ，當時只是覺得這功能超炫的，

但是沒有馬上動手試看看，直到最近開始找相關的文章，

看到了黑暗執行緒大大的文章利用SignalR實現遠端程式遙控功能，

覺得一定要動手嘗試看看，而且大大都把範例程式都給貼上來了，

所以馬上來測試。



不過立刻就碰到問題了，當時版本和現在版本差一半吧(0.5?和1.0)

連 namespace 都不一樣了，不過我想應該小小的修改一下就可以了吧。

原始程式範例請至黑暗執行緒大大的網站觀賞，以下僅列出需要修改的地方。



SignalRClient 專案的部分以 NuGet 安裝&amp;nbsp</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/6755038522160158176/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/6755038522160158176' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6755038522160158176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6755038522160158176'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2013/02/signalr.html' title='SignalR 初體驗'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9PaxGjK16AM7HcmI3WiK_z2Ji0yuLANORZLmw5wla73RzIr6wdpu6oNfzJnqyTEITQAKdot3sT0gxPTmwctmk-AyVqMnnLwmaohpQ1eKivSB504Z13PVtZSc_Xt7H5i2cE2Uk69eWQG-t/s72-c/2013-02-23_092932.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-4104955282388360667</id><published>2012-07-27T07:35:00.002+08:00</published><updated>2012-07-27T07:36:08.267+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Microsoft® SQL Server® 2008 R2 SP2 釋出</title><summary type="text">
2012-07-26&amp;nbsp;Microsoft® SQL Server® 2008 R2 SP2 釋出

官方下載連結

中文版
MicrosoftR SQL ServerR 2008 R2 Service Pack 2

MicrosoftR SQL ServerR 2008 R2 SP2 - Express Edition

MicrosoftR SQL ServerR 2008 R2 SP2 功能套件
</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/4104955282388360667/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/4104955282388360667' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4104955282388360667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4104955282388360667'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2012/07/microsoft-sql-server-2008-r2-sp2.html' title='Microsoft® SQL Server® 2008 R2 SP2 釋出'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-228765383654139839</id><published>2011-10-20T14:38:00.002+08:00</published><updated>2011-10-20T14:38:43.088+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><title type='text'>LINQ 的集合操作</title><summary type="text">LINQ 的集合操作。


string[] AAA = { &quot;abc&quot;, &quot;def&quot;, &quot;ghi&quot;, &quot;jkl&quot;, &quot;mno&quot; };
string[] BBB = { &quot;def&quot;, &quot;jkl&quot;, &quot;mno&quot; };

// 交集
var temp1 = AAA.Intersect(BBB);
// 差集
var temp2 = AAA.Except(BBB);
// 聯集
var temp3 = AAA.Union(BBB);



SyntaxHighlighter.all();</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/228765383654139839/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/228765383654139839' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/228765383654139839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/228765383654139839'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2011/10/linq.html' title='LINQ 的集合操作'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-6498656068366093874</id><published>2011-10-20T14:12:00.001+08:00</published><updated>2011-10-20T14:12:26.376+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>將十進制的 Unicode 碼轉回文字</title><summary type="text">紀錄一下將十進制的 Unicode 碼，轉回文字的方式。


int unicodeInt = 21452;
byte[] byteArray = new byte[2];
byteArray[0] = (byte)(unicodeInt);
byteArray[1] = (byte)(unicodeInt &gt;&gt; 8);
string unicodeString = Encoding.Unicode.GetString(byteArray);


就像這樣。


SyntaxHighlighter.all();</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/6498656068366093874/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/6498656068366093874' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6498656068366093874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6498656068366093874'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2011/10/unicode.html' title='將十進制的 Unicode 碼轉回文字'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-7112434771184761443</id><published>2011-09-29T10:53:00.001+08:00</published><updated>2011-09-29T10:54:39.600+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>[jQuery] 取得連結內容，將其放到容器中。</title><summary type="text">jQuery 取得連結內容後，將內容放到容器中。


&lt;!-- 容器 --&gt;

&lt;!-- 連結 --&gt;
網頁連結


// jQuery
$(document).ready(function () {
    $(&quot;.link&quot;).click(function () {
        $(&quot;div#container&quot;).empty().load($(this).attr(&#39;href&#39;));
        return false;
    });
});





SyntaxHighlighter.all();</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/7112434771184761443/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/7112434771184761443' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7112434771184761443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7112434771184761443'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2011/09/jquery.html' title='[jQuery] 取得連結內容，將其放到容器中。'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-4484254343917875398</id><published>2011-07-25T15:34:00.000+08:00</published><updated>2011-07-25T15:34:58.344+08:00</updated><title type='text'>[SQL Server] 筆記 &quot;限制的使用者&quot;</title><summary type="text">最近從人家那拿來的 DB 備份，還原後總是會在 db 後面加上(限制的使用者)，
運作上感覺是沒什麼問題，可是總覺得那字樣很礙眼，哈哈。
Google 到的方法，筆記一下。
ALTER DATABASE [YourDBName]
SET MULTI_USER WITH ROLLBACK IMMEDIATE;
就這樣...



SyntaxHighlighter.all();</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/4484254343917875398/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/4484254343917875398' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4484254343917875398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/4484254343917875398'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2011/07/sql-server.html' title='[SQL Server] 筆記 &quot;限制的使用者&quot;'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-5930576079845701399</id><published>2010-11-15T15:40:00.000+08:00</published><updated>2010-11-15T15:40:01.113+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>[android] 開發 android 應用程式資源記錄</title><summary type="text">wiki
androidbmi

部落格
安裝與設定開發環境
[安裝教學]使用Eclipse開發Android程式

Hello World!
[教學]Android的第一個程式

實機 Debug
[Android]如何發佈開發好的程式至手機

內容相當豐富的 blog 值得去挖寶
ysl 的程式天堂 - Android 應用開發‧研究‧與諮詢

討論區
JavaWorld＠TW
Java ME、Google Android 平台與 JavaCard 討論區

工具
快速產生頁面 layout 的線上工具，非常方便，比用 eclipse 快多了
DroidDraw Beta</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/5930576079845701399/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/5930576079845701399' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5930576079845701399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5930576079845701399'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/11/android-android.html' title='[android] 開發 android 應用程式資源記錄'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-360394356518807076</id><published>2010-09-15T22:09:00.000+08:00</published><updated>2010-09-15T22:09:12.614+08:00</updated><title type='text'>[筆記]不用第三個變數，交換兩個數值的方法</title><summary type="text">今天翻到一段程式碼，想不起來這是在做些什麼?
後來終於找到這段程式是在做交換兩個數值，
而且，不宣告第三個變數!
其實好像也不是什麼大不了的東西，
不過還是筆記一下，人老了越來越會忘東忘西...

不宣告第三個變數暫存的方式
int a = 10;
int b = 5;

a ^= b;
b ^= a;
a ^= b;

結果就會從 a = 10, b = 5，
變成 a = 5, b = 10

宣告第三個變數暫存的方式
int a = 10;
int b = 5;
int temp;

temp = a;
a = b;
b = temp;

一樣的結果，不一樣的寫法，
簡單來說前者就是拿時間換空間，
後者就是拿空間換時間。


SyntaxHighlighter.all();</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/360394356518807076/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/360394356518807076' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/360394356518807076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/360394356518807076'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/09/blog-post.html' title='[筆記]不用第三個變數，交換兩個數值的方法'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-6958070359810997715</id><published>2010-08-02T20:58:00.006+08:00</published><updated>2010-08-28T11:26:52.773+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linked Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>連結的伺服器(Linked Server)筆記</title><summary type="text">之前佈署測試環境，發生了一連串關於&quot;連結的伺服器(Linked Server)&quot;的問題，
第一個問題：
訊息 7399，層級 16，狀態 1，行 1
連結伺服器 &quot;db_host&quot; 的 OLE DB 提供者 &quot;SQLNCLI10&quot; 報告了錯誤。提供者並未給予任何關於錯誤的資訊。
訊息 7312，層級 16，狀態 1，行 1
不能使用連結伺服器 &quot;db_host&quot; 的 OLE DB 提供者 &quot;SQLNCLI10&quot; 的結構描述或目錄。提供了四部分的名稱，但提供者並未公開必要的介面，以使用目錄或結構描述。

這錯誤訊息的關鍵字不難看出是&quot;提供者&quot;。
點開&quot;提供者&quot;後，滑鼠右鍵點&quot;SQLNCLI10&quot;選屬性即可開啟&quot;提供者選項&quot;


因此，我們看了一下&quot;提供者選項&quot;，發現裡面所有選項都被選取了...
這時候我們拜一下 Google 大神，找到取消&quot;限層級零&quot;與&quot;不允許特定存取&quot;可以解決我們的問題</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/6958070359810997715/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/6958070359810997715' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6958070359810997715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/6958070359810997715'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/08/linked-server.html' title='連結的伺服器(Linked Server)筆記'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-906873800228687781</id><published>2010-07-27T21:54:00.002+08:00</published><updated>2010-08-28T11:26:27.314+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>停止瀏覽器快取網頁 for ASP.NET MVC</title><summary type="text">瀏覽器為了加速網頁讀取，通常會採用快取，
所以使用者登出後，按下&quot;回上一頁&quot;幾乎都可以看到登出前瀏覽過的資料。
要避免使用者登出後使用&quot;回上一頁&quot;功能，最簡單的方式就是讓頁面不被快取，
在網路上找了一些方法，都是在&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;裡面加上：
//將網頁設為立即過期。
&amp;lt;meta http-equiv=&quot;Expires&quot; content=&quot;0&quot; /&amp;gt;
//舊寫法，為了增加相容性。
&amp;lt;meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot; /&amp;gt;
&amp;lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;no-cache&quot; /&amp;gt;
&amp;lt;meta http-equiv=&quot;Pragma-directive&quot; content=&quot;no-cache&quot; /&amp;gt;
&amp;lt;</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/906873800228687781/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/906873800228687781' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/906873800228687781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/906873800228687781'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/for-aspnet-mvc.html' title='停止瀏覽器快取網頁 for ASP.NET MVC'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-7735085862322547811</id><published>2010-07-21T22:42:00.001+08:00</published><updated>2010-08-28T11:26:01.343+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>ASP.NET MVC 之 ActionFilterAttribute</title><summary type="text">我們常常會在 Action 或是 Controller 上面看到黏了一些東西，像下面這樣:
[HttpPost]
public ActionResult Test(FormCollection testFormCollection)
{
    string Name = testFormCollection[&quot;Name&quot;];
    string Title = testFormCollection[&quot;Title&quot;];
    return View();
}
那個 [HttpPost] 就是我們說的 Attribute，
這可以做些什麼呢?
其實可以做的事情可多了，像是在 Action 執行前做些前處理的事情，
或是 Action 執行後做，而且很多 Action 都會用到的話，
那用 Attribute 來處理，是相當不錯的選擇。

實作上相當簡單，只要你寫個類別繼承 </summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/7735085862322547811/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/7735085862322547811' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7735085862322547811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/7735085862322547811'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/aspnet-mvc-actionfilterattribute.html' title='ASP.NET MVC 之 ActionFilterAttribute'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-550079781175578939</id><published>2010-07-13T15:34:00.004+08:00</published><updated>2010-08-28T11:25:33.582+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>ASP.NET MVC 之 Custom ModelBinder</title><summary type="text">在 ASP.NET MVC 要取得 Form 傳遞回來的資料有幾種方式，
一、直接取用 FormCollection ，例:[HttpPost]
public ActionResult Test(FormCollection testFormCollection)
{
    string Name = testFormCollection[&quot;Name&quot;];
    string Title = testFormCollection[&quot;Title&quot;];
    return View();
}
輸入畫面：

結果：


二、直接在 Function 上設定接收參數，例:[HttpPost]
public ActionResult Test(string Name, string Title)
{
    return View();
}
輸入畫面：

結果：


三、使用 </summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/550079781175578939/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/550079781175578939' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/550079781175578939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/550079781175578939'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/aspnet-mvc-custom-modelbinder.html' title='ASP.NET MVC 之 Custom ModelBinder'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-5560161671058279003</id><published>2010-07-09T17:04:00.003+08:00</published><updated>2010-08-28T11:25:01.443+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>ASP.NET MVC 之 TagBuilder</title><summary type="text">使用 ASP.NET MVC 開發專案，沒有以往常使用的控制項，
不過卻也讓頁面的設計更加彈性，但是如果每個標籤都要自己敲，
那其實還挺累人的。

所以我們可以利用上一篇提到的 Extension Methods
把我們自己客製化的 Tag 加到 Html Helper

那建立一個 Tag 只能用兜字串的方式嗎？
以前不知道 TagBuilder 這好東西的時候，還真常這麼做呢！
使用 TagBuilder 建立各種 Tag 至少要知道它可以做些什麼！
最基本，最常用的，就下面兩個方法，和一個屬性，
其他詳情請參考 MSDN/TagBuilder Members

1. 方法
AddCssClass(string value)
在 Tag 加入一個 Class 屬性，其值為 value。
MergeAttribute(string key, string value[, bool </summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/5560161671058279003/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/5560161671058279003' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5560161671058279003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/5560161671058279003'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/aspnet-mvc-tagbuilder.html' title='ASP.NET MVC 之 TagBuilder'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-242593564114491035</id><published>2010-07-08T23:09:00.005+08:00</published><updated>2010-08-28T11:24:23.306+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>C# Extension Methods</title><summary type="text">Extension Methods 顧名思義就是擴展方法，據說這是在 C# 3.0 出現的東西，
在以前沒有這東西的時代裡，我們如果想要檢查一個陣列(array)是否有值，
或者是否為 null 的時候，可能是寫個 method 去檢查，或是直接來。類似這樣:
// method 檢查
bool IsNullOrEmpty(string[] instance)
{
    return (instance == null) || (instance.Length == 0);
}
// 直接來
string[] array;
bool result = (array == null) || (array.Length == 0);
換成 Extension Methods 該怎麼寫呢?就像下面這樣:
namespace Frank.Extensions
{
    public </summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/242593564114491035/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/242593564114491035' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/242593564114491035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/242593564114491035'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/extension-methods-c-3.html' title='C# Extension Methods'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2026368564523045877.post-9072145587294417112</id><published>2010-07-07T22:56:00.002+08:00</published><updated>2010-08-28T11:23:38.672+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>SyntaxHighlighter - 讓你的網頁顯示漂亮的程式碼</title><summary type="text">SyntaxHighlighter 是用來讓在網頁上的程式碼一樣可以有像 IDE 的顯示效果！
目前最新版本為 3.0.83，
官方網頁為:http://alexgorbatchev.com/SyntaxHighlighter/
使用上面相當的簡單，
1. 在你要使用這個 Javascript 的網頁上引用2支 js:
主要核心:scripts/shCore.js
程式語言:scripts/shBrushCSharp.js
(這是我要顯示 C# 程式所必須引用的，如果要顯示其他語言請自行替換掉這個部分)
2. 其次是引用兩支 CSS:
styles/shCore.css
styles/shThemeDefault.css
3. 然後呼叫 SyntaxHighlighter.all(); 這個 function
以上步驟完成長這樣:

注意：script 的部份，可以跟隨文章沒有問題，不過</summary><link rel='replies' type='application/atom+xml' href='http://jhshen.blogspot.com/feeds/9072145587294417112/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2026368564523045877/9072145587294417112' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/9072145587294417112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2026368564523045877/posts/default/9072145587294417112'/><link rel='alternate' type='text/html' href='http://jhshen.blogspot.com/2010/07/syntaxhighlighter-ide-3.html' title='SyntaxHighlighter - 讓你的網頁顯示漂亮的程式碼'/><author><name>JHShen</name><uri>http://www.blogger.com/profile/06110749260043538499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>