Wednesday, 21 May 2008

灾区人民可以抱怨,其他人多做贡献,少废话

本来不想写什么关于这次5.12四川汶县8级地震,只是在我的twitter里记录了这个事件的发生。

我是一个党员,我觉得我自己是货真价实的,我集体观念和意识很强,虽然我喜欢看英雄主义题材的电影,但是我个人一直是相信集体,不愿以自己的意识来影响其他人,我希望世界是丰富多彩,而不是千篇一律的;我真的甚至很相信我党,这可能比较可笑。

我也是非常乐观和阳光的一个人,我很少看悲剧和恐怖电影,就连摄影展我也不愿意看那些反映阴暗面的,能反映阴暗面的艺术家在我眼里最多是二流,而真正能把美好的事情表现的无比美好,这才是真正的艺术;我希望,而且也确实如此,生活当中太多太多美好的东西,每天多看看这些,就知道活着是件多么幸福的事情了。我不羡慕那些所谓深刻的人,以他们的视角,生活太过丑陋,我情愿做像我这样的单纯的阿Q,把幸福留给自己,把痛苦留给那些为赋新词强说愁的有想法的人类吧。相比之下,我觉得我这种境界更为高明,至少我自己一直是这么认为。

恩,说了太多自己的东西,回到我想说的topic上吧。四川地震刚过,看到了很多感人的报告和义举,这几天每每看新闻报道,我都会热泪盈眶,鼻塞,珊珊没有我这么多愁善感,她一听到我抽鼻子的声音就会笑话我。可是不出所料,很快就看到不计其数的个人评论开始大量出现,每个人都是媒体,这点很好,可是他们的想法中怎么就这么多批判意识呢。就像那些八卦新闻,没有一个明星是完美的,都被那些八卦无聊的媒体和个人批个体无完肤,似乎以此彰显自己的个性,同样这次地震的反馈也是,那些批评之词就要赶超那些感人的报道了,什么建筑师都在干嘛,为什么救援部队2,3天才到,有多少人死于这段时间,我就纳闷说这些话的人怎么不动动脑子,建筑的偷工减料,经过这次的事情,政府会无动于衷吗?那些救援部队的官兵会看不到吗,这些事情交给我们的集体去处理就好了;而且没有学过建筑的,即便学过建筑的也不该妄加指责,这种天灾人祸和建筑的投入也需要和当时的资金情况相符合,不可能我们要建一个楼,必须达到五角大楼的施工质量才可以批准建造。
不过话说回来,那些点到“密集人群的活动场所,比如学校,施工质量和针对突发事件的设计需要加强”这个内容的文章都不错,不过妄加批评的和八卦新闻无异。
还有些人很极端,我要是不在我的msn签名中加个彩虹,我就冷血,我就没人性,etc.他们这种忧国忧民的意识很值得赞扬,不过不知道他们是否想过,这件事清牵动的不是他一个人,而是所有地球上的人类,不用他说,我也会想着为灾区做点什么;更让我不舒服的事,我加了那个彩虹,他和我说谢谢,我真的是很火,如果你要是受灾家属,我接受,如果不是,不用他谢,让人很反感,还是那种感觉,似乎只有他关心灾区,别人都冷血。这样的行动我不反对,不过太过离谱就没那必要,有那个时间,还是对灾区对祖国多做些事实,打一小时工然后捐款更有用,毕竟大家都不是聋子和瞎子,我们可以看到很多的报道,不用你来指挥我们做“善事”。
再有就是有人开始崇洋媚外了,这点我一直都很不喜欢。日本救援队挖出尸体后,排队默哀若干分钟。于是就有很多个人的评论出现说日本如何尊重生命。我看了这些有点为我们的军人鸣不平,如果我们的救援部队和志愿者每每就出一个人就如此,那在这段时间里又有多少人会死去,我觉得日本那种态度反倒愚蠢,相反,中国的将士,尤其四川籍的军人,他们是如何忍着内心的痛苦的在救援,他们即便没有任何言语和行动上的表示,可是夸张日本默哀的人是否会想到我们的军人内心是如何的痛苦呢。

