-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
377 lines (256 loc) · 16.4 KB
/
index.html
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>群博客</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="群博客">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="群博客">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="群博客">
<link rel="alternate" href="/atom.xml" title="群博客" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">群博客</a>
</h1>
<h2 id="subtitle-wrap">
<a href="/" id="subtitle">QQ群号341760213</a>
</h2>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
</nav>
<nav id="sub-nav">
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
<a id="nav-search-btn" class="nav-icon" title="搜索"></a>
</nav>
<div id="search-form-wrap">
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
</div>
</div>
</div>
</header>
<div class="outer">
<section id="main">
<article id="aidl简单知识及注意事项-by酱油哥" class="article article-type-aidl简单知识及注意事项" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/08/22/by酱油哥/" class="article-date">
<time datetime="2016-08-22T07:53:46.000Z" itemprop="datePublished">2016-08-22</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/08/22/by酱油哥/">aidl简单知识及注意事项@by酱油哥</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>AIDL简单知识及注意事项</p>
<p>1,支持的数据类型<br>基本类型<br>String和CharSequence<br>List 只支持Arraylist,里面每个元素都必须能够被AIDL支持<br>Map 只支持HashMap,要求同上<br>Parcelable 所有实现这个接口的对象<br>AIDL 所有的AIDL本身也能在AIDL中使用<br>2,注意事项<br>1,如果AIDL中用到了自定义的Parcelable对象,那么必须新建一个和它同名的aidl文件,并在其中声明它为Parcelable类型。如Book对象:<br>package com.example.aidl;<br>parcelable Book;</p>
<p>2,AIDL中的每个实现了Parcelable接口的类都需要按照上面的那个方式去创建。</p>
<p>3,AIDL中除了基本数据类型,其他的参数必须标上in、out、inout;in表示输入性参数;out表示输出型参数,inout表示输入输出型参数(不写也不会报错,他们在底层实现是有开销的)。</p>
<p>4,AIDL只支持方法,不支持声明静态类型。</p>
<p>5,AIDL中接口声明要按照如下规则,这样导入的接口才能够被AIDL文件认识:</p>
<p>package com.example.aidl;</p>
<p>import com.example.aidl.Book;</p>
<p>interface IOnNewBookAdd{</p>
<p>void onNewBookAdd(Book book);<br> }<br>IPC方式的优缺点及适用场景</p>
<table>
<thead>
<tr>
<th>名称</th>
<th>优点</th>
<th>缺点</th>
<th>适用场景</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bundle</td>
<td>easy</td>
<td>只能传Bundle类型数据</td>
<td>四大组件间通信</td>
</tr>
<tr>
<td>文件共享</td>
<td>easy</td>
<td>不能做到高并发且不能实时</td>
<td>无并发,对实时性要求不高的场景</td>
</tr>
<tr>
<td>AIDL</td>
<td>强大,支持一对多并发,支持实时通信</td>
<td>使用复杂,需处理好线程同步 一对多且有RPC需求</td>
</tr>
<tr>
<td>Messager</td>
<td>一般,支持一对多串行通信,支持实时</td>
<td>不能很好处理并发,不支持RPC,只能传递Bundle类型数据</td>
<td>低并发的一对多及时通信</td>
</tr>
<tr>
<td>ContentProvider</td>
<td>在数据访问方面功能强大,支持一对多数据共享,可通过Call扩展其他操作</td>
<td>可理解为受约束的AIDL,主要提供数据源的CRUD操作</td>
<td>一对多的进程间通信</td>
</tr>
<tr>
<td>Socket</td>
<td>强大,支持网络传输字节流,支持一对多并发实时通信</td>
<td>实现麻烦,不支持直接的RPC</td>
<td>网络数据交换</td>
</tr>
</tbody>
</table>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2016/08/22/by酱油哥/" data-id="cis5rr00a0000eouwhxj67m5i" class="article-share-link">Share</a>
</footer>
</div>
</article>
<article id="post-hexo-github搭建博客" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/08/22/hexo-github搭建博客/" class="article-date">
<time datetime="2016-08-22T07:02:09.000Z" itemprop="datePublished">2016-08-22</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/08/22/hexo-github搭建博客/">hexo+github搭建博客</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>#搭建博客</p>
<ol>
<li>环境搭建<br>1.1 安装Git<br>请参考【1】<br>1.2 安装node.js<br>官网下载,默认安装node.js即可</li>
<li>配置Github<br>1.1 建立Repository<br>建立与你用户名对应的仓库,仓库名必须为【your_user_name.github.io】<br>1.2 配置SSH-Key<br>参考【1】</li>
<li>安装Hexo<br>关于Hexo的安装配置过程,请以官方Hexo【2】给出的步骤为准。<br>3.1 Installation<br>打开Git命令行,执行如下命令(可以新建一个文件夹后再执行该命令,参考3.2)<br>$ npm install -g hexo<br>3.2 Quick Start<ol>
<li>Setup your blog<br>在电脑中建立一个名字叫「Hexo」的文件夹(比如我建在了D:\Hexo),然后在此文件夹中右键打开Git Bash。执行下面的命令<br>$ hexo init<br>[info] Copying data<br>[info] You are almost done! Don’t forget to run <code>npm install</code> before you start b<br>logging with Hexo!<br>Hexo随后会自动在目标文件夹建立网站所需要的文件。然后按照提示,运行 npm install(在 /D/Hexo下)<br>npm install<br>会在D:\Hexo目录中安装 node_modules。</li>
</ol>
</li>
<li>Start the server<br>运行下面的命令(在 /D/Hexo下)<br>$ hexo server<br>[info] Hexo is running at <a href="http://localhost:4000/" target="_blank" rel="external">http://localhost:4000/</a>. Press Ctrl+C to stop.<br>表明Hexo Server已经启动了,在浏览器中打开 <a href="http://localhost:4000/,这时可以看到Hexo已为你生成了一篇blog。" target="_blank" rel="external">http://localhost:4000/,这时可以看到Hexo已为你生成了一篇blog。</a><br>你可以按Ctrl+C 停止Server。</li>
<li>Create a new post<br>新打开一个git bash命令行窗口,cd到/D/Hexo下,执行下面的命令<br>$ hexo new “My New Post”<br>[info] File created at d:\Hexo\source_posts\My-New-Post.md<br>刷新<a href="http://localhost:4000/,可以发现已生成了一篇新文章" target="_blank" rel="external">http://localhost:4000/,可以发现已生成了一篇新文章</a> “My New Post”。<br>NOTE:<br>有一个问题,发现 “My New Post” 被发了2遍,在Hexo server所在的git bash窗口也能看到create了2次。<br>$ hexo server<br>[info] Hexo is running at <a href="http://localhost:4000/" target="_blank" rel="external">http://localhost:4000/</a>. Press Ctrl+C to stop.<br>[create] d:\Hexo\source_posts\My-New-Post.md<br>[create] d:\Hexo\source_posts\My-New-Post.md<br>经验证,在hexo new “My New Post” 时,如果按Ctrl+C将hexo server停掉,就不会出现发2次的问题了。<br>所以,在hexo new文章时,需要stop server。</li>
<li>Generate static files<br>执行下面的命令,将markdown文件生成静态网页。<br>$ hexo generate<br>该命令执行完后,会在 D:\Hexo\public\ 目录下生成一系列html,css等文件。</li>
<li>编辑文章<br>hexo new “My New Post”会在D:\Hexo\source_posts目录下生成一个markdown文件:My-New-Post.md<br>可以使用一个支持markdown语法的编辑器(比如 Sublime Text 2)来编辑该文件。</li>
<li>部署到Github<br>部署到Github前需要配置_config.yml文件,首先找到下面的内容<h1 id="Deployment"><a href="#Deployment" class="headerlink" title="Deployment"></a>Deployment</h1><h2 id="Docs-http-hexo-io-docs-deployment-html"><a href="#Docs-http-hexo-io-docs-deployment-html" class="headerlink" title="Docs: http://hexo.io/docs/deployment.html"></a>Docs: <a href="http://hexo.io/docs/deployment.html" target="_blank" rel="external">http://hexo.io/docs/deployment.html</a></h2>deploy:<br>type:<br>然后将它们修改为<h1 id="Deployment-1"><a href="#Deployment-1" class="headerlink" title="Deployment"></a>Deployment</h1><h2 id="Docs-http-hexo-io-docs-deployment-html-1"><a href="#Docs-http-hexo-io-docs-deployment-html-1" class="headerlink" title="Docs: http://hexo.io/docs/deployment.html"></a>Docs: <a href="http://hexo.io/docs/deployment.html" target="_blank" rel="external">http://hexo.io/docs/deployment.html</a></h2>deploy:<br>type: git<br>repository: <a href="https://github.com/DongAndroid/DongAndroid.github.io.git" target="_blank" rel="external">https://github.com/DongAndroid/DongAndroid.github.io.git</a><br>branch: master<br>改了之后执行下边命令:、<br>$ npm install hexo-deployer-git –save<br>$ hexo deploy</li>
</ol>
<p>执行完成后输入地址:<a href="https://dongandroid.github.io即可打开博客" target="_blank" rel="external">https://dongandroid.github.io即可打开博客</a></p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2016/08/22/hexo-github搭建博客/" data-id="cis5rr00j0002eouw0kp0ifiq" class="article-share-link">Share</a>
</footer>
</div>
</article>
<article id="post-涛哥傻逼" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/08/22/涛哥傻逼/" class="article-date">
<time datetime="2016-08-22T06:40:36.000Z" itemprop="datePublished">2016-08-22</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/08/22/涛哥傻逼/">涛哥傻逼</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>涛哥真的是傻逼吗?</p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2016/08/22/涛哥傻逼/" data-id="cis5rr00l0003eouwncm81p1g" class="article-share-link">Share</a>
</footer>
</div>
</article>
<article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/08/22/hello-world/" class="article-date">
<time datetime="2016-08-22T06:32:42.119Z" itemprop="datePublished">2016-08-22</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/08/22/hello-world/">Hello World</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2016/08/22/hello-world/" data-id="cis5rr00g0001eouwyj1t2mkk" class="article-share-link">Share</a>
</footer>
</div>
</article>
</section>
<aside id="sidebar">
<div class="widget-wrap">
<h3 class="widget-title">归档</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">最新文章</h3>
<div class="widget">
<ul>
<li>
<a href="/2016/08/22/by酱油哥/">aidl简单知识及注意事项@by酱油哥</a>
</li>
<li>
<a href="/2016/08/22/hexo-github搭建博客/">hexo+github搭建博客</a>
</li>
<li>
<a href="/2016/08/22/涛哥傻逼/">涛哥傻逼</a>
</li>
<li>
<a href="/2016/08/22/hello-world/">Hello World</a>
</li>
</ul>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
© 2016 刘海东<br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
</div>
<nav id="mobile-nav">
<a href="/" class="mobile-nav-link">Home</a>
<a href="/archives" class="mobile-nav-link">Archives</a>
</nav>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script src="/js/script.js"></script>
</div>
</body>
</html>