10/03/2017 – C#/UWP/Personal Library Manager – C#/UWP开发和个人图书馆应用

(English version follows Chinese Part)

由于家庭环境的熏陶,重视藏书和整理书架成为我的生活习惯。无论是纸质藏书还是书籍电子文档,我都妥善地按照图书分类法进行了整理存放。除了本网站的图书馆模块进行书目的记录,其实很早之前我就利用图书馆管理软件建立了一个数据库来管理我拥有的书籍,然而这个软件是中国的,其分类法仅采用了中图法,所以对外文文献的分类不是很友好。另外,这款软件实际上更适合于公共图书馆的管理,并不是专门的“个人藏书数据库”,操作上比较复杂,很多功能对个人来说太多余。界面也实在是难看的不行。

I grew up in a family with tons of books, be taught to treasure them and shelving books become one of my hobbies. No matter paper or e-file, collecting and shelving are what I will do when I own a new book. Besides the library module for this website, I have been using library application to manage my book collection. But this app uses Chinese Library Classification (CLC) only, which is not friendly for books in other language or published in other countries. Moreover, it technically is a application for public library, too much functions for personal use and make it burden. GUI is ugly, too.

恰巧近日来我对笔记本的系统进行了升级,Windows 10支持的UWP应用给我留下了深刻印象,无论是metro的实用性还是当下流行的扁平化设计还有内容的云同步让我萌生了一个念头,要不然自己学习一些UWP应用的开发办法,自己做一个“个人藏书数据库”的应用。就算是已经有类似的应用,但做个适合自己使用习惯的应用或许也不错,反正码代码不经常是重复造轮子吗:)

Coincidentally, I update my laptop into MS Windows 10. UWP apps impressed me a lot. Useful and flat design of “Metro”, cloud sync is amazing. How about learn something about coding and create a special “Library manager UWP” for myself? Maybe similar apps does exist, “create wheels again” is so popular in coding, right?

经过网络检索,也参考了一下代码行业的朋友的看法,对这个想法进行了一下初期的规划:

After some internet searching and hear some advises from friends, I have a initial plan.

开发语言以C#为主,采用SQL进行数据存储。

Developing in C#, SQL for database.

一期工程:搭建简单的数据库录入和检索功能,并具有一定美观度的GUI。录入和检索功能主要是能够存储书目的基础信息,基础信息包括书名、著者、ISBN、其他必要信息以及图书分类号,这里尤其强调图书分类号,我打算同时采用中图法、国际十进法和杜威法三种。

Stage One. Simple library data input and searching function. Proper GUI. Basic information of books are title, author, ISBN, Classification and other necessary section. For Library Classification, I decide to use Chinese Library Classification(CLC), Universal Decimal Classification (UDC) and Dewey Decimal Classification(DDC).

二期工程:能够录入书籍封面、书籍简介、进一步以扁平设计和动态效果美化应用。

Stage Two. Cover image and book abstract of the books can be input. Flat design GUI and more appearance features.

三期工程:实现UWP功能。

Stage Three. UWP Construction.

四期工程:实现网络同步。

Stage Forth. Sync Function.

为了这一想法,需要进行大量的学习,C#,数据库,UWP,GUI设计……想必这也是兴趣对“自强”这一目标的督促把。要不,先给这个工程取个名字把。

To achieve these stage goals, more studying is coming, C#, database, UWP, GUI design… I think that is kind of power can push one to strengthen oneself with knowledge. Why not start with giving a name to this project?

书阁。

ShelfCollect.

04/05/2016 – 1/700 HMS ‘Rodney’ Battleship Scale Model – 1/700比例皇家海军‘罗德尼’号战列舰模型

(English version follows Chinese Part)

20160504-HMSRodney (1)


自从小学以来就没有再接触舰船模型,这次想起来要做一个战列舰模型,是因为Wargaming出品的‘战舰世界’游戏上线了,玩起来还不错,觉得可以做一个真实的模型放在房间里。况且,战列舰这种钢铁力量的象征,大部分男孩都会喜欢吧。

Since last ship model finished in my primary school, I have not touch them again until recent month. I did have fun in playing WOWS a internet game from Wargaming. So why not have a real model in my bedroom? After all, most boys will get passion in battleship, a symbol of power and steel.

因为很久没有制作过舰船模型,所以觉得1/700比例的小规模船模会比较适合,况且这样可以在较短的工期内完成,大小也适合摆在桌面或书柜里。因此,购买的是田宫77502套件,1/700比例的英国皇家海军‘纳尔逊’级二号舰‘罗德尼’号战列舰,以及改造蚀刻片和金属炮管,总共约花费100人民币。零件全家福如图1。

