2009年11月25日 星期三
running qemu as daemon
I am using another way:
-k es when using VNC instead of SDL you have to specify the keyboard layout, I am using spanish
-daemonize this keeps the process running as a daemon.
-localtime with this clock is set to the hardware clock, not utc. This is for windows
So, when i want to connect back i just use
-vnc *:0 to run a vnc server wich I can connect from anywhere (that's the asterisk for - *) on the display 0qemu -hda /qemu/xp.cow -boot c -cdrom /data/install/admin/os/windows/winxpsp3ue.iso -m 384 -k es -vnc *:0 -daemonize -localtime
-k es when using VNC instead of SDL you have to specify the keyboard layout, I am using spanish
-daemonize this keeps the process running as a daemon.
-localtime with this clock is set to the hardware clock, not utc. This is for windows
So, when i want to connect back i just use
2009年11月23日 星期一
grep exclude pattern
grep -ircl --exclude=*.{png,jpg} "foo=" *
grep -Ir --exclude="*\.svn*" "pattern" *
grep -Ir --exclude="*\.svn*" "pattern" *
2009年11月11日 星期三
enable IBM trackpoint and disable touchpad
first, install xinput: sudo apt-get install xinput
xinput list => show all input devices
xinput list-props $dev_id => show all options of $dev_id
xinput set-int-prop $dev_id "$opt" 8 $value => set integer value to option $opt,
xinput set-int-prop $touchpad "Device Enabled" 8 0
xinput set-int-prop $trackpoint "Evdev Wheel Emulation" 8 1
xinput set-int-prop $trackpoint "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop $trackpoint "Evdev Middle Button Emulation" 8 1
xinput list => show all input devices
xinput list-props $dev_id => show all options of $dev_id
xinput set-int-prop $dev_id "$opt" 8 $value => set integer value to option $opt,
xinput set-int-prop $touchpad "Device Enabled" 8 0
xinput set-int-prop $trackpoint "Evdev Wheel Emulation" 8 1
xinput set-int-prop $trackpoint "Evdev Wheel Emulation Button" 8 2
xinput set-int-prop $trackpoint "Evdev Middle Button Emulation" 8 1
2009年11月10日 星期二
2009年9月7日 星期一
2009年8月8日 星期六
Transitive's QuickTransit
Apple Computer implemented a dynamic translating emulator for M68K code in their PowerPC line of Macintoshes, which achieved a very high level of reliability, performance and compatibility (see Mac 68K emulator). This allowed Apple to bring the machines to market with only a partially native operating system, and end users could adopt the new, faster architecture without risking their investment in software. Partly because the emulator was so successful, many parts of the operating system remained emulated. A full transition to a PowerPC native operating system (OS) was not made until the release of Mac OS X (10.0) in 2001, and within this new OS the "Classic" runtime environment still offers the emulation capability on PowerPC Macs. Also, the Rosetta translation layer included in releases of Mac OS 10.4 for Intel-based Macs, which is used to ease the transition from the PPC to x86, is an example of dynamic translation. Developed for Apple by Transitive, the Rosetta software is an implementation of Transitive's QuickTransit solution, which can be used to dynamically translate between platforms that include SPARC, PowerPC, MIPS, Itanium and x86.
2009年7月31日 星期五
2009年7月29日 星期三
2009年7月28日 星期二
2009年7月18日 星期六
php mailer gmail
要先跳過去,
要有menu,
$phpmailer->CharSet = 'utf-8';
$phpmailer->Encoding = 'base64';
//$phpmailer->Sender = "cher.webmaster@gmail.com";
//$phpmailer->Sender = "tk@sage.csie.ntu.edu.tw";
//$phpmailer->IsSMTP(); // set mailer to use php mail()
//$phpmailer->Host = 'ssl://smtp.gmail.com';
//$phpmailer->Port = 465; //default is 25, gmail is 465 or 587
//$phpmailer->SMTPAuth = true;
//$phpmailer->Username = "tp.killer@gmail.com";
//$phpmailer->Password = "ix jn tk";
要有menu,
$phpmailer->CharSet = 'utf-8';
$phpmailer->Encoding = 'base64';
//$phpmailer->Sender = "cher.webmaster@gmail.com";
//$phpmailer->Sender = "tk@sage.csie.ntu.edu.tw";
//$phpmailer->IsSMTP(); // set mailer to use php mail()
//$phpmailer->Host = 'ssl://smtp.gmail.com';
//$phpmailer->Port = 465; //default is 25, gmail is 465 or 587
//$phpmailer->SMTPAuth = true;
//$phpmailer->Username = "tp.killer@gmail.com";
//$phpmailer->Password = "ix jn tk";
2009年7月15日 星期三
2009年7月14日 星期二
drupal path fix
1. /collections has been URL-aliased to node/2779. Therefore, we won't need
"collections " in menu system(remove $items['collections'])
1.1 remove "$items['collections']" out of menu system will lost 'collections' in navigation bar, don't know why
2. we don't need function collections_nodeapi since now /collections has been mapped to node/2779. We don't need it to render '/collections' page
3. remove all loader since now we use page callbacks to connect collections and drupal
4. the function of collection_preprocess_page. It will append $collections['template_files'] to $variables['template_files'] which will be used to generate collections pages in theme().
4.1. We need the condition if ( ! isset($collections) ) since collection_preprocess_page could be called without being followed _collections_load which we define collections.
"collections " in menu system(remove $items['collections'])
1.1 remove "$items['collections']" out of menu system will lost 'collections' in navigation bar, don't know why
2. we don't need function collections_nodeapi since now /collections has been mapped to node/2779. We don't need it to render '/collections' page
3. remove all loader since now we use page callbacks to connect collections and drupal
4. the function of collection_preprocess_page. It will append $collections['template_files'] to $variables['template_files'] which will be used to generate collections pages in theme().
4.1. We need the condition if ( ! isset($collections) ) since collection_preprocess_page could be called without being followed _collections_load which we define collections.
2009年7月13日 星期一
2009年5月23日 星期六
中研院管考
正式系統:
tag/march/0.01
1. chart disabled; comment out chart button in SelectPanel.mxml
2. svn commit -m ""; svn cp CURRENT
3. svn co <>
3. add config/database.yml
4. run march: ./start_march restart 140.109.136.136
5. mv db/migrate/032xxx .; rake db:migrate; mv 032 back
6 add operations operation_items uploaded_files data into database
7. cp IHP/bin/pdftk to production directory
tag/march/0.01
1. chart disabled; comment out chart button in SelectPanel.mxml
2. svn commit -m ""; svn cp CURRENT
3. svn co <>
3. add config/database.yml
4. run march: ./start_march restart 140.109.136.136
5. mv db/migrate/032xxx .; rake db:migrate; mv 032 back
6 add operations operation_items uploaded_files data into database
7. cp IHP/bin/pdftk to production directory
2009年5月17日 星期日
2009年4月20日 星期一
hadoop cluster and eclipse plugin
Eclipse : 3.3.2
Hadoop: 0.19.1
Hadoop-eclipse-plugin: 0.19.1, in contrib/eclipse-plugin
cluster environment:
grid01(cluster head) has two network interfaces:
140.112.30.240 --> external
192.168.77.1 --> internal
grid02~grid05 are in the private network:
192.168.77.2~5.
Since we need to contact the internal nodes when running hadoop applications,
we need to setup proxy to have grid02~grid05 accessible to people outside.
Setup proxy port 54088:
ssh -L 140.112.30.240:12345:192.168.77.1:22 140.112.30.240 -n -N &
ssh -D 140.112.30.240:54088 -p 12345 140.112.30.240 -n -N &
And then in hadoop-eclipse plugin, you can set proxy host/port as 140.112.30.240:54088
Hadoop: 0.19.1
Hadoop-eclipse-plugin: 0.19.1, in contrib/eclipse-plugin
cluster environment:
grid01(cluster head) has two network interfaces:
140.112.30.240 --> external
192.168.77.1 --> internal
grid02~grid05 are in the private network:
192.168.77.2~5.
Since we need to contact the internal nodes when running hadoop applications,
we need to setup proxy to have grid02~grid05 accessible to people outside.
Setup proxy port 54088:
ssh -L 140.112.30.240:12345:192.168.77.1:22 140.112.30.240 -n -N &
ssh -D 140.112.30.240:54088 -p 12345 140.112.30.240 -n -N &
And then in hadoop-eclipse plugin, you can set proxy host/port as 140.112.30.240:54088
2009年4月16日 星期四
2009年4月14日 星期二
2009年4月10日 星期五
build UQBT
build uqbt
require libelfg0-dev package
1. tar xzf uqbt1.0alpha.tar.gz
2. ./configure --with-source=pent --with-target=sparc --disable-vpo --enable-remote --prefix=/home/tk/local
3. vim Makefile
change CPPFLAGS= -I/usr/bin/../include/linux to CPPFLAGS=
change CC=gcc to CC=gcc-2.95
change CXX=g++-2.95
pass '--traditional-format' option to linker
%s/-lstdc++/-Wl,--traditional-format -lstdc++/g
4. vim include/config.h
change #define HAVE_ELF_H 1 to #define HAVE_ELF_H 0
5. vim include/ElfBinaryFile.h
put #include to the top of #ifndef ELF32_R_SYM
6. vim loader/ElfBinaryFile.cc
elf_hash(pName) ==> elf_hash((unsigned char*)pName)
7. make
The processes goes fine until ld, there will be alot of errors shown, put we still can get the uqbtps executable file
however, it cannot translate the compiled program ...
require libelfg0-dev package
1. tar xzf uqbt1.0alpha.tar.gz
2. ./configure --with-source=pent --with-target=sparc --disable-vpo --enable-remote --prefix=/home/tk/local
3. vim Makefile
change CPPFLAGS= -I/usr/bin/../include/linux to CPPFLAGS=
change CC=gcc to CC=gcc-2.95
change CXX=g++-2.95
pass '--traditional-format' option to linker
%s/-lstdc++/-Wl,--traditional-format -lstdc++/g
4. vim include/config.h
change #define HAVE_ELF_H 1 to #define HAVE_ELF_H 0
5. vim include/ElfBinaryFile.h
put #include to the top of #ifndef ELF32_R_SYM
6. vim loader/ElfBinaryFile.cc
elf_hash(pName) ==> elf_hash((unsigned char*)pName)
7. make
The processes goes fine until ld, there will be alot of errors shown, put we still can get the uqbtps executable file
however, it cannot translate the compiled program ...
2009年4月6日 星期一
2009年3月17日 星期二
Setup OpenSuse
1' setup network: /etc/sysconfig/ifcfg-eth0 /etc/sysconfig/ifroute-eth0
2' setup firewall, sudo /sbin/yast, choose firewall, allow SSH, and related services to through firewall
3' set NIS server
4' set NFS server
5' set NIS client
6' set NCF client
2' setup firewall, sudo /sbin/yast, choose firewall, allow SSH, and related services to through firewall
3' set NIS server
4' set NFS server
5' set NIS client
6' set NCF client
2009年3月3日 星期二
2009年2月15日 星期日
2009年2月10日 星期二
model cannot use type as attribute name
Cannot use "type" as attributed name in model.
it will issue an error when you use find, e.g., Operation.find :all
>> Operation.find 1
SyntaxError: compile error
/home/tk/eclipse/flex/ihp-report/branches/march/IHP/vendor/rails/activerecord/lib/active_record/base.rb:1748: syntax error, unexpected tINTEGER
Object::0
shit
it will issue an error when you use find, e.g., Operation.find :all
>> Operation.find 1
SyntaxError: compile error
/home/tk/eclipse/flex/ihp-report/branches/march/IHP/vendor/rails/activerecord/lib/active_record/base.rb:1748: syntax error, unexpected tINTEGER
Object::0
shit
2009年2月3日 星期二
2nd open 64 tutorial
where does mcf-seq-f and mcf-par-f come from? are they copied from the outputs of 1st tutorial ?
2009年1月19日 星期一
2009年1月18日 星期日
an optimal solution for edge-contention is an optimal solution for out-degree? or vice versa?
There is a simple question:
an optimal solution for out-degree-minimization is an optimal solution for edge contention?
If we say a solution is optimal for edge-contention, is it an optimal solution for out-degree-minimization?
an optimal solution for out-degree-minimization is an optimal solution for edge contention?
If we say a solution is optimal for edge-contention, is it an optimal solution for out-degree-minimization?
2009年1月17日 星期六
要閱讀的
Using Open64 based TLS compiler
Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation
SuperPin: Parallelizing Dynamic Instrumentation for Real-Time Performance
Hill-Conf. Presentation Advice.pdf
Hill-Conference Etiquette.pdf
Hill-Writting.Tips.pdf
How to be a winner.pdf
Pin: Building Customized Program Analysis Tools with Dynamic Instrumentation
SuperPin: Parallelizing Dynamic Instrumentation for Real-Time Performance
Hill-Conf. Presentation Advice.pdf
Hill-Conference Etiquette.pdf
Hill-Writting.Tips.pdf
How to be a winner.pdf
訂閱:
文章 (Atom)