-->
Home | Expand Collapse | OPML | Previous | 2008-06-30 Mon | Next | Blog | Power by Lilina
 123
 123

  2008-06-30 Mon

20:01 让生活搜索走进我们的生活 (2059 Bytes) » Google 黑板报 -- Google 中国的博客网志


最近,可能比较细心的网友已经发现:在我们的主页上增加了一个生活搜索的动画图标。自此,除了通过主页左上角的 OneGoogle 之外,大家还可以很方便地由下面的动画图标直接进入生活搜索的页面。

    


除了增强进入主页的便捷性以外,我们还重新整合了生活搜索的功能。在原有房屋、餐饮、工作和票务搜索的基础上,我们把大家平时关心的电影信息也加入到生活搜索的大家庭来,使大家的休闲娱乐方式更为丰富。周末看电影,查找距离自己最近的影院,了解最 in 的大片,生活搜索一网打尽。

    


另外,在房屋信息中,我们新增了全国多个城市租房以及二手房的价格走势图。大家可以根据自己的兴趣和需要,预先设定固定的时间段来了解你所关心城市的相关房市情况。拥有自己博客的用户,还可以将这个趋势图添加在自己的博客上。这样,每次登陆自己博客的时候就能了解最近的房价趋势。

    



我们衷心的希望,生活搜索能真正的走进大家的生活,给大家的生活带来便捷。
17:17 Ctalk 0.0.59a Released (387 Bytes) » PLNews: Programming Language News

Ctalk 0.0.59a has been released. Ctalk is an object-oriented extension to C.

This release includes improvements to the evaluation of method arguments.



From: Ctalk 0.0.59a Released

17:15 dfsch 0.2.1 Released (533 Bytes) » PLNews: Programming Language News

dfsch 0.2.1 has been released. It is a programming language drawing mainly from R5RS Scheme and Common Lisp.

This release includes: support for additional numeric types, support for object properties, support for custom hash types, and other changes.



From: dfsch 0.2.1 Released

12:41 Resyncing table on MySQL Slave (10598 Bytes) » MySQL Performance Blog

Sometimes MySQL Replication may run out of sync - because of its own buts or operational limitations or because of application mistake, such as writing to the slave when you should be only writing to the master. In any case you need slave to be synced with Master.

To discover the difference between Master and Slave you can use excellent Maatkit tool though if you you just need to resync small single table it may be easy to do it other way:

Assuming your table schema does not change you can do something like this on the master:

LOCK TABLE tbl WRITE;
SELECT * FROM table INTO OUTFILE '/tmp/tbl.txt';
DELETE FROM tbl;
LOAD DATA INFILE 'tmp/tbl.txt' INTO TABLE tbl;
UNLOCK TABLES;

This will dump master's table content to the file clean the table on master and slave and refresh it on both of them.

This obviously makes table inaccessible on master for duration of operation but for small tables it can take just few seconds.

This trick is of course quite dirty, especially if you're dealing with sensitive data - what if you run out of space or SELECT INFO OUTFILE fails for other reason and you proceed with deletion you may kiss your data goodbye.

Alternative would be not to drop the table but rather raname them. Unfortunately you can't rename locked tables (ERROR 1192 (HY000): Can't execute the given command because you have active locked tables or an active transaction) - this is also I used DELETE instead of TRUNCATE to clean out the table.

In the applications which are error tolerant (like handle errors properly) you may rename table instead of locking - for many applications this works better anyway as having table locked causes connections to pile up and either MySQL runs out of connections or Apache out of children allowed to process request;

So you can do following instead:

SQL:
  1. mysql> RENAME TABLE rep TO rep_maint;
  2. Query OK, 0 rows affected (0.01 sec)
  3.  
  4. mysql> SELECT * FROM rep_maint INTO OUTFILE '/tmp/rep.txt';
  5. Query OK, 0 rows affected (0.01 sec)
  6.  
  7. mysql> CREATE TABLE rep_new LIKE rep_maint;
  8. Query OK, 0 rows affected (0.00 sec)
  9.  
  10. mysql> LOAD DATA INFILE '/tmp/rep.txt' INTO TABLE rep_new;
  11. Query OK, 0 rows affected (0.01 sec)
  12. Records: 0  Deleted: 0  Skipped: 0  Warnings: 0
  13.  
  14. mysql> RENAME TABLE rep_maint TO rep_old, rep_new TO rep;
  15. Query OK, 0 rows affected (0.00 sec)

