2008年9月12日金曜日
terminal emacs does'nt allow me to undo with C-/!!
this entrysay the reason why we can't undo with C-/ is "/" is not an ascii code. terminal can only send ascii character maybe.
2008年9月11日木曜日
MoinX memo 2
if you wanna change the design of wiki, you just change theme directory. it's located on /Applications/MoinX.app/Contents/Resources/htdocs.
if you wanna change the parameter of the wiki, change wikiconfig.py on ~/Library/Application Support/MoinX/instance. you can use logo image if you use img tag for sitename.
if you wanna change the parameter of the wiki, change wikiconfig.py on ~/Library/Application Support/MoinX/instance. you can use logo image if you use img tag for sitename.
2008年9月10日水曜日
MoinX memo
How can I start?
if you are a mac user, use Version 1.0.3. you can download from http://moinx.antbear.org/
Where is it located?
In ~/Library/Application Support/MoinX/Instance/data/pages
if you have any other problems, go to http://code.google.com/p/moinx/wiki/FrequentlyAskedQuestions
if you are a mac user, use Version 1.0.3. you can download from http://moinx.antbear.org/
Where is it located?
In ~/Library/Application Support/MoinX/Instance/data/pages
if you have any other problems, go to http://code.google.com/p/moinx/wiki/FrequentlyAskedQuestions
python-c api programming
i ve tried to copile python-c code a dozen times. but everytime, i failed.
i didn't know why it does'nt work. the code is very simple like just showing "Hello World!".
the problem was how to compile. a compiler always returned " undefined reference to `_imp__PyArg_ParseTuple'".
i though it's a liker problem.
today, i finally succeeded to do it!!! this is a memo for it.
at this time, i used following simple code from [2].
ext.c
that's it!!!you can import as "ext" on python command line!
reference:
[1] http://techtonik.rainforce.org/2008_01_01_archive.html
[2] http://f59.aaa.livedoor.jp/~ookini/pukiwiki.php?Python%A4%CEC%B8%C0%B8%EC%B3%C8%C4%A5%A5%E2%A5%B8%A5%E5%A1%BC%A5%EB%A4%F2%BB%C8%A4%C3%A4%C6%A4%DF%A4%EB
i didn't know why it does'nt work. the code is very simple like just showing "Hello World!".
the problem was how to compile. a compiler always returned " undefined reference to `_imp__PyArg_ParseTuple'".
i though it's a liker problem.
today, i finally succeeded to do it!!! this is a memo for it.
at this time, i used following simple code from [2].
ext.c
#include
static PyObject *
fact(PyObject *self, PyObject *args)
{
int n;
int i;
int ret=1;
if (!PyArg_ParseTuple(args, "i", &n))
return NULL;
for (i=n; i>0; i--) ret *= i;
return Py_BuildValue("i", ret);
}
static PyObject *
hello(void)
{
printf("Hello World!!\n");
Py_RETURN_NONE;
}
static char ext_doc[] = "C extention module example\n";
static PyMethodDef methods[] = {
{"hello", hello, METH_VARARGS, "print hello world.\n"},
{"fact", fact, METH_VARARGS, "return factorial.\n"},
{NULL, NULL}
};
void initext(void)
{
Py_InitModule3("ext", methods, ext_doc);
}
gcc -IC:\Python25\include -LC:\Python25\libs ext.c -lpython25 -shared -o ext.pyd
that's it!!!you can import as "ext" on python command line!
reference:
[1] http://techtonik.rainforce.org/2008_01_01_archive.html
[2] http://f59.aaa.livedoor.jp/~ookini/pukiwiki.php?Python%A4%CEC%B8%C0%B8%EC%B3%C8%C4%A5%A5%E2%A5%B8%A5%E5%A1%BC%A5%EB%A4%F2%BB%C8%A4%C3%A4%C6%A4%DF%A4%EB
2008年9月4日木曜日
CrashReporter of mac
Mac OS X has a system which send a bug report to apple. it's called CrashReporter.
Usually, developer can not get it because it's sent to apple directory.
thus, people implement that system by themself.
I, like all developers, want that system. We can get some entry to implement a hand-made CrashReporter. I got a sample code of Steve Gehrman. Previously, I wrote a flow of the code.
At this moment, I made a log for general knowledge of CrashReporter.
As a technical report say in http://developer.apple.com/jp/technotes/tn2004/tn2123.html, we can get hexadecimal addresses with exception tracebacks. a problem is how to change from hexadecimal to symbol. if you have a XCode, you can use "atos" but if a user doesn't, how do we get them?
to begin with, do we need symbols when a user have a crash?
generally speaking, hexadecimal address is enough because we can get symbol at local circumstance.
so, what we have to do is getting tracebacks of the crash.
i will write details later.
Usually, developer can not get it because it's sent to apple directory.
thus, people implement that system by themself.
I, like all developers, want that system. We can get some entry to implement a hand-made CrashReporter. I got a sample code of Steve Gehrman. Previously, I wrote a flow of the code.
At this moment, I made a log for general knowledge of CrashReporter.
As a technical report say in http://developer.apple.com/jp/technotes/tn2004/tn2123.html, we can get hexadecimal addresses with exception tracebacks. a problem is how to change from hexadecimal to symbol. if you have a XCode, you can use "atos" but if a user doesn't, how do we get them?
to begin with, do we need symbols when a user have a crash?
generally speaking, hexadecimal address is enough because we can get symbol at local circumstance.
so, what we have to do is getting tracebacks of the crash.
i will write details later.
登録:
投稿 (Atom)
