Friday, July 31, 2009

Biking in Pisgah National Forest

I've spent a good chunk of my vacation pounding on this project (it's fun, really), but took a break to bike a small part of the Pisgah National Forest near the Fish Hatchery. Just amazing fun: downhill in a rainstorm on a modern mountain bike (my Trek 920 is so old it was Made in the USA).

Thanks to Bio-Wheels in Asheville for the expert and friendly advice that came with the bike rental.

Wednesday, July 29, 2009

Javascript isNumeric()

After flopping around looking for a Javascript isNumeric() function, Rosetta Code came to the rescue with isFinite(num):

 string value = "123.45e7";  
if (isFinite(value))
{
// do something
}
//Or, in web browser in URL box:
// javascript:value="123.45e4"; if(isFinite(value)) {alert('numeric')} else {alert('non-numeric')}

Getting a value from JQuery .each()

I struggled mightily trying to get an attribute out of what gets returned from the JQuery .each() function, but eventually tried this and it works:

 <td id="skill_0_ranks" skill_id="0" align="right">0a</td>  
// update skill mods
$('td[skill_id]').each(function(i, element){
skill_id = $(element).attr('skill_id')
update_skill(skill_id)
})


Incidentally, found a cool site for code formatting: http://codeformatter.blogspot.com/2009/06/about-code-formatter.html

Thursday, July 23, 2009

Edit Screen




The Edit and Main screens as they are today. The should be functional on a 320x smartphone screen.

Monday, July 20, 2009

From the top, but this time with feeling

A character manager for a smartphone actually makes sense, so I'm writing it over again in Javascript. By the time I finish I may actually own one of these phones. What finally sent me over the edge was TaffyDB, a "database" for the browser. I can store all the data in these hashes, and Taffy gives you a nice way way to pull the data you're interested in. I think of the databases as Excel sheets (or Calc sheets, for the FOSS folks), and there are goodly number of Excel-based character managers out there, so I should be able to pull this off.