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
;; I have a sequence and I want to double all the numbers up to a limit. The following works, but looks awful! | |
;; (defn double-all [numbers limit] | |
;; (for [val numbers :when (< (* 2 val) limit) ] (* 2 val))) | |
(defn double-all [numbers limit] | |
(filter #(> limit %) (map #(* 2 %) numbers))) | |
(double-all (range 20) 10) |
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
// PS: Datasets: | |
// http://dl.dropbox.com/u/3545192/cep.zip | |
// http://dl.dropbox.com/u/3545192/consultas.txt | |
/* SCE-183 - Algoritmos e estruturas de dados II | |
* Professora: Prof.a Dr.a Hosiane M. Bueno | |
* | |
* Trabalho 2: ¡rvore-B | |
* | |
* Autor: VinÌcius Baggio Fuentes |
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
html { min-height: 100%; } | |
body { | |
width: 600px; | |
margin: auto; | |
background: #1e1e1e; | |
background-image: url('textura.png'); | |
background-image: url('textura.png'), -webkit-gradient(linear, left top, left bottom, from(rgba(100, 100, 100, 0.2)), to(rgba(0, 0, 0, 0.5))); /* Saf4+, Chrome */ | |
background-image: -webkit-linear-gradient(top, rgba(100, 100, 100, 0.2), rgba(0, 0, 0, 0.5)), url('textura.png'); /* Chrome 10+, Saf5.1+ */ |
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 Support | |
module Login | |
def login(user=nil) | |
user ||= users(:user) | |
visit new_session_path | |
# ... | |
end | |
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
group :test do | |
gem 'guard-spork' | |
gem 'guard-rspec' | |
gem 'growl' | |
gem 'rb-fsevent' | |
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
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' }, :cucumber => false do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch('spec/spec_helper.rb') | |
end | |
guard 'rspec', :cli => '--drb' do | |
watch(%r{^spec/.+_spec\.rb}) |
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
Factory.define :user do |u| | |
u.email 'bla@bla.com' | |
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
grupos que sei da existência: | |
* Guru-SP | |
* Guru-SP-Interior | |
* Guru-Campinas (SP) | |
* Guru-CE | |
* Guru-PI | |
* Rails-MG | |
* Guru-SC | |
* Guru-BA |
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
require 'net/imap' | |
Net::IMAP.debug = true | |
imap = Net::IMAP.new('imap.gmail.com', :ssl => true) | |
imap.login('login', 'senha') | |
imap.select('INBOX') | |
loop do | |
seqno = nil |
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
"pt-BR": | |
errors: | |
messages: | |
not_found: "não encontrado" | |
already_confirmed: "já foi confirmado" | |
not_locked: "não foi bloqueado" | |
not_saved: | |
one: '1 erro impediu que %{model} fosse gravado:' | |
other: '%{count} erros impediram que %{model} fosse gravado:' |