<?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: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-628606788196233504</id><updated>2012-01-06T14:25:05.131+08:00</updated><category term='SQL_Server'/><category term='程式'/><category term='JavaScript'/><category term='Linq'/><category term='札記'/><title type='text'>Sam 的天馬行空不務正業亂想誌</title><subtitle type='html'>天馬行空
不務正業
胡思亂想</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-7266683480280207528</id><published>2012-01-06T14:24:00.000+08:00</published><updated>2012-01-06T14:25:05.139+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>C# 日期函數方法</title><summary type='text'>//今天
DateTime.Now.Date.ToString();
//昨天
DateTime.Now.AddDays(-1).ToString();
//明天
DateTime.Now.AddDays(1).ToString();

//本週第1天及最後1天 (要注意的是這裡的每一週是從週日始至週六止)
DateTime.Today.AddDays (-(int)DateTime.Today.DayOfWeek).ToString();
DateTime.Today.AddDays (6 -(int)DateTime.Today.DayOfWeek).ToString();

//上週, 一個周是7天,上週就是本週再減去7天
DateTime.Today.AddDays (-(int)DateTime.Today.DayOfWeek - 7).ToString();
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/7266683480280207528/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2012/01/c.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7266683480280207528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7266683480280207528'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2012/01/c.html' title='C# 日期函數方法'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4815995405320178296</id><published>2011-11-07T09:49:00.002+08:00</published><updated>2011-11-07T09:50:04.141+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>「開始」→「執行」指令大全</title><summary type='text'>指令：gpedit.msc -----------------------群組原則
指令：sndrec32---------------------------錄音機
指令：Nslookup--------------------------IP位址偵測器
指令：explorer----------------------------開啟檔案總管
指令：logoff-------------------------------登出指令 tsshutdn-------60秒倒計時關機指令
指令：lusrmgr.msc-----------------------本地機用戶和組
指令：services.msc-----------------------本機服務設定
指令：oobe/msoobe /a-------------------檢查XP是否啟動
指令：notepad--------</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4815995405320178296/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/11/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4815995405320178296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4815995405320178296'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/11/blog-post.html' title='「開始」→「執行」指令大全'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6084036535679878044</id><published>2011-08-02T11:05:00.003+08:00</published><updated>2011-08-02T11:08:42.505+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>Asp.Net中DataBinder.Eval裡String Format用法的總結</title><summary type='text'>適合元件:

DataList, Repeater, 或想使用String Format的字串也可以參考




&lt;%# Bind("Subject") %&gt; //綁定字段
&lt;%# Container.DataItemIndex + 1%&gt; //實現自動編號
&lt;%# Container.ItemIndex %&gt; //Repeater自動編號
&lt;%# DataBinder.Eval(Container.DataItem, "[n]") %&gt;
通常使用的方法(這三個性能最好)
&lt;%# DataBinder.Eval(Container.DataItem, "ColumnName") %&gt;
&lt;%# DataBinder.Eval(Container.DataItem, "ColumnName", null) %&gt;
&lt;%# DataBinder.Eval(Container, "</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6084036535679878044/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/08/aspnetdatabinderevalstring-format.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6084036535679878044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6084036535679878044'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/08/aspnetdatabinderevalstring-format.html' title='Asp.Net中DataBinder.Eval裡String Format用法的總結'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-9195305940109567179</id><published>2011-05-30T17:09:00.000+08:00</published><updated>2011-05-30T17:10:08.602+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>JavaScript 計算日期</title><summary type='text'>計算日期的範例

