Before an election,

  1. Visit your county’s board of elections website .
    1. Make sure you’re registered to vote in your county.
    2. Find your polling location .
    3. Read about the issues
    4. Find out about the candidates
  2. Research the issues and the candidates.
    1. Your newspaper should have a guide to the issues.

Before submitting to IEEE, you must make sure your PDF does not require Type 3 fonts, and that all fonts are embedded. You can examine the fonts by viewing the Fonts tab under Document Properties in acroread. You can also use the pdffonts command.

I prefer to configure pdflatex to embed all fonts by default (even base 14 fonts, which are found almost everywhere.) This may make documents unecessarily large, but it makes for a streamlined process.

References:
[1] do.whileloop.org
[2] www.manticmoo.com

This is more of a note to myself than a useful tip:

I use grip to rip CDs straight to mp3. However, the mp3 tags are almost never as useful as I would like them to be. So, I use id3ed to edit them. Also see exfalso for editing m4a tags.

I use Amarok to manage my mp3 collection and podcast subscriptions. Recently, I wanted to move my collection to another computer. So, I installed Amarok 1.4.7 on the new computer, and then copied my mp3 (collection) folder and podcast folder (located at ~/.kde/share/apps/amarok/podcasts) from the old computer to the new one. After pointing Amarok to my new mp3 directory, I could manage my mp3s. However, Amarok would not recognize my podcast directory. I searched the internet, but could not find a way to tell Amarok about this directory. I searched (grepped) for “podcast” in ~/.kde/share/apps/amarok/, and discovered that podcast information is in collection.db. So, I copied the database to my new Amarok install. After a restart, Amarok correctly listed all of my podcast subscriptions.

Some time after an Ubuntu upgrade (I’m running 7.10 at the time of this post), I started receiving the followng error messages when accessing some of my Subversion (SVN) repositories.

svn: PROPFIND request failed on '/matlab_templating'
svn: Could not open the requested SVN filesystem

And I found this in my Apache error logs:

(20014)Internal error: Berkeley DB error for filesystem '/path/to/repos/matlab_templating

Now, I’m not sure at which version this occurred, but at some point, the default Subversion repository file system type became ‘fsfs’ instead of ‘bdb’. And, during some Ubuntu upgrade, I got a new subversion installation. So, I had to “upgrade” my repositories. Here’s how to do it:

  1. Find out which repositories are ‘bdb’

    sudo find $PATH_TO_REPOSITORY_ROOT -type f -iname 'fs-type' -exec echo {} \; -exec cat {} \;
    

  2. Recovere the BDB repositories.

    sudo svnadmin recover $REPO
    sudo for f in `svnadmin list-unused-dblogs $REPO`; do rm $f; done
    
  3. Dump old BDB repository to new FSFS repository.

    mv $REPO $REPO-OLD
    svnadmin create $REPO
    svnadmin dump $REPO-OLD | svnadmin load $REPO
    

    Don’t forget to set the correct file permissions on the repository. Also, run these commands using sudo.

I’ve been getting a lot of emails lately from folks interested in getting started with GNU Radio. So, instead of continually forwarding the same email that I sent to the first student, I decided to post some starting points here.

Read up on GNU Radio to see if it interests you and/or meets your needs:

If you still have questions:

  • Search the mailing list archive. The mailing list serves as the defacto project documentation. So, take this advice seriously.
  • I can’t emphasize this next point enough: Subscribe to the GNU Radio mailing list. Just lurk on the list for a while (i.e., read the messages without sending any of your own). You’ll get a good idea of the state of the project from doing this.

If you don’t know Python, you’ll need to learn it:

If you don’t know Linux, you’ll need to learn it:

Good Luck!

Problem:

Intellisense (or auto-complete, or code-completion, whatever…) wasn’t working properly in NetBeans for a free-form project (i.e., a “Java Project with Existing Ant Script”), but it was working for stand-alone applications (i.e., a “Java Application”).

Description:

When typing something like “System.” (notice the dot) in a “Java Application,” a window will pop up with an appropriate list of methods and members for the class “System”. However, in the free-form project (i.e., “Java Project with Existing Ant Script”), this does not happen. Instead, it pops-up with “no suggestions” or a list of miscellaneous words for auto-completion.

Solution:

You must update the project classpath for the free-form project. You can find your classpath by examining the “Classes” tab under Tools->Java Platform Manager. My classpath is:

