-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.xml
279 lines (271 loc) · 31.3 KB
/
search.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>Python学习笔记之Requests</title>
<url>/archives/60eff005.html</url>
<content><![CDATA[<p>Requests是Python中的一个处理HTTP库,通过它我们可以轻松的获取网络资源。</p>
<span id="more"></span>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><p>安装库很简单: <code>$ python -m pip install requests </code></p>
<h2 id="打开网页"><a href="#打开网页" class="headerlink" title="打开网页"></a>打开网页</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">import requests</span><br><span class="line">r = requests.get('https://markdown.com.cn/')</span><br></pre></td></tr></table></figure>
<p>读取网页内容</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">r.text</span><br></pre></td></tr></table></figure>
<p>r.encoding 可以显示当前r.text 内容的编码格式,也可以通过它指定编码,如使用UTF-8 编码,再调用r.text 就能安装UTF-8读取网页内容了</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">r.encoding = "utf-8"</span><br><span class="line">r.text</span><br></pre></td></tr></table></figure>
<h2 id="获取图片"><a href="#获取图片" class="headerlink" title="获取图片"></a>获取图片</h2><p>如果是一个图片地址,我们可以用r.content 按照二进制数据获取图片文件,下面就是将网络图片文件保存在本地,名称位test.jpg</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">import requests</span><br><span class="line"></span><br><span class="line">r = requests.get('http://wx1.sinaimg.cn/nmw690/0085qV8vgy1gy1jac7097j30u01417a0.jpg')</span><br><span class="line">data = r.content</span><br><span class="line">try:</span><br><span class="line"> with open("test.jpg", 'wb') as f:</span><br><span class="line"> f.write(data)</span><br><span class="line"> f.close()</span><br><span class="line">except Exception as e:</span><br><span class="line"> print(str(e))</span><br></pre></td></tr></table></figure>
<h2 id="获取JSON数据"><a href="#获取JSON数据" class="headerlink" title="获取JSON数据"></a>获取JSON数据</h2><p>通过r.json可以之际获取json数据 </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">import requests</span><br><span class="line">r = requests.get('https://api.github.com/events')</span><br><span class="line">r.json()</span><br></pre></td></tr></table></figure>
<h2 id="自定义Header"><a href="#自定义Header" class="headerlink" title="自定义Header"></a>自定义Header</h2><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">import requests</span><br><span class="line"></span><br><span class="line">url = 'https://api.github.com/some/endpoint'</span><br><span class="line">headers = {'user-agent': 'my-app/0.0.1'}</span><br><span class="line"></span><br><span class="line">r = requests.get(url, headers=headers)</span><br></pre></td></tr></table></figure>
<p>学习 <span class="exturl" data-url="aHR0cHM6Ly9yZXF1ZXN0cy5yZWFkdGhlZG9jcy5pby9lbi9sYXRlc3QvIw==">更多<i class="fa fa-external-link-alt"></i></span></p>
]]></content>
<categories>
<category>学习笔记</category>
<category>Python</category>
</categories>
<tags>
<tag>Python</tag>
</tags>
</entry>
<entry>
<title>Android解决avc denied问题方法</title>
<url>/archives/272a02c7.html</url>
<content><![CDATA[<p> Android SELinux 有三种工作模式:</p>
<ul>
<li>enforcing: 强制模式, 执行SELinux规则, 违反的行为会被阻止</li>
<li>permissive: 宽容模式, 执行SELinux规则, 违反的行不会被阻止</li>
<li>disabled: 关闭SELinux<br>工作在强制模式的时候,违反SELinux规则的操作,则无法进行,在Log中会出现很多“avc denied”的Log信息,本文介绍一种快速解决avc denied 的方法。<span id="more"></span></li>
</ul>
<h2 id="使用policycoreutils-工具"><a href="#使用policycoreutils-工具" class="headerlink" title="使用policycoreutils 工具"></a>使用policycoreutils 工具</h2><p>Ubuntu系统安装policycoreutils工具<br><code>$sudo apt-get install policycoreutils</code></p>
<h2 id="导出log信息"><a href="#导出log信息" class="headerlink" title="导出log信息"></a>导出log信息</h2><p>将Android平台中avc denied的Log全部导出来<br><code>dmesg | grep avc > /sdcard/avc.txt </code></p>
<h2 id="audit2allow自动生成规则"><a href="#audit2allow自动生成规则" class="headerlink" title="audit2allow自动生成规则"></a>audit2allow自动生成规则</h2><p>把导出来的avc.txt 用audit2allow命令自动生成规则配置<br><code> audit2allow -i avc.txt</code><br>如下,是我碰到的一个情况 </p>
<blockquote>
<p>#============= system_app ==============<br>allow system_app default_prop:property_service set;<br>allow system_app i2c_device:chr_file open;<br>allow system_app serial_device:chr_file { read write }; </p>
</blockquote>
<h2 id="添加相应-te文件规则"><a href="#添加相应-te文件规则" class="headerlink" title="添加相应.te文件规则"></a>添加相应.te文件规则</h2><p>根据上面自动生成的信息,添加到对应的.te文件中。如上面我们就需要添加在 system_app.te 文件中。 </p>
<h2 id="出现neverallow错误"><a href="#出现neverallow错误" class="headerlink" title="出现neverallow错误"></a>出现neverallow错误</h2><p>我们在.te 文件添加行为,可能会违反系统一些规则,当我们编译的时候就会出现冲突。比如下面: </p>
<blockquote>
<p>out/target/product/marconi/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; exit 1; fi ) && (mv out/target/product/marconi/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/marconi/obj/ETC/sepolicy.recovery_intermediates/sepolicy )”<br>libsepol.report_failure: neverallow on line 532 of system/sepolicy/public/dnsmasq.te (or line 10498 of policy.conf) violated by allow system_app default_prop:property_service { set };<br>libsepol.check_assertions: 1 neverallow failures occurred<br>Error while expanding policy<br>out/host/linux-x86/bin/checkpo </p>
</blockquote>
<p>一个简单解决方法:找到冲突的地方,屏蔽或者过滤掉。 如上面的错误,我分析发现是domain.te 不允许设置default_prop </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># Require that domains explicitly label unknown properties, and do not allow</span><br><span class="line"># anyone but init to modify unknown properties.</span><br><span class="line"></span><br><span class="line">neverallow { domain -init -vendor_init } default_prop:property_service set;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">compatible_property_only(`</span><br><span class="line"> neverallow { domain -init } default_prop:property_service set;</span><br><span class="line"> neverallow { domain -init } mmc_prop:property_service set;</span><br><span class="line"> neverallow { domain -init -vendor_init } exported_default_prop:property_service set;neverallow { domain -init } exported_secure_prop:property_service set;</span><br></pre></td></tr></table></figure>
<p>我们添加 -system_app ,意思neverallow这条规则中对 system_app 不起作用 </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">--- public/domain.te (revision 830)</span><br><span class="line">+++ public/domain.te (working copy)</span><br><span class="line">@@ -529,11 +529,11 @@</span><br><span class="line"> </span><br><span class="line"> # Require that domains explicitly label unknown properties, and do not allow</span><br><span class="line"> # anyone but init to modify unknown properties.</span><br><span class="line">-neverallow { domain -init -vendor_init } default_prop:property_service set;</span><br><span class="line">+neverallow { domain -init -vendor_init -system_app } default_prop:property_service set;</span><br><span class="line"> neverallow { domain -init -vendor_init } mmc_prop:property_service set;</span><br><span class="line"> </span><br><span class="line"> compatible_property_only(`</span><br><span class="line">- neverallow { domain -init } default_prop:property_service set;</span><br><span class="line">+ neverallow { domain -init -system_app } default_prop:property_service set;</span><br><span class="line"> neverallow { domain -init } mmc_prop:property_service set;</span><br><span class="line"> neverallow { domain -init -vendor_init } exported_default_prop:property_service set;</span><br><span class="line"> neverallow { domain -init } exported_secure_prop:property_service set;</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>在system/sepolicy 下面mm 编译测试就能通过了。这样的解决方式会有一个弊端,就是造成无法通过CTS 测试,所以只能自己取舍咯。</p>
]]></content>
<categories>
<category>Android</category>
</categories>
<tags>
<tag>Android</tag>
<tag>SeLinux</tag>
</tags>
</entry>
<entry>
<title>解决github.com解析为127.0.0.1的问题</title>
<url>/archives/e6ed7f90.html</url>
<content><![CDATA[<h2 id="问题发现"><a href="#问题发现" class="headerlink" title="问题发现"></a>问题发现</h2><p>今天部署hexo博客时候发现失败,然后ssh -T -v <span class="exturl" data-url="bWFpbHRvOiYjeDY3OyYjMTA1OyYjeDc0OyYjeDQwOyYjMTAzOyYjMTA1OyYjeDc0OyYjMTA0OyYjeDc1OyYjOTg7JiM0NjsmI3g2MzsmIzExMTsmI3g2ZDs=">git@github.com<i class="fa fa-external-link-alt"></i></span>的时候居然发现 github.com 解析到IP地址为 127.0.0.1,而我自己的hosts文件里面没有改过github的解析。 <del>(看来不知道国内DNS解析商抽啥风,屏蔽了github.com)</del></p>
<span id="more"></span>
<h2 id="解决方法"><a href="#解决方法" class="headerlink" title="解决方法"></a>解决方法</h2><p>知道问题原因了,就好解决了。 </p>
<ol>
<li>查询正确的IP地址<img src="/archives/e6ed7f90/whatsmydns.me.png" class="" title="DNS查询">
选择一个可以ping通,且延迟低的IP地址</li>
<li>修改host文件<br>Windows 系统位于 C:\Windows\System32\drivers\etc\hosts<img src="/archives/e6ed7f90/hosts.png" class="" title="hosts"></li>
<li>刷新DNS<br>在CMD中<code>ping github.com </code>看是否解析为我们hosts文件中的IP,如果不是可以使用<code>ipconfig /flushdns</code> 命令刷新DNS缓存</li>
</ol>
]]></content>
<categories>
<category>Blog</category>
</categories>
<tags>
<tag>github</tag>
<tag>DNS</tag>
</tags>
</entry>
<entry>
<title>Hello World</title>
<url>/archives/4a17b156.html</url>
<content><![CDATA[<p>很早之前就开始过用Hexo + GitPages 建立博客,但是一直懒得写博客,今天趁着假期开始,每周写点东西,整理笔记也好,写点感悟也好,我,这次要重新出发!</p>
]]></content>
<categories>
<category>Blog</category>
</categories>
</entry>
<entry>
<title>我的hexo的配置</title>
<url>/archives/cdec4cbd.html</url>
<content><![CDATA[<h2 id="首页只显示摘要"><a href="#首页只显示摘要" class="headerlink" title="首页只显示摘要"></a>首页只显示摘要</h2><ol>
<li><p>修改配置<br>NEXT主题里面_config.yml 中把设置打开(默认是开的)</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># Automatically excerpt description in homepage as preamble text.</span><br><span class="line">excerpt_description: true</span><br></pre></td></tr></table></figure>
</li>
<li><p>可以用写概述方法<br>在文章的front-matter中添加description,其中description中的内容就会被显示在首页上</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">---</span><br><span class="line">title: Hello World</span><br><span class="line">categories: Blog</span><br><span class="line">abbrlink: 4a17b156</span><br><span class="line">description: 建站自述</span><br><span class="line">---</span><br></pre></td></tr></table></figure></li>
<li><p>懒人使用 <code><!-- more --></code><br>在文章需要截断的地方加入 <code><!-- more--></code> 即可,这样前面的就会成为首页摘要</p>
</li>
</ol>
<h2 id="博客中插入图片"><a href="#博客中插入图片" class="headerlink" title="博客中插入图片"></a>博客中插入图片</h2><ol>
<li>安装插件<br>使用命令 <code>npm install hexo-renderer-marked</code>安装插件,再安装 <code>npm install hexo-image-link --save</code> </li>
<li>修改配置<br>hexo的_config.yml 中配置:<br><code>post_asset_folder: true</code><br>当使用<code>hexo new </code>创建文章的时候,会生成相同文件夹,我们把图片放到这个文件夹里面,然后用Markdown语法<code>![]()</code>插入图片即可</li>
</ol>
<h2 id="RSS功能支持"><a href="#RSS功能支持" class="headerlink" title="RSS功能支持"></a>RSS功能支持</h2><ol>
<li><p>安装RSS插件<br>使用命令安装生成RSS Feed插件:<code>$npm install hexo-generator-feed --save</code></p>
</li>
<li><p>修改主题配置文件<br>我的主题是next,在hexo\themes\hexo-theme-next_config.yml 的Sidebar Settings部分增加以下代码: </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">sidebar_rss:</span><br><span class="line"> text: RSS</span><br><span class="line"> icon: fa fa-rss</span><br><span class="line"> color: burlywood</span><br><span class="line"> link: atom.xml</span><br></pre></td></tr></table></figure>
<p>如图中位置: </p>
<img src="/archives/cdec4cbd/hexo_rss_1.jpg" class="" title="主题修改"></li>
<li><p>修改边栏模板<br>编辑themes/hexo-theme-next/layout/_partials/sidebar/site-overview.swig 文件,在适当的位置插入以下代码,这样便在侧边栏增加了一个用于 RSS 订阅的链接。 </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">{%- if theme.sidebar_rss %}</span><br><span class="line"> <div class=""></span><br><span class="line"> <a target="_blank" class="social-link" href="{{ url_for(theme.sidebar_rss.link) }}" style="color: {{ theme.sidebar_rss.color }};"></span><br><span class="line"> <span class="icon"></span><br><span class="line"> <i class="{{ theme.sidebar_rss.icon }}"></i></span><br><span class="line"> </span></span><br><span class="line"> <span class="label">{{ theme.sidebar_rss.text }}</span></span><br><span class="line"> </a></span><br><span class="line"> </div></span><br><span class="line">{%- endif %}</span><br></pre></td></tr></table></figure>
<p>如图中位置: </p>
<img src="/archives/cdec4cbd/hexo_rss_2.jpg" class="" title="模板位置">
</li>
<li><p>查看效果<br>运行命令查看效果</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">$hexo g</span><br><span class="line">$hexo s</span><br></pre></td></tr></table></figure></li>
</ol>
<h2 id="博客增加分类"><a href="#博客增加分类" class="headerlink" title="博客增加分类"></a>博客增加分类</h2><ol>
<li><p>创建分类页面<br>执行命令<code>$ hexo new page categories</code> ,在source/categories文件夹下会有index.md这个文件,打开后添加<code>type: "categories"</code>到内容中即可</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">---</span><br><span class="line">title: 分类</span><br><span class="line">date: 2022-05-01 09:21:18</span><br><span class="line">type: categories</span><br><span class="line">comments: false</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
</li>
<li><p>创建博客分类模板<br>通过<code>hexo new </code> 创建博客的时候,默认使用 scaffolds/post.md,直接修改它,增加一个<code>categories:</code>即可 </p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">---</span><br><span class="line">title: {{ title }}</span><br><span class="line">date: {{ date }}</span><br><span class="line">categories:</span><br><span class="line">tags:</span><br><span class="line">---</span><br></pre></td></tr></table></figure></li>
</ol>
]]></content>
<categories>
<category>Blog</category>
</categories>
<tags>
<tag>hexo</tag>
<tag>hexo-next-theme</tag>
</tags>
</entry>
<entry>
<title>OMV手把手教学之Portainer</title>
<url>/archives/96236505.html</url>
<content><![CDATA[<img src="/archives/96236505/1.jpg" class="">
<p>Portainer是一个可视化管理Docker容器的工具,能够直观地拉取镜像,创建容器,管理容器等等操作。</p>
<span id="more"></span>
<h2 id="安装Portainer"><a href="#安装Portainer" class="headerlink" title="安装Portainer"></a>安装Portainer</h2><h2 id="使用docker镜像加速"><a href="#使用docker镜像加速" class="headerlink" title="使用docker镜像加速"></a>使用docker镜像加速</h2><p>阿里云注册开发者账号,可以获得一个镜像加速地址。</p>
<h2 id="修改IP"><a href="#修改IP" class="headerlink" title="修改IP"></a>修改IP</h2><p>默认的容器宿主IP是127.0.0.1,使用起来不是很方便,我们可以自己修改这个IP,在Settings -> Enviroments -> local -> Public IP.</p>
<img src="/archives/96236505/2.png" class="" title="修改IP">
]]></content>
<categories>
<category>折腾</category>
</categories>
<tags>
<tag>OpenMediaValut</tag>
<tag>NAS</tag>
<tag>Portainer</tag>
<tag>Docker</tag>
</tags>
</entry>
<entry>
<title>声音基础知识</title>
<url>/archives/68ea15fc.html</url>
<content><![CDATA[<h2 id="声音是什么"><a href="#声音是什么" class="headerlink" title="声音是什么"></a>声音是什么</h2><p>首先我们来回答一个问题:声音是什么? </p>
<span id="more"></span>
<p>这还用问啊,我们用我们自己耳朵听到的东西就是声音啊。我们看看百度百科是怎么解释声音的</p>
<blockquote>
<p>声音(sound)是由物体振动产生的声波。是通过介质(空气或固体、液体)传播并能被人或动物听觉器官所感知的波动现象。最初发出振动(震动)的物体叫声源。声音以波的形式振动(震动)传播。声音是声波通过任何介质传播形成的运动。<br>声音是一种波。可以被人耳识别的声(频率在20 Hz~20000 Hz之间),我们称之为声音. </p>
</blockquote>
<p>简单说就是,人耳朵识别到物体振动产生的声波。这里面我们看出来了声音几个关键因素:振动,传播介质,人耳识别。</p>
<h2 id="录音"><a href="#录音" class="headerlink" title="录音"></a>录音</h2><p>录音也就是说我们把声音怎么保存下来。我们看看留声机是怎么录音的</p>
<blockquote>
<p>留声机诞生于1877年。托马斯·阿尔瓦·爱迪生根据电话传话器里的膜板随着说话声会引起震动的现象,拿短针作了试验,从中得到很大的启发。说话的快慢高低能使短针产生相应的不同颤动 。那么,反过来,这种颤动也一定能发出原先的说话声音。</p>
</blockquote>
<p>简单的说,探针感受声音产生震动,探针将震动刻录在介质上面,当播放的时候,让探针摩擦介质,还原震动而产生声波,声音就播放出来了。</p>
<p>随着时代的发展,录音技术更加进步,在计算机时代中,我们麦克风接受外界声音的震动,由于法拉第电磁感应效应,实现了震动转换成电信号,将采集到电压值进行一定格式的编码(PCM)记录在计算机中存储为原始音频文件。播放则按照存储的格式从新将数据取出,转换成数字信号传递给喇叭进行播放。</p>
<h2 id="采样"><a href="#采样" class="headerlink" title="采样"></a>采样</h2><p>声波是一种机械波,因此也有波长和振幅的特征,波长对应于时间轴线,振幅对应于采样值轴线。波是无限光滑的,弦线可以看成由无数点组成,采样的过程就是抽取某点的采样值,很显然,在单位时间中内抽取的点越多,那么还原声音就越准确。 </p>
<ul>
<li>采样率:每秒需要采集多少个点的数据。常用录音16khz频率就是每秒采集声音数据16 000个。</li>
<li>采用精度:每个点数据用几位(bit)来存储。常用录音16bit。</li>
<li>采样通道:根据不同录音位置采集到数据就是一个通道,通道越多,我们还原出来的声音也就越精确。我们常说的立体声,也就是模拟人耳采集到左声道和有声道的两个通道的数据。</li>
</ul>
<p>常见录音为什么是16k/16bit? </p>
<blockquote>
<p>16k采样频率: 实际的情况下,采集频率往往比信号的实际频率要高出5到10倍以上。因为采集频率仅仅高于信号频率的2倍(乃奎斯特定律)的情况下,是很难获取测量的精度的。 而人的发音频率集中在80HZ~1200HZ,所以16KHZ采样频率能够尽量减少失真的情况采集到人的声音信号。</p>
</blockquote>
<blockquote>
<p>16bit采样位数: 2^16=65536,20log(65536)约等于96dB的动态范围,足够覆盖一般场景,比如覆盖安静的夜晚(30dB)到球磨机工作(约120dB)。</p>
</blockquote>
<p>播放的音频为什么是44.1k </p>
<blockquote>
<p>44.1k播放音频: 因为人耳的听觉范围大概在20Hz~20kHz,如果想还原20khz的音频采样频率至少要40khz ,但是梳状滤波器不可能是完美的,截止频率不能完全截断,所以需要将通带适当放开,增加一个大概10%衰减缓冲的带宽,所以就需要44k的播放音频,具体为什么是44.1k,这个就和播放的格式和数据的编码传输有关。</p>
</blockquote>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a>参考资料</h2><p>[1] <span class="exturl" data-url="aHR0cHM6Ly9iYWlrZS5iYWlkdS5jb20vaXRlbS8lRTUlQTMlQjAlRTklOUYlQjMvMzM2ODY=">声音<i class="fa fa-external-link-alt"></i></span><br>[2] <span class="exturl" data-url="aHR0cHM6Ly9pb3Qtc3ouYWlzcGVlY2guY29tL2RvYy9jaWNhZGEtZG9jLyMvU2NpZW5jZUFydGljbGVzLw==">认识声音<i class="fa fa-external-link-alt"></i></span></p>
]]></content>
<categories>
<category>编程技术</category>
</categories>
<tags>
<tag>计算机基础</tag>
</tags>
</entry>
<entry>
<title>HEXO博客页面无内容显示</title>
<url>/archives/3749a1e5.html</url>
<content><![CDATA[<h2 id="问题发现"><a href="#问题发现" class="headerlink" title="问题发现"></a>问题发现</h2><p>在公司打开我的博客时候,发现刷新了半天也没见到内容,如图所示: </p>
<img src="/archives/3749a1e5/blog.png" class="" title="页面无内容">
<span id="more"></span>
<h2 id="问题解决"><a href="#问题解决" class="headerlink" title="问题解决"></a>问题解决</h2><p>真是一个奇怪的问题,打开浏览器的开发者工具,寻找原因,发现其中的jquery文件访问不到了 <del>估计是伟大的墙的杰作吧</del> </p>
<img src="/archives/3749a1e5/chrome.png" class="" title="浏览器开发者工具">
<p>cdn.jsdelivr.net 连接超时了,百度一搜,找到了解决办法: <span class="exturl" data-url="aHR0cHM6Ly9sb3Vra3kuY29tL2FyY2hpdmVzLzIxNDA=">cdn.jsdelivr.net 污染解决方案<i class="fa fa-external-link-alt"></i></span><br>在\themes\hexo-theme-next_config.yml 主题文件yml配置文件中,将所有cdn.jsdeliver.net 全部替换为 fastly.jsdelivr.net(选择一个你ping连接延迟最小的)</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># FancyBox</span><br><span class="line"> # jquery: //cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js</span><br><span class="line"> # fancybox: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js</span><br><span class="line"> # fancybox_css: //cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css</span><br><span class="line"> jquery: //fastly.jsdelivr.net/npm/jquery@3/dist/jquery.min.js</span><br><span class="line"> fancybox: //fastly.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js</span><br><span class="line"> fancybox_css: //fastly.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>然后 <code>hexo clean</code> , <code>hexo g</code> , <code>hexo d</code> 即可。</p>
]]></content>
<categories>
<category>Blog</category>
</categories>
<tags>
<tag>hexo</tag>
<tag>jsdelivr</tag>
</tags>
</entry>
<entry>
<title>摄影构图笔记</title>
<url>/archives/3912a5ad.html</url>
<content><![CDATA[<p>记录《108个训练让你成为手机摄影达人 》书中的一些构图技巧</p>
<h2 id="三分构图法"><a href="#三分构图法" class="headerlink" title="三分构图法"></a>三分构图法</h2><blockquote>
<p>在拍摄风光题材时,横向的三分法构图比较常用,这种三分法可以分为上三分与下三分。 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_85"></p>
<span id="more"></span>
<blockquote>
<p>在拍摄人物、动物或花卉题材时,可以将主体安排在纵向三分线上。使用竖向的三分法构图,除了可以达到突出主体的目的,还可以使画面表现得更加活泼、生动 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_86"></p>
<h2 id="井字构图法"><a href="#井字构图法" class="headerlink" title="井字构图法"></a>井字构图法</h2><blockquote>
<p>井字形构图其实是黄金分割法的一种形式,也是我们常会用到的构图方法。在取景拍摄时,以虚拟的横竖四条直线把画面平均分成九份,将主体安排在井字形的交叉点位置就是井字形构图<br>通常,井字形上方的两个点要比下方两个点表现得更具有动感,而左边两个点要比右边两个点更具表现力。 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_90"><br>感觉这就是三分构图法的扩展 </p>
<h2 id="三角形构图"><a href="#三角形构图" class="headerlink" title="三角形构图"></a>三角形构图</h2><blockquote>
<p>三角形的构建方式可以分为两种:一种是画面中只有一个主体,这个主体恰好可以形成一个类似三角形的形状,我们便可以利用主体本身进行三角形构图。还有一种是画面中有多个主体,通过调整拍摄角度或拍摄位置,将这些主体以三角形的形态构建在画面中,以达到三角形构图的效果,这种方式形成的三角形,一般都是斜三角形比较多。 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_97"> </p>
<h2 id="框架式构图"><a href="#框架式构图" class="headerlink" title="框架式构图"></a>框架式构图</h2><blockquote>
<p>框架式构图是十分经典的构图方式,所展现的效果也很有吸引力,在取景构图时,我们将主体安排在框架元素中就是框架式构图。这里所讲的框架形式有很多种,可以是窗户、树木、车门等,也可以是虚拟的色块线条等。这些框架元素可以起到集中观者视线、突出主体的作用,也可以起到增加画面空间感的作用。<br><img src="https://res.weread.qq.com/wrepub/epub_22651161_115"><br>利用山洞当作框架元素,将大海壮美的风景安排在画面中,展现出不一样的海景 </p>
</blockquote>
<h2 id="开放式构图"><a href="#开放式构图" class="headerlink" title="开放式构图"></a>开放式构图</h2><blockquote>
<p>开放式构图是一种打破传统构图观念的构图方式,它并不讲究画面中的均衡与严谨,追求的是给人们带来更大的想象空间。在摄影创作中,开放式构图经常会被用到,而且适合拍摄很多不同的题材,像建筑、人物、自然景物、花卉等摄影题材都可以用开放式构图来呈现 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_124" alt="开放式构图拍摄的效果,增加了画面的想象空间"></p>
<h2 id="封闭式构图"><a href="#封闭式构图" class="headerlink" title="封闭式构图"></a>封闭式构图</h2><blockquote>
<p>与开放式构图相比,封闭式是一种截然相反的构图方式,其更讲究画面结构的完整性和独立性,所表现的内容也仅展现在画面之内,是一种非常严谨的构图形式。封闭式构图很适合拍摄抒情性的风光摄影,也适合拍摄表达人物感情以及生活场景的照片。通过封闭式构图呈现出的画面,可以得到一种严肃、优美、宁静的画面效果 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_126" alt="利用封闭式构图拍摄旅行中的人物,使欣赏者的视线全部聚集在主体身上,让主体得到突出体现"> </p>
<h2 id="错位构图"><a href="#错位构图" class="headerlink" title="错位构图"></a>错位构图</h2><blockquote>
<p>错位构图是一种非常有创意并且很有趣味性的构图方式,其主要通过照片对实际场景的空间压缩,因近大远小的关系和一些特殊的视角,将画面中不同空间位置的景物联系在一起,得到非常有趣的错位效果。 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_133"></p>
<h2 id="对称式构图"><a href="#对称式构图" class="headerlink" title="对称式构图"></a>对称式构图</h2><blockquote>
<p>利用景物所拥有的对称关系进行构图拍摄的方法就是对称式构图。对称式构图往往会给我们带来一种稳定、正式、均衡的画面感受 </p>
</blockquote>
<p><img src="https://res.weread.qq.com/wrepub/epub_22651161_104" alt="利用景物所拥有的对称关系进行构图拍摄的方法就是对称式构图。对称式构图往往会给我们带来一种稳定、正式、均衡的画面感受"></p>
]]></content>
<categories>
<category>读书笔记</category>
</categories>
<tags>
<tag>摄影</tag>
<tag>构图技巧</tag>
</tags>
</entry>
</search>