2015年10月4日 星期日

【音樂分享】緣分天注定、美國情緣 - 原聲帶曲目

很美麗的音樂,大家可以去找找

緣分天注定、美國情緣 - 原聲帶曲目

Various Artists - Serendipity (OST)  配樂

01 Wood - Never A Day
02 Bap Kennedy - Moonlight Kiss --夜晚的相聚
03 David Gray - January Rain -- 結尾 遇見彼此 前配樂
04 Annie Lennox,Steven Lipson - Waiting In Vain --等待的啟發
05 Evan And Jaron - The Distance (Serendipity Version) --結尾 end 2
06 Heather Nova - Like Lovers Do
07 Shawn Colvin - When You Know  --當下知道
08 Nick Drake - Northern Sky --結尾 遇見彼此
09 Louis Armstrong - Cool Yule--開頭
10 Chantal Kreviazuk - This Year--結尾 end 1
11 Brian Whitman - (There's) Always Something There To Remind Me
12 John Mayer - 83
13 Alan Silvestri - Fast Forward --尋尋覓覓

Alan Silvestri - Serendipity (Score)

01 Serendipity Chat
02 Ice-Skating
03 Jonathan's Theme
04 Elevator Maze - Sara Is Gone
05 Time Lapse Montage
06 The Bookseller
07 The Bookstore Search
08 Lars' Theme
09 Flight Tickets
10 The Golf Range (alternate)
11 Mr. Mignon's Painting
12 A Bridal Shop
13 Hotel Lobby
14 Watching Caroline in Lars' House
15 Sara Rushes to the Wedding
16 The Obituary
17 Reprise

2015年8月21日 星期五

【自我人生規劃】程式、硬體 之選擇之路

來到公司從不會寫程式到會寫程式

感謝公司的栽培

但不是自己有興趣也不會待在這家公司四年多

學很多.也能出去混個一官半職

但我的個性最後真的比較偏好外勤與人互動

有想轉換跑道做外勤工程師

問了前主管,給我回應是:勞力與腦力 自己選

問了系統工程師,給我的回應:當初如我是寫程式就好,勞力好辛苦

問了主管,給我的回應是:你應該去當PM

我總結了一段話,也不算找到答案,因為答案常變

總語:

人生與身材,無論是橫向發展、還是直向發展,無論是勞力還是腦力

數十載光陰...規劃趕不上計劃...樂觀悲觀不如隨著心走吧...

雖然未來還要養兒育女...咱們活的開心比較重要...


以上

我的新筆名叫:人生七劃

2015年8月19日 星期三

【夢的故事】多少次輪迴,才來到今生

主題:多少次輪迴,才來到今生

鞋子

女人

孩子

白婚紗

交換鞋子

車禍

中正大學

碩士班

手機

當兵

晚上

吵鬧

回想

故事

鬼門開

尋找今生的我

2015年8月9日 星期日

【美食好推】龍記搶鍋麵

有機會去吃吃看


新聞報導:https://www.youtube.com/watch?t=11&v=rLKL3gFO2CI
文章報導:http://machico.pixnet.net/blog/post/26145862-%E8%A1%A1%E9%99%BD%E8%B7%AF%E6%91%B8%E4%B9%B3%E5%B7%B7%E4%B9%8B%E3%80%8C%E9%BE%8D%E8%A8%98%E6%90%B6%E9%8D%8B%E9%BA%B5%E3%80%8D

龍記搶鍋麵
營業時間:10:30~14:30 / 16:00~20:30

台北市衡陽路84巷5號

2015年7月2日 星期四

【ASP.NET】透過 xslt to xls 匯出 excel 在 excel 2003 問題


透過 xslt to xls 匯出excel 在 excel 2003 問題

合併的時候會多出以下字串



但在OFFICE 2003 excel 不認識它,

所以、必需要 replace 掉,

否則開出來是白空的excel

2015年5月5日 星期二

2015年1月15日 星期四

【JavaScript 】臺灣 身份證驗證


function gfcChkIdCard(pUserID) {
    var tobjRtn = new Object();  //-傳回Object
    var ixI;
    var tAreaNo;
    var tSum;
    var tAreaCode;
    var tSecondID;         //身份證第二碼

    if (pUserID == "" || pUserID == null) {
        tobjRtn.eErr = false;
        return tobjRtn;
    }
    tobjRtn.eErr = true;
    pUserID = pUserID.toUpperCase();
    if (pUserID.length != 10)//確定身份證字號有10碼
    {
        tobjRtn.eErrDesc = "輸入無效的身份證字號 (ex:資料長度錯誤) !";
        return tobjRtn;
    }
    tAreaCode = pUserID.substr(0, 1);
    if (tAreaCode.valueOf() < "A" || tAreaCode.valueOf() > "Z")//確定首碼在A-Z之間
    {
        tobjRtn.eErrDesc = "輸入無效的身份證字號 (ex:首碼應介於A-Z之間) !";
        return tobjRtn;
    }
    if (isNaN(parseInt(pUserID.substring(1, 10), 10)) == true) //確定2-10碼是數字
    {
        tobjRtn.eErrDesc = "輸入無效的身份證字號 (ex:第2-10碼須是數字) !";
        return tobjRtn;
    }
    //身份證號碼第 2 碼必須為 1 或 2
    tSecondID = pUserID.substr(1, 1);
    if (tSecondID != "1" && tSecondID != "2") {
        tobjRtn.eErrDesc = "輸入無效的身份證字號 !";
        return tobjRtn;
    }
    //取得首碼對應的區域碼,A ->10, B->11, ..H->17,I->34, J->18...
    tAreaNo = "ABCDEFGHJKLMNPQRSTUVXYWZIO".search(tAreaCode) + 10;
    pUserID = tAreaNo.toString(10) + pUserID.substring(1, 10);

    //  取得CheckSum的值
    //  核對身份證號碼是否正確
    //  A  = 身份證號碼區域碼第 1碼
    //  A0 = 身份證號碼區域碼第 2碼 * (10 - 1)
    //  A1 = 身份證號碼第 2碼 * (10 - 2)
    //  A2 = 身份證號碼第 3碼 * (10 - 3)
    //  A3 = 身份證號碼第 4碼 * (10 - 4)
    //  A4 = 身份證號碼第 5碼 * (10 - 5)
    //  A5 = 身份證號碼第 6碼 * (10 - 6)
    //  A6 = 身份證號碼第 7碼 * (10 - 7)
    //  A7 = 身份證號碼第 8碼 * (10 - 8)
    //  A8 = 身份證號碼第 9碼 * (10 - 9)
    //  CheckSum = A + A0 + A1 + A2 + ........ + A7 + A8

    tSum = parseInt(pUserID.substr(0, 1), 10) + parseInt(pUserID.substr(10, 1), 10);

    for (ixI = 1; ixI <= 9; ixI++) {

        tSum = tSum + parseInt(pUserID.substr(ixI, 1), 10) * (10 - ixI);

    }

    if ((tSum % 10) != 0) {
        tobjRtn.eErrDesc = "輸入無效的身份證字號 !";
        return tobjRtn;
    }
    tobjRtn.eErr = false;
    return tobjRtn;
}

2014年10月16日 星期四

【Jquery】jquery.validate.js 取消驗證 Cancel 按鈕

驗證欄位工具

Jquery 外掛:

jquery.validate.js

button Control
屬性  新增一個:UseSubmitBehavior="True"

就可以了不用驗證

用徒在於:

送出、取消

取消 按鈕上使用

2014年10月9日 星期四

【MS SQL 資料庫 trigger 】 查詢 觸發事件 資料


 SCHEMA_NAME(tb.schema_id) N'結構描述', OBJECT_NAME(t.parent_id) N'資料表', t.name N'觸發程序名稱', parent_class_desc N'觸發程序父類別的描述',
 t.type_desc N'物件類型的描述',  tEV.type_desc '引發觸發程序的每個事件', is_instead_of_trigger N'是否為 INSTEAD OF 觸發程序'
FROM sys.triggers t INNER JOIN sys.trigger_events tEV ON t.object_id = tEV.object_id
 INNER JOIN sys.tables tb ON t.parent_id = tb.object_id

德瑞克
轉載:http://sharedderrick.blogspot.tw/2013/08/dml-trigger.html

2014年10月7日 星期二

【JAVASCRIPT,JQUERY】依據不同的瀏覽器,取得 XMLHttpRequest 物件

// 依據不同的瀏覽器,取得 XMLHttpRequest 物件
function createAJAX() {

if (window.ActiveXObject) {
try{
//alert('msx');
return new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
//alert(e.description);
try {
//alert('micro');
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
//alert(e.description);
//alert('null0');
return null;
}
}
//alert('active');
} else if (window.XMLHttpRequest) {
//alert('xmlhttp');
return new XMLHttpRequest();
} else {
//alert('null');
return null;
}
}

2014年9月26日 星期五

【ASP.NET】透過 JQUERY JSON AJAX 呼叫 asp.net WEB service 問題(POST 跟 GET )

透過  JQUERY  JSON  AJAX  呼叫  Asp.net WEB service 問題(POST 跟 GET )

但發佈上去後,別人電腦透過網址連線,卻發生 問題

在chrome 錯誤訊息說什麼找不到 IIS 500 訊息

但在本機卻都沒問題

jquery 程式如下:

    function callHellWord() {
        $.ajax({
            type: "POST",
            url: "http://XXXX.XXXX.XXXX.tw/service/XXXXXX.asmx/ApplyWifi",
            contentType: "application/json; charset=utf-8",
            dataType: "text",
            success: function(data) {
    alert('ok');
            }
        });
    }

一、原來問題出在 web.config 上

二、因為路徑問題,所以URL 要完整路徑
只要加上 允許 部份就可以了,預設是關閉
   
WEB.CONFIG 官方參考網址: http://msdn.microsoft.com/zh-tw/library/aa719747(v=vs.71).aspx

2014年9月24日 星期三

【知識分享】Word 2010 A3 列印 轉 A4 紙張

【知識分享】Word 2010 A3 列印 轉換  A4 紙張

當內容版型是A3

如果縮小 成 A4 紙張

功能如下方:


2014年9月21日 星期日

【VS 2010 】vs2010 工具箱 標準項目 不見

【VS 2010 】 Microsoft Visual Studio 2010

vs2010 工具箱 內 標準 項目 不見

【為何不見】
軟微更新動到 一些設定


【如何恢復】
你的 vs2010 的捷徑
 右鍵\相容性
把相容性 勾勾取消掉


就搞定了




2014年9月11日 星期四

【生活知識】 從 1加到99 是多少? 教學

YHAOO 神人 (魷魚絲) 教學

運用 梯形公式
(上底+下底)×高 ÷ 2
= (1+99)×99     ÷2
= 100 ×99     ÷2
= 9900     ÷2
= 4950


這個公式還蠻好記的

2014年8月28日 星期四

【ASP.NET】時間 GET TIME

// create date time 2008-03-09 16:05:07.123
DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7, 123);

