2011/03/15

Lay y kien dong gop ve ODF cua Bo TTTT

Đóng góp ý kiến về tiêu chuẩn định dạng tài liệu mở trong cơ quan nhà nước

1. Open format (định dạng mở)
Với mục đích lưu trữ vĩnh cửu, tài liệu văn bản của một quốc gia phải được lưu trữ ở định dạng mở thỏa mãn các điều kiện:
a. Dựa trên các chuẩn mở
b. Được xây dựng bởi cộng đồng và công khai
c. Được duy trì bởi một tổ chức độc lập; không phải là một hay nhiều công ty
d. Bao gồm tài liệu hướng dẫn cụ thể
e. Không bao hàm các định dạng không mở và có bản quyền (không hoàn toàn tự do)
(Theo wikipedia)

Với việc lưu trữ văn bản: định dạng .odt, .ods, .opd (phiên bản 1.0, 1.1, 1.2) hoàn toàn thỏa mãn các điều kiện trên.

Tài liệu ODF (bao gồm odt, ods, opd) được nén và giải nén bằng chuẩn nén mở ZIP.
Chuẩn zip được sử dụng trong ODF không dùng, và do đó không bị ảnh hưởng bởi các patent mới nhất về zip.

Các cổng thông tin của chính phủ cần trao đổi, kết nối bằng những định dạng mở như:
ODF (chuyển trực tiếp file), văn bản thuần túy (plain-text, có thể mã hóa tùy theo yêu cầu),
hoặc các dịch vụ web (web service, có mã hóa nếu cần) để đảm bảo tính mở trong cả quá trình
lưu trữ và truyền tin.

Sử dụng định dạng mở nghĩa là tự tạo cho mình sự tự do về công nghệ, không bị ảnh hưởng bởi
một công ty độc quyền nào đó.

Thông thường, các định dạng mở được phát triển ổn định bởi cộng đồng nên hoàn toàn có thể tin tưởng
về tính ổn định của nó.

Trong trường hợp xấu nhất: Định dạng trở nên quá cũ và không còn người bảo dưỡng thì Việt Nam,
với tư cách là một quốc gia độc lập, hoàn toàn có thể tự duy trì và phát triển chuẩn này (do tính mở của nó)

Ngược lại, một chuẩn không mở với một phần mềm đọc và sửa định dạng không mở đó,
không miễn phí, không mở sẽ là nguy cơ lớn khi công ty cung cấp định dạng và phần mềm
này ngừng cung cấp dịch vụ. Sự phụ thuộc này liên quan đến độc lập và an ninh quốc gia,
chúng ta sẽ vĩnh viễn phụ thuộc về tiền bạc (mua mới, nâng cấp phần mềm, tư vấn, nâng cấp chuẩn)
cũng như công nghệ đối với công ty này.



------------

Bộ TT&TT lấy ý kiến góp ý của nhân dân đối với Thông tư quy định về tiêu chuẩn định dạng tài liệu mở trong cơ quan nhà nước

(Mic.gov.vn) -
Dự thảo thông tư nêu quy định, tất cả các tài liệu (file) dạng văn bản, bảng tính, trình diễn được đăng tải trên cổng, trang thông tin điện tử của các cơ quan nhà nước phải có định dạng theo tiêu chuẩn định dạng tài liệu mở ODF; Khuyến khích các cơ quan nhà nước sử dụng tiêu chuẩn định dạng tài liệu mở ODF đối với các tài liệu dạng văn bản, bảng tính, trình diễn được dùng trong việc lưu trữ, trao đổi thông tin giữa các cơ quan nhà nước với người dân, doanh nghiệp hoặc giữa các cơ quan nhà nước với nhau.


Định dạng tài liệu mở ODF là tiêu chuẩn Việt Nam TCVN 7978:2009 (tương đương với tiêu chuẩn ISO/IEC 26300:2006) được quy định tại Quyết định số 1761/QĐ-BKHCN ngày 27/8/2009 của Bộ Khoa học và Công nghệ về việc công bố tiêu chuẩn quốc gia. Cụ thể:

- Định dạng là .odt đối với tài liệu dạng văn bản.
- Định dạng là .ods đối với tài liệu dạng bảng tính.
- Định dạng là .odp đối với tài liệu dạng trình diễn.

Các cổng, trang thông tin điện tử của các cơ quan nhà nước đang hoạt động hoặc triển khai trước ngày Thông tư này có hiệu lực thi hành cần được rà soát và có lộ trình chuyển đổi, nâng cấp phù hợp để áp dụng tiêu chuẩn định dạng tài liệu mở ODF.

Từ ngày hôm nay 18/2/2011 đến ngày 19/4/2011, trên Trang Thông tin điện tử của Bộ TT&TT sẽ đăng tải bản dự thảo Thông tư để lấy ý kiến góp ý rộng rãi của nhân dân. Nội dung bản dự thảo và ý kiến đóng góp được đăng tải tại đây.

http://mic.gov.vn/layyknd/Trang/default1.aspx

2011/03/13

SilverLight vs HTML5, future of the Web


(2011/03/11 11:53), Nguyen Hong Quang wrote:
> On 11/03/2011 10:41, Nguyen Vu Hung (VNC) wrote:
>> (2011/03/11 8:31), Vo Huy Quang wrote:
>>> Ajax được xem là sách học làm bánh, còn SilverLight có thể ví như một bộ
>>> dụng cụ để làm bánh. Không thể mang hai thứ này đi so sánh với nhau được.
>>> Chả khác nào so sánh ngôn ngữ lập trình PHP với bộ Visual Studio của
>>> Microsoft được.
>>>
>> Với người ăn bánh như em: Chỉ cần biết bánh ngon, hợp khẩu vị hay không;
>> Chứ không cần biết rằng nó được làm (bẩn) như thế nào.
>>
>> Theo slide 18 ở dưới, tốc độ của ajax (coi là một middle ware)
>> chậm hơn so với SilverLight (là một middle ware)
>> -> Đây là điểm cần bàn.
>>
> Vấn đề này không phải OT.
> Mình chẳng thạo gì cả 2 thứ này. Chỉ có một câu hỏi: SilverLight có bắt buộc phải
> chạy trên Windows không?
SilverLight hiện tại phải phát triển trên Windows.
Nghĩa là, bộ đồ làm bánh (IDE) phải phát triển trên Windows.

SilverLight có *runtime* cho FF trên Linux và IE, Safari trên Mac OS X, IE + FF trên Windows
Nghĩa là, ăn bánh ở nhiều tiệm khác nhau, nhiều kiểu ăn phong phú.

> Hoặc nó sẽ chỉ nhanh hơn trên phiên bản chạy trên Windows không?
Benchmark trong silde 18 em gửi trong OP rất thiếu thông tin,
em cho là một loại FUD vì không đủ chứng cứ kỹ thuật.

> Nếu câu trả lời là Yes thì có lẽ không có mấy điều phải bàn vì nó không phải
>là thứ đồ độc lập với HĐH như Ajax. Không cùng "đẳng cấp" :-)

Nhìn bề ngoài thì: SilverLight cũng hỗ trợ *nhiều* OS, browsers, nhưng bản thân công nghệ đó không mở
# Cho dù source code của nó có thể mở giống như MHST 2010 đã làm :)

Đồ rằng,
SilverLight sẽ chết dần
HTML 5 sẽ thay thế dần Flash, SilverLight... (ý của Trúc)

cf. http://www.slideshare.net/mannm/deck-03-3101927
cf. http://lists.hanoilug.org/pipermail/hanoilug/2011-March/008003.html

2011/02/27

Centos 5.5 upgrade


#sudo yum upgrade

Installed:
dhcpv6-client.i386 0:1.0.10-18.el5 kernel.i686 0:2.6.18-194.32.1.el5 kernel-devel.i686 0:2.6.18-194.32.1.el5 libhugetlbfs.i386 0:1.3-7.el5
libpurple.i386 0:2.6.6-5.el5_5 pidgin.i386 0:2.6.6-5.el5_5 sos.noarch 0:1.7-9.49.el5

Dependency Installed:
avahi-compat-libdns_sd.i386 0:0.6.16-9.el5_5 dbus-libs.i386 0:1.1.2-14.el5 device-mapper-event.i386 0:1.02.39-1.el5_5.2
device-mapper-multipath.i386 0:0.4.7-34.el5_5.6 dmraid-events.i386 0:1.0.0.rc13-63.el5 dnsmasq.i386 0:2.45-1.1.el5_3
hmaccalc.i386 0:0.9.6-3.el5 libsmbclient.i386 0:3.0.33-3.29.el5_5.1 meanwhile.i386 0:1.0.2-5.el5
poppler-utils.i386 0:0.5.4-4.4.el5_5.14 python-ldap.i386 0:2.2.0-2.1 sgpio.i386 0:1.2.0_10-2.el5
tk.i386 0:8.4.13-5.el5_1.1 xorg-x11-drv-qxl.i386 0:0.0.12-1.2.el5

