-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
156 lines (93 loc) · 85.1 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Hexo</title>
<link href="/atom.xml" rel="self"/>
<link href="http://yoursite.com/"/>
<updated>2020-02-29T03:30:04.101Z</updated>
<id>http://yoursite.com/</id>
<author>
<name>John Doe</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>driving_test</title>
<link href="http://yoursite.com/2020/02/29/driving-test/"/>
<id>http://yoursite.com/2020/02/29/driving-test/</id>
<published>2020-02-29T02:56:19.000Z</published>
<updated>2020-02-29T03:30:04.101Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h1 id="考驾照科一笔记"><a href="#考驾照科一笔记" class="headerlink" title="考驾照科一笔记"></a>考驾照科一笔记</h1><a id="more"></a><ul><li><p>1<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/105922765.png" alt="mark"><br> tips:</p><p> 难度等级:<br> 《实施条例》第七十八条:<br> 同方向有2条车道的,左侧车道的最低车速为每小时100公里。</p></li><li><p>2<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/110117960.png" alt="mark"><br> tips:</p><p> 八停三减</p></li><li><p>3<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/110316308.png" alt="mark"><br> tips:</p><p> 三条的由120减去10得110,110-20得90,90-30得60,10.20.30逐项递减</p></li><li><p>4<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/111050799.png" alt="mark"><br> tips:</p><p> 车辆的灯光不仅仅是在光线不足的情况下提供照明,而更重要的是起到警示作用,即使在白<br> 天,人们也会首先注意到亮着灯的车辆,不管是行人还是其他车辆的司机。夜间在照明条件<br> 良好的路段行驶,应使用近光灯。</p></li><li><p>5<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/111320283.png" alt="mark"><br> tips:</p><p> 从图中可以看出,是没有中心线的道路。按照规定,机动车在道路上行驶不得超过限速标志、标线标明的速度。在没有限速标志、标线的道路上,没有道路中心线的道路,城市道路为每小时30公里,公路为每小时40公里。</p></li><li><p>6<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/111520406.png" alt="mark"><br> tips:</p><p> 《实施条例》第六十一条:<br> 牵引车和被牵引车均应当开启危险报警闪光灯。 </p></li><li><p>7<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/112602350.png" alt="mark"><br> tips:</p><p> 2016年4月1日已经实施的“公安部139号令”已经删除2012年的“公安部123令”中第十三条第二款关于“不能在暂住地初次申领大型货车驾驶证”的规定,取消了异地考驾照对客货车驾驶证的限制,客货车驾驶证也可以在暂住地申领了,但是需要有当地的居住证或者暂住证。</p></li><li><p>8<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200229/112920344.png" alt="mark"><br> tips:</p><p> 右转让左转 左转让直行 转弯让直行</p></li></ul>]]></content>
<summary type="html">
<h1 id="考驾照科一笔记"><a href="#考驾照科一笔记" class="headerlink" title="考驾照科一笔记"></a>考驾照科一笔记</h1>
</summary>
<category term="driver" scheme="http://yoursite.com/tags/driver/"/>
</entry>
<entry>
<title>angular</title>
<link href="http://yoursite.com/2020/02/16/angular/"/>
<id>http://yoursite.com/2020/02/16/angular/</id>
<published>2020-02-16T07:37:34.000Z</published>
<updated>2020-02-23T08:00:56.025Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h1 id="angular简介"><a href="#angular简介" class="headerlink" title="angular简介"></a>angular简介</h1><p><img src="https://gss3.bdstatic.com/-Po3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D250/sign=b1b8a223d7ca7bcb797bc02a8e086b3f/5882b2b7d0a20cf4f21b653f76094b36adaf9943.jpg" alt></p><p>参考或转载:</p><p><a href="https://www.cnblogs.com/leolzi/p/11393195.html" target="_blank" rel="noopener">leolzi</a></p><p>AngularJS 诞生于2009年,由Misko Hevery 等人创建,后为Google所收购。是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC(Model–view–controller)、模块化、自动化双向数据绑定、语义化标签、依赖注入等等。</p><a id="more"></a><p>#angular基础</p><h2 id="新建angular项目"><a href="#新建angular项目" class="headerlink" title="新建angular项目"></a>新建angular项目</h2><ul><li>ng new demo 新建文件</li><li>ng serve –open 开启项目<h2 id="angular项目目录"><a href="#angular项目目录" class="headerlink" title="angular项目目录"></a>angular项目目录</h2></li></ul><ul><li>node_modules 第三方依赖包存放目录</li><li>e2e 端到端的测试目录 用来做自动测试的</li><li>src 应用源代码目录 </li><li>.angular-cli.json Angular命令行工具的配置文件。后期可能会去修改它,引一些其他的第三方的包 比如jquery等</li><li>karma.conf.js karma是单元测试的执行器,karma.conf.js是karma的配置文件</li><li>package.json 这是一个标准的npm工具的配置文件,这个文件里面列出了该应用程序所使用的第三方依赖包。实际上我们在新建项目的时候,等了半天就是在下载第三方依赖包。下载完成后会放在node_modules这个目录中,后期我们可能会修改这个文件。</li><li>protractor.conf.js 也是一个做自动化测试的配置文件</li><li>README.md 说明文件</li><li>tslint.json 是tslint的配置文件,用来定义TypeScript代码质量检查的规则,不用管它<h2 id="src目录"><a href="#src目录" class="headerlink" title="src目录"></a>src目录</h2></li><li>app目录 包含应用的组件和模块,我们要写的代码都在这个目录</li><li>assets目录 资源目录,存储静态资源的 比如图片</li><li>environments目录 环境配置。Angular是支持多环境开发的,我们可以在不同的环境下(开发环境,测试环境,生产环境)共用一套代码,主要用来配置环境的</li><li>index.html 整个应用的根html,程序启动就是访问这个页面</li><li>main.ts 整个项目的入口点,Angular通过这个文件来启动项目</li><li>polyfills.ts 主要是用来导入一些必要库,为了让Angular能正常运行在老版本下</li><li>styles.css 主要是放一些全局的样式</li><li>tsconfig.app.json TypeScript编译器的配置,添加第三方依赖的时候会修改这个文件</li><li>tsconfig.spec.json 不用管</li><li>test.ts 也是自动化测试用的</li><li>typings.d.ts 不用管<h2 id="app-重要-目录"><a href="#app-重要-目录" class="headerlink" title="app(重要)目录"></a>app(重要)目录</h2>app目录是我们要编写的代码目录。我们写的代码都是放在这个目录。<br>一个Angular程序至少需要一个模块和一个组件。在我们新建项目的时候命令行已经默认生成出来了。<br><img src="https://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/QQ%E5%9B%BE%E7%89%8720200216170008.png" alt></li></ul><h2 id="新建组件并使用"><a href="#新建组件并使用" class="headerlink" title="新建组件并使用"></a>新建组件并使用</h2><ul><li>新建一个组件<br> 加入并使用<br> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200220/171338128.png" alt="mark"><ul><li>写到这发现了一个问题就是webstom的tslint.json里面ts规则,让报错非常离谱,于是我重新找了一个,测试可用,如下: <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br></pre></td><td class="code"><pre><span class="line">{</span><br><span class="line"> "extends": "tslint:recommended",</span><br><span class="line"> "rulesDirectory": [</span><br><span class="line"> "codelyzer"</span><br><span class="line"> ],</span><br><span class="line"> "rules": {</span><br><span class="line"> "array-type": false,</span><br><span class="line"> "arrow-parens": false,</span><br><span class="line"> "deprecation": {</span><br><span class="line"> "severity": "warn"</span><br><span class="line"> },</span><br><span class="line"> "import-blacklist": [</span><br><span class="line"> true,</span><br><span class="line"> "rxjs/Rx"</span><br><span class="line"> ],</span><br><span class="line"> "interface-name": false,</span><br><span class="line"> "max-classes-per-file": false,</span><br><span class="line"> "max-line-length": [</span><br><span class="line"> true,</span><br><span class="line"> 140</span><br><span class="line"> ],</span><br><span class="line"> "member-access": false,</span><br><span class="line"> "member-ordering": [</span><br><span class="line"> false,</span><br><span class="line"> {</span><br><span class="line"> "order": [</span><br><span class="line"> "static-field",</span><br><span class="line"> "instance-field",</span><br><span class="line"> "static-method",</span><br><span class="line"> "instance-method"</span><br><span class="line"> ]</span><br><span class="line"> }</span><br><span class="line"> ],</span><br><span class="line"> "no-consecutive-blank-lines": false,</span><br><span class="line"> "no-console": [</span><br><span class="line"> true,</span><br><span class="line"> "debug",</span><br><span class="line"> "info",</span><br><span class="line"> "time",</span><br><span class="line"> "timeEnd",</span><br><span class="line"> "trace"</span><br><span class="line"> ],</span><br><span class="line"> "no-empty": false,</span><br><span class="line"> "no-inferrable-types": [</span><br><span class="line"> true,</span><br><span class="line"> "ignore-params",</span><br><span class="line"> "ignore-properties"</span><br><span class="line"> ],</span><br><span class="line"> "no-non-null-assertion": true,</span><br><span class="line"> "no-redundant-jsdoc": true,</span><br><span class="line"> "no-switch-case-fall-through": true,</span><br><span class="line"> "no-use-before-declare": true,</span><br><span class="line"> "no-var-requires": false,</span><br><span class="line"> "object-literal-key-quotes": [</span><br><span class="line"> true,</span><br><span class="line"> "as-needed"</span><br><span class="line"> ],</span><br><span class="line"> "object-literal-sort-keys": false,</span><br><span class="line"> "ordered-imports": false,</span><br><span class="line"> "quotemark": [</span><br><span class="line"> false,</span><br><span class="line"> "single"</span><br><span class="line"> ],</span><br><span class="line"> "trailing-comma": false,</span><br><span class="line"> "no-output-on-prefix": true,</span><br><span class="line"> "use-input-property-decorator": true,</span><br><span class="line"> "use-output-property-decorator": true,</span><br><span class="line"> "use-host-property-decorator": true,</span><br><span class="line"> "no-input-rename": true,</span><br><span class="line"> "no-output-rename": true,</span><br><span class="line"> "use-life-cycle-interface": true,</span><br><span class="line"> "use-pipe-transform-interface": true,</span><br><span class="line"> "component-class-suffix": true,</span><br><span class="line"> "directive-class-suffix": true,</span><br><span class="line"> "class-name" : false,</span><br><span class="line"> "variable-name" : false,</span><br><span class="line"> "one-line" : true,</span><br><span class="line"> "no-boolean-literal-compare" : false,</span><br><span class="line"> "no-angle-bracket-type-assertion" : false,</span><br><span class="line"> "binary-expression-operand-order" : false,</span><br><span class="line"> "arrow-return-shorthand" : false,</span><br><span class="line"> "jsdoc-format" : false,</span><br><span class="line"> "interface-over-type-literal" : false,</span><br><span class="line"> "no-irregular-whitespace" : false,</span><br><span class="line"> "number-literal-format" : false,</span><br><span class="line"> "whitespace" : false,</span><br><span class="line"> "curly" : false,</span><br><span class="line"> "typedef-whitespace":[</span><br><span class="line"> false,</span><br><span class="line"> {</span><br><span class="line"> "call-signature": "nospace",</span><br><span class="line"> "index-signature": "nospace",</span><br><span class="line"> "parameter": "nospace",</span><br><span class="line"> "property-declaration": "nospace",</span><br><span class="line"> "variable-declaration": "nospace"</span><br><span class="line"> },</span><br><span class="line"> {</span><br><span class="line"> "call-signature": "onespace",</span><br><span class="line"> "index-signature": "onespace",</span><br><span class="line"> "parameter": "onespace",</span><br><span class="line"> "property-declaration": "onespace",</span><br><span class="line"> "variable-declaration": "onespace"</span><br><span class="line"> }</span><br><span class="line"> ],</span><br><span class="line"> "ban-types": [</span><br><span class="line"> false,</span><br><span class="line"> [</span><br><span class="line"> "Object",</span><br><span class="line"> "Use {} instead."</span><br><span class="line"> ],</span><br><span class="line"> ["String"]</span><br><span class="line"> ],</span><br><span class="line"> "prefer-const": false,</span><br><span class="line"> "no-trailing-whitespace": false,</span><br><span class="line"> "comment-format": false</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li></ul></li></ul><h2 id="html里引用ts属性"><a href="#html里引用ts属性" class="headerlink" title="html里引用ts属性"></a>html里引用ts属性</h2><ul><li><p>ts里书写的属性</p><p> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200221/170140173.png" alt="mark"></p><p> 发现一个问题,我看教程里面对象是要加:object对他进行规范的,而我规范了就会报错,最后去掉:object才成功在html引用到属性</p></li><li><p>html里的引用</p><p> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200221/170400313.png" alt="mark"></p></li><li><p>网页样式</p><p> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200221/170437802.png" alt="mark"></p></li><li><p>html标签使用angular属性</p><ul><li><p>绑定内容</p><p><code><div [title]="studentTitle">学生标题</div></code></p><p>效果如下:</p><p><img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200223/152854468.png" alt="mark"></p></li><li><p>angular的html解析标签 </p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">///未解析</span><br><span class="line"><div>{{content}}</div></span><br><span class="line">///解析</span><br><span class="line"><div [innerHTML]='content'></div></span><br></pre></td></tr></table></figure><p>效果如下:</p><p><img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200223/153027127.png" alt="mark"></p></li></ul></li><li><p>angular的html里可以进行简单的运算</p><p> <code><div>1+3=4</div></code></p><p> 效果如图:</p><p> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200223/154525294.png" alt="mark"></p></li><li><p>angular里的数组以及循环</p> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><div></span><br><span class="line"> <ul></span><br><span class="line"> <li *ngFor="let item of arr"></span><br><span class="line"> {{item}}</span><br><span class="line"> </li></span><br><span class="line"> </ul></span><br><span class="line"></div></span><br></pre></td></tr></table></figure><p> 效果如下:</p><p> <img src="http://goti-bucket.oss-cn-shanghai.aliyuncs.com/image/20200223/155447937.png" alt="mark"></p></li></ul>]]></content>
<summary type="html">
<h1 id="angular简介"><a href="#angular简介" class="headerlink" title="angular简介"></a>angular简介</h1><p><img src="https://gss3.bdstatic.com/-Po3dSag_xI4khGkpoWK1HF6hhy/baike/s%3D250/sign=b1b8a223d7ca7bcb797bc02a8e086b3f/5882b2b7d0a20cf4f21b653f76094b36adaf9943.jpg" alt></p>
<p>参考或转载:</p>
<p><a href="https://www.cnblogs.com/leolzi/p/11393195.html" target="_blank" rel="noopener">leolzi</a></p>
<p>AngularJS 诞生于2009年,由Misko Hevery 等人创建,后为Google所收购。是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC(Model–view–controller)、模块化、自动化双向数据绑定、语义化标签、依赖注入等等。</p>
</summary>
<category term="web前端" scheme="http://yoursite.com/tags/web%E5%89%8D%E7%AB%AF/"/>
<category term="angular" scheme="http://yoursite.com/tags/angular/"/>
</entry>
<entry>
<title>mysql</title>
<link href="http://yoursite.com/2020/01/21/mysql/"/>
<id>http://yoursite.com/2020/01/21/mysql/</id>
<published>2020-01-21T02:47:11.000Z</published>
<updated>2020-02-23T08:00:38.842Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h1 id="mysql基础"><a href="#mysql基础" class="headerlink" title="mysql基础"></a>mysql基础</h1><p><img src="https://www.runoob.com/wp-content/uploads/2014/03/mysql.jpg" alt></p><p>结构化查询语言(Structured Query Language)简称SQL,mysql是流行的关系型数据库</p><a id="more"></a><h2 id="sql基本语法"><a href="#sql基本语法" class="headerlink" title="sql基本语法"></a>sql基本语法</h2><ul><li><p>新建表</p><p> SQL语句:<br> CREATE TABLE table_name (column_name column_type);</p></li></ul>]]></content>
<summary type="html">
<h1 id="mysql基础"><a href="#mysql基础" class="headerlink" title="mysql基础"></a>mysql基础</h1><p><img src="https://www.runoob.com/wp-content/uploads/2014/03/mysql.jpg" alt></p>
<p>结构化查询语言(Structured Query Language)简称SQL,mysql是流行的关系型数据库</p>
</summary>
<category term="mysql" scheme="http://yoursite.com/tags/mysql/"/>
<category term="sql" scheme="http://yoursite.com/tags/sql/"/>
</entry>
<entry>
<title>java基础</title>
<link href="http://yoursite.com/2019/08/18/java/"/>
<id>http://yoursite.com/2019/08/18/java/</id>
<published>2019-08-18T07:22:42.000Z</published>
<updated>2020-01-20T04:37:32.620Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h1 id="java基础"><a href="#java基础" class="headerlink" title="java基础"></a>java基础</h1><h2 id="该篇文章主要总结一下java的基础语法与基础知识点"><a href="#该篇文章主要总结一下java的基础语法与基础知识点" class="headerlink" title="该篇文章主要总结一下java的基础语法与基础知识点"></a>该篇文章主要总结一下java的基础语法与基础知识点</h2><a id="more"></a><h2 id="参考或出处:"><a href="#参考或出处:" class="headerlink" title="参考或出处:"></a>参考或出处:</h2><h2 id="打翻了牛顿吃饭的碗"><a href="#打翻了牛顿吃饭的碗" class="headerlink" title="- 打翻了牛顿吃饭的碗"></a>- <a href="https://www.cnblogs.com/zhaojinyan/p/9401010.html" target="_blank" rel="noopener">打翻了牛顿吃饭的碗</a></h2><h2 id="屌丝码农"><a href="#屌丝码农" class="headerlink" title="- 屌丝码农"></a>- <a href="https://www.cnblogs.com/pony1223/p/7608955.html" target="_blank" rel="noopener">屌丝码农</a></h2><h2 id="talenter"><a href="#talenter" class="headerlink" title="- talenter"></a>- <a href="https://www.cnblogs.com/talenter/p/9652976.html" target="_blank" rel="noopener">talenter</a></h2><ul><li><p>java中”||”和”|”的区别,以及”&&”与”&”的区别</p><ul><li>“||”和”|”的区别<ul><li>“||”表示逻辑或(也叫做短路或),当左边为真时就返回true,不对右边继续进行判断</li><li>“|”表示按位或,当左边为真时继续判断右边,但是只要有一个为真时就会返回true</li></ul></li><li>“&&”与”&”的区别<ul><li>“&&”表示逻辑与(也叫做短路与),当左边为假时就返回false,不对右边继续进行判断</li><li>“&”表示按位与,当左边为假时会继续判断右边,但是只要有一个为假时就会返回false</li></ul></li></ul></li><li><p>取整方法</p><ul><li><p>Math.ceil():表示向上取整;</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Math.ceil(11.3)=12;Math.ceil(-11.3)=-12。</span><br></pre></td></tr></table></figure></li><li><p>Math.floor():表示向下取整;</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Math.floor(11.6)=12;</span><br><span class="line">Math.floor(-11.6)=-12。</span><br></pre></td></tr></table></figure></li><li><p>Math.round():表示四舍五入;</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Math.round(11.5)=12;</span><br><span class="line">Math.round(-11.5)=-11;</span><br></pre></td></tr></table></figure></li></ul></li><li><p>String s =new String (“syz”);创建了几个String Object?</p><ol><li><p>如果String常理池(常量缓冲区)中,已经创建”xyz”,则不会继续创建,此时只创建了一个对象new String(“xyz”);</p></li><li><p>如果String常理池中,没有创建”xyz”,则会创建两个对象,一个对象的值是”xyz”,一个对象new String(“xyz”)。</p></li></ol></li><li><p>java23种设计模式</p><ul><li><p>设计模式的概念</p><ul><li>设计模式(Design pattern)是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。 毫无疑问,设计模式于己于他人于系统都是多赢的,设计模式使代码编制真正工程化,设计模式是软件工程的基石,如同大厦的一块块砖石一样。项目中合理的运用设计模式可以完美的解决很多问题,每种模式在现在中都有相应的原理来与之对应,每一个模式描述了一个在我们周围不断重复发生的问题,以及该问题的核心解决方案,这也是它能被广泛应用的原因。</li></ul></li><li><p>设计模式6大原则</p><ol><li><p>开闭原则(Open Close Principle)</p><p>开闭原则就是说对扩展开放,对修改关闭。在程序需要进行拓展的时候,不能去修改原有的代码,实现一个热插拔的效果。所以一句话概括就是:为了使程序的扩展性好,易于维护和升级。想要达到这样的效果,我们需要使用接口和抽象类,后面的具体设计中我们会提到这点。</p></li><li><p>里氏代换原则(Liskov Substitution Principle)</p><p>里氏代换原则(Liskov Substitution Principle LSP)面向对象设计的基本原则之一。 里氏代换原则中说,任何基类可以出现的地方,子类一定可以出现。 LSP是继承复用的基石,只有当衍生类可以替换掉基类,软件单位的功能不受到影响时,基类才能真正被复用,而衍生类也能够在基类的基础上增加新的行为。里氏代换原则是对“开-闭”原则的补充。实现“开-闭”原则的关键步骤就是抽象化。而基类与子类的继承关系就是抽象化的具体实现,所以里氏代换原则是对实现抽象化的具体步骤的规范。</p></li><li><p>依赖倒转原则(Dependence Inversion Principle)<br>这个是开闭原则的基础,具体内容:针对接口编程,依赖于抽象而不依赖于具体。</p></li><li><p>接口隔离原则(Interface Segregation Principle)</p><p>这个原则的意思是:使用多个隔离的接口,比使用单个接口要好。还是一个降低类之间的耦合度的意思,从这儿我们看出,其实设计模式就是一个软件的设计思想,从大型软件架构出发,为了升级和维护方便。所以上文中多次出现:降低依赖,降低耦合。</p></li><li><p>迪米特法则(最少知道原则)(Demeter Principle)</p><p>为什么叫最少知道原则,就是说:一个实体应当尽量少的与其他实体之间发生相互作用,使得系统功能模块相对独立。</p></li><li><p>合成复用原则(Composite Reuse Principle)</p><p>原则是尽量使用合成/聚合的方式,而不是使用继承。</p></li></ol></li><li><p>常用的设计模式</p><ol><li><p>工厂模式(Factory Method)</p><p> 常用的工厂模式是静态工厂,利用static方法,作为一种类似于常见的工具类Utils等辅助效果,一般情况下工厂类不需要实例化。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">interface food{}</span><br><span class="line"></span><br><span class="line">class A implements food{}</span><br><span class="line">class B implements food{}</span><br><span class="line">class C implements food{}</span><br><span class="line"></span><br><span class="line">public class StaticFactory {</span><br><span class="line"></span><br><span class="line"> private StaticFactory(){}</span><br><span class="line"> </span><br><span class="line"> public static food getA(){ return new A(); }</span><br><span class="line"> public static food getB(){ return new B(); }</span><br><span class="line"> public static food getC(){ return new C(); }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">class Client{</span><br><span class="line"> //客户端代码只需要将相应的参数传入即可得到对象</span><br><span class="line"> //用户不需要了解工厂类内部的逻辑。</span><br><span class="line"> public void get(String name){</span><br><span class="line"> food x = null ;</span><br><span class="line"> if ( name.equals("A")) {</span><br><span class="line"> x = StaticFactory.getA();</span><br><span class="line"> }else if ( name.equals("B")){</span><br><span class="line"> x = StaticFactory.getB();</span><br><span class="line"> }else {</span><br><span class="line"> x = StaticFactory.getC();</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>抽象工厂模式(Abstract Factory</p><p> 一个基础接口定义了功能,每个实现接口的子类就是产品,然后定义一个工厂接口,实现了工厂接口的就是工厂,这时候,接口编程的优点就出现了,我们可以新增产品类(只需要实现产品接口),只需要同时新增一个工厂类,客户端就可以轻松调用新产品的代码。</p><p> 抽象工厂的灵活性就体现在这里,无需改动原有的代码,毕竟对于客户端来说,静态工厂模式在不改动StaticFactory类的代码时无法新增产品,如果采用了抽象工厂模式,就可以轻松的新增拓展类。</p><p>实例代码</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">interface food{}</span><br><span class="line"></span><br><span class="line">class A implements food{}</span><br><span class="line">class B implements food{}</span><br><span class="line"></span><br><span class="line">interface produce{ food get();}</span><br><span class="line"></span><br><span class="line">class FactoryForA implements produce{</span><br><span class="line"> @Override</span><br><span class="line"> public food get() {</span><br><span class="line"> return new A();</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">class FactoryForB implements produce{</span><br><span class="line"> @Override</span><br><span class="line"> public food get() {</span><br><span class="line"> return new B();</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">public class AbstractFactory {</span><br><span class="line"> public void ClientCode(String name){</span><br><span class="line"> food x= new FactoryForA().get();</span><br><span class="line"> x = new FactoryForB().get();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>单例模式(Singleton)</p><p> 在内部创建一个实例,构造器全部设置为private,所有方法均在该实例上改动,在创建上要注意类的实例化只能执行一次,可以采用许多种方法来实现,如Synchronized关键字,或者利用内部类等机制来实现。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">public class Singleton {</span><br><span class="line">private Singleton(){}</span><br><span class="line"></span><br><span class="line">private static class SingletonBuild{</span><br><span class="line"> private static Singleton value = new Singleton();</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">public Singleton getInstance(){ return SingletonBuild.value ;}</span><br></pre></td></tr></table></figure></li><li><p>建造者模式(Builder)</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br></pre></td><td class="code"><pre><span class="line">public class Builder {</span><br><span class="line"></span><br><span class="line"> static class Student{</span><br><span class="line"> String name = null ;</span><br><span class="line"> int number = -1 ;</span><br><span class="line"> String sex = null ;</span><br><span class="line"> int age = -1 ;</span><br><span class="line"> String school = null ;</span><br><span class="line"></span><br><span class="line"> //构建器,利用构建器作为参数来构建Student对象</span><br><span class="line"> static class StudentBuilder{</span><br><span class="line"> String name = null ;</span><br><span class="line"> int number = -1 ;</span><br><span class="line"> String sex = null ;</span><br><span class="line"> int age = -1 ;</span><br><span class="line"> String school = null ;</span><br><span class="line"> public StudentBuilder setName(String name) {</span><br><span class="line"> this.name = name;</span><br><span class="line"> return this ;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public StudentBuilder setNumber(int number) {</span><br><span class="line"> this.number = number;</span><br><span class="line"> return this ;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public StudentBuilder setSex(String sex) {</span><br><span class="line"> this.sex = sex;</span><br><span class="line"> return this ;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public StudentBuilder setAge(int age) {</span><br><span class="line"> this.age = age;</span><br><span class="line"> return this ;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public StudentBuilder setSchool(String school) {</span><br><span class="line"> this.school = school;</span><br><span class="line"> return this ;</span><br><span class="line"> }</span><br><span class="line"> public Student build() {</span><br><span class="line"> return new Student(this);</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public Student(StudentBuilder builder){</span><br><span class="line"> this.age = builder.age;</span><br><span class="line"> this.name = builder.name;</span><br><span class="line"> this.number = builder.number;</span><br><span class="line"> this.school = builder.school ;</span><br><span class="line"> this.sex = builder.sex ;</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public static void main( String[] args ){</span><br><span class="line"> Student a = new Student.StudentBuilder().setAge(13).setName("LiHua").build();</span><br><span class="line"> Student b = new Student.StudentBuilder().setSchool("sc").setSex("Male").setName("ZhangSan").build();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>原型模式(Protype)<br>原型模式就是讲一个对象作为原型,使用clone()方法来创建新的实例。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">public class Prototype implements Cloneable{</span><br><span class="line"></span><br><span class="line"> private String name;</span><br><span class="line"></span><br><span class="line"> public String getName() {</span><br><span class="line"> return name;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public void setName(String name) {</span><br><span class="line"> this.name = name;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> @Override</span><br><span class="line"> protected Object clone() {</span><br><span class="line"> try {</span><br><span class="line"> return super.clone();</span><br><span class="line"> } catch (CloneNotSupportedException e) {</span><br><span class="line"> e.printStackTrace();</span><br><span class="line"> }finally {</span><br><span class="line"> return null;</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public static void main ( String[] args){</span><br><span class="line"> Prototype pro = new Prototype();</span><br><span class="line"> Prototype pro1 = (Prototype)pro.clone();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p>此处使用的是浅拷贝,关于深浅拷贝,大家可以另行查找相关资料。</p></li><li><p>适配器模式(Adapter)</p><p>适配器模式的作用就是在原来的类上提供新功能。主要可分为3种:</p><ol><li><p>类适配:创建新类,继承源类,并实现新接口,例如 </p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">class adapter extends oldClass implements newFunc{}</span><br></pre></td></tr></table></figure></li><li><p>对象适配:创建新类持源类的实例,并实现新接口,例如 </p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">class adapter implements newFunc { private oldClass oldInstance ;}</span><br></pre></td></tr></table></figure></li><li><p>接口适配:创建新的抽象类实现旧接口方法。例如 </p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">abstract class adapter implements oldClassFunc { void newFunc();}</span><br></pre></td></tr></table></figure></li></ol></li><li><p>装饰模式(Decorator)</p><p> 给一类对象增加新的功能,装饰方法与具体的内部逻辑无关。例如:</p> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">interface Source{ void method();}</span><br><span class="line"> public class Decorator implements Source{</span><br><span class="line"></span><br><span class="line"> private Source source ;</span><br><span class="line"> public void decotate1(){</span><br><span class="line"> System.out.println("decorate");</span><br><span class="line"> }</span><br><span class="line"> @Override</span><br><span class="line"> public void method() {</span><br><span class="line"> decotate1();</span><br><span class="line"> source.method();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>代理模式(Proxy)<br>客户端通过代理类访问,代理类实现具体的实现细节,客户只需要使用代理类即可实现操作。</p><p>这种模式可以对旧功能进行代理,用一个代理类调用原有的方法,且对产生的结果进行控制。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">interface Source{ void method();}</span><br><span class="line"></span><br><span class="line">class OldClass implements Source{</span><br><span class="line"> @Override</span><br><span class="line"> public void method() {</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">class Proxy implements Source{</span><br><span class="line"> private Source source = new OldClass();</span><br><span class="line"></span><br><span class="line"> void doSomething(){}</span><br><span class="line"> @Override</span><br><span class="line"> public void method() {</span><br><span class="line"> new Class1().Func1();</span><br><span class="line"> source.method();</span><br><span class="line"> new Class2().Func2();</span><br><span class="line"> doSomething();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>外观模式(Facade)</p><p>为子系统中的一组接口提供一个一致的界面,定义一个高层接口,这个接口使得这一子系统更加容易使用。这句话是百度百科的解释,有点难懂,但是没事,看下面的例子,我们在启动停止所有子系统的时候,为它们设计一个外观类,这样就可以实现统一的接口,这样即使有新增的子系统subSystem4,也可以在不修改客户端代码的情况下轻松完成。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">public class Facade {</span><br><span class="line"> private subSystem1 subSystem1 = new subSystem1();</span><br><span class="line"> private subSystem2 subSystem2 = new subSystem2();</span><br><span class="line"> private subSystem3 subSystem3 = new subSystem3();</span><br><span class="line"> </span><br><span class="line"> public void startSystem(){</span><br><span class="line"> subSystem1.start();</span><br><span class="line"> subSystem2.start();</span><br><span class="line"> subSystem3.start();</span><br><span class="line"> }</span><br><span class="line"> </span><br><span class="line"> public void stopSystem(){</span><br><span class="line"> subSystem1.stop();</span><br><span class="line"> subSystem2.stop();</span><br><span class="line"> subSystem3.stop();</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li><li><p>桥接模式(Bridge)<br>桥接(Bridge)是用于把抽象化与实现化解耦,使得二者可以独立变化。这种类型的设计模式属于结构型模式,它通过提供抽象化和实现化之间的桥接结构,来实现二者的解耦。</p><p>这种模式涉及到一个作为桥接的接口,使得实体类的功能独立于接口实现类。这两种类型的类可被结构化改变而互不影响。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br></pre></td><td class="code"><pre><span class="line"> interface DrawAPI {</span><br><span class="line"> public void drawCircle(int radius, int x, int y);</span><br><span class="line">}</span><br><span class="line">class RedCircle implements DrawAPI {</span><br><span class="line"> @Override</span><br><span class="line"> public void drawCircle(int radius, int x, int y) {</span><br><span class="line"> System.out.println("Drawing Circle[ color: red, radius: "</span><br><span class="line"> + radius +", x: " +x+", "+ y +"]");</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line">class GreenCircle implements DrawAPI {</span><br><span class="line"> @Override</span><br><span class="line"> public void drawCircle(int radius, int x, int y) {</span><br><span class="line"> System.out.println("Drawing Circle[ color: green, radius: "</span><br><span class="line"> + radius +", x: " +x+", "+ y +"]");</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">abstract class Shape {</span><br><span class="line"> protected DrawAPI drawAPI;</span><br><span class="line"> protected Shape(DrawAPI drawAPI){</span><br><span class="line"> this.drawAPI = drawAPI;</span><br><span class="line"> }</span><br><span class="line"> public abstract void draw();</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">class Circle extends Shape {</span><br><span class="line"> private int x, y, radius;</span><br><span class="line"></span><br><span class="line"> public Circle(int x, int y, int radius, DrawAPI drawAPI) {</span><br><span class="line"> super(drawAPI);</span><br><span class="line"> this.x = x;</span><br><span class="line"> this.y = y;</span><br><span class="line"> this.radius = radius;</span><br><span class="line"> }</span><br><span class="line"></span><br><span class="line"> public void draw() {</span><br><span class="line"> drawAPI.drawCircle(radius,x,y);</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">//客户端使用代码</span><br><span class="line">Shape redCircle = new Circle(100,100, 10, new RedCircle());</span><br><span class="line">Shape greenCircle = new Circle(100,100, 10, new GreenCircle());</span><br><span class="line">redCircle.draw();</span><br><span class="line">greenCircle.draw();</span><br></pre></td></tr></table></figure></li><li><p>组合模式(Composite)</p><p> 组合模式是为了表示那些层次结构,同时部分和整体也可能是一样的结构,常见的如文件夹或者树。举例:</p> <figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">abstract class component{}</span><br><span class="line"></span><br><span class="line">class File extends component{ String filename;}</span><br><span class="line"></span><br><span class="line">class Folder extends component{</span><br><span class="line"> component[] files ; //既可以放文件File类,也可以放文件夹Folder类。Folder类下又有子文件或子文件夹。</span><br><span class="line"> String foldername ;</span><br><span class="line"> public Folder(component[] source){ files = source ;}</span><br><span class="line"> </span><br><span class="line"> public void scan(){</span><br><span class="line"> for ( component f:files){</span><br><span class="line"> if ( f instanceof File){</span><br><span class="line"> System.out.println("File "+((File) f).filename);</span><br><span class="line"> }else if(f instanceof Folder){</span><br><span class="line"> Folder e = (Folder)f ;</span><br><span class="line"> System.out.println("Folder "+e.foldername);</span><br><span class="line"> e.scan();</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"> } </span><br><span class="line">}</span><br></pre></td></tr></table></figure></li></ol></li></ul><ol start="12"><li>享元模式(Flyweight)<br>使用共享对象的方法,用来尽可能减少内存使用量以及分享资讯。通常使用工厂类辅助,例子中使用一个HashMap类进行辅助判断,数据池中是否已经有了目标实例,如果有,则直接返回,不需要多次创建重复实例。<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">abstract class flywei{ }</span><br><span class="line"></span><br><span class="line">public class Flyweight extends flywei{</span><br><span class="line"> Object obj ;</span><br><span class="line"> public Flyweight(Object obj){</span><br><span class="line"> this.obj = obj;</span><br><span class="line"> }</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">class FlyweightFactory{</span><br><span class="line"> private HashMap<Object,Flyweight> data;</span><br><span class="line"></span><br><span class="line"> public FlyweightFactory(){ data = new HashMap<>();}</span><br><span class="line"></span><br><span class="line"> public Flyweight getFlyweight(Object object){</span><br><span class="line"> if ( data.containsKey(object)){</span><br><span class="line"> return data.get(object);</span><br><span class="line"> }else {</span><br><span class="line"> Flyweight flyweight = new Flyweight(object);</span><br><span class="line"> data.put(object,flyweight);</span><br><span class="line"> return flyweight;</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure></li></ol></li></ul>]]></content>
<summary type="html">
<h1 id="java基础"><a href="#java基础" class="headerlink" title="java基础"></a>java基础</h1><h2 id="该篇文章主要总结一下java的基础语法与基础知识点"><a href="#该篇文章主要总结一下java的基础语法与基础知识点" class="headerlink" title="该篇文章主要总结一下java的基础语法与基础知识点"></a>该篇文章主要总结一下java的基础语法与基础知识点</h2>
</summary>
<category term="笔记" scheme="http://yoursite.com/tags/%E7%AC%94%E8%AE%B0/"/>
<category term="java" scheme="http://yoursite.com/tags/java/"/>
</entry>
<entry>
<title>unityNotas</title>
<link href="http://yoursite.com/2019/08/15/unityNotas/"/>
<id>http://yoursite.com/2019/08/15/unityNotas/</id>
<published>2019-08-15T12:27:00.000Z</published>
<updated>2020-01-20T04:37:32.621Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="unity" scheme="http://yoursite.com/tags/unity/"/>
<category term="笔记" scheme="http://yoursite.com/tags/%E7%AC%94%E8%AE%B0/"/>
</entry>
<entry>
<title>markDown语法</title>
<link href="http://yoursite.com/2019/08/11/HelloWorld/"/>
<id>http://yoursite.com/2019/08/11/HelloWorld/</id>
<published>2019-08-11T11:40:10.000Z</published>
<updated>2020-01-20T04:37:32.619Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h1 id="MarkDown语法学习"><a href="#MarkDown语法学习" class="headerlink" title="MarkDown语法学习"></a>MarkDown语法学习</h1><p>参考<a href="https://www.jianshu.com/p/191d1e21f7ed" target="_blank" rel="noopener">高鸿祥</a><br>这是一个goti学习markDown语法的文章</p><a id="more"></a><h2 id="1-标题"><a href="#1-标题" class="headerlink" title="1. 标题"></a>1. 标题</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"># 一级菜单</span><br><span class="line">## 二级菜单</span><br><span class="line">### 三级菜单</span><br><span class="line">#### 四级菜单</span><br><span class="line">##### 五极菜单</span><br><span class="line">###### 六级菜单</span><br></pre></td></tr></table></figure><p>效果如下</p><h1 id="一级菜单"><a href="#一级菜单" class="headerlink" title="一级菜单"></a>一级菜单</h1><h2 id="二级菜单"><a href="#二级菜单" class="headerlink" title="二级菜单"></a>二级菜单</h2><h3 id="三级菜单"><a href="#三级菜单" class="headerlink" title="三级菜单"></a>三级菜单</h3><h4 id="四级菜单"><a href="#四级菜单" class="headerlink" title="四级菜单"></a>四级菜单</h4><h5 id="五极菜单"><a href="#五极菜单" class="headerlink" title="五极菜单"></a>五极菜单</h5><h6 id="六级菜单"><a href="#六级菜单" class="headerlink" title="六级菜单"></a>六级菜单</h6><h2 id="2-字体"><a href="#2-字体" class="headerlink" title="2.字体"></a>2.字体</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">**这是加粗的文字**</span><br><span class="line"></span><br><span class="line">*这是倾斜的文字*</span><br><span class="line"></span><br><span class="line">***这是斜体加粗的文字***</span><br><span class="line"></span><br><span class="line">~~这是加删除线的文字~~</span><br></pre></td></tr></table></figure><p>效果如下</p><p><strong>这是加粗的文字</strong></p><p><em>这是倾斜的文字</em></p><p><strong><em>这是斜体加粗的文字</em></strong></p><p><del>这是加删除线的文字</del></p><h2 id="3-引用"><a href="#3-引用" class="headerlink" title="3.引用"></a>3.引用</h2><p>感觉这个引用好像并没什么用啊</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">>lalalla</span><br><span class="line">>>lalalla</span><br><span class="line">>>>>lalalla</span><br></pre></td></tr></table></figure><p>效果如下</p><blockquote><p>lalalla</p><blockquote><p>lalalla</p><blockquote><blockquote><p>lalalla</p></blockquote></blockquote></blockquote></blockquote><h2 id="4-链接以及图片"><a href="#4-链接以及图片" class="headerlink" title="4.链接以及图片"></a>4.链接以及图片</h2><p>图片</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">![这是一个表情包图片](http://108.160.130.156/image/1.jpg "示例图片")</span><br></pre></td></tr></table></figure><p><img src="http://108.160.130.156/image/1.jpg" alt="这是一个表情包图片" title="示例图片"><br>链接</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">[这是一个超链接](https://www.baidu.com)</span><br></pre></td></tr></table></figure><p><a href="https://www.baidu.com" target="_blank" rel="noopener">这是一个超链接</a></p><h2 id="5-列表"><a href="#5-列表" class="headerlink" title="5.列表"></a>5.列表</h2><h3 id="有序列表"><a href="#有序列表" class="headerlink" title="有序列表"></a>有序列表</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">1. 内容</span><br><span class="line">2. 内容</span><br><span class="line">3. 内容</span><br></pre></td></tr></table></figure><p>效果如下</p><ol><li>内容</li><li>内容</li><li>内容</li></ol><h3 id="无序列表"><a href="#无序列表" class="headerlink" title="无序列表"></a>无序列表</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">- 列表内容</span><br><span class="line">+ 列表内容</span><br><span class="line">* 列表内容</span><br></pre></td></tr></table></figure><p>效果如下</p><ul><li>列表内容</li></ul><ul><li>列表内容</li></ul><ul><li>列表内容</li></ul><h3 id="列表嵌套"><a href="#列表嵌套" class="headerlink" title="列表嵌套"></a>列表嵌套</h3><p>上一级和下一级之间敲三个空格即可</p><ul><li><p>一级无序列表内容</p><ul><li>二级无序列表内容</li><li>二级无序列表内容</li><li>二级无序列表内容</li></ul></li><li><p>一级无序列表内容</p><ol><li>二级有序列表内容</li><li>二级有序列表内容</li><li>二级有序列表内容</li></ol></li></ul><ol><li><p>一级有序列表内容</p><ul><li>二级无序列表内容</li><li>二级无序列表内容</li><li>二级无序列表内容</li></ul></li><li><p>一级有序列表内容</p><ol><li>二级有序列表内容</li><li>二级有序列表内容</li><li>二级有序列表内容</li></ol></li></ol><h2 id="6-表格"><a href="#6-表格" class="headerlink" title="6.表格"></a>6.表格</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">|表头|表头|表头|</span><br><span class="line">|---|:--:|---:|</span><br><span class="line">|内容|内容|内容|</span><br><span class="line">|内容|内容|内容|</span><br><span class="line"></span><br><span class="line">第二行分割表头和内容。</span><br><span class="line">- 有一个就行,为了对齐,多加了几个</span><br><span class="line">文字默认居左</span><br><span class="line">-两边加:表示文字居中</span><br><span class="line">-右边加:表示文字居右</span><br></pre></td></tr></table></figure><p>效果</p><table><thead><tr><th>姓名</th><th align="center">技能</th><th align="center">名言</th></tr></thead><tbody><tr><td>cxk</td><td align="center">唱跳rap打篮球</td><td align="center">你干嘛?</td></tr><tr><td>芦苇</td><td align="center">使用高新科技</td><td align="center">我芦苇没有开挂!</td></tr><tr><td>杰哥</td><td align="center">检查身体</td><td align="center">让我康康!</td></tr></tbody></table><h2 id="7-代码"><a href="#7-代码" class="headerlink" title="7.代码"></a>7.代码</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">`单行代码`</span><br><span class="line"></span><br><span class="line">(```)</span><br><span class="line">多行代码</span><br><span class="line">(```)</span><br><span class="line">使用多行代码的时候去除括号,加括号是为了防止转译</span><br></pre></td></tr></table></figure><p>效果如下</p><p><code>单行代码</code></p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">多行代码</span><br></pre></td></tr></table></figure><h2 id="8-分割线"><a href="#8-分割线" class="headerlink" title="8.分割线"></a>8.分割线</h2><p>三个或者三个以上的 - 或者 * 都可以。</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">----</span><br><span class="line">***</span><br><span class="line">*****</span><br></pre></td></tr></table></figure><p>效果</p><hr><hr><hr><hr><h2 id="9-音乐以及视频"><a href="#9-音乐以及视频" class="headerlink" title="9.音乐以及视频"></a>9.音乐以及视频</h2><p>先装两个插件</p><p><a href="/~https://github.com/grzhan/hexo-tag-aplayer#upstream-issue" title="aplayer插件" target="_blank" rel="noopener">aplayer插件</a></p><p><a href="/~https://github.com/NextMoe/hexo-tag-dplayer" title="dplayer插件" target="_blank" rel="noopener">dplayer插件</a></p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-tag-dplayer --save</span><br><span class="line">npm install hexo-tag-aplayer --save</span><br></pre></td></tr></table></figure><ul><li><p>音乐</p><ul><li><p>网易云</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=450 src="//music.163.com/outchain/player?type=0&id=2937381224&auto=0&height=430"></iframe></span><br></pre></td></tr></table></figure><p>效果</p><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="450" src="//music.163.com/outchain/player?type=0&id=2937381224&auto=0&height=430"></iframe></li><li><p>aplayer插件</p><ul><li>单个曲目<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">title : 曲目标题</span><br><span class="line">author: 曲目作者</span><br><span class="line">url: 音乐文件 URL 地址</span><br><span class="line">picture_url: (可选) 音乐对应的图片地址</span><br><span class="line">narrow: (可选)播放器袖珍风格</span><br><span class="line">autoplay: (可选) 自动播放,移动端浏览器暂时不支持此功能</span><br><span class="line">width:xxx: (可选) 播放器宽度 (默认: 100%)</span><br><span class="line">lrc:xxx: (可选)歌词文件 URL 地址</span><br><span class="line">{% aplayer "风笛" "DDBY" "http://108.160.130.156/music/DDBY_-_风笛.mp3</span><br><span class="line">" "autoplay" %}</span><br></pre></td></tr></table></figure></li></ul></li></ul><p>效果</p> <div id="aplayer-eDkhPoBd" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;"> <pre class="aplayer-lrc-content"></pre> </div> <script> var ap = new APlayer({ element: document.getElementById("aplayer-eDkhPoBd"), narrow: false, autoplay: false, showlrc: false, music: { title: "风笛", author: "DDBY", url: "http://108.160.130.156/music/DDBY_-_风笛.mp3", pic: "", lrc: "" } }); window.aplayers || (window.aplayers = []); window.aplayers.push(ap); </script><ul><li><p>列表</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"> {% aplayerlist %}</span><br><span class="line">{</span><br><span class="line"> "narrow": false, // (可选)播放器袖珍风格</span><br><span class="line"> "autoplay": true, // (可选) 自动播放,移动端浏览器暂时不支持此功能</span><br><span class="line"> "mode": "random", // (可选)曲目循环类型,有 'random'(随机播放), 'single' (单曲播放), 'circulation' (循环播放), 'order' (列表播放), 默认:'circulation'</span><br><span class="line"> "showlrc": 3, // (可选)歌词显示配置项,可选项有:1,2,3</span><br><span class="line"> "mutex": true, // (可选)该选项开启时,如果同页面有其他 aplayer 播放,该播放器会暂停</span><br><span class="line"> "theme": "#e6d0b2", // (可选)播放器风格色彩设置,默认:#b7daff</span><br><span class="line"> "preload": "metadata", // (可选)音乐文件预载入模式,可选项: 'none' 'metadata' 'auto', 默认: 'auto'</span><br><span class="line"> "listmaxheight": "513px", // (可选) 该播放列表的最大长度</span><br><span class="line"> "music": [</span><br><span class="line"> {</span><br><span class="line"> "title": "CoCo",</span><br><span class="line"> "author": "Jeff Williams",</span><br><span class="line"> "url": "caffeine.mp3",</span><br><span class="line"> "pic": "caffeine.jpeg",</span><br><span class="line"> "lrc": "caffeine.txt"</span><br><span class="line"> },</span><br><span class="line"> {</span><br><span class="line"> "title": "アイロニ",</span><br><span class="line"> "author": "鹿乃",</span><br><span class="line"> "url": "irony.mp3",</span><br><span class="line"> "pic": "irony.jpg"</span><br><span class="line"> }</span><br><span class="line"> ]</span><br><span class="line">}</span><br><span class="line">{% endaplayerlist %}</span><br></pre></td></tr></table></figure><p>效果</p> <div id="aplayer-HplvpspF" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;"></div> <script> var options = {"narrow":false,"autoplay":false,"showlrc":3,"mode":"random","mutex":true,"theme":"#e6d0b2","preload":"metadata","listmaxheight":"513px","music":[{"title":"风笛","author":"DDBY","url":"http://108.160.130.156/music/DDBY_-_风笛.mp3","pic":""},{"title":"ミシロタウン","author":"景山将太","url":"http://108.160.130.156/music/景山将太_-_ミシロタウン.mp3","pic":""},{"title":"原風景","author":"mamomo","url":"http://108.160.130.156/music/mamomo_-_原風景.mp3","pic":""}]}; options.element = document.getElementById("aplayer-HplvpspF"); var ap = new APlayer(options); window.aplayers || (window.aplayers = []); window.aplayers.push(ap); </script></li></ul></li><li><p>视频</p><ul><li><p>原生视频</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><video id="video" controls="" preload="none" poster="" height="420" width="800" ></span><br><span class="line"> <source id="mp4" src="https://goti-bucket.oss-cn-shanghai.aliyuncs.com/movie/kiminama.mp4" type="video/mp4"></span><br></pre></td></tr></table></figure><p>效果</p><video id="video" controls preload="none" poster height="420" width="800"> <source id="mp4" src="https://goti-bucket.oss-cn-shanghai.aliyuncs.com/movie/kiminama.mp4" type="video/mp4"></video></li><li><p>dplayer插件</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">{% dplayer "url=https://goti-bucket.oss-cn-shanghai.aliyuncs.com/movie/kiminama.mp4" "loop=no" "theme=#FADFA3" "autoplay=false" "token=tokendemo" %}</span><br></pre></td></tr></table></figure><p>效果</p><div id="dplayer0" class="dplayer hexo-tag-dplayer-mark" style="margin-bottom: 20px;"></div><script>(function(){var player = new DPlayer({"container":document.getElementById("dplayer0"),"theme":"#FADFA3","video":{"url":"https://goti-bucket.oss-cn-shanghai.aliyuncs.com/movie/kiminama.mp4"}});window.dplayers||(window.dplayers=[]);window.dplayers.push(player);})()</script></li></ul></li><li><p>字体、字号、颜色设置</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><font face="微软雅黑" >微软雅黑字体</font></span><br><span class="line"><font face="黑体" >黑体</font></span><br><span class="line"><font size=3 >3号字</font></span><br><span class="line"><font size=4 >4号字</font></span><br><span class="line"><font color=#FF0000 >红色</font></span><br><span class="line"><font color=#008000 >绿色</font></span><br><span class="line"><font color=#0000FF >蓝色</font></span><br></pre></td></tr></table></figure><ul><li><font face="微软雅黑">微软雅黑字体</font><br><font face="黑体">黑体</font><br><font size="3">3号字</font><br><font size="4">4号字</font><br><font color="#FF0000">红色</font><br><font color="#008000">绿色</font><br><font color="#0000FF">蓝色</font></li></ul></li></ul>]]></content>
<summary type="html">
<h1 id="MarkDown语法学习"><a href="#MarkDown语法学习" class="headerlink" title="MarkDown语法学习"></a>MarkDown语法学习</h1><p>参考<a href="https://www.jianshu.com/p/191d1e21f7ed" target="_blank" rel="noopener">高鸿祥</a><br>这是一个goti学习markDown语法的文章</p>
</summary>
<category term="学习" scheme="http://yoursite.com/tags/%E5%AD%A6%E4%B9%A0/"/>
<category term="markDown语法" scheme="http://yoursite.com/tags/markDown%E8%AF%AD%E6%B3%95/"/>
</entry>
</feed>