/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/rt.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/i18n.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/sunrsasign.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/jsse.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/jce.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/charsets.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/classes
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/ext/sunjce_provider.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/ext/sunpkcs11.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/ext/localedata.jar
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/ext/dnsns.jar

To update the classpath for the free-form project, right-click on the project icon in the projects view pane, and select “Properties”. NetBeans will not let you set the classpath unless you have first explicitly listed “Source Package Folders.” So, click on the “Java Sources” button in the options tree on the left-hand side. Then click the “Add Folder” button next to the “Source Package Folder” list box. Select your Java source directories. Next, click the “Java Source Classpath” button in the options tree (left-hand side again), and click the “Add JAR/Folder” button. Browse to the JAR files/folders that you saw listed in your Java Platform Manager, and select them. They should now be listed in the list box. Click OK.

Hopefully that does it.

There are some radio shows which broadcast for free (either over the air or streaming over the Internet), and I would really like to listen to them. However, I consume all of my audio during my commute, and for all of these shows, I am usually not available to listen. So, mp3 versions of these shows would be super handy.

After some searching, I found some resources that allow one to save an Internet audio stream in mp3 format. I thought I would share these resources here. I am not posting step-by-step instructions. (There are better resources for that.) I am just posting some notes to serve as a starting point:

HOWTO Convert (almost) any audio format (.m4a/.rm/.wma/.mp3) to .wav
How-To rip Real Media RTSP Streams from the web to MP3 using MPlayer

Also, here’s a script that I use to capture installations of The Infinite Mind radio show.

#!/bin/bash
#
# This script accepts the name url to a real-format stream. It then rips
# the (real formatted) audio stream, can converts it to mp3

STREAM=$1
BNAME=`basename $1 .rm`

# get the real formatted stream, saved in real format
mplayer -noframedrop -dumpfile $BNAME.rm -dumpstream $STREAM

# convert the real formatted file to wav format
mplayer -quiet -vo null -vc dummy  -ao pcm:waveheader:file="$BNAME.wav" "$BNAME.rm"

# convert the wav formatted file to mp3
lame -V0 -h -b 160 --vbr-new $BNAME.wav $BNAME.mp3

Note: To find the stream address for a live stream, I usually open the feed with realplayer (or whatever) and find the source URL by examining the stream properties.

I will be maintaining a list of links I find useful when conducting my research. I will add to and edit this list as I have time (and remember to do it).

Very Helpful Software

  • Zotero — Make sure to view the demo
  • JabRef — I couldn’t do my research without it! Read a good overview of bibtex management tools here.

Patents


Journals


Sites that provide BibTeX output

WSU Library/ OhioLink specific

  • If you cannot get access to an article, try searching for the journal at the WSU library homepage. The university may have access to full-text (electronic or non-electronic) via a university subscription or through OhioLink.
  • You can configure Google Scholar to perform library / OhioLink queries based on your searches.

Checking Cross-References

  • Google Scholar has a “Cited by…” link under each result that you can click.
  • CiteSeer – never seems to work for me, but….

I am keeping here a list of useful links for Linux newbies. I will add to this list as I come across good links (and actually remember to put the link here).

Full Circle Magazine — The Ubuntu community magazine.
Free Ubuntu Books

There is an unfortunate dearth of competent mp3 device managers available to Linux users. Fortunately, there is Amarok.

I usually only write about software if I have some specific tip or trick that I think will help other users avoid some annoyance I had to overcome. In this post, the tip is simply: use Amarok. I wasted a lot of time searching for a competent iPod manager. Hopefully, other users will save time by trying Amarok first.

My search for an iPod manager began at this very useful comparison of iPod managers, and I tried all of the mangers listed therein. I was looking for software that could manage my local collection of audio files (including tags and cover art), as well as facilitate the easy transfer of files to and from my iPod. Only Amarok had the functionality I was looking for.

Not only does amarok work (mostly) like you would think it should, I actually prefer it to iTunes. (I’m not just saying that because I’m a Linux guy. I really do prefer it.) Initially, I had some difficulty mounting my iPod so Amarok could find it. However, I’ve had no problems since then. As an added bonus, Amarok is a gread podcatcher. I use it to download my favorite podcasts, and transfer them to my iPod; I then transfer the shows I really like into my permanent collection. In the end, Amarok just works like you think it should.

To mount your iPod nano under Linux, follow the instructions here.

