-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
83 lines (41 loc) · 19.6 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>墨染云华技术站</title>
<link href="http://anania.staswit.name/atom.xml" rel="self"/>
<link href="http://anania.staswit.name/"/>
<updated>2021-01-06T15:21:58.693Z</updated>
<id>http://anania.staswit.name/</id>
<author>
<name>STASWIT</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>Mirai-Webhook-Bridge 思路文档</title>
<link href="http://anania.staswit.name/2021/01/04/Mirai-Webhook-Bridge-Docs/"/>
<id>http://anania.staswit.name/2021/01/04/Mirai-Webhook-Bridge-Docs/</id>
<published>2021-01-04T15:32:52.000Z</published>
<updated>2021-01-06T15:21:58.693Z</updated>
<content type="html"><![CDATA[<h1 id="API"><a href="#API" class="headerlink" title="API"></a>API</h1><h2 id="接收消息"><a href="#接收消息" class="headerlink" title="接收消息"></a>接收消息</h2><blockquote><p>[ws] /receiveMessage?pluginKey=pluginKey</p></blockquote><p><code>请求</code></p><table><thead><tr><th align="center">名称</th><th align="center">类型</th><th align="center">可选</th><th align="center">说明</th><th align="center">示例</th></tr></thead><tbody><tr><td align="center">pluginKey</td><td align="center">string</td><td align="center">false</td><td align="center">插件的注册密钥</td><td align="center">“qwerty”</td></tr></tbody></table><p><code>响应</code></p><pre><code class="json"> { "code":0, // 状态码 "errMsg":"", // 错误信息 "sender":{ // 发送者信息 "fromGroup":{ "id":10000, // 群号 "name":"xxx", // 群名称 "botPermission":"owner" // 机器人在群中的权限 }, "id":1234567890, // 发送者账号 "name":"hello", // 发送者昵称(群中显示群名片) "permission":"admin" // 发送者权限 }, "messageChain":[ // 消息链 { "msgID":10000, // 消息id "msgTime":22222, // 发送时间 "msg":[ { "type":"plain", // 消息类型 "text":"hello world", // 消息内容 }, { "type":"image", "sources":"https://example.com/" } ] } ] }</code></pre><h2 id="发送消息"><a href="#发送消息" class="headerlink" title="发送消息"></a>发送消息</h2><blockquote><p>[ws] /sendMessage</p></blockquote><p><code>请求</code></p><pre><code class="json"> { "pluginKey":"qwerty", // 插件注册密钥 "type": "group", // 消息类型 "target":10000, // 发送到的号码 "quote":0, // 引用回复的消息id "messageChain":[ { "msgID":0, // 消息id "msgTime":0, // 发送时间 "msg":[ { "type":"plain", // 消息类型 "text":"hello world" // 消息内容 }, { "type":"image", // 消息类型 "localPath":"", // 图片本地地址 "remoteURL":"https://example.com/" // 图片远程地址 } ] } ] }</code></pre><p><code>响应</code></p><pre><code class="json"> { "code":0, "errMsg":"", "msgID":123456 }</code></pre><h2 id="退出群聊(删除好友)"><a href="#退出群聊(删除好友)" class="headerlink" title="退出群聊(删除好友)"></a>退出群聊(删除好友)</h2><blockquote><p>[ws] /botQuit?type=type&id=targetid</p></blockquote><p><code>请求</code></p><pre><code class="json"> { "pluginKey":"qwerty", // 插件注册密钥 "type": "group", // 类型 "target":10000 // 退出的号码 }</code></pre><p><code>响应</code></p><pre><code class="json"> { "code":0, "errMsg":"" }</code></pre><h2 id="撤回消息"><a href="#撤回消息" class="headerlink" title="撤回消息"></a>撤回消息</h2><blockquote><p>[ws] /recall</p></blockquote><p><code>请求</code></p><pre><code class="json"> { "pluginKey":"qwerty", "msgID":10000 }</code></pre><p><code>响应</code></p><pre><code class="json"> { "code":0, "errMsg":"" }</code></pre>]]></content>
<summary type="html"><h1 id="API"><a href="#API" class="headerlink" title="API"></a>API</h1><h2 id="接收消息"><a href="#接收消息" class="headerlink" title="接收消息"></a>接收消</summary>
<category term="墨可莉雅" scheme="http://anania.staswit.name/categories/%E5%A2%A8%E5%8F%AF%E8%8E%89%E9%9B%85/"/>
</entry>
<entry>
<title>中缀表达式的转换和计算</title>
<link href="http://anania.staswit.name/2020/12/13/%E4%B8%AD%E7%BC%80%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9A%84%E8%BD%AC%E6%8D%A2%E5%92%8C%E8%AE%A1%E7%AE%97/"/>
<id>http://anania.staswit.name/2020/12/13/%E4%B8%AD%E7%BC%80%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9A%84%E8%BD%AC%E6%8D%A2%E5%92%8C%E8%AE%A1%E7%AE%97/</id>
<published>2020-12-13T08:23:19.000Z</published>
<updated>2021-01-05T14:24:28.792Z</updated>
<content type="html"><![CDATA[<h2 id="中缀表达式转后缀表达式"><a href="#中缀表达式转后缀表达式" class="headerlink" title="中缀表达式转后缀表达式"></a>中缀表达式转后缀表达式</h2><h3 id="原理分析"><a href="#原理分析" class="headerlink" title="原理分析"></a>原理分析</h3><h3 id="代码解析"><a href="#代码解析" class="headerlink" title="代码解析"></a>代码解析</h3><pre><code class="cpp"> /*============================================================================== * 中缀表达式转后缀表达式 * ============================================================================*/ int toPostfixExpression(std::string infix) { int expPoint = 0; /*将表达式分解,依次入栈处理*/ for (expPoint = 0; expPoint < infix.length(); expPoint++) { if (isdigit(infix[expPoint]) != 0) { /*如果是数字,直接入栈,如果是多位数,整合后入栈*/ if (expPoint != 0 && isdigit(infix[expPoint - 1]) != 0) { tmpStr = infix[expPoint]; tmpNum = atoi(expStack1.back().c_str()) * 10 + atoi(tmpStr.c_str()); expStack1.pop_back(); expStack1.push_back(std::to_string(tmpNum)); } else { tmpStr = infix[expPoint]; expStack1.push_back(tmpStr); } } else { /*如果是运算符*/ if (opera.empty()) { /*如果运算符栈是空栈,直接入栈*/ opera.push_back(infix[expPoint]); } else { /*如果不是空栈,判断上一个运算符*/ switch (infix[expPoint]) // 第一级判断 { case '+': case '-': switch (opera.back()) // 加减第二级判断 { case '+': case '-': opera.push_back(infix[expPoint]); break; case '*': case '/': case 'd': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); opera.push_back(infix[expPoint]); break; case '^': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); if (!opera.empty()) { switch (opera.back()) // 乘方第三级 { case '+': case '-': case '(': opera.push_back(infix[expPoint]); break; case '*': case '/': case '^': case 'd': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); opera.push_back(infix[expPoint]); break; default: break; } } else { opera.push_back(infix[expPoint]); } break; case '(': opera.push_back(infix[expPoint]); default: break; } break; case '*': case '/': switch (opera.back()) // 乘除第二级判断 { case '+': case '-': case '*': case '/': opera.push_back(infix[expPoint]); break; case 'd': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); opera.push_back(infix[expPoint]); break; case '^': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); if (!opera.empty()) { switch (opera.back()) // 乘方第三级 { case '+': case '-': case '*': case '/': case '(': opera.push_back(infix[expPoint]); break; case '^': case 'd': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); opera.push_back(infix[expPoint]); break; default: break; } } else { opera.push_back(infix[expPoint]); } break; case '(': opera.push_back(infix[expPoint]); default: break; } break; case 'd': switch (opera.back()) // 掷骰第二级判断 { case '+': case '-': case '*': case '/': case 'd': opera.push_back(infix[expPoint]); break; case '^': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); if (!opera.empty()) { switch (opera.back()) // 乘方第三级 { case '+': case '-': case '*': case '/': case 'd': case '(': opera.push_back(infix[expPoint]); break; case '^': tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); opera.push_back(infix[expPoint]); break; default: break; } } else { opera.push_back(infix[expPoint]); } break; case '(': opera.push_back(infix[expPoint]); default: break; } break; case '^': case '(': opera.push_back(infix[expPoint]); break; case ')': while (opera.back() != '(') { tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); } opera.pop_back(); break; default: break; } } } } /*将临时栈的低位运算符按顺序放入表达式栈*/ for (size_t operaPos = opera.size(); operaPos > 0; operaPos--) { tmpStr = opera.back(); expStack1.push_back(tmpStr); opera.pop_back(); } /*清空使用后的通用变量*/ //tmpNum = 0; //tmpStr.clear(); return 0; }</code></pre>]]></content>
<summary type="html"><h2 id="中缀表达式转后缀表达式"><a href="#中缀表达式转后缀表达式" class="headerlink" title="中缀表达式转后缀表达式"></a>中缀表达式转后缀表达式</h2><h3 id="原理分析"><a href="#原理分析" class="</summary>
<category term="墨可莉雅" scheme="http://anania.staswit.name/categories/%E5%A2%A8%E5%8F%AF%E8%8E%89%E9%9B%85/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="http://anania.staswit.name/2020/12/13/hello-world/"/>
<id>http://anania.staswit.name/2020/12/13/hello-world/</id>
<published>2020-12-13T03:01:44.871Z</published>
<updated>2020-12-13T03:01:44.872Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><pre><code class="bash">$ hexo new "My New Post"</code></pre><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><pre><code class="bash">$ hexo server</code></pre><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><pre><code class="bash">$ hexo generate</code></pre><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><pre><code class="bash">$ hexo deploy</code></pre><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
<summary type="html"><p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for</summary>
</entry>
</feed>