破渔网兜兜 发表于 2017-8-21 08:35:47

【2017-8-21】每天进步一点点

翻译原文: An example of such a pattern is the publisher-subscriber pattern, consisting of a module (the publisher) that must send copies of its “publications” to other modules (the subscribers). As a specific example, consider a collection of data that is being displayed on a computer screen in more than one format--perhaps as a pie graph as well as a bar graph--simultaneously. In this setting, any change in the data should be reflected in both graphs. Thus the software modules in charge of drawing the graphs should be notified when changes in the data occur. In this case, then, the software module maintaining the data plays the role of the publisher that must send update messages to the subscribers, which are the modules charged with drawing the graphs.

翻译答案:这种模式的一个例子就是出版商和订户的模式:一个模块(出版商)将其出版物发送给其他模块(订户)。作为一个特殊的例子,考虑在计算机屏幕上同时显示多种格式的数据集,如饼图和条形图。这样,任何对数据的修改都将会被反映在两张图上。因此,当数据发生更改的时候,这个负责画图的软件模块将会被告知。在这种情况下,维护数据的软件模块就会扮演出版商的角色——它必须要给订户发送更新的消息,而这些订户也是模块,它们负责画图。

读完一本书翻译原文:In the middle of the summer Moses the raven suddenly reappeared on the farm, after an absence of several years. He was quite unchanged, still did no work, and talked in the same strain as ever about Sugarcandy Mountain. He would perch on a stump, flap his black wings, and talk by the hour to anyone who would listen. ‘Up there, comrades,’ he would say solemnly, pointing to the sky with his large beak—‘up there, just on the other side of that dark cloud that you can see — there it lies, Sugarcandy Mountain, that happy country where we poor animals shall rest for ever from our labours!’ He even claimed to have been there on one of his higher flights, and to have seen the everlasting fields of clover and the linseed cake and lump sugar growing on the hedges. Many of the animals believed him. Their lives now, they reasoned, were hungry and laborious; was it not right and just that a better world should exist somewhere else? A thing that was difficult to determine was the attitude of the pigs towards Moses. They all declared contemptuously that his stories about Sugarcandy Mountain were lies, and yet they allowed him to remain on the farm, not working, with an allowance of a gill of beer a day.
翻译答案:
 仲夏时节,乌鸦摩西在失踪数年之后,突然又回到庄园。他几乎没有什么变化,照旧不干活,照旧口口声声地讲着“蜜糖山”的老一套。谁要是愿意听,他就拍打着黑翅膀飞到一根树桩上,滔滔不绝地讲起来:“在那里,同志们,”他一本正经地讲着,并用大嘴巴指着天空——“在那里,就在你们看到的那团乌云那边——那儿有座‘蜜糖山’。 那个幸福的国度将是我们可怜的动物摆脱了尘世之后的归宿!”他甚至声称曾在一次高
空飞行中到过那里,并看到了那里一望无际的苜蓿地,亚麻子饼和方糖就长在树篱上。很多动物相信了他的话。他们推想,他们现在生活在饥饿和劳累之中,那么换一种情形,难道就不该合情合理地有一个好得多的世界吗?难以谈判的是猪对待摩西的态度,他们都轻蔑地称他那些“蜜糖山”的说法全是谎言,可是仍然允许他留在庄园,允许他不干活,每天还给他一吉尔的啤酒作为补贴。
   翻译篇(每次翻译的量都不会很大,全部翻译才有奖励哦)




非计算机方向系列:读完一本书(这是一本经典书籍,里面的每一个单词都值得查阅)




       每日一句
Every sweet has its sour; every evil its good.
甘饴有其酸涩,恶人亦有善行。 (刮刮乐,挂出大奖)

WeiChat阿威 发表于 2017-8-21 20:02:24

在他的腿好一些之后,Boxer更努力的工作了。甚至,所有的动物都像奴隶一样的在工作。除了在农田的工作之外,风车的再次重建工作,还有从三月开始的建给小猪的学校。有时候,长时间的缺少食物,让动物们很难忍受,但Boxer从来没有犹豫过。他不言不语,坚韧的工作者,就像身体没有受过伤似的。
只是他的外表开始了一点点的变化:他的皮毛变得不再像以前那么光亮,他强壮的腿部也渐渐瘪了下来。有动物说,等春天来了,Boxer会回复强壮的身体的;然而,等到了春天,Boxer也没有变的肥膘。很多时候,在采石坑的顶部,当他用身体苦苦支撑搬运更多的石头,这看起来是一股执念支撑着Boxer。
这段时间来,挂在他嘴边的话都是,“我会更努力的工作”,一直碎碎念着。
再一次,本杰明和Clover警告Boxer要注意身体,但Boxer总是毫不在意。在他十二岁的生日来到了。他眼中只有关心在他退休前能积累多少的好石料。

{:10_254:}

zlj19931010 发表于 2018-2-15 19:07:25

另一个设计模式的例子是容器-组件模式。描述了一种概念,一个容器包含多个组件,而这些组件对他们自身而言又是容器。
开源系统中使用的文件管理方式中的目录和文件夹就可以例证这种模式。每一个目录一般来说会包含其他目录,其中的目录
还会包含更多的其他目录。简单来说,这汇总容器-组件设计模式就是阐述了一个容器包含容器的递归概念。


动物农场:
在boxer的蹄子痊愈之后,他工作得比以前更加努力了。确实,所有动物在那年像个奴隶一样地工作了一年。
除去农场的日常工作和风车的重建事务不说,还有为小猪们建造学校的任务,这个任务在四月份也开始了。
有时候,长时间的饥饿劳动很难忍受,但是boxer从来都没退却过。他说的和做的事情没有任何迹象表明他的力气不如以前。
只是boxer的外表有了一点改变;他的皮毛没有以前那么有光泽了,他的健壮的臀部似乎比以前缩小了。其他动物说,
只要有春天的青草吃,boxer还是会变得和以前一样的;但是春天来了,boxer也没有长胖。有时候在斜坡上把石头拖拉到采石场最高处的时候,
当他在用他的肌肉支撑那些大石头的时候,看起来好像只能靠着意志力来撑着了。在这些时候,boxer嘴里好像在说‘我会更加努力工作’;
他不说话了。clover和本杰明再一次提醒他要注意自己的身体健康,但是boxer并不在意。他的12岁生日马上就要到了。
他不关心会发生什么事情,只要在自己退休之前有足够的石头被累积下来。

Every sweet has its sour; every evil its good.
甜蜜中带着苦涩;邪恶也会有善良的一面。
页: [1]
查看完整版本: 【2017-8-21】每天进步一点点