2007年07月16日

ウインドウリサイズ用ブックマークレット

1024×768

javascript:void(resizeTo(1024,768));


現在のウインドウサイズを知りたいとき

javascript:alert(window.outerWidth + %22×%22 + window.outerHeight);

Colorzilla on Ubuntu

以下の手順で、Colorzillaのスポイトが使えない問題と、Firebugが起動しない問題が解消。


1.) Colorzillaがインストールされているなら、削除しておく。

2.) http://www.mozilla.com/firefox/から、Firefox(バイナリのtarball)をダウンロード。

3.) Firefoxを閉じる。

4.)


$ tar xzvf firefox-2.0.*.tar.gz -C /tmp/
$ sudo cp /tmp/firefox/libxpcom* /usr/lib/firefox/

6.) Firefoxを再起動して、Colorzillaをインストール。

#http://ubuntuforums.org/showthread.php?t=451901&highlight=colorzilla

FizzBuzz (JavaScript)

1から100までの数をプリントするプログラムを書け。ただし3の倍数のときは数の代わりに「Fizz」と、5の倍数のときは「Buzz」とプリントし、3と5両方の倍数の場合には「FizzBuzz」とプリントすること。

<html>
<head>
<title>FizzBuzz</title>
<script type="text/javascript">
<!--
function fizzbuzz() {

  for (var i=1; i<=100; i++) {

    if (i%(3*5) == 0) {
      document.write('FizzBuzz ');
    }else if (i%(3) == 0) {
      document.write('Fizz ');
    }else if (i%(5) == 0) {
      document.write('Buzz ');
    }else {
      document.write(i + ' ');
    }
  }

}
//-->
</script>
</head>
<body>
<script type="text/javascript">
  fizzbuzz();
</script>
</body>
</html>

2007年07月09日

nvidiaドライバのセットアップ

[システム]-[システム管理]-[制限付きドライバの管理]-[NVIDIAの高性能グラフィックドライバ]
有効にする。

再起動して、[制限付きドライバを有効にするにはここをクリック]。

2007年07月02日

Ubuntu 解像度の変更

/etc/X11/xorg.conf


Section "Monitor"
HorizSync 1.0-10000.0
VertRefresh 1.0-10000.0


Section "Screen"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1600x1200" "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection

カテゴリー

アーカイブ

Mozilla Firefox ブラウザ無料ダウンロード