Skip to main content

Posts

Emacs Regular Expressions

I do use GNU Emacs for almost every text file related thing. Functions like search, replace, cut, paste, etc are all quickly mastered. But, then I've faced a different situation. I had to replace a string, repeat some numbers and put another string. The answer: regular expressions. Emacs has a regular expression replace function. To access it, just type: "Ctrl + Alt + Shift + 5" (too much keys huh... ?) And it asks what should be searched. In my case, in which I wanted to capture the regex match, I did type \([0-9][0-9][0-9]\) to locate a 3 digit numbers and capture them. Then I typed enter and did tell Emacs what it should put in those numbers place: ID=\1; mv \1 ./safebox/\1 And enter again and ! to replace all. That is it.

Automation

As an exercise for our teaching methodologies class, my group had made an automation lecture. Here are a couple of videos illustrating a cool kind of automation. More on http://xpock.tv/play.php?vid=1823

Reducing Browser Memory Leaks with Google Maps API

Reducing Browser Memory Leaks The Google Maps API encourages the use of function closures , and the API event handling system GEvent attaches events to DOM nodes in such a way that almost inevitably causes some browsers to leak memory, particularly Internet Explorer . Version 2 of the Maps API introduces a new method, GUnload() , that will remove most of the circular references that cause these leaks. You should call GUnload() in the onunload event of your page to reduce the potential that your application leaks memory: onunload = " GUnload () " > Using this function has virtually eliminated Internet Explorer memory leaks in Google Maps, though you should test for memory leaks on your own site using tools like Drip if you are noticing memory consumption problems. SOURCE: GOOGLE

Internal Projects

We can't open much about our internal projects here at IDEIA. But now that University students and and professors, our main customers are on vacation, we have more time to spend on some internal projects which were put aside during the year. One of them, in cooperation with the IDEIA's Optics Lab, is related to digitize images captured with a regular composite video camera. The guy from the Optics Lab have a EasyCAP USB device, which I have to put to work with my linux box. I didn't find an out of the box solution, or a few steps tutorial to put it to work during the year. Looking again, I've found a couple of forums, tutorials, and links: http://ubuntuforums.org/showthread.php?t=662531 http://www.unicap-imaging.org/download.htm http://sourceforge.net/projects/syntekdriver/files/syntekdriver/Release%202.1.0/stk11xx-2.1.0.tar.gz/download http://ubuntuforums.org/showthread.php?t=451200&highlight=Syntek+Semiconductor I hope these might be useful to others trying to mak...

Information Visualization

Since I had done the visualization class at grad school, the world wans't the same anymore. To look at informational illustrations and graphic plots is being a real cool exercise. And when I have to use some software to plot some chart, quickly come back to my mind when our professor were telling us if we went to his office, he will receive us with a box of paper tissue to wipe our tears away... So, when I read the slashdot article about a Ronald Knief collecting charts of nuclear reactors, originally published in issues of Nuclear Engineering International , I became very curious. The Wired website brings more details . But after reading those articles I had reached the BibliOdissey blog, which has much more digitized illustrations, from artistic illustrations, through info charts, to puzzles. It is really awesome... It has lots of illustrations. They are all hires illustrations, the B ibliOdissey has a Flickr gallery with them in 5156 x 3244. Here are some of my favorites:

Cross-compiling windows applications under linux with wine and DevC++

This post has the same title as this , from Violin Iliev because it is almost a "repost". I had an old post on compiling win32 binaries on linux , but the technique I had shown lack the windows resource file compiling. Violin had written his wrapper to the windres resource compiler, but one good "emergency option" if one couldn't, or don't want, or hasn't time to, write a wrapper or compile Violin'd wrapper, is to follow what was commented on Violin's blog by someone who signed as Andy. Andy said: "I had the same problems with windres and mingw32-make under wine 1.0.1 I solved the problems by putting an original copy of msvcrt.dll in the bin subfolder of mingw32 and telling wine to load it first instead of its own msvcrt emulation. hope it can be useful Andy"