原创 VSCode - Task.json同時Build多個Projects.

https://stackoverflow.com/questions/52238171/how-to-run-multiple-tasks-in-vs-code-on-build

原创 Asp.net Core - File Logging

https://nblumhardt.com/2016/10/aspnet-core-file-logger/

原创 Javascript - 方法注入 Method Injection 'monkey-patching'

讀Javascript: The Definitive Guide這本書的時候發現一個有意思的代碼,可以在調用方法的之前和之後注入一些回調或者代碼,分享給大家: // Define a method. function addBy10(

原创 Javascript - A Set class

// 9.6.1 A Set Class function Set() { this.values = {}; this.n = 0; this.add.apply(thi

原创 System.web vs System.webserver 的區別是什麼?

https://forums.asp.net/t/1642328.aspx?What+s+the+purposes+of+and+differences+between+system+web+and+system+webServer+

原创 c# - Owin Katana

https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/an-overview-of-project-katana

原创 Javascript - async await

// 1. async functions always return a Promise // 2. await will return resolved data of a promise, it can be a 'data or

原创 Javascript - NodeJS - Convert buffer to stream

The most effective way: const stream = require('stream'); // The buffer let buffer = Buffer.from("Hello world!", "utf-

原创 標點符號 英文

轉載自:http://www.ruanyifeng.com/blog/2007/07/english_punctuation.html . period or full stop 句號 , comma 逗號 : colon 冒號 ; se

原创 c# - 控制檯程序 合併Dll 不使用任何第三方插件

準備工作: 1. 新建一個控制檯程序Project:CombinedDlls. 2. 再新建一個Class Library Project: ThirdPartyTool,新建一個類Util.cs, 在其中實現一個static的SayHe

原创 Javascript - var function scope.

var variables are ‘function scope.’ What does this mean? It means they are only available inside the function they’re c

原创 C# - List of List 排列組合

public static List<List<T>> AllCombinationsOf<T>(List<List<T>> sets) { var combinations =

原创 c# - Object Pooling(對象池)

Object pooling的主要目的是提升程序性能。代碼會先從Pool中取得已經建好的對象實例,如果Pool中沒有對象實例才需要重新創建,以下代碼是一個示例: namespace ObjectPool { using Syst

原创 Javascript - Consuming Readable Streams with Async Iterators

// https://nodejs.org/api/stream.html#stream_class_stream_passthrough // search: Consuming Readable Streams with Async

原创 c# - Entityframework Core, code first, add a new table and it's relationships.

1. Define a new class, include existing class: AppUser.     public class UserFollowing     {         public string Obs