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
Scala: | |
( _.bla() ) | |
Groovy: | |
{ it.bla() } |
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
class ArcoIris | |
include Enumerable | |
def each() | |
yield "vermelho" | |
yield "laranja" | |
yield "amarelo" | |
yield "verde" | |
yield "azul" | |
yield "aniz" |
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
Lean Software Development: An Agile Toolkit by Mary Poppendieck | |
http://www.amazon.com/gp/product/0321150783/ | |
Agile Estimating and Planning by Mike Cohn | |
http://www.amazon.com/gp/product/0131479415/ | |
Programming in Scala: A Comprehensive Step-by-step Guide by Martin Odersky | |
http://www.amazon.com/gp/product/0981531601/ |
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 ActiveRecord | |
class Base | |
def self.meu_named_scope_comum(*args) | |
named_scope(com_os_argumentos_que_precisar) | |
end | |
end | |
end | |
# aí nos models que precisar usar isso... |
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
class Nando: | |
def __ass__(dick): | |
print dick |
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
grep -F "# -*- coding: UTF-8 -*-" -L app/**/*.rb | while read file; do sed -e '1i\ | |
# -*- coding: UTF-8 -*-\n' -i '' $file; done |
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
Memory access offset=0 size=9 is out of bounds | |
.../gems/ffi-0.6.3/lib/ffi/memorypointer.rb:34:in `put_string' |
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
function t3hClosure() { | |
var globalVariablesSux = "non global"; | |
return function() { | |
alert(globalVariablesSux); | |
} | |
} | |
closure = t3hClosure(); |
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
n = 10 | |
fork do | |
n = 20 | |
puts n #=> 20 | |
end | |
fork do | |
n = 30 | |
puts n #=> 30 |
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
/** | |
* Applies a supplemental hash function to a given hashCode, which | |
* defends against poor quality hash functions. This is critical | |
* because HashMap uses power-of-two length hash tables, that | |
* otherwise encounter collisions for hashCodes that do not differ | |
* in lower bits. Note: Null keys always map to hash 0, thus index 0. | |
*/ | |
static int hash(int h) { | |
// This function ensures that hashCodes that differ only by | |
// constant multiples at each bit position have a bounded |