Mar 27, 2008

DbgPrint Unicode string

DbgPrint("deviceObjName: %wZ\n", deviceObjName);

Mar 26, 2008

swig & opencv & ruby

1.swig commands to link ruby & c++
swig -c++ -ruby Wrapper.i
ruby mkmf.rb Wrapper
make
ruby hello.rb

2.modify the makefile
2.1add the following lines below definition of CFLAGS & DLDFLAGS
CFLAGS += `pkg-config opencv --cflags`
DLDFLAGS += `pkg-config opencv --libs`

2.2 remove -arch ppc at following lines
DLDFLAGS = -L. -arch ppc -arch i386
LDSHARED = cc -arch ppc -arch i386 -pipe -bundle

3.If you don't want to mess your makefile

require 'mkmf'
$libs = append_library($libs, "stdc++")
$CFLAGS << " `pkg-config opencv --cflags`"
$LDFLAGS << " `pkg-config opencv --libs`"
create_makefile(ARGV[0])

from
http://developer.apple.com/releasenotes/OpenSource/PerlExtensionsRelNotes/index.html
% env ARCHFLAGS='-arch ppc' ruby extconf.rb
% make
% make install

Textmate

1.Rails cheat sheet
2.rcodetools
3.http://blog.neontology.com/posts/2006/05/10/beautiful-ruby-in-textmate
4.Mega Zoomer
5.http://www.yashlabs.com/wp/?p=153

Visual Studio 2008

1.Top 13 Visual Studio Keyboard Shortcuts
just google it

2.Sara Ford's everyday tip
http://blogs.msdn.com/saraford/default.aspx

3.Debugging tip (conditional break!!)
http://edndoc.esri.com/arcobjects/9.1/ArcGISDevHelp/DevelopmentEnvs/COM/VCpp/Debugger.htm

In Mac:
cursor color problem
Get it from Internet
1. Go to Control Panel, Personalization.
2. Choose Mouse Pointers.
3. Select the Pointers tab.
4. Change the scheme to something that causes the mouse cursor to be seen. I chose "Windows Inverted (system scheme)" and now I can see the text selection (thin bar) cusor in VS2005 with a black background. Some of the other schemes work as well.

Mar 25, 2008

OpenCV on Mac

New Setting:
1.
PKG_CONFIG_PATH=/opt/local/var/macports/software/opencv/1.0.0_0/opt/local/lib/pkgconfig: ${PKG_CONFIG_PATH}

2.
export PKG_CONFIG_PATH

3.
g++ `pkg-config --cflags opencv` `pkg-config --libs opencv` -o water watershed.cpp


g++ -c Wrapper.cxx `pkg-config opencv --cflags`
g++ -o hello Wrapper.o `pkg-config opencv --libs`
./hello



export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig


Makefile:
#by lono kao, 970325
CXX = g++
CFLAGS += `pkg-config opencv --cflags`
LDFLAGS += `pkg-config opencv --libs`
#LTool/LImage
TARGET = deleteme
SRC = LTool/LImage.cpp deleteme.cpp
#SRC = a.c b.c
#OBJ = $(SRC:.c=.o)
all : $(TARGET)

$(TARGET) : $(TARGET).cpp
$(CXX) $(SRC) $(CFLAGS) $(LDFLAGS) -o $(TARGET)

.cpp.o : $*.cpp
$(CXX) $*.cpp $(CFLAGS) $(LDFLAGS) -o $*

clean :
rm -f $(OBJS) $(TARGET)

Software Tools

Windows:
WinSplit--Useful if you have 24 or 22 inchs monitor
Console2--Great transparent, tabbed console
cFosSpeed
SFTPDriver
Tera Term--Better than hyper terminal
HHD Serial Monitor
HHD USB Monitor
Rocket Dock
unlocker
TreeSize --Disk Clean up tool
PowerMenu --make application minimize to tray or always on top
Clipx --greate clipboard history
teracopy -- great copy tool, much better than windows copy



Mac:
Visor
quicksilver
Manports
opencv
rb-narray??
Textmate
VMFusion
vanilla input
pci usb mac driver
macam
omniDiskSweeper
Paintbrush
CheetahWatch -- Huawei 3.5G data card monitor
ExpanDrive
Nally --telnet program

Mar 22, 2008

My Textmate Plugins

1.tmCodeBrowser
2.quicklook
3.Mega Zoomer
4.SVNMate

Bundles:
1.footnotes
2.MASC: http://blog.inquirylabs.com/2006/04/26/my-textmate-bundle/
3.Grep bundle http://henrik.nyh.se/2007/06/grep-in-project-command-for-textmate
4.CTags
5.RSpec

Lack:
1.ruby comepletion?(included)
2.intelligent Jump
3.lack of intellisense for c++

 
TEMPLATE HACKS AND TWEAKS BY [ METAMUSE ] BLACKCAT 1.1
/scripts/shBrushJScript.js'/>