[[FrontPage]] > [[memo_temp]]


sed gawk tar
http://psas.pdx.edu/DebianCrossCompilerHowto/





Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TurnOffComputer]
"Type"="group"
"Text"="終了オプション"
"Bitmap"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,\
  68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,32,00,38,\
  00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TurnOffComputer\HibernateButton]
"Type"="checkbox"
"Text"="終了オプションに休止状態ボタンを表示する"
"HKeyRoot"=dword:80000001
"RegPath"="Software\\Policies\\Microsoft\\Windows\\System\\Shutdown"
"ValueName"="ShowHibernateButton"
"CheckedValue"=dword:00000001
"UncheckedValue"=dword:00000000
"DefaultValue"=dword:00000000


extern inline __attribute__((always_inline)) a(int arg);
static inline __attribute__((always_inline)) b(int arg)
{
        return 0;
}
int main(int argc, char *argv[])
{
        a(0);
        b(0);
        return 0;
}




http://search.luky.org/obu/msg01457.html

colinux 起動用バッチファイル例

 echo off
 
 cd E:\app\colinux
 E:
 
 colinux-daemon kernel=vmlinux mem=512 root=/dev/cobd0 eth0=tuntap cobd0=debian_cobd0.3gb cobd1=debian_cobd1.3gb

-http://nttbj.itp.ne.jp/0728401066/index.html?Media_cate=populer&svc=1303


-DDR
--AL: Additive Latency
--CL: CAS Latency
--RL: Read Latency = AL + CL
--WL: Write Latency = RL - 1



-http://iwatam-server.sakura.ne.jp/software/index.html


-http://techon.nikkeibp.co.jp/article/TOPCOL_LEAF/20050518/104776/
 まずはPS3に搭載するマイクロプロセサ「Cell」の動作周波数が3.2GHzであること。

-http://www.watch.impress.co.jp/game/docs/20060329/3dps3.htm
 メインメモリはMIC(Memory Interface Controller)と呼ばれる
 メモリインターフェイスを介してRambusの3.2GHz動作の256MBの
 XDR DRAMと接続される。セッションでは各記憶リソースへのアク
 セスの際のレイテンシーも公開された。
 ・レジスタ:1サイクル
 ・L1キャッシュ:8サイクル
 ・L2キャッシュ:32サイクル
 ・メインメモリ:140サイクル 


http://web.kyoto-inet.or.jp/people/m-ito/linux/glibcvup.html

.hg/hgrc
push_ssl = false
allow_push = *





PYTHONPATH じゃなくてハードコードで追加
 import sys
 
 sys.path.append('/path/to/python/site-packages')

デフォルトリポジトリの変更方法は???

確認方法
hg showconfig または show でもいいけど

$ pwd
/path/to/this_repo
$ hg show
bundle.mainreporoot=/path/to/this_repo
paths.default=/path/to/parent_repo

デフォルトリポジトリ以外から pull するほうほう
hg pull [--rev revision_number] file://path/to/repository
オプションは引数の最初に書かないとおかしな動作をする。いまいち!


hg init
touch a.file
hg add a.file
hg commit -m 'add file a at default branch.'

hg branch branch_a
touch b.file
hg add b.file
hg commit -m 'add file b at branch_a.'

hg update -C default
touch c.file
hg add c.file
hg commit -m 'add file c at default branch.'

touch d.file
hg add d.file
hg commit -m 'add file d at default branch.'


$ hg hist
changeset:   3:f83fdcd4f75c
tag:         tip
user:        user@host
date:        Fri Jun 13 11:25:52 2008 +0900
summary:     add file d at default branch.

changeset:   2:2fde0f18ac36
parent:      0:77ba36783ac3
user:        user@host
date:        Fri Jun 13 11:25:51 2008 +0900
summary:     add file c at default branch.

changeset:   1:49b79737e50c
branch:      branch_a
user:        user@host
date:        Fri Jun 13 11:25:51 2008 +0900
summary:     add file b at branch_a.