I have a one-hour round-trip commute to work each day, and I usually spend that time listening to NPR. As much as I do like NPR, I decided to take more control over my listening time. So, I bought a new car stereo capable of controlling my Apple iPod. That was definitely one of the best decisions I have made in a long time. Now, I spend an hour each day listening to interesting, thought-provoking, and entertaining radio. No more wasted time.

Here are some great podcasts that I listen to. Please recommend any you enjoy.

Radio Lab — Maybe the best show on radio.

What is Radio Lab?

Radio Lab® is an investigation. Each episode is a patchwork of people, sounds, stories and experiences centered around One Big Idea. On RadioLab, science bumps into culture… information sounds like music.

This American Life — Again, possibly the best show on radio.

One of our problems from the start has been that when we try to describe This American Life in a sentence or two, it just sounds awful. For instance: each week we choose a theme and put together different kinds of stories on that theme. That doesn’t sound like something we’d want to listen to on the radio, and it’s our show.

The Moth — Amateur storytelling.

The success of The Moth is one example of the phenomenon of storytelling that is gaining momentum nationwide. In The Moth’s case, these narrative sessions are fast becoming an institution.

Wait Wait…Don’t Tell Me! — Very funny and witty.

Wait Wait… Don’t Tell Me! is NPR’s weekly hour-long quiz program. Each week on the radio you can test your knowledge against some of the best and brightest in the news and entertainment world while figuring out what’s real news and what’s made up.

Re:sound — A great place to find new and interesting podcasts

Re:sound is a little bit of a lot of things…

Hosted by longtime producer and essayist Gwen Macsai, Re:sound brings you intriguing radio stories culled from around the world and ranging from experimental sound art to humorous essays, from personal narratives to investigative documentaries.

Philosophy Talk — Incredibly entertaining and informative.

Philosophy Talk is a weekly, one-hour radio series produced by Ben Manilla. The hosts’ down-to-earth and no-nonsense approach brings the richness of philosophic thought to everyday subjects. Topics are lofty (Truth, Beauty, Justice), arresting (Terrorism, Intelligent Design, Suicide), and engaging (Baseball, Love, Happiness).

This is not a lecture or a college course, it’s philosophy in action! Philosophy Talk is a fun opportunity to explore issues of importance to your audience in a thoughtful, friendly fashion, where thinking is encouraged.

If you don’t use VIM as your text editor, you really should think about using it — especially if you use Linux. (Although, I use it under Windows too.) VIM saves me so much time editing source code files, that I cannot use an integrated development environment (IDE) anymore — even with all the nice features IDEs provide — because editing files with VIM is so much faster. If you don’t understand how an editing files can be faster in one editor versus another, then there is a whole new world out there just waiting for you too explore.

The downside of VIM is that there is a learning curve associated with it. Like most things that come from the Unix world, VIM uses recall not recognition. That is to say, in Windows you can figure things out by recognizing icons and feeling your way around. Under Unix/Linux you must recall the command. That means you have to know it before hand. The upshot is that doing something the first time takes longer under Linux, but doing it the second time takes a lot longer under Windows.

Anyway, the reason for this post is not for me to extol the virtues of VIM, but to maintain a list of VIM tricks an tips so that I can recall them later:


  • Use File Skeletons:

    You can keep a skeleton file (or template file, if you will) on your system, and VIM will automatically read this skeleton file in when you create a new file of the appropriate type. See the help for more detail.

    As an example: I have the file ~/.vim/skeletons/skeleton.m on my system, and the command autocmd BufNewFile *.m 0r ~/.vim/skeletons/skeleton.m in my ~/.vimrc file. When I open a new *.m file, the contents of skeleton.m are automatically placed in my new file. I find this very useful because I use Subversion for version control, and always put the same header, with SVN keywords, in my files.

When creating PDF documents with LaTeX, one desires a PDF viewer that will automatically reload the document when it changes. Unfortunately, the best PDF viewer under Linux, acroread from Adobe, does not do this. Neither does gpdf. Another GNOME PDF viewer called evince will reload, but you have to type CONTROL+R to do so. The only PDF viewer I could find that automatically reloaded PDF files is kpdf. Fortunately, kpdf is also a nice PDF viewer. So, I am happy that I found it.

I came across an incredibly interesting piece of software today. It is called TrendAnalyzer from Gapminder. It is statistical visualization software with so much promise that it was bought by Google. I love the goal of the Gapminder project, which is “to promote a fact-based worldview by bringing statistical story-telling to new levels. In collaboration with producers of accurate statistics that are eager to give the public free access to databases, Gapminder hopes to recruit and inspire many users of public statistics.”

