As of ADT 14, resource fields cannot be used as switch cases.

I just moved one of our Android projects from svn to Github. I did an import to a new Android project in Eclipse and the project wouldn’t build. I got an error on everyone of the switch() statements in the app:

As of ADT 14, resource fields cannot be used as switch cases.

See this article for more on the error. But it I got the error because I had accidentally set my new project as a library.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Blogmate – Blogging Plugin For Textmate

I was looking for an offline WordPress blogging tool for the Mac. And I found Blogmate which is a plugin for TextMate, my preferred text editor. So here’s to more blogging!

BTW – This is my first post using Blogmate.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Bits

Testing Bits. It’s a simple note taker app for the Mac that can apparently post to WordPress.

It works OK, but I had to use another tool to set the category. Bits seems to only let you add tags.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Using GORM To Move Data Between MySQL And Couchdb – Part 1

Couchdb can run on Android and easily sync with a server in the cloud. It’s a great solution for providing apps that work “offline”. But I’m fairly new to Couchdb and the whole nosql thing. And actually, I when I first started coding we used flat files. Relational databases and SQL made life much better. So I’m a still a bit skeptical about nosql. But the offline/online sync is something I really need.

Couchdb will give me the sync that I need. But so far reporting off nosql is at least behind from what I can tell. So I’d like to use Couchdb (probably with a couchapp) on the mobile side and have the data normalized and put into MySQL where I can work in familar surroundings.

And since my preferred development environment is Grails with its all-powerful GORM, I have an idea. There’s a Couchdb plugin for Grails that will use GORM to create databases and documents from domain classes. And of course, it creates MySQL tables and records. So it seams feasible that I can create a Grails plugin that will take Couchdb documents, normalize them and put their data into MySQL.

I’d certainly appreciate any feedback on this idea.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How To Do A Global Grep

Here’s an example of how to do a recursive grep through your file system. In this case I’m looking for the text ‘otalo.AO.models’ in all Python scripts (*.py).

It turns out that the find command is way to do this. It lets you execute another command on its results. So here we pass the results to grep. The -H grep param is needed to get the file names to print in front the actual content.

So the general form is:

sudo find / -name [search string] -exec [any command] {} \;

And my example search is:

sudo find / -name *.py -exec grep -H 'otalo.AO.models' {} \;

which happily gives this result:


/home/otalo/otalo/AO/fixtures/seed_data.py:from otalo.AO.models import User, Forum, Tag, Admin, Line
/opt/freeswitch/scripts/AO/experiment-digest.py:from otalo.AO.models import Line, Message_forum
. . .

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

VM Search Engine

Loading


[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Failed to connect to FreeSWITCH

I’ve just started working with FreeSWITCH. I’m using the FreeSWITHCHBOX appliance.

When you start the appliance, FreeSWITCH is normally started automatically. And if you see the following message anywhere, it means that FreeSWITCH did not start. And that probably means that there’s a mistake in one the config files.

Failed to connect to FreeSWITCH event socket subsystem. Make sure FreeSWITCH is running...

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Create A Unique File Name Using A MAC Address

I needed a scheme to generate file names coming from different locations to a central server. The file names are generated in a script and I didn’t want to have to change the script for different locations. So I decided to include the MAC Address of the machine in the file name.

This little script grabs the address and converts the : characters to a – and stores there result in a var called MAC.


set - `ifconfig | grep -B 1 inet | head -1 | sed -e "s/\:/-/g"`
MAC=$5

So if you run that command then do

echo $MAC

you’ll get something like this:

00-16-3E-11-09-20

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Email From My Dad

42 years ago tonight a woman was worried that her child might be born before midnight and be stuck with being called an April fool Can you imagine a woman in labor worrying about such a profound issue? She is still missed and loved Dad

I was born at 12:27 AM April 2, 1968

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]