markdown学习笔记

markdown学习笔记

本文是markdown的学习笔记,主要是为了方便
自己写一些文档的时候能够方便,而如果用
latex编写文档的话,似乎又太复杂了,
而markdown正好非常合适。我提倡原创,
无论内容是否是在网上已经有了,但是
本人希望能够通过自己学习并用自
己的方式把它组织表述出来。

标题

markdown的标题是以#开头的,#号的多
少可以区分标题的级别,比如:

h1

h2

h3

h4

h5
h6

很简单吧。

引用

markdown的引用用>开头。

这是一个引用

这也是个引用

列表

无序列表

  • red
  • blue
  • green

有序列表

  1. red
  2. blue
  3. yellow

关于列表的嵌套

  1. 这是个嵌套的列表

    • a
    • b
    • c
  2. 这也是个嵌套的列表

    1. a
    2. b

粗斜体

斜体
粗体

链接

我们百度很厉害

还有一种我们可以把链接做成引用的方式

新浪是一家不错的公司,但是并没有百度好。

分割线

分割线很简单。


这就是一个分割线。

图片

小美女

代码

package com.songfy.pb;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.songfy.pb.BanjiProtobuf.Banji;
import com.songfy.pb.StudentProtobuf.Sex;
import com.songfy.pb.StudentProtobuf.Student;

public class Main {

    public static void main(String[] args) throws IOException {
        
        //获取student的build sb
        Student.Builder sb = Student.newBuilder();
        //加入两个学生
        sb.setSid(110);
        sb.setName("shuaiguo");
        sb.setSex(Sex.MALE);
        sb.setAge(11);
        
        List<Student> list = new ArrayList<Student>();
        list.add(sb.build());
        
        sb = Student.newBuilder();
        sb.setSid(119);
        sb.setName("lilei");
        sb.setSex(Sex.FEMALE);
        sb.setAge(20);
        
        list.add(sb.build());
        
        //产生一个班级
        Banji.Builder bb = Banji.newBuilder();
        bb.setCid(13);
        bb.setCname("dafengqi");
        bb.addAllStudents(list);
        
        //刷入到文件中
         FileOutputStream fos = new FileOutputStream("C:/Users/songfy/Desktop/test.protoout");
         bb.build().writeTo(fos);
         fos.close();
         
         //从文件读回
         Banji bb1 = Banji.parseFrom(new FileInputStream("C:/Users/songfy/Desktop/test.protoout"));
         System.out.println(bb1.getCid() + "	" + bb1.getCname());
         for(Student s: bb1.getStudentsList()){
             System.out.println(s.getSid() + "	" + s.getName() + "	" + s.getSex() + "	" + s.getAge());
         }

    }

}

echo hello;

latex公式

  • 方式1:
    (x=frac{-bpmsqrt{b^2-4ac}}{2a})

  • 方式2:

    [x=frac{-bpmsqrt{b^2-4ac}}{2a} ]

原文地址:https://www.cnblogs.com/songfy/p/5093480.html