This way you never actually delete any data and besides same data loaded to "rep" table you will get the copy of old table in "rep_old" - this can be very handy if you would like to later investigate why data got out of sync and may be do some manual touch ups after you resync the data.

Note - this process works well for small tables when you do not want to shut down the master and slave. If you need quick resync of large amount of data it is much better to use LVM snapshots or similar techniques - these are much faster.


Entry posted by peter | 5 comments

Add to: delicious | digg | reddit | netscape | Google Bookmarks

07:01 中国海军无名舰系列 名不副实黄河舰 (10663 Bytes) » 萨苏的BLOG
黄河号登陆舰,是解放军海军东海舰队登陆舰支队14大队的一艘中型战车登陆舰,舷号931。1953年2月23日,毛公曾为该舰题写过一次“为了反对帝国主义的侵略,我们一定要建立强大的海军”的题词。但是除此以外,大多数时候该舰默默无闻。

黄河号所属的级别“河字号”,是美国制造的LSM中型战车登陆舰,国民党海军以“美字号”命名。这种结实可靠的军舰海峡两岸都有大量使用。当然,美国人是 不会卖给解放军这种装备的,人民海军的“河字号”都是国民党在大陆时期留下的,包括交给招商局使用的12艘,如“运河号”,“滦河号”等等。唯独有一艘比 较另类,就是这艘黄河号,它是原国民党海军海防第二舰队的“美盛”号,1949年随林遵起义。


解放军海军一艘河字号舰在进行登陆训练
http://www.cchere.net/article/1650687

“河”字号登陆舰全长62米,宽10.5米,前吃水1.2米,后吃水2.2米,标准排水量为743吨,采用向前倒的“开口笑”式前舱门以便组织登陆作战,该级舰满载排水量1095吨,主机为2台柴油机,功率2880马力,最大航速14节;可运载5辆中型坦克。

值得一提的是所有河字号的武器都是重新装备的苏式火炮。相对于国民党军把美字号改造成“钢铁刺猬“,解放军的河字号仅仅安装3门37 毫米双管舰炮,2门25毫米双管舰炮,火力并没有那样变态。这主要是因为国民党海军没有使用炮艇或者鱼雷艇进行“狼群”式攻击的战术,所以,河字号的装备 仅仅用于自卫。比较有特色的是该舰加装了布雷轨,因此这种登陆舰也可以充当布雷舰使用。http://www.cchere.net/article/1650687


解放军海军的三艘河字号登陆舰 – 黄河,淮河,滦河。留在大陆的LSM没有进行类似台湾“新美计划”那样的大规模改装,因此形状一直是舰桥歪在一边,敞开的车辆甲板,倒是较好地保留了原始风貌。

http://www.cchere.net/article/1650687
对比于东海舰队,南海舰队的登陆舰艇少得可怜,以至于1974年收复西沙群岛的时候,攻打珊瑚岛的部队竟然是用冲锋舟和橡皮筏完成的登陆作战。看看东海的 地图,大家可能都会理解为何在东海舰队部署如此众多的登陆舰艇了。五十年代两岸最激烈的几次登陆大战,除了海南岛之战外,都是在这里展开的。

不过,由于当时解放军对仅有的几艘现代化登陆舰视若珙璧,所以大多数登陆战出场的还是风帆木船,黄河号登陆舰露面的唯一战役,是一江山岛登陆战,不过由于 解放军当时并没有两栖战车,河字号登陆舰并没有在第一线露面,只承担了把登陆部队转运至石浦港前进基地的任务。此后,该舰一直在东海舰队服役,1976年 仍在作战序列之中,可见其生命力之强。
http://www.cchere.net/article/1650687
黄河号的具体退役时间没有公开的资料,新一代931“黄河舰”是一艘玉康级新式大型登陆舰,在1985年服役,因此,估计此前老黄河号已经退役了。

七十年代后期的黄河舰

http://www.cchere.net/article/1650687
说起来,这条黄河号登陆舰的舰史也有辉煌的一面。

在国民党海军中,它是抗战胜利后海军在青岛最早接收的登陆舰之一,1949年林遵组织海防第二舰队在芜湖易帜的时候,就是乘该舰到达旗舰永嘉号开会讨论这一问题的。
http://www.cchere.net/article/1650687
该舰在这次行动中还摆了一次乌龙 – 行动中反对起义的永嘉舰舰长陈庆堃脱队,率舰向下游开去,由于当时林遵已经转到惠安舰但没有降下永嘉舰上的司令旗,很多军舰以为是林遵改变主意率舰突围 (下游江阴炮台已经被解放军占领)纷纷随之行动。美盛(黄河)舰也是其中之一。幸好该舰开着电台,听到林遵的呼叫才与永绥(长江)等舰返回。
点看全图
在美国海军中服役时候的黄河舰,当时的编号是LSM-433
http://www.cchere.net/article/1650687
该舰在解放军中的服役,虽然征战的机会不多,也颇有业绩可言。