changeset:   0:77ba36783ac3
user:        user@host
date:        Fri Jun 13 11:25:51 2008 +0900
summary:     add file a at default branch.


hg update -r 2
touch e.file
hg add e.file
hg commit -m 'add file e at unnamed branch(parent is default).'


$ hg branches
default                        4:1bf31e38d364
branch_a                       1:49b79737e50c

$ hg heads
changeset:   4:1bf31e38d364
tag:         tip
parent:      2:2fde0f18ac36
user:        user@host
date:        Fri Jun 13 11:25:52 2008 +0900
summary:     add file e at unnamed branch(parent is default).

changeset:   3:f83fdcd4f75c
user:        user@host
date:        Fri Jun 13 11:25:52 2008 +0900
summary:     add file d at default branch.

changeset:   1:49b79737e50c
branch:      branch_a
user:        user@host
date:        Fri Jun 13 11:25:51 2008 +0900
summary:     add file b at branch_a.

-brances は named branch を列挙する
-heads は unnamed branch も列挙する


extensions, hgrc, hgwebdir についても。エクスポートの方法。公開、HTTPデーモン以外でのアクセス制限、標準的なツリーの構成は?

hgweb.config に
[collections]
a = repos2/
b = repos/
[web]
style = gitweb

.hg/hgrc に
[web]
style = gitweb
allow_archive = gz zip bz2


 $ hg showconfig
 bundle.mainreporoot=/home/username/reponow
 paths.default=/home/username/repoparent


Techonのレイヤ
 @-moz-document url-prefix(http://techon.nikkeibp.co.jp/) {
   DIV#nocookie { display:none; ! important; }
 }


-俺シェルを使う
 # launch the user build shell
 if [ "$USR_ORG_SHLVL" == "" ]; then
     export USR_ORG_SHLVL=0
 fi
 if [ "$USR_ORG_SHLVL" -ne "$SHLVL" ]; then
     export USR_ORG_SHLVL="$SHLVL"
     exec /home/username/usr/bin/bash-3.2
 fi


