FrontPage > memo_temp

#include <iostream>

#include <cstdio>

#define USE_CLASS_C

class Uncopyable { protected:

	Uncopyable() {
		std::cout << "Uncopyable::Uncopyable()" << std::endl;
	}
	~Uncopyable() throw() {
		std::cout << "Uncopyable::~Uncopyable()" << std::endl;
	}
	

private:

	Uncopyable(const Uncopyable&);
	const Uncopyable& operator=(const Uncopyable&);
	

};

class A { public:

	A() {
		std::cout << "A::A()" << std::endl;
	}
	virtual ~A() {
		std::cout << "A::~A()" << std::endl;
	}
	
	virtual const char *func() {
		return "A";
	}

};

class B : private Uncopyable { public:

	B() {
		std::cout << "B::B()" << std::endl;
	}
	virtual ~B() {
		std::cout << "B::~B()" << std::endl;
	}

};

#ifdef USE_CLASS_C class C : public A, public B { public:

	C() : A(), B() {
		std::cout << "C::C()" << std::endl;
	}
	virtual ~C() {
		std::cout << "C::~C()" << std::endl;
	}
	C(const C& c) : A(), B() {
		std::cout << "C::C(const C& c)" << std::endl;
	}
	
	virtual const char *func() {
		std::cout << "C::func()" << std::endl;
		return "C";
	}

};

#else class D : public A, private Uncopyable { public:

	D() : A(), Uncopyable() {
		std::cout << "D::D()" << std::endl;
	}
	virtual ~D() {
		std::cout << "D::~D()" << std::endl;
	}
	D(const D& d) : A(), Uncopyable() {
		std::cout << "D::D(const D&)" << std::endl;
	}
	
	virtual const char *func() {
		std::cout << "D::func()" << std::endl;
		return "D";
	}

};

#endif

int main(int argc, char *argv[]) {

	try {
		std::cout << "try0" << std::endl;

#ifdef USE_CLASS_C

		throw C();

#else

		throw D();

#endif

	} catch (A& e) {
		std::cout << "catch0" << std::endl;
		std::cout << "---- " << e.func() << std::endl;
	}
	getchar();

}

gc-7.2alpha4>nmake /f NT_STATIC_THREADS_MAKEFILE nodebug=1 all

http://www.sf2midi.com/soundfonts/file-detail/000-sgrand-0-7-stereo-sf2-172.html

http://uegaharatarou.cocolog-nifty.com/blog/2007/02/post_a4e9.html

javascript: function a() {document.getElementById("leftnav").style.display="block";document.getElementById("center_col").style.marginLeft="2px";document.getElementById("leftnav").style.marginLeft=document.getElementById("center_col").offsetWidth + "px"; return document.getElementById("leftnav").style.marginLeft; } window.alert(a());

prompt=${1} srcname=${2} shift 2

# print prompt if [ "x${V}" = "x1" ] then

       echo ${*}

else

       printf "  %-5s %s\\n" ${prompt} ${srcname}

fi

# run the command ${*} CC = @$(top_srcdir)/quiet_build.sh CC $@ gcc CXX = @$(top_srcdir)/quiet_build.sh CXX $@ g++ RANLIB = @$(top_srcdir)/quiet_build.sh RANLIB $@ ranlib

KURO-BOX:~$ sudo hdparm -u1 -c3 -d1 /dev/hda

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__*1 a(int arg); static inline __attribute__*2 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://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.

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; }
}

Primary, Secondary の次は?

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 で現在実行中のコマンド表示

subversion で俺リポジトリ

.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

make の自動変数

$@ : ターゲットファイル名
$% : ターゲットがアーカイブメンバだったときのターゲットメンバ名
$< : 最初の依存するファイルの名前
$? : ターゲットより新しいすべての依存するファイル名
$^ : すべての依存するファイルの名前
$+ : 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

  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

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'

めも


*1 always_inline
*2 always_inline

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