负面新闻看得不多,希望看到更多好的报道,少点抱怨,世界会更好。

Monday, 12 May 2008

web brower family

Firefox : Gecko
Epiphany : Gecko
Konqueror : Khtml
Safari : WebKit (basing on core of Khtml)



Safari was based on the KHTML core that was developed for konqueror, however there are two parallel development processes: KHTML for KDE and WebKit for Safari. They do frequently share code and patches, but the two browsers are not identical.


Saturday, 10 May 2008

Free Iraq, Free Tibet, Very good cause!!

震撼!!!(+好听)

Friday, 9 May 2008

相比国内的奥运热情,我在london站在第一排看到了火炬算是幸运多了

Thursday, 8 May 2008

Proud of China! Shout of Peace from Chinese are on the top of world!

Proud of China! Shout of Peace from Chinese are on the top of world!

Wednesday, 7 May 2008

Matlab bugs about call external programs, such as Python

When I upgrade my OS to Ubuntu 8.04 and Matlab to Matlab 2008a, which is a fantastic version with a lot of optimizations and bug fixes.

But when I run my Matlab scripts, which using [system('python temp4python.py')] to do more system level jobs, I was prompted such a error message I've never seen before:/usr/local/matlab/sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by......

Why?
This similar message (or something like it) means that the loader is
linking to the versions of libstdc++ libraries supplied with Matlab,
and those versions do not correspond to the versions that your version
of Python was compiled against.


The fix!
(for me) was to navigate to the offending folder (/usr/local/matlab/sys/os/glnx86)
and make a new directory "old", and move all libstdc and libgcc files
into the "old" directory. Once done, the loader will be unable to link
with these libraries, and will be forced to use the ones installed in
your distribution instead.

Tuesday, 6 May 2008

Gnome-Do, super! set it up.

1. Install it.
2. Download extra plugins for it from its official website: https://wiki.ubuntu.com/GnomeDo/Plugins
3. Try to run every plugins, in this way, the corresponding config files will be generated. (You should goto 'gconf-editor'->apps->gnome-do->plugins to modify most of them.)

4(Optional). Goto ~/.config/gnome-dos/FileItemSource.config to modify the search path and depth.

Linux Log files and usage

=> /var/log/messages : General log messages

=> /var/log/boot : System boot log


=> /var/log/debug : Debugging log messages


=> /var/log/auth.log : User login and authentication logs


=> /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file


=> /var/log/dmesg : Linux kernel ring buffer log


=> /var/log/dpkg.log : All binary package log includes package installation and other information


=> /var/log/faillog : User failed login log file


=> /var/log/kern.log : Kernel log file


=> /var/log/lpr.log : Printer log file


=> /var/log/mail.* : All mail server message log files


=> /var/log/mysql.* : MySQL server log file


=> /var/log/user.log : All userlevel logs


=> /var/log/xorg.0.log : X.org log file