***Primary, Secondary の次は? [#h4ebd1f8]
1 primary
2 secondary
3 tertiary
4 quaternary
5 quinary
6 senary
7 septenary
8 octonary
9 nonary
10 denary
11 
12 duodenary
...
20 vigenary


***screen で現在実行中のコマンド表示 [#u50282a2]

-古い bash だと jobs のリストがおかしくなるバグあり。
 $ cat&
 [1] 3222
 $ tail
 [Press Ctrl+Z]
 [1]-  Stopped                 cat
 
 [2]+  Stopped                 return
--zsh 使えよって話ですが。

-参考
--http://www.macosxhints.com/dlfiles/preexec.bash.txt
--http://web.archive.org/web/20060207103240/http://www.nijino.com/ari/diary/?20020614&to=200206141S1

-コード
(コピペするときは echo -n "ESCk${result}ESC\\"; の部分を書き換える、Emacs ならば Ctrl-q ESC で、tty 経由(vi とか?)なら Ctrl-v ESC で入力できる?はず)
 # set debug trace mode
 #set -o xtrace > /dev/null 2>&1
 
 # the debug fook function enabled
 set -o functrace > /dev/null 2>&1
 shopt -s extdebug > /dev/null 2>&1
 
 # Finally, install the actual traps.
 preexec_interactive_mode=""
 PROMPT_COMMAND="trap - DEBUG; ${PROMPT_COMMAND}; preexec_invoke_cmd; \
                 trap 'preexec_invoke_exec' DEBUG"
 trap 'preexec_invoke_exec' DEBUG
 
 function precmd() {
     :
 }
 
 # bash 3.0 has a bug. DEBUG function overwrites the jobs list.
 # -- GNU bash, version 3.00.14(1)-release (i386-redhat-linux-gnu)
 function preexec() {
     if [ "$TERM" = "screen" ]; then
         cmd=(`echo $1`);
         case ${cmd[0]} in
             fg)
                 if [ "${cmd[1]}" = "" ]; then
                     result=`LANG=C jobs %+ 2>/dev/null | tr -s ' ' ' ' | \
                             cut -f 3 -d ' '`;
                 else
                     result=`LANG=C jobs ${cmd[1]} 2>/dev/null | \
                             tr -s ' ' ' ' | cut -f 3 -d ' '`;
                 fi
                 ;;
             cd)
                 if [ "${cmd[1]}" != "" ]; then
                     result=${cmd[1]};
                 else
                     result='~';
                 fi
                 ;;
             *)
                 result=${cmd[0]};
                 ;;
         esac
 
         echo -n "ESCk${result}ESC\\";
         return;
     fi
     return;
 }
 
 # This function is installed as the PROMPT_COMMAND; it is invoked before each
 # interactive prompt display.  It sets a variable to indicate that the prompt
 # was just displayed, to allow the DEBUG trap, below, to know that the next
 # command is likely interactive.
 function preexec_invoke_cmd() {
     precmd
     preexec_interactive_mode="yes"
 }
 
 # This function is installed as the DEBUG trap.  It is invoked before each
 # interactive prompt display.  Its purpose is to inspect the current
 # environment to attempt to detect if the current command is being invoked
 # interactively, and invoke 'preexec' if so.
 function preexec_invoke_exec() {
     if [[ -n "$COMP_LINE" ]]; then
         # We're in the middle of a completer.  This obviously can't be
         # an interactively issued command.
         return
     fi
     if [[ -z "$preexec_interactive_mode" ]]; then
         # We're doing something related to displaying the prompt.  Let the
         # prompt set the title instead of me.
         return
     else
         # If we're in a subshell, then the prompt won't be re-displayed to put
         # us back into interactive mode, so let's not set the variable back.
         # In other words, if you have a subshell like
         #   (sleep 1; sleep 2)
         # You want to see the 'sleep 2' as a set_command_title as well.
         if [[ 0 -eq "$BASH_SUBSHELL" ]]; then
             preexec_interactive_mode=""
         fi
     fi
     if [[ "preexec_invoke_cmd" == "$BASH_COMMAND" ]]; then
         # Sadly, there's no cleaner way to detect two prompts being displayed
         # one after another.  This makes it important that PROMPT_COMMAND
         # remain set _exactly_ as below in preexec_install.  Let's switch back
         # out of interactive mode and not trace any of the commands run in
         # precmd.
 
         # Given their buggy interaction between BASH_COMMAND and debug traps,
         # versions of bash prior to 3.1 can't detect this at all.
         preexec_interactive_mode=""
         return
     fi
 
     # In more recent versions of bash, this could be set via the "BASH_COMMAND"
     # variable, but using history here is better in some ways: for example, "ps
     # auxf | less" will show up with both sides of the pipe if we use history,
     # but only as "ps auxf" if not.
     local this_command=`history 1 | sed -e "s/^[ ]*[0-9]*[ ]*//g"`;
 
     # If none of the previous checks have earlied out of this function, then
     # the command is in fact interactive and we should invoke the user's
     # preexec hook with the running command as an argument.
     preexec "$this_command"
 }