As I said, I did not get close to ship model for decade. A small one of 1/700 scale will suit me and I can spend less time on it. A tiny ship can also have a place in my bookcase. I choose No.77502 ‘HMS Rodney’ pack produced by TAMIYA with PE and metal gun barrels. They cost me about CNY100 (≈USD15). They are listed in fig.1.

20160504-HMSRodney (6)

图.1(Fig.1)

由于是1/700比例的廉价套件,细节并不算很丰富,所以就完全按照说明书直接组装了,唯一不同的是在一些部位换成了金属蚀刻片,以期增加效果。当然,战列舰的灵魂就是主炮,所以必须要通过更换金属炮管体现细节,如图2。

You can’t expect for too much details of a cheap model pack. So I set up the ship just by following the manual. Exchange some parts into PE at most. Of course, the soul of a battleship is the gun. Replacing the plastic parts by metal barrels makes it handsome! Check fig.2.

20160504-HMSRodney (8)

图.2(Fig.2)

另外一个重点就是战舰甲板。很长的一段时间内,战舰甲板都是木质拼接的,所以涂装上要特别处理。1/200、1/350等大比例船模主要通过更换木片、遮盖喷涂分色等方法来实现木甲板的色彩效果,我在网络上也找到了1/700小比例船模进行遮盖喷涂分色的例子,大多是精益求精的高级作品,然而我这次是‘练习作’的定位,就不太适合这种较为繁复的手法。因此我决定喷涂底色,再手涂杂色的方法实现效果。如图3。

Another key is the deck. For a long period, deck of battleships are stitching woods. Special steps must be done during painting. Usually, replace the deck with real wooden board or cover-spray painting will work well on big scale model such as 1/200 or 1/350. But only a little examples I can find on the internet for 1/700 model. Besides, what I plan to finish is a “practice work” of ship model, which will not require too much effect. At the end, I spray painted the deck and drew the wooden texture by hand as fig.3.

20160504-HMSRodney (7)

图.3(Fig.3)

按照说明书一步步组装、涂装,最后效果还不错,如图4。

Assembling and painting. Look nice! Check fig.4.

20160504-HMSRodney (16)

图.4(Fig.4)

另一个重头戏是制作场景地台。海洋场景的地台一般有两种材质,一种是玻璃胶或树脂,另一种是石膏。水纹制作也有两种方法,一种是手工模仿,另一种是利用锡箔纸做模具。正如前文所说,‘练习作’的定位让我选择了难度最低的方法,锡箔纸模具浇筑石膏成型。

Sorry, there’s one point I have to express. The platform of the model, an “ocean” platform. People use two main materials to build the model platform: glass glue/silicone or gypsum. Waves also have two method to present: molding or forming by hand. The easiest and cheapest way I choose is gypsum molding. With tinfoil.

锡箔纸怎么做成水纹模具呢?很简单,家里的厨用锡箔纸取合适大小,揉成团,然后再展平,就变成水波纹的样子了!如图5,6。

How can tinfoil form gypsum into water waves? Simple. Fetch proper piece of tinfoil you need, crumple it, and unbend it. Check fig.5 and fig.6.

20160504-HMSRodney (9)

图.5(Fig.5)

20160504-HMSRodney (10)

图.6(Fig.6)

再用轻木片组合围成模具侧边,如图7。

Woods are used to set up the rest parts of the mold as fig.7.

20160504-HMSRodney (11)

图.7(Fig.7)

就可以浇筑了。仿照网上的多种说法,我配置的石膏比例是:

Start casting! My formula is learned from internet:

石膏粉:白乳胶:水 = 5杯:3/4杯:2杯

Gypsum powder : white latex(glue) : water = 5 cups : 3/4 cups : 2 cups

另外特别注意的是,为了增加石膏筑型的强度,我分两次浇筑石膏,两次之间铺了一块浸湿的纱布作为骨架。浇筑完成以后如图8。

Additionally, I poured the mixture in two steps. I placed a piece of wet gauze between them. The gauze can work as the frame of the platform and strengthen it. Fig.8 shows the situation after casting.

20160504-HMSRodney (12)

图.8(Fig.8)

石膏大约30分钟就硬化了,但是为了干透,我还是让它在阴凉处晾了一天才进入下一步。脱模以后发现水纹效果不错!(图9)

The gypsum solidify in about half hour, but I waited for a day until it dry out. It look like real water surface when I demold the tinfoil! (Fig.9)

20160504-HMSRodney (13)

图.9(Fig.9)