Updated:
Deployment_Guide-en-US.noarch 0:5.2-11.el5.centos Deployment_Guide-ja-JP.noarch 0:5.2-11.el5.centos NetworkManager.i386 1:0.7.0-10.el5_5.2
NetworkManager-glib.i386 1:0.7.0-10.el5_5.2 NetworkManager-gnome.i386 1:0.7.0-10.el5_5.2 ORBit2.i386 0:2.14.3-5.el5
ORBit2-devel.i386 0:2.14.3-5.el5 PyXML.i386 0:0.8.4-4.el5_4.2 SysVinit.i386 0:2.86-15.el5
a2ps.i386 0:4.13b-57.2.el5 acl.i386 0:2.2.39-6.el5 acpid.i386 0:1.0.4-9.el5_4.2
alsa-lib.i386 0:1.0.17-1.el5 alsa-utils.i386 0:1.0.17-1.el5 amtu.i386 0:1.0.6-1.el5
apr.i386 0:1.2.7-11.el5_5.3 apr-devel.i386 0:1.2.7-11.el5_5.3 apr-util.i386 0:1.2.7-11.el5_5.2
apr-util-devel.i386 0:1.2.7-11.el5_5.2 at.i386 0:3.1.8-84.el5 at-spi.i386 0:1.7.11-3.el5
authconfig.i386 0:5.3.21-6.el5 authconfig-gtk.i386 0:5.3.21-6.el5 autofs.i386 1:5.0.1-0.rc2.143.el5_5.6
avahi.i386 0:0.6.16-9.el5_5 avahi-glib.i386 0:0.6.16-9.el5_5 bash.i386 0:3.2-24.el5
bind-libs.i386 30:9.3.6-4.P1.el5_5.3 bind-utils.i386 30:9.3.6-4.P1.el5_5.3 binutils.i386 0:2.17.50.0.6-14.el5
bluez-libs.i386 0:3.7-1.1 bluez-utils.i386 0:3.7-2.2.el5.centos brlapi.i386 0:0.4.1-4.el5
ccid.i386 0:1.3.8-1.el5 cdda2wav.i386 9:2.01-10.7.el5 centos-release.i386 10:5-5.el5.centos
centos-release-notes.i386 0:5.5-0 checkpolicy.i386 0:1.33.1-6.el5 conman.i386 0:0.1.9.2-8.el5
control-center.i386 1:2.16.0-16.el5 coolkey.i386 0:1.1.0-14.el5 coreutils.i386 0:5.97-23.el5_4.2
cpio.i386 0:2.6-23.el5_4.1 cpp.i386 0:4.1.2-48.el5 cpuspeed.i386 1:1.2.1-9.el5
cracklib.i386 0:2.8.9-3.3 cracklib-dicts.i386 0:2.8.9-3.3 crash.i386 0:4.1.2-4.el5.centos.1
cryptsetup-luks.i386 0:1.0.3-5.el5 cups.i386 1:1.3.7-18.el5_5.8 cups-devel.i386 1:1.3.7-18.el5_5.8
cups-libs.i386 1:1.3.7-18.el5_5.8 curl.i386 0:7.15.5-9.el5 cvs.i386 0:1.11.22-7.el5
dbus.i386 0:1.1.2-14.el5 dbus-devel.i386 0:1.1.2-14.el5 dbus-glib.i386 0:0.73-10.el5_5
dbus-glib-devel.i386 0:0.73-10.el5_5 dbus-python.i386 0:0.70-9.el5_4 dbus-x11.i386 0:1.1.2-14.el5
desktop-backgrounds-basic.noarch 0:2.0-41.el5.centos desktop-printing.i386 0:0.19-20.2.el5 device-mapper.i386 0:1.02.39-1.el5_5.2
dhcdbd.i386 0:2.2-2.el5 dhclient.i386 12:3.0.5-23.el5_5.2 diffutils.i386 0:2.8.1-15.2.3.el5
dmidecode.i386 1:2.10-3.el5 dmraid.i386 0:1.0.0.rc13-63.el5 dos2unix.i386 0:3.1-27.2.el5
dosfstools.i386 0:2.11-9.el5 dump.i386 0:0.4b41-4.el5 dvd+rw-tools.i386 0:7.0-1.el5
e2fsprogs.i386 0:1.39-23.el5_5.1 e2fsprogs-devel.i386 0:1.39-23.el5_5.1 e2fsprogs-libs.i386 0:1.39-23.el5_5.1
ed.i386 0:0.2-39.el5_2 ekiga.i386 0:2.0.2-7.0.2 elfutils.i386 0:0.137-3.el5
elfutils-libelf.i386 0:0.137-3.el5 elfutils-libs.i386 0:0.137-3.el5 elinks.i386 0:0.11.1-6.el5_4.1
enscript.i386 0:1.6.4-4.1.1.el5_2 esc.i386 0:1.1.0-12.el5 ethtool.i386 0:6-4.el5
evince.i386 0:0.6.0-13.el5 evolution.i386 0:2.12.3-19.el5 evolution-connector.i386 0:2.12.3-11.el5
evolution-data-server.i386 0:1.12.3-18.el5 expat.i386 0:1.95.8-8.3.el5_5.3 expat-devel.i386 0:1.95.8-8.3.el5_5.3
fetchmail.i386 0:6.3.6-1.1.el5_3.1 file.i386 0:4.17-15.el5_3.1 filesystem.i386 0:2.4.0-3.el5
findutils.i386 1:4.2.27-6.el5 firefox.i386 0:3.6.13-2.el5.centos firstboot.i386 0:1.4.27.8-1.el5.centos
firstboot-tui.i386 0:1.4.27.8-1.el5.centos flac.i386 0:1.1.2-28.el5_0.1 fontconfig.i386 0:2.4.1-7.el5
foomatic.i386 0:3.0.2-38.3.el5 freetype.i386 0:2.2.1-28.el5_5.1 freetype-devel.i386 0:2.2.1-28.el5_5.1
ftp.i386 0:0.17-35.el5 gail.i386 0:1.9.2-3.el5_4 gcc.i386 0:4.1.2-48.el5
gcc-c++.i386 0:4.1.2-48.el5 gd.i386 0:2.0.33-9.4.el5_4.2 gdm.i386 1:2.16.0-56.el5.centos
gedit.i386 1:2.16.0-9.el5 gimp.i386 2:2.2.13-2.0.7.el5 gimp-libs.i386 2:2.2.13-2.0.7.el5
gimp-print.i386 0:4.2.7-22.2.el5 gimp-print-plugin.i386 0:4.2.7-22.2.el5 gimp-print-utils.i386 0:4.2.7-22.2.el5
glibc.i686 0:2.5-49.el5_5.7 glibc-common.i386 0:2.5-49.el5_5.7 glibc-devel.i386 0:2.5-49.el5_5.7
glibc-headers.i386 0:2.5-49.el5_5.7 glx-utils.i386 0:6.5.1-7.8.el5 gnome-games.i386 1:2.16.0-2.el5
gnome-panel.i386 0:2.16.1-7.el5 gnome-power-manager.i386 0:2.16.0-10.el5 gnome-python2-applet.i386 0:2.16.0-3.el5
gnome-python2-desktop.i386 0:2.16.0-3.el5 gnome-python2-extras.i386 0:2.14.2-7.el5 gnome-python2-gnomeprint.i386 0:2.16.0-3.el5
gnome-python2-gtksourceview.i386 0:2.16.0-3.el5 gnome-python2-libegg.i386 0:2.14.2-7.el5 gnome-screensaver.i386 0:2.16.1-8.el5_5.2
gnome-session.i386 0:2.16.0-7.el5.centos gnome-terminal.i386 0:2.16.0-5.3.el5 gnome-utils.i386 1:2.16.0-5.el5
gnome-vfs2.i386 0:2.16.2-6.el5_5.1 gnome-vfs2-devel.i386 0:2.16.2-6.el5_5.1 gnome-vfs2-smb.i386 0:2.16.2-6.el5_5.1
gnome-volume-manager.i386 0:2.15.0-5.el5 gnupg.i386 0:1.4.5-14.el5_5.1 gnutls.i386 0:1.4.1-3.el5_4.8
gnutls-devel.i386 0:1.4.1-3.el5_4.8 grub.i386 0:0.97-13.5 gstreamer-plugins-good.i386 0:0.10.9-1.el5_3.2
gthumb.i386 0:2.7.8-8.el5 gtk-vnc.i386 0:0.3.8-3.el5 gtk2.i386 0:2.10.4-21.el5_5.6
gtk2-devel.i386 0:2.10.4-21.el5_5.6 gtkhtml3.i386 0:3.16.3-1.el5 hal.i386 0:0.5.8.1-59.el5
hal-cups-utils.i386 0:0.6.2-5.2.el5 hal-devel.i386 0:0.5.8.1-59.el5 hal-gnome.i386 0:0.5.8.1-59.el5
hpijs.i386 1:1.6.7-4.1.el5.4 hplip.i386 0:1.6.7-4.1.el5.4 hsqldb.i386 1:1.8.0.9-1jpp.2
htmlview.noarch 0:4.0.0-2.el5 httpd.i386 0:2.2.3-43.el5.centos.3 hwdata.noarch 0:0.213.18-1.el5.1
initscripts.i386 0:8.45.30-3.el5.centos iproute.i386 0:2.6.18-11.el5 ipsec-tools.i386 0:0.6.5-14.el5_5.5
iptables.i386 0:1.3.5-5.3.el5_4.1 iptables-ipv6.i386 0:1.3.5-5.3.el5_4.1 iptstate.i386 0:1.4-2.el5
iputils.i386 0:20020927-46.el5 irqbalance.i386 2:0.55-15.el5 isdn4k-utils.i386 0:3.2-56.el5
java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115 kbd.i386 0:1.12-21.el5 kernel-headers.i386 0:2.6.18-194.32.1.el5
kpartx.i386 0:0.4.7-34.el5_5.6 krb5-devel.i386 0:1.6.1-36.el5_5.6 krb5-libs.i386 0:1.6.1-36.el5_5.6
krb5-workstation.i386 0:1.6.1-36.el5_5.6 ksh.i386 0:20100202-1.el5_5.1 kudzu.i386 0:1.2.57.1.24-1.el5.centos
launchmail.noarch 0:4.0.0-2.el5 libX11.i386 0:1.0.3-11.el5 libX11-devel.i386 0:1.0.3-11.el5
libXfont.i386 0:1.2.2-1.0.3.el5_1 libXi.i386 0:1.0.1-4.el5_4 libXi-devel.i386 0:1.0.1-4.el5_4
libXrandr.i386 0:1.1.1-3.3 libXrandr-devel.i386 0:1.1.1-3.3 libXt.i386 0:1.0.2-3.2.el5
libXt-devel.i386 0:1.0.2-3.2.el5 libacl.i386 0:2.2.39-6.el5 libaio.i386 0:0.3.106-5
libao.i386 0:0.8.6-7 libbonobo.i386 0:2.16.0-1.1.el5_5.1 libevent.i386 0:1.4.13-1
libexif.i386 0:0.6.13-4.0.2.el5_1.1 libgcc.i386 0:4.1.2-48.el5 libgcj.i386 0:4.1.2-48.el5
libgcrypt.i386 0:1.4.4-5.el5 libgcrypt-devel.i386 0:1.4.4-5.el5 libgnomecups.i386 0:0.2.2-9
libgnomeprint22.i386 0:2.12.1-10.el5 libgomp.i386 0:4.4.0-6.el5 libgtop2.i386 0:2.14.4-8.el5_4
libicu.i386 0:3.6-5.11.4 libnl.i386 0:1.0-0.10.pre5.5 libpcap.i386 14:0.9.4-15.el5
libpng.i386 2:1.2.10-7.1.el5_5.3 libpng-devel.i386 2:1.2.10-7.1.el5_5.3 libraw1394.i386 0:1.3.0-1.el5
libsane-hpaio.i386 0:1.6.7-4.1.el5.4 libsemanage.i386 0:1.9.1-4.4.el5 libsepol.i386 0:1.15.2-3.el5
libsepol-devel.i386 0:1.15.2-3.el5 libsoup.i386 0:2.2.98-2.el5_3.1 libstdc++.i386 0:4.1.2-48.el5
libstdc++-devel.i386 0:4.1.2-48.el5 libtool-ltdl.i386 0:1.5.22-7.el5_4 libuser.i386 0:0.54.7-2.1.el5_4.1
libutempter.i386 0:1.1.4-4.el5 libvolume_id.i386 0:095-14.21.el5_5.1 libvorbis.i386 1:1.1.2-3.el5_4.4
libwmf.i386 0:0.2.8.4-10.2 libwpd.i386 0:0.8.7-3.el5 libxml2.i386 0:2.6.26-2.1.2.8.el5_5.1
libxml2-devel.i386 0:2.6.26-2.1.2.8.el5_5.1 libxml2-python.i386 0:2.6.26-2.1.2.8.el5_5.1 libxslt.i386 0:1.1.17-2.el5_2.2
linuxwacom.i386 0:0.7.8.3-8.el5 logrotate.i386 0:3.7.4-9.el5_5.2 logwatch.noarch 0:7.3-8.el5
lvm2.i386 0:2.02.56-8.el5_5.6 m2crypto.i386 0:0.16-6.el5.6 make.i386 1:3.81-3.el5
man-pages.noarch 0:2.39-15.el5_4 man-pages-ja.noarch 0:20060815-13.el5 mcstrans.i386 0:0.2.11-3.el5
mdadm.i386 0:2.6.9-3.el5 mesa-libGL.i386 0:6.5.1-7.8.el5 mesa-libGL-devel.i386 0:6.5.1-7.8.el5
mesa-libGLU.i386 0:6.5.1-7.8.el5 metacity.i386 0:2.16.0-15.el5 microcode_ctl.i386 1:1.17-1.50.el5
mkinitrd.i386 0:5.1.19.6-61.el5_5.2 mkisofs.i386 9:2.01-10.7.el5 mlocate.i386 0:0.15-1.el5.2
module-init-tools.i386 0:3.3-0.pre3.1.60.el5_5.1 mutt.i386 5:1.4.2.2-3.0.2.el5 nash.i386 0:5.1.19.6-61.el5_5.2
nautilus.i386 0:2.16.2-7.el5 nautilus-extensions.i386 0:2.16.2-7.el5 nautilus-open-terminal.i386 0:0.6-7.el5
nautilus-sendto.i386 0:1.0.1-6.el5.centos net-snmp-libs.i386 1:5.3.2.2-9.el5_5.1 net-tools.i386 0:1.60-81.el5
netpbm.i386 0:10.35.58-8.el5 netpbm-progs.i386 0:10.35.58-8.el5 newt.i386 0:0.52.2-15.el5
nfs-utils.i386 1:1.0.9-47.el5_5 nfs-utils-lib.i386 0:1.0.8-7.6.el5 notification-daemon.i386 0:0.3.5-9.el5
nscd.i386 0:2.5-49.el5_5.7 nss_db.i386 0:2.2-35.4.el5_5 nss_ldap.i386 0:253-25.el5
ntp.i386 0:4.2.2p1-9.el5.centos.2.1 numactl.i386 0:0.9.8-11.el5 oddjob.i386 0:0.27-9.el5
oddjob-libs.i386 0:0.27-9.el5 opal.i386 0:2.2.2-1.1.0.1 openldap.i386 0:2.3.43-12.el5_5.3
openldap-devel.i386 0:2.3.43-12.el5_5.3 openssl.i686 0:0.9.8e-12.el5_5.7 openssl-devel.i386 0:0.9.8e-12.el5_5.7
pam.i386 0:0.99.6.2-6.el5_5.2 pam-devel.i386 0:0.99.6.2-6.el5_5.2 pam_krb5.i386 0:2.2.14-15
pango.i386 0:1.14.9-8.el5.centos pango-devel.i386 0:1.14.9-8.el5.centos paps.i386 0:0.6.6-19.el5
parted.i386 0:1.8.1-27.el5 patch.i386 0:2.5.4-29.2.3.el5 pax.i386 0:3.4-2.el5_4
pciutils.i386 0:2.2.3-8.el5_4 pcre.i386 0:6.6-2.el5_1.7 pcsc-lite.i386 0:1.4.4-4.el5_5
pcsc-lite-libs.i386 0:1.4.4-4.el5_5 perl.i386 4:5.8.8-32.el5_5.2 perl-Archive-Tar.noarch 1:1.39.1-1.el5_5.2
perl-Net-DNS.i386 0:0.59-3.el5 pirut.noarch 0:1.3.28-17.el5.centos pkgconfig.i386 1:0.21-2.el5
pkinit-nss.i386 0:0.7.6-1.el5 planner.i386 0:0.14.1-4.el5 pm-utils.i386 0:0.99.3-10.el5.centos
policycoreutils.i386 0:1.33.12-14.8.el5 poppler.i386 0:0.5.4-4.4.el5_5.14 postgresql-libs.i386 0:8.1.22-1.el5_5.1
ppp.i386 0:2.4.4-2.el5 procps.i386 0:3.2.7-16.el5 psacct.i386 0:6.3.2-44.el5
psmisc.i386 0:22.2-7 pwlib.i386 0:1.10.1-7.0.1.el5 pygtk2.i386 0:2.10.1-12.el5
pygtk2-libglade.i386 0:2.10.1-12.el5 pyorbit.i386 0:2.14.1-3.el5 python.i386 0:2.4.3-27.el5_5.3
python-urlgrabber.noarch 0:3.1.0-5.el5 qt.i386 1:3.3.6-23.el5 quota.i386 1:3.13-1.2.5.el5
rdate.i386 0:1.4-8.el5 rdesktop.i386 0:1.6.0-3 readahead.i386 1:1.3-8.el5
readline.i386 0:5.1-3.el5 redhat-artwork.i386 0:5.1.0-28.el5.centos redhat-logos.noarch 0:4.9.99-11.el5.centos
redhat-menus.noarch 0:6.7.8-3.el5 rhgb.i386 0:0.16.4-8.el5.centos.3 rhpxl.i386 0:0.41.1-9.el5
rmt.i386 0:0.4b41-4.el5 rsh.i386 0:0.17-40.el5 sabayon-apply.i386 0:2.12.4-6.el5
samba-client.i386 0:3.0.33-3.29.el5_5.1 samba-common.i386 0:3.0.33-3.29.el5_5.1 selinux-policy.noarch 0:2.4.6-279.el5_5.2
selinux-policy-targeted.noarch 0:2.4.6-279.el5_5.2 sendmail.i386 0:8.13.8-8.el5 setup.noarch 0:2.5.58-7.el5
shadow-utils.i386 2:4.0.17-15.el5 shared-mime-info.i386 0:0.19-5.el5 smartmontools.i386 1:5.38-2.el5
sox.i386 0:12.18.1-1.el5_5.1 spamassassin.i386 0:3.2.5-1.el5 speex.i386 0:1.0.5-4.el5_1.1
stunnel.i386 0:4.15-2.el5.1 sudo.i386 0:1.7.2p1-9.el5_5 sysklogd.i386 0:1.4.1-46.el5
tcl.i386 0:8.4.13-4.el5 tcp_wrappers.i386 0:7.6-40.7.el5 tcsh.i386 0:6.14-17.el5_5.2
telnet.i386 1:0.17-39.el5 tmpwatch.i386 0:2.9.7-1.1.el5.2 tomcat5-jsp-2.0-api.i386 0:5.5.23-0jpp.11.el5_5
tomcat5-servlet-2.4-api.i386 0:5.5.23-0jpp.11.el5_5 traceroute.i386 3:2.0.1-5.el5 tzdata.i386 0:2010l-1.el5
udev.i386 0:095-14.21.el5_5.1 unix2dos.i386 0:2.2-26.2.3.el5 unzip.i386 0:5.52-3.el5
usermode.i386 0:1.88-3.el5.2 usermode-gtk.i386 0:1.88-3.el5.2 util-linux.i386 0:2.13-0.52.el5_4.1
vconfig.i386 0:1.9-3 vino.i386 0:2.13.5-9.el5_4 vixie-cron.i386 4:4.1-77.el5_4.1
vnc-server.i386 0:4.1.2-14.el5_5.4 words.noarch 0:3.0-9.1 wpa_supplicant.i386 1:0.5.10-9.el5
xerces-j2.i386 0:2.7.1-7jpp.2.el5_4.2 xkeyboard-config.noarch 0:0.8-9.el5 xorg-x11-apps.i386 0:7.1-4.0.1.el5
xorg-x11-drivers.i386 0:7.1-4.2.el5 xorg-x11-drv-ast.i386 0:0.89.9-1.el5 xorg-x11-drv-ati.i386 0:6.6.3-3.27.el5_5.1
xorg-x11-drv-evdev.i386 1:1.0.0.5-5.el5 xorg-x11-drv-fbdev.i386 0:0.3.0-3 xorg-x11-drv-i810.i386 0:1.6.5-9.36.el5
xorg-x11-drv-keyboard.i386 0:1.1.0-3 xorg-x11-drv-mga.i386 0:1.4.10-7.el5 xorg-x11-drv-mutouch.i386 0:1.1.0-3
xorg-x11-drv-nv.i386 0:2.1.15-3.el5 xorg-x11-drv-sis.i386 0:0.9.1-7.1.el5 xorg-x11-drv-vesa.i386 0:1.3.0-8.2.el5
xorg-x11-proto-devel.i386 0:7.1-13.el5 xorg-x11-server-Xnest.i386 0:1.1.1-48.76.el5_5.2 xorg-x11-server-Xorg.i386 0:1.1.1-48.76.el5_5.2
xorg-x11-xfs.i386 1:1.0.2-4 xorg-x11-xinit.i386 0:1.0.2-15.el5 xsane-gimp.i386 0:0.991-5.el5
xterm.i386 0:215-8.el5_4.1 xulrunner.i386 0:1.9.2.13-3.el5 yp-tools.i386 0:2.9-1.el5
ypbind.i386 3:1.19-12.el5 yum-fastestmirror.noarch 0:1.1.16-14.el5.centos.1