***subversion で俺リポジトリ [#y41562aa]
.subversion/config に適当に書く
 [tunnels]
 myssh = $SVN_SSH ssh -p 20022

こまんど
 svn+myssh://localhost/home/katsuhiro/share/svn/

俺フォワーディングとあわせてどうぞ
 ssh atlas -R20022:localhost:22 -f "bash -c 'while :;do sleep 60;done'"


http://standards.ieee.org/regauth/oui/index.shtml


http://www.fumiswebpage.com/furuya03.htm

JAVAで学ぶ3D
-http://homepage1.nifty.com/open-prog/java/index.html


**make の自動変数 [#l9026e96]
 $@ : ターゲットファイル名
 $% : ターゲットがアーカイブメンバだったときのターゲットメンバ名
 $< : 最初の依存するファイルの名前
 $? : ターゲットより新しいすべての依存するファイル名
 $^ : すべての依存するファイルの名前
 $+ : Makefileと同じ順番の依存するファイルの名前
 $* : サフィックスを除いたターゲットの名前
 `$(@D)'
       ターゲットファイル名のディレクトリ部分の末尾のスラッシュを除去したもの。
       `$@'の値が`dir/foo.o'なら`$(@D)'は`dir'になります。`$@'にスラッシュが
       含まれないとこの変数の値は`.'になってしまいます。
 `$(@F)'
       ターゲットファイル名のディレクトリ内ファイル部分。`$@'の値が`dir/foo.o'
       なら`$(@F)'は`foo.o'になります。`$(@F)'は`$(notdir $@)'と同等です。
 `$(*D)'
 `$(*F)'
      語幹のディレクトリ部分とディレクトリ内ファイル部分で、先の例では
      `dir'と`foo'になる。
 `$(%D)'
 `$(%F)'
      ターゲットアーカイブメンバ名のディレクトリ部分とディレクトリ内ファイル
      部分。`archive (member)'という形式のアーカイブメンバがターゲットの時
      のみ用を成し、member にディレクトリ名が含まれる場合のみ有用です。
      (ターゲットとしてのアーカイブメンバーの項を見て下さい。)
 `$(<D)'
 `$(<F)'
      最初の依存関係のディレクトリ部分とディレクトリ内ファイル部分。
 `$(^D)'
 `$(^F)'
      全依存関係のディレクトリ部分とディレクトリ内ファイル部分の各リスト。 
 `$(?D)'
 `$(?F)'
      依存関係のうちターゲットより新しいもの全てのディレクトリ部分とディレク
      トリ内ファイル部分の各リスト。


*info nm [#me93ef27]
   For each symbol, `nm' shows:
 
   * The symbol value, in the radix selected by options (see below), or
     hexadecimal by default.
 
   * The symbol type.  At least the following types are used; others
     are, as well, depending on the object file format.  If lowercase,
     the symbol is local; if uppercase, the symbol is global (external).
 
    `A'
          The symbol's value is absolute, and will not be changed by
          further linking.
 
    `B'
          The symbol is in the uninitialized data section (known as
          BSS).
 
    `C'
          The symbol is common.  Common symbols are uninitialized data.
          When linking, multiple common symbols may appear with the
          same name.  If the symbol is defined anywhere, the common
          symbols are treated as undefined references.  For more
          details on common symbols, see the discussion of -warn-common
          in *Note Linker options: (ld.info)Options.
 
    `D'
          The symbol is in the initialized data section.
 
    `G'
          The symbol is in an initialized data section for small
          objects.  Some object file formats permit more efficient
          access to small data objects, such as a global int variable
          as opposed to a large global array.
 
    `I'
          The symbol is an indirect reference to another symbol.  This
          is a GNU extension to the a.out object file format which is
          rarely used.
 
    `N'
          The symbol is a debugging symbol.
 
    `R'
          The symbol is in a read only data section.
 
    `S'
          The symbol is in an uninitialized data section for small
          objects.
 
    `T'
          The symbol is in the text (code) section.
 
    `U'
          The symbol is undefined.
 
    `V'
          The symbol is a weak object.  When a weak defined symbol is
          linked with a normal defined symbol, the normal defined
          symbol is used with no error.  When a weak undefined symbol
          is linked and the symbol is not defined, the value of the
          weak symbol becomes zero with no error.
 
    `W'
          The symbol is a weak symbol that has not been specifically
          tagged as a weak object symbol.  When a weak defined symbol
          is linked with a normal defined symbol, the normal defined
          symbol is used with no error.  When a weak undefined symbol
          is linked and the symbol is not defined, the value of the
          symbol is determined in a system-specific manner without
          error.  Uppercase indicates that a default value has been
          specified.
 
    `-'
          The symbol is a stabs symbol in an a.out object file.  In
          this case, the next values printed are the stabs other field,
          the stabs desc field, and the stab type.  Stabs symbols are
          used to hold debugging information.  For more information,
          see *Note Stabs: (stabs.info)Top.
 
    `?'
          The symbol type is unknown, or object file format specific.



***自分の .screenrc [#b387f9ed]
 escape ^t^t
 
 # disable vbell toggle
 bind ^G
 bind g
 
 # disable screen lock
 bind ^X
 bind x
 
 # disable xon(send Control-q)
 bind q
 # disable xoff(send Control-s)
 bind s
 
 # bind 'window remove' to x and ^X
 bind ^X remove
 bind x remove
 
 # bind 'window only' to q
 bind q only
 # bind 'window split' to s
 bind s split
 
 vbell off
 defscrollback 1024
 defencoding UTF-8
 defhstatus "[screen ^En: ^Et]"
 
 autodetach on
 startup_message off
 
 caption always "%{=d wk} %-w%{=s wk}%n %t%{-}%+w %= %{=d kg}%y/%m/%d %c"
 #hardstatus string "[screen %n: %t] %h"
 
 sorendition 10 99
 termcapinfo xterm-color 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'


*めも [#zf46560b]



-bash-3.2
--msgfilt po/ru.po でエラーになるので、適当に
リネームしてから configure しよう

-ワークキュー
 INIT_WORK(&dev->task_work, blktest_task_work, dev);
 struct work_struct task_work;

-ブロックデバイス
--request 関数を呼ぶ前にランキューのロック(割り込み禁止)が要る

-Windows
--メモリ不足時に、C ドライブに空きがないとメモリの内容がおかしくなる?
--もしくはメモリの故障か?

-VirturalBox のコマンドライン起動
 D:\app\vbox\VBoxManage.exe startvm "Debian GNU/Linux"

-initrd の再構成
--こんなかんじよ
 cd initrd
 cpio -i --file=../initrd.img
 (編集)
 find . -print | cpio -o --file=../initrd_new.img --format=newc
--gzip 圧縮しても読んでくれるので、容量が気になるなら gzip で圧縮する。
 zcat ../initrd.img | cpio -i
 (編集)
 find . -print | cpio -o --format=newc | gzip -9 > ../initrd_new.img
--boot のパーティションにコピーして grub の設定を更新しませう
 cp initrd_new.img /boot/initrd-hogehoge


-inline asm on gcc
--http://www.mars.sannet.ne.jp/sci10/on_gcc_asm.html
--書式は以下の通り、難しいぞ…
 asm ("アセンブリコード" : 
      "指定文字列"  (出力先変数) : 
      "指定文字列"  (入力用の式や変数) : 
      "内容が破損するので退避したいレジスタ");
--ローカルラベル(1f やら 1b など)
---ローカルでない前方参照ラベルを持つコード片が挿入されると、デバッガは混乱するかも知れません。ラベル名を新しい関数の入り口と受け取るからです。この混乱を回避するために、新しい関数を宣言するときだけローカルでないラベルを使用し、他の用途には使用しないで下さい。これらのラベルへの参照は数値に続き文字b(backward)またはf(forward)からなります。これらのローカルラベルはソースファイル内で再使用されます。参照は与えられた方向(forward/backward)で最も近い同じ番号のラベルを採用します。
--ローカルラベルの例
 2:
 ...
 ...
 jmp 2b #-> jump backward label
 
 jmp 3f #-> jump forward label
 ...
 ...
 3:

-Deep C++
--後半は C# の話になってる、それ以外はなかなか面白かった
--http://msdn.microsoft.com/library/ja/default.asp?~
url=/library/ja/jpdndeepc/htm/deep05182000.asp

-UDF の規格
--http://www.osta.org/specs/pdf/udf260.pdf

-ELF の定義
--http://www.skyfree.org/linux/references/ELF_Format.pdf

-英語の文法の話
--http://eigomanabou.com/index.htm

-OpenWindowStation API
--http://msdn2.microsoft.com/en-us/library/ms684339.aspx

-patch
--元のファイル名 + ".org" という名前のバックアップを残しつつパッチを当てる
--(※)既に同名の .org ファイルがあるときは上書きされるので注意が必要
 patch -p1 -b --version-control=simple --suffix=.org < a.patch

-SSL, SSH などの情報
--http://www.ipa.go.jp/security/rfc/RFC2246-00JA.html
--http://www.coins.tsukuba.ac.jp/~yas/coins/dsys-2002/2003-03-04/index.html
--http://www.atmarkit.co.jp/fnetwork/rensai/cell02/ssl3.html

-ICカードの形式
--接触型(ISO/IEC 7816)
--非接触型
--密着型(ISO/IEC 10536) 通信距離は2ミリまで
--近接型(ISO/IEC 14443) 通信距離は10センチまで
--近傍型(ISO/IEC 15693) 通信距離は70センチまで
--遠隔型 通信距離は70センチ以遠

-stage6 だうそ
--http://video.stage6.com/1181015/.divx

-ちょっと誰でも良いからガンダム撮ってよー!!
--http://blackmage.at.infoseek.co.jp/omake.html

-starcraft 攻略サイト
--http://homepage3.nifty.com/espomax/starcraft/

-.NET のネイティブイメージジェネレータの状況を見る
 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe executequeueditems

-見えないドライバを見る
--Windows Optimize Guides
--http://mywebpages.comcast.net/SupportCD/index.html
 Secret - Phantom Devices
 set devmgr_show_nonpresent_devices=1
 start devmgmt.msc
 Instructions - Go to the "Control Panel", "System" icon, "Hardware" tab
 select "Device Manager". Select "View" and Show hidden devices.

-Windows のログオフを高速化する
--User Profile Hive Cleanup Service
--[[ここからダウンロードしましょう:http://www.microsoft.com/downloads/details.aspx?FamilyId=1B286E6D-8912-4E18-B570-42470E2F3582&displaylang=en]]

-エクスプローラのフォルダビューから [マイドキュメント] を消す
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\~
CurrentVersion\Explorer\Desktop\NameSpace\
--のなかのどれかを適当に名前変える。
--IEのアイコンの消し方は不明…。
-マイコンピュータ内の [username のドキュメント] を消す
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\~
CurrentVersion\Explorer\Shell Folders
--または
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\~
CurrentVersion\Explorer\User Shell Folders
--からそれっぽいものを消す?※やったら、おかしくなった。やらないほうがいい。
-マイコンピュータ内の [Documents] を消す
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\~
CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders
--のなかのどれかを適当に名前変える?

-コンソールのキー割り当ては kbdconfig で設定できる。Debian の場合は dpkg-reconfigure console-data のラッパーらしいけど。
-OpenOffice.org がコンパイルできた。だいたい一日と 4時間かかった。全部の言語を有効にしたせいですごい時間かかった模様…。

-VS2005で .php を編集すると、XML と勘違いするらしくて、勝手に UTF-8 に変換するようになった。超クソ。HTML の仲間ってことにして、直した。
--ツール、オプション、テキストエディタ、ファイル拡張子、で、拡張子 php でエディタを HTML エディタにする。既にファイルを開いている場合は、閉じてから開きなおさないとダメかもしれない。
-自分で gdb の bt のようなスタックバックトレースを表示させたければ、backtrace 関数と、backtrace_symbols_fd 関数が便利である

-VS2005 のヘルプ、Win32 SDK の日本語版を表示させようとすると 100%落ちる。こまった。

-WLI-CB-G108 のドライバばぐってる。送信がぜんぜんカウントされない。

-Shift JIS が JIS 規格の参考部分に載った、という記述を見かけた。


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS