Text 示例#
- basic text
This line of text is meant to be treated as deleted text.
This line of text renders as underlined.
This line of text renders as bold text.
This line of text renders as italicized text.
- lead text
This is a lead paragraph. It stands out from regular paragraphs.
- emoji1
That is so funny! 😃
- abbreviation
HTML
List 示例#
-
Fruit
- Apple
- Orange
- Banana
-
Dairy
- Milk
- Cheese
-
Write the press release
-
Update the website
-
Contact the media
Quote 示例#
Don't communicate by sharing memory, share memory by communicating.
— Rob Pike2
{.blockquote}
Cite 示例#
This is a reference to a book3.
Math 示例#
This is an inline $-b \pm \sqrt{b^2 - 4ac} \over 2a$ formula
This is not an inline formula:
Table 示例#
- basic table
Italics | Bold | Code |
---|---|---|
italics | bold | code |
{.table} |
- table with alignment
{{< table "table-striped" >}}
# | Item | Left aligned | Center aligned | Right aligned |
---|---|---|---|---|
1. | First item | some text | more text | even more text |
2. | Second item | some text | more text | even more text |
3. | Third item | some text | more text | even more text |
{{< /table >}} |
- table with border
# | Item |
---|---|
1. | First item |
2. | Second item |
3. | Third item |
{.table .table-bordered .border-primary} |
Code 示例#
go#
package main
import (
"fmt"
"io/ioutil"
"os/exec"
)
func main() {
dateCmd := exec.Command("date")
dateOut, err := dateCmd.Output()
if err != nil {
panic(err)
}
fmt.Println("> date")
fmt.Println(string(dateOut))
grepCmd := exec.Command("grep", "hello")
grepIn, _ := grepCmd.StdinPipe()
grepOut, _ := grepCmd.StdoutPipe()
grepCmd.Start()
grepIn.Write([]byte("hello grep\ngoodbye grep"))
grepIn.Close()
grepBytes, _ := ioutil.ReadAll(grepOut)
grepCmd.Wait()
fmt.Println("> grep hello")
fmt.Println(string(grepBytes))
lsCmd := exec.Command("bash", "-c", "ls -a -l -h")
lsOut, err := lsCmd.Output()
if err != nil {
panic(err)
}
fmt.Println("> ls -a -l -h")
fmt.Println(string(lsOut))
}
python#
import matplotlib.pyplot as plt
price = [2.50, 1.23, 4.02, 3.25, 5.00, 4.40]
sales_per_day = [34, 62, 49, 22, 13, 19]
plt.scatter(price, sales_per_day)
plt.show()
Video 示例#
youtube#
bilibili#
Presentation 示例#
- slidev
- webslides