2011-11-09
Setting up ZyXEL NWD2105 for CentOS-5 and Ubuntu (10.04)
$ edit /etc/Wireless/RT2870STA/RT2870STA.dat for
$ edit /etc/modprobe.conf; append "alias ra0 rt3070sta" to it.
For Ubuntu (10.04):
* edit /etc/modprobe.d/wireless.conf; add "alias ra0 rt3070sta" to it.
2011-10-21
負整數 - 正整數 = 正整數?
「負整數 - 正整數 = 正整數」在數學上是不正確的,但在計算機上是可能的,詳細原因可以從布林代數的整數加減法的推算得到解答,這裡列舉一個可能的情形:
以下是對映的 C 程式:
void main(void)
{
int32_t a;
int32_t b;
int32_t c;
a = 0x7FFFFFFF;
printf ("a(%d)\n", a);
b = a+1;
printf ("b(%d)\n", b);
c = b - a;
printf ("c(%d) = b(%d) - a(%d)\n", c, b, a);
printf ("c(0x%08X) = b(0x%08X) - a(0x%08X)\n", c, b, a);
}
- a, b, c 均是 32-bit 的整數 (signed integer)
- a = 2147483647
- b = -2147483648
- c = b - a = 1
- 十進位表示:
c(1) = b(-2147483648) - a(2147483647) - 十六進位表示:
c(0x00000001) = b(0x80000000) - a(0x7FFFFFFF)
以下是對映的 C 程式:
void main(void)
{
int32_t a;
int32_t b;
int32_t c;
a = 0x7FFFFFFF;
printf ("a(%d)\n", a);
b = a+1;
printf ("b(%d)\n", b);
c = b - a;
printf ("c(%d) = b(%d) - a(%d)\n", c, b, a);
printf ("c(0x%08X) = b(0x%08X) - a(0x%08X)\n", c, b, a);
}
2011-06-30
Ubuntu 10.04 LTS for DELL Vostro 3350
I got my newly arrived Dell vostro 3350 on Jun 29, 2011. I love its anti-glare LCD screen as well as the back-lit keyboard. It was smooth to install Ubuntu 10.04 LTS on it. Everything works after rebooting, except that the LCD resolution was incorrect; also, the Wireless LAN was not working.
Here are my workaround to have them work correctly:
VGA:
Here are my workaround to have them work correctly:
VGA:
- Install backport-maverick kernel for LCD resolution detection (1366x768)
sudo apt-get install linux-image-generic-pae-lts-backport-maverick \
linux-headers-generic-pae-lts-backport-maverick - Reboot
- Build the compat-wireless device driver manually for backport-maverick kernel
- Here's the Building and Installing steps
cd compat-wireless-`date -I`; make; sudo make install - Reboot
訂閱:
文章 (Atom)