下一步就是按照船型挖出安放槽,挖出来的石膏碎块不要扔掉哦!后面还有用处。海洋地台表现船舶航行动态的细节就是船身周围激起的浪花,这个也有很多材料、方法来制作,但无外乎通过手工模仿,基本不能通过模具实现。一开始我想通过玻璃胶来成型,但需要额外购置,看到网络上有人通过专门的模型AB补土来制作,就想到家里还有许多装修时剩下的AB胶(环氧树脂型),但AB胶有个问题,太稀,不容易制作成立体形状。我就突发奇想,将AB胶和之前挖下来的石膏碎屑混合制成‘补土’怎样?立刻付诸实践,均匀碾碎石膏碎屑,混入等量AB胶。虽然流动性还是有点高,但至少能够堆叠起来,所以不能着急,一层固化再叠一层,最后修刮成型,效果竟然意外地好!因为石膏碎屑大小形状不均匀,甚至还额外凸显出了海浪中浪花气泡的效果。未上色时的效果如图10。

The next step is digging a groove for the ship. Remember, don’t waste the gypsum fragment you dig out, its useful later. An “ocean” platform can not leave neither waves nor spindrift. Most articles in the internet talk about using model AB putty, but I realized that I shall fix the normal AB glue(epoxide resin) with gypsum fragment. Shape it into spindrift layer by layer. Well, the result is much far from surprise I think. Ragged gypsum fragment appears as the bubble and white water of waves! Fig.10 shows the appearance before painting.

20160504-HMSRodney (14)

图.10(Fig.9)

最后用丙烯颜料(事实上,我制作所有模型的地点都是在卧室,为了安全起见,包括模型本身在内的部件,所有上色都用的是无毒的丙烯颜料)给水面上色。‘罗德尼’号隶属英国皇家海军,英国地处北大西洋,水面颜色自然以北大西洋为蓝本,所以搜索了一些北大西洋的洋面图片作为配色参照。如图11。

I use acrylic color to paint the “ocean” surface of the platform (Actually I paint all of my models by acrylic color because of its safety and nontoxic feature). HMS Rodney sever in UK located in North Atlantic. So I search for some North Atlantic ocean pictures as my sample. As fig.11.

20160504-HMSRodney (15)

图.11(Fig.11)

最后再通过蓝渐变色、白色干扫的方法给浪花上色,整个地台在阴处静止了两天至石膏和颜色彻底干透,用白乳胶将船模彻底固定在地台上,大功告成!

A little decoration with light blue and white by dry sweeping. Drying the platform at a cool shade corner for three days, and finally glue the ship onto the platform. JOB DONE!

Enjoy following photos!


20160504-HMSRodney (4)

20160504-HMSRodney (3)

20160504-HMSRodney (5)

20160504-HMSRodney (2)

13/03/2016 – Haircut myself – 自理头发

(English version follows Chinese Part)

大概从几岁的幼年开始一直到高中再从大三开始至今(大一大二时因为中二年纪留的较长头发略去不表),我都一直是比较方正的短发头型,但是要保证风格统一的发型还真是件难事,小学期间因为都仰赖家附近理发店里三四个比较熟悉的理发师,一直都能维持稳定。但初中开始,高中,大学期间,给我理发的理发师除了经常变换,就算是连续给他剪头发,也都还是不能记住我的风格,又要重新解释“这个怎么剪怎么剪……”。

My hair style has not been changed for dozen years (special situation during first two years in university with long hair because of idiot me) , my short haircut is some kind of difficult staff to maintain. Thanks to hairdressers near to my home, it was still easy to take good care of my hair style. However, things will not always go as your wish. Since junior high school years, not only changing of my hairdressers but also forgetfulness of them were bothering me. I had to discuss how to make the exact style I want every time those years.

终于我忍不住了,在大四的时候网购了一个电推子,附送了点工具,打算自己剪!

My patience is limited. I bought a electric hair clipper with some tools in forth uni-year. Do it myself!

第一次自己剪头发是悲剧学到了一点技巧。悲剧的原因不太成功是因为:一是不了解电推子的威力,一下手发鬓就剪得太薄了;二是不会用梳子,所以剪得坑坑洼洼。还好只是自己剪了发鬓,没有剪头顶,所以最后赶紧去理发店给修了回来;三是没办法看到后脑勺,自己剪不了。

The first try was tragedy taught me with experience. It was not success for these reasons: I cut to much hair when I handle the clipper first time, muscle control needs practice; There will be potholes  without comb; Nothing can be cut from back of your head until you have second mirror. Luckily I stop my haircut before out of control – I only cut the hair on the temples. And I sought for rescue in barbershop at last.

