banner
OnePiece Blog

OnePiece Blog

Markdown Example

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:
x=a0+1a1+1a2+1a3+a4x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}}
xX,yϵ\forall x \in X, \quad \exists y \leq \epsilon

Table 示例#

  • basic table
ItalicsBoldCode
italicsboldcode
{.table}
  • table with alignment

{{< table "table-striped" >}}

#ItemLeft alignedCenter alignedRight aligned
1.First itemsome textmore texteven more text
2.Second itemsome textmore texteven more text
3.Third itemsome textmore texteven 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

Figma 示例#

Image 示例#

image

ProcessOn 示例#

Footnotes#

  1. Emoji cheat sheet

  2. The above quote is excerpted from Rob Pike's talk during Gopherfest, November 18, 2015.

  3. The Go Programming Language. Alan A. A. Donovan and Brian W. Kernighan. 2015. Addison-Wesley Professional.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.