This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| #!/usr/bin/env ruby | |
| # Usage: gemspec [-s] GEMNAME | |
| # | |
| # Prints a basic gemspec for GEMNAME based on your git-config info. | |
| # If -s is passed, saves it as a GEMNAME.gemspec in the current | |
| # directory. Otherwise prints to standard output. | |
| # | |
| # Once you check this gemspec into your project, releasing a new gem | |
| # is dead simple: | |
| # |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| # WAIT! Do consider that `wait` may not be needed. This article describes | |
| # that reasoning. Please read it and make informed decisions. | |
| # https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
| # Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
| describe 'Modal' do | |
| should 'display login errors' do | |
| visit root_path |
| diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb | |
| index e948314..a24b35a 100644 | |
| --- a/activesupport/lib/active_support/callbacks.rb | |
| +++ b/activesupport/lib/active_support/callbacks.rb | |
| @@ -321,7 +321,13 @@ module ActiveSupport | |
| _normalize_legacy_filter(kind, filter) | |
| scopes = Array(chain.config[:scope]) | |
| - method_to_call = scopes.map{ |s| s.is_a?(Symbol) ? send(s) : s }.join("_") | |
| + method_to_call = scopes.map { |s| |
| # monkey patching Ember.TextField so that you can add delay=500 to make the | |
| # TextField to update the binding value in debounced manner with delay of 500ms. | |
| # That is it will only update the value if there is a unsubmitted change and | |
| # no user input for the specified delay period. | |
| # While no delay spcified, it's just the plain Ember.TextField | |
| # usage in handlebars: | |
| # {{view Ember.TextField valueBinding="someValue" delay=500}} | |
| Ember.TextField.reopen { | |
| delay: null # delayed period for updating the binding value in ms | |
| _debouncedSet: (key,value,delay)->Ember.run.debounce(this, Ember.set, this, key, value, delay) |
Em uma caluladora de bolso os dígitos são representados por pequenas barras no visor de cristal líquido:
Quando olhamos com o visor de cabeça para baixo alguns números ainda podem ser lidos (só que com outros valores). Por exemplo, 1995 vira 5661. O quinto número que pode ser lido de cabeça para baixo é 8, e o décimo-quinto é 21, que passa a valer 12 quando é visto de cabeça para baixo.
Você deve responder a pergunta: