Loading

博客园markdown效果

博客园markdown 编辑器

不支持语法

  • 脚注
  • 复选框
  • 流程图
  • TOC

标题

用法

在想要设置为标题的文字前面加#来表示
一个#是一级标题,二个#是二级标题,以此类推。支持六级标题。

注:标准语法一般在#后跟个空格再写文字

示例

# 这是一级标题
## 这是二级标题
### 这是三级标题
#### 这是四级标题
##### 这是五级标题
###### 这是六级标题

效果

这是一级标题

这是二级标题

这是三级标题

这是四级标题

这是五级标题
这是六级标题

字体

用法

  • 加粗
    要加粗的文字左右分别用两个*号包起来

  • 斜体
    要倾斜的文字左右分别用一个*号包起来

  • 斜体加粗
    要倾斜和加粗的文字左右分别用三个*号包起来

  • 删除线
    要加删除线的文字左右分别用两个~~号包起来

示例

**这是加粗的文字**
*这是倾斜的文字*`
***这是斜体加粗的文字***
~~这是加删除线的文字~~

效果

这是加粗的文字
这是倾斜的文字`
这是斜体加粗的文字
这是加删除线的文字

引用

用法

在引用的文字前加>即可。引用也可以嵌套,如加两个>>三个>>>
n个...
貌似可以一直加下去

示例

>这是引用的内容
>>这是引用的内容
>>>这是引用的内容

效果

这是引用的内容

这是引用的内容

这是引用的内容

引用中有加粗和code

备注
为特定运行时指定 dotnet publish -rdotnet build -r 参数,因为不支持其他运行时环境。

分割线

用法

三个或者三个以上的 - 或者 * 都可以。

示例

---
----
***
*****

效果





图片

用法

![图片alt](图片地址 ''图片title'')

图片alt就是显示在图片下面的文字,相当于对图片内容的解释。
图片title是图片的标题,当鼠标移到图片上时显示的内容。title可加可不加

示例


![blockchain](https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/
u=702257389,1274025419&fm=27&gp=0.jpg "区块链")

效果

![blockchain](https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/
u=702257389,1274025419&fm=27&gp=0.jpg "区块链")
logo

超链接

用法

超链接名
title可加可不加

示例

[简书](http://jianshu.com)
[百度](http://baidu.com)

效果

简书
百度

列表

用法

语法:
无序列表用 - + * 任何一种都可以

示例

- 列表内容
+ 列表内容
* 列表内容

注意:- + * 跟内容之间都要有一个空格

效果

  • 列表内容
  • 列表内容
  • 列表内容

有序列表

1.列表内容
2.列表内容
3.列表内容

注意:序号跟内容之间要有空格

1.列表内容
2.列表内容
3.列表内容

列表嵌套

表格

用法

表头|表头|表头
---|:--:|---:
内容|内容|内容
内容|内容|内容

第二行分割表头和内容。
- 有一个就行,为了对齐,多加了几个
文字默认居左
-两边加:表示文字居中
-右边加:表示文字居右
注:原生的语法两边都要用 | 包起来。此处省略

效果

header 1 header 2 header 3 header 4 header 4
row 1 col 1 row 1 col 2 row 1 col 3 row 1 col 4 row 1 col 5
row 2 col 1 row 2 col 2 row 2 col 3 row 2 col 4 row 2 col5

对齐

markdown代码

| Item      |    Value | Qty  |
| :-------- | --------:| :--: |
| Computer  | 1600 USD |  5   |
| Phone     |   12 USD |  12  |
| Pipe      |    1 USD | 234  |

Item左对齐,Value右对齐,Qty居中

Item Value Qty
Computer 1600 USD 5
Phone 12 USD 12
Pipe 1 USD 234

微信小程序API

说明 最低版本
contact 打开客服会话,如果用户在会话中点击消息卡片后返回小程序,可以从 bindcontact 回调中获得具体信息具体说明 1.1.0
share 触发用户转发,使用前建议先阅读使用指引 1.2.0
getUserInfo 获取用户信息,可以从bindgetuserinfo回调中获取到用户信息 1.3.0

代码

用法

单行代码:代码之间分别用一个反引号包起来
代码块:代码之间分别用三个反引号包起来,且两边的反引号单独占一行

效果

这里是单行代码
这里是单行代码

csharp

	/// <summary>
	/// 阶乘
	/// </summary>
	public void Factorial()
	{
		//1*2*3*4*5
		Func<int, int> fib = null;
		fib = n => (n == 1) ? 1 : fib(n - 1) * n;

		var result = fib(5);

		result.Dump();
	}
	[TestMethod]
	public void RecursionGetFiles()
	{
		var recGetFiles =
				Functional.Y<string, IEnumerable<string>>
				(f => d => Directory.GetFiles(d).Concat(Directory.GetDirectories(d).SelectMany(f)));

		foreach (var f in recGetFiles(Directory.GetCurrentDirectory()))
			Console.WriteLine(f);

	}

/// <summary>
/// 获取用户公司基本信息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpGet("corporate-baseinfo")]
[ProducesResponseType(typeof(UserCorporateBaseInfoModel), 200)]
public IActionResult GetUserCorporateBaseInfo([FromQuery]UserFilterModel model)
{
    //返回值
    return Ok(ApiResponseModel.Create(_buss.GetUserCorporateBaseInfo(model)));
}
static void SwitchStatement(string[] args)
{
    int n = args.Length;
    switch (n) 
    {
        case 0:
            Console.WriteLine("No arguments");
            break;
        case 1:
            Console.WriteLine("One argument");
            break;
        default:
            Console.WriteLine($"{n} arguments");
            break;
    }
}
static System.Collections.Generic.IEnumerable<int> Range(int from, int to) 
{
    for (int i = from; i < to; i++) 
    {
        yield return i;
    }
    yield break;
}
static void YieldStatement(string[] args)
{
    foreach (int i in Range(-10,10)) 
    {
        Console.WriteLine(i);
    }
}

using System;
class ArrayExample
{
    static void Main() 
    {
        int[] a = new int[10];
        for (int i = 0; i < a.Length; i++) 
        {
            a[i] = i * i;
        }
        for (int i = 0; i < a.Length; i++) 
        {
            Console.WriteLine($"a[{i}] = {a[i]}");
        }
    }
}

JavaScript

<script src="http://cdn.bootcss.com/highlight.js/8.0/highlight.min.js"></script>
function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    var q = window.location.pathname.substr(1).match(reg_rewrite);
    if (r != null) {
        return unescape(r[2]);
    } else if (q != null) {
        return unescape(q[2]);
    } else {
        return null;
    }
}
function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    var q = window.location.pathname.substr(1).match(reg_rewrite);
    if (r != null) {
        return unescape(r[2]);
    } else if (q != null) {
        return unescape(q[2]);
    } else {
        return null;
    }
}

css

