Archive

Archive for February, 2012

Instructions for Installing RPM Files Using Alien [zz]

Repost from Ubuntu Blog.

Installing Alien

You can install alien itself from the Ubuntu Universe repository by adding the repository to your list of sources and doing:

$sudo apt-get update
$sudo apt-get install alien

Installing the .rpm file

To install the .rpm file, you first need to convert it to a .deb file which can be installed on Ubuntu.
I assume that you downloaded the package to your Desktop (~/Desktop is the directory)
You can convert the .rpm to a .deb by using the following commands.
$cd ~/Desktop
-This will change the directory to your desktop, where you have the .rpm file.

$sudo alien -k name-of-rpm-file.rpm
– This will convert the .rpm to a .deb.
– The “-k” will keep the version number. Otherwise alien adds a “1″ to the version number.
– Tip: Use Smart Tab Completion to avoid mistyping the file names :)

$sudo dpkg -i name-of-deb-file.deb
– This will install the .deb package

Try reading the alien manpage for more details on how to convert other kinds of packages and the options available.

Categories: Ubuntu

Efficient Annotator

Do  you know Boris Babenko? If not, you must know Serge Belongie, who is Boris’s PhD advisor! If not either, look at the GIF figure below, you must recognize him if you are familiar with face recognition!

Then look at the following video, it’s amazing to have such an efficient human-computer interactive annotator. Boris, together with his colleagues, found a company to make it come true, it’s now in the progress!

http://anchovi.com/

http://blog.anchovi.com/

Categories: CV gossip, Gallery

std::min and std::max [zz]

This is a repost from blog of Heifner

Today I typed the following:

int t = (std::max)(timeout, lagtime);


Why did I put parentheses around std::max? Because windows.h defines (among other things) a max and a min macro. If you include windows.h the above code will not compile. For example the following:

#include "windows.h"
#include <algorithm>

void foo() {
    int i = 5;
    int j = 7;
    int x = std::max(i,j);
}


Will produce the following error with Visual Studio C++ 2005:

1>test.cpp(7) : error C2589: '(' : illegal token on right side of '::'
1>test.cpp(7) : error C2143: syntax error : missing ';' before '::'


There are a number of ways to work around windows.h defining these two macros.  Read more…

Categories: C++