AaronMR Computer Engineering

31Mar/100

How to fix the autocomplete in the terminal – Ubuntu 9.10

Today I found a curious thing, is that the terminal autocomplete did not work, something essential for me at this stage of life. He stopped working out of the blue and I have no idea why, but how to put it back in operation is as follows:

You open a text editor / etc / bash.bashrc

$ sudo vim /etc/bash.bashrc

and look for the following lines:

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi

To return to auto-complete function leaving them so uncomment these lines:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

close the terminal and open it again, this way and load the new terminal with this new configuration, we can continue our normal life thanks to the auto.

Greetings.

29Mar/100

A bad idea … sudo apt-get remove libjpeg62,

These days I've been playing around with the libjpeg library trying to learn how to compress images as the decompressed, you can see the post here . Well I have seen the need to compress an image I do not want to file it in memory to do things with that data, whether any editing of the picture or send it to another computer via sockets, some research is that the version that comes installed by default in the ubuntu version libjpeg62 not allowed to do this because when you set the output of the compression process, only lets you pass a file, it could happen to memory making inventions rare but well, there than trying to use the new features of the libraries. In the new versions of this library seem to have heeded the suggestions and it is already possible to store the result of compression in memory something I would be very useful.

I download the source code http://www.ijg.org/ and before compiling, I got the bright idea to first uninstall the other version of the library, do not ask me why but I did, I went to the console and courageously introduced the command:

$ sudo apt-get remove libjpeg62

Well from that moment things started to happen rare, so rare I thought that maybe restarting would do better the linux, but my surprise was that I started the graphical interface, in this case the xfce, and what was my surprise when another into my session and I watched it happened and that there was almost nothing installed, which last .....

The full story after the jump ->

27Mar/100

Image compression with libjpeg.

Working on the project I've seen in the need for compression to capture images with a webcam from the robot, to send to the client application to visualize what he sees in order to control the robot remotely. Today I was doing some uncompressed since all applications were running on the same machine and had no problems with the transmission of data and images.

Some research online on the libjpeg library of images I found some examples and I modified a bit for my needs, but then I will explain a simple example that lets you open a file. Jpg and compress it into another file. Jpg. Remember that a jpg file is a compressed image, if we open our program we must bear in mind that you will use it for other programs and even to compress it again, we must first uncompress it.

Code and example after the jump ->

26Mar/100

List of all files on the PC -> to a file .. in Mac and Linux

Already current in the previous post why I needed to do this, the question is that I did in Windows because it is what is used here. In this post we will see how to do the same thing in Linux and Mac that is what I most often use.

I have been researching and the command tree is not for those OSes, or at least I have not found so we will get the same thing with the tree but using a combination of commands and parameters.

Code and example after the jump ->

26Mar/100

List of all files on the PC -> to a file .. on Windows

Today at work I have been wondering if you knew a program to generate a full list of folders and files that have a CD, and they want to store this list in a database to know where or know X file that contains a CD determined.

Thinking and knowing a bit odd console command because I asked if it would not be possible to generate such a list without installing a third party program. The answer is yes, if you can and now let's see how:

Code and example after the jump ->

Filed under: General Continue reading
6Mar/100

Problem with Code:Blocks “TynyXML error: Error document empty”.

Today I found Code:: Blocks I boot into Ubuntu 9.10, and is rare because it was working until yesterday, when I try to run it from the console to view messages and to find out who does not turn pro I find this:

$ codeblocks
Exception: An exception has been raised!

The application encountered an error at configmanager.cpp, on line 239.
The error message is:

TinyXML error: Error document empty.
In file: /home/aaronmr/.codeblocks/default.conf
At row 0, column: 0.

Code::Blocks Version revision 6186 (gcc 4.4.1, build: Feb 19 2010 10:34:30)

I've managed to solve by deleting the problematic file (actually renaming it in case).

$ mv /home/aaronmr/.codeblocks/default.conf /home/aaronmr/.codeblocks/default.conf_BAK

is a solution is a bit odd but this way Code:: Blocks on again but not the default setting, that is, the position of the windows default compiler etc .... at least I got my turn so I better this solution.

Greetings.