String.Format("{0:y yy yyy yyyy}", dt);  // "8 08 008 2008"   year
String.Format("{0:M MM MMM MMMM}", dt);  // "3 03 Mar March"  month
String.Format("{0:d dd ddd dddd}", dt);  // "9 09 Sun Sunday" day
String.Format("{0:h hh H HH}",     dt);  // "4 04 16 16"      hour 12/24
String.Format("{0:m mm}",          dt);  // "5 05"            minute
String.Format("{0:s ss}",          dt);  // "7 07"            second
String.Format("{0:f ff fff ffff}", dt);  // "1 12 123 1230"   sec.fraction
String.Format("{0:F FF FFF FFFF}", dt);  // "1 12 123 123"    without zeroes
String.Format("{0:t tt}",          dt);  // "P PM"            A.M. or P.M.
String.Format("{0:z zz zzz}",      dt);  // "-6 -06 -06:00"   time zone


// month/day numbers without/with leading zeroes
String.Format("{0:M/d/yyyy}", dt);            // "3/9/2008"
String.Format("{0:MM/dd/yyyy}", dt);          // "03/09/2008"

// day/month names
String.Format("{0:ddd, MMM d, yyyy}", dt);    // "Sun, Mar 9, 2008"
String.Format("{0:dddd, MMMM d, yyyy}", dt);  // "Sunday, March 9, 2008"

