Monday, November 05, 2007

Compiling C++ on MS VS without IDE

Although many people ignore this functionality, it is possible to use the Microsoft Visual Studio .NET without opening the IDE. Indeed, many tasks can be made from the command line, thus providing a way to improve the scripting capabilities of this tool. For instance, to compile a project from the command line, only two steps are necessary:

  1. Set the environment variables (eventually they can be already set)

    Run "VCvars32.bat" (in .NET2003)

  2. Compile the project

    Call $ DevEnv project_name /Build configuration_name
With these functionalities, some scripting skills and using the task scheduler, complex tasks can be easily automated.

Tuesday, October 30, 2007

Changing, in MS Excel, cell colors based on its value

In order to produce an easy-to-read table in MS Excel, I wanted to assign a color to each cell according to its contents. To that end I just need to apply conditional formatting to that cells. In MS Excel this can be done through menu Format>Conditional Format and by providing the conditions and corresponding formats.

Friday, October 26, 2007

New QiQA

The new user interface (UI) of the Quick Quotation Assistant (QiQA) prototype is finished. This should allow queries using multiple views of the mould. Now, we must focus on implementing the techniques that will support the combined queries (several views plus textual). Indeed, actually only one of these is used at each time.

Screenshot of the QiQA prototype after a query

Thursday, October 25, 2007

QiQA File Normalizer

Our partners from the mould industry provided a new collection for our database with eighty parts. However, the files they sent do not comply with the agreed filename formats, namely the files containing the JPEG 3D previews, VRML 3D models and mould quotations.

To solve this problem I created a simple application that renames the files according to a pre-defined set of rules. This operation is semi-automatic way, since the new name for the file is computed automatically from its context but the user must confirm the renaming for every file.

QiQA File Normalizer screenshot

Tuesday, October 23, 2007

New UI for QiQA

According to feedback we had from final users at CENTIMFE, we must redesign the user interface of our Quick Quotation Assistant (QiQA) prototype. Based on this we sketched the new user interface for QiQA, pictured bellow, and will now change our prototype accordingly.


Sketch of the new user interface for QiQA.

Monday, October 22, 2007

Panel about the history of Portuguese CG

As part of the 15th Portuguese computer graphics meeting (15EPCG) I co-organized a session about the history of computer graphics in Portugal. For this panel were invited some senior researchers that started up this area twenty years ago, most of them in the beginning of their careers. A few images were digitized to be presented in this session and are now available at the address http://immi.inesc-id.pt/~afj/15epcg/.

Tuesday, September 25, 2007

Supressing page breaks in LaTeX

I wanted to keep together a paragraph and following quote on a document written in LaTeX. However, the \nopagebreak command does not work properly in this case. Indeed, \nopagebreak does not suppress the page breaks that are deliberately inserted around environments like {quote}. The solution was enclosing the text I want to keep in the same page within {samepage} environment. Something like this:

\begin{samepage}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit:
\begin{quote}
Quisque leo.
\end{quote}
\end{samepage}

Monday, September 17, 2007

Running programs does not appear in XP taskbar

I have no idea why, but the XP taskbar of my TabletPC stop showing the list of running programs. Surprisingly, this is a quite annoying failure, making it hard for me to continue working without solving this problem.

After a few searches on the internet, I found out that this is not supposed to happen. Thus, since there are no way to turn off the running programs listing, there are no obvious way to turn this feature on.

Fortunately, I found a solution at Kelly's Korner, where Kelly Theriot, a Microsoft MVP has a set of tweaks. A VBScript that will change the registry to reset the properties of the XP taskbar is available on the tweaks page, item #240, referred as "Programs Aren't Minimized in the Taskbar". It worked fine for me. The "running programs" area returned to my taskbar and I just needed to restore the personalized settings.

Monday, September 03, 2007

Insert a static date or time on a Excel worksheet

When I was creating a table on MS-Excel I needed to insert in several places the current date. Instead of writing the whole date numerous times, I thought that Excel should have a way to do it automatically. Indeed it does and it is very simple. Thus, if one wants to insert a static current date or time on a Excel worksheet just have to use the keyboard shortcuts described below:

Current date
Select a cell and press CTRL+;

Current time
Select a cell and press CTRL+:

Current date and time
Select a cell and press CTRL+; then SPACE then CTRL+:


Note: These shortcuts are for the international Excel version on a Portuguese keyboard. I cannot guarantee these will work on other versions. Try it for yourself and if you think your experience will help others, leave a comment here.