Replaced:
dhcpv6_client.i386 0:0.10-33.el5 gaim.i386 2:2.0.0-0.28.beta5.el5 libhugetlbfs-lib.i386 0:1.0.1-1.el5 sysreport.noarch 0:1.4.3-10.el5

Complete!
[root@dhcppc0 ~]#

2011/02/24

TortoiseSVN feature request


Hello luebbe, simonlarge, steveking

I am Nguyen Vu Hung, an heavy svn user who uses TortoiseSVN on daily basic.

First of all, thank you for the great software - TortoiseSVN .

I want to propose adding a "copy svn location to clipboard"
(the URL like http://path/to/svn/file.ext) to TortoiseSVN's context menu
that is shown when we right-click on a blank space of Windows' Explorer.

Please take a look at the following image.

Best regards,

2011/02/17

Tieng Nhat 対

対(つい): Nghĩa là pair (cặp)

対にする: Làm thành cặp
対となる: Trở thành cặp
イメージと対となる原本の束単位の管理番号: ID quản lý của đơn vị bó thành cặp với ảnh

2011/02/16

LibO/OOo: repeat the *last* recent action

# Please CC this email to the UX team

On Tue, Feb 15, 2011 at 10:24 AM, Do Hong Phuc wrote:
> In Excel, F4 does function as repeating the most recent action while in
> LibO, F4 key acts as Data Sources.
> How we can assign F4 to repeat the most recent action?
Under OOo/LibO, I don't think we can bind that feature to a key other
than default.

OT:
Under Windows, I use Ctrl+Y to repeat the *last* recent action.
LibO/OOo: It is Ctrl+Shift-Y

I think that Ctrl-Y is easier the press; or we can assign
another key combos like Ctrl-2, Ctrl-3
# Are they assigned yet?

More OT:
Under Linux, we can use keymap to bind any keys.
Is that a good idea to make (as much as possible) LibO's shortcuts configurable?

2011/02/10

ThunderBird 3.1.7 cuts URL

Em dùng Thunderbird 3.1.7
Trong setting chọn email format là HTML,
soạn một email với nội dung:

-----------------------------------------
http://localhost/aaaaabxddd/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /05.abcabdadfdddddddd/abc/xyz.xls
-----------------------------------------

Expected result:
Khi nhận HTML email bằng Thunderbird 3.1.7 thì URL hiển thị đúng, click vào đó hiện ra link đúng

Acutual result:
Khi nhận HTML email bằng Thunderbird 3.1.7 thì URL bị "gẫy"

-> http://localhost/aaaaabxddd /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /05.abcabdadfdddddddd/abc/xyz.xls

Nghĩa là có ở đây:

http://localhost/aaaaabxddd/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /05.abcabdadfdddddddd/abc/xyz.xls

Không rõ đây có phải lỗi hay không?

2011/02/08

World bank data prediction

Hello all,

Given an indicator, for example "School enrollment, primary (% gross)" of the United States.
We have a series of discrete data from 1980 to 2009, which is counted for every years.

We want to predict the data for the year 2010 so we need to find a relation between it
and the previous data.

The problem is that I don't know which rule it is subjected to.
# Of course, the rules are different from indicators to indicators.

It is unlikely that we can predict the data for the year 2010 by simple (linear or polynomial)
interpolation or extrapolation.

I don't think that the data is subjected to some probabilistic rule like Markov chains.

My guess is that the data may be subjected to some Auto-Regression Moving-Average Models (ARMA) rule
or some time series rule like GARCH.

Being said that, I also have no idea which is the right direction to go or it is a no-go.

Please give me some hints,

Best regards,

Nguyen Vu Hung

cf. http://groups.google.com/group/world-bank-api/browse_thread/thread/c3a9a38b9f014ba8

2011/01/26

Dinh huong cua LibreOffice: Khong ho tro write cac format khong open


Định hướng:

Với các format không mở và không chuẩn (ví dụ StarOffice, MSOffice), thì

1. LibO chỉ hỗ trợ đọc vào
2. Và không hỗ trợ đọc ra

Làm những việc này chỉ nối giáo cho giặc mã đóng và chuẩn đóng,
nghĩa là không khuyến khích LibO và ODF.

Quyết định này mang tính chính trị nhiều hơn là kỹ thuật.
Mời các bác chém thoải mải.
- Hide quoted text -

---------- Forwarded message ----------
From: Pierre-André Jacquod
Date: 2011/1/24
Subject: [Libreoffice] Announcement: StarOffice file-format not
available any more for saving
To: LibreOffice List


Hello,
from now I have started to delete within binfilter the code allowing to
*save* using the StarOffice file format. The import (read) is
still possible and will remain. Bye bye saving sdw, sxw ....

This will of course not happens in one go...

With this push, I have done the following changes:
* StarWriter does not export anymore
* start of deletion of functions within binfilter/bf_sw, i.e StarWriter
format

For testing:
I have my set of files created with those formats, allowing me to test
the reading functionality while deleting code. But if other wants to
test it to ensure also that nothing has been broken, I would be happy.

In order to allow interested to test easily, I will push my changes to
master at periodic intervals (each 2-3 weeks, I think/hope if free time
allows), grouping them and making a short announce as reply to this mail.

Best regards
Pierre-André

PS: do not forget the --enable-binfilter flag, if you want to check it

2010/12/10

Cách marketing

Hơn 700 ngàn phiên bản của phần mềm Avast được phân phối qua đường warez. Điểm đáng
chú ý là các phần mềm nền dùng chung key và có kết nối tới server của Avast, do đó,
Avast nắm được số lượng warez (bị dùng lậu). Thay vì kêu ca, họ tìm cách "popup"
những người dùng lậu này và khuyến khích họ mua key chính thức.

Câu chuyện xảy ra tương tự với phần mềm miễn phí và mã mở. Đây là cách marketing khá
mới. Đầu tiên, phần mềm được phân phát miễn phí để thu hút users. Sau đó, nhà phân
phối tìm cách rẽ nhánh sản phẩm của mình thành cách phiên bản: Basic, Standard, Enterprise
có các tập chức năng khác nhau. Người dùng, khi không thỏa mãn với bản "Basic",
sẽ chuyển dần sang các bản có phí nhiều chức năng hơn.

cf. http://www.pcpro.co.uk/news/securicty/363379/single-software-licence-shared-774-651-times

2010/10/22

Install/Uninstall OpenOffice/LibreOffice on Centos 5


Install:
rpm -ivh --nodeps openoffice*rpm

Uninstall:
[vuhung@dhcppc0 src]$ sudo rpm -e --nodeps `rpm -qa | grep openoffice`
***
* Updating MIME database in /usr/share/mime...
Wrote 503 strings at 20 - 29c8
Wrote aliases at 29c8 - 2bc4
Wrote parents at 2bc4 - 35d0
Wrote literal globs at 35d0 - 362c
Wrote suffix globs at 362c - 6b94
Wrote full globs at 6b94 - 6bb8
Wrote magic at 6bb8 - c55c
Wrote namespace list at c55c - c56c
***
/usr/bin/gtk-update-icon-cache
Cache file created successfully.
/usr/bin/gtk-update-icon-cache
Cache file created successfully.
[vuhung@dhcppc0 src]$ sudo rpm -e --nodeps `rpm -qa | grep ooobasis3`

[vuhung@dhcppc0 src]$wget http://download.documentfoundation.org/libreoffice/testing/3.3.0-beta2/rpm/x86/LibO_3.3.0_beta2_Linux_x86_install-rpm_en-US.tar.gz

[vuhung@dhcppc0 src]$tar xvzf LibO_3.3.0_beta2_Linux_x86_install-rpm_en-US.tar.gz

cd en-US/RPMS

[vuhung@dhcppc0 RPMS]$ sudo rpm -ivh --nodeps *rpm desktop-integration/libreoffice3.3-redhat-menus-3.3-1.noarch.rpm
準備中... ########################################### [100%]
1:libreoffice-ure ########################################### [ 2%]
2:libobasis3.3-core01 ########################################### [ 4%]
3:libobasis3.3-en-US ########################################### [ 6%]
4:libobasis3.3-core02 ########################################### [ 8%]
5:libobasis3.3-core03 ########################################### [ 10%]
6:libobasis3.3-core04 ########################################### [ 12%]
7:libobasis3.3-core05 ########################################### [ 13%]
8:libobasis3.3-core06 ########################################### [ 15%]
9:libobasis3.3-core07 ########################################### [ 17%]
10:libobasis3.3-impress ########################################### [ 19%]
11:libobasis3.3-en-US-base########################################### [ 21%]
12:libobasis3.3-en-US-calc########################################### [ 23%]
13:libobasis3.3-en-US-draw########################################### [ 25%]
14:libobasis3.3-en-US-help########################################### [ 27%]
15:libobasis3.3-en-US-impr########################################### [ 29%]
16:libobasis3.3-en-US-math########################################### [ 31%]
17:libobasis3.3-en-US-res ########################################### [ 33%]
18:libobasis3.3-en-US-writ########################################### [ 35%]
19:libobasis3.3-base ########################################### [ 37%]
20:libobasis3.3-calc ########################################### [ 38%]
21:libobasis3.3-draw ########################################### [ 40%]
22:libobasis3.3-images ########################################### [ 42%]
23:libreoffice3 ########################################### [ 44%]
24:libobasis3.3-math ########################################### [ 46%]
25:libobasis3.3-writer ########################################### [ 48%]
26:libobasis3.3-binfilter ########################################### [ 50%]
27:libobasis3.3-en-US-binf########################################### [ 52%]
28:libobasis3.3-extension-########################################### [ 54%]
29:libobasis3.3-extension-########################################### [ 56%]
30:libobasis3.3-extension-########################################### [ 58%]
31:libobasis3.3-extension-########################################### [ 60%]
32:libobasis3.3-extension-########################################### [ 62%]
33:libobasis3.3-extension-########################################### [ 63%]
34:libobasis3.3-extension-########################################### [ 65%]
35:libobasis3.3-gnome-inte########################################### [ 67%]
36:libobasis3.3-graphicfil########################################### [ 69%]
37:libobasis3.3-javafilter########################################### [ 71%]
38:libobasis3.3-kde-integr########################################### [ 73%]
39:libobasis3.3-ogltrans ########################################### [ 75%]
40:libobasis3.3-ooofonts ########################################### [ 77%]
41:libobasis3.3-ooolinguis########################################### [ 79%]
42:libobasis3.3-pyuno ########################################### [ 81%]
43:libobasis3.3-testtool ########################################### [ 83%]
44:libobasis3.3-xsltfilter########################################### [ 85%]
45:libreoffice3-base ########################################### [ 87%]
46:libreoffice3-calc ########################################### [ 88%]
47:libreoffice3-draw ########################################### [ 90%]
48:libreoffice3-en-US ########################################### [ 92%]
49:libreoffice3-impress ########################################### [ 94%]
50:libreoffice3-math ########################################### [ 96%]
51:libreoffice3-writer ########################################### [ 98%]
52:libreoffice3.3-redhat-m########################################### [100%]
***
* Updating MIME database in /usr/share/mime...
Wrote 518 strings at 20 - 2d38
Wrote aliases at 2d38 - 2f34
Wrote parents at 2f34 - 3940
Wrote literal globs at 3940 - 399c
Wrote suffix globs at 399c - 7014
Wrote full globs at 7014 - 7038
Wrote magic at 7038 - ce48
Wrote namespace list at ce48 - ce58
***
/usr/bin/gtk-update-icon-cache
Cache file created successfully.
/usr/bin/gtk-update-icon-cache
Cache file created successfully.

Cách mount samba/windows network share trên mac



Cách mount

mount -t smbfs //vuhung@192.168.0.111/Public /path/testmount

Note:

1. mount có thể chạy bằng user thường hay root.
2. Phải chỉ định username
3. Có thể mount tới thư mục bất kỳ.

Xem thêm: man mount

2010/06/05

2009/05/07

wget OpenOffice vi


wget ftp://ftp5.gwdg.de/pub/openoffice/extended/3.1.0rc2/*vi* &> download.log &

[hungnv@3.1.0rc2.vi]$ ls -l
total 2021744
-rw-rw-r-- 1 hungnv hungnv 3210258 Apr 28 19:19 download.log
-rw-rw-r-- 1 hungnv hungnv 154224360 Apr 27 14:56 OOo_3.1.0rc2_20090427_LinuxIntel_install_vi_deb.tar.gz
-rw-rw-r-- 1 hungnv hungnv 155897943 Apr 27 14:56 OOo_3.1.0rc2_20090427_LinuxIntel_install_vi.tar.gz
-rw-rw-r-- 1 hungnv hungnv 175985860 Apr 27 15:03 OOo_3.1.0rc2_20090427_LinuxIntel_install_wJRE_vi.tar.gz
-rw-rw-r-- 1 hungnv hungnv 16275653 Apr 27 15:11 OOo_3.1.0rc2_20090427_LinuxIntel_langpack_vi_deb.tar.gz
-rw-rw-r-- 1 hungnv hungnv 16252687 Apr 27 15:11 OOo_3.1.0rc2_20090427_LinuxIntel_langpack_vi.tar.gz
-rw-rw-r-- 1 hungnv hungnv 160087992 Apr 27 15:24 OOo_3.1.0rc2_20090427_LinuxX86-64_install_vi_deb.tar.gz
-rw-rw-r-- 1 hungnv hungnv 161735145 Apr 27 15:24 OOo_3.1.0rc2_20090427_LinuxX8
-rw-rw-r-- 1 hungnv hungnv 16276887 Apr 27 15:31 OOo_3.1.0rc2_20090427_LinuxX8
-rw-rw-r-- 1 hungnv hungnv 16262274 Apr 27 15:31 OOo_3.1.0rc2_20090427_LinuxX8
-rw-rw-r-- 1 hungnv hungnv 169324811 Apr 27 15:38 OOo_3.1.0rc2_20090427_MacOSXI
-rw-rw-r-- 1 hungnv hungnv 156397142 Apr 27 15:45 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 196655411 Apr 27 15:52 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 14990499 Apr 27 15:56 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 150194630 Apr 27 16:02 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 184565967 Apr 27 16:09 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 14714985 Apr 27 16:13 OOo_3.1.0rc2_20090427_Solaris
-rw-rw-r-- 1 hungnv hungnv 135463496 Apr 27 16:18 OOo_3.1.0rc2_20090427_Win32In
-rw-rw-r-- 1 hungnv hungnv 149920576 Apr 27 16:24 OOo_3.1.0rc2_20090427_Win32In
-rw-rw-r-- 1 hungnv hungnv 19663000 Apr 27 16:29 OOo_3.1.0rc2_20090427_Win32In
[hungnv@3.1.0rc2.vi]$ md5sum *vi*
de244f12f1ec9b1f2bf3f188f64b5d7a OOo_3.1.0rc2_20090427_LinuxIntel_install_vi_de
b47451c727422cb62a57fbf47f7aee39 OOo_3.1.0rc2_20090427_LinuxIntel_install_vi.ta
b15a10cc3f424d3283983afec012967d OOo_3.1.0rc2_20090427_LinuxIntel_install_wJRE_
d4422ac271a02458eefec7091cac99e0 OOo_3.1.0rc2_20090427_LinuxIntel_langpack_vi_d
ea739f372fbaee97cccfc29577509df8 OOo_3.1.0rc2_20090427_LinuxIntel_langpack_vi.t
4c089a8875076c16886dc0de7781b132 OOo_3.1.0rc2_20090427_LinuxX86-64_install_vi_d
2562ec5f2d99ce2215e864d648c40005 OOo_3.1.0rc2_20090427_LinuxX86-64_install_vi.t
8446eb57090edc98e9c0302f49bdff31 OOo_3.1.0rc2_20090427_LinuxX86-64_langpack_vi_
7fe08971d1ba2666fa77ae66615a89ae OOo_3.1.0rc2_20090427_LinuxX86-64_langpack_vi.
c874569a1e251a9b763db8d99c4fe5fc OOo_3.1.0rc2_20090427_MacOSXIntel_install_vi.dmg
794bfccec3bec32835615ce0f03733ec OOo_3.1.0rc2_20090427_SolarisSparc_install_vi.tar.gz
d9df627c91deb6b8b547054c656ef448 OOo_3.1.0rc2_20090427_SolarisSparc_install_wJRE_vi.tar.gz
1bd6bcf7794a1d63fa1254cf5d428c15 OOo_3.1.0rc2_20090427_SolarisSparc_langpack_vi.tar.gz
9f833858498e1ea2f7a8b24e97c00076 OOo_3.1.0rc2_20090427_Solarisx86_install_vi.tar.gz
a273b93c3049bc238396b947b1ea1b64 OOo_3.1.0rc2_20090427_Solarisx86_install_wJRE_vi.tar.gz
871ea78d03a1d621fc6f60999347d8fa OOo_3.1.0rc2_20090427_Solarisx86_langpack_vi.tar.gz
f2afb7b650499006138f484e671a732a OOo_3.1.0rc2_20090427_Win32Intel_install_vi.exe
8357e2b01f21f6b13b7ba1312903b282 OOo_3.1.0rc2_20090427_Win32Intel_install_wJRE_vi.exe
24cfce63751f05a8c7f293caa13ed15f OOo_3.1.0rc2_20090427_Win32Intel_langpack_vi.exe

2008/10/30

Kernel compiling speed(up)

/home/vuhung/usr/src/linux-2.6.18

make randconfig
time make
real 9m2.849s
user 8m11.189s
sys 0m57.763s


Intel(R) Xeon(TM) CPU 3.80GHz x 2
2GB RAM

2008/10/23

Thanh pho Aizuwakamatsu( Nhat Ban ) chuyen 840 may tinh sang OpenOffice

Chào cả nhà,

Thành phố Aizuwakamatsu( Nhật Bản ) chuyển 840 máy tính sang OpenOffice (
OOo).

Aizuwakamatsu đã để ý tới OpenOffice từ năm 2003. Sau nhiều lần thử nghiệm,
tính đến hết tháng 8 năm 2008, đã có 840 máy tính được chuyển thành công
sang OOo.
Dự tính đến tháng 10, sẽ chuyển tiếp 240 sang OOo.

Tất cả những tài liệu, schedule, báo cáo đều được công khai[1],
đây là một tài liệu tham khảo rất tốt cho Việt Nam.

Dưới đây là một số điểm đáng chú ý từ case study này.

1. Quá trình kiểm nghiệm OOo kéo dài 5 năm. Đây là thời gian tương đối dài
ngay cả đối với
Nhật Bản là nước có cơ sở ICT cao. Với Việt Nam, có lẽ cần thí điểm và
kiểm chứng chặt trẽ hơn.
Cụ thể xem ở dưới.

2. Lý do Aizuwakamatsu chuyển sang OOo, như họ nói: là lý do tài chính.
Theo dự toán, nếu sử dụng OOo trong 5 năm, kinh phí tiết kiệm được là
$150,000.
So với một thành phố, số tiền này chỉ bằng lương trong một năm của 2
hoặc 3 người, không phải là quá nhiều.
Nhưng nếu nhân rộng mô hình này trong cả tỉnh, hay toàn quốc. Nó sẽ là
con số đáng kể.
Con số $150,000 mặc dù không đáng kể so với Nhật, nhưng nó là số tiền
rất có ý nghĩa với một nước nghèo như VN.

3. Kinh phí chuyển sang OOo bao gồm: 3a) Huấn luyện, 3b) hỗ trợ người dùng,
3c) cài đặt+version up,
3d) huấn luyện nâng cao( cho user cao cấp ), 3e) chuyển đổi format
MS->OOo

