Wednesday, March 24, 2010

Safely Remove USB with Unlocker.

Update: A better tool which is compatible with Windows 7 32x, 64x

Unlocker is known as a free tool to delete file when Windows does not allow. It will find processes which are using that file and allows you to stop them. Moreover Unlocker also helps you to remove the USB driver safely. Similarly it will find processes using your USB driver and you can stop them to eject the USB driver. Download Unlocker



Monday, March 22, 2010

Dell Studio Laptop: Change keyboard function key priority

I have bought a new Dell studio 1438. It is so cool with a lot of good things for multimedia purpose. However, one thing that made me quite frustrated is that the function key priority. In the Dell studio laptops, the function keys like F1, F2... have a lower priority for the multimedia keys (like increase/ decrease volume, brightness...). So every time I want to press a function key, I must also press the Fn key.

After searching around, I found an easy solution for this problem. You just open the "Windows Mobility Center". You can use the search utility to open this dialog. There is a selection "Function Key Row" customized by Dell Inc. You change the current "Media key" to "Function key". And bingo it works as usual.

Wednesday, January 27, 2010

How to port CUDD to Windows and use CUDD as a library

This file provides instruction on the installation of the Windows port of the CU Decision Diagram Package CUDD v.2.4.2
(0) Dowload the CUDD v. 2.3.1 source code release: ftp://vlsi.colorado.edu/pub/cudd-2.3.1.tar.gz

(1) Create an empty project of type Win32->Win32 Project->Dll
(2) Copy the the code of CUDD v. 2.3.1 into the project folder and include CUDD package to the project
(3) Change file name "cuddObj.cc" to "cuddObj.cpp" change file name "cuddObj.hh" to "cuddObj.h"
(4) Add the code the project workspace using Project -> AddToProject -> Files Do not add the files with test programs (they do not belong to the library): "cudd/testcudd.c", "dddmp/testdddmp.c", "mtr/testmtr.c", "util/test-res.c", "util/test-sav.c". Do not include file "util/pipefork.c" because it contains UNIX-specific commandsAlso do not include all test file for each module
Do not add the files "nanotrav/*.c" to the project, because "nanotrav" is a stand-alone application which should not be part of the static library.
(5) Add "include" to Project -> Settings -> C/C++ -> Additional include directories in both debug and release versions.
(6) Define "__STDC__" in Project -> Settings -> C/C++ -> Preprocessor definitions in both debug and release versions.
(7) In "util.h": comment out two lines:
#include <unistd.h> (there is no such file on Windows)
#include <ctype.h> (this #include is the reason of mysterious malfunctions in some projects)
(8) Exclude the mnemosyne in cudd (This is a set of tools designed to help find memory leaks in programs, and to locate memory-hogging functions)
(9) In "datalimit.c": comment out #include <sys/resource.h> and change #include <sys/time.h> to #include <time.h>
(10)In "cuddObj.cpp": add the following definitions
#define long(a) (long)(a)
#define hex(a) hex<<(a)
to fix the problem with outputting the hexadecimal numbers
(11) Exclude sis from project
(12) Adapt #include "cuddObj.hh" to #include "cuddObj.h" for each error
(13) Exclude 2 files in dddmp: dddmpDdNodeBdd.c and dddmpDdNodeCnf.c
(14) Put this line to cudd.h
#define DllExport __declspec( dllexport )
since then put DllExport constant before each interface in the cudd.h

Now you can build a C++ library of CUDD package.