Tuesday, August 28, 2007

My street...

Just to change the subject... a night picture of the street where I live, taken yesterday night. It was so quiet and calm. A so pleasant and warm night I could not resist. I just picked up my camera and started shooting.


Tuesday, August 07, 2007

3DISE project proposal rejected

Almost one year after submission to FCT (Portuguese Foundation for Science and Technology), we got the feedback on 3DISE project proposal. Unfortunately, it was not accepted for funding.

Monday, August 06, 2007

Copying multiple files with SCP

I needed to copy several files from one remote host to another. To that end I decided to use scp, but if I simply write one "scp" command for each file I must provide the password each time I enter a command, besides having to repeat the command several times. Fortunately this can be done in a more efficient way. Indeed it is possible to use normal shell expansion, just make sure you use quotes to ensure that it isn’t parsed and expanded by the local shell instead of the remote one. Thus, the command should look like:

% scp me@host:"teste1.zip,teste2.zip,teste" .

Wednesday, July 11, 2007

Surveying 3D shape descriptors

In last couple of weeks I've been reviewing existing techniques for 3D shape description. This research have proven fruitful and I'm planning to produce an exhaustive survey within the end of this week.

Wednesday, June 20, 2007

VRML reader for CALI/3D

In the context of our work on 3D shape recognition (CALI3D), Lisha Zhang developed a simple VRML file reader that converts the original shape into a triangular mesh and computes its axis aligned bounding box. An executable version of this prototype is available for download [ZIP 48KB] , together with a sample shape extracted from the National Design Repository at Drexel University.

Original Shape
Resulting Shape and corresponding Bounding Box

Tuesday, May 29, 2007

LaTeX template for MSc thesis

For master students of Instituto Superior Técnico who are writing their master theses, I made available a LaTeX template for IST MSc Thesis [ZIP 253KB]. This is based on the version I used to write my master thesis, back in 2004. I hope this could be useful for someone.

Tuesday, May 22, 2007

Converting FAT32 to NTFS

My new Acer Travelmate C200 came with Windows XP Tablet Edition pre-installed. No problem with that. Until now everything seems fine, except for two small problems. The 100GB hard disk is formatted in FAT32 and it has the Portuguese version of XP installed.

Change the operating system langauge is trivial. I just needed to change the user interface language on the "Languages" tab of the "Regional and Languages Options".

To convert the drive file system from FAT32 to NTFS, I had two options: recreate the partitions and reinstall everything again or convert the file system format. I chose the second. Although I had never tried it before, it seems quite simple. It can be done by an Windows XP built in utility. I only needed to type two simple commands:

% vol c: (to find out the drive's volume name - it will be necessary later)

% convert c: /fat32:ntfs (the system will restart a couple of times)

It worked well with me. After a few minutes I have a NTFS file system in my new Acer.

Tuesday, March 06, 2007

No help text in wxWidgets Status Bar

I am writing an application in C++ and I'm using wxWidgets. The application user interface includes a toolbar and a status bar. Automatically wxWidgets assumes that I want to see the help text for toolbar buttons (or for menu items) in the first field of status bar. Even if I have no hint text specified it clears the respective field of the status bar.

After a few hours trying to overcome this "problem" (or "feature", if you prefer), I found the solution after carefully reading the manual. It is not necessary to override the wxEVT_TOOL_ENTER, as I was trying to do, although it can be done this way.

The solution is incredibly simple. I just need to call SetStatusBarPane(-1) for the corresponding frame. This disables help display in the status bar.

Tuesday, November 21, 2006

Replacing ANSI Portuguese characters by HTML entities

In order to improve the quality of web pages, characters in the upper half of the ANSI table should be replaced by corresponding HTML entities. Otherwise, browsers with different configurations might show incorrect characters.

To automatically replace these characters, I wrote two small bash scripts. The first, html_entities.sh, performs the replacement in na single file and the second, exec_html_entities.sh , recursively replace characters in all files in a given directory and all its subdirectories.

Saturday, September 09, 2006

SIBR prototype installation deployed


A couple of years after finishing the Sketch & Image Based Retrieval prototype, I finally had time to prepare an install package of this application. This package includes a brief user guide that will help users through configuration and drawing set classification process.


The SIBR prototype is available for download here.

Friday, September 01, 2006

3DISE proposal submitted

Our project proposal for the 3D IST Search Engine was submitted within the deadline. Now it's time to focus again on QiQA.