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

2007/11/20

wget sucks up Internet

[vuhung@aoclife suriken]$ jobs
[2]- Running wget --no-parent --wait=1 --random-wait --limit-rate=100K -r -p -U Mozilla http://www15.atwiki.jp/suriken/ >&/dev/null & (wd: /var/www/html/aoc/misc)
[3]+ Running wget --no-parent --wait=1 --random-wait --limit-rate=100K -r -p -U Mozilla http://www.mrfixitonline.com/aok >&/dev/null & (wd: /var/www/html/aoc/misc)

2007/11/14

Compile/Run icc with cairo

Hi all,

I've tried icc 10.1 Pro with cairo ( http://cairographics.org/releases/cairo-1.4.10.tar.gz )

the installation went smooth as follows:

CentOS 5.
[vuhung@aoclife cairo]$ uname -r
2.6.18-8.el5
[vuhung@aoclife cairo]$ rpm -qa | grep glibc
glibc-2.5-12
glibc-headers-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
[vuhung@aoclife cairo]$

yum install libstdc++.so.5
tar xvzf l_cc_p_10.1.008.tar.gz
cd l_cc_p_10.1.008
./install
#serial number: VJFV-MP9H3R5J
cat "source /opt/intel/cc/10.1.008/bin/iccvars.sh" >> ~/.bash_profile

icc now can run.

Then,

cd ~/usr/src/cairo-1.4.10
./configure --without-xlib --disable-xlib CC=icc
make;
make install

And when I tried to compile icc with cairo ( hello.c ):

icc -o hello `pkg-config --cflags --libs cairo` hello.c

I got the error:

icc -o hello `pkg-config --cflags --libs cairo` hello.c
/tmp/icck8ycA8.o: In function `main':
hello.c:(.text+0x1c): undefined reference to `cairo_image_surface_create'
hello.c:(.text+0x24): undefined reference to `cairo_create'
hello.c:(.text+0x80): undefined reference to `cairo_move_to'
hello.c:(.text+0x91): undefined reference to `cairo_destroy'
hello.c:(.text+0xa2): undefined reference to `cairo_surface_destroy'

where:

[vuhung@aoclife cairo]$ pkg-config --cflags --libs cairo
-I/usr/local/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -L/usr/local/lib -lcairo

Yes, icc couldn't find some API. Because I am new to icc, I don't know how icc creates and links the libraries.

If in the steps above, I replace icc with gcc, everything will be fine.



-----------cut here ------------
#include

int
main (int argc, char *argv[])
{
cairo_surface_t *surface;
cairo_t *cr;

surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240, 80);
cr = cairo_create (surface);

cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 32.0);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_move_to (cr, 10.0, 50.0);
cairo_show_text (cr, "Hello, world");
cairo_destroy (cr);
cairo_surface_write_to_png (surface, "hello.png");
cairo_surface_destroy (surface);

return 0;
}

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


Install Intel C++ Compiler 10.1 on Centos 5

エラー: 依存性の欠如:
libstdc++.so.5 は intel-icc101008-10.1.008-1.i386 に必要とされています
libstdc++.so.5(GLIBCPP_3.2) は intel-icc101008-10.1.008-1.i386 に必要とされています


yum install libstdc++.so.5
wget http://registrationcenter-download.intel.com/irc_nas/861/l_cc_p_10.1.008.tar.gz
tar xvzf l_cc_p_10.1.008.tar.gz
cd l_cc_p_10.1.008
./install
#serial number: VJFV-MP9H3R5J
cat "source /opt/intel/cc/10.1.008/bin/iccvars.sh" >> ~/.bash_profile

icc now can run.