Open in app

Sign In

Write

Sign In

fish~~
fish~~

1 Follower

Home

About

Mar 24, 2022

(MySQL)如何得到Date Range之間的所有日子

以下方法是使用了 Recursive CTE (Common Table Expressions). 而MySQL version 是 8.0, 如果 version < 8.0 是不能使用 WITH clause的. What is CTE? 由於每條 statement 都會產生一個暫時的result set, 如果想賦予它一個名字給另外的 statement 使用, 就會用 CTE. 它是以WITH為開頭. WITH cte_name [(col1, col2, ...)] AS ( subquery ) Select col1, col2, .. from cte_name; What is Recursive CTE? 是不斷…

MySQL

1 min read

MySQL

1 min read


Feb 22, 2022

SSH: 通過Proxy/Bastion連結Remote Server

在正常的情況, 透過 ssh command 就可以連接 Server.

Ssh

3 min read

SSH: 通過Proxy/Bastion連結Remote Server
SSH: 通過Proxy/Bastion連結Remote Server
Ssh

3 min read


Feb 1, 2021

如何連接多個GitHub帳戶

Target: 使用 SSH 去連接 GitHub 帳戶 產生一個新的 SSH key $cd ~/.ssh $ssh-keygen -t rsa -C "userName@address" 當成功建立, 在 /.ssh 裏面會有兩個檔案 “id_rsa_XXX” 和 “id_rsa_XXX.pub”. (Key file 的名字是由用戶自己設定) 2. 在 GitHub 儲存 Public Key github.com -> Settings -> SSH and GPG Keys -> New SSH Keys 將 id_rsa_XXX.pub 的內容複製貼上. $pbcopy < ~/.ssh/id_rsa_XXX.pub // copy the file content(Mac) 3. 設定 ssh config $vim ~/.ssh/config 在 config file 裏輸入: Host github-new HostName github.com User loginUserName PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa_XXX

Github

2 min read

Github

2 min read


May 17, 2020

一條 JavaScript 面試題目

一條 JavaScript 面試題目 答案:

JavaScript

4 min read

一條 JavaScript 面試題目
一條 JavaScript 面試題目
JavaScript

4 min read


Feb 15, 2020

Breadth-First Search 廣度優先搜尋

這是一個用於圖形(Graph) 數據結構的 Algorithm。Graph 是由 Node 和 Edge 組合而成的。而直接連接自己的 Nodes 被稱為 Neighbor。 BFS 主要是解決兩個問題: 起點 Node 和 終點 Node 之間是否有 Path 起點 Node 和 終點 Node 之間哪一條Path是最短的 原理

Algorithms

3 min read

Breadth-First Search 廣度優先搜尋
Breadth-First Search 廣度優先搜尋
Algorithms

3 min read


Dec 28, 2019

Simple Sorting Algorithms

Insertion Sort —

Sorting Algorithms

4 min read

Simple Sorting Algorithms
Simple Sorting Algorithms
Sorting Algorithms

4 min read


Sep 28, 2019

Javascript: Callback, Promise, Async/Await

What is Callback? Javascript 是一個 Asynchronous (非同步) 的語言。有 Asynchronous 當然也有 Synchronous, 它們之間的分別是:

JavaScript

6 min read

Javascript: Callback, Promise, Async/Await
Javascript: Callback, Promise, Async/Await
JavaScript

6 min read


Aug 1, 2019

NAT Loopback

Let assume the network diagram is like this: What will happen when the External Client try to connect to the Internal Server? There is a DNAT (Destination Network Address Translation) rule on the Firewall. ----------------------------------- | 1.1.1.1:8000 --> 192.168.168.3:80 | ----------------------------------- When there is a Client try to access Server A from the Internet, let assume the IP is 1.1.1.2. …

Networking

2 min read

NAT Loopback
NAT Loopback
Networking

2 min read


Jul 8, 2019

How to establish SSH connection without Password

Client: 192.168.0.2 Server: 192.168.0.1 ### Client Generate Key ### [root@Client ~]# ssh-keygen -t rsa -b 1024 The command generates public/private ‘RSA’ key pair. The -t option selects the algorithm and the -b option selects the key size. ### Transfer the Public Key ### [root@Client ~ ]# scp id_rsa.pub root@192.168.0.1:~/ ssh root@192.168.0.1 [root@Server ~]# cat ~/.ssh/id_rsa.pub >> authorized_keys

Ssh

1 min read

Ssh

1 min read


Mar 29, 2019

Global Interpreter Lock (GIL)

What? — 這是一個用在python內的一個鎖。但它並不是 python 本身就存在的功能,而是 CPython 內建的功能。CPython同時是一個 interpreter 和 compiler,它將 python code 轉換為 bytecode 之後再執行它。而GIL的作用是確保只有一個 thread 可以被 Interpreter 控制和執行。 Why? 在了解 …

Python

3 min read

Global Interpreter Lock (GIL)
Global Interpreter Lock (GIL)
Python

3 min read

fish~~

fish~~

1 Follower

A Programmer, Data Engineer

Following
  • 澳洲雲端架構師 EC (Cloud Architect EC)

    澳洲雲端架構師 EC (Cloud Architect EC)

  • 數據分析那些事

    數據分析那些事

  • Huli

    Huli

  • Jayden Lin

    Jayden Lin

  • Netflix Technology Blog

    Netflix Technology Blog

See all (30)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams