Saturday, February 27, 2010

Offsetting pages in OpenOffice

I created a journal paper template following the fine advice of Dmitri Popov. A master document is ok but sometimes I just want to PDF that subdocument (journal article) right away with the corresponding planned pages.

Searching the web for offsetting solutions, I've got mixed results, none of them completely satisfactory.

Until... I found the best advice that came along. This is from OpenOffice.org's Tutorial on Page Numbering.

Summary
1. On the page where you want an offset page number go to the first paragraph
2. Right-click, select Paragraph then Text Flow
3. Check Insert, then With Page Style , then choose the page style you created if you have one on the scroll down menu
4. Then on Page Number, insert the start of the page number.

Monday, February 15, 2010

Composing a string and executing it in Matlab : preserving empty spaces

Say you want to automatically open files which are named file001, file002, etc. Further suppose that these files are in a folder named d:\folder 1, d:\folder 2, etc.
Normally, you could use strcat to concatenate a string together with num2str. For example
FILE = strcat('file00',num2str(i));
But strcat will eliminate empty spaces so if strcat is used this way,
FOLDER = strcat('folder ',num2str(3)); % note the single space after 'folder'
the result will be
FOLDER ='folder3'.
To preserve the empty space, use square brackets instead:
FOLDER = ['folder ',num2str(3)]
Suppose you composed a string containing a command:
com1 = 'cd c:\folder 3\file001.jpg'
To execute the string use exec:
exec(com1);


Sunday, February 14, 2010

Installing software in a netbook

I love my netbook! It's light, it's cheap, and it has a large disk space. But when it comes to installing programs in it, I'm reduced to : 1) borrowing an external CD drive, or 2) downloading the software from the net.

There are two other ways: 3) share the CD drive over the network, and 4) create an ISO image of the CD. This last one I find very handy. I got this solution from btfx in Yahoo Answers.

Step 1. In a computer with a CD drive, create an ISO image of the installation CD. A compact freeware suggested is http://lc-iso-creator.en.softonic.com/

Step 2. Copy the ISO image in a USB drive.

Step 3. Insert the USB drive in the netbook and mount the ISO volume using DaemonLite http://www.disk-tools.com/download/daemon

Be sure to unmount the ISO after use.

Wednesday, February 10, 2010

The Problem with Technical Knowledge

The problem with technical knowledge is that, technology marches by so fast that what you know now will become obsolete later, and quite quickly. If so, does it make sense to learn a technology at all? The Philippines is still a techonology "consumer" according to Dr. Roger Posadas in his talk on Science at "Beyond 2010". So will we be forever catching up?

I think there are still key concepts and skills to master (quantum mechanics for example) that will be relevant in the long term.

But I also think we can be ahead or be anticipatory. If we do research, we make our own technology and create new knowledge. In tackling research problems we come to grips with cutting-edge technology and create solutions where there are none.

I like to tell my students that a good research begins with a good research problem. The challenge really is asking the right questions.