PHP strftime on Windows is stupid

Thursday 01/8/2009  –  Category: Uncategorized

Apparently %e, %T, %R and %D (there might be more) don’t work on Windows because “not all conversion specifiers may be supported by your C library”.
Workaround: You can add the # flag to force single digits and remove the leading zero without the space that %e will add.
Examples:
%#d for day of the month
%#I for the [...]



Ok, so this requires that you have a Last.fm account with recorded data…if you don’t, you can just admire my pretty graph.
LastGraph lets you create really cool stacked graph of your listening habits.  Just stick in your Last.fm username and you can generate a timeline poster based on a certain timeframe.
LastGraph is inspired by Lee [...]



Count unique records with DataMapper

Saturday 01/3/2009  –  Category: Uncategorized

dm-aggregates provides an aggregate method that allows for “multiple aggregate functions to be used in a single query, with automatic grouping when :fields is specified”
Hit.aggregate(:ip_address).length
Will yield the number of unique IP addresses in the hits table.



It didn’t occur to me until a day or two after I released Flickr Original that I should probably record usage stats, so I added a few lines of code to track views/downloads. Earlier this week I finally decided to do something with all the data. I decided on a simple line graph [...]



Ranges in Ruby (and .. vs …)

Saturday 01/3/2009  –  Category: Uncategorized

Ranges in Ruby are nifty: you can define a set by its start and end values and a range of values will be generated.  This works “as long as the objects can be compared using their <=> operator and they support the succ method to return the next object in sequence.”
Ranges created with .. will [...]



 Page 2 of 2 « 1  2