美盛舰起义后被改名黄河舰,编入华东海军第五舰队。因为旧海军人员在第五舰队中数量太少,不敷分配,于是,从1949年4月开始,从解放军陆军来的人员经 过在南京海校的突击培训陆续上舰。他们后来都成为海军的骨干人员,美盛舰功绩不小。其中有一个军官,就是后来大名鼎鼎的中国人民解放军海军司令员张序三中 将。由于这些官兵毕竟没有海上工作经验,也出过不少问题。1949年11月,后担任北海舰队青岛基地政委的冯尚贤(原25师作战科长)就曾经在驾驶该舰时 因动作不灵活撞伤了西安舰(原日本海军198号海防舰)。
http://www.cchere.net/article/1650687
1953年,该舰奉命紧急运送救灾物资进入川江,开千吨大船进入川江之先河。由于二十世纪早期各国为了探索川江航道曾付出惨重代价,先后损失肇通,二见等舰船,黄河舰这个不引人注目的业绩,其实是很值得尊敬的。

那么,这样一艘军舰,为何被称作“名不副实”呢?
http://www.cchere.net/article/1650687
这是因为,黄河舰毕竟是一艘辅助舰只,海军成立以后,很多人认为用中国的母亲河黄河命名一条登陆舰有些不足。“黄河”之名应该给一艘强大的作战军舰使用才对。

而当时确实有一艘现成的大型军舰,有资格使用“黄河”的名字。
http://www.cchere.net/article/1650687
这就是原国民党海军重庆号巡洋舰。

  
1952年被打捞的重庆舰,它本来可能也成为“黄河舰”的

http://www.cchere.net/article/1650687
重庆号巡洋舰,原为英国海军曙光女神号,排水量5274吨,是二战中马耳他舰队的旗舰,战功赫赫。战后,该舰被英国政府赠送给中国。1949年2月25日,由舰长邓兆祥率领投入解放军。1949年3月20日,被国民党空军飞机击伤后自沉。

1952年,重庆号打捞成功。由于打捞重庆号使用了苏联的技术帮助,苏联方面拆去了重庆号的雷达,武器,射击指挥仪,部分能够使用的动力机器作为补偿。解 放军方面有意购买苏联武器和轮机重新装备该舰,命名为“黄河号”使用。但是,苏联方面报价太高,达到4亿卢布,中方无法负担,只好放弃。
http://www.cchere.net/article/1650687
有人认为,这是苏联方面不愿意让中方拥有苏联体制外的大型武器,因此故意从中作梗所致。因为当时参加打捞的老兵记得,军舰上的猪肉都没有坏掉,为何苏联人坚持说军舰在水中浸泡过久,各种系统都损坏严重呢?

中方对此似乎有所觉察,因此也没有遵循苏方意见拆解重庆号,而是将其舰体保存下来,试图用自己的力量修复。该舰长时间系于黄浦江白莲泾段江中,但是,由于当时的技术力量有限,修复工作一直进展甚微。
http://www.cchere.net/article/1650687
1959年,鉴于该舰修复困难,中方调整了计划,准备将该舰改装为一艘打捞救生舰使用,由江南造船厂进行改造。这个计划绕过了当时自制困难的大型火炮,雷达设备等关键部件,应该说是比较可行的,需要的费用不过200万元人民币而已。

说来令人心酸,由于重庆号(黄河号)的原有动力系统已经不能使用,而当时中国又不能制造这样大型舰只的轮机,修复重庆号(黄河号)的计划,竟然是准备利用 一条清代军舰上的动力系统。这艘军舰就是1937年为阻挡日军突破长江防线而自沉江阴的海容号巡洋舰。1959年6月,上海市救捞部门为了拓宽航道对这艘 老舰进行了解体打捞,结果这艘德国1898年制造的老舰的动力系统,在江水中沉没了二十年后,经过中国工程师的整修,依然可以工作!
http://www.cchere.net/article/1650687
这是中国工程师的奇迹,也是中国工程师们的耻辱吧。

