■
[Windows]wofstreamで日本語文字化け
2chの「★初心者にVisual C++を教えるスレ★ Part3」より発掘
wofstreamでロケールエラーのため日本語が出力できない
Visual Studio 2005でも再現した
名無しさんありがとう
749 名前:デフォルトの名無しさん :03/01/23 15:51 >719 wofstream test("out_test1.txt"); の代わりに、 wofstream test; test.imbue( locale("jpn") ); test.open("out_test1.txt"); とすると動く。 ・Cロケールなcodecvtがつくられる際に、コンストラクタで setlocale(LC_ALL, "C");が実行される ・VCのimbueには致命的な欠陥があるのか、 コンストラクタでつくられたCロケールなcodecvtを(imbue時に) 作り直したりしないので、openして作りなおさせる必要がある。
■
[Windows]Windows XP SP3 をインストールした後Windows Updateに失敗する
Microsoftサポートオンラインより
「Windows XP SP3 をインストールした後、Windows Update、Microsoft Update、または自動更新で更新プログラムが正常にインストールされない」
Automatic Updateサービスの登録情報が壊れるのかな?
対策まとめ
1. net stop wuauserv
2. regsvr32 %windir%\system32\wups2.dll
3. net start wuauserv
■
[FreeBSD]WPAの設定
ぽっぺん日記@karashi.orgより
/boot/loader.conf
if_[IF名]_load="YES" wlan_wep_load="YES" wlan_tkip_load="YES" wlan_ccmp_load="YES" wlan_xauth_load="YES" wlan_acl_load="YES"
/etc/rc.conf
ifconfig_[IF名]="WPA DHCP"
/etc/wpa_supplicant.conf
network={ ssid="ほげ" scan_ssid=1 key_mgmt=WPA-PSK psk="ふが" }
FreeBSDのverup手順
時々忘れるのでverup手順メモ
-
- make buildworld
- make buildkernel KERNCONF=ほげほげ
- make installkernel KERNCONF=ほげほげ
- reboot
- mergemaster -p
- make installworld
- mergemaster -siva
- mergemaster -sivr
- reboot
- KERNCONFはオプションで
- メジャーverupでなければmergemasterは省ける(場合もある)
ThinkpadのTrackPointを使う
xorgのマウスデバイスは/etc/psm0を指定する。
さらにmousedは起動しない(起動しているとpsm0が使えない。sysmouseを使うとTrackPointのイベントを拾わない)
/etc/X11/xorg.confの
Section "InputDevice"
Identifier "Mouse1"
あたりに以下を追加
Option "Emulate3Buttons" Option "EmulateWheel" "true" Option "EmulateWheelTimeOut" "200" Option "EmulateWheelButton" "2" Option "EmulateInertia" "50" Option "XAxisMapping" "6 7" Option "ZAxisMapping" "4 5"
また、FirefoxではTrackPointの左右スクロールで「進む」「戻る」の動作になってしまうので、その対策も必要
mousewheel.horizscroll.withcontrolkey.action = 3; mousewheel.horizscroll.withcontrolkey.numlines = 1; mousewheel.horizscroll.withcontrolkey.sysnumlines = true; mousewheel.horizscroll.withnokey.action = 0; mousewheel.horizscroll.withnokey.numlines = 1; mousewheel.horizscroll.withnokey.sysnumlines = true; mousewheel.horizscroll.withshiftkey.action = 1; mousewheel.horizscroll.withshiftkey.numlines = 1; mousewheel.horizscroll.withshiftkey.sysnumlines = true;
mod_rewriteで動的ページを静的ページに変換
RewriteEngine on RewriteRule ^/cgi-bin/sample/([0-9A-Za-z]+)/([0-9A-Za-z)]+)\.html$ /cgi-bin/sample/sample.cgi?a=$1&b=$2 [L]