For you future Palm Pre developer googlers: the max height is 425. Don’t trust the emulator!!!!
I got this error when trying to compile an iPhone project in XCode. I found the answer to my problem on StackOverflow, but I couldn’t upvote or thank Jimmy for his solution, which is related to a Ruby install. Thanks Jimmy!
It’s because you have an update in your after_create.
class User < ActiveRecord::Base
before_update :audit_info
after_create :generate_key
private
def generate_key
update_attribute(:key, generate_stuff)
end
def audit_info
AuditLog.big_change!(self)
end
end
Yep,
audit_info will get called when you
User.create.
Then the undocumented %l (yes, a lower-case L) is your friend.
Time.now.strftime("%I:%M%p")
# generates 05:00pm
Time.now.strftime("%l:%M%p")
# generates 5:00pm
That’s just evil that l looks so much like I.
Here’s a discussion, and here’s the simplest solution:
# in your TestCase
self.use_transactional_fixtures = false
Ruby:
def number_with_delimiter(number)
parts = number.to_s.split('.')
parts[0].gsub!(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,")
parts.join '.'
end
Perl:
sub number_with_delimiter {
my $number = shift;
my @parts = split(/\./, $number);
$parts[0] =~ s/(\d)(?=(\d\d\d)+(?!\d))/$1,/g;
return join(".", @parts);
}
The solution to this is to just setup a subdomain for your Subversion repository.
tail -10000 log/production.log | egrep "Completed in [0-9]{2,}"
via
RailsMachine support
I liked this little idiom from Tobias.
servers = [ 'memcache1', 'memcache2', 'memcache3' ]
servers[ 'product-1' % servers.size ]