-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
434 lines (326 loc) · 21.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
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Delbert's Octopress Blog]]></title>
<link href="http://cnDelbert.github.io/atom.xml" rel="self"/>
<link href="http://cnDelbert.github.io/"/>
<updated>2014-04-24T14:32:53+08:00</updated>
<id>http://cnDelbert.github.io/</id>
<author>
<name><![CDATA[Delbert]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[骚扰电话]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/24/ad-calls/"/>
<updated>2014-04-24T14:26:53+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/24/ad-calls</id>
<content type="html"><![CDATA[<p>0531-58637290 山东 济南 商业银行贷款推广
15519476562 贵州 六盘水</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[3D 建模中的一些概念]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/22/concepts-of-3d-modeling/"/>
<updated>2014-04-22T15:02:15+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/22/concepts-of-3d-modeling</id>
<content type="html"><![CDATA[<p>DTM</p>
<p>DEM</p>
<p>VPB</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[XML 相关的一点内容]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/11/xml-relative/"/>
<updated>2014-04-11T20:11:01+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/11/xml-relative</id>
<content type="html"><![CDATA[<p>想用 XML 来保存一点数据,因此在这边来作个笔记。</p>
<!--more-->
<ul>
<li>XML 所有元素都<strong>必须</strong>有关闭标签。</li>
</ul>
<p>XML 声明不属于 XML 的部分,因此声明是没有关闭标签的。</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='xml'><span class='line'><span class="cp"><?xml version="1.0" encoding="ISO-8859-1"?></span>
</span></code></pre></td></tr></table></div></figure>
<ul>
<li>XML 标签是大小写敏感的。</li>
<li>XML 标签<strong>必须</strong>正确嵌套。</li>
<li>XML文档必须有根元素。</li>
<li>XML 的属性<strong>必须</strong>加双引号。</li>
<li><code><</code> 等要写成<code>&lt;</code>。</li>
<li>XML 中的空格会被保留,而不是像 HTML 一样合并为一个。</li>
</ul>
<p>XML 的命名应该遵循一些规则</p>
<ul>
<li>不能以标点或数字开头</li>
<li>不能以xml/XML/Xml等开头</li>
<li>不能包含空格</li>
<li>尽量避免使用<code>.</code> <code>-</code> <code>:</code></li>
<li>可是使用非英语字母,但是不建议使用。</li>
</ul>
<p>尽量使用元素,而要避免使用属性。属性仅仅用来描述与数据无关的信息,而用元素来处理信息。</p>
<p>如果 XML 文件有错误,程序就会停止执行。</p>
<p>Notes:</p>
<p>看完 XML 基础,还要记得看 DTD 和 XSLT。尽量不要用 CSS 来渲染 XML。最重要的是,能把整个 XML 给看完啊啊啊……</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Ruby 补充笔记 2]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/08/ruby-note-review-2/"/>
<updated>2014-04-08T21:11:59+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/08/ruby-note-review-2</id>
<content type="html"><![CDATA[<p>继续</p>
<!--more-->
<p>Ruby 中有以感叹号和问号结尾的方法。</p>
<p>问号被用于判断返回 Boolean 是否为真的方法,如 <code>Array.empty?</code>。<br>
叹号用来表示用到的方法要多加小心。一般不带叹号的方法返回调用该方法的一个拷贝,而带感叹号的则会修改原来的对象。</p>
<p>可以通过 <code>Hash.new</code> 方法来建立新的空的 hash。</p>
<p><code>.to_sym</code> 和 <code>.intern</code> 作用一样,都是讲字符串转换为 Symbol。</p>
<p>Hash 中 key 如果本身是一个单词,可以直接用 <code>key: value</code> 的形式,如果是多个单词的话,就要 <code>:"key word" => value</code> 了。貌似是这样的。</p>
<p>lrthw 中从来没有提到过 The Zen of Ruby。 Ruby 是一种很随意的语言,比如</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="nb">puts</span> <span class="s2">"Delbert"</span> <span class="k">if</span> <span class="kp">true</span>
</span></code></pre></td></tr></table></div></figure>
<p>和英语的读法差不多的杨泽,语法相当随意。</p>
<p>加一个<code>@</code>是实例变量,两个@ <code>@@</code>是类变量,加<code>$</code>的是全局变量。</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Ruby 补充笔记 1]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/08/ruby-note-review/"/>
<updated>2014-04-08T14:53:48+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/08/ruby-note-review</id>
<content type="html"><![CDATA[<p>完成了 <em>Learn Ruby The Hard Way</em> ,但是在 Codecademy 上面的课程还是没有完成。今天抽空从头复习了一下,发现了不少在 lrthw 中没有提到的地方。</p>
<!--more-->
<h2>字符串方法</h2>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="o">.</span><span class="n">length</span>
</span><span class='line'><span class="o">.</span><span class="n">reverse</span>
</span><span class='line'><span class="o">.</span><span class="n">upcase</span>
</span><span class='line'><span class="o">.</span><span class="n">downcase</span>
</span><span class='line'><span class="o">.</span><span class="n">capitalize</span>
</span><span class='line'>
</span><span class='line'><span class="o">.</span><span class="n">gsub!</span><span class="p">(</span><span class="sr">/s/</span><span class="p">,</span><span class="s2">"th"</span><span class="p">)</span> <span class="c1"># replace s with th, while gsub is short for **g**lobal **sub**stitution. </span>
</span></code></pre></td></tr></table></div></figure>
<h2>多行注释</h2>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="cm">=begin</span>
</span><span class='line'><span class="cm">注释</span>
</span><span class='line'><span class="cm">Multi-Line Comments</span>
</span><span class='line'><span class="cm">=end</span>
</span><span class='line'>
</span><span class='line'><span class="c1"># Single-Line Comments</span>
</span></code></pre></td></tr></table></div></figure>
<h2>控制流</h2>
<h3>if/else</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">if</span> <span class="kp">true</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'><span class="k">elsif</span>
</span><span class='line'> <span class="c1"># do something else</span>
</span><span class='line'><span class="k">else</span>
</span><span class='line'> <span class="c1"># others</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<h3>unless/else</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">unless</span> <span class="kp">false</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'><span class="k">elsif</span>
</span><span class='line'> <span class="c1"># do something else</span>
</span><span class='line'><span class="k">else</span>
</span><span class='line'> <span class="c1"># others</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<h2>循环</h2>
<h3>while</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">while</span> <span class="kp">true</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<h3>until</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="k">until</span> <span class="kp">false</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<h3>loop</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="kp">loop</span> <span class="k">do</span>
</span><span class='line'> <span class="k">next</span> <span class="k">if</span> <span class="kp">true</span> <span class="c1"># equals continus</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'> <span class="k">break</span> <span class="k">if</span> <span class="kp">true</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<h3>.each</h3>
<p>Multi-Line</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">array</span> <span class="o">=</span> <span class="o">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="o">]</span>
</span><span class='line'><span class="n">array</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">x</span><span class="o">|</span>
</span><span class='line'> <span class="c1"># do something</span>
</span><span class='line'><span class="k">end</span>
</span></code></pre></td></tr></table></div></figure>
<p>Single-Line</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="n">object</span><span class="o">.</span><span class="n">each</span> <span class="p">{</span> <span class="o">|</span><span class="n">item</span><span class="o">|</span> <span class="c1"># Do something }</span>
</span></code></pre></td></tr></table></div></figure>
<h3>.times</h3>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='ruby'><span class='line'><span class="mi">3</span><span class="o">.</span><span class="n">times</span><span class="p">{</span><span class="nb">print</span> <span class="s2">"Delbert"</span><span class="p">}</span> <span class="c1"># print "Delbert" out for 3 times{print</span>
</span></code></pre></td></tr></table></div></figure>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[参数方法启用 Chrome App Launcher]]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/08/chrome-app-launcher/"/>
<updated>2014-04-08T14:44:31+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/08/chrome-app-launcher</id>
<content type="html"><![CDATA[<p>昨天启用 Google Knot 的时候在我的本子上给安装了个 Chrome App Launcher,感觉很好用。</p>
<!--more-->
<p>因为在实验室用台式机比较多,想在那台 Windows 8 的上面也启用 App Launcher。结果用 Chrome 到了安装的页面,再点击就直接是空白页了。找到 Softnic 的地址,结果也是直接链接到 Google。</p>
<p>算了,本来不想用了,结果逛到<a href="//appinn.com">小众软件</a>,发现某篇文章里面也提到了这个东东,评论中有一句话真心大亮:</p>
<blockquote><p>不就是 Chrome 加上了 <code>--show-app-list</code> 启动参数吗?</p></blockquote>
<p>哈哈哈,原来 Chrome App Launcher 这么简单就搞定了。</p>
<p>右键原来的那个 Chrome 的快捷方式,加上 <code>--show-app-list</code> 参数,确定即可。</p>
<p>附送参数一枚:</p>
<p>隐身模式 <code>--incoginto</code> ,快捷键 <code>Ctrl + Shift + N</code>。</p>
<p><em>本方法仅在 Windows 7 / Window 8 操作系统下测试通过</em></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Failure on 'Ruby dk.rb Init']]></title>
<link href="http://cnDelbert.github.io/blog/2014/04/01/cannot-init-dk-dot-rb/"/>
<updated>2014-04-01T16:09:29+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/04/01/cannot-init-dk-dot-rb</id>
<content type="html"><![CDATA[<p>想在 Windows 下重新安装 Ruby,结果在执行 <code>ruby dk.rb init</code> 的命令时就出现了错误:</p>
<!--more-->
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>ruby dk.rb init
</span><span class='line'>[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
</span><span class='line'>C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:173:in `tr': invalid byte sequence in UTF-8 (ArgumentError)
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:173:in `initialize'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `exception'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `raise'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:231:in `check'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:277:in `EnumKey'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:551:in `each_key'
</span><span class='line'> from dk.rb:119:in `block (2 levels) in scan_for'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:389:in `open'
</span><span class='line'> from C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:496:in `open'
</span><span class='line'> from dk.rb:118:in `block in scan_for'
</span><span class='line'> from dk.rb:116:in `each'
</span><span class='line'> from dk.rb:116:in `scan_for'
</span><span class='line'> from dk.rb:138:in `block in installed_rubies'
</span><span class='line'> from dk.rb:138:in `collect'
</span><span class='line'> from dk.rb:138:in `installed_rubies'
</span><span class='line'> from dk.rb:146:in `init'
</span><span class='line'> from dk.rb:313:in `run'
</span><span class='line'> from dk.rb:332:in `<main>'</span></code></pre></td></tr></table></div></figure>
<p>将环境变量中的 <code>LANG</code> 和 <code>LC_ALL</code> 去掉后,重新开启一个命令行执行即可。</p>
<p>有必要的话,安装完 DevKit 再将环境变量添加回去。</p>
<p><em>Delbert</em> 自己摸索了一下午试出来的……</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Bullet Character Demo Assert]]></title>
<link href="http://cnDelbert.github.io/blog/2014/03/31/bullet-debug-assert/"/>
<updated>2014-03-31T11:04:09+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/03/31/bullet-debug-assert</id>
<content type="html"><![CDATA[<p>Bullet 的默认 Demo <code>CharacterDemo</code> 竟然也会出现 <code>fuzzyZero</code> 这样的 assert ,无奈了。</p>
<p>之前只是看 Demo 的源码,用 Release 版本的例子给老师看,反正我怎么写都会出发 breakpoint ,我以为是我自己代码的问题。结果昨天一运行官方的,发现根本不是我的问题,官方的例子都是这样的啊。</p>
<p>算了,以后编译成 Release 版本吧,大不了不 debug 了…… (出了错误谁负责啊!)</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[第一篇Octopress日志]]></title>
<link href="http://cnDelbert.github.io/blog/2014/03/29/first-octopress-post/"/>
<updated>2014-03-29T09:32:59+08:00</updated>
<id>http://cnDelbert.github.io/blog/2014/03/29/first-octopress-post</id>
<content type="html"><![CDATA[<h3>你好,世界!</h3>
<h3>Hello, World!</h3>
<p>哈哈,有点小 Geek 了哈。</p>
<blockquote><p>代码示例:</p></blockquote>
<pre><code>cpp
#include <stdio.h>
int main()
{
printf("Hello world!");
return 0;
}
</code></pre>
<p>好奇怪,没法使用语法高亮。一旦使用了,<code>pygments</code>就跑不过去,<code>rake generate</code>就生成不了。</p>
<p>用的是 Python 3.4,难道是因为版本太高了?</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='cpp'><span class='line'><span class="cp">#include <stdio.h> </span>
</span><span class='line'><span class="kt">int</span> <span class="n">main</span><span class="p">()</span>
</span><span class='line'><span class="p">{</span>
</span><span class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">"Hello world!"</span><span class="p">);</span>
</span><span class='line'> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>
<p>验证了,把python版本降到2.7.6就可以正常generate了。</p>
<p>WTF!</p>
<p>UPDATE: 怎么感觉 ubuntu 比 windows 更难弄呢? bundle 无法安装,ruby 源有问题,网络线路……唉……</p>
]]></content>
</entry>
</feed>