Date.prototype.dateDiff = function(interval,objDate){
  var dtEnd = new Date(objDate);
  if(isNaN(dtEnd)) return undefined;
  switch (interval) {
    case "s":return parseInt((dtEnd - this) / 1000);
    case "n":return parseInt((dtEnd - this) / 60000);
    case "h":return parseInt((dtEnd - this) / 3600000);
    case "d":return parseInt((dtEnd - this) / 86400000);
    case "w":return </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/9195305940109567179/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/05/javascript.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/9195305940109567179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/9195305940109567179'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/05/javascript.html' title='JavaScript 計算日期'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4511962064221316051</id><published>2011-04-25T16:43:00.000+08:00</published><updated>2011-04-25T16:44:09.275+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>window.close() 會出現關閉提示的問題</title><summary type='text'>解決IE中javascript的window.close()會出現關閉提示的問題

使用下列語法就不會有這樣的問題。 


        window.opener=null;
        window.open("","_self");
        window.close();
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4511962064221316051/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/04/windowclose.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4511962064221316051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4511962064221316051'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/04/windowclose.html' title='window.close() 會出現關閉提示的問題'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5504661482240571502</id><published>2011-04-25T16:41:00.000+08:00</published><updated>2011-04-25T16:41:48.356+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>UpdatePanel 中控制項的 focus</title><summary type='text'>在UpdatePanel中會導致控制項的Focus()方法失效~若要執行設定Focus的動作~就要自己寫JavaScript來達成效果!

 
Dim jsScript As String
        jsScript = "setTimeout(""$get('" &amp; obj.ClientID &amp; "').focus(); "", 100);"
        ScriptManager.RegisterStartupScript(Me, Me.GetType(), "focus", jsScript, True)

</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5504661482240571502/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/04/updatepanel-focus.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5504661482240571502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5504661482240571502'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/04/updatepanel-focus.html' title='UpdatePanel 中控制項的 focus'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5672110114862400946</id><published>2011-01-05T09:13:00.004+08:00</published><updated>2011-01-05T09:27:18.606+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>交大男的分手信</title><summary type='text'>交大男的分手信（很多髒話可是有些很感人！）
拎伯為了挽回妳，
他馬的低聲下氣、委屈求全拜託妳 



幹，哭哭哭，哭個屁啊

只會哭著說：我承受不起你對我的好，我不值得的，

你一定可以找一個比我更好的人。我會一個人好好活下去

幹你娘啦，老子就賤命啊，人格低落啊，

還跟妳說：不，妳值得的，我對妳做的一切都是值得的

馬的B，好說歹說講了8個小時，

他馬的石女都沒妳這麼心腸堅定。

講到他馬的老子死心了，真的相信妳是想要一個人靜一靜，

真的開始覺得是我不夠成熟，才會讓妳覺得沒有安全感。

還可以糾住自己絞痛的心反過來安慰妳，其實一切都是我的錯。 

幹，凌晨四點房間為了妳，不知道誰去烙來的，擠了二十幾個朋友

只為了勸我不要輕言放棄，說什麼這樣就放手太枉費過去的三年付出

只為了說妳真的有多好，全都怪我幹嘛說分就分。

操你媽啦，又不是我愛分， 啊我就盡全力挽回了，</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5672110114862400946/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/01/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5672110114862400946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5672110114862400946'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2011/01/blog-post.html' title='交大男的分手信'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6057323562289476413</id><published>2010-11-11T09:33:00.000+08:00</published><updated>2010-11-11T09:33:48.711+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>不足位元補 0</title><summary type='text'>string binary = System.Convert.ToString(8, 2); →1000
但我的需要顯示8個bit，所以我要向左邊位元補0，所以使用PadLeft
string binary = System.Convert.ToString(8 , 2).PadLeft(8, '0'); →00001000 
若是有向右邊補位的需求可以使用PadRight</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6057323562289476413/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/11/0.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6057323562289476413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6057323562289476413'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/11/0.html' title='不足位元補 0'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4499089560887669275</id><published>2010-10-23T23:04:00.003+08:00</published><updated>2011-01-05T09:28:55.084+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>雲端科技是這個意思嗎?</title><summary type='text'>a phone call ~~ ringing:
客服：「東東披薩店您好！請問有什麼需要我為您服務？」
顧客：「妳好，我想要………」

客服：「先生，請把您的AIC會員卡號碼告訴我。」

顧客：「喔！請等等，12345678。」




客服：「 陳 先生您好，您是住在泉州街一號二樓，您家電話是23939889，您的公司電話是23113731，您的行動電話是0939956956，請問您現在是用哪一個電話呢？」


顧客：「我家，為什麼妳知道我所有的電話號碼？」


客服：「 陳 先生，因為我們有連線到『AICCRM系統』。」


顧客：「我想要一個海鮮披薩……」


客服：「 陳 先生，海鮮披薩不適合您。」


顧客：「為什麼？」


客服：「根據您的醫療紀錄，您有高血壓和膽固醇偏高。」


顧客：「那……妳們有什麼可以推薦的？」


客服：「您可以試試我們的低脂健康披薩。」


顧客：</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4499089560887669275/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/10/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4499089560887669275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4499089560887669275'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/10/blog-post.html' title='雲端科技是這個意思嗎?'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-2375389442382248231</id><published>2010-09-21T12:03:00.007+08:00</published><updated>2010-09-21T12:09:23.270+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='Linq'/><title type='text'>CS0234: 命名空間“System.Data”中不存在類型或命名空間名稱“Linq”(是否缺少程序集引用?)</title><summary type='text'>錯誤：

編譯器錯誤消息: CS0234: 命名空間“System.Data”中不存在類型或命名空間名稱“Linq”(是否缺少程序集引用?)


解決辦法：

在WEB.config中加入：


＜add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, 
PublicKeyToken=B77A5C561934E089"＞＜/add＞

</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/2375389442382248231/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/09/cs0234-systemdatalinq.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2375389442382248231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2375389442382248231'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/09/cs0234-systemdatalinq.html' title='CS0234: 命名空間“System.Data”中不存在類型或命名空間名稱“Linq”(是否缺少程序集引用?)'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5073795730571459489</id><published>2010-08-27T14:47:00.001+08:00</published><updated>2010-08-27T14:48:36.971+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL_Server'/><title type='text'>SQL 日期格式轉換</title><summary type='text'>SELECT GETDATE()
=&gt; 2007-12-31 10:30:20.517

Transact-SQL 常用到的日期時間格式轉換，方法如下：


SELECT CONVERT(VARCHAR(18) , getdate(), 100)
=&gt; 12 31 2007 10:30AM

SELECT CONVERT(VARCHAR(10) , GETDATE(), 101 )
=&gt; 12/31/2007

SELECT CONVERT(VARCHAR(10) , GETDATE(), 102 )
=&gt; 2007.12.31

SELECT CONVERT(VARCHAR(10) , GETDATE(), 103 )
=&gt; 31/12/2007

SELECT CONVERT(VARCHAR(10) , GETDATE(), 104 )
=&gt; 31.12.2007

SELECT </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5073795730571459489/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/08/sql.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5073795730571459489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5073795730571459489'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/08/sql.html' title='SQL 日期格式轉換'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-7743718552969831080</id><published>2010-07-30T16:49:00.001+08:00</published><updated>2010-07-30T16:51:57.046+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>.NET 4.0 讀取文字檔的新方法</title><summary type='text'>
IEnumerable lines_B = File.ReadLines("D:\\test.txt");
foreach (var line in lines_B)
{
Console.WriteLine("字串長度={0}, 內容={1}", line.Length, line);
}


.NET Framework 4 在 File 類別出現了 ReadLines 方法，另外，該方法可搭配使用 IEnumerable ，所以：
(1.) 不用再使用 string[] 陣列  
(2.) 效能上也有相對性的改善  
(3.) 使用習慣，撰寫程式碼的方法 (直覺性) 不變也更容易。
(4.) 有使用到 IEnumerable </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/7743718552969831080/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/net-40.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7743718552969831080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7743718552969831080'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/net-40.html' title='.NET 4.0 讀取文字檔的新方法'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-2565929759849332784</id><published>2010-07-16T16:47:00.000+08:00</published><updated>2010-07-16T16:48:04.857+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript 上一頁失效</title><summary type='text'> 
window.history.forward(); 
if(window.history.forward(1) != null) window.history.forward(1); 
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/2565929759849332784/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript_16.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2565929759849332784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2565929759849332784'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript_16.html' title='javascript 上一頁失效'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6874064240066451580</id><published>2010-07-15T16:58:00.004+08:00</published><updated>2010-07-15T17:00:43.044+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript 剪貼簿功能</title><summary type='text'>
function copyToClipboard() {
var txt = document.getElementById("textfield").value;  //文字來源
var copied = false;
if (window.clipboardData) {
window.clipboardData.clearData();
window.clipboardData.setData("Text", txt);
copied = true;
} else if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("被瀏覽器拒絕！\n請在瀏覽器網址列輸入'about:config'\n，</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6874064240066451580/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript_15.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6874064240066451580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6874064240066451580'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript_15.html' title='javascript 剪貼簿功能'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-255897276168472824</id><published>2010-07-15T16:57:00.001+08:00</published><updated>2010-07-15T17:00:43.045+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript 計算字數,字元</title><summary type='text'>
//string.Blength() 傳回字串的byte長度   
String.prototype.Blength = function() {   
  var arr = this.match(/[^\x00-\xff]/ig);   
  return  arr == null ? this.length : this.length + arr.length;   
}   
    
  var str = "我是puma";   
  alert("字元數:"+str.length); //中文字(2),英文字(4),總共(6)  
  alert("byte數:"+str.Blength()); //中文字(4),英文字(4),總共(8)  
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/255897276168472824/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/255897276168472824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/255897276168472824'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript.html' title='javascript 計算字數,字元'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6963681151361192115</id><published>2010-07-15T16:55:00.004+08:00</published><updated>2010-07-15T17:00:43.046+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript Email 驗證</title><summary type='text'>
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.txt_email.value))) {
alert("E-mail 錯誤請確實填寫!!");
document.form1.txt_email.focus();
return false;
}
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6963681151361192115/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript-email.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6963681151361192115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6963681151361192115'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/javascript-email.html' title='javascript Email 驗證'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5341771288292161175</id><published>2010-07-15T16:51:00.003+08:00</published><updated>2010-07-15T17:00:43.046+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>倒數秒數到之後導網址</title><summary type='text'>
//設定倒數秒數
var t = 5;
//顯示倒數秒數
function showTime() {
t -= 1;
if (t == 0) {
location.href = 'index.aspx';
}
//每秒執行一次,showTime()
setTimeout("showTime()", 1000);
}
//執行showTime()
showTime();
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5341771288292161175/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5341771288292161175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5341771288292161175'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/07/blog-post.html' title='倒數秒數到之後導網址'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-589371890317652443</id><published>2010-06-21T15:41:00.001+08:00</published><updated>2010-07-16T16:48:14.729+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>C# 日期函數</title><summary type='text'>

DateTime dt = DateTime.Now;  

string[] strDT = new string[17];  

strDT[1] = dt.ToString();//2009/5/25 下午 05:35:21   

strDT[2] = dt.ToFileTime().ToString();//127756416859912816   

strDT[3] = dt.ToFileTimeUtc().ToString();//127756704859912816   

strDT[4] = dt.ToLocalTime().ToString();//2009/5/25 下午 05:35:21   

strDT[5] = dt.ToLongDateString().ToString();//2009年2月28日   

strDT[6] = </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/589371890317652443/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/c.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/589371890317652443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/589371890317652443'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/c.html' title='C# 日期函數'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-3341599148393732873</id><published>2010-06-03T23:30:00.000+08:00</published><updated>2010-06-03T23:30:59.101+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>在.vb 參數帶到 .aspx</title><summary type='text'>這個方法前天要用的時候～突然忘記如何使用～結果就是慘絕人寰的開始,怎麼試都不成功,上google也沒找到相關資料...真是快吐血了,搞到一點多還沒搞定～一直到隔天才找到問題
原來我一開始的作法是   後來才發現正確寫法是：
沒錯就是差一個＝
OH My God！
真是晴天霹靂到有剩...


接下來,來說明一下這樣做的用意：
很多時候在頁面的呈現資料中必須帶有參數,而這個參數如果是牽扯到JavaScript以及資料庫動態產生的時候,那麼這是一個好用的方法,用法如下：

.aspx頁面中
javascript:ajaxpage2('xxx.aspx?xxx_id=', 'rightcolumn2');"

這是一段AJAX 的用法,因為id需要連接資料庫,這邊就用這樣的方式做

接著回到.vb的頁面

建立一個 Function 如下



Function get_xxx_id()
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/3341599148393732873/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/vb-aspx.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3341599148393732873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3341599148393732873'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/vb-aspx.html' title='在.vb 參數帶到 .aspx'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5679868992036022877</id><published>2010-06-01T23:12:00.004+08:00</published><updated>2010-06-02T00:45:59.261+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript 父層 reload</title><summary type='text'>這個javascript的用法是,用父層的頁面另開子頁的時候,當子頁完成動作時,先將子頁關閉,然後父層的頁面會reload整個頁面的效果

 
function closewin(){alert('XXX');self.opener.location.href='xxxx.aspx';window.close();}closewin()


self.opener.location.href  ---這個意思是說要導回你的頁面並且reload</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5679868992036022877/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/javascript-reload.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5679868992036022877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5679868992036022877'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/06/javascript-reload.html' title='javascript 父層 reload'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-1819171310791793754</id><published>2010-05-25T11:25:00.014+08:00</published><updated>2010-05-30T22:16:01.795+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>Ajax CalendarExtender 日期控制項</title><summary type='text'>Ajax CalendarExtender 日期控制項
最近發現一個很鳥的問題,點了之後星期六會不見,真是太詭異了,也有點莫名其妙,然後因為在.cs檔裡面會初始化,接著又出現一件怪事,那就是點了日期～對應的TextBox接不到值～沒反應～這是什麼鬼啊......
去Google一下找到下面的解決方法～真是XD



1.星期六不見的問題在於css的設定問題,所以被遮住了,並不是憑空消失......
所以加入下面css就可以解決


.myCalendar .ajax__calendar_container {
border:1px solid #646464;
background-color:White;
color: black;
width:200px;
}
.myCalendar .ajax__calendar_body {
 height:150px;
 width:190px</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/1819171310791793754/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/ajax.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1819171310791793754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1819171310791793754'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/ajax.html' title='Ajax CalendarExtender 日期控制項'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-8746510434711540814</id><published>2010-05-19T12:06:00.005+08:00</published><updated>2010-05-19T12:24:09.737+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>使用JavaScript比對日期的方法</title><summary type='text'>

var d1="2006/2/1";
var d2="2006/1/7";
if (new Date(d1) &gt; new  Date(d2)) {
alert("D1 大於 D2");
}else{
alert("D1 小於 D2");
}


 

var d1,d2;
d1 =  new Date( ''2003/04/02'' );
d2 = new Date( ''2004/04/02''  );

var t = (d2.getYear() -  d1.getYear())*12 + (d2.getMonth() - d1.getMonth() );
var d = (d2.getTime() - d1.getTime()) / (86400 * 1000)  );

var d = new  Date();
d.setTime(d2.getTime() -  d1.</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/8746510434711540814/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/javascript.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/8746510434711540814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/8746510434711540814'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/javascript.html' title='使用JavaScript比對日期的方法'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6200607729163176202</id><published>2010-05-19T12:05:00.000+08:00</published><updated>2010-05-19T12:23:53.037+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='Linq'/><title type='text'>Linq</title><summary type='text'>Linq以GETDATE為搜尋方法：


var finddata = from p in dataContext.sensible_person_db.Where("SqlServer.DATEDIFF('DAY', it.create_date, SqlServer.GETDATE()) = 14")
                               where p.about_me != ""
                               orderby p.sensible_person_db_id
                               select new { p.member_db_id };



Linq的Newid()方法：


var randomizer = new Random();
var newsdb = (</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6200607729163176202/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/linq.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6200607729163176202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6200607729163176202'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/05/linq.html' title='Linq'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-1663250604490252066</id><published>2010-04-25T00:45:00.005+08:00</published><updated>2010-05-30T22:19:59.816+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>Can't take my eyes off you</title><summary type='text'>聽來聽去～我比較喜歡這個版本！











You're just too good to be true 你好得不像是真的Can't take my eyes off you 我無法將視線從你身上移開You'd be like heaven to touch 你就像人們嚮往的天堂I wanna hold you so much 我想擁抱著你At long last love has arrived 愛情終於來臨And I thank God I'm alive 我感謝上帝讓我活著You're just too good to be true 你好得不像是真的Can't take my eyes off you 我無法將視線從你身上移開Pardon the way that I stare 請原諒我注視你的方式There's nothing else to compare </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/1663250604490252066/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/04/cant-take-my-eyes-off-you.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1663250604490252066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1663250604490252066'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/04/cant-take-my-eyes-off-you.html' title='Can&apos;t take my eyes off you'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6531438122071278543</id><published>2010-04-25T00:09:00.003+08:00</published><updated>2010-05-30T22:20:30.062+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>最幸福的一句話</title><summary type='text'>「你躺著，我起來。」 
一對男女結婚後,很快有了孩子。 
由於沒有老人幫忙又沒有多餘的錢請褓母, 
女人祇好獨自擔起育兒持家的工作， 
男人為了一家的生計在外奔波。 
但孩子沒有父母期望的那樣健康， 


先有了黃疸,後又得了肺炎。 
  為給孩子治病,男人更加起早貪黑地工作； 
為了照料孩子,女人產後根本沒能好好休息。 
為了給新生嬰兒好好活著的希望也為了給對方添加一點勇氣。 
男人回家時都要在門外理理蓬亂的頭髮,拍拍西裝上的灰塵， 
抖擻精神挺直身板去按門鈴； 
而女人聽到樓梯上傳來熟悉的腳步聲 
也總是趕緊扯一扯~ 
因為抱孩子和做家務而皺巴巴的衣服， 
一邊撇起零亂的劉海，一邊堆上笑容向門口迎去。 
 有一天，女人無意中從貓眼裡發現了男人的秘密。 
她哭了,很快抹掉眼淚仍舊掛上燦爛的笑容為男人開門。 
 女人打心底心疼男人。夜裡孩子哭鬧時， 
不管自己怎麼累，她也不叫醒男人，</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6531438122071278543/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/04/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6531438122071278543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6531438122071278543'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/04/blog-post.html' title='最幸福的一句話'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-71240774790016302</id><published>2010-01-02T15:18:00.002+08:00</published><updated>2010-05-30T22:20:57.212+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>新年快樂！新目標</title><summary type='text'>時間過的真快,一晃眼又是一年過去啦,回首這一年來,還真是發生一堆事,想想也是挺好笑,真是一點都不瀟灑～哈哈
新年新希望是什麼呢？......
思考很久說




第一：程式功力更上一層樓,朝神呼奇技的怪物目標邁進
第二：征服Android手機應用程式
第三：征服Silverlight的應用,目前想做的東西,是將後台改成用Silverlight去做,那配合的語言打算用                              C＃(期許在4月以前可以有東西出來)

加油吧～GO！</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/71240774790016302/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/01/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/71240774790016302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/71240774790016302'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/01/blog-post.html' title='新年快樂！新目標'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4792048886127764115</id><published>2009-12-23T23:06:00.001+08:00</published><updated>2010-05-30T22:21:25.829+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>冬至～吃湯圓</title><summary type='text'>2009/12/22

今天是冬至,剛好可以看到太陽,真..真..真是感動啊...差點哭出來,好險強忍住,不然鳥頭已經夠好笑得了,在加上狂哭,實在不是一個很好看的景象,會不蘇湖＝＝


公司想當然爾一定要給他團購訂湯圓,女人嘛,不是吃就是喝～哈哈～而男人我勒,則剛好受惠哈哈今天訂的是東區粉圓～真是響叮噹的大名字啊,有點像東區扛罷子～哈所以中午我要吃少一點,免得下午我會撐死～哈哈
結果老闆還真是跩啊,說今天不外送...現在是怎樣,錢要給你賺,還不想賺喔...XD
看樣子景氣也沒有不好啊～哈～害我沒吃到湯圓,可惡！</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4792048886127764115/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/12/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4792048886127764115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4792048886127764115'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/12/blog-post.html' title='冬至～吃湯圓'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4885451710437508117</id><published>2009-12-21T15:46:00.017+08:00</published><updated>2010-05-30T22:22:16.620+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>發瘋的埔心之行1</title><summary type='text'>2009/12/19
今天要跟朋友去埔心農場,頂著寒冷的風＆毛毛的細雨(O.S. 還真是詩情畫意啊...XD)～我真的是瘋了,才會有勇氣在這樣的溫度,離開我那溫暖的床,心中響起千百次的回響,為什麼不延期...不過既然沒收到通知,那就是照舊啦,到了集合地點,一問小惡魔才發現有人是請假來玩,所以不好意思延期,哇～真的是要給他們拍拍手了～真是誠意十足
等人到齊後就出發去～GO...

一路上出奇的順沒什麼車,大家都還在睡吧～＝＝沒多久到達埔心,一下車～哇勒...真是冷到掉渣了,有夠冷的,找不到形容詞可以形容那樣的冷度～哈不過去那邊的人還真是不少,看來大家都很有勇氣～哈,將東西放好後,就到了賽金豬的時間還可以壓寶,哈哈～啥鬼...結果是看小豬在賽跑,押中的人有現擠的鮮奶可以喝(不過只有前三名...其他是精美扇子一支～XD),之後就是烤肉啦,我的老天爺啊我快餓死了,陣陣的烤肉香,真是折磨人,</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4885451710437508117/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/12/1.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4885451710437508117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4885451710437508117'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/12/1.html' title='發瘋的埔心之行1'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-2491458640800685093</id><published>2009-12-21T15:46:00.016+08:00</published><updated>2010-05-30T22:21:51.520+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>發瘋的埔心之行2</title><summary type='text'>2009/12/19
就在大家都不明所以的狀況下開始畫圖,而路過的小朋友都很好奇在看我們在幹嘛,哈哈
經過20分後大家都陸續的完工了,接著組裝起來後,就是一個相框啦,差點被搞死～XD




接著小惡魔就把完成品都收回去,並且說等一下要玩遊戲,所以先收回去...接著玩大地遊戲,這是啥鬼,首先呢～先分成3組然後每隊還要有隊呼,OH My God不是吧還隊呼勒～真是猛啊...
皆下來就是憑著各隊的想像力去完成隊呼,真是慶幸我這隊的隊呼還真是簡單到不行,就是學柯南的口頭語～"真相只有一個！"
真好搞定,其他隊呼就很搞笑了～有無敵鐵金剛,科學小飛俠...真是快要笑死我了～笑到肚子痛～真的是有夠搞笑的～哈哈

   
接下來就是大地遊戲啦～所謂的大地遊戲,就是每一隊會發兩張卡紙,第一張卡紙是9個埔心的景點,但是中間的景點是未知地方要其它八個地方都解開才可以去小惡魔那邊領迷腳... 
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/2491458640800685093/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/01/2.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2491458640800685093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2491458640800685093'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2010/01/2.html' title='發瘋的埔心之行2'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-7818912255164821158</id><published>2009-11-08T23:02:00.004+08:00</published><updated>2010-05-30T22:22:49.320+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>隨記</title><summary type='text'>唉啊～真是好久沒更新網誌啦
我可以説我愈來愈忙嗎...(其實是懶吧！XD)最近上了Flash的初階課程,坦白說,老師教的不錯,也挺有趣的不過,有點搞不懂巨匠是怎麼排課的

居然只有排初階,沒有進階的課程,真是搞不懂然後要到1月才有再開視覺課程＝＝那Flash進階完全沒消息...真是傻眼到不行不過買書回來看也是可以學所以去了一趟天瓏,發現最近的TOP 10書籍Google 手機開發API的書就包辦了1,3名居然這麼熱門～真是了不起,不過比較驚訝的是2,5名是講理論的書什麼軟體工程之類的書突然不解起來......為啥這樣的書會進TOP 10～哈接下很多事要做～可以好好忙一陣子了^^
</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/7818912255164821158/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/11/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7818912255164821158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/7818912255164821158'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/11/blog-post.html' title='隨記'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-8494813113783721443</id><published>2009-09-02T15:34:00.001+08:00</published><updated>2010-05-19T12:24:20.841+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript 抓dropdownlist所選的text</title><summary type='text'>var my_select = document.getElementById("DropDownList1")    document.getElementById("TextBox1").value=my_select.options[my_select.selectedIndex].text;</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/8494813113783721443/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/09/javascript-dropdownlisttext.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/8494813113783721443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/8494813113783721443'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/09/javascript-dropdownlisttext.html' title='javascript 抓dropdownlist所選的text'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-3317640399584687520</id><published>2009-08-31T11:59:00.004+08:00</published><updated>2009-08-31T12:32:46.548+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>無條件進位的function</title><summary type='text'>'無條件進位的function'd=取到小數第幾位  Function xRound(ByVal x As Decimal, Optional ByVal d As Integer = 0) As Decimal      Return CInt(x * 10 ^ d + 0.5 * Math.Sign(x)) / 10 ^ d  End Function</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/3317640399584687520/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/function.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3317640399584687520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3317640399584687520'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/function.html' title='無條件進位的function'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-9018549763831927827</id><published>2009-08-30T17:19:00.001+08:00</published><updated>2010-05-19T12:24:52.884+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL_Server'/><title type='text'>SQL Server 2005-效能監視器計數器需求錯誤</title><summary type='text'> 效能監視器計數器需求 (錯誤)訊息效能監視器計數器登錄值的 System Configuration Check  失敗。如需詳細資料，請參閱讀我檔案或《SQL Server 線上叢書》中的＜如何: 在 SQL Server 2005 中遞增安裝程式的計數器登錄機碼＞(How  to: Increment the Counter Registry Key for Setup in SQL Server 2005)請依照下列步驟進行設定：1.依序按一下「開始」和「執行」，在「開啟」中輸入  regedit，然後按一下「確定」按鈕。2.在「登錄編輯器」，找到下列機碼：HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows  NT\CurrentVersion\Perflib您會發現如下這兩個機碼名稱與機碼值（您的機碼值可能跟我的不一樣，那沒有關係）：</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/9018549763831927827/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/sql-server-2005.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/9018549763831927827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/9018549763831927827'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/sql-server-2005.html' title='SQL Server 2005-效能監視器計數器需求錯誤'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-5493083540611235769</id><published>2009-08-24T16:05:00.016+08:00</published><updated>2009-08-24T16:25:50.284+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>div 層浮在flash上面</title><summary type='text'>AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0', 'width', '955', 'height', '600', 'src', 'default', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'movie', 'default', 'wmode', 'Opaque'); //end AC codeparam name="wmode" value="Opaque"加上紅色字體的部分就可以讓div層,浮在</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/5493083540611235769/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/div-flash.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5493083540611235769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/5493083540611235769'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/div-flash.html' title='div 層浮在flash上面'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-3051284656256242756</id><published>2009-08-21T17:29:00.003+08:00</published><updated>2009-08-21T17:34:04.429+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>檢查檔案是否存在</title><summary type='text'>.net檢查檔案是否存在的方式If System.IO.File.Exists(Server.MapPath("~/user_defaultdata/1/user_pic.jpg")) = False Then              img_src = "img/peo.gif"  '預設圖          Else              img_src = "user_defaultdata/1/user_pic.jpg"          End If</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/3051284656256242756/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/blog-post_21.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3051284656256242756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3051284656256242756'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/blog-post_21.html' title='檢查檔案是否存在'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-6968804761168037718</id><published>2009-08-21T12:02:00.006+08:00</published><updated>2010-05-19T12:25:22.601+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>vb文字編碼,再用javascript轉回來</title><summary type='text'>在.vb裡先將文字作編碼HttpUtility.UrlEncodeUnicode("天馬行空不務正業") --如下天馬行空不務正業 = %u5929%u99ac%u884c%u7a7a%u4e0d%u52d9%u6b63%u696d在前端的時候可以用javascript的unescape函數去解碼alert(unescape('%u5929%u99ac%u884c%u7a7a%u4e0d%u52d9%u6b63%u696d'))</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/6968804761168037718/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6968804761168037718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/6968804761168037718'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/blog-post.html' title='vb文字編碼,再用javascript轉回來'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4765676465843182305</id><published>2009-08-21T10:27:00.005+08:00</published><updated>2010-05-19T12:24:20.841+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript  get 抓參數,一次抓一個參數</title><summary type='text'>這是利用javascript get方式來抓網址列上面的參數function getQry(key){   var search=location.search.slice(1);//得到get方式提交的查詢字串  var my_id=search.split("&amp;");   for(var i=0;i&lt;my_id.length;i++)  {     var ar=my_id[i].split("=");     if(ar[0]==key)    {       return ar[1];     }   } } </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4765676465843182305/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/javascript-get.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4765676465843182305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4765676465843182305'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/javascript-get.html' title='javascript  get 抓參數,一次抓一個參數'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-136694186857255318</id><published>2009-08-21T10:16:00.004+08:00</published><updated>2010-05-19T12:24:20.842+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><title type='text'>javascript confirm 跟 .net postback</title><summary type='text'>javascript confirm 按取消就不執行postback,按確定才執行.net的postbackPublic Overloads Function GetConfirmScript(ByVal Message As String) As String Dim sMessage As String Dim sScript As String sMessage = ParserMessage(Message) sScript = String.Format("if (confirm('{0}')==false) {{return false;}}", sMessage) Return sScriptEnd FunctionPrivate Function ParserMessage(ByVal Message As String) As String Dim sMessage </summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/136694186857255318/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/javascript-confirm-postbacknetpostback.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/136694186857255318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/136694186857255318'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/javascript-confirm-postbacknetpostback.html' title='javascript confirm 跟 .net postback'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4028744919631535225</id><published>2009-08-11T17:41:00.004+08:00</published><updated>2010-05-19T12:25:08.389+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL_Server'/><title type='text'>SQL Select 查詢</title><summary type='text'>SELECT supplier_db_id,supplier_name FROM supplier_db where charindex('('+ convert(varchar(10),supplier_db_id) +')','(241),(62),(621),(81),') &gt; 0 order by supplier_name用於查詢，多個id是否在陣列裏面用但是，數字前後要有 ( )才會準，這樣子，在很多查詢式就不用把陣列柝出來一筆一筆去查了SELECT supplier_db_id,supplier_name FROM supplier_db where charindex('('+ convert(varchar(10),supplier_db_id) +')','(241),(62),(621),(81),') &gt; 0 ORDER BY CHARINDEX(RTRIM(</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4028744919631535225/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/sql-select.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4028744919631535225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4028744919631535225'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/08/sql-select.html' title='SQL Select 查詢'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4713399210575059917</id><published>2009-05-18T09:28:00.002+08:00</published><updated>2010-05-19T12:25:08.390+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程式'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL_Server'/><title type='text'>SQL Server 資料庫備份</title><summary type='text'>開啟「Microsoft SQL Server Management Studio」，伺服器 --&gt; 伺服器物件 --&gt; 右鍵 --&gt; 新增備份裝置，這時可以輸入一個好記的裝置名稱，檔案給他一個路徑名稱例如：C:\Backup.bak，按OK，在備份裝置按右鍵選重新整理，選擇剛剛所建立的備份裝置，然後點選滑鼠右鍵，選擇 備份資料庫 ，這時在左側有 Select a page --&gt; 一般，選擇要備份的資料庫，命名一個好記得名稱，都填完後不要按  確定 ，點選上方 指令碼 旁邊的小箭頭下拉選單，選 編寫動做的指令碼至檔案，存成一個 .sql 檔，例如  D:\Backup\FullBackup.sql  ，之後以排程工作定時執行 SQLCMD.exe -i "D:\Backup\FullBackup.sql"，就會依照剛剛備份裝置的設定備份成一個檔案。另外，可以利用Script在執行完成後</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4713399210575059917/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/05/sql-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4713399210575059917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4713399210575059917'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/05/sql-server.html' title='SQL Server 資料庫備份'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-1802433041808127593</id><published>2009-04-22T17:43:00.003+08:00</published><updated>2009-08-09T16:58:19.832+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>影片感想</title><summary type='text'>上禮拜六HBO,有演兩部片一片是貝武夫,另一個是斯巴達之300壯士看完之後覺得,貝武夫到底是什麼大爛片啊,全3D的電影,難看死了.......沒劇情就算了,還瞎到有剩～&gt;.&lt;"其中一個部分是跟怪獸對打,貝武夫沒穿衣服,這是什麼鬼東西啊赤手空拳的把怪獸給打死,然後又沒穿衣服,那其他穿盔甲拿見跟盾牌的,被踢一下就葛屁＝＝.....真是夠了～大爛片斯巴達之300壯士,這部還好一點,述說著斯巴達王不想屈服於波斯大帝無腦般的淫威之下,而奮勇抵抗到死,劇中,斯巴達王跟他的壯士有如神人般的萬夫莫敵,但是最後的收尾有點瞭草隨便了點,死了倒是有點可惜～最後變成斯巴達軍隊＋希臘自由軍隊反攻波斯大軍,並喊著"勝利在望！"......</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/1802433041808127593/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_22.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1802433041808127593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/1802433041808127593'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_22.html' title='影片感想'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-4674108877149712224</id><published>2009-04-21T09:23:00.004+08:00</published><updated>2009-08-09T16:58:19.833+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>單獨的四天</title><summary type='text'>單獨的四天～怎麼說勒,啊就貴婦帶著辣媽到韓國去度假囉,所以家裡只剩被遺棄的啊Ni陪我囉,不過有時想想,是我陪他,還是他陪我,到底......昨天下了一場超大的雨,真是恐怖至極啊,小黃也不知道跑去哪了,前兩天拿飼料去餵他的時候,一叫小黃,他馬上跑過來,完全不怕人,反而嚇我一跳,哈哈～但這兩天去都沒看到他的狗影,不知跑去哪裡逍遙了,真害...昨天去餵小黃,還發生了一個小插曲,因為找不到,所以四處看,突然我發現對面有個女生,竟然也蹲下去,在看車底,八成是認為我在找走失的小狗,所以她在幫我找,真是讓我不好意思了一下^^,部落格有點空蕩蕩的,是應該找個時間好好經營一下,但是我有時間嗎？～哈哈,又再找藉口......</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/4674108877149712224/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_21.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4674108877149712224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/4674108877149712224'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_21.html' title='單獨的四天'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-3447576015646233039</id><published>2009-04-03T10:01:00.002+08:00</published><updated>2009-08-09T16:58:19.833+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>貴婦接機</title><summary type='text'>昨天晚上一回家,馬上吃飯,因為等一下要到中正機場接機,但是因為接了通電話,所以時間有限,想說算了,回來再吃,於是換件衣服就出門了,出門時間是9點40分左右想說死定了,10點半以前要到,會不會有點勉強,懷著不安的心情上路～哈哈,結果路途中都沒什麼車,真是幸運,到機場也不過才10點15分左右,真是快速啊～呵呵結果不知道從二航廈的停車場到接機大廳要從b2過去所以當我們在1樓找不到過路缺口時,問了工作人員才知道要從b2過去,還真是搞校勒,一到大廳才發現,班機誤點要到50分才會到,ORZ啊好險沒遲到,嘿嘿, 順利接到老妹後,兩母女開始話匣子停不了了,真是太恐怖了～呵呵, 到家後,邊聊邊吃變成宵夜的晚餐,不知不覺就到了2點,真是快,躺到床上,就開始打呼了～～</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/3447576015646233039/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_03.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3447576015646233039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/3447576015646233039'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post_03.html' title='貴婦接機'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-628606788196233504.post-2625815531413739738</id><published>2009-04-02T11:33:00.001+08:00</published><updated>2009-08-09T16:58:19.833+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='札記'/><title type='text'>新開張</title><summary type='text'>新張開的落腳地方,胡思亂想的空間,這是個起點,終點在天的盡頭</summary><link rel='replies' type='application/atom+xml' href='http://sam-cheng-yu.blogspot.com/feeds/2625815531413739738/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2625815531413739738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/628606788196233504/posts/default/2625815531413739738'/><link rel='alternate' type='text/html' href='http://sam-cheng-yu.blogspot.com/2009/04/blog-post.html' title='新開張'/><author><name>Sam_Yu</name><uri>http://www.blogger.com/profile/07633953194279682619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://2.bp.blogspot.com/_WHDH_j0Ue34/Sx9XwK5gdCI/AAAAAAAACW0/Rr5FB40UHFs/S220/DSC01629.JPG'/></author><thr:total>0</thr:total></entry></feed>
