|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
翻译原文:A common solution is to set aside a block of memory for the queue, start the queue at one end of the block, and let the queue migrate toward the other end of the block. Then, when the tail of the queue reaches the end of the block, we merely start inserting additional entries back at the original end of the block, which by this time is vacant. Likewise, when the last entry in the block finally becomes the head of the queue and is removed, the head pointer is adjusted back to the beginning of the block where other entries are, by this time, waiting. In this manner, the queue chases itself around within the block rather than wandering off through memory.
翻译答案:用来在计算机中控制队列的最一般的方法是为队列分配一块存储器,从存储块的末端开始存储队列,并且让队列向另一端增长。然而当队尾到达块的末端,即队列为空时,我们开始将新的条目反向于末端的方向插入。同样,当队列的最后一条成为队头并被移出时,调整头指针回到块的开端,同时在此等待。在此方法下,队列在一块区域内循环而不会出现内存溢出情况。
读完一本书翻译原文:
This had long been expected, and all preparations had been made. Snowball, who had studied an old book of Julius Caesar’s campaigns which he had found in the farmhouse, was in charge of the defensive operations. He gave his orders quickly, and in a couple of minutes every animal was at his post.
As the human beings approached the farm buildings, Snowball launched his first attack. All the pigeons, to the number of thirty-five, flew to and fro over the men’s heads and muted upon them from mid-air; and while the men were dealing with this, the geese, who had been hiding behind the hedge, rushed out and pecked viciously at the calves of their legs. However, this was only a light skirmishing manoeuvre, intended to create a little disorder, and the men easily drove the geese off with their sticks. Snowball now launched his second line of attack. Muriel, Benjamin, and all the sheep, with Snowball at the head of them, rushed forward and prodded and butted the men from every side, while Benjamin turned around and lashed at them with his small hoofs. But once again the men, with their sticks and their hobnailed boots, were too strong for them; and suddenly, at a squeal from Snowball, which was the signal for retreat, all the animals turned and fled through the gateway into the yard.
翻译答案: 这是早就预料到了的,所有相应的准备工作也已经就绪。斯诺鲍负责这次防御战。他曾在庄主院的屋子里找到一本谈论儒略·凯撒征战的旧书,并且钻研过。此时,他迅速下令,不出两分钟,动物们已经各就各位。
当这伙人接近庄园的窝棚时,斯诺鲍发动第一次攻击,所有的鸽子,大概有三十五只左右,在这伙人头上盘旋,从半空中向他们一齐拉屎。趁着他们应付鸽子的“空袭”,早已藏在树篱后的一群鹅冲了出来,使劲地啄他们的腿肚子。而这还只是些小打小闹的计策,只不过制造点小混乱罢了。这帮人用棍棒毫不费力就把鹅赶跑了。斯诺鲍接着发动第二次攻击,穆丽尔、本杰明和所有的羊,随着打头的斯诺鲍冲向前去,从各个方向对这伙人又戳又抵,而本杰明则回头用他的小蹄子对他们尥起蹶子来。可是,对动物们来说,这帮拎着棍棒、靴子上又带着钉子的人还是太厉害了。突然,从斯诺鲍那里发出一声尖叫,这是退兵的信号,所有的动物转身从门口退回院子内。
翻译篇(每次翻译的量都不会很大,全部翻译才有奖励哦)
非计算机方向系列:读完一本书(这是一本经典书籍,里面的每一个单词都值得查阅)
每日一句
You think you know someone. But mostly you just know what you want to know.
你以为你很了解某个人,但大多时候你了解的只是你想了解的部分。 (刮刮乐,挂出大奖)
|
|