Theo cá nhân tôi, với VN, 3a cần nhiều thời gian. 3b ở VN sẽ ít vì người
dùng ít thói quen đi hỏi!,
3c thực tế không tốn thời gian, 3d hiếm trong khi 3e sẽ là vấn đề lớn
nếu số lượng file
cần chuyển đổi nhiều.

4. Phản ứng của người dùng[2]
Đây là phần quan trọng và rất đáng tham khảo( mặc dù bằng tiếng Nhật)
74% người dùng trả lời có đủ tự tin dùng OOo.
2% nói "không thể điều khiển OOo".
24% còn lại bỏ phiếu trắng.

5. Aizuwakamatsu vẫn bỏ ra 15% kinh phí để mua những phần mềm thương mại.
# Cụ thể là những phần mềm nào không được đề cập đến.


[1]
http://www.city.aizuwakamatsu.fukushima.jp/ja/shisei/torikumi/ooo/info_index.htm
[2 ]
http://www.city.aizuwakamatsu.fukushima.jp/ja/shisei/torikumi/ooo/info_response.htm



--
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype: vuhung16dg
A brief profile: http://www.hn.is.uec.ac.jp/~vuhung/Nguyen.Vu.Hung.html

2008/10/22

13 Awesome Javascript Animated Flash Like Menus