=> /var/log/apache2/* : Apache web server log files directory


=> /var/log/lighttpd/* : Lighttpd web server log files directory


=> /var/log/fsck/* : fsck command log


=> /var/log/apport.log : Application crash report / log file


To view log files at shell prompt


Use tail, more, less and grep command.

tail -f /var/log/apport.log

more /var/log/xorg.0.log

cat /var/log/mysql.err

less /var/log/messages

grep -i fail /var/log/boot


View log files using GUI tools using the GNOME System Log Viewer


System Log Viewer is a graphical, menu-driven viewer that you can
use to view and monitor your system logs. System Log Viewer comes with
a few functions that can help you manage your logs, including a
calendar, log monitor and log statistics display. System Log Viewer is
useful if you are new to system administration because it provides an
easier, more user-friendly display of your logs than a text display of
the log file. It is also useful for more experienced administrators, as
it contains a calendar to help you locate trends and track problems, as
well as a monitor to enable you to continuously monitor crucial logs.


You can start System Log Viewer in the following ways:


Click on System menu > Choose Administration > System Log:


(The GNOME System Log Viewer)


Note you can start the GNOME System Log Viewer from a shell prompt, by entering the following command:

$ gnome-system-log &

Monday, 5 May 2008

ID3 Tag problem with Rhythmbox:: Linux Music Player

Compared with famous Amarok, I prefer to Rhythmbox, which keeps Gnome features, such as, simple interface, plugins supports.

But when playing with music players between Windows and Linux, I found it seems two kinds of ID tags were used.

1) In Windows, I can modify the tags with Foobar2000 easily. But in Explore, some of the tags of some mp3 are not available. Does this mean there are two kinds of or versions of ID tag are used?

2)
2.1) In Linux, this is more weird. From file property->Audio tab, we can get some tag info of this mp3 file, But sometime it's different from showing in Rhythmbox and Amarok. Does this also mean two kinds of or versions of ID tag are used? Similar bugs are reported such as https://bugs.launchpad.net/ubuntu/+source/easytag/+bug/120538.

2.2) Some mp3's ID tag is not allowed to modify using Rhythmbox (but such mp3 files can be modified previously, this is quite weird, but after some operation, they becomes not allowed to modify). In this case, you can solve this problem by adding a mp3 file, which you can modify its ID tag, and those mp3 files you can not modify to a same playlist. Start from the file you can modify by right clicking->property to modify, then goto others, in this way, all ID tags can be modified. However all these modified information stored in another places, not in the file property ->Audio tab ( in Nautilus, not in Rhythmbox). So I do think there are two types or versions of mp3 ID tag are used.


Solutions:
=====================
Install Foobar2000 in wine. Add those weird mp3 files into foobar playlist, select them then righ click to TAGGING, here you can select what kind of ID TAG you want to use on those mp3 files.

Foobar in Wine just can change the typge of ID TAG, while not modify the content of ID TAG, which will be availabe to be modified after foobar processing.

Sunday, 4 May 2008

Wine Go for Chinese Fonts

首先wine自己的系统中必须有中文字体,我的Ubuntu系统中已经安装了宋体,这也是Windows Vista之前的几个版本的系统使用的中文字体,所以:

cd ~/.wine/drive_c/windows/fonts

ln -s /usr/share/fonts/truetype/simsun.ttf simsun.ttc


当然,也可以将该字体复制到fonts目录,这里直接建立连接,省空间。


然后修改wine的注册表:


vi ~/.wine/system.reg


找到“[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]”,将其中的““LogPixels”=dword:00000060”改成““LogPixels”=dword:00000070“。


再找到”[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] 1144897563“项,将其中的”MS Shell Dlg“相关的两项修改成如下内容(即更换字体为宋体):


“MS Shell Dlg”=”SimSun”

“MS Shell Dlg 2″=”SimSun”


然后:


vi ~/.wine/drive_c/windows/win.ini


将”Desktop“块修改成如下内容(即增大字体):


[Desktop]

menufontsize=13

messagefontsize=13

statusfontsize=13

IconTitleSize=13



Saturday, 3 May 2008

Utah Jazz sucks

乔丹年代,马龙和斯图克顿打得那叫一丑陋,但是每每都能到达总决赛,不过每次都成为乔丹的牺牲品。当时虽然就不喜欢他们,但是还是觉得他们挺可怜的,遇到了公牛的鼎盛时期。

这两年,火箭连续两次都在季后赛首轮被Utah Jazz淘汰,而且虽然换了一批人,但是打球风格依旧丑陋,什么威廉姆斯,布泽尔,基里连科,丑的不行,他们进攻的时候我干脆靠听的。我现在更加讨厌他们了。不知道大兵还是否喜欢他们,弄不明白他当年怎么会喜欢马龙斯图克顿领先的Utah。
火箭呢,一直是不温不火的,当年奥拉朱旺和德雷克斯勒夺冠也是半个赛季(因球员罢工耽搁半年),勉勉强强。

唉,Jazz和Rockets都让我看着够郁闷的。

Friday, 2 May 2008

Restore All Installed packages in Ubuntu Hardy Heron and to a New machine


The following command creates a list of all the installed packages at the present time:

sudo dpkg --get-selections > /etc/package.selections

Now
we created our package list and we can copy this list to a new ubuntu
computer and install the same packages in the list to the new machine
or, restore the packages to the time you created the package list:

sudo dpkg --set-selections < /etc/package.selections && apt-get dselect-upgrade

The above command will uninstall all packages installed after you created your restore list.

笑话,摘自一个家乡大学的在校mm的blog,感觉还是我们家那的mm搞笑

[壹]

那天傻彬兴致勃勃地跑过来,

“‘Just do it!’是啥意思?”

我正琢磨着给她个完美的答案,

彤彤姐脱口而出:“干去吧!”

[贰]

最近要换地方住了, 昨个晚上熄灯了,大家在各自的床上找着各自得劲的姿势。

只听傻彬问:“胸大小到底是和啥有关系呢?”

“遗传。”

“那不对啊,我妈胸挺大的啊,我的咋......”那家伙“腾”一下子蹿起来。

彤彤姐说了一句话那是给我报了这么多年仇啊——

“你遗传了你爸的!”


http://theoldgoblin.blogbus.com/logs/6481905.html

I want this!! a quick notes

Wednesday, 30 April 2008

Lenovo vs Mac Air, bloody ture, I think.

Monday, 28 April 2008

Brand new Ubuntu 8.04 got polished

If you want to see more from latest Gnome 2.21 and Ubuntu 8.04, compared with KDE 4.0.3, you will be disappointed, no big difference, but everything seems get polished. This is the reason why I love it. KDE 4 is amazing, indeed, but you must be tolerant enough, because with tons of new features appear, far more than tons of bugs come as well.
For me, I'd love more and more polished stuff than brand new and buggy things.

Ok, so what's new for me, as a normal desktop user, I've played with it from first hour the Ubuntu 8.04 was official available, why I am sure it's the first hour? I was keeping refresh ubuntu.com, I can not wait at that time after experienced alpha, beta and RC.

1) Gnome-Do is in the repositories. Its plugins also works very well just as stated on its web page, "stable". Now it's really can be an alternative to Mac's Quicksilver, and more powerful with support to plugins. These plugins can support twitter, del.icio.us and Remote Desktop Control, etc. Fantastic! within one tool, we can almost achieve all the jobs normally go through dozens of programs. And it's much much better than old style gnome-launch-box, which should be removed from repositories.

2) Samba is more mature. Now you do need worry about the path of the fold you want to share, or the permission things, on Ubuntu 10.4 and previous version, it's a pain to set up a samba file sharing server, permission things and Cross OS visiting will make you crazy, even all this can be done and have solution. But now much easier, even you want to share a folder, which not belongs you, it will prompt you how to modify smb.conf to make it work. And after setup, the shared folders can be accessed in the same easy way no matter what OS you are using.

3) ThunderBird is offically supported by Ubuntu. I'd really want to see this, Mozilla and Ubuntu are so close in the filed of Open Source Softeares. Compared with Evolution, ThunderBird is more flexible and extensible, same, with support to extentions like Gnome-Do, more and more I like things work in this way. For example, in Evolution to bi-synchronize Calendar is not available with bugs, but this has been a problem for almost 2 years. So I will go to ThunderBird definitely. And ThunderBird support IMAP so well.

4) Ubuntu can detect the temporature of your computer, if it's above 84C, it will shutdown. But if you restart it, no matter how hot, it seems not to be off, because it knows there is a human around it, no danger.

There are also a lot of updates and optimizations which we can see from everywhere. Above is just my feelings. So far so good.

Sunday, 27 April 2008

linux memory management: buffer and cache

free

  free 命令相对于top 提供了更简洁的查看系统内存使用情况:

  $ free

  # free
   total used free shared buffers cached
  Mem: 255988 231704 24284 0 6432 139292
  -/+ buffers/cache: 85980 170008
  Swap: 746980 0 746980

  Mem:表示物理内存统计

  -/+ buffers/cached:表示物理内存的缓存统计

  Swap:表示硬盘上交换分区的使用情况,这里我们不去关心。

  系统的总物理内存:255268Kb(256M),但系统当前真正可用的内存b并不是第一行free 标记的 16936Kb,它仅代表未被分配的内存。

  我们使用total1、used1、free1、used2、free2 等名称来代表上面统计数据的各值,1、2 分别代表第一行和第二行的数据。

  total1:表示物理内存总量。
  used1:表示总计分配给缓存(包含buffers 与cache )使用的数量,但其中可能部分缓存并未实际使用。
  free1:未被分配的内存。
  shared1:共享内存,一般系统不会用到,这里也不讨论。
  buffers1:系统分配但未被使用的buffers 数量。
  cached1:系统分配但未被使用的cache 数量。buffer 与cache 的区别见后面。
  used2:实际使用的buffers 与cache 总量,也是实际使用的内存总量。
  free2:未被使用的buffers 与cache 和未被分配的内存之和,这就是系统当前实际可用内存。

  可以整理出如下等式:

  total1 = used1 + free1total1 = used2 + free2used1 = buffers1 + cached1 + used2free2 = buffers1 + cached1 + free1

  buffer 与cache 的区别

 
 A buffer is something that has yet to be "written" to disk. A cache is
something that has been "read" from the disk and stored for later use.

Friday, 25 April 2008

Kobe, wow, 49 points and amazing performance

Thursday, 24 April 2008

Repositories for Ubuntu 8.04

# deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy universe
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy universe
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates universe
# deb http://fr.archive.ubuntu.com/ubuntu/ hardy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
## deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu hardy partner
## deb-src http://archive.canonical.com/ubuntu hardy partner

deb http://security.ubuntu.com/ubuntu hardy-security main restricted
## deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
## deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
## deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse

# ============================================================================
# latest (beta versions) versions:
# deb http://ppa.launchpad.net/fta/ubuntu hardy main

# http://medibuntu.org/
# sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
# the public key:
# sudo apt-get update && sudo apt-get install medibuntu-keyring

# ==============================================================================
# Google
deb http://dl.google.com/linux/deb/ stable non-free
# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
# Or goto http://www.google.com/linuxrepositories/apt.html to download the key, then install by using synaptic

# Wine
# sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list
# wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

# Python 3rd party
deb http://debs.astraw.com/ hardy/
# sudo apt-get update && sudo apt-get install astraw-keyring

# Firefox
deb http://ppa.launchpad.net/mozillateam/ubuntu hardy main

# VirtualBox
deb http://download.virtualbox.org/virtualbox/debian hardy non-free
# sudo wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -

# Miro
deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu hardy/

# Pidgin
deb http://ppa.launchpad.net/pidgin-developers/ubuntu hardy main

德国抗议:这是我哥们!

这个哥们也很牛,好几次想从前面拍他,不过都被国旗挡住了脸,为了不让国旗被风吹走形,他就举着胳膊拉着国旗2个角,从开始拉到最后,我只好从后面找了个角度拍了一张



敬佩!!

我就在这位大哥侧后方一直看着,特别感动,国旗完全挡住了前方视线,但还是很坚定地站着!



我们后面的小声跟他说,很累的话找人去轮换,大哥一扭头,只一句:

“我倒了国旗也不能倒!”


From:http://stu-cn.de/viewthread.php?tid=19822&extra=page%3D2&page=1


My photo
London, United Kingdom
twitter.com/zhengxin

Facebook & Twitter