Checkout the TED 2007 presentation on their homepage. Then, checkout what Google’s done with it. Very cool.

p>
I setup a machine running Ubuntu 5.04 server edition as
a print server for my heterogeneous LAN. This setup was especially tricky
because the server edition is command-line only — i.e., there is no
X-windows and Gnome interface. I ran into a number of problems during
this setup. So, I’m posting the steps as both a reminder to myself and
an informal guide to anyone else trying to do something similar. These
steps involve setting up the Ubuntu 5.04 server, an Ubuntu 6.10 client,
and a Windows XP client. The printer was an Epson Stylus Color 740. I
think the steps listed are relatively complete, but I can make no
guarantee. The packages I tell you to install may be overkill, but
maybe not. I would appreciate any feedback if someone knows better than
I.

Server Setup

  1. Update your system

        sudo apt-get update
        sudo apt-get upgrade
  2. If your printer uses the parallel port, make sure that it is enabled
    in the BIOS and that your kernel supports it. My BIOS had it disabled
    by default, and that took me quite a while to figure out. See this
    newbiedoc article
    and this article
    for some details.
  3. Install the necessary packages

        sudo apt-get install samba cupsys cupsys-client cupsys-bsd cups-driver-gimpprint foomatic-db gs-esp

    I don’t know if every printer requires foomatic-db and gs-esp. However, mine did. (And it
    took me a long time to figure that out!)

  4. Install your printer from either the command line a la this
    how-to
    , or from the cups web interface a la this
    how-to
    . The important part is that your cups server should be
    listening to port 631 for all hosts. Note that if you choose the
    command line option then you’ll probably need to download the
    appropriate printer driver from here . Once
    you can print locally (from the server), you can move on to client
    setup.
  5. Read the Part 2: Make the printer available using SAMBA
    in
    Sharing a printer to Windows XP clients with Samba and Cups
    . I
    just backed up may /etc/samba/smb.conf and then replaced it
    with the author’s smb.conf Things just worked after I set my
    own workgroup and netbios name.

Ubuntu Client Setup

  1. Repeat steps 1 (update) and 2 (get packages) of the server setup
    above.
  2. Add the line ServerName IP_OR_HOSTNAME to
    /etc/cups/client.conf where IP_OR_HOSTNAME is either
    the IP address or hostname of the print server. Note you may have to
    create the file /etc/cups/client.conf
  3. Go to the System–>Administration–>Printing applet, and
    select Global Settings on the toolbar. Check Detect LAN
    Printers
    .
  4. In the printing dialog, double click the New Printer icon.
    This will bring up the Add Printer dialog box. Your system
    should have detected the printer connected to your print server.
    Install this printer.

Windows Client Setup

  1. Read the Windows Client Configuration section in
    Sharing a printer to Windows XP clients with Samba and Cups
    .

References


Sharing a printer to Windows XP clients with Samba and Cups
The author shares his experience setting up Samba and CUPS under
Debian Sarge. His experience was very similar to mine. You must read
this article.

Howto:
configure cups on Ubuntu Server from command line
Discusses configuring CUPS from the command line.


HOWTO: Setup A Headless Ubunutu CUPS Print-Server
An extension of the above reference. Discusses how to setup CUPS for
remote administration via the web interface.

Ubuntu: Share your printer
Shows how to configure the CUPS client.


HOWTO: Fileserver with Samba and Printserver with CUPS
Found this after I wrote this post. Maybe it is helpful?

An interesting article about open research:

http://news.bbc.co.uk/2/hi/technology/6404429.stm

I could provide a discussion, but I will instead be lazy, and let the slashdot.org discussions do the talking. (The slashdot discussions are actually pretty good for a change. Read them.)

http://yro.slashdot.org/yro/07/03/02/0158208.shtml

http://science.slashdot.org/article.pl?sid=07/03/01/1643204

My first attempt at adding and configuring printers from the command line in Linux. Posting script and references here.

#!/bin/bash
########################################################################
#
# Author: Lee Patton, 2007
# This script adds Wright State printers.  To get drivers see:
# http://openprinting.org/printer_list.cgi
#
########################################################################

