-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
555 lines (409 loc) · 109 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
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>SERENDIPITY</title>
<link href="/atom.xml" rel="self"/>
<link href="http:/"/>
<updated>2020-07-24T16:33:26.333Z</updated>
<id>http:/</id>
<author>
<name>Tricia</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>车票终究会带我走</title>
<link href="http:/2020/07/24/%E8%BD%A6%E7%A5%A8%E7%BB%88%E7%A9%B6%E4%BC%9A%E5%B8%A6%E6%88%91%E8%B5%B0/"/>
<id>http:/2020/07/24/车票终究会带我走/</id>
<published>2020-07-24T06:41:15.000Z</published>
<updated>2020-07-24T16:33:26.333Z</updated>
<content type="html"><![CDATA[<p>2020过去了一半,毕业一年多,研究生拟录取过了两个多月,离职也过去了一个多月。这段时间有没有收获呢,说多也多,说少也少,甚至觉得什么也没沉淀下来。大部分时间还是处于一个迷茫的状态,始终会有peer pressure,也不知道是不是同龄人的普遍的现状。</p>
<p><br></p>
<p>上半年复工后的三个月自己做了大量的学习积累,在石墨开了文档记录每天的学习总结。三月份开了一个公众号,用于积累用户体验设计方向的经验,目的其实很功利,为了以后面试展示经历更方便。平时没什么娱乐活动,也不爱看剧和综艺,每天下班回来就看看文章,写写文字。因为工作能积累到的东西确实是太少太慢了,所以自己再不沉淀些什么就会被行业淘汰。傻傻地觉得只要让自己忙起来,就可以跟上大家的步伐了。四月下旬和青柚准备启动一个新的项目,在五月份正式投入设计开发。巧的是五月初浙大公布了研究生复试名单,因此五月的前半个月自己是个多线程的状态,工作+复试准备+青柚的项目推进。自己还是比较幸运吧,最终由于我复试成绩是第二名,所以综合成绩直接冲到了前面,拟录取了。</p>
<p><br></p>
<p>有时候还会常常想起2018年的时候朋友圈转发了浙大孙凌云教授在阿里UCAN大会的演讲,不敢相信2年后我就加入了他的实验室,2018年在大会上介绍的成果,就是我现在参与的项目组的项目。对于自己来说,回到校园的意义到底有多大?可能等待着我的更多的是挑战吧,学术研究、论文、专利等等的压力是和工作中的压力不同的,工作中为了达到岗位目标,可以在考虑相关因素前提下和相关职能提需求,而在学校做项目,更多强调的是互相配合,这里没有明显的绩效指标,感觉其实是更难办的。</p>
<p><br></p>
<p>虽然毕业一年多来工作和复习都比较拼,但还是免不了多愁善感的时候,自己这种情感真的很讨厌!前几天在网上看到大学毕业舍友分别的视频,印象很深的一句话是:</p>
<blockquote>
<p>“以后不知道什么时候才能再见,那个时候你有新的朋友,我也有了新的朋友,而我们只能聊过去的事。”</p>
</blockquote>
<p><br>缘分和感情是具有时效性的东西,然而却是不得不接受的事实。我们看到对方的最后一眼始终是ta的背影,而对方的眼前却是那张会带ta前往下一站的车票。每个人终究是在做自己的事,会离开,会重新启程,也会遗忘,就连车票用的都是会褪去的热敏材料。在这方面,我很羡慕能够活在当下的人,享受当下、及时行乐。真希望自己也能尽快热爱上现在的生活,就像喜欢过去那几年一样。即使午后不再会坐在图书馆门口的草坪休息,夜晚不再会坐在南操看星星连成线,更不会在北操看台聊心事。</p>
<p><br></p>
<p>以前一直以为我们看到的就是真实的,慢慢地才明白我们看到的只是对方想让我们看到的样子。每个人都有不为人知的暗伤,或者是美好。所以我总是安慰自己大家内心都会有一块脆弱的地方,只是他们从不暴露出来,这样自己也会学着更坚强一点了。毕业那段时间一直在听李健的《车站》,大概成长也不过就是一次一次地在车站来又去吧,车票终究会带我走,时间终究会带我走。</p>
<p><br></p>
<p>文章的标题选自学唱团一次活动的录音《背叛就是投向未知》中的一句歌词。人生中的每一段旅途都是从赶路开始的,我也依然保留着乘车前取一张票的习惯,只有这样我才不是一个人离开,也不是一个人启程,车票会带我走,去到我的下一个站台。</p>
<p><br></p>
<p>昨天在知乎上看到一个问题:“程序员的悲哀是什么?”,其中有个回答这么说道:“大学毕业了很多年,还有种初入社会的疏离感。”自己也确实不是很喜欢社交的人,与其和没那么熟的新朋友社交,我更愿意享受一个人的时光,所以好几次一个人出去,都会被店里的人问道你怎么一个人来。工作合租的时候,自己也总是呆在自己的屋子里,觉得特别自由。于是有时候自我复盘,就会觉得是不是自己还总是呆在原来的舒适圈里呢。</p>
<p><br></p>
<p>今天是毕业的第401天,我依然想念着学校的朋友们,依然记得最后一次面对面的模样,可依然还是是想着想着就不争气地红了眼,但也一直在学着变得更独立和强大,学着接受新的生活。没有一场相遇本身强壮到能使我们不惧别离,但总有一场重逢等在前方值得我们为之努力。</p>
<p><br></p>
<center><img src="https://ftp.bmp.ovh/imgs/2020/07/def7a93dda37fa8b.jpg" style="zoom:20%;"></center>
]]></content>
<summary type="html">
<p>2020过去了一半,毕业一年多,研究生拟录取过了两个多月,离职也过去了一个多月。这段时间有没有收获呢,说多也多,说少也少,甚至觉得什么也没沉淀下来。大部分时间还是处于一个迷茫的状态,始终会有peer pressure,也不知道是不是同龄人的普遍的现状。</p>
<p><br
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="daily" scheme="http:/tags/daily/"/>
</entry>
<entry>
<title>自扒谱 | Last Dance小提琴谱</title>
<link href="http:/2020/02/11/%E8%87%AA%E6%89%92%E8%B0%B1-last-dance%E5%B0%8F%E6%8F%90%E7%90%B4%E8%B0%B1/"/>
<id>http:/2020/02/11/自扒谱-last-dance小提琴谱/</id>
<published>2020-02-11T06:54:30.000Z</published>
<updated>2020-02-11T07:08:39.928Z</updated>
<content type="html"><![CDATA[<p>最近《想见你》看上头了,自己扒的Last Dance提琴谱,有些装饰音在练习的时候酌情加,酌情减。第二段反复的时候铺子里是多反复了几个小结,问题不大,听一下就知道从哪开始了,这里就不细说了。</p>
<h2 id="视频"><a href="#视频" class="headerlink" title="视频"></a>视频</h2><p>自己练习的视频已经上传bilibili👇:</p>
<center><iframe height="500" width="600" src="//player.bilibili.com/player.html?aid=87980635&cid=150300859&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe></center>
<p><br></p>
<h2 id="谱子"><a href="#谱子" class="headerlink" title="谱子"></a>谱子</h2><p>写谱子的工具用的是Sibelius,写谱很好上手,其他功能暂时未接触,这里把扒好的谱子贴上来👇:</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/02/11/Ph3J2fZjmnwEOzu.png" style="zoom:60%;"></center>
<center><img src="https://i.loli.net/2020/02/11/yKd8BaTvRkuFEjo.png" style="zoom:60%;"></center>]]></content>
<summary type="html">
<p>最近《想见你》看上头了,自己扒的Last Dance提琴谱,有些装饰音在练习的时候酌情加,酌情减。第二段反复的时候铺子里是多反复了几个小结,问题不大,听一下就知道从哪开始了,这里就不细说了。</p>
<h2 id="视频"><a href="#视频" class="head
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="Music" scheme="http:/tags/music/"/>
</entry>
<entry>
<title>C4D学习记录(二)</title>
<link href="http:/2020/01/23/c4d%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95%EF%BC%88%E4%BA%8C%EF%BC%89/"/>
<id>http:/2020/01/23/c4d学习记录(二)/</id>
<published>2020-01-23T06:20:21.000Z</published>
<updated>2020-01-26T15:24:17.918Z</updated>
<content type="html"><![CDATA[<p>##0122</p>
<p>模仿纪念碑谷风格,这次主要是建模和渲染设置中有些复杂的地方,材质和灯光比较简单。因为是2.5D风格,所以不需要讲究透视,摄像机那边是开超长焦。在全局光照那边的设置使得物体有点迷散发光的效果。</p>
<p>先放上最终效果:</p>
<center><img src="https://i.loli.net/2020/01/23/9Lxpmdo5y4NK1Fj.png" style="zoom:60%;"></center>
<h2 id="0126"><a href="#0126" class="headerlink" title="0126"></a>0126</h2><p>bilibili金牌小电视,表情捏起来用了一些比较复杂的参数,先放效果图:</p>
<center><img src="https://i.loli.net/2020/01/26/APOQgYFusDS6hyM.png" style="zoom:60%;"></center>]]></content>
<summary type="html">
<p>##0122</p>
<p>模仿纪念碑谷风格,这次主要是建模和渲染设置中有些复杂的地方,材质和灯光比较简单。因为是2.5D风格,所以不需要讲究透视,摄像机那边是开超长焦。在全局光照那边的设置使得物体有点迷散发光的效果。</p>
<p>先放上最终效果:</p>
<center
</summary>
<category term="Design" scheme="http:/categories/design/"/>
<category term="C4D" scheme="http:/tags/c4d/"/>
</entry>
<entry>
<title>C4D学习记录(一)</title>
<link href="http:/2020/01/13/c4d%E5%AD%A6%E4%B9%A0%E8%AE%B0%E5%BD%95%EF%BC%88%E4%B8%80%EF%BC%89/"/>
<id>http:/2020/01/13/c4d学习记录(一)/</id>
<published>2020-01-13T05:47:32.000Z</published>
<updated>2020-01-14T01:43:55.251Z</updated>
<content type="html"><![CDATA[<p>做的第一个东西是想实现奶酪的效果。主要熟悉了左侧工具栏里的点、边、面模式以及右上角界面中的雕刻变面板里的各种工具。</p>
<p><br></p>
<h2 id="建模"><a href="#建模" class="headerlink" title="建模"></a>建模</h2><h3 id="物体基本变形工具"><a href="#物体基本变形工具" class="headerlink" title="物体基本变形工具"></a>物体基本变形工具</h3><p>针对一个物体,首先要<code>转为可编辑对象</code>,然后才能利用<code>点模式</code>、<code>边模式</code>、<code>面模式</code>使用创建工具中的各种方法。</p>
<center><img src="https://i.loli.net/2020/01/14/9xW1B5cUNlm4EAC.png" style="zoom:20%;"></center>
<p><br></p>
<p>👆创建工具中的这些工具还要再多用用,一段时间不玩很快就忘了是干什么的。</p>
<p>面模式全选右键给对象增加分段(细分)。</p>
<h3 id="雕刻面板"><a href="#雕刻面板" class="headerlink" title="雕刻面板"></a>雕刻面板</h3><p>右上角界面下拉框中进入。雕刻面板中的主要工具为右侧垂直列表中的这些工具,用于在当前物体上做一些凹陷凸起、挤压切割等效果的建立。设置面板中可调节笔刷大小和压力数值,鼠标中键可快捷调节。</p>
<p>在雕刻面板中点击细分,可以让对象边缘变得平滑。</p>
<p>下面这个“E”的变形用的就是创建工具中循环/路径切割+挤压做成的立体“E”,然后在雕刻面板中模拟出奶酪凹陷挤压的效果。</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/01/14/7CEQuWohUzdYDGk.png" style="zoom:25%;"></center>
<p><br></p>
<h2 id="渲染"><a href="#渲染" class="headerlink" title="渲染"></a>渲染</h2><p>###材质</p>
<center><img src="https://i.loli.net/2020/01/13/liDcuAs1F8ShJzj.png" style="zoom:35%;"></center><br><br>材质需要多调整参数使得效果更符合预期。<br><br>###灯光<br><br><center><img src="https://i.loli.net/2020/01/13/Jya15pNrVgPjLdI.png" style="zoom:20%;"></center><br>调灯光比较费力,主要是电脑性能跟不上,一调就卡,甚至整个画面变成线型轮廓,🤯。<br><br>一边调节一边渲染,看到效果图有不好的地方立即停止渲染继续调整。需要注意的是如果布景比较暗的话,在布景前物体后加一个灯光提亮。<br><br>最后成果如下:<br><br><center><img src="https://i.loli.net/2020/01/13/t5aykILbsmZ6TOv.jpg" style="zoom:40%;"></center>
]]></content>
<summary type="html">
<p>做的第一个东西是想实现奶酪的效果。主要熟悉了左侧工具栏里的点、边、面模式以及右上角界面中的雕刻变面板里的各种工具。</p>
<p><br></p>
<h2 id="建模"><a href="#建模" class="headerlink" title="建模"></a>建模<
</summary>
<category term="Design" scheme="http:/categories/design/"/>
<category term="C4D" scheme="http:/tags/c4d/"/>
</entry>
<entry>
<title>好久不见</title>
<link href="http:/2020/01/08/%E5%A5%BD%E4%B9%85%E4%B8%8D%E8%A7%81/"/>
<id>http:/2020/01/08/好久不见/</id>
<published>2020-01-08T08:44:06.000Z</published>
<updated>2020-01-08T12:46:24.620Z</updated>
<content type="html"><![CDATA[<p>18年10月份的时候七牛云的测试域名被回收了,自己的域名没有备案,所以图片外链都失效了,因为那段时间自己根本没时间管这些事,所以一直一直没有整理博客,这两年来我都在干什么,这篇文章我来好好捋一下。</p>
<p><br></p>
<h1 id="2018年"><a href="#2018年" class="headerlink" title="2018年"></a>2018年</h1><p>18年1月份的时候,我花了整一个寒假+开学一个月的时间整理出了我第一份作品集,那时候是大三下学期,准备春天的时候找实习用。</p>
<p>17年底自己就大致了解过考研院校的信息,当时已经决定往交互设计方向读,因为本科是计算机出生,所以交叉学科上自己很有优势。但自己除了南邮小程序的项目外,实战经验太少,而大三下学期对考研复习来说尚早,于是想在这个学期出去实习,一是为了考研复试丰富个人经历,二是如果没考上还能为找工作积累经验。所以在18年3月份的时候,先后收到了36kr、京东的实习offer,但由于学校层面的原因,没能去成北京,所以想着要不在南京找家公司实习吧。于是3月份紧接着又给扇贝投了简历,做了笔试,现场面试后拿了offer,很快入职了。因为大三下的课已经不多了,所以除了一定要去的实验课外,我基本都是翘课去实习,还好公司在徐庄,地铁30分钟就可以到。</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/01/08/H2YORUd5PpTZz3B.png" style="zoom:67%;"></center>
<p><br></p>
<p>这段时间基本上是白天实习,晚上回宿舍看考研英语的视频,背单词,周末出去上专业课的班(当时学了一下快题的手绘)。</p>
<p>之后春招开始了,投了几家公司的交互设计,投得不多,放弃了携程和京东的面试(都要去上海面),只参加了腾讯的面试。因为自己并没有做什么准备,也不是真打算接下来实习,计划是7月份正式投入考研复习的,所以春招纯粹想涨点面试经验。于是歪打正着地一周内跑了两次杭州,面了腾讯的初试复试,从wxg莫名其妙地分到了ieg的光子。</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/01/08/cFiUaxSPDp6EJfk.png" style="zoom:80%;"></center>
<p><br></p>
<p>大三下基本就保持着“我不去上课就一定会点名”的趋势走到了尽头,没想到翘了那么多课的我还拿了二等奖学金。7月份,我报了考研专业课的快题班,去绩溪上了25天的课,8月回到学校教学楼复习,9月开始常驻图书馆。</p>
<p>春招如火如荼的时间我窝在图书馆闷头复习,等于是没有参加。因为苏宁离学校近,所以只参加了苏宁的面试,10月份拿了校招生的交互设计offer,不过鉴于苏宁的风评和薪资,两方也没签就拒了,都怪我当时复习的太自信。</p>
<p>所以回学校继续复习,一直到12月,我又来了一次杭州。</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/01/08/KXsM6TLVozveF5U.png" style="zoom:67%;"></center>
<p><br></p>
<h1 id="2019年"><a href="#2019年" class="headerlink" title="2019年"></a>2019年</h1><p>也不知道为什么一直对自己考研特别自信,直到2月份成绩出来,仅仅是去年学硕复试的最低分,这才意识到严重性。重新整理作品集,参加春招。</p>
<p>3月份,拿了北京某司和现任公司的offer,挂了字节跳动商业化UED。</p>
<p>4月,去公司实习,实习期间实在忙,放弃了流利说和米哈游继续面试的机会。</p>
<p>5月,去了北京,去了紫金山露营看日出,去了很多大楼楼顶顶,去了羊山山顶。也被抽中了毕设中期答辩,降重降到凌晨三点。也看了毕业晚会,和一段人生说再见。</p>
<p><br></p>
<center><img src="https://i.loli.net/2020/01/08/6wTseJ4ajBqPXcu.png" alt="image.png" style="zoom:40%;"></center>
<p><br></p>
<p>6月,我毕业了。</p>
<p><br></p>
<p><center><img src="https://i.loli.net/2020/01/08/cACLJsB8z95q6VE.jpg" style="zoom:50%;"><center></center></center></p>
<p><br></p>
<p>7月,入职。人生最难熬最痛苦的几个月开始了。待遇还行,政府对应届生的补贴也很给力,租房上没有压力。可是我拥抱了变化,没能做成本以为要做的SaaS产品,去维护了一个历史沿革很长的老产品,瞬间没了激情。罗曼罗兰曾经说过,世界上只有一种真正的英雄主义,那就是在认识生活的真相后依然热爱生活。我想,这个世界上本身也没有多少英雄吧。</p>
<p>毕业后的这半年见了几回大学的同学,常常会怀念以前读书的日子。那时候没有kpi压力,没有考核和职级答辩的压力,只要一门心思栽进自己喜欢的事情里就好了,可以从早到晚的搞,可以翘课搞,可以熬夜搞,也可以忙里偷闲地搞,还可以在除夕大年初一乐此不疲地搞。</p>
<p><br></p>
<h1 id="2020年"><a href="#2020年" class="headerlink" title="2020年"></a>2020年</h1><p>在创建这篇文档前,本以为这两年会写的很长很长,没想到写着写着竟变成了蜻蜓点水,一笔带过。毫无疑问这两年是我经历最多的两年,接受了很多,改变了很多,也成长了很多。从一个地方去到另一个地方,从一群人到一个人。不知道现在是算离梦想越来越近,还是越来越远,没有理想的人不伤心啊。</p>
<blockquote>
<p>我和这个世界不熟。</p>
<p>这并非是我迷茫的原因。</p>
<p>我依旧有很多方向,</p>
<p>往前走,回头望,会跳跃,会停息。</p>
<p> ——北岛《我和这个世界不熟》</p>
</blockquote>
<p>时隔两年,好久不见。</p>
]]></content>
<summary type="html">
<p>18年10月份的时候七牛云的测试域名被回收了,自己的域名没有备案,所以图片外链都失效了,因为那段时间自己根本没时间管这些事,所以一直一直没有整理博客,这两年来我都在干什么,这篇文章我来好好捋一下。</p>
<p><br></p>
<h1 id="2018年"><a href
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="daily" scheme="http:/tags/daily/"/>
</entry>
<entry>
<title>记和京东的三面之交</title>
<link href="http:/2018/04/13/interview-experience/"/>
<id>http:/2018/04/13/interview-experience/</id>
<published>2018-04-13T05:18:41.000Z</published>
<updated>2020-01-08T08:42:38.801Z</updated>
<content type="html"><![CDATA[<p>今年3月7日的时候顺利拿到了北京京东总部京东商城-居家生活事业部-产品研发部的offer,这是我人生第三次面试,拿到的第二个实习offer,本来计划是一直实习到大三下学期结束+一个暑假的,不过学校层面的原因最后放弃了这个机会,在这记录一下面试过程。<br>现在正在杭州等腾讯ieg的复试结果,所以时间正好空,就回忆回忆我和京东的这三面之交。<br>寒假花了点时间准备交互作品集,不过开学之后作品集的内容还没有很完善,想到pm和交互的工作职责有些穿插,就先投了pm的岗。<br>某天晚上接到一个广州的手机号,虽然没想到会是北京京东打来的,不过考虑到最近会频繁有电话,所以接了,对方说简历比较优秀,所以安排面试,加了对方微信,约了第二天晚上8点。当时以为对方是hr,没想到就是居家生活部的pm。</p>
<h3 id="一面之前"><a href="#一面之前" class="headerlink" title="一面之前"></a>一面之前</h3><p>一面前翻了下这位pm的朋友圈,一个毕业两年,对工作对产品对生活依然激情满满的人,每年都会看很多书,善于总结。同时也从他的朋友圈了解了一下京东大厦的工作环境嘿嘿。</p>
<h3 id="一面时"><a href="#一面时" class="headerlink" title="一面时"></a>一面时</h3><p>当时一面聊了五十分钟,有点口干舌燥,不过聊得感觉都不错。大部分都是问我简历上的项目和获奖情况,所以答得都很顺利。在面试前他还看了看南邮小程序,在微信上问了我小程序的登录机制是基于怎样的考虑,我和他说了之后,他回复我“谢谢,学习了”,当时有点懵逼,这种语气不像面试官啊233。<br>然后除了项目和比赛,还问了下平时看的专业课以外的书,我一时也不知道说哪本好,看了眼书架就挑了《解忧杂货店》说了,大致说了下书的内容和传达的情感。<br>最后还问了我对京东的了解,我说感觉京东挺有人情关怀的233,看到新闻说刘强东给员工盖了很好的宿舍,看得出对员工很好。<br>能想到的就这么多,说了五十多分钟,最后面试官也很快地告诉我他这关是没问题了,之后产品总监会二面我,然后一面就这样(竟然就这样?!)结束了。</p>
<h3 id="二面时"><a href="#二面时" class="headerlink" title="二面时"></a>二面时</h3><p>二面的产品总监是个北京味儿的汉子,感觉三十多岁的样子,问的问题也挺轻松的。问我有啥爱好,我说摄影啊,然后就问起了我用什么设备和镜头……真的是pm面试的套路吗……是不是就差问我喜不喜欢摇滚了,我还真想说我喜欢british pop music。</p>
<h3 id="三面时"><a href="#三面时" class="headerlink" title="三面时"></a>三面时</h3><p>三面是产品副总监,一个声音听起来就很强势的女强人,是啊,不太聊得来,问了我比赛的项目某个设计是基于怎样的考虑,为什么会想到这样设计,最后可能看到我简历上写的都是负责交互和视觉的工作,所以问了我有没有作品集,我当时有些尴尬,因为作品集还没做完啊,她居然让我发给一面的pm,然后不得不花了一天把项目整理了一下发给了pm,发完没多久,pm就告诉我大概可以了,问我什么时候来……诶,当时还是完全没有被录取的感觉,居然就这样过了?<br>不过后来pm告诉我,三面的面试官以前是做交互的……难怪要看我作品集……</p>
<h3 id="收到offer后"><a href="#收到offer后" class="headerlink" title="收到offer后"></a>收到offer后</h3><p>一面的pm全程都非常好非常友善,还推荐我一个房东直租的微信号,很多京东大厦附近的房源,虽然最后还是没能来京东啦,不过真的很感谢他,是一个非常有工作激情的人。<br>而且他作为一个同样是从实习生转正为正式员工非常能理解我目前经历的事情,尤其在我明确说来不了的时候,还考虑到我退租的房子可以转租给他们另一个武大的实习生。<br>最后,他和我说完,我没有再回复了,不过我打心里是很感谢他的,虽然我没能为他们做什么事,甚至还耗费了他们招聘实习生的成本,不过他给了我学生走入社会之后的一种人性关怀,嗯。</p>
<p>最后他说:</p>
<blockquote>
<p>毕竟我也经历过这个阶段吧,我也挺遗憾的,希望以后有缘江湖见。其实也觉得这个岗位挺适合你的,这边有很多实践的机会,从产品到沟通协调,多多少少都能有提升。</p>
</blockquote>
]]></content>
<summary type="html">
<p>今年3月7日的时候顺利拿到了北京京东总部京东商城-居家生活事业部-产品研发部的offer,这是我人生第三次面试,拿到的第二个实习offer,本来计划是一直实习到大三下学期结束+一个暑假的,不过学校层面的原因最后放弃了这个机会,在这记录一下面试过程。<br>现在正在杭州等腾讯
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="daily" scheme="http:/tags/daily/"/>
</entry>
<entry>
<title>南邮小程序交互&视觉设计</title>
<link href="http:/2018/01/16/%E5%8D%97%E9%82%AE%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%A4%E4%BA%92-%E8%A7%86%E8%A7%89%E8%AE%BE%E8%AE%A1/"/>
<id>http:/2018/01/16/南邮小程序交互-视觉设计/</id>
<published>2018-01-16T11:31:48.000Z</published>
<updated>2020-01-08T05:57:41.934Z</updated>
<content type="html"><![CDATA[<p>更新于2020.1.8:<br>从17年开始,学习和生活似乎都离不开南邮小程序了。从0到1创造出了南邮小程序,从0到10万用户量的增长,改变了我对自身发展方向的思考,给了我很多很多机会,3年过去了,之前开的坑没有填,不过准备写点历程回顾一下。</p>
]]></content>
<summary type="html">
<p>更新于2020.1.8:<br>从17年开始,学习和生活似乎都离不开南邮小程序了。从0到1创造出了南邮小程序,从0到10万用户量的增长,改变了我对自身发展方向的思考,给了我很多很多机会,3年过去了,之前开的坑没有填,不过准备写点历程回顾一下。</p>
</summary>
<category term="Design" scheme="http:/categories/design/"/>
<category term="UE" scheme="http:/tags/ue/"/>
<category term="UI" scheme="http:/tags/ui/"/>
</entry>
<entry>
<title>python实现基于哈夫曼算法的加解密工具</title>
<link href="http:/2017/11/16/python%E5%AE%9E%E7%8E%B0%E5%9F%BA%E4%BA%8E%E5%93%88%E5%A4%AB%E6%9B%BC%E7%AE%97%E6%B3%95%E7%9A%84%E5%8A%A0%E8%A7%A3%E5%AF%86%E5%B7%A5%E5%85%B7/"/>
<id>http:/2017/11/16/python实现基于哈夫曼算法的加解密工具/</id>
<published>2017-11-16T15:49:13.000Z</published>
<updated>2019-11-15T06:29:25.973Z</updated>
<content type="html"><![CDATA[<h2 id="1-写在开头"><a href="#1-写在开头" class="headerlink" title="1.写在开头"></a>1.写在开头</h2><p>本学期程序设计周的题目,利用哈夫曼算法实现了一个加解密的工具。</p>
<p>基本要求:<br>(1) 根据给定的单词字典库,为每个单词配置一个随机数作为权重,利用哈夫曼算法为各单词生成对应的密文,从而构造密码字典;<br>(2) 利用密码字典实现对输入文件的加解密;<br>(3) 界面友好、直观;<br>提高要求:<br>(1) 按照基本要求实现的加解密系统无法抵抗基于单词频度分析的攻击,试设计能够抵御频度分析攻击的基于哈夫曼算法的加解密方法(提示:可以采用多密码字典混合加解密的方法,加密时随机选择某一个密码字典);<br>(2) 当密码字典规模较大时,加解密的性能必然受到影响,试设计好的算法提高加解密的效率。<br>课题理解:<br>一般哈夫曼算法多用于文件、图片的解压缩,但此题目主要是希望我们做一个利用哈夫曼算法做一个加解密的工具。通过构造哈夫曼树,我们可以获得各个英文单词所对应的编码。需要的功能有:从文件导入明文,随机选择一个密码字典对其加密并生成密文,将密文保存到文件。<br>在编写各项功能前,需要自己收集单词字典素材,我选择通过去维基百科找一篇文章,利用正则匹配的方法将所有英文单词匹配下来,再进行去重的方法做了一个密码字典,其中包含了上千个不重复的英文单词。<br>另外需要注意的是,为了保证加密程序的安全性和可靠性,只采用一个字典库是不够的,为了抵御频度攻击,在后期的设计上,应考虑采用多密码字典混合加解密的方法对明密文处理,以获得一个性能优良、安全性高的加解密工具。<br>此程序需要有gui的界面,以达到用户友好地交互功能。<br><br></p>
<h2 id="2-数据结构说明"><a href="#2-数据结构说明" class="headerlink" title="2.数据结构说明"></a>2.数据结构说明</h2><p><img src="https://s2.ax1x.com/2019/11/15/MawaLj.png" alt="image"><br>这里简单罗列了几种程序中用到的数据结构形式。<br>在正则匹配单词生成字典并给单词随机赋权值的时候,单词库是以python中“字典”的数据结构进行存储的。这种数据结构的独特之处在于:字典是一种可变容器模型,且可存储任意类型对象。字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包括在花括号({})中 ,格式如下所示:<br>d = {key1 : value1, key2 : value2 }<br><br><br></p>
<h2 id="3-算法设计"><a href="#3-算法设计" class="headerlink" title="3.算法设计"></a>3.算法设计</h2><p>程序导入了三个模块,分别为<br>HuffmanTree.py,NodeDataIO.py,decode.py。<br>以下对各模块做具体分析。 <br> </p>
<h3 id="3-1HuffmanTree-py模块"><a href="#3-1HuffmanTree-py模块" class="headerlink" title="3.1HuffmanTree.py模块"></a>3.1HuffmanTree.py模块</h3><p><img src="https://s2.ax1x.com/2019/11/15/MawglF.png" alt="image"><br></p>
<h4 id="3-1-1-class-TreeNode"><a href="#3-1-1-class-TreeNode" class="headerlink" title="3.1.1 class TreeNode"></a>3.1.1 class TreeNode</h4><p>用于存储哈夫曼树的节点结构。存储了左孩子、右孩子、字符、权值、编码、父节点等属性。<br></p>
<h4 id="3-1-2-class-HuffmanTree"><a href="#3-1-2-class-HuffmanTree" class="headerlink" title="3.1.2 class HuffmanTree"></a>3.1.2 class HuffmanTree</h4><p>主要功能是构造哈夫曼树,算上类的构造函数<strong>init</strong>,一共有12个方法。<br><strong>nodesToObject(self, nodeList):将字符和对应权值以python的列表结构存储。
</strong>createTree(self, nodeList):用给定的节点列表nodeList 创建哈夫曼树,返回根节点。<br>display(self, root):打开tree.txt文档,为存储哈夫曼树做准备。<br><strong>display(self, root, level = ‘’):使用缩进格式在文件中输出哈夫曼树。
</strong>encode(self, root):给每个树节点相应的编码值。<br>getTree(self):获取以nodeList为节点的哈夫曼树。<br>findNode(self, root, value):获取值为value的节点。<br>__goForAncesstor(self, node, encoding):从叶子结点node开始,回到根节点,同时获取该节点的哈夫曼编码。<br>getCharEncoding(self, value):获取字符value的哈夫曼编码。<br>getCharDecoding(self, encoding):获取编码为encoding的字符。<br>reachAllLeafs(self, root):遍历每个叶子,将每个字符的编码存入字典encodingList。 <br></p>
<h4 id="3-1-3-class-Encoding"><a href="#3-1-3-class-Encoding" class="headerlink" title="3.1.3 class Encoding"></a>3.1.3 class Encoding</h4><p>不包括类的构造函数,有以下三个方法:<br>getStringEncoding(self, string):字符串加密,将明文中的单词与字典encodingList中的单词匹配,然后存入encoding作为密文。<br>getStringDecoding(self, encoding):字符串解密,将密文编码与字典encodingList中的单词对应的编码匹配,转换成明文单词,然后存入字符串string。<br>compare(obj):设置类TreeNode的比较器。 <br></p>
<h3 id="3-2-NodeDataIO-py模块"><a href="#3-2-NodeDataIO-py模块" class="headerlink" title="3.2 NodeDataIO.py模块"></a>3.2 NodeDataIO.py模块</h3><p><img src="https://s2.ax1x.com/2019/11/15/MawhwR.png" alt="image"><br><br>此模块的主要功能是节点信息的读取和存储。<br>class NodeDataIO类的初始化方法里实现的功能是在password dictionary文件夹中随机选择一个密码字典,是为“加密”功能服务的。属性中的fileName1就是随机选择的字典的文件名。<br>__readNextNode(self):从文件中读取下一个结点的信息。<br>getNodes(self):返回文件中所有节点信息构成的列表。<br>SaveNode(self, nodes):将所有节点信息构成的列表存入文件。 <br></p>
<h3 id="3-3-decode-py模块"><a href="#3-3-decode-py模块" class="headerlink" title="3.3 decode.py模块"></a>3.3 decode.py模块</h3><p><img src="https://s2.ax1x.com/2019/11/15/MawcSU.png" alt="image"><br><br>decode.py模块仅仅服务于解密,除了类的初始化方法,其余方法都和NodeDataIO.py模块中的相同。为了在多密码字典加密情况下解密可以一次性找到当时加密的字典,所以要通过该模块的初始化方法中获取到加密时密码字典的文件名。<br></p>
<h3 id="3-4-Dialog-pyw主要执行过程"><a href="#3-4-Dialog-pyw主要执行过程" class="headerlink" title="3.4 Dialog.pyw主要执行过程"></a>3.4 Dialog.pyw主要执行过程</h3><p><img src="https://s2.ax1x.com/2019/11/15/MawsYV.png" alt="image"><br><br></p>
<h2 id="4-详细设计"><a href="#4-详细设计" class="headerlink" title="4.详细设计"></a>4.详细设计</h2><h3 id="4-1-Dialog-pyw核心代码"><a href="#4-1-Dialog-pyw核心代码" class="headerlink" title="4.1 Dialog.pyw核心代码"></a>4.1 Dialog.pyw核心代码</h3><p>dictionary函数用于造单词字典,采用的方法是正则匹配英文文章中的每个英文单词,去重、排序后赋值,值为随机且不重复的2000以内的数值,给密码字典随机命名为 dictionary + random随机值 .txt的形式,为解密选择字典编号服务。</p>
<figure class="highlight applescript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div></pre></td><td class="code"><pre><div class="line">def dictionary(self): </div><div class="line"> f = open(<span class="string">"/Users/zhangchuyue/Desktop/分词+随机权重程序/test.txt"</span>) </div><div class="line"> <span class="keyword">try</span>: </div><div class="line"> <span class="built_in">text</span> = f.<span class="built_in">read</span>() <span class="comment"># 读取整个文件并放入一个字符串变量中 </span></div><div class="line"> <span class="built_in">words</span> = re.findall(r<span class="string">"\b[a-zA-Z]{1,50}\b"</span>, <span class="built_in">text</span>) <span class="comment"># 正则匹配所有英文单词得到一个列表 </span></div><div class="line"> results = [] </div><div class="line"> dictionary = {} </div><div class="line"> value = <span class="number">0</span> </div><div class="line"> li = [i <span class="keyword">for</span> i <span class="keyword">in</span> range(<span class="number">2000</span>)] </div><div class="line"> li1 = random.sample(li, <span class="number">2000</span>) </div><div class="line"> <span class="keyword">for</span> <span class="built_in">word</span> <span class="keyword">in</span> <span class="built_in">words</span>: </div><div class="line"> <span class="literal">result</span> = <span class="built_in">word</span>.lower() <span class="comment"># 将英文单词全部转为小写 </span></div><div class="line"> results.append(<span class="literal">result</span>) </div><div class="line"> results = <span class="built_in">list</span>(<span class="keyword">set</span>(results)) <span class="comment"># 将匹配结果存储在列表里并用set函数去除重复单词 </span></div><div class="line"> results.sort() <span class="comment"># 对列表排序 </span></div><div class="line"> <span class="keyword">for</span> <span class="literal">result</span> <span class="keyword">in</span> results: </div><div class="line"> dictionary[<span class="literal">result</span>] = li1[value] <span class="comment"># 单词为字典的键,随机数为值,作为每个单词的权重 </span></div><div class="line"> value += <span class="number">1</span> </div><div class="line"> <span class="built_in">number</span> = random.randint(<span class="number">100</span>, <span class="number">999</span>) </div><div class="line"> output = open(<span class="string">"/Users/zhangchuyue/Desktop/B15040805张楚月_哈夫曼加解密工具/password dictionary/dictionary%d.txt"</span> % <span class="built_in">number</span>, <span class="string">"w"</span>) </div><div class="line"> print(dictionary) </div><div class="line"> print(<span class="string">"create password dictionary:"</span> + <span class="string">"dictionary%d.txt"</span> % <span class="built_in">number</span>) </div><div class="line"> <span class="keyword">for</span> key <span class="keyword">in</span> dictionary: </div><div class="line"> output.writelines(key + <span class="string">":"</span> + str(dictionary[key]) + <span class="string">"\n"</span>) <span class="comment"># 字典内容写入文件 </span></div><div class="line"> output.close() </div><div class="line"> finally: </div><div class="line"> f.close()</div></pre></td></tr></table></figure>
<p>实例化类NodeDataIO()和HuffmanTree,获得实例对象,用于输出哈夫曼树tree.txt。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">def</span> <span class="title">printTree</span><span class="params">(<span class="keyword">self</span>)</span></span>: </div><div class="line"> io = NodeDataIO() </div><div class="line"> nodeList = io.getNodes() </div><div class="line"> tree = HuffumanTree(nodeList) </div><div class="line"> tree.display(tree.getTree()) </div><div class="line"> os.system(<span class="string">'notepad tree.txt'</span>) </div><div class="line"> <span class="keyword">return</span> io</div></pre></td></tr></table></figure>
<p>def transform(self)用于字符转化为编码形式,实例化类NodeDataIO()和HuffmanTree,获得实例对象,首先在NodeDataIO类中初始化方法随机选择出一个密码字典,然后通过NodeDataIO类中的函数获得节点列表,再调用HuffmanTree类中的函数构造字符和编码的字典,调用HuffmanTree类中的编码函数getStringEncoding(text)进行编码。此函数中的count = io.fileName1[10:13]得到的是所选用的字典文件名的字典编号,用于存储到密文开头,为解密服务。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">def</span> <span class="title">transform</span><span class="params">(<span class="keyword">self</span>)</span></span>: </div><div class="line">io = NodeDataIO() <span class="comment"># 实例化对象</span></div><div class="line"> nodeList = io.getNodes() </div><div class="line"> tree = HuffumanTree(nodeList) </div><div class="line"> encoder = Encoding(tree.encodingList) </div><div class="line"> count = io.fileName1[<span class="number">10</span><span class="symbol">:</span><span class="number">13</span>] <span class="comment"># 将密码字典文件名中的随机三位数编号赋值给count</span></div><div class="line"> <span class="keyword">self</span>.count = count </div><div class="line"> <span class="keyword">if</span>(<span class="keyword">self</span>.encoding[<span class="string">'state'</span>] != <span class="string">'disabled'</span>)<span class="keyword">and</span>(<span class="keyword">self</span>.string[<span class="string">'state'</span>] != <span class="string">'disabled'</span>): </div><div class="line"> <span class="keyword">return</span> </div><div class="line"> elif(<span class="keyword">self</span>.encoding[<span class="string">'state'</span>] == <span class="string">'disabled'</span>)<span class="keyword">and</span>(<span class="keyword">self</span>.string[<span class="string">'state'</span>] != <span class="string">'disabled'</span>): </div><div class="line"> text = <span class="keyword">self</span>.string.get(<span class="string">'0.0'</span>, <span class="keyword">END</span>).strip(<span class="string">'\n'</span>) </div><div class="line"> <span class="symbol">try:</span> </div><div class="line"> encoding = bin(int(io.fileName1[<span class="number">10</span><span class="symbol">:</span><span class="number">13</span>]))[<span class="number">2</span><span class="symbol">:</span>] + encoder.getStringEncoding(text) <span class="comment">#编码为开头以二进制形式呈现的字典标号和密文字符串</span></div><div class="line"> <span class="symbol">except:</span> </div><div class="line"> tkinter.messagebox.showerror(<span class="string">'错误'</span>, <span class="string">'您输入的文本中包含未编码的字符,请重新输入!'</span>) </div><div class="line"> <span class="keyword">return</span> </div><div class="line"> <span class="keyword">self</span>.encoding[<span class="string">'state'</span>] = <span class="string">'normal'</span> </div><div class="line"> <span class="keyword">self</span>.encoding.delete(<span class="string">'0.0'</span>, <span class="keyword">END</span>) </div><div class="line"> <span class="keyword">self</span>.encoding.insert(<span class="string">'0.0'</span>, encoding) </div><div class="line"> <span class="keyword">self</span>.__reset.focus_set()</div></pre></td></tr></table></figure>
<p>def decode(self)函数是专用于解密的函数,将字典编号以二进制形式存储在密文开头,解密时先以十进制形式的编号匹配相应字典,然后再用相应字典解密。</p>
<figure class="highlight vim"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line">def decode(self): </div><div class="line"> text = self.encoding.<span class="built_in">get</span>(<span class="string">'0.0'</span>, END).strip(<span class="string">'\n'</span>) </div><div class="line"> <span class="keyword">if</span> text.startswith(bin(<span class="keyword">int</span>(self.<span class="built_in">count</span>))[<span class="number">2</span>:]): # 判断密文是否以二进制形式的加密所使用的密码字典的编号开头</div><div class="line"> text = text[<span class="built_in">len</span>(bin(<span class="keyword">int</span>(self.<span class="built_in">count</span>))[<span class="number">2</span>:]):] # 编号匹配成功后,选择相应字典,跳过编号进行解密</div><div class="line"> <span class="keyword">global</span> de_fr </div><div class="line">de_fr = <span class="keyword">open</span>(<span class="comment">"/Users/zhangchuyue/Desktop/B15040805张楚月_哈夫曼加解密工具/password </span></div><div class="line"> <span class="string">"dictionary/dictionary"</span> + self.<span class="built_in">count</span> + <span class="string">'.txt'</span>, <span class="string">'r'</span>, encoding=<span class="string">'utf-8'</span>, errors=<span class="string">'ignore'</span>) </div><div class="line"> <span class="keyword">new</span> = Decode(de_fr) </div><div class="line"> nodeList = <span class="keyword">new</span>.getNodes() </div><div class="line"> tree = HuffumanTree(nodeList) </div><div class="line"> encoder = Encoding(tree.encodingList) </div><div class="line"> <span class="keyword">try</span>: </div><div class="line"> <span class="built_in">string</span> = encoder.getStringDecoding(str(text)) </div><div class="line"> excep<span class="variable">t:</span> </div><div class="line"> tkinter.messagebox.showerror(<span class="string">'错误'</span>, <span class="string">'无法解码,请重新输入!'</span>) </div><div class="line"> <span class="keyword">return</span> </div><div class="line"> self.<span class="built_in">string</span>[<span class="string">'state'</span>] = <span class="string">'normal'</span> </div><div class="line"> self.<span class="built_in">string</span>.<span class="keyword">delete</span>(<span class="string">'0.0'</span>, END) </div><div class="line"> self.<span class="built_in">string</span>.<span class="keyword">insert</span>(<span class="string">'0.0'</span>, <span class="built_in">string</span>) </div><div class="line">self.__reset.focus_set()</div></pre></td></tr></table></figure>
<h3 id="4-2-HuffmanTree-py模块核心代码"><a href="#4-2-HuffmanTree-py模块核心代码" class="headerlink" title="4.2 HuffmanTree.py模块核心代码"></a>4.2 HuffmanTree.py模块核心代码</h3><p>def __createTree(self,nodeList)函数的功能是使用给定的节点列表nodeList创建哈夫<br>曼树,返回根节点。</p>
<figure class="highlight maxima"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">def __createTree(self, nodeList): </div><div class="line"> nodeList.<span class="built_in">sort</span>(<span class="built_in">key</span> = <span class="built_in">compare</span>) </div><div class="line"> lchild = nodeList[<span class="number">0</span>] </div><div class="line"> nodeList.<span class="built_in">remove</span>(lchild) </div><div class="line"> rchild = nodeList[<span class="number">0</span>] </div><div class="line"> nodeList.<span class="built_in">remove</span>(rchild) </div><div class="line"> parent = TreeNode(lchild = lchild, rchild = rchild, </div><div class="line"> weight = lchild.weight + rchild.weight) </div><div class="line"> <span class="keyword">if</span> len(nodeList) == <span class="number">0</span>: </div><div class="line"> <span class="built_in">return</span> parent </div><div class="line"> <span class="keyword">else</span>: </div><div class="line"> nodeList.<span class="built_in">append</span>(parent) </div><div class="line"> <span class="built_in">return</span> self.__createTree(nodeList)</div></pre></td></tr></table></figure>
<p>def __display(self,root,level = ‘’)使用缩进格式在文件中输出哈夫曼树,以tree.txt的形式保存在目录中。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">def</span> __display<span class="params">(<span class="keyword">self</span>, root, level = <span class="string">''</span>)</span></span>: </div><div class="line"> <span class="keyword">if</span> level == <span class="string">''</span>: </div><div class="line"> <span class="keyword">self</span>.fw.write(level + repr(root) + <span class="string">'\n'</span>) </div><div class="line"> <span class="symbol">else:</span> </div><div class="line"> <span class="keyword">if</span> level[-<span class="number">4</span>] == <span class="string">' '</span>: </div><div class="line"> <span class="keyword">self</span>.fw.write(level[<span class="symbol">:-</span><span class="number">4</span>] + <span class="string">'└───'</span> + repr(root) + <span class="string">'\n'</span>) </div><div class="line"> <span class="symbol">else:</span> </div><div class="line"> <span class="keyword">self</span>.fw.write(level[<span class="symbol">:-</span><span class="number">3</span>] + <span class="string">'───'</span> + repr(root) + <span class="string">'\n'</span>) </div><div class="line"></div><div class="line"> <span class="keyword">if</span> root.lchild == <span class="symbol">None:</span> </div><div class="line"> <span class="keyword">return</span> </div><div class="line"> <span class="keyword">self</span>.__display(root. lchild, level + <span class="string">'│ '</span>) </div><div class="line"><span class="keyword">self</span>.__display(root. rchild, level + <span class="string">' '</span>)</div></pre></td></tr></table></figure>
<p>HuffmanTree.py模块中,Encoding类中的方法是比较关键的,它们涉及到文件的加密和解密,最根本的加解密过程都是通过这个类里的加密方法def getStringEncoding(self, string)和解密方法def getStringDecoding(self, encoding)完成的。加密的大致过程是:初始化一个解密字符串encoding,然后用encodingList即单词和编码的字典中的单词一一匹配明文开头单词,如果匹配上了,将密文加入encoding,然后明文从下一个单词开头重复上一个步骤的匹配工作,以此类推,直到全部加密完成。解密步骤反之同理。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div></pre></td><td class="code"><pre><div class="line"><span class="class"><span class="keyword">class</span> <span class="title">Encoding</span>: </span></div><div class="line"> <span class="function"><span class="keyword">def</span> __init__<span class="params">(<span class="keyword">self</span>, encodingList)</span></span>: </div><div class="line"> <span class="keyword">self</span>.encodingList = encodingList </div><div class="line"></div><div class="line"> <span class="function"><span class="keyword">def</span> <span class="title">getStringEncoding</span><span class="params">(<span class="keyword">self</span>, string)</span></span>: </div><div class="line"> encoding = <span class="string">''</span> </div><div class="line"> <span class="keyword">while</span> string != <span class="string">''</span>: </div><div class="line"> flag = <span class="number">0</span> </div><div class="line"> <span class="keyword">for</span> (k, v) <span class="keyword">in</span> <span class="keyword">self</span>.encodingList.items(): </div><div class="line"> <span class="keyword">if</span> string.startswith(k) <span class="keyword">and</span> string[len(k)] == <span class="string">' '</span>: <span class="comment">#判断明文字符串是否以字典中存在的单词开头</span></div><div class="line"> encoding += v <span class="comment"># 如果成功匹配到单词,encoding密文字符串加入相应的单词编码</span></div><div class="line"> string = string[len(k) + <span class="number">1</span><span class="symbol">:</span>] <span class="comment">#明文字符串跳过单词之间的空格,从下一个单词继续加密</span></div><div class="line"> flag = <span class="number">1</span> </div><div class="line"> <span class="keyword">break</span> </div><div class="line"> <span class="keyword">if</span> flag == <span class="number">0</span>: </div><div class="line"> raise Exception </div><div class="line"> <span class="keyword">return</span> encoding </div><div class="line"></div><div class="line"> <span class="function"><span class="keyword">def</span> <span class="title">getStringDecoding</span><span class="params">(<span class="keyword">self</span>, encoding)</span></span>: </div><div class="line"> string = <span class="string">''</span> </div><div class="line"> <span class="keyword">while</span> encoding != <span class="string">''</span>: </div><div class="line"> flag = <span class="number">0</span> </div><div class="line"> <span class="keyword">for</span> (k, v) <span class="keyword">in</span> <span class="keyword">self</span>.encodingList.items(): </div><div class="line"> <span class="keyword">if</span> encoding.startswith(v): <span class="comment">#判断密文字符串是否以字典中存在的密文编码开头</span></div><div class="line"> string += k </div><div class="line"> string += <span class="string">' '</span> </div><div class="line"> encoding = encoding[len(v)<span class="symbol">:</span>] <span class="comment">#密文字符串继续从下一个单词编码解密</span></div><div class="line"> flag = <span class="number">1</span> </div><div class="line"> <span class="keyword">break</span> </div><div class="line"> <span class="keyword">if</span> flag == <span class="number">0</span>: </div><div class="line"> raise Exception </div><div class="line"> <span class="keyword">return</span> string</div></pre></td></tr></table></figure>
<h3 id="4-3-NodeDataIO-py模块核心代码"><a href="#4-3-NodeDataIO-py模块核心代码" class="headerlink" title="4.3 NodeDataIO.py模块核心代码"></a>4.3 NodeDataIO.py模块核心代码</h3><p>NodeDataIO类中最重要的就是初始化方法,它的功能是从password dictionary文件夹中随机选择一个加密字典,进行加密工作。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">def</span> __init__<span class="params">(<span class="keyword">self</span>)</span></span>: </div><div class="line"> root = <span class="string">"/Users/zhangchuyue/Desktop/B15040805张楚月_哈夫曼加解密工具/password dictionary"</span> </div><div class="line"> file_names = [] </div><div class="line"> <span class="keyword">for</span> parent, catalog, filename <span class="keyword">in</span> os.walk(root): </div><div class="line"> file_names = filename </div><div class="line"> file_names.remove(<span class="string">'.DS_Store'</span>) </div><div class="line"> x = random.randint(<span class="number">0</span>, len(file_names) - <span class="number">1</span>) </div><div class="line"> <span class="keyword">self</span>.fileName1 = file_names[x] </div><div class="line"> print(<span class="string">"choose a password dictionary: "</span> + <span class="keyword">self</span>.fileName1) </div><div class="line"><span class="keyword">self</span>.fr = open(<span class="string">"/Users/zhangchuyue/Desktop/B15040805张楚月_哈夫曼加解密工具/password </span></div><div class="line"><span class="string"> "</span>dictionary/<span class="string">" + self.fileName1, 'r', encoding='utf-8', errors='ignore')</span></div></pre></td></tr></table></figure>
<h3 id="4-4-decode-py模块核心代码"><a href="#4-4-decode-py模块核心代码" class="headerlink" title="4.4 decode.py模块核心代码"></a>4.4 decode.py模块核心代码</h3><p>与NodeDataIO类功能类似,除了初始化代码以外都相同。不过NodeDataIO负责加密,Decode类负责解密,解密根据字典编码选择相应字典,实现代码为Decode类的初始化方法。</p>
<figure class="highlight ruby"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">def</span> __init__<span class="params">(<span class="keyword">self</span>, fr)</span></span>: </div><div class="line"><span class="keyword">self</span>.fr = fr</div></pre></td></tr></table></figure>
<p>通过在Dialog.pyw MyDialog类中的def decode(self)方法中调用获得随机字典的文件名:</p>
<figure class="highlight vim"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">de_fr = <span class="keyword">open</span>(<span class="comment">"/Users/zhangchuyue/Desktop/B15040805张楚月_哈夫曼加解密工具/password </span></div><div class="line"> <span class="string">"dictionary/dictionary"</span> + self.<span class="built_in">count</span> + <span class="string">'.txt'</span>, <span class="string">'r'</span>, encoding=<span class="string">'utf-8'</span>, errors=<span class="string">'ignore'</span>) </div><div class="line"><span class="keyword">new</span> = Decode(de_fr)</div></pre></td></tr></table></figure>
<p><br><br></p>
<h2 id="5-测试数据及其结果分析"><a href="#5-测试数据及其结果分析" class="headerlink" title="5.测试数据及其结果分析"></a>5.测试数据及其结果分析</h2><h3 id="5-1-合法数据输入-理想-amp-实际输出示例"><a href="#5-1-合法数据输入-理想-amp-实际输出示例" class="headerlink" title="5.1 合法数据输入-理想&实际输出示例"></a>5.1 合法数据输入-理想&实际输出示例<br></h3><p>输入:<br>my name is xliii he is my professor<br>输出:11110101111011011010110001001111011101001110001010010111000100111111011101001101101101010100110011<br>(choose a password dictionary: dictionary983.txt,此示例随机选择了dictionary983.txt进行加密)<br><img src="https://s2.ax1x.com/2019/11/15/MawNQg.png" alt="image"><br></p>
<h3 id="5-2-合法数据输入-错误输出示例"><a href="#5-2-合法数据输入-错误输出示例" class="headerlink" title="5.2 合法数据输入-错误输出示例"></a>5.2 合法数据输入-错误输出示例</h3><p>输入:<br>who is he<br>点击:<br>将加密结果导出到文件<br>现象:<br>未产生加密结果,进行except异常处理,弹出警告弹窗——没有可写字符<br><img src="https://s2.ax1x.com/2019/11/15/MawtSS.png" alt="image"><br></p>
<h3 id="5-3-非法数据输入-错误输出示例"><a href="#5-3-非法数据输入-错误输出示例" class="headerlink" title="5.3 非法数据输入-错误输出示例"></a>5.3 非法数据输入-错误输出示例</h3><p>输入:<br>dfwe fdd qewrqr<br>(输入为单词字典中不存在的单词)<br>输出:<br>进行except异常处理,弹出错误弹窗——您输入的文本中包含未编码的字符,请重新输入!<br><img src="https://s2.ax1x.com/2019/11/15/MawJW8.png" alt="image"><br><br></p>
<h2 id="6-总结"><a href="#6-总结" class="headerlink" title="6. 总结"></a>6. 总结</h2><p>python自带的tkinter库比较好用,但是实现的gui真的很丑。wxpython也应为各种坑装不了,大概是因为wxpython只能应用于32位的python……两周忙忙碌碌总算是做出来了,有时候码到深夜,饿到昏厥,不过结果还是挺好的,继续加油!</p>
]]></content>
<summary type="html">
<h2 id="1-写在开头"><a href="#1-写在开头" class="headerlink" title="1.写在开头"></a>1.写在开头</h2><p>本学期程序设计周的题目,利用哈夫曼算法实现了一个加解密的工具。</p>
<p>基本要求:<br>(1) 根据
</summary>
<category term="Code" scheme="http:/categories/code/"/>
<category term="Python" scheme="http:/tags/python/"/>
</entry>
<entry>
<title>用python实现的猜数字小游戏</title>
<link href="http:/2017/10/16/%E7%94%A8python%E5%AE%9E%E7%8E%B0%E7%9A%84%E7%8C%9C%E6%95%B0%E5%AD%97%E5%B0%8F%E6%B8%B8%E6%88%8F/"/>
<id>http:/2017/10/16/用python实现的猜数字小游戏/</id>
<published>2017-10-16T12:36:42.000Z</published>
<updated>2017-10-16T13:15:50.000Z</updated>
<content type="html"><![CDATA[<p>跟着教程写了一个简单的python程序。<br></p>
<p>实现的功能是:输入玩家姓名后,给了个1~100的随机数,玩家一步步猜测,程序会记录该用户游戏玩的次数、猜中数字的游戏次数中最少的一次轮数、所有游戏次数的总轮数,然后计算得到猜中数字需要的平均轮数输出。<br></p>
<p>一个比较简单的练习,不过语法还在慢慢熟练过程中,每行语义还是值得细细思考的。主要运用了列表、字典、文件读取及涉及的部分函数,并配合基本的循环结构写的。<br></p>
<p>之前自己看教程用pycharm3.6的版本写,教程还是py2的,自己还要一个个琢磨py2和py3的区别,对语法了解阶段有点耗时。毕竟区别不大,打算熟练了之后再去习惯py3,所以这个程序用的是python自带的IDLE写的,mac端不太友好,字体及细,下划线‘_’看不到,备注切换中文输入法还出不来,只能英文(摔。<br></p>
<p>另,最后暂时选用了有道云笔记来写md,之前一直用我的印象,微博看到干货直接@一下甩上去,后来发现除非霸王硬上弓,我的印象似乎是不能写md了,于是现在的情况是md用有道云写,干货收录在我的印象。<br><br><figure class="highlight perl"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div></pre></td><td class="code"><pre><div class="line"><span class="comment">#!/usr/bin/python</span></div><div class="line"><span class="comment"># -*- coding: UTF-8 -*-</span></div><div class="line"></div><div class="line">from random import randint</div><div class="line"></div><div class="line">name = raw_input(<span class="string">'input your name:'</span>) <span class="comment">#输入玩家姓名</span></div><div class="line">f = <span class="keyword">open</span>(<span class="string">'/Users/zhangchuyue/Desktop/python/猜数字/game.txt'</span>)</div><div class="line">lines = f.readlines() <span class="comment">#读取所有行</span></div><div class="line">f.close()</div><div class="line"></div><div class="line">scores = {} <span class="comment">#用一个空字典纪录成绩</span></div><div class="line"><span class="keyword">for</span> l in lines:</div><div class="line"> <span class="keyword">s</span> = l.<span class="keyword">split</span>() <span class="comment">#把每行数据拆分为列表</span></div><div class="line"> scores[<span class="keyword">s</span>[<span class="number">0</span>]] = <span class="keyword">s</span>[<span class="number">1</span>:] <span class="comment">#s[0]为key,其余为value</span></div><div class="line">score = scores.get(name) <span class="comment">#按key获取相应value</span></div><div class="line"><span class="keyword">if</span> score is None: <span class="comment">#若无该key返回None</span></div><div class="line"> score = [<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>]</div><div class="line"> </div><div class="line">game_times = <span class="keyword">int</span>(score[<span class="number">0</span>]) <span class="comment">#score第一个存放游戏次数</span></div><div class="line">min_times = <span class="keyword">int</span>(score[<span class="number">1</span>]) <span class="comment">#第二个存放猜中所花的最小轮数</span></div><div class="line">total_times = <span class="keyword">int</span>(score[<span class="number">2</span>]) <span class="comment">#总轮数</span></div><div class="line"><span class="keyword">if</span> game_times > <span class="number">0</span>: <span class="comment">#0不能为除数,单独判断</span></div><div class="line"> avg_times = float(total_times) / game_times</div><div class="line"><span class="keyword">else</span>:</div><div class="line"> avg_times = <span class="number">0</span></div><div class="line"><span class="keyword">print</span> <span class="string">'you have played %d times, minum %d round, average %d round'</span> %(game_times,min_times,avg_times)</div><div class="line"></div><div class="line">num = randint(<span class="number">1</span>,<span class="number">100</span>) </div><div class="line"><span class="keyword">times</span> = <span class="number">0</span></div><div class="line"><span class="keyword">print</span> <span class="string">'guess what i think?'</span></div><div class="line">bingo = False</div><div class="line"><span class="keyword">while</span> bingo == False:</div><div class="line"> <span class="keyword">times</span> += <span class="number">1</span></div><div class="line"> answer = input()</div><div class="line"> <span class="keyword">if</span> answer < num:</div><div class="line"> <span class="keyword">print</span> <span class="string">'too small'</span></div><div class="line"> elif answer == num:</div><div class="line"> <span class="keyword">print</span> <span class="string">'bingo'</span></div><div class="line"> bingo = True</div><div class="line"> <span class="keyword">else</span>:</div><div class="line"> <span class="keyword">print</span> <span class="string">'too big'</span></div><div class="line"> </div><div class="line"><span class="keyword">if</span> game_times == <span class="number">0</span> <span class="keyword">or</span> <span class="keyword">times</span> < min_times:</div><div class="line"> min_times = <span class="keyword">times</span></div><div class="line">total_times += <span class="keyword">times</span></div><div class="line">game_times += <span class="number">1</span></div><div class="line"></div><div class="line">scores[name] = [str(game_times), str(min_times), str(total_times)] <span class="comment">#更新scores里的成绩,如果直接写入文件,其他玩家的成绩会被覆盖</span></div><div class="line">result = <span class="string">''</span></div><div class="line"><span class="keyword">for</span> n in scores:</div><div class="line"> line = n + <span class="string">' '</span> + <span class="string">' '</span>.join(scores[n]) +<span class="string">'\n'</span> <span class="comment">#用‘ ’连接scores[n]</span></div><div class="line"> result += line</div><div class="line"></div><div class="line">f = <span class="keyword">open</span>(<span class="string">'/Users/zhangchuyue/Desktop/python/猜数字/game.txt'</span>, <span class="string">'w'</span>)</div><div class="line">f.write(result)</div><div class="line">f.close()</div></pre></td></tr></table></figure></p>
]]></content>
<summary type="html">
<p>跟着教程写了一个简单的python程序。<br></p>
<p>实现的功能是:输入玩家姓名后,给了个1~100的随机数,玩家一步步猜测,程序会记录该用户游戏玩的次数、猜中数字的游戏次数中最少的一次轮数、所有游戏次数的总轮数,然后计算得到猜中数字需要的平均轮数输出。<br><
</summary>
<category term="Code" scheme="http:/categories/code/"/>
<category term="Python" scheme="http:/tags/python/"/>
</entry>
<entry>
<title>科技节手机UI主题设计大赛</title>
<link href="http:/2017/07/13/%E7%A7%91%E6%8A%80%E8%8A%82%E6%89%8B%E6%9C%BAui%E4%B8%BB%E9%A2%98%E8%AE%BE%E8%AE%A1%E5%A4%A7%E8%B5%9B/"/>
<id>http:/2017/07/13/科技节手机ui主题设计大赛/</id>
<published>2017-07-13T08:58:52.000Z</published>
<updated>2020-01-08T05:47:44.686Z</updated>
<content type="html"><![CDATA[<p>这个比赛其实是半年前的了,因为最近在休整博客,准备把一些设计和摄影的作品也都慢慢放进来,所以翻了些陈年旧事。</p>
<p>当时学校科技节,有不少比赛。大一的时候其实也报了这个比赛的名,因为懒,后来并没有提交作品(逃),大二为了水点自主化学分,感觉这个比赛比较稳,于是花了一周的时间做这套UI。(捂脸<br>比赛毕竟还是比赛,评委还是那些老师,那肯定不能按套路来……所以果断地避开了扁平和渐变之类的设计潮流,也规避了极简,选择了偏拟物的中国风,颜色也选的都是饱和度比较低的。</p>
<p>icon细节上考虑的比较多(虽然实际使用上并不容易注意到),只是强行给自己加戏…||| 所以一定要讲解一下……</p>
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/d1115b5f2108de7f.jpg" alt=""></p>
<p><br></p>
<blockquote>
<p>便签:毛笔。</p>
<p>备份恢复:云备份。</p>
<p>拨号:中间是一块黑色的鹅卵石,撞击在沙粒中产生了圆形的波纹,取自含义“一沙一世界“。类比声波。<br>浏览器:古人望月,一览苍穹。</p>
<p>联系人:以汉服表示。</p>
<p>日历:日晷,表示日期时间的变化。</p>
<p>视频:一盏俯视的茶水,水面上的三片茶叶拼成了视频播放的三角形的标志。</p>
<p>文件管理:信封,加上了古代宣纸的质感。</p>
<p>天气:以祥云的纹理,勾勒出水滴的轮廓,用画笔画出水滴的光泽。</p>
<p>信息:木质底纹,信纸上写有“红豆生南国,春来发几枝。“因为相思,所以寄信传情。</p>
<p>图库(为上图的’相册’):一朵莲花。</p>
<p>主题风格:以竹子的“竹“取谐音主题的”主“,竹子高风亮节的品格也正好对应了主题风格中的”风“。</p>
<p>音乐:一把琵琶的琴头,。</p>
<p>相机:用砚台磨墨的圆形区域表示相机的镜头。</p>
<p>游戏:围棋。</p>
<p>设置:规避大众普遍的设计如齿轮、榔头等,以古代木质建筑的常用结构——卯榫 表示。</p>
</blockquote>
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/c2da055f66ffd8e8.jpg" alt=""></p>
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/479f4fdeca517fca.jpg" alt=""></p>
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/636b49f2a94745a0.jpg" alt=""></p>
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/b8601f2f72d99127.jpg" alt=""></p>
<blockquote>
<p>界面二——天气widget区域,天气widget是一个平头案,平头案是一种独具特色的汉族传统的明式家具。</p>
<p>界面三——音乐widget,音乐widget是一副画卷。</p>
</blockquote>
<p>最后提交的作品改了锁屏壁纸,虽然个人还是更喜欢纯色的宣纸质感背景Q w Q</p>
<p><img src="http://ojv7wbfak.bkt.clouddn.com/%E8%90%BD%E6%A2%85%E7%AC%BA%20template%E5%89%AF%E6%9C%AC.jpg" alt=""></p>
<p>至于为什么给这套作品取名为《落梅笺》,一是因为要体现它的古风,二是因为壁纸上有一枝梅花,于是取自于银临的一首歌名。<br><br><br><br></p>
<blockquote>
<p>昨夜桃花开 几抹浓淡春色里外</p>
<p>唯恐着尘埃 执手相看流连还来</p>
<p>忽的蝉尽秋已到 花飞梦散对空梢</p>
<p>风月如雪泥鸿爪 蝇头细字终潦草</p>
</blockquote>
<div align="center"><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=28188433&auto=1&height=66"></iframe></div>
]]></content>
<summary type="html">
<p>这个比赛其实是半年前的了,因为最近在休整博客,准备把一些设计和摄影的作品也都慢慢放进来,所以翻了些陈年旧事。</p>
<p>当时学校科技节,有不少比赛。大一的时候其实也报了这个比赛的名,因为懒,后来并没有提交作品(逃),大二为了水点自主化学分,感觉这个比赛比较稳,于是花了一
</summary>
<category term="Design" scheme="http:/categories/design/"/>
<category term="UI" scheme="http:/tags/ui/"/>
</entry>
<entry>
<title>C语言实现三转轮密码机加密</title>
<link href="http:/2017/03/18/c%E8%AF%AD%E8%A8%80%E5%AE%9E%E7%8E%B0%E4%B8%89%E8%BD%AC%E8%BD%AE%E5%AF%86%E7%A0%81%E6%9C%BA%E5%8A%A0%E5%AF%86/"/>
<id>http:/2017/03/18/c语言实现三转轮密码机加密/</id>
<published>2017-03-18T04:16:51.000Z</published>
<updated>2020-01-08T05:39:20.597Z</updated>
<content type="html"><![CDATA[<p>博客没有死,只是一直想不到可以写的东西,如果再不更新,生活也许只剩眼前的雾霾了。所以打算写些学习和生活的二三事,从今天开始吧。<br><br><br><img src="https://ftp.bmp.ovh/imgs/2020/01/08dacf78aab1dbe9.jpg" alt=""><br><br><br>三转轮密码机的工作原理如图,简单补充一下:</p>
<blockquote>
<p>快轮子转动一圈(26个位置),中轮子转动一个位置;中轮子转动一圈(26个位置),慢轮子转动一个位置。在加密或解密26×26×26个字母以后,所有转轮都恢复到初始状态(如图3-1(a))。由此,一个有3个转轮的转轮密码机是一个密钥周期为26×26×26 = 17 576的多表代换密码机械装置。</p>
</blockquote>
<p>原理其实和<a href="https://en.wikipedia.org/wiki/Enigma_machine" target="_blank">Enigma machine</a>类似,在二战时期被运用过。<br><br><br>盯着图看了两三天,直到着手写的时候也依然没有思路,那就先照着图上的索引一步一步加密看看吧。于是对照着初始状态以及转轮转动规则采用数组写,写着写着写出了一点思路:<br><br></p>
<ol>
<li>先将26个字母改为1~26的数字表示,使明文字母对应慢轮子左列的26个数字;<br><br></li>
<li>依次搜索慢轮子右列直到找到与明文相同的数字,记录数字所在行数,进入同行的中轮子左列;<br><br></li>
<li>方法同(2),转入快轮子;<br><br></li>
<li>依次搜索快轮子右列直到搜索到与快轮子左列相同的数字,输出数字所在行数,将数字转换为字母,密文输出;<br><br></li>
<li>快轮转动一个位置;<br><br></li>
<li>判断加密次数是否为26的倍数,若满足,则中轮子转动一个位置;<br><br></li>
<li>判断加密次数是否为26×26的倍数,若满足,则慢轮子转动一个位置;<br><br></li>
<li>一个字母加密结束。<br><br></li>
</ol>
<p>以这种方式解密也是比较容易的,只要从密文输出的地方按照线路索引逆向走回去就可输出明文。<br><br><br>在加密时,本想偷懒跳过空格以及标点的处理,但这样会造成密文包含原始空格以及标点,于是在文件处理上,我先删除了空格和标点,再进行读取文件加密。<br><br><br>以下附上核心代码:<br><figure class="highlight c"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div></pre></td><td class="code"><pre><div class="line"><span class="comment">//三转轮密码机加密函数</span></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">EncryptFile</span> <span class="params">(<span class="keyword">char</span> buffer[], <span class="keyword">int</span> FileSize)</span> </span></div><div class="line"><span class="function"></span>{</div><div class="line"> <span class="keyword">int</span> i, j, m;</div><div class="line"> <span class="keyword">int</span> flag = <span class="number">-1</span>, num = <span class="number">0</span>;</div><div class="line"> <span class="keyword">int</span> sRotor[<span class="number">26</span>][<span class="number">2</span>];</div><div class="line"> <span class="keyword">int</span> mRotor[<span class="number">26</span>][<span class="number">2</span>];</div><div class="line"> <span class="keyword">int</span> fRotor[<span class="number">26</span>][<span class="number">2</span>];</div><div class="line"> <span class="keyword">int</span> arr[<span class="number">1</span>][<span class="number">2</span>];</div><div class="line"></div><div class="line"> sRotor[<span class="number">0</span>][<span class="number">0</span>] = <span class="number">24</span>; sRotor[<span class="number">0</span>][<span class="number">1</span>] = <span class="number">21</span>;</div><div class="line"> sRotor[<span class="number">1</span>][<span class="number">0</span>] = <span class="number">25</span>; sRotor[<span class="number">1</span>][<span class="number">1</span>] = <span class="number">3</span>;</div><div class="line"> <span class="comment">//此段为冗长的慢中快轮子sRotor\mRotor\fRotor数据存储,不一一列写</span></div><div class="line"> fRotor[<span class="number">24</span>][<span class="number">0</span>] = <span class="number">25</span>; fRotor[<span class="number">24</span>][<span class="number">1</span>] = <span class="number">1</span>;</div><div class="line"> fRotor[<span class="number">25</span>][<span class="number">0</span>] = <span class="number">26</span>; fRotor[<span class="number">25</span>][<span class="number">1</span>] = <span class="number">14</span>;</div><div class="line"></div><div class="line"> <span class="keyword">for</span> (i = <span class="number">0</span>; i < FileSize; i++) { <span class="comment">//将文档所有A~Z的字母转为1~26的数字表示</span></div><div class="line"> <span class="keyword">if</span> (buffer[i] >= <span class="string">'A'</span> && buffer[i] <= <span class="string">'Z'</span>) {</div><div class="line"> buffer[i] -= <span class="number">64</span>;</div><div class="line"> }</div><div class="line"> <span class="keyword">else</span> <span class="keyword">if</span> (buffer[i] >= <span class="string">'a'</span> && buffer[i] <= <span class="string">'z'</span>) {</div><div class="line"> buffer[i] -= <span class="number">96</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">for</span> (i = <span class="number">0</span>; i < FileSize; i++) { <span class="comment">//明密文转换</span></div><div class="line"> num++; <span class="comment">//记录加密次数</span></div><div class="line"> <span class="keyword">if</span> (buffer[i] >= <span class="number">1</span> && buffer[i] <= <span class="number">26</span>) { </div><div class="line"> m = sRotor[buffer[i] - <span class="number">1</span>][<span class="number">0</span>];</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">0</span>; j < <span class="number">26</span>; j++) {</div><div class="line"> flag++;</div><div class="line"> <span class="keyword">if</span> (sRotor[j][<span class="number">1</span>] == m) {</div><div class="line"> m = sRotor[j][<span class="number">1</span>];</div><div class="line"> <span class="keyword">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> m = mRotor[flag][<span class="number">0</span>];</div><div class="line"> flag = <span class="number">-1</span>;</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">0</span>; j < <span class="number">26</span>; j++) {</div><div class="line"> flag++;</div><div class="line"> <span class="keyword">if</span> (mRotor[j][<span class="number">1</span>] == m) {</div><div class="line"> m = mRotor[j][<span class="number">1</span>];</div><div class="line"> <span class="keyword">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> m = fRotor[flag][<span class="number">0</span>];</div><div class="line"> flag = <span class="number">-1</span>;</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">0</span>; j < <span class="number">26</span>; j++) {</div><div class="line"> flag++;</div><div class="line"> <span class="keyword">if</span> (fRotor[j][<span class="number">1</span>] == m) {</div><div class="line"> m = fRotor[j][<span class="number">1</span>];</div><div class="line"> <span class="keyword">break</span>;</div><div class="line"> }</div><div class="line"> }</div><div class="line"> buffer[i] = flag + <span class="number">49</span> + <span class="string">'0'</span>; <span class="comment">//密文输出为字母</span></div><div class="line"> flag = <span class="number">-1</span>; <span class="comment">//flag回到初始值</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">0</span>] = fRotor[<span class="number">25</span>][<span class="number">0</span>]; <span class="comment">//快轮转动一个位置</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">1</span>] = fRotor[<span class="number">25</span>][<span class="number">1</span>];</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">25</span>; j > <span class="number">0</span>; j--) {</div><div class="line"> fRotor[j][<span class="number">0</span>] = fRotor[j - <span class="number">1</span>][<span class="number">0</span>];</div><div class="line"> fRotor[j][<span class="number">1</span>] = fRotor[j - <span class="number">1</span>][<span class="number">1</span>];</div><div class="line"> }</div><div class="line"> fRotor[<span class="number">0</span>][<span class="number">0</span>] = arr[<span class="number">0</span>][<span class="number">0</span>];</div><div class="line"> fRotor[<span class="number">0</span>][<span class="number">1</span>] = arr[<span class="number">0</span>][<span class="number">1</span>];</div><div class="line"></div><div class="line"> <span class="keyword">if</span> (num % <span class="number">26</span> == <span class="number">0</span>) { <span class="comment">//若快轮已转动一圈则中轮转动一个位置</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">0</span>] = mRotor[<span class="number">25</span>][<span class="number">0</span>]; <span class="comment">//中轮转动一个位置</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">1</span>] = mRotor[<span class="number">25</span>][<span class="number">1</span>];</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">25</span>; j > <span class="number">0</span>; j--) {</div><div class="line"> mRotor[j][<span class="number">0</span>] = mRotor[j - <span class="number">1</span>][<span class="number">0</span>];</div><div class="line"> mRotor[j][<span class="number">1</span>] = mRotor[j - <span class="number">1</span>][<span class="number">1</span>];</div><div class="line"> }</div><div class="line"> mRotor[<span class="number">0</span>][<span class="number">0</span>] = arr[<span class="number">0</span>][<span class="number">0</span>];</div><div class="line"> mRotor[<span class="number">0</span>][<span class="number">1</span>] = arr[<span class="number">0</span>][<span class="number">1</span>];</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">if</span> (num % (<span class="number">26</span> * <span class="number">26</span>) == <span class="number">0</span>) { <span class="comment">//若中轮已转动一圈则慢轮转动一个位置</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">0</span>] = sRotor[<span class="number">25</span>][<span class="number">0</span>]; <span class="comment">//慢轮转动一个位置</span></div><div class="line"> arr[<span class="number">0</span>][<span class="number">1</span>] = sRotor[<span class="number">25</span>][<span class="number">1</span>];</div><div class="line"> <span class="keyword">for</span> (j = <span class="number">25</span>; j > <span class="number">0</span>; j--) {</div><div class="line"> sRotor[j][<span class="number">0</span>] = sRotor[j - <span class="number">1</span>][<span class="number">0</span>];</div><div class="line"> sRotor[j][<span class="number">1</span>] = sRotor[j - <span class="number">1</span>][<span class="number">1</span>];</div><div class="line"> }</div><div class="line"> sRotor[<span class="number">0</span>][<span class="number">0</span>] = arr[<span class="number">0</span>][<span class="number">0</span>];</div><div class="line"> sRotor[<span class="number">0</span>][<span class="number">1</span>] = arr[<span class="number">0</span>][<span class="number">1</span>];</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"></div><div class="line"> buffer[FileSize] = <span class="string">'\0'</span>;</div><div class="line">}</div><div class="line"><span class="comment">//删除文件里空格标点的函数</span></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">FileDelete</span> <span class="params">()</span> </span>{</div><div class="line"> FILE *fp, *fp2;</div><div class="line"> <span class="keyword">int</span> p;</div><div class="line"> <span class="keyword">char</span> filename[<span class="number">20</span>];</div><div class="line"> <span class="keyword">char</span> filename2[<span class="number">20</span>];</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"加密前,文件需要删去空格以及标点,请输入要加密文件路径: \n"</span>);</div><div class="line"> <span class="built_in">scanf</span>(<span class="string">"%s"</span>, filename);</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"\n"</span>);</div><div class="line"> fp = fopen(filename, <span class="string">"r"</span>);</div><div class="line"> <span class="keyword">if</span> (fp == <span class="literal">NULL</span>) {</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"Error!"</span>);</div><div class="line"> }</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"删去空格以及标点后,请输入需加密文件的另存为路径: \n"</span>);</div><div class="line"> <span class="built_in">scanf</span>(<span class="string">"%s"</span>, filename2);</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"\n"</span>);</div><div class="line"> fp2 = fopen(filename2, <span class="string">"w"</span>);</div><div class="line"> <span class="keyword">if</span>((fp = fopen(filename,<span class="string">"r"</span>)) != <span class="literal">NULL</span>) {</div><div class="line"> <span class="keyword">while</span>((p = fgetc(fp)) != EOF ) {</div><div class="line"> <span class="keyword">if</span>(p >= <span class="number">65</span> && p <= <span class="number">90</span> || p >= <span class="number">97</span> && p <= <span class="number">122</span>) {</div><div class="line"> fputc(p,fp2);</div><div class="line"> }</div><div class="line"> }</div><div class="line"> }</div><div class="line"> fclose(fp);</div><div class="line"> fclose(fp2);</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">//打开源文件</span></div><div class="line"><span class="function"><span class="keyword">int</span> <span class="title">openSrcFile</span> <span class="params">(<span class="keyword">char</span> **buffer)</span> </span>{</div><div class="line"> FILE *MyfileSrc; <span class="comment">//源文件指针</span></div><div class="line"> <span class="keyword">char</span> filename[<span class="number">20</span>]; <span class="comment">//文件名数组</span></div><div class="line"> <span class="keyword">long</span> <span class="keyword">int</span> FileSize; <span class="comment">//记录文件的长度</span></div><div class="line"> <span class="keyword">long</span> <span class="keyword">int</span> i,j;</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"请输入要加密的文件路径:\n"</span>);</div><div class="line"> <span class="built_in">scanf</span>(<span class="string">"%s"</span>, filename);</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"\n"</span>);</div><div class="line"> <span class="keyword">if</span> (!(MyfileSrc = fopen(filename,<span class="string">"rb"</span>))) {</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"Error!"</span>);</div><div class="line"> };</div><div class="line"> fseek(MyfileSrc, <span class="number">0</span>, SEEK_END); <span class="comment">//判断文件长度</span></div><div class="line"> FileSize = ftell(MyfileSrc);</div><div class="line"> fseek(MyfileSrc, <span class="number">0</span>, SEEK_SET);</div><div class="line"> *buffer = (<span class="keyword">char</span>*)<span class="built_in">malloc</span>(FileSize); <span class="comment">//像堆区申请FileSize大小内存空间</span></div><div class="line"> fread(*buffer, <span class="number">1</span>, FileSize, MyfileSrc); <span class="comment">//读入文件</span></div><div class="line"> fclose(MyfileSrc);</div><div class="line"> <span class="keyword">return</span> FileSize;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">//储存加密文件</span></div><div class="line"><span class="function"><span class="keyword">void</span> <span class="title">saveDstFile</span> <span class="params">(<span class="keyword">char</span> *buffer, <span class="keyword">int</span> FileSize)</span> </span>{</div><div class="line"> FILE *MyfileDst; <span class="comment">//源文件指针</span></div><div class="line"> <span class="keyword">char</span> filename[<span class="number">20</span>]; <span class="comment">//文件名数组</span></div><div class="line"> <span class="built_in">printf</span>(<span class="string">"请输入文件加密后要生成的路径:\n"</span>);</div><div class="line"> <span class="built_in">scanf</span>(<span class="string">"%s"</span>, filename);</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"\n"</span>);</div><div class="line"> <span class="keyword">if</span> (!(MyfileDst = fopen(filename,<span class="string">"wb"</span>))) {</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"Error!"</span>);</div><div class="line"> }</div><div class="line"> <span class="built_in">fprintf</span>(MyfileDst, <span class="string">"%s"</span>, buffer);</div><div class="line"> <span class="built_in">printf</span>(<span class="string">"加密完成,请查看加密生成文件\n"</span>);</div><div class="line"> fclose(MyfileDst);</div><div class="line"> <span class="built_in">free</span>(buffer); <span class="comment">//释放内存空间</span></div><div class="line">}</div></pre></td></tr></table></figure></p>
<p><br><br><br><img src="https://ftp.bmp.ovh/imgs/2020/01/704d0f83882eb092.png" alt=""><br><em><div align="center">测试图例</div></em><br><br><br>由于写的比较赶,风格和习惯上的不足还望见谅。错误之处敬请斧正。</p>
]]></content>
<summary type="html">
<p>博客没有死,只是一直想不到可以写的东西,如果再不更新,生活也许只剩眼前的雾霾了。所以打算写些学习和生活的二三事,从今天开始吧。<br><br><br><img src="https://ftp.bmp.ovh/imgs/2020/01/08dacf78aab1dbe9.jp
</summary>
<category term="Code" scheme="http:/categories/code/"/>
<category term="C" scheme="http:/tags/c/"/>
</entry>
<entry>
<title>Long Live Twenty!</title>
<link href="http:/2017/01/27/20/"/>
<id>http:/2017/01/27/20/</id>
<published>2017-01-27T07:12:07.000Z</published>
<updated>2020-01-08T05:38:28.473Z</updated>
<content type="html"><![CDATA[<p><img src="https://ftp.bmp.ovh/imgs/2020/01/265139135baa017d.jpg" alt=""><br><br><br>今天是除夕了,又这么巧在今天满了20岁,是不是可以奢侈地许两个愿望呢?<br><br><br>据说在除夕过生日,这是我第二次。第一次的时候,我才一岁,人生刚刚开始。今天,也算又一个开始吧,毫无准备地要开始二字打头的生活,满脑子都是未来十年的幻影,想想竟有点不知所措。<br><br><br>回顾过去,我真觉得十八岁半实在是太棒了。那段时间里做的每一件事情似乎都关乎未来的走向,自己却没有任何来自外界的压力和负担,可以深呼吸、大胆地为自己的将来做决定。也许这就是自己作为法定的成年人体会到的第一次责任,原来长大这么好。可是,岁月它像开了阀的洪水一样,奔腾不息,偶有溅起的水花让你感叹一下蹉跎,却又不得不无畏大浪,顺水而行。曾经期待着长大,渴求独立的思想,盼望自己有一天成为一个标新立异的新青年,然而真正长大了,却无比觊觎一个可以堵住滚滚洪水的坝,让它流缓点儿,再缓点儿。<br><br><br>我总是认为,二十多了,是该陆续兑现一点承诺了。可是,我从小到大的两个纯粹的梦想,目前似乎无一实现,好像有点讽刺。这个寒假,可以说是近期最抑郁的假期了,对着键盘无力地敲打,不知觉就到了深夜,不知觉就这样迎接二十岁。会多想,会绝望。哎,不过也好在,梦想虽有取舍,但没有变过,即使目前压抑悲观,偶尔无力绝望,不过总会“沉舟侧畔千帆过,病树前头万木春”的吧!毕竟,它是这样一个被多少过来人羡慕的黄金时代,是这样生猛又刚硬。<br><br><br>身边的大家也陆续步入桃李、弱冠之年,这才意识到,“从前”,是真的走了。渐渐发现很多事情自己已经没有小时候那种面对的感觉。现在会怕老,看到老人脸上的皱纹会心酸;有时会觉得假期出游也挺无趣的;小时候难得去次上海才吃得到的M记云云现在虽然烂了大街,但一点儿也不好吃了;小时候逢五一、国庆就有喜酒吃,现在越来越少了……原来大家都长大了啊。<br><br><br>未来,势必会遇到越来越多形形色色的人。我是人海中一个小小的分子,愿南方的阴雨,淋不湿我,北方的鸿雁,也能被我看到啼破苍穹。愿日落江河之时,也能缓步当歌,看星辰飘落。在二十几岁的日子里,希望一切都好,我要敢爱,敢拼,敢闯,风中造舟,不再回头。</p>
<div align="center"><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=32272267&auto=1&height=66"></iframe></div>
]]></content>
<summary type="html">
<p><img src="https://ftp.bmp.ovh/imgs/2020/01/265139135baa017d.jpg" alt=""><br><br><br>今天是除夕了,又这么巧在今天满了20岁,是不是可以奢侈地许两个愿望呢?<br><br><br>据说在除夕过
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="daily" scheme="http:/tags/daily/"/>
</entry>
<entry>
<title>Serendipity</title>
<link href="http:/2017/01/17/serendipity/"/>
<id>http:/2017/01/17/serendipity/</id>
<published>2017-01-17T06:27:24.000Z</published>
<updated>2020-01-08T05:37:28.181Z</updated>
<content type="html"><![CDATA[<p>你来了,真是件serendipity。 <br><br><br>寒假回来这几天忙着搭blog,终于差不多成型了。之前在hexo+github和wordpress两者之间纠结了一会,最后还是选择使用前者。虽然两者各有所长,选择哪种方法都会有点小小的欠缺,不过为了借机会使用下github,还是决定搭这个轻量级的blog。<br><br><br><img src="https://ftp.bmp.ovh/imgs/2020/01/febbe534c6bd5905.jpg" alt=""><br><br><br><br>主题上我不喜欢太复杂的,也不想要太极简的,所以选了很久。记得概率论老师上课说过一次</p>
<blockquote>
<p>也许继续下去可以找到更适合你的,但你不可能一直找下去。 </p>
</blockquote>
<p>好吧,那就这个主题了。小改了一点,把顶部logo的部分换成了之前<a href="http://weibo.com/u/2865004400" target="_blank">@眼眼</a>帮我画的头像,为了做成png索引,轮廓被我抠得比较粗糙,233。网页端标签页前面的小图标和apple touch icon也改了,正好上学期参加UI比赛,花了一周做了一套国风的UI,就找了一个当时画的月亮来当icon,突然觉得跟主题风格还挺搭的,满页移动的都是星星,就差一个月亮了嘛!( 做的是类似塞班的图标形状,ios里看还挺违和 ) 细节上也是在尽量改成更像自己的一个blog,不过还是觉得布局不是特别满意,评论区暂时没打算开,感觉不是很有必要,再看吧,慢慢改。<br><img src="https://ftp.bmp.ovh/imgs/2020/01/f811f188901b95b5.jpg" alt=""><br><br><br><br>最近看了《Serendipity》。它残忍、悲哀,实际上不是一个美好的爱情故事,可它是一个好单词。维基百科上对它是这么解释的</p>
<blockquote>
<p>意外发现(Serendipity [ˌserənˈdɪpəti] )是指某人发现了他原先没有期待发现的事物或现象。英文原词是“Serendipity”,这个英文单词曾在2004年6月被一家英国翻译公司评选为十大最难翻译的单词,不过,这个单词已经被转译成多个语言。单词可以简单的理解为幸福的意外(happy accident)或愉快的惊喜(pleasant surprise)。</p>
</blockquote>
<p>其实并不觉得这个解释是最好的,过于平实。而电影翻译来为《缘分天注定》,字幕里解释为“情有独钟”,这些又太优雅。平凡地看它,就是“机缘凑巧”、“巧事”之类的吧。所以我说,你来了,就是serendipity了。<br><br><br><br>印象最深刻的是男主死党为他写的“悼言”,作为全片的精髓,太美不过。</p>
<blockquote>
<p>Jonathan Trager, prominent television producer for ESPN, died last night from complications of losing his soul mate and his fiance.<br><br> He was thirty-five years old. Soft-spoken and obsessive, Trager never looked the part of a hopeless romantic. But in the final days of his life, he revealed an unknown side of his psyche. This hidden quasi-Jungian persona surfaced during the Agatha Christie-like pursuit for his long, reputed soul mate; a woman whom he only spent a few precious hours with. Sadly, the protracted search ended late Saturday night in complete and utter failure. Yet even in certain defeat, the courageous Trager secretly clung to the belief that life is not merely a series of meaningless accidents or coincidences. Uh-uh. But rather, it is a tapestry of events that culminate into an exquisite, sublime plan. <br><br>Ask about the loss of his dear friend, Dean Kansky, the Pulitzer Prize-winning author and executive editor of New York Times, described Jonathan as a changed man in the last days of his life. Things were clearer for him, Kansky noted. Ultimately, Jonathan concluded that if we are to live life in harmony with the universe we must all possess a powerful faith, of what the ancients used to call fatum; what we currently refer to as destiny.</p>
</blockquote>
<p>电影最后以一片星辰到漆黑的夜空结束,好像这就是所谓的destiny。 <br><br><br>就让SERENDIPITY好好地生长下去吧。</p>
]]></content>
<summary type="html">
<p>你来了,真是件serendipity。 <br><br><br>寒假回来这几天忙着搭blog,终于差不多成型了。之前在hexo+github和wordpress两者之间纠结了一会,最后还是选择使用前者。虽然两者各有所长,选择哪种方法都会有点小小的欠缺,不过为了借机会使用下g
</summary>
<category term="Daily Life" scheme="http:/categories/daily-life/"/>
<category term="daily" scheme="http:/tags/daily/"/>
</entry>
</feed>