自分も強く生きたい。
2012年3月24日土曜日
2012年3月23日金曜日
java で 1~n の整数で毎回異なる乱数
すぐに忘れるので。
private int random(int n) { return ((int) (Math.random() * n + 1)); }
2012年3月13日火曜日
CentOS5.5 有線LANがつながらない
引越し後にマシン起動させると、使えなくてびっくり。
起動時にエラーが出てる。
調べていくと、/etc/modprobe.conf の記載が誤っていることに気付いた。
修正前
修正後
yum update をした後、再起動したことがなかったのかも。
また起きそうだな。。。
「Le Blue」さん、参考にさせて頂きました。
http://open-groove.net/linux/lspci-bus-device-check/
http://open-groove.net/linux/linux-bonding-modprobe-conf/
起動時にエラーが出てる。
ATL1C デバイス eth0 は存在しないようですので、初期化を遅らせます。lspci -v で見てみると。
...デバイスは認識している!
02:00.0 Ethernet controller: Atheros Communications AR8132 Fast Ethernet (rev c0)
Subsystem: ASUSTeK Computer Inc. Device 838a
Flags: bus master, fast devsel, latency 0, IRQ 177
Memory at fbfc0000 (64-bit, non-prefetchable) [size=256K]
I/O ports at ec80 [size=128]
Capabilities: [40] Power Management version 3
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [58] Express Endpoint, MSI 00
Capabilities: [6c] Vital Product Data
Kernel driver in use: atheros_eth
Kernel modules: atl1e
...
調べていくと、/etc/modprobe.conf の記載が誤っていることに気付いた。
修正前
...
alias eth0 ATL1C
...
修正後
...反映手順
alias eth0 atl1e
...
service network stop何で、突然変わってしまったのかは、わからない。
modprobe -r bonding
service network start
yum update をした後、再起動したことがなかったのかも。
また起きそうだな。。。
「Le Blue」さん、参考にさせて頂きました。
http://open-groove.net/linux/lspci-bus-device-check/
http://open-groove.net/linux/linux-bonding-modprobe-conf/
2012年3月3日土曜日
2012年3月2日金曜日
sqlite 結果をファイル出力
http://builder.japan.zdnet.com/os-admin/sp_snow-leopard-09/20408901/
sqlite で大体の事はできる。
sqlite> .output hogehoge.log sqlite> select * from HogeHogeTable; sqlite> .exit
sqlite で大体の事はできる。
登録:
投稿 (Atom)