之后因为有点心灰意冷,便没有再给自己理发的打算。但偶尔还是拿理发剪刀给自己修修刘海,修修发脚。修着修着意识到其实就是缺镜子缺梳子嘛,再试一次好了。

Honestly, I was upset and decided to give up. But it was OK with my skill in trimming  my fringe with scissors. After I realized the core factors are comb and mirrors, Plan B was on the way.

第二次剪已是几个月后的前些天。这次充分吸取了上次的教训:老老实实用限位梳确保不会剪得太多;认真用梳子比划了发型,提前练习了另一只手操作梳子;找了另一块小镜子配合屋里的穿衣镜,能够看见后脑勺。

Few months later, the well trained guy gave a second try days ago. Limit comb was used to prevent over cutting, previewed the hairstyle with comb on my left hand and the second mirror for back-head-haircut.

最后的结果是图就不放了:总体上比较成功,理出了需要的发型,没有坑洼,厚薄均匀。仍需改进的地方就是:发脚发鬓因为用了限位梳所以太厚,下一次再练习练习直接剃。

Well, happy ending no picture :approached my hair style, no potholes, average thickness. Need to promote: too thick at the hair on the temples.

总结下来,就是:一定要会用梳子,一定要有第二块镜子

Conclusion, there must be comb and two mirrors.

我所用到的工具如图1,分别是:①充电理发器(加限位梳)②美工剪刀,修发脚③理发剪,剪头顶长发的长度④梳子⑤架在相机三脚架上的小镜子,配合穿衣镜看后脑勺。

My equipment shown on fig.1,

①electric hair clipper (with limit comb) ②art scissors, trimming hair foot ③haircut scissors, trimming long hair ④comb ⑤second mirror attached to the camera tripod.

20160313-haircut

图.1(Fig.1)

Journal – 09/01/2016 – Bike Drive System Maintenance – 山地车传动系统维护

(English version follows Chinese Part)

2014年暑期买回来的山地车(更多细节,点击查看历史日志)按照“行者”APP的记录,到今天已经行驶了600km,在骑行爱好者里绝对算不上多,不过也小有成就感。由于正常的损耗,最近传动系总是传出轻微尖锐异响,我决定检查检查,算作里程保养了。这里不得不首先提一下我的自行车工具套装(如图1),非常实惠,是我在淘宝上花了179RMB买的,其工具之齐全,可以胜任绝大多数自行车维护工作,之前的保养、换胎以及这次的保养工作都用到了这里面的工具。

Since 2014 I owned my mountain bike (Check past post), Xingzhe APP marked about 600 km. It is not outstanding among biking buffs, but I am proud of it. Then fray on my bike has its signal, little noise from transmission. Checking and repairing would be a good choice, when it is time to so some regular maintenance. I have to introduce my tool box as Fig.1, this cheap and useful box took me only  27 USD. Almost every maintenance step can be done with tools from the box. It is a example that I changed tires with tools last time.

20160109-bike (6)

图1(Fig.1)

循声而去,发现异响来自后拨链器的两个导轮(如图2),那就拆下来看看,发现除了污物侵入了轴承,润滑脂也基本耗尽。彻底清洁后如图3,接着再涂抹上新的润滑脂,装好复原,异响消除。

Follow the noise, problems are from two pulleys as Fig.2. Remove them and you can see those dust and dirt without less grease. Cleaning has been done then renew pulleys function so well with no noise again.

20160109-bike (5)

图2(Fig.2)

20160109-bike (3)

图3(Fig.3)


后来想想,反正都把工具、耗材拿出来了,那就再把整个传动系都保养一遍,按照教程里的步骤,拆下了整个中轴部件,如图4。

Anyway, tools and materials have been taken out, I decided to check the whole transmission system according to the user guide book. Parts of bottom bracket have been shown on Fig.4.

20160109-bike (4)

图4(Fig.4)

发现中轴使用的是163110-2RS滚珠轴承(如图5、6),可以说是自行车中轴里最广泛的型号,如果要更换的话也不麻烦。没什么大问题,就是在用手慢速转动的时候,某个特定位置稍有阻力,可能是长期骑行后有滚珠磨损较大,或许与个人的骑行习惯有关。这点情况并不碍事,组件里没有发现太多污物,润滑剂也没有太大损失。稍作清理,更新部分润滑剂就原样装回了。

I found out that bearing is type 163110-2RS (Fig.5 &6), which is widely use in bike industry. It would not be difficult to find a spare for it. Maybe I have bad habit in riding, a little obstacle can be feel when I rotate the bearing until a special position. Not big deal. Cleaning and assembling.

20160109-bike (1)

图5(Fig.5)

20160109-bike (2)

图6(Fig.6)

