:verbose echo $variable
顯示變量的值和它的設定來源:checkhealth $Plugin
查看 Neovim 插件的狀態, 例如:checkhealth nvim-treesitter
:scriptnames
列出當前加載的所有腳本:map
列出當前所有的 mapping:nmap
列出 normal mode 的所有 mapping:autocmd
列出所有 auto command:set
列出所有的選項:echo g:
列出所有的全域變數
In JVM Clojure, Exceptions are for operating errors ("something went wrong") and Assertions are for programmer and correctness errors ("this program is wrong").
An assert
might be the right tool if throwing an Exception isn't enough. Use
them when the assertion failing means
- there's a bug in this program (not a caller)
- what happens next is undefined
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
# 假設參數 | |
lambda_visits = 5 # 主動拜訪次數的均值 | |
lambda_leads = 3 # 主動找上門的客戶數均值 | |
alpha = 0.1 # 主動拜訪轉換率 | |
beta = 0.5 # 主動找上門轉換率 | |
# 蒙地卡羅模擬 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find People Born in the Fifties | |
Using the sandbox on the right, write and execute a query to return people born in the 1950’s (1950 - 1959) that are both Actors and Directors. | |
How many Person nodes are returned? | |
``` | |
MATCH(p:Actor) | |
WHERE p:Director AND date('1950-01-01') <= date(p.born) < date('1959-12-31') | |
RETURN count(p) | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns myproject | |
"FIXME: my new org.corfield.new/scratch project." | |
(:require [clojure.walk :as walk])) | |
(def tree | |
(list #:cil{:id 2 | |
:children | |
(list #:citl{:id 2 :ip 2 | |
:children | |
(list #:citl{:id 5 :tp 2} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[:customer-invoice | |
[:div.bg-violet-100.m-2.p-2.flex | |
[:p.flex-auto "Reference-number: invoice 1"] | |
[:p.flex-auto "status: unreleased"]] | |
[:customer-invoice-line | |
[:div.bg-violet-100.m-2.p-2.flex | |
[:p.flex-auto "Id: 1"] | |
[:p.flex-auto "Invoice: invoice 1"] | |
[:p.flex-auto "Amount: 2000"]] | |
[:customer-invoice-tax-line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns myproject | |
"FIXME: my new org.corfield.new/scratch project." | |
(:require [clojure.walk :as walk])) | |
(def lines | |
(list {:reference-number "invoice 1" | |
:status "unreleased"} | |
(list {:invoice "invoice 1" | |
:account "100" | |
:desp "customer invoice line" |
NewerOlder