遗憾的是,即便这个计划,也由于很快发生了“三年自然灾害”而不得不终止,重庆/黄河舰复活的计划,最终没能实现,它的躯壳此后一直作为渤海石油公司的海上宿泊船使用。
http://www.cchere.net/article/1650687
[完]
06:40 Vala 0.3.4 Released (811 Bytes) » PLNews: Programming Language News

Vala 0.3.4 has been released. Vala "aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C." It offers features such as: interfaces, properties, lambda expressions, local variable type inference, and more.

This release includes: improvements to the D-Bus client and service support, basic support for detailed signals, checking of printf argument types, new bindings, bug fixes, and other changes.



From: Vala 0.3.4 Released

06:38 GCC UPC 4.2.3.3 Released (554 Bytes) » PLNews: Programming Language News

GCC Unified Parallel C 4.2.3.3 has been released. GCC UPC adds support for Unified Parallel C to the GNU Compiler Collection.

This release includes: an update to GCC 4.2.3, bug fixes, and other changes.



From: GCC UPC 4.2.3.3 Released

06:35 amforth 2.8 Released (514 Bytes) » PLNews: Programming Language News

amforth 2.8 has been released. It is a Forth implementation for the AVR ATmega microcontroller family.

This release includes: the movement of the serial interface words to the application dictionary, a sieve benchmark example, bug fixes, and other changes.



From: amforth 2.8 Released

06:33 LispForum Announced (369 Bytes) » PLNews: Programming Language News

LispForum has been announced. It is a website with discussion forums dedicated to various Lisp-related topics.



From: LispForum Announced

06:30 B-Prolog 7.1 Released (615 Bytes) » PLNews: Programming Language News

B-Prolog 7.1 has been released. B-Prolog is a Prolog implementation with extensions for concurrency, constraints, interfacing with C and Java, and interactive graphics.

This release includes: performance improvements; improved memory management; new propagators for non-linear, global and disjunctive constraints; new examples; bug fixes; and other changes.



From: B-Prolog 7.1 Released

  2008-06-28 Sat

23:59 人性 » 猪猡记公园
20:01 日本记者穿越报道赤壁大战 » 萨苏的BLOG
07:01 “家里的太阳能发电厂” » 萨苏的BLOG

  2008-06-27 Fri

17:19 Tcl/Tk 8.6a1 Released » PLNews: Programming Language News
17:17 June 26 This Week in Ruby Now Available » PLNews: Programming Language News
17:16 June 26 Tcl-URL! Available » PLNews: Programming Language News
17:15 June 25 Haskell Weekly News Available » PLNews: Programming Language News
13:01 谷歌热榜推出高考专题 » Google 黑板报 -- Google 中国的博客网志
07:01 新书出版 梦里燕赵 » 萨苏的BLOG
03:04 Web Site Optimization: FrontEnd and BackEnd » MySQL Performance Blog

  2008-06-26 Thu

20:01 Google(谷歌)地图带你尽享欧洲足球盛宴 » Google 黑板报 -- Google 中国的博客网志

  2008-06-25 Wed

20:01 用户反馈的影响(一) » Google 黑板报 -- Google 中国的博客网志
17:57 从哈佛本科生教育模式看素质教育 » ★兔主席地洞★
17:28 June 17 to 24 Caml Weekly News Available » PLNews: Programming Language News
07:01 震碎的风景 » Google 黑板报 -- Google 中国的博客网志
07:01 土八路说日本话 » 萨苏的BLOG
07:01 摄象机接口的设计 » 云风的 BLOG

  2008-06-24 Tue

23:01 Percona is looking for a Perl and Python expert » MySQL Performance Blog
22:20 reservation reward 信用卡盗刷! » ★兔主席地洞★
20:33 松鼠很多 » ★兔主席地洞★
17:33 学院课程评估资料库整理: 进展顺利 » ★兔主席地洞★
17:18 newLISP 9.3.17 Released » PLNews: Programming Language News
17:16 Blue 1.5.8 Released » PLNews: Programming Language News
17:14 R 2.7.1 Released » PLNews: Programming Language News
10:57 Neat tricks for the MySQL command-line pager » MySQL Performance Blog
07:01 黑虎聂凤智的尴尬一刻 下 » 萨苏的BLOG

  2008-06-23 Mon

23:36 兔巴塞的事迹 » ★兔主席地洞★
22:31 回忆几位日本同学 (3) » ★兔主席地洞★
20:01 浪潮之巅 第九章 硅谷的另一面(二) » Google 黑板报 -- Google 中国的博客网志
Sources