原创 Javascript - 繼承 Inheritance

繼承關係   /* Java: 1. Instance fields 2. Instance methods 3. Class fields 4. Class methods Java

原创 python - pip install 不同 python 版本

py -2 -m pip install SomePackage # default Python 2 py -2.7 -m pip install SomePackage # specifically Python 2.7 p

原创 Python - 時間格式

http://strftime.org/

原创 c# - events 觀察者模式

using System; namespace EventsDemo { class Program { static void Main(string[] args) {

原创 c# - 文字 中心 旋轉

public static void DrawRotatedTextAt(Graphics gr, float angle, string txt, float x, float y, Font the_font, Br

原创 Asp.net Core - Custom middleware

public class PrintSomethingMiddleware { private readonly RequestDelegate _next; public PrintSometh

原创 Javascript - Callback, Promise and Promise Chaining

// 1. Use callback in an async function, call the callback when necessary during the async call. const getValueFunc1 =

原创 c# - Expression Tree and Why?

https://www.tutorialsteacher.com/linq/expression-tree using System; using System.Linq.Expressions; namespace LambdaEx

原创 c# - Getting Started with Entity Framework Core: Database-First Development

https://www.codeproject.com/Articles/1209903/Getting-Started-with-Entity-Framework-Core-Databas

原创 c# - async, await

using System; using System.Threading; using System.Threading.Tasks; namespace AsyncAwaitDemo { public delegate Ta

原创 c# - struct和class的區別

1. struct不可以有無參數的構造函數 2. 如果struct存在構造函數,所有屬性必須在構造函數中初始化 3. 不可以在struct中直接初始化屬性 4. struct可以不使用new初始化 5. 若struct沒有使用new初始化

原创 Javascript - JSON.stringify - Circular Structure

let cache = []; let result = JSON.stringify(pool.pool, (key, value) => { if (typeof value === 'object'

原创 Cassandra learning notes

Installation: https://www.youtube.com/watch?v=EEXtVn3zAqc&list=PLalrWAGybpB-L1PGA-NfFu2uiWHEsdscD&index=3 Commands:  

原创 c# - Asp.net Core Identity - 操作步驟

1. Define a new class, derived from IdentityUser public class AppUser : IdentityUser     {         public string Displ

原创 Using .net core with Sqlite+password

1. 在.net framework下設置Sqlite密碼,訪問數據,重設密碼,刪除密碼。 using System; using System.Data.SQLite; namespace ConsoleApp1 { cla