/* 设置滚动条的样式 */
::-webkit-scrollbar {
width:12px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
-webkit-box-shadow:inset006pxrgba(0,0,0,0.3);
border-radius:10px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius:10px;
background:rgba(0,0,0,0.1);
-webkit-box-shadow:inset006pxrgba(0,0,0,0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
background:rgba(255,0,0,0.4);
}
/*我的活动*/
.user-activity {
    padding:  0 0.24rem;
}
.user-activity li {
    position: relative;
    padding-left: 0;
    padding-right: 1.07rem;
    border-width: 0.02rem;
}
.user-activity li .tag {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 0.3rem;
    width: 0.9rem;
    height: 0.9rem;
    background-repeat: no-repeat;
    background-size: 100%;
}
.user-activity li .tag.blue {
    background-image: url(./images/tag-blue.png);
}
.user-activity li .tag.red {
    background-image: url(./images/tag-red.png);
}
.user-activity li .tag.gray {
    background-image: url(./images/tag-gray.png);

Json

{
    "name": "BeJson",
    "url": "http://www.bejson.com",
    "page": 88,
    "isNonProfit": true,
    "address": {
        "street": "科技园路.",
        "city": "江苏苏州",
        "country": "中国"
    },
    "links": [
        {
            "name": "Google",
            "url": "http://www.google.com"
        },
        {
            "name": "Baidu",
            "url": "http://www.baidu.com"
        },
        {
            "name": "SoSo",
            "url": "http://www.SoSo.com"
        }
    ]
}

Java

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

SQL

--给N赋初值为30
declare @n int set @n = 30

; with maco as
(
	select top(@n)
        plan_handle,  
        sum(total_worker_time) as total_worker_time ,  
        sum(execution_count) as execution_count ,  
        count(1) as sql_count
    from sys.dm_exec_query_stats group by plan_handle
    order by sum(total_worker_time) desc
)  
select t.text ,
		a.total_worker_time ,
		a.execution_count ,
		a.sql_count
from    maco a
        cross apply sys.dm_exec_sql_text(plan_handle) t
        
/* 结果格式如下  
text     total_worker_time  execution_count   sql_count  
-------- ------------------ ----------------- ---------  
内容略  
*/
<?xml version="1.0" encoding="utf-8"?>

<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <!--
    In the example below, the "SetAttributes" transform will change the value of
    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
    finds an attribute "name" that has a value of "MyDB".
    <connectionStrings>
      <add name="MyDB"
        connectionString="Data Source=TestSQLServer;Initial Catalog=MyTestDB;Integrated Security=True"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
  -->
    <connectionStrings>
      <add name="DefaultConnection"
        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" providerName="System.Data.SqlClient"
        xdt:Transform="Replace" xdt:Locator="Match(name)"/>
    </connectionStrings>
  <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
    <!--
      In the example below, the "Replace" transform will replace the entire
      <customErrors> section of your web.config file.
      Note that because there is only one customErrors section under the
      <system.web> node, there is no need to use the "xdt:Locator" attribute.
      <customErrors defaultRedirect="GenericError.htm"
        mode="RemoteOnly" xdt:Transform="Replace">
        <error statusCode="500" redirect="InternalError.htm"/>
      </customErrors>
    -->
  </system.web>
</configuration>

dos

[root@iz2ze76ybn73dvwmdij06zz linuxdemo]# cat --help
用法:cat [选项]... [文件]...
将[文件]或标准输入组合输出到标准输出。

 -A, --show-all           等于-vET
 -b, --number-nonblank    对非空输出行编号
 -e                       等于-vE
 -E, --show-ends          在每行结束处显示"$"
 -n, --number             对输出的所有行编号
 -s, --squeeze-blank      不输出多行空行
 -t                       与-vT 等价
 -T, --show-tabs          将跳格字符显示为^I
 -u                       (被忽略)
 -v, --show-nonprinting   使用^ 和M- 引用,除了LFD和 TAB 之外
     --help    显示此帮助信息并退出
     --version    显示版本信息并退出

如果没有指定文件,或者文件为"-",则从标准输入读取。

示例:
 cat f - g  先输出f 的内容,然后输出标准输入的内容,最后输出g 的内容。
 cat        将标准输入的内容复制到标准输出。

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
请向<http://translationproject.org/team/zh_CN.html> 报告cat 的翻译错误
要获取完整文档,请运行:info coreutils 'cat invocation'

linux bash

[root@iz2ze76ybn73dvwmdij06zz linuxdemo]# cat --help
用法:cat [选项]... [文件]...
将[文件]或标准输入组合输出到标准输出。

 -A, --show-all           等于-vET
 -b, --number-nonblank    对非空输出行编号
 -e                       等于-vE
 -E, --show-ends          在每行结束处显示"$"
 -n, --number             对输出的所有行编号
 -s, --squeeze-blank      不输出多行空行
 -t                       与-vT 等价
 -T, --show-tabs          将跳格字符显示为^I
 -u                       (被忽略)
 -v, --show-nonprinting   使用^ 和M- 引用,除了LFD和 TAB 之外
     --help    显示此帮助信息并退出
     --version    显示版本信息并退出

如果没有指定文件,或者文件为"-",则从标准输入读取。

示例:
 cat f - g  先输出f 的内容,然后输出标准输入的内容,最后输出g 的内容。
 cat        将标准输入的内容复制到标准输出。

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
请向<http://translationproject.org/team/zh_CN.html> 报告cat 的翻译错误
要获取完整文档,请运行:info coreutils 'cat invocation'

流程图(不支持)

st=>start: Start
e=>end
op=>operation: My Operation
cond=>condition: Yes or No?

st->op->cond
cond(yes)->e
cond(no)->op
graph LR
A-->B
sequenceDiagram
A->>B: How are you?
B->>A: Great!
gantt
dateFormat YYYY-MM-DD
section S1
T1: 2014-01-01, 9d
section S2
T2: 2014-01-11, 9d
section S3
T3: 2014-01-02, 9d

以及时序图:

Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!

复选框(不支持)

使用 - [ ]- [x] 语法可以创建复选框,实现 todo-list 等功能。例如:

参考

posted @ 2017-11-02 13:08  牧白  阅读(1886)  评论(2编辑  收藏  举报