2011-01-01から1年間の記事一覧

Merdurial fclone

Mercurial の fclone extension は本家の更新が止まって、下記のサイトでメンテナンスされている。だいぶ前からそうだけど、久々に新しいマシンにインストールしようとして少し探したのでメモ。https://bitbucket.org/pmezard/hgforest-crew/downloadstip を…

WinDbg on Win7 64-bit

Checked how dumps look like in WinDbg on Win7 64-bit Simple Sleep program compiler: Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 0:000> ~*k . 0 Id: 126c.99c Suspend: 0 Teb: 00000000`7efdb000 Unfrozen Child…

windows process のアドレスマップ

Linux の pmap の様な情報が欲しいんだけど、なかなか面倒そう。7 の 64-bit 情の 32-bit process, 以前通り2G程度しかメモリが使えないようだけど、その内訳を見たい。仮想サイズでトータルはほぼわかると言えばわかるのだが。Psapi でプロセスに関する基…

list manipulation

Some codes to understand lists and recursions from practical scala def nth[T](n: Int, list: List[T]): T = list match { case x::_ if n == 0 => x case x::xs => nth(n-1, xs) case _ => sys.error("illegal argument") } //println(nth(2, List(1,2,…

asCollector

asCollector(Class arrayClass, int arrayLength) は arrayType の引数を指定した数の引数のリストに変えてくれる。asSpreader はほぼその反対。 import java.lang.invoke.*; import static java.lang.invoke.MethodType.*; import static java.lang.invoke.…

C++ template memo

template うろおぼえだなぁ。動くかなとおもった次の物が動いた。int も class T で受けられる物なのか。 /* output: sizeof(4)=4 sizeof(2)=2 */ #include <iostream> using namespace std; template <class T> void afunc(T a) { cout << "sizeof(" << a << ")=" << sizeof(a) </class></iostream>…

Scala の練習

Base64 encoder, decoder を wiki のアルゴリズム解説をもとに書いてみる。Decoder から始めた。いろんな試行錯誤のうちに collection 周りの復習ができたし、できない事も分かってきた。REPL で試しながら書けるのはやはり便利。 object Base64Decoder { de…

__NSAutoreleaseNoPool(): Object 0... of class NSCFString autorel

久々に Objective-C. 細かな所は完全に抜けてたけど、うろ覚えで書くとエラーが... __NSAutoreleaseNoPool(): Object 0x1001102e0 of class NSCFString autoreleased with no pool in place - just leaking ... #include <Foundation/Foundation.h> void arrEx() { NSArray *arr = [[N</foundation/foundation.h>…

OpejJDK for Mac OS X

OS X 向けの OpenJDK が利用できるようになっていたので、ビルドしてみた。http://mail.openjdk.java.net/pipermail/macosx-port-dev/2011-January/000007.htmlhttp://wikis.sun.com/display/OpenJDK/Mac+OS+X+PortMercurial forest extension を使ってコー…

Quartz Composer Programming

Quartz Composer、入門書をざっと読んで試してそれっきりだったけど、複雑なデータをビジュアライズするにはこれかなって思っていた所もあり、ふと見つけたページで少し遊んでみる。Introduction to Quartz Composer Programming Guidehttp://developer.appl…