So why use flash for Web Menus when javascript has enough power to achieve similar effects.

Every web designer tries to be creative when it comes to designing the main navigation of the website. Today we would like to present you 13 awesome Javascript CSS menus that will be very handy and easy to modify to suit your needs. Popular javascript libraries are used: jQuery, Scriptaculous and Mootools.

Lets take a look at recent examples of these …

1. Vertical Animated Menus

1. Nice animated menu using CSS and Mootools

animated menu

This tutorial illustrates how to implement a nice animated menu using Mootoolsand some lines of CSS and HTML code ready to reuse in your project.

2. jQuery iPod-style Drilldown Menu

jQuery Plugins

A jQuery iPod-style drilldown menu to help users traverse hierarchical data quickly and with control. It's especially helpful when organizing large data structures that don't translate well into traditional dropdown or fly-out menus.

Demo can be found here.

3. MenuMatic

jQuery Plugins

MenuMatic is a MooTools 1.2 class that takes a sematic ordered or unordered list of links and turns it into a dynamic drop down menu system.

Download {Code} | Demo can be found here.

4. BDC DrillDown Menu

jQuery Plugins

The BDC DrillDown Menu is a compact, hierarchical drilldown menu implemented as a jQuery plugin. A drilldown menu takes up constant space like an accordian menu but offers the deep hierarchy of a flyout menu at the same time.

Download {Code} | Demo can be found here.

2. Horizontal Animated Menus

5. Mootools animated sidebar menu

animated menu

This tutorial explains how to implement an animated menu using mootools. You can see how it works directly from mootools site.

6.Simple Animated Menu for Mootools 1.2

animated menu

A really nice animated menu created using Mootools, with a flash hover effect of an arrow.

7.Sliding JavaScript Menu Highlight

animated menu

This sliding hover effect script is an easy method to add some flavor to your navigation. Using the CSS you can easily customize the navigation to fit your "look and feel".

8. Fancy Sliding Menu for Mootools

animated menu

The menu is developed in Mootools with a nice sliding effect on each tab.

9. UvumiTools Dropdown Menu

animated menu

A simple and lightweight menu that can be easily updated by simply editing a <ul> HTML element. Created using Mootools.

10. Superfish

animated menu

Superfish is an enhanced Suckerfish-style menu jQuery plugin that takes an existing pure CSS drop-down menu and adds Suckerfish-style hover effect. Features include: Timed delay on mouseout, Animation of sub-menu reveal, Supports the hoverIntent plugin, drop shadows for capable browsers and more…

11. AJAX Dropdown Tab Menu

animated menu

e24TabMenu is a plugin written for Scriptaculous. It is a tab menu that expands collapse smoothly.

12. Using jQuery for Background Image Animations

jQuery Plugins

Snook wrote a straignforward script to produce a nice menu background image animation. The animation needs to run when the user moves their mouse over and out of the navigation. The key thing to note is that any animation is stopped before attempting to animate again. This avoids animations queuing up from repeatedly moving the mouse in and out of the element.

13. A Sliding Menu

Animated menus

It is a very simple sliding menu using the effects provided by Interface. The defauly behavior of the menu is to hide after 1000ms (1 sec.) and to display when your mouse hovers over the "menu" label. The menu will also auto-hide after 1000ms when the mouse leaves the menu area. Most of these values, including the sliding effect, can be customized.

2008/10/15

create and export shape data to csv file


#!/usr/bin/perl

#
# an attempt to create a polygon shapefile
# ref http://lists.osgeo.org/pipermail/mapserver-users/2005-March/005414.html
#

use strict ;
use warnings;
use Geo::Shapelib ;

# points of the polygon
my @lat = (45.0, 45.0, 55.0, 55.0, 45.0) ;
my @lon = (-75.0, -85.0, -85.0, -75.0, -75.0) ;

my @verts = (
[$lat[0], $lon[0]],
[$lat[1], $lon[1]],
[$lat[2], $lon[2]],
[$lat[3], $lon[3]],
[$lat[4], $lon[4]]
) ;
my $shape = new Geo::Shapelib;
$shape->{Shapetype} = 5;

$shape->{MinBounds} = [20,-100] ;
$shape->{MaxBounds} = [80,-10] ;

$shape->{FieldNames} = ['ID', 'SPD','DIR'];
$shape->{FieldTypes} = ['Integer','Integer','Integer'];

push @{$shape->{Shapes}}, {
SHPType=>5,
ShapeId=>1,
Nparts=>0,
NShapes=>0,
NVertices=>5,
Vertices=>\@verts
};
push @{$shape->{ShapeRecords}}, [1,13,250];
$shape->dump();

$shape->save('./test.shp');

#!/usr/bin/perl

use strict;
use Geo::Shapelib qw/:all/;

my $shapefile = new Geo::Shapelib {
Name => 'stations',
Shapetype => POINT,
FieldNames => ['Name','Code','Founded'];
FieldTypes => ['String:50','String:10','Integer:8'];
};

while () {
chomp;
my($station,$code,$founded,$x,$y) = split /\|/;
push @{$shapefile->{Shapes}},{ Vertices => [[$x,$y,0,0]] };
push @{$shapefile->{ShapeRecords}}, [$station,$code,$founded];
}

$shapefile->save();



***Standalone skia***


***Standalone skia***

Skia( as known as Graphics Engine) is the graphics engined used in Chrome[1] , a technology that Google has aquired[2].

It comes as a part of Chrominum but I want to taste it as a stand-alone.
So I tried.

You need scons[8] to build skia. scons 1.1.0 is known to work.
You also need to install cairo[9]. cairo version 1.8.0 is known to work.

Just download skia standalone for linux[10], then

tar xvzf skia-standalone-2008-10-15.tar.gz
cd skia
scons -c # clean the build ( equivelent to make clean )
scons # to build ( equivelent to make )
cd examples # vi SConstruct to ensure that you have correct cairo build settings
scons # build the example.
./helloworld #run the example.
vi helloworld.cpp #for more information [12]

If now have examples/snapshot.png[11] which is an .png ping.

[1] http://gigaom.com/2008/09/02/google-open-sources-skia-graphics-engine/
[2] http://gigaom.com/2007/09/03/google-phone-facts/
[3] Skia original code http://src.chromium.org/viewvc/chrome/trunk/src/skia/
[4] Chrome is out http://www.satine.org/archives/2008/09/02/skia-source-code-released/
[5] Chrome website http://www.google.com/chrome
[6] http://www.satine.org/archives/2007/03/05/the-skia-source-code-dilemma/
[7] http://www.atoker.com/blog/2008/09/06/skia-graphics-library-in-chrome-first-impressions
[8] http://www.scons.org
[9] http://cairographics.org
[10] http://aoclife.ddo.jp/~vuhung/foss/skia/skia-standalone-2008-10-15.tar.gz
[11] http://aoclife.ddo.jp/~vuhung/foss/skia/snapshot.png
[12] http://aoclife.ddo.jp/~vuhung/foss/skia/helloworld.cpp

2008/09/09

Cach tiep thu y kien cua nguoi Viet va FOSS

-- to be changed --

Cách tiếp thu ý kiến của người Việt và FOSS

phần mềm mã mở đầu tiên có từ những ngày đầu trong lịch sử máy tính . Mục đích của việc mở mã nguồn là để mọi người tham gia dự án có thể peer-review code cũng như những thành quả lao động của những thành viên khác trong dự án. Việc peer-review này ảnh hưởng lớn đến chất lượng cũng như độ lớn của dự án .

Trong những nghành nghiên cứu, peer-review có lịch sử lâu đời và nó có quy trình hoàn hảo hơn . A đệ trình luận văn của mình lên hội đồng và hội đồng sẽ "chấm" luận văn của anh ta. Việc "chấm" luận văn này được tiến hành bởi một số ít người có quyền review.

Với FOSS, điểm khác nhau là sự "mở" của mã nguồn, và hơn nữa là sự "mở" đối với ý kiến được đóng góp. Khác với ví dụ về luận văn ở trên, trong một dự án mở, bất kỳ thành viên nào cũng có thể review code của người khác. Anh ta có quyền góp ý, chỉ trích . Và nếu anh ta không tán thành với dự án hiện tại, anh ta hoàn toàn có thể dùng code hiện tại cả dự án và phát triển nó theo hướng riêng của mình .

Thông thường, nơi để trao đổi cho những dự án mã mở là mailing list hay forum. Bất kỳ thành viên nào cũng có quyền đóng góp. Ở Mỹ hay Âu Châu, do đặc thù văn hóa, thành viên không ngại khi chỉ trích người khác và không sợ khi bị chỉ trích. Họ tiến hành hai phần của công việc review: Chỉ trích người khác và bảo vệ ý kiến của mình khi bị chỉ trích . Họ không sợ bị chê cười khi ai đó chỉ ra rằng code của mình sai, hoặc người khác có giải pháp tốt hơn . Với Việt Nam, tình hình thay đổi. Mailing list hay forum thậm chí có hàng trăm, hay ngàn người tham gia trong khi số thành viên active ( tích cực tham gia trao đổi ), chỉ là con số đếm trên đầu ngón tay .

Ở một mailing list cũ mà tôi biết và lấy làm ví dụ: Vietlug . Số thành viên tham gia trong thời điểm nhiều nhất khoảng 250 . Số người gửi email lên mailing list chỉ khoảng 20. Những thành viên còn lại, im lặng và đọc . Họ thích tiếp thu kiến thức một chiều . Họ sợ rằng nếu mình "lỡ lời", bản thân sẽ bị chê cười về sự ngu ngốc của họ . Một giả định khác: Một số thành viên "cao thủ" coi những vấn đề thảo luận là hiển nhiên, không nhất thiết phải thảo luận. Họ không đóng góp những ý kiến quý giá của mình cho cộng đồng.

[1] http://blog.360.yahoo.com/blog-tNaZu7Qnbq4Tbr6XhJCFBA--?cq=1&p=1374

Why Microsoft Is Going Open Source

> Why Microsoft Is Going Open Source -
> http://www.linuxjournal.com/node/1000260
>
Bài này có 2 ý chính giải thích vì sao MS goes OSS

1. Try out new development methodologies ( FOSS )
2. OOXML ... 6000+ pages of documentation mean....a re-definition of a
closed standard as open.

IE chiếm 80% web browser share . Phần lớn share còn lại thuộc FireFox.
Em không hiểu MS involves vào Mozilla project để làm gì ? Để họ phương
pháp phát triển phần mềm mã mở?
Hay để đưa dần những key developers của dự án thành thành người của MS
và lái roadmap của dự náy này theo ý muốn của MS?
Đây chỉ là phỏng đoán của em thôi, chứ thực ra MS chỉ bỏ công sức để hỗ
trợ Mozilla chạy trên Vista[1]

Dù thế này đi chăng nữa thì đây cũng không là biểu hiện xấu.

Tác giả bài báo trên sai khi nói OOXML là "a re-definition of a closed
standard as open".
Nói chính xác hơn là: MS mở OOXML format. Mục đích chính trị của MS là
nâng cao CSR của bản thân họ.

Thêm nữa, nếu các bác đọc FAQ[2] của MS Open Source website [3], các bác
sẽ thấy mục đích của trang này không phải
là open source code của bất kì chương trình nào thuộc MS, mà chỉ để hỗ
trợ những dự án mở dùng công nghệ của MS.
Điều này tốt nhưng tốt hơn vẫn là mở hết mã nguồn của MS :D.
Điều phi lý này thực tế là không thể thực hiện được . MS và những đổi
thủ khác của MS như IBM hay Apple cũng dùng chung
chiến lược "Vendor lock-in"[4] đối với sản phẩm của mình.


[1]
http://download.microsoft.com/download/D/4/4/D44F6287-41F5-48EB-A93A-23D251B2704E/OpeninActionMozilla.pdf
[2] http://www.microsoft.com/opensource/faq.mspx#
[3] http://www.microsoft.com/opensource/
[4] http://en.wikipedia.org/wiki/Vendor_lock-in
[5] http://blog.360.yahoo.com/blog-tNaZu7Qnbq4Tbr6XhJCFBA--?cq=1&l=21&u=25&mx=534&lmt=5

Open Source is a ( social ) *MOVEMENT*

> Chỉ riêng việc bạn tư vấn cho người dùng một cách trung thực như thế tớ đã
> sẵn sàng chạy qua chỗ bạn để in ngay poster rồi. Thanh toán sòng phẳng. Ấy
> là chưa nói đến chuyện bạn có lòng hảo tâm "miễn phí" cho anh em HanoiLUG.
> Cái này phải quý nhau lắm mới rộng rãi như vậy. Rất cảm ơn bạn vì điều này.

Hơi ngoài lề một chút mong các bác thông cảm...

Open Source, bắt đầu từ dự án nhân Linux cho đến Mozilla Project hay
OpenOffice bắt những nhà nghiên cứu xã hội phải nhìn lại FOSS như một
hiện tượng xã hội [1], chứ không phải đơn thuần là những dự án nhỏ trong
ngành IT.

Các bác có thời gian xin đọc links trên. "Free Software Movement" có
những đặc trưng của một cuộc vận động xã hội. "Free", theo định nghĩa
trong "Freedom" là từ tương đối nóng và đa số chúng ta tránh không nói đến.

# Nó gần như một đề tài cấm.

Mục đích của Hnlug, cũng như các Lugs khác, có nhiệm vụ chung là[1]:

1. Viết ( sản xuất ) FOSS.
2. Và truyền bá ( bao gồm PR ) FOSS.

Có lẽ nhiệm vụ của 1 LUG chỉ chú trọng vào 2. Theo tôi nghĩ, HNLug,
giống như những lugs khác, mặc dù là "hội người dùng Linux" nhưng có
nhiều thành viên có nhiều kinh nghiệm và người phát triển . Những người
này ngoài việc trao đổi thông tin, còn có nhiệm vụ quảng bá và hướng dẫn
những người mới sử dụng FOSS.

Trong 2., việc truyền bá thực sự rất có ý nghĩa. hanoilug.org chỉ phát
huy được 1 phần. Tôi nghĩ VTV2 và những người như bác Kiên rất có ý
nghĩa trong việc truyền bá. Có ai không biết VTV2 đâu ?

Các bác phang mạnh nhé

[1] http://en.wikipedia.org/wiki/Free_software_movement
[2] http://blog.360.yahoo.com/blog-tNaZu7Qnbq4Tbr6XhJCFBA--?cq=1&l=16&u=20&mx=534&lmt=5

2008/08/25

Thành phố Aizuwakamatsu( Nhật Bản ) chuyển 840 máy tính sang OpenOffice ( OOo).

Aizuwakamatsu đã để ý tới OpenOffice từ năm 2003. Sau nhiều lần thử nghiệm,
tính đến hết tháng 8 năm 2008, đã có 840 máy tính được chuyển thành công sang OOo.
Dự tính đến tháng 10, sẽ chuyển tiếp 240 sang OOo.

Tất cả những tài liệu, schedule, báo cáo đều được công khai[1],
đây là một tài liệu tham khảo rất tốt cho Việt Nam.

Dưới đây là một số điểm đáng chú ý từ case study này.

1. Quá trình kiểm nghiệm OOo kéo dài 5 năm. Đây là thời gian tương đối dài ngay cả đối với
Nhật Bản là nước có cơ sở ICT cao. Với Việt Nam, có lẽ cần thí điểm và kiểm chứng chặt trẽ hơn.
Cụ thể xem ở dưới.

2. Lý do Aizuwakamatsu chuyển sang OOo, như họ nói: là lý do tài chính.
Theo dự toán, nếu sử dụng OOo trong 5 năm, kinh phí tiết kiệm được là $150,000.
So với một thành phố, số tiền này chỉ bằng lương trong một năm của 2 hoặc 3 người, không phải là quá nhiều.
Nhưng nếu nhân rộng mô hình này trong cả tỉnh, hay toàn quốc. Nó sẽ là con số đáng kể.
Con số $150,000 mặc dù không đáng kể so với Nhật, nhưng nó là số tiền rất có ý nghĩa với một nước nghèo như VN.

3. Kinh phí chuyển sang OOo bao gồm: 3a) Huấn luyện, 3b) hỗ trợ người dùng, 3c) cài đặt+version up,
3d) huấn luyện nâng cao( cho user cao cấp ), 3e) chuyển đổi format MS->OOo

Theo cá nhân tôi, với VN, 3a cần nhiều thời gian. 3b ở VN sẽ ít vì người dùng ít thói quen đi hỏi!,
3c thực tế không tốn thời gian, 3d hiếm trong khi 3e sẽ là vấn đề lớn nếu số lượng file
cần chuyển đổi nhiều.

4. Phản ứng của người dùng[2]
Đây là phần quan trọng và rất đáng tham khảo( mặc dù bằng tiếng Nhật)
74% người dùng trả lời có đủ tự tin dùng OOo.
2% nói "không thể điều khiển OOo".
24% còn lại bỏ phiếu trắng.

5. Aizuwakamatsu vẫn bỏ ra 15% kinh phí để mua những phần mềm thương mại.
# Cụ thể là những phần mềm nào không được đề cập đến.


[1] http://www.city.aizuwakamatsu.fukushima.jp/ja/shisei/torikumi/ooo/info_index.htm
[2 ]http://www.city.aizuwakamatsu.fukushima.jp/ja/shisei/torikumi/ooo/info_response.htm

2008/08/14

PNG8 opacity color doesn't display in Firefox 2, 3

When a PNG8 file has a color that is identical to its opacity color, 
some software ( like Firefox 2 or 3 ) will not display this color.

The probability of this bug is 1/255*255*255*255
because each channel( R, G, B and alpha ) has 8 bits long.

In ImageMagick or GraphicsMagick,
the opacity color can be deleted with matte(false) function,like



/* g++ `pkg-config --libs --cflags ImageMagick++`cut_sasebo.cpp */
/* export LD_LIBRARY_PATH=/usr/local/lib */
#include
#include
using namespace std;
using namespace Magick;

int main()
{
Magick::Image image("sasebo_big.png") ;

image.crop( Magick::Geometry(256, 256,
1536, 2303));

image.matte(false);

image.quantizeColors(256);
image.quantizeDither(false);
image.quantize();
image.write("sasebo_256x256.png"); return 0;
}







Not that both ImageMagick and GraphicsMagick has left its PNG8 format unfnished.
The PNG8 format is not made by PNG group, but Adobe.
Technically, PNG8 is GIF format plus a opacity color.

if (LocaleCompare(image_info->magick,"PNG8") == 0)
{
(void) SetImageType(image,PaletteType);
if (image->matte)
{
/* To do: Reduce to binary transparency */
}
}


Ref:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=11406&p=38212 http://www.imagemagick.org/Usage/formats/#png http://www.graphicsmagick.org/www/Magick++/Image.html#Image%20Manipulation%20Methods

2008/07/28

cairo 1.6.4 jpeg I/O support patch


Hello all,

This is an unofficial patch to cairo 1.6.4 that addes jpeg I/O support to cairo.

The original patch( to an older version of cairo) is not mine.
Please take a look at src/cairo-jpeg.c for credit(s).

Installation:
1. ./configure --enable-jpeg; make; make install as usual, or better
2. autoreconf to adapt the changes in configure.in to your enviroment.

For more information, please use diff against the standard release cairo-1.6.4

ABIs added ( similar to PNG ) :
cairo_get_default_jpeg_parameter
cairo_surface_write_to_jpeg
cairo_image_surface_create_from_jpeg
cairo_image_surface_create_from_jpeg_stream

To download, click the link below:
http://www.hn.is.uec.ac.jp/~vuhung/patches/cairo-1.6.4.jpeg-patch.tar.gz

2008/07/23

A better average


double variance(long long *x, int n)
{
double m = x[0];
double s = 0;
int i;
for (i=0; i double m_new = m + (x[i] - m)/(i+1);
s = s + (x[i] - m)*(x[i] - m_new);
m = m_new;
}
return s / (n - 1);
}

double mean(long long *x, int n)
{
double m = x[0];
int i;
for (i=0; i m = m + (x[i] - m)/(i+1);
}
return m;
}

double stddev(long long *x, int n)
{
return sqrt(variance(x, n));
}

long long times[30];

printf("mean: %f stddev: %f\n", mean(times, 20), stddev(times, 20));

2008/06/04

OpenCV: Rebuild the library with Windows, GTK+ 2.x

To fix: Install latest gtk+2.x ( 2.12.9 as of now ).

Remove all the *Windows functions,


#include 
#include

#define MAX_CLUSTERS (32) /* NX^ */

#include
#include

static struct rusage rusage_before;
static struct rusage rusage_after;

void
startTimer(void)
{
getrusage(RUSAGE_SELF, &rusage_before);
}


float
stopTimer(void)
{
long tsec, tusec;

getrusage(RUSAGE_SELF, &rusage_after);

tsec = rusage_after.ru_utime.tv_sec - rusage_before.ru_utime.tv_sec;
tusec = rusage_after.ru_utime.tv_usec - rusage_before.ru_utime.tv_usec;

return (tsec + ((float)tusec) / 1000000.0);
}

int
main (int argc, char **argv)
{
int i, size;
IplImage *src_img = 0, *dst_img = 0;
CvMat *clusters;
CvMat *points;
CvMat *color = cvCreateMat (MAX_CLUSTERS, 1, CV_32FC3);
CvMat *count = cvCreateMat (MAX_CLUSTERS, 1, CV_32SC1);

// (1)
if (argc != 2 || (src_img = cvLoadImage (argv[1], CV_LOAD_IMAGE_COLOR)) == 0)
return -1;

size = src_img->width * src_img->height;
dst_img = cvCloneImage (src_img);
clusters = cvCreateMat (size, 1, CV_32SC1);
points = cvCreateMat (size, 1, CV_32FC3);

// (2)sNZls
for (i = 0; i < size; i++) {
points->data.fl[i * 3 + 0] = (uchar) src_img->imageData[i * 3 + 0];
points->data.fl[i * 3 + 1] = (uchar) src_img->imageData[i * 3 + 1];
points->data.fl[i * 3 + 2] = (uchar) src_img->imageData[i * 3 + 2];
}

// (3)NX^O
startTimer();
cvKMeans2 (points, MAX_CLUSTERS, clusters, cvTermCriteria (CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 10, 1.0));
printf( "finished making cmapped pix: %7.3f secs\n", stopTimer());

// (4)eNX^lvZ
cvSetZero (color);
cvSetZero (count);
for (i = 0; i < size; i++) {
int idx = clusters->data.i[i];
int j = ++count->data.i[idx];;
color->data.fl[idx * 3 + 0] = color->data.fl[idx * 3 + 0] * (j - 1) / j + points->data.fl[i * 3 + 0] / j;
color->data.fl[idx * 3 + 1] = color->data.fl[idx * 3 + 1] * (j - 1) / j + points->data.fl[i * 3 + 1] / j;
color->data.fl[idx * 3 + 2] = color->data.fl[idx * 3 + 2] * (j - 1) / j + points->data.fl[i * 3 + 2] / j;
}

// (5)NX^F`
for (i = 0; i < size; i++) {
int idx = clusters->data.i[i];
dst_img->imageData[i * 3 + 0] = (char) color->data.fl[idx * 3 + 0];
dst_img->imageData[i * 3 + 1] = (char) color->data.fl[idx * 3 + 1];
dst_img->imageData[i * 3 + 2] = (char) color->data.fl[idx * 3 + 2];
}

#if 0
// (6)\CL[I
cvNamedWindow ("src", CV_WINDOW_AUTOSIZE);
cvShowImage ("src", src_img);
cvNamedWindow ("low-color", CV_WINDOW_AUTOSIZE);
cvShowImage ("low-color", dst_img);
cvWaitKey (0);

cvDestroyWindow ("src");
cvDestroyWindow ("low-color");
#endif

cvReleaseImage (&src_img);
cvReleaseImage (&dst_img);
cvReleaseMat (&clusters);
cvReleaseMat (&points);
cvReleaseMat (&color);
cvReleaseMat (&count);

return 0;
}



[vuhung@teriyaki c]$./kmeans
OpenCV ERROR: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support)
in function cvNamedWindow, window.cpp(71)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)
Terminating the application...
called from cvUnregisterType, cxpersistence.cpp(4933)

2008/05/20

Movie conversion

[vuhung@aoclife tmp]$ time ffmpeg -i ~serendipity/public_html/Dress.avi Dress.flv
FFmpeg version SVN-r13202, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/home/vuhung
libavutil version: 49.6.0
libavcodec version: 51.57.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on May 20 2008 16:41:31, gcc: 4.1.2 20070626 (Red Hat 4.1.2-14)

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997/125)
Input #0, avi, from '/var/www/home/serendipity/public_html/Dress.avi':
Duration: 01:50:49.10, start: 0.000000, bitrate: 883 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 700x272 [PAR 1:1 DAR 175:68], 23.98 tb(r)
Stream #0.1: Audio: mp3, 44100 Hz, stereo, 112 kb/s
File 'Dress.flv' already exists. Overwrite ? [y/N] y
Output #0, flv, to 'Dress.flv':
Stream #0.0: Video: flv, yuv420p, 700x272 [PAR 1:1 DAR 175:68], q=2-31, 200 kb/s, 23.98 tb(c)
Stream #0.1: Audio: adpcm_swf, 44100 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=159365 fps=184 q=31.0 Lsize= 466006kB time=6646.9 bitrate= 574.3kbits/s
video:174077kB audio:287049kB global headers:0kB muxing overhead 1.058247%

real 15m14.908s
user 14m6.105s
sys 0m15.406s
[vuhung@aoclife tmp]$ ls -lh Dress.flv
-rw-rw-r-- 1 vuhung vuhung 456M 5月 20 16:58 Dress.flv
[vuhung@aoclife tmp]$ ls -lh ~serendipity/public_html/Dress.avi
-rw-rw-r-- 1 serendipity serendipity 701M 4月 17 11:58 /var/www/home/serendipity/public_html/Dress.avi
[vuhung@aoclife tmp]$

2008/05/16

Tip with getrusage



#include

# getrusage is a POSIX funtion
# http://www.opengroup.org/onlinepubs/000095399/functions/getrusage.html

static struct rusage rusage_before;
static struct rusage rusage_after;

void
startTimer(void)
{
getrusage(RUSAGE_SELF, &rusage_before);
}


l_float32
stopTimer(void)
{
l_int32 tsec, tusec;

getrusage(RUSAGE_SELF, &rusage_after);

tsec = rusage_after.ru_utime.tv_sec - rusage_before.ru_utime.tv_sec;
tusec = rusage_after.ru_utime.tv_usec - rusage_before.ru_utime.tv_usec;

return (tsec + ((l_float32)tusec) / 1000000.0);
}

2008/04/01

strstr test

[vuhung@g++]$gcc -Wall strstr.c
[vuhung@g++]$./a.out
p1 = ,Ten,2, toi
p2 = ,Ten,2, toi
p1 = ,2, toi
p2 = Ten,2, toi
p1 = 2, toi
p2 = , toi
p1 = (null)
p2 = toi
[vuhung@g++]$cat strstr.c
#include
#include

int main()
{
unsigned char *p1;
unsigned char *p2;

unsigned char string[20] = ",Ten,2, toi";

p1 = string;

p2 = strstr(p1, ",");

printf("p1 = %s\n", p1);
printf("p2 = %s\n", p2);

p2++;
p1 = strstr(p2, ",");

printf("p1 = %s\n", p1);
printf("p2 = %s\n", p2);

p1++;
p2 = strstr(p1, ",");

printf("p1 = %s\n", p1);
printf("p2 = %s\n", p2);

p2++;
p1 = strstr(p2, ",");

printf("p1 = %s\n", p1);
printf("p2 = %s\n", p2);

return 0;

}

2008/03/04

Will 'free' return the memory Immediately to the OS ?

> Will 'free' return the memory Immediately to the OS ?

It depends on how your free() is implemented.

Most libc's use a complex algorithm to do memory manangement,
in order to get the speed, maybe they won't give the memory
to OS immediately after free().

The C std just can guarantee that after your free(), that
memory block can be used for further malloc().

2008/02/18

Tính trung lập và chính xác của wikipedia

Tính trung lập và chính xác của wikipedia không phải bao giờ cũng có thể tin được . Đặc biệt với những vấn đề phi kĩ thuật, sự xác định tính đúng sai phụ thuộc quá nhiều vào người viết là khó kiểm chứng . Mình đọc entry viết về Lê Lợi ở vi.wikipedia.org và thấy điều này . en.wikipedia.org cũng gặp vấn đề tương tự. Cơ bản việc so sánh những chi tiết lắt nhắt của Lê Lợi và Lưu Bang cũng làm mất tính bách khoa của entry này rồi .

Entry về HCM

http://vi.wikipedia.org/wiki/H%E1%BB%93_Ch%C3%AD_Minh

cũng bị khóa vì có quá nhiều nhiều luồng ý kiến trái ngược nhau. Không ai đủ trung lập để viết về HCM . Nếu đọc kĩ sẽ thấy rất nhiều câu chữ ngô nghê trong entry này .

Thử xem nhé

http://vi.wikipedia.org/w/index.php?title=H%E1%BB%93_Ch%C3%AD_Minh&action=history
http://vi.wikipedia.org/w/index.php?title=H%E1%BB%93_Ch%C3%AD_Minh&diff=1021547&oldid=1021135
( Lẫn văn nói, F*** )
http://vi.wikipedia.org/w/index.php?title=H%E1%BB%93_Ch%C3%AD_Minh&diff=1021135&oldid=1019123
( Link tới Vũ Thư Hiến và BBC bị xóa )
http://vi.wikipedia.org/w/index.php?title=H%E1%BB%93_Ch%C3%AD_Minh&diff=next&oldid=884898
( Một số chi tiết cụ thể về Cải cách ruộng đất bị xoá )

2008/02/14

/usr/lib/libstdc++.so.6 : version 'GLIBCXX_3.4.9' not found (required by my_app) :

/usr/lib/libstdc++.so.6 : version 'GLIBCXX_3.4.9' not found (required by my_app) :

because: libstdc++.so.6 is not compartible with the libstdc++.so we have used to compile my_app:

fix:

export LD_LIBRARY_PATH=/where/the/lib/folder/of/gcc/is:$LD_LIBRARY_PATH

Solaris guile installation

[vuhung@ guile-1.8.3]$uname -a
SunOS 5.10 Generic_127111-05 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris

[vuhung@ guile-1.8.3]$./configure --prefix=$HOME --with-gnu-ld LIBS=-L$HOME/lib CFLAGS=-I$HOME/include

make:

numbers.c: In function `scm_log':
numbers.c:6015: error: `_Complex_I' undeclared (first use in this function)
numbers.c:6015: error: (Each undeclared identifier is reported only once
numbers.c:6015: error: for each function it appears in.)
numbers.c: In function `scm_exp':
numbers.c:6081: error: `_Complex_I' undeclared (first use in this function)
gmake[3]: *** [libguile_la-numbers.lo] Error 1

downgrade to guile-1.6.4

./configure --prefix=$HOME --with-gnu-ld LIBS=-L$HOME/lib CFLAGS=-I$HOME/include
make
make install

GNU file ( with magic lib ) vs Solaris standard file command

[Solaris file ]

[vuhung@soltest02 UnitTestLinux]$/usr/bin/file -v
/usr/bin/file: オプションが正しくありません -- v
使用法: file [-dh] [-M mfile] [-m mfile] [-f ffile] <ファイル> ...
file [-dh] [-M mfile] [-m mfile] -f ffile
file -i [-h] [-f ffile] <ファイル> ...
file -i [-h] -f ffile
file -c [-d] [-M mfile] [-m mfile]

[vuhung@soltest02 UnitTestLinux]$file output/real/real_18.png
output/real/real_18.png: PNG イメージデータ

[ GNU file ]

[vuhung@soltest02 UnitTestLinux]$~/bin/file --version
file-4.23
magic file from /export/home/vuhung/share/file/magic

[vuhung@soltest02 UnitTestLinux]$~/bin/file output/real/real_18.png
output/real/real_18.png: PNG image data, 800 x 600, 8-bit colormap, non-interlaced

SPARC Enterprise T5220 multithreading benchmark(仮)

[vuhung@ ]$make clean; time make
real 17m9.996s
user 16m43.709s
sys 0m22.620s

[vuhung@ ]$make clean; time make -j 8
real 2m15.245s
user 16m22.220s
sys 0m21.046s

[vuhung@ ]$make clean; time make -j 64
real 1m37.810s
user 23m30.976s
sys 0m31.164s

[vuhung@ ]$make clean; time make -j 128
real 1m36.545s
user 23m38.538s
sys 0m31.378s

[vuhung@ ~]$uname -a
SunOS 5.10 Generic_127111-05 sun4v sparc SUNW,SPARC-Enterprise-T5220 Solaris

[vuhung@ ~]$prtdiag
システム構成: Sun Microsystems sun4v SPARC Enterprise T5220
メモリーサイズ: 32640 M バイト

========================= CPU ===============================================

CPU CPU
Location CPU Freq Implementation Mask
------------ ----- -------- ------------------- -----
MB/CMP0/P0 0 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P1 1 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P2 2 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P3 3 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P4 4 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P5 5 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P6 6 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P7 7 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P8 8 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P9 9 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P10 10 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P11 11 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P12 12 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P13 13 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P14 14 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P15 15 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P16 16 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P17 17 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P18 18 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P19 19 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P20 20 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P21 21 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P22 22 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P23 23 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P24 24 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P25 25 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P26 26 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P27 27 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P28 28 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P29 29 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P30 30 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P31 31 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P32 32 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P33 33 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P34 34 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P35 35 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P36 36 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P37 37 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P38 38 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P39 39 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P40 40 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P41 41 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P42 42 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P43 43 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P44 44 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P45 45 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P46 46 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P47 47 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P48 48 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P49 49 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P50 50 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P51 51 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P52 52 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P53 53 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P54 54 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P55 55 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P56 56 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P57 57 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P58 58 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P59 59 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P60 60 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P61 61 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P62 62 1167 MHz SUNW,UltraSPARC-T2
MB/CMP0/P63 63 1167 MHz SUNW,UltraSPARC-T2

2008/02/04

Fast, Fixed Point Square Root Computation ?

I did test your magic_sqrt but the time to execute sqrt() and magic_sqrt() are almost the same with my environment:

Linux, RHEL 4., x64, Xeon 3.2G x 2, 4MB memory gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3), glib 2.3.4.

Here is the code:

[vuhung@ g++]$gcc -lm sqrt.c
[vuhung@ g++]$./a.out
sqrt time = 0.025689
magic sqrt time = 0.026223
[vuhung@ g++]$cat sqrt.c
#include
#include
#include
#include

float magic_sqrt (float number)
{
long i;
float f = 1.5, x = number/2, y = number;
i = * ( unsigned long * ) &y;
i = 0x5f3759df - ( i >> 1 );
y = * ( float * ) &i;
y = y * (f - x*y*y);
return number * y;

}

int main()
{
long i;

long NUM = 1000000;
float x;

double real, real_begin;
struct timeval tv;
gettimeofday (&tv, NULL);
real_begin = tv.tv_sec + (double) tv.tv_usec * 1e-6;

for(i = 0; i < NUM; i++)
x =sqrt(i + 0.01);

gettimeofday (&tv, NULL);
real = (tv.tv_sec + (double) tv.tv_usec * 1e-6);
printf (" sqrt time = %f\n", real - real_begin);


gettimeofday (&tv, NULL);
real_begin = tv.tv_sec + (double) tv.tv_usec * 1e-6;

for(i = 0; i < NUM; i++)
x = magic_sqrt(i + 0.01);
gettimeofday (&tv, NULL);
real = (tv.tv_sec + (double) tv.tv_usec * 1e-6);
printf ("magic sqrt time = %f\n", real - real_begin);

return 0;

}
http://www.qoheleth.uklinux.net/blog/?p=139
http://themanaworld.org/tmwservdox/mathutils_8cpp-source.html

2008/01/25

configure.in for libiconv ( iconv ) checking.




As the title states, use this with your autoconf and automake under
both Linux ( where iconv_open() is a libc built-in function )
and Solaris ( where iconv_open() is a part of GNU libiconv ).

#
# Checks for iconv
#
AC_MSG_CHECKING([for a usable iconv])
ICONV_LIBS=""
AC_TRY_LINK([#include ],
[iconv_open ("from", "to");],
[use_iconv=1],
[use_iconv=0])
if test x$use_iconv = x1; then
AC_MSG_RESULT([libc])
else
# try using libiconv
fontconfig_save_libs="$LIBS"
LIBS="$LIBS -liconv"

AC_TRY_LINK([#include ],
[iconv_open ("from", "to");],
[use_iconv=1],
[use_iconv=0])

if test x$use_iconv = x1; then
ICONV_LIBS="-liconv"
AC_MSG_RESULT([libiconv])
else
AC_MSG_RESULT([no])
fi

LIBS="$fontconfig_save_libs"
fi
AC_SUBST(ICONV_LIBS)
AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.])

2008/01/22

Solaris Vim multibyte( Japanese, Chinese, Korean ) support

This also includes Linux and other platforms if you needmultibyte( Japanese, Chinese, Korean ) support for vim.

wget vim-7.1.tar.gz
tar xvzf vim-7.1.tar.gz
cd vim71
--prefix=$HOME \
--enable-multibyte \
--enable-cscope \
--with-features=huge

2008/01/16

Add a text to a PNG file


#if 0
png_text text_ptr[1];
text_ptr[0].key = "userInfo";
char png_userInfo[100];
sprintf(png_userInfo, "%d", m_userInfo);
text_ptr[0].text = png_userInfo;
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
png_set_text(png_ptr, info_ptr, text_ptr, 1);
#endif

2008/01/13

FutureNet CR-110 Pro Router configuration

show config

nat 2 192.168.254.016 192.168.254.016 * * 000.000.000.000
nat 127 * * * * 000.000.000.000
main 0 ip 222.151.076.136
main 0 mask 255.255.255.224
main 0 gateway 222.151.076.129
main 0 dhcp off
main 0 autodns on
main 0 secdns 210.224.177.140
main 0 pppoe on
admin password ********
dhcp client 0 0002b35d1040 192.168.254.001
dhcp client 1 0002b38d1dbd 192.168.254.002
dhcp client 2 0002b35d101b 192.168.254.003
dhcp client 3 0000e2864dc9 192.168.254.004
dhcp client 4 0002b38d1dc0 192.168.254.005
dhcp client 5 0003936953e0 192.168.254.006
dhcp client 6 000cf1a4b1b9 192.168.254.007
dhcp client 7 00094157c00f 192.168.254.008
dhcp client 8 0015609910d3 192.168.254.009
dhcp client 9 000a4810de69 192.168.254.010
dhcp client 10 00164111e07d 192.168.254.011
dhcp client 11 00029e053f09 192.168.254.012
dhcp client 12 0050da89d4f4 192.168.254.013
dhcp client 13 00065b37e7a3 192.168.254.014
dhcp client 14 00c09fd9b526 192.168.254.015
dhcp client 15 000d60e8d839 192.168.254.016
dhcp client 16 00096b5267bf 192.168.254.017
dhcp client 17 0013a9087c6c 192.168.254.018
pppoe 1 use on
pppoe 1 id aad92338@BIG
pppoe 1 password ********
pppoe 1 connectondemand off
pppoe 1 idletimeout 0
pppoe 1 maxtimeout 0

----------------

show routetable

Dynamic Routing
Destination Gateway Interface Met
---------------- --------------- --------- ---
192.168.254.000/24 Ether 1 1
default Ether 0 1
000.000.000.000/0 Ether 0 1

Static Routing
Destination Gateway Interface Met

CR 100 Pro Router.

2008/01/07

Endianess conversion

Endianness maybe a pain in the ass if you don't know it, and you have to work on multi platforms like Linux x86 and Solaris Sparc.

And here is a tip ( quick hack, quit easy ) to convert the endianness .


[vuhung@soltest01 perl]$od -x useable.dat |head
0000000 7561 6d69 2800 0b00 0100 0000 0100 0100
0000020 6400 6700 6197 7155 90a4 c065 3e49 0000
0000040 dd6d 0000 0404 3501 0000 0040 0103 0100
0000060 0200 0000 0100 0100 6400 6800 6197 7155
0000100 90a4 c065 3e49 0000 dd6d 0000 0404 3401
0000120 0000 0040 0103 0100 0300 0000 0100 0100
0000140 6400 6900 d925 5d15 2429 7019 f824 0100
0000160 74b7 0100 0404 3401 0000 0000 0103 0100
0000200 0400 0000 0100 0100 6400 6a00 7709 5805
0000220 4a0a 5d06 e093 0400 d0dd 0600 0404 3501
[vuhung@soltest01 perl]$od -x useable.dat.big | head
0000000 6175 696d 0028 000b 0001 0000 0001 0001
0000020 0064 0067 9761 5571 a490 65c0 493e 0000
0000040 6ddd 0000 0404 0135 0000 4000 0301 0001
0000060 0002 0000 0001 0001 0064 0068 9761 5571
0000100 a490 65c0 493e 0000 6ddd 0000 0404 0134
0000120 0000 4000 0301 0001 0003 0000 0001 0001
0000140 0064 0069 25d9 155d 2924 1970 24f8 0001
0000160 b774 0001 0404 0134 0000 0000 0301 0001
0000200 0004 0000 0001 0001 0064 006a 0977 0558
0000220 0a4a 065d 93e0 0004 ddd0 0006 0404 0135
[vuhung@soltest01 perl]$cat endian-convert.pl
#!/usr/local/bin/perl

($ifile, $ofile) = @ARGV;

open(IN, "$ifile");
open(OUT,">$ofile");
while(read(IN,$buf,2)){
$buf = unpack("n",$buf);
$buf = pack("v",$buf);
print OUT $buf;
}
[vuhung@soltest01 perl]$

gdb on ( Open ) Solaris 10

If you try to install gdb 6.6 as what is described gdb's README file, you will get compilation error when you "make", in tui module.

The tip: disable tui and compile gdb only!


wget ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/gdb-6.6.tar.gz
tar xvzf gdb-6.6.tar.gz
cd gdb-6.6/gdb
./configure --prefix=$HOME --disable-tui
make
make install

2007/12/18

Chứng minh định lý trong wikipedia

Đây là một đề tài mở ở slashdot.

http://ask.slashdot.org/comments.pl?sid=39...mp;cid=21716520

Mình nghĩa diendantoanhoc có thể làm là:

Tham gia dịch ( bước 1 ) những định lý bằng tiếng Anh ra tiếng Việt . Và sau đó tham gia soạn bài mới ( bước 2 ) cho wikipedia nếu có khả năng .

Xin nói thêm về wikipedia cho những bạn chưa biết ( xác suất .099% biggrin.gif ): Wikipedia là một từ điển bách khoa lớn nhất trong lịch sử, tự do, mở ( bất kì ai cũng có thể đóng góp ), và phi lợi nhuận .

-> Tiếng Anh http://en.wikipedia.org/
-> Tiếng Việt http://vi.wikipedia.org/

2007/12/09

60 seconds science

60 seconds science ( http://www.60secondscience.com/ ) là một website của tạp chí Scientific America . Nội dung cover chủ yếu là sinh học . Một số topics nhỏ nói về những vấn đề khác như IT, thiên văn.

60 seconds science bao gồm những đoạn video, hay mp3 ngắn - thường dưới 3 phút - nói về những vấn đề khoa học tương đối phổ thông, có tính giáo dục cao, kích thích não phải và trái hoạt động hihi

2007/12/06

SeLinux: make http://host/~username visible

1133 cd home/
1134 ls -Z /home/
1135 chown -R user_u:object_r:user_home_dir_t nhocquay
1136 chcon user_u:object_r:user_home_dir_t nhocquay
1137 cd nhocquay/
1138 ls -Z /home/vuhung/public_html/
1139 ls -Z /home/vuhung/
1140 chcon user_u:object_r:httpd_sys_content_t public_html/

2007/12/02

mkfs ext3: aoclife new harddisk

[root@aoclife ~]# mkfs
mkfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.msdos mkfs.vfat
[root@aoclife ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 73.4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
[root@aoclife ~]# mkfs
Usage: mkfs [-V] [-t fstype] [fs-options] device [size]
[root@aoclife ~]# mkfs -t ext3 /dev/sdb
mke2fs 1.39 (29-May-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
8962048 inodes, 17921831 blocks
896091 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
547 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

2007/11/29

High rated RTS gamers: skill or talent?

Let's clarify a keyword the original poster wrote: talent[1] . It has two meaning: gift[2] and/or skills[3]

Gift is something lies under your ADN, it is "premade" and you can't archive it no matter how you pratice.

Skill is something gets improved with the time you are working on it.

I agree with most of the comments so far that "skill" is need to archive 2k. But to reach 2.3k+, you have to do be gifted.

I also talked to some 2.2k ( sometimes 2.3k but falls back to 2.2k soon ) and they complain that they lacks of something they don't know. And he can't win daut or Chris in every map and civ.

Wikipedia also has a short but densed article about RTS[4] which if you read carefully, you will find that the key factors that make a gifted/skilled RTS gamer:

1. Micromanagement ( Yes, it is management, requires experience ( knowhow ), sometimes a a little research to the game )
2. Macromanagement ( Yes, it is management, requires experience ( knowhow ), sometimes a a little research to the game )

Both are important but IMO, macromanagement are more important: It is the capacity to adapt econ/armies to various situations. Where and how to attack. Help or contribute. I also strongly recommend reading "The art of war" by Sun Tzu[5].


[1] http://en.wikipedia.org/wiki/Talent
[2] http://en.wikipedia.org/wiki/Intellectual_giftedness
[3] http://en.wikipedia.org/wiki/Skill
[4] http://en.wikipedia.org/wiki/Real-time_strategy#Gameplay
[5] http://en.wikipedia.org/wiki/The_Art_of_War