This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
participantes = %w( | |
sara | |
andre | |
lucas | |
belle | |
marina | |
cacique | |
arthur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Função para buscar todos os seguidores de um usuário do Twitter. | |
var fs = [] | |
function followers(username, cursor) { | |
$.ajax({ | |
url: 'http://api.twitter.com/1/statuses/followers.json', | |
data: {screen_name: username, cursor: cursor}, | |
dataType: 'jsonp', | |
success: function(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RequiredAttributes | |
def self.included(base) | |
base.class_eval do | |
class << self | |
@@required_attributes = [] | |
def required?(attribute) | |
@@required_attributes.include? attribute | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private | |
# Define template_exists? for Rails 2.3 (cause it's deprecated) | |
unless ActionController::Base.private_instance_methods.include? 'template_exists?' | |
def template_exists?(path) | |
self.view_paths.find_template(path, response.template.template_format) | |
rescue ActionView::MissingTemplate | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jTabbedPane.setSelectedIndex(0); | |
jTabbedPane.setEnabledAt(1, false); |