-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrss.xml
executable file
·199 lines (160 loc) · 21.2 KB
/
rss.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
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>go for it</title><link>http://nicebug.github.io/</link><description>my blog</description><atom:link href="http://nicebug.github.io/rss.xml" type="application/rss+xml" rel="self"></atom:link><language>zh_cn</language><lastBuildDate>Fri, 24 Feb 2017 07:26:25 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Use Unity3d Profiler Basic</title><link>http://nicebug.github.io/posts/use-unity3d-profiler-basic/</link><dc:creator>damonhu</dc:creator><description><div><h3>使用Unity3d Profiler进行性能优化---基础篇</h3>
<p>初到项目组,还是应该做一些有特色的东西,于是想到除了在功能上多做支持外,必须在专项上给到一定的支持,
正好这个时候项目组还是很关注客户端性能的,自然的就接手这一块东西了。</p>
<p>以前对客户端性能的了解不算太多,而我们的游戏采用unity3d进行的开发,刚接手这块东西,自然就会想到是否引擎上有自带
的支持工具,简单一搜一大堆的Profiler介绍,于是便从Profiler着手开始学习和进行性能优化。</p>
<p>以下简单总结下这几日的使用心得和一些注意事项:</p>
<h4>1.使客户端支持Profiler性能调优</h4>
<p>要想使得客户端能够直接使用Profiler进行调优,那么在编译客户端的时候必须勾选<code>development</code>选项,如果是自行封装的命令行编译
也可在其中加上相应的选项以支持development。</p>
<h4>2.通过development版本进行性能版本收集与分析</h4>
<p>使用android真机连接profiler进行性能分析时,需要先执行<code>adb forward tcp:54999 localabstract:Unity-进程名</code>,执行成功后,
运行游戏,运行profiler,如果没问题就可以看到profiler收集到的性能数据了</p>
<h4>3.关注的数据</h4>
<p>在profiler中我们通常关注cpu,render,memory,观察游戏场景中的曲线走势图,选择游戏中的某点查看该点对应的函数执行,贴图信息。
但需要注意profiler不能往回查看以前的信息,不过我们可以在收集到疑似问题点后,点击<code>record</code>暂停纪录,然后分析疑似问题点。
当然比较方便的是直接开启两个profiler对比同一场景中的函数运算,场景贴图信息。
设置开启两个unity的方法:<code>Edit</code>-&gt;<code>preference</code>-&gt;<code>open project dialog always</code>。</p></div></description><category>u3d</category><guid>http://nicebug.github.io/posts/use-unity3d-profiler-basic/</guid><pubDate>Wed, 15 Apr 2015 13:23:36 GMT</pubDate></item><item><title>learning web.py</title><link>http://nicebug.github.io/posts/learning-webpy/</link><dc:creator>damonhu</dc:creator><description><div><h3>web.py学习笔记</h3>
<p>由于后台的几个需求,需要给测试同学构造gm指令以方便测试,思来想去还是搭建个快速的webserver来方便测试同学,django太庞大,tornado不大熟悉,别人介绍了下<a href="http://webpy.org/">web.py</a>,而且也不需要安装一大堆的第三方依赖库(原谅楼主有时候在服务器上不喜欢装第三方库的臭毛病吧),甚至把web.py打包后都不需要额外安装任何东西。简单看了下web.py的文档,感觉还是入手还是比较容易。</p>
<p>工程文档目录结构:</p>
<pre class="code literal-block"><span></span>main
|---- conf (工程配置文件)
|---- static (js,图片等)
|---- template (html文件)
|---- web (web.py的库文件)
|---- config.py (目录,密码等配置)
|---- index.py (路由文件)
</pre>
<p>接着就可以开始coding,在web.py中需要指定url路由,当url请求中包含相应关键字时则跳转到相应的class中进行处理。</p>
<pre class="code literal-block"><span></span><span class="n">urls</span> <span class="o">=</span> <span class="p">(</span>
<span class="s1">'/favicon.ico'</span><span class="p">,</span><span class="s2">"Ico"</span><span class="p">,</span>
<span class="s1">'/about'</span><span class="p">,</span> <span class="s2">"About"</span><span class="p">,</span>
<span class="s1">'/list_(.*)'</span><span class="p">,</span> <span class="s2">"Script"</span><span class="p">,</span>
<span class="s1">'/bin_upload(.*)'</span><span class="p">,</span> <span class="s2">"Upload"</span><span class="p">,</span>
<span class="s1">'/changetime(.*)'</span><span class="p">,</span> <span class="s2">"ChangeTime"</span><span class="p">,</span>
<span class="s1">'/(.*)'</span><span class="p">,</span><span class="s1">'Index'</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">render</span> <span class="o">=</span> <span class="n">web</span><span class="o">.</span><span class="n">template</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="s1">'template/'</span><span class="p">)</span>
</pre>
<p>以下以about跳转为例:</p>
<pre class="code literal-block"><span></span><span class="k">class</span> <span class="nc">Upload</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">POST</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kw</span><span class="p">):</span>
<span class="c1"># save a file to disk</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">web</span><span class="o">.</span><span class="n">input</span><span class="p">(</span><span class="nb">file</span><span class="o">=</span><span class="p">{})</span>
<span class="c1">#print "bintag, filename:", x.bintag, x.file.filename</span>
<span class="k">if</span> <span class="n">x</span><span class="o">.</span><span class="n">bintag</span> <span class="o">==</span> <span class="s2">""</span> <span class="ow">or</span> <span class="n">x</span><span class="o">.</span><span class="n">file</span><span class="o">.</span><span class="n">filename</span> <span class="o">==</span> <span class="s2">""</span><span class="p">:</span>
<span class="k">return</span> <span class="s2">"&lt;script type=</span><span class="se">\"</span><span class="s2">text/javascript</span><span class="se">\"</span><span class="s2">&gt;alert(</span><span class="se">\"</span><span class="s2">参数输入不正确,请检查参数!</span><span class="se">\"</span><span class="s2">); </span><span class="se">\</span>
<span class="s2"> parent.location.href= parent.location.href;&lt;/script&gt;"</span>
</pre>
<p><strong>list_resconv.html</strong></p>
<pre class="code literal-block"><span></span> <span class="p">&lt;</span><span class="nt">form</span> <span class="na">id</span><span class="o">=</span><span class="s">"upload"</span> <span class="na">action</span><span class="o">=</span><span class="s">"bin_upload"</span> <span class="na">method</span><span class="o">=</span><span class="s">"POST"</span> <span class="na">enctype</span><span class="o">=</span><span class="s">"multipart/form-data"</span> <span class="na">target</span><span class="o">=</span><span class="s">"ifm"</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">fieldset</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">legend</span><span class="p">&gt;</span>bin上传路径:<span class="p">&lt;/</span><span class="nt">legend</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">"form-group"</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">"tag"</span> <span class="na">class</span><span class="o">=</span><span class="s">"col-sm-2 control-label"</span><span class="p">&gt;</span>bin档目录名:<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"text"</span> <span class="na">id</span><span class="o">=</span><span class="s">"bintag"</span> <span class="na">name</span><span class="o">=</span><span class="s">"bintag"</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">"form-group"</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">label</span> <span class="na">for</span><span class="o">=</span><span class="s">"name"</span> <span class="na">class</span><span class="o">=</span><span class="s">"col-sm-2 control-label"</span><span class="p">&gt;</span>bin文件:<span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">"file"</span> <span class="na">id</span><span class="o">=</span><span class="s">"fileselect"</span> <span class="na">name</span><span class="o">=</span><span class="s">"file"</span> <span class="na">title</span><span class="o">=</span><span class="s">"choose a file"</span> <span class="na">onchange</span><span class="o">=</span><span class="s">"this.form.submit();"</span><span class="p">&gt;</span>
<span class="c">&lt;!--&lt;p class="help-block"&gt;要上传的bin文件.&lt;/p&gt;--&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="c">&lt;!--&lt;div id="filedrag"&gt;or drop the file here&lt;/div&gt;--&gt;</span>
<span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">fieldset</span><span class="p">&gt;</span>
<span class="p">&lt;/</span><span class="nt">form</span><span class="p">&gt;</span>
</pre>
<p>当POST请求跳转到bin_upload时,则跳转到Upload进行相应的处理,Upload中处理接收的参数,进行后台逻辑处理。如果需要将处理后的数据返回前台,通常使用render来处理返回的数据<code>render.htmlfilename(parms)</code>的方式。</p></div></description><category>web.py</category><guid>http://nicebug.github.io/posts/learning-webpy/</guid><pubDate>Thu, 05 Feb 2015 03:49:39 GMT</pubDate></item><item><title>markdown syntax</title><link>http://nicebug.github.io/posts/markdown-syntax/</link><dc:creator>damonhu</dc:creator><description><div><!--
::最后一次在成都测试组KM吧发文了
-->
<p>想写文章但一直纠结于文章的排版?屌丝哪有那么多时间在排版上纠结,于是试试最近比较火的<code>markdown</code>吧,从此告别各种一级标题,二级标题各种纠结的排版。</p>
<p>Markdown的目标是实现[易读易写]。</p>
<p>可读性,无论如何,都是最重要的。一份使用 Markdown 格式撰写的文件应该可以直接以纯文本发布,并且看起来不会像是由许多标签或是格式指令所构成。Markdown语法受到一些既有 text-to-HTML的影响,包括Setext、atx、Textile、reStructuredText、Grutatext 和EtText,而最大灵感来源其实是纯文本电子邮件的格式。</p>
<h2>区块元素</h2>
<h3>标题</h3>
<p>标题就是word中我们经常看到的标题1...,是文档的必备元素。以下为各级标题的效果展示和基础语法。</p>
<h2>标题1</h2>
<pre class="code literal-block"><span></span># 标题1
</pre>
<h3>标题2</h3>
<pre class="code literal-block"><span></span>## 标题2
</pre>
<h6>标题6</h6>
<pre class="code literal-block"><span></span>###### 标题6
</pre>
<h6># 标题7</h6>
<pre class="code literal-block"><span></span>####### 标题7;没有标题7了,该格式无效
</pre>
<h3>区块引用</h3>
<p>Markdown标记区块引用类似email中用<code>&gt;</code>的引用方式。如果你还熟悉在 email 信件中的引言部分,你就知道怎么在 Markdown 文件中建立一个区块引用,那会看起来像是你自己先断好行,然后在每行的最前面加上<code>&gt;</code></p>
<blockquote>
<p>markdown syntax
markdown2
markdown 3</p>
</blockquote>
<pre class="code literal-block"><span></span>&gt; markdown syntax
&gt; markdown2
&gt; markdown 3
</pre>
<p>区块引用可以嵌套(例如:引用内的引用),只要加上不同数量的<code>&gt;</code>即可。</p>
<blockquote>
<p>markdown syntax</p>
<blockquote>
<p>markdown2
</p>
</blockquote>
</blockquote>
<pre class="code literal-block"><span></span>&gt; markdown syntax
&gt; &gt; markdown2
</pre>
<h3>列表</h3>
<p>Markdwon支持有序和无序两种列表。</p>
<p>无序列表使用星号、加号或减号作为列表标记:</p>
<ul><li>列表1</li>
<li>列表2</li>
<li>列表3</li>
</ul><pre class="code literal-block"><span></span>* 列表1
* 列表2
* 列表3
</pre>
<p>有序列表使用数字加英文句点的方式:</p>
<ol><li>有序1</li>
<li>有序2</li>
<li>有序3</li>
</ol><h3>代码区块</h3>
<p>Here is an example of python:</p>
<pre class="code literal-block"><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="k">print</span> <span class="s2">"hello world"</span>
</pre>
<h3>分隔线</h3>
<p>在一行中使用三个以上的星号,建号,底线来建立分隔线。</p>
<hr><hr><pre class="code literal-block"><span></span>-------------------
**************
</pre>
<h2>区段元素</h2>
<h3>链接</h3>
<p>Markdown 支持两种形式的链接语法: 行内式和参考式两种形式。不管是哪一种,链接文字都是用 [方括号] 来标记。</p>
<h4>行内式</h4>
<p>This is <a href="http://www.oa.com/" title="tips">OA</a> website.</p>
<pre class="code literal-block"><span></span>This is [OA](http://www.oa.com/ "tips") website.
</pre>
<h4>参考式</h4>
<p>This is <a href="http://www.oa.com/" title="tips">OA</a> website.</p>
<pre class="code literal-block"><span></span>This is [OA] [1] website.
[1]: http://www.oa.com/ "tips"
</pre>
<h3>强调文字</h3>
<p>Markdown使用星号(<code>*</code>)和底线(<code>_</code>)作为强调字词的符号。
<em>this is markdown</em></p>
<pre class="code literal-block"><span></span>*this is markdown*
</pre>
<p><strong>this is markdown too</strong></p>
<pre class="code literal-block"><span></span>**this is markdown too**
</pre>
<p>本文只是markdown一些常用语法的小科普,更多详细内容请自行脑补。
<a href="http://zh.wikipedia.org/wiki/Markdown" title="markdown维基百科">Markdown</a>
<a href="http://maxiang.info/" title="比较有意思的插件">马克飞象</a></p></div></description><category>markdown</category><guid>http://nicebug.github.io/posts/markdown-syntax/</guid><pubDate>Tue, 24 Jun 2014 14:46:28 GMT</pubDate></item><item><title>find all same file and replace then</title><link>http://nicebug.github.io/posts/find-all-same-file-and-replace-then/</link><dc:creator>damonhu</dc:creator><description><div><p>在linux下查找同名文件,并进行替换的一小点总结,find命令超过我的预期。</p>
<table class="codetable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="http://nicebug.github.io/posts/find-all-same-file-and-replace-then/#rest_code_5fb775533f56445bacad185ca34209b6-1">1</a></pre></div></td><td class="code"><pre class="code bash"><a name="rest_code_5fb775533f56445bacad185ca34209b6-1"></a>find <span class="si">${</span><span class="nv">WORK_HOME</span><span class="si">}</span> -name <span class="s2">"</span><span class="si">${</span><span class="nv">filename</span><span class="si">}</span><span class="s2">"</span> -type f <span class="p">|</span> xargs -i cp -rf <span class="si">${</span><span class="nv">filename</span><span class="si">}</span> <span class="o">{}</span>
</pre></td></tr></table></div></description><guid>http://nicebug.github.io/posts/find-all-same-file-and-replace-then/</guid><pubDate>Thu, 08 May 2014 09:56:09 GMT</pubDate></item></channel></rss>