DbgPrint("deviceObjName: %wZ\n", deviceObjName);
Mar 27, 2008
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
Posted by Lono at 09:17 0 comments
Labels: Programming
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
Posted by Lono at 08:59 0 comments
Labels: Software
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.
Posted by Lono at 08:57 0 comments
Labels: Software
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)
Posted by Lono at 09:13 0 comments
Labels: Programming
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
Posted by Lono at 00:57 0 comments
Labels: Software
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++
Posted by Lono at 20:13 0 comments
Mar 20, 2008
Visual studio 2008 cannot find correct function definition
Visual studio 2008 cannot find correct function definition, and it jsut keeps finding function declartion instead!!!
Solution: set up correct "include" directory in "Project or Solutions".
Posted by Lono at 20:15 0 comments
Labels: Software
Replace windows driver
Here is a simple way.
1.Just copy new driver to Windows\System32\Drivers, and replace the old one.
2.Remove the device
3.Close all applications which are still using the device(Important!!!!)
4.Plug the device again
Posted by Lono at 20:12 0 comments
Labels: Driver
Mar 16, 2008
DbgPrint in Vista
See this
http://tenderlover.blogspot.com/search?q=dbgprint
or just import .reg file below
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter]
"DEFAULT"=dword:00000008
Posted by Lono at 23:05 0 comments
Labels: Driver
Mar 13, 2008
Reset password in Windows XP and 2K
Method1:
1.delete %SystemRoot%/system32/config/sam
2.delete %SystemRoot%/system32/config/sam.log
3.using Administrator (no password) to logging
Method2:
ERD Commander
Posted by Lono at 00:49 0 comments
Labels: Software
Mar 11, 2008
微軟正黑體
1.you need activate clear type
2.copy 微軟正黑體 Bold from your font directory in Vista
3.Don't copy 微軟正黑體, but "微軟正黑體 Bold" since it looks better
4.If you copy 微軟正黑體 too, Windows will think "微軟正黑體 Bold" is same as 微軟正黑體, and you cannot use "微軟正黑體 Bold" anymore
Posted by Lono at 18:11 0 comments
Disable .NTAMD64 requirement of inf file
1.Establish the key
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup
DisableDecoratedModelsRequirement:REG_DWORD
set it to 1
Posted by Lono at 05:53 0 comments
Labels: Driver
Console 2 Unicode
繁體中文 日本語 支援
1. Delete key "Console2 command window" in registry
2. Import the following data into windows registry:
For Chinese(中文) Windows XP & Vista:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\Console2 command window]
"CodePage"=dword:000003a8
"FontSize"=dword:000a0000
"FontFamily"=dword:00000036
"FontWeight"=dword:00000190
"FaceName"="細明體"
"HistoryNoDup"=dword:00000000
For Japanese(日本語) Windows XP & Vista:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\Console2 command window]
"CodePage"=dword:000003a8
"FontSize"=dword:000a0000
"FontFamily"=dword:00000036
"FontWeight"=dword:00000190
"FaceName"="MS 明朝"
"HistoryNoDup"=dword:00000000
If you don't know what I am talking about, get console2 here .
Posted by Lono at 00:18 0 comments
Labels: Software
Mar 10, 2008
How to self sign 64 bit driver on Vista 64 for driver testing
1.install Microsoft Winqual Submission Tool
2.Find Inf2Cat.exe in Microsoft Winqual Submission Tool
3.execute
Inf2Cat.exe /driver:"U:\MyDriver" /os:Vista_X64
4.Find makecert.exe in WDK
Makecert -r -pe -ss PrivateCertStore -n "CN=TestCertforWDK" TestCert.cer
5.Use Signtool.exe in WDK to sign the cat file
Signtool sign /v /s PrivateCertStore /n TestCertForWDK /t http://timestamp.verisign.com/scripts/timestamp.dll "U:\MyDriver\MyDriver.cat"
6.Use Signtool.exe in WDK to sign the driver
Signtool sign /v /s PrivateCertStore /n TestCertForWDK /t http://timestamp.verisign.com/scripts/timestamp.dll "U:\MyDriver\MyDriver.sys"
7.Verify the sign for driver
Signtool verify /pa /v MyDriver.sys
8.Verify the sign for cat file
Signtool verify /pa /v /c MyDriver.cat MyDriver.inf
9.On test computer, import the certificate:
certmgr.exe /add TestCert.cer /s /r localMachine root
certmgr.exe /add TestCert.cer /s /r localMachine trustedpublisher
reference: Kernel-Mode Code Signing Walkthrough
Posted by Lono at 23:29 0 comments
Labels: Driver
Mar 9, 2008
How to set up keyboard mapping for OSX86 and Windows XP
1.In System Preference of Mac OS X, exchange Command and Control key
2.If you are using VMware Fusion like me
Open ~/Library/Preferences/VMware Fusion/config
Add following line:
mks.keyboard.swapAlt = TRUE
3.In you Win XP
Get KeyAssigner.exe from
http://ftp.isu.edu.tw/pub/Windows/softking/soft/tw/k/KeyAssigner.exe
Add mapping from CTRL to ALT and ALT to CTRL
It is done. Now you can use CTRL+V for paste and CTRL+C for copy on both Mac and XP.
Viola
Posted by Lono at 09:19 0 comments
Mar 6, 2008
Presentation Skills
1.The architecture should involve the parts which user are familiar with and other parts which you would like to introduce.
for example, if you want to introduce webcam driver, you should include the total flow diagram from Skype to usb web camera. Introduce each component involved.
For each operation involved, it should include what user does to skype, and what the effect is on webcam driver.
2.The relationship between each slide should be clear. From the brief flow intro to the detail of each function, there should be a clear relationship presented to the audience.
3.Slides design is same as the design of GUI. From Joel( Joel On software) famous book, the audience don't read any text on slides. They just see the picture ( even the lecturer too). It's important to illustrate every idea and even details by drawing.
Posted by Lono at 22:32 1 comments
Mar 4, 2008
How to change color or transparency settings of Visor?
1. Restart Leopard (important!!)
2. Don't do anything but open VTerminal
3. Open Visor
4. Right click on Visor, choose "Window Settings"
5. Do anything you want
6. Don't choose save as default setting, or your VTerminal will be very wide(as your Visor)
Posted by Lono at 07:41 0 comments
Labels: OSX86