// two/four digit year
String.Format("{0:MM/dd/yy}", dt);            // "03/09/08"
String.Format("{0:MM/dd/yyyy}", dt);          // "03/09/2008"

2014年8月21日 星期四

【財經】術語

半導體找台積電
面板找友達
IC設計是聯發科
智慧手機就是宏達電

2014年7月10日 星期四

【asp.net jquery json】解決出現 is not allowed by Access-Control-Allow-Origin

我的做法是:
asp.net 頁面上使用 jquery json 格式
到跨ip 回傳到 ashx 的頁面讀資料,
導致

Chrome 頁面上出現錯誤訊息

allow xxx 鬼的

只要 在ashx 那隻上面 加以下這樣就可以了

HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");

另外記得json 回傳的conten-type 要定義相符,不然資料會有問題

【ASP.NET】編譯時 本機找不到OpenXml 檔案 DocumentFormat.OpenXml 2.5.0

DocumentFormat.OpenXml 2.5.0

編譯時執行時找不到 OpenXML



利用NeuGet 管理介面
執行以下指令

Install-Package DocumentFormat.OpenXml


2014年7月3日 星期四

【ASP NET IIS 教學】參數 設定 說明 maxRequestLength maxQueryStringLength maxUrlLength

有些是NET 4.0 Web.config 才有的參數

