This file contains hidden or 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
/** | |
* @Author: Hercules Lemke Merscher | |
* Jokenpo | |
* http://dojopuzzles.com/problemas/exibe/jokenpo/ | |
*/ | |
enum Play { | |
ROCK, SCISSORS, PAPER | |
} | |
enum Result { |
This file contains hidden or 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 "rubygems" | |
require "rest_client" | |
require "json" | |
# usando API do twitter para recuperar ultimos 3 twitts de @hlmerscher | |
url = "https://api.twitter.com/1/statuses/user_timeline.json?include_rts=true&screen_name=hlmerscher&count=3" | |
data = JSON.parse( RestClient.get url ) | |
# imprimindo cada twitt | |
data.each {|twitt| puts "#{twitt['text']}" } |
This file contains hidden or 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
import java.util.Scanner; | |
/** | |
* Programa simples que implementa a cifra Cesar. | |
* -> Contem bloco principal com exemplo de funcionamento. | |
* | |
* Mais informacoes: | |
* http://pt.wikipedia.org/wiki/Cifra_de_C%C3%A9sar | |
* | |
* @author Hercules Lemke Merscher |
This file contains hidden or 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/python | |
# Filename: CaesarCipher.py | |
# Author: Hercules Lemke Merscher | |
class CaesarCipher(object): | |
''' Cifra de Cesar.''' | |
def encrypt(self, msg, key): | |
if msg == None: return None |
NewerOlder