Sing's Log

Knowledge worth sharing


  • Home

  • Tags

  • Timeline

  • Portfolio

  • Service

  • Search

如何計算兩日期區間有無重疊?

Posted on 2017-01-17 | Edited on 2024-07-16 |

今天剛好遇到要計算兩個日期區間有沒有重疊,發現這個問題其實可以想成,A和B一生中有沒有可能相遇?

這麼一想就簡單多了,就是兩人必須在對方死亡前出生!

1
var isOverlap = a.start < b.end && b.start < a.end

如何找 Windows cmd 輸入的 command 實體路徑?

Posted on 2016-08-08 | Edited on 2024-07-16 |

語法:Where + Command
範例:where node
輸出:C:\Program Files\nodejs\node.exe

會特別找這個是因為我常更新某個command後,卻發現版本依然停在舊的,這時候用where就知道大概是哪個環境變數和舊版程式在搞鬼囉!

AngularJS Minified Error:[$injector:unpr]

Posted on 2015-03-10 | Edited on 2024-07-16 |

今天在把 AngularJS 的 Code 放上 Production 環境時出現了一個問題:

Read more »

如何查生字注音?

Posted on 2015-01-12 | Edited on 2024-07-16 |

不知道大家是否和我一樣,常常看到複雜的中文字不知道怎麼念,更不知道怎麼查?
今天經過高人指點才知道查注音超簡單,以下看圖說故事:

Read more »

Javascript == vs ===

Posted on 2015-01-07 | Edited on 2024-07-16 |

今天仔細研究了Javascript中 == 和 === 的差別才知道它們會依變數型別有不同的比較方式:

非Object型別(String , Int…):

== 比 ‘value’
=== 比 ‘value’ & ‘type’

Read more »

SVN Merge - The last merge operation tried to modify the directory , but the directory is missing locally.

Posted on 2014-11-17 | Edited on 2024-07-16 |

今天在SVN上做Merge動作時,發生Tree Conflict錯誤:

Read more »

C# Shallow Cpoy VS Deep Copy

Posted on 2014-11-14 | Edited on 2024-07-16 |

淺層拷貝於深層拷貝差別

有時需要拷貝物件時到底該怎樣視自己需要來做拷貝?
差別在於拷貝的class內部的參考物件是否只拷貝參考指標
或是拷貝完整獨立物件(連參考物件一起拷貝)

Read more »

三種色彩表達法 - RGB & HEX & ColorName

Posted on 2014-11-12 | Edited on 2024-07-16 |

小弟在剛開始寫程式的時候,看到顏色就一陣頭痛,懶惰如我終於受不了決定來研究解藥了。

常見分為Color Name、HEX、RGB三種表達方式:

Read more »

如何在關閉Outlook後自動隱藏至右下角?

Posted on 2014-11-08 | Edited on 2024-07-16 |

在公司使用Outlook時常常不小心按到X,Outlook就直接關掉了,這時候收到信就不會自動通知…,上網找到了按關閉時收到右下角工具列以及縮小時自動隱藏到右下角的方法,在此分享給各位^^

Read more »

C# Interface base rule 介面潛規則

Posted on 2014-11-07 | Edited on 2024-07-16 |

Interface是C#裡相當重要的概念,它可以完成多型,讓我們方便維護,本篇整理寫介面時的基本規則,如下:

Read more »

1…789
Sing Ming Chen

Sing Ming Chen

Sing's log, a developer's blog

90 posts
259 tags
GitHub E-Mail Linkedin Facebook
© 2024 Sing Ming Chen
Powered by Hexo v3.9.0
|
Theme — NexT.Gemini v6.3.0