######################################
# Common Printers in Russ
######################################
NAME="Russ1"
DESC="Lexmark Full-Duplex B/W"
LOC="1st Floor RC"
PPD="Lexmark-Optra_T616-Postscript.ppd"
HOST="valhalla.cs.wright.edu"
QUE="russ1"
OPS="-o Duplex=DuplexNoTumble"

echo Adding Printer: $NAME, $DESC, $LOC
lpadmin -p "$NAME" -v "lpd://$HOST/$QUE" -D "$DESC" -L "$LOC" -P "$PPD" -E
lpoptions -p $NAME $OPS

######################################
# Lab Printer -- Default
######################################
NAME="HP"
DESC="HP Color Laserjet 2550n"
LOC="233 RC"
PPD="HP_Color_LaserJet_2550.ppd"
HOST="hp01"
QUE="raw"
OPS="-o none"

echo Adding Printer: $NAME, $DESC, $LOC
lpadmin -p "$NAME" -v "lpd://$HOST/$QUE" -D "$DESC" -L "$LOC" -P "$PPD" -E
lpoptions -d $NAME $OPS

######################################
# EOF
######################################

Some really good references

For some reason wordpress theme designers like to specify everything in pixels. I imagine it has to do with the fact that most themes have an image as the header, and the designers want everything to be even with the image. Well, for whatever the reason, every theme I’ve tried out does a poor job at displaying preformatted text, which is what I use to post log files, source code, etc.. Therefore, I cobbled together a little CSS code that can be placed in the main CSS file of the theme. It appears in the box below, which also demonstrates its functionality. The key here is the “overflow: auto” property. I’m posting this code here as a reminder.

.scrolling {
	overflow: auto;
	border: 1px grey solid;
	margin-top: 10px;
	margin-bottom: 10px;
        padding: 5px;
}
.scrolling {
	overflow: auto;
	border: 1px grey solid;
	margin-top: 10px;
	margin-bottom: 10px;
        padding: 5px;
}

With A very long line -----------------------------------------------------------------------------------------------------------
.scrolling {
	overflow: auto;
	border: 1px grey solid;
	margin-top: 10px;
	margin-bottom: 10px;
        padding: 5px;
}

A very long line -----------------------------------------------------------------------------------------------------------

A very tall line
|
|
|
|
|
|
|
|
|

Personal notes for migrating between computers.

  1. Copy relevant directories

    Use tar in order to preserve file permissions

    sudo tar -pczvf somedir.tar.gz  somedir/
    sudo scp -r somedir.tar.gz username@host:/home/username/
    sudo tar -pxzvf somedir.tar.gz
    
  2. Get packages:

    Enable all universes/multiverses by editing /etc/apt/sources.list or checking all of the boxes under Settings->Repositories in the package manager. Next, run the update manager, then install the following packages:

    • acroread, acroread-plugins
    • vim-full (vim-tiny is installed by default. Missing lots of features.)
    • tetex-extras, latex-beamer, kpdf, and kdvi. Remember to copy texmf directory in home.
    • imagemagick
    • j2re1.4-mozilla-plugin
    • octave and gnuplot
    • subversion
    • vlc
  3. Hidden files

    The following hidden files and folders, found in the home directory, can be copied over to the new home directory.

    • ~/.aspell.en.pws
    • ~/.bash_aliases, then uncomment the appropriate lines in ~/.bashrc. Also, add /bin/rm -f $HOME/bash_history to the file ~/.bash_logout.
    • ~/.vim and ~/.vimrc
    • ~/.subversion (discussed below)
    • ~/.mozilla/firefox/something_cryptic.default/bookmarks.html (discussed below)
    • ~/.evolution (discussed below)
  4. Subversion:

    Simply copy over subversion repositories and working copies. The FSFS repositories will work fine. The BDB will not. See this post for details. Also, copy ~/.subversion to new home directory in order to retain desired configuration settings.

  5. Firefox:

    Copy Firefox bookmarks file ~/.mozilla/firefox/something_cryptic.default/bookmarks.html. Next, install all of the desired search bar plugins

    • Google Scholar
    • Google Books
    • crossref
    • Dictionary.com
    • IEEExplore
    • Google Linux
    • GNU Radio
    • WSU LDAP
  6. Email:

    I was able to just copy my old ~/.evolution directory to my home directory. This preserved all of my contacts, calendar, and email. However, I did have to re-enter all of my accounts.

  7. MATLAB:

    Copy over MATLAB license file from /usr/local/matlab/etc/

  8. Add Printers:

    See http://www.pattoncentral.org/?p=50

Next Page »