最后还稍微调整了一下前后拨链器的行程。本次保养完成!

Adjustment has been done to front derailleur & rear one. Job done!

08/11/2015 – Commuter Bike Upgrading – 通勤自行车升级维护

(English version follows Chinese Part)

我的通勤自行车车是2007年买的普利司通27寸三挡变速车,至今使用已逾8年,初高中日日往返于家和学校间,里程不胜计数。大学期间在外地读书,车便久置,回家后无需专门恢复调校,车胎打足气便可继续上路,车况良好。

My commuter bike is a Bridgestone 27″ 3-gear-bike bought in 2007 for daily transportation during secondary school years. It is still function well today after 8 years and countless miles working. What’s more, when I went to university far from hometown, the bike left unused for years can still do its duty after aerating without rust or repairing.

唯独两个地方需要维护升级。一是支撑车的脚撑,年久生锈,折弯部应力集中而破坏,27寸自行车又体型高大,停车时总是重心不稳,自行车不时发生倒伏。二是变速线损坏,档位只能固定在最高速档,骑行起来实在有些费力与不变,尤其是起步时。这两个问题是高中毕业时出现的,当时考虑到马上离乡读书,车不常用,遂未考虑将之解决。如今终于下定决心,又拜神奇的X宝能够买到合适的配件,给通勤车恢复最佳车况。

But it also getting old. Two things have to be fixed. Firstly, the bike stand crash because of rust and stress concentration, and the 27″ bike frame has high center of gravity that will make it worse. Then, the shift cables lost part of it which is indispensable for gear changing. 

These problems were not fatal so I ignored them for years. Thanks to extremely rich kinds of  merchandise sold in Chinese web shops, I searched out the exact type of  spare parts fix my bike, and I made the decision to upgrade her.


首先是更换脚撑。原配的脚撑是单边式,在损坏前还勉强支撑27寸大车不倒,如今在冲压件折弯处开裂,实在无法堪用。考虑到一劳永逸地解决泊车不稳的问题,网购了双梯式脚撑,这样架起车来便稳稳当当。图1便是换下的脚撑和泊车状态的双梯脚撑。

Waiting the spare part of gear-change, I replaced the bike stand at the first time. The original one was prop stand that is too weak for supporting 27″ bike, I bought a double kickstand instead. Retired stand and the new one shown in Fig.1.

20151108-BikeUpgrading (7)

图.1(Fig.1)


第二个问题是变速器控制线损坏导致无法变速的问题。

The gear-change problem was solved the other day.

先解释下禧玛诺NEXUS变速器(维基百科链接)外部控制的原理。图2是外观,图3是原理图。如图3(a)是变速控制线释放状态,变速杆伸出,档位是1档,速度最慢。当手拨调高档位至2或3档到高速档时,控制线绷紧,杠杆将变速杆压入轴内,改变内变速传动比。注意图3中的钢珠,那个是控制线拉动杠杆的施力件,我的自行车的控制线钢珠脱落了,所以没法拉动杠杆变速。

It is SHIMANO NEXUS 3-speed-change system (Wikipedia Link) . You can see what’s it like in Fig.2 and how it woks in Fig.3. When control cable release at Gear-1 (Low), the pin was released, too (Fig.3(a)). After you turn the shift lever set by right hand, the cable tension and the pin is pressed into gear-box by pry bar that will change the gear ratio at Gear-2 or Gear-3 (High), as you can see from Fig.3(b).

20151108-BikeUpgrading (6)

图.2(Fig.2)

20151108-BikeUpgrading (8)

图.3(Fig.3)

坏掉的控制线末端如图4。

The tail of  broken cable as Fig.4.

20151108-BikeUpgrading (5)

图.4(Fig.4)

由于钢珠是直接包紧控制线末端的,我的工具条件没法自制维修。原打算是在钢丝末端打一个结来替代钢珠的作用,但是发现钢丝弹性太大,没法成型。所以只好更换整条控制线。如图5,网购的控制线到货了,左侧是变速器端,右侧是手拨端。

The iron ball was attach to the wire rigid that I can not fix by tools I have, and the plan that tight knot was failed. Then I have to replace the hole control cable. Luckily I found it in web shop. Look at the Fig.5, the left side iss the end at gear-box side and the right one should be attached to controller at the handle-bar.

20151108-BikeUpgrading (3)

图.5(Fig.5)

换好后的样子如图6(变速器端)和图7(手拨端)。

That is the appearance of gear-box side (Fig.6) and the hand-controller (Fig.7).

20151108-BikeUpgrading (1)

图.6(Fig.6)

20151108-BikeUpgrading (2)

图.7(Fig.7)