檔案大小:
maxRequestLength="81920"

參數長度:
maxQueryStringLength="20480"

連結長度:
maxUrlLength="20480"

附上iis 參考網址:
http://support.microsoft.com/kb/820129

相關網址說明:
http://maxtellyou.blogspot.tw/2012/06/iis6-url-bad-request-request-header-too.html

2014年7月1日 星期二

【SQL ASP.NET】geography STGeomFromText POINT SqlParameter 跟 SQL DECLARE 參數設定

Asp.net 的 SqlParameter 參數如下:

String strSQL = @"
                                DECLARE @g geography;
                                SET @g = geography::STGeomFromText('POINT (' + @x + ' ' + @y + ')', 4326);"

List list = new List();

            if (!string.IsNullOrEmpty(x))
            {
                SqlParameter item = new SqlParameter("x", SqlDbType.NVarChar);
                item.Value = x;
                list.Add(item);
            }

            if (!string.IsNullOrEmpty(y))
            {
                SqlParameter item = new SqlParameter("y", SqlDbType.NVarChar);
                item.Value = y;
                list.Add(item);
            }


SQL 組法如下:
DECLARE @g geography;
DECLARE @x nvarchar = '120.73261855400006';
DECLARE @y nvarchar ='23.9832863352';

SET @g = geography::STGeomFromText('POINT (' + @x + ' ' + @y + ')', 4326);

【ASP.NET】SqlParameter 動態組法 AND like 使用方法

List list = new List(); 

list.Add(new SqlParameter("@Param1", "1"));
list.Add(new SqlParameter("@Param2", "2"));
list.Add(new SqlParameter("@Param3", "3"));
list.Add(new SqlParameter("@Param4", "4"));
list.Add(new SqlParameter("@ParamLike","%test%"));

SqlParameter[] param = list.ToArray();

2014年6月11日 星期三

【Jquery】外掛元件 ( datatables ) 分頁 資料源:HTML JAJX JSON

JQUERY  外掛元件名稱:datatables

JAJX 及JSON  或直接 HTML TABLE 格式

功能:分頁、快速搜尋功能

網址:http://www.datatables.net/examples/data_sources/ajax.html


2014年6月5日 星期四

【IIS】Web KML 及 KML MIME type 問題無法下載,設定教學

在 iis 上 MIME

檔案:kml
MIME type
新增:application/vnd.google-earth.kml+xml

檔案:kmz
MIME type
新增:application/vnd.google-earth.kmz

2014年5月4日 星期日

【ASP.NET MSSQL】int16 int 32 int 64 Convert 數字 smallint int bigint 型態 對照 表

ASP.NET C#

Int 16 -- (-32,768 to +32,767)

Int 32 -- (-2,147,483,648 to +2,147,483,647)

Int 64 -- (-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807)
 
MS SQL 欄位:

smallint -2^15 (-32,768) 到 2^15-1 (32,767) 2 位元組

int -2^31 (-2,147,483,648) 到 2^31-1 (2,147,483,647) 4 個位元組

bigint -2^63 (-9,223,372,036,854,775,808) 到 2^63-1 (9,223,372,036,854,775,807) 8 位元組

tinyint 0 到 255 1 位元組

PS.以上列出在程式需要用到的數字,「對應」,MSSQL 數字欄位

2014年4月7日 星期一

【Excel】 長度 數字 補零 ,數字前面沒有零

【 Excel 教學 】 長度 數字 補零 ,數字前面沒有零
公式
=IF(LEN(C1) <> 8,RIGHT("00000000"&C1,8),C1)
=RIGHT("00000000"&C1,8)
=TEXT(C1,"00000000")

【生活知識】VLC media player外掛字幕顯示亂碼

VLC media player外掛字幕顯示亂碼

轉載:http://blog.xuite.net/yh96301/blog/181177701-VLC+media+player%E5%A4%96%E6%8E%9B%E5%AD%97%E5%B9%95%E9%A1%AF%E7%A4%BA%E4%BA%82%E7%A2%BC

2014年1月31日 星期五

【吉他譜】半月彎

1=bE  2/4   D調 變調夾夾一品

      D                   #Fm
昨夜的南風輕輕 新月彎彎
B                               Em
有人俳徊 深夜愁緒驅不散
Em/#D     Em/D
似醉似醒 那午夜的夢
G                A
漸漸離我走遠
      D             #Fm       
今夜的寒星點點 浮去淡淡
  B                      Em        Em/#D
有人追尋往日回憶悲歡 是苦是甜
    G        A           Bm
那失去的愛一去不返
A     D                 G   
總是忘不了她深情款款
G           A         #Fm
為她編織密密的情網
Bm    A      G          A        D
千縷萬縷的情絲 割也割不斷
    D              G
總是忘不了她深情款款
G          A          #Fm
為她編織密密的情網
Bm   A     G            A        D
千縷萬縷的情絲 割也割不斷
D                 G
忘不了她深情款款
G            A        #Fm
為她編織密密的情網
Bm     A     G           A       D
千縷萬縷的情絲 割也割不斷
D  G  G  A  #Fm  Bm  A  G   A  
多次反復結束。

啦啦啦啦啦
Em/#D
按好食指四弦一品,中指五弦二品;    Em/D中指五弦二品;

2014年1月29日 星期三

【電影】薩凡納 心得

語言:美國
片名:薩凡納
出片:2013
類型:愛情
心得:原來前後的劇情,越來越深,不論是在朋友上或是在愛情上,讓我看到最後,我都要躲起來偷哭,好感人。