I hereby claim:
- I am johnzeringue on github.
- I am johnzeringue (https://keybase.io/johnzeringue) on keybase.
- I have a public key whose fingerprint is E9F5 5985 485C 7ADD FAEC 3CAA DDEA 9A3C 4419 3F27
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
VOWELS = "AEIOUYÅÄÖ" | |
CONSONANTS = ('A'..'Z').reject { |char| VOWELS.include? char } | |
def consonant? char | |
CONSONANTS.include? char or CONSONANTS.include? char.upcase | |
end | |
def rovarspraket string |
import com.google.common.jimfs.Configuration; | |
import com.google.common.jimfs.Jimfs; | |
// ... | |
// create filesystem and get a "virtual path" | |
FileSystem virtualFileSystem = Jimfs.newFileSystem(Configuration.unix()); | |
Path virtualPath = virtualFileSystem.getPath("virtual", "path"); | |
// use the path as you would any other |
// | |
// Ideas for New Topsoil Settings API | |
// ================================== | |
// | |
// | |
// Idea #1 - Inline Everything | |
// --------------------------- | |
// |
import random | |
def sample(items): | |
# the first argument can be omitted as it defaults to 0 | |
randomIndex = random.randrange(len(items)) | |
return items[randomIndex] | |
def promptForGender(): | |
genderList = ["male", "female"] |
import java.util.function.Consumer; | |
public class A<T extends A> { | |
public A(Consumer<T> preinitialization) { | |
preinitialization.accept((T) this); | |
initializeUsingSubclassMethod(); | |
} | |
} |
public class A { | |
public A(Runnable preinitialization) { | |
preinitialization.run(); | |
initializeUsingSubclassMethod(); | |
} | |
} |
H-99: Ninety-Nine Haskell Problems | |
================================== | |
Taken from http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems | |
Problem 1 | |
--------- | |
Find the last element of a list. |