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
$background-image: none | |
$background-color: black | |
$box-color: #EEE | |
$box-border-rounded: true | |
$name-color: black | |
$name-size: 47px | |
$name-font: Raleway |
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
/* | |
* http://css-tricks.com/centering-percentage-widthheight-elements/ | |
*/ | |
.center { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
/* |
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
package str | |
func Reverse(input string) string { | |
return "" | |
} |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
type Client struct { | |
name 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"regexp" | |
) |
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
numero = gets | |
fizzbuzz(10) | |
# 1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz | |
# imprimir todos os números até o número | |
# se for divisível por 3, imprime fizz | |
# se for divisível por 5, imprime buzz | |
# caso não, imprime o próprio número |
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
# Para cada sabor de pizza disponível, cada um deve indicar uma nota para ele (nota 1, se a pessoa detesta o sabor e nota 5 se a pessoa adora o sabor). Depois de processar esses dados, cada pessoa vai saber quais as pessoas que tem o gosto mais parecido que o seu (e que provavelmente irá dividir uma pizza com você). | |
# Por exemplo, para os dados a seguir, o Luca gostaria de saber quem ele deve convidar para dividir uma pizza com ele: | |
Renato = { Marguerita: 4, QuatroQueijos: 5, Escarola: 4, Portuguesa: 5, FrangoCatupiry: 4, Napolitana: 3 } | |
Marcelo = { Marguerita: 2, Quatroqueijos: 2, Escarola: 1, Portuguesa: 3, FrangoCatupiry: 5, Napolitana: 2 } | |
Lenon = { Marguerita: 4, Quatroqueijos: 5, Escarola: 2, Portuguesa: 1, FrangoCatupiry: 1, Napolitana: 3 } | |
Renata = { Marguerita: 4, Quatroqueijos: 5, Escarola: 1, Portuguesa: 1, FrangoCatupiry: 3, Napolitana: 4 } | |
Washington = { Marguerita: 1, Quatroqueijos: 1, Escarola: 2, Portuguesa: 3, FrangoCatupiry: 4, Napolitana: 3 } | |
Tino = { Marguerita: 1, Quatroqueijos: 5, Escar |
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 Plane | |
def initialize(game) | |
@x = 100 | |
@y = 100 | |
@sprite = Gosu::Image.load_tiles(game, "images/planes.png", 66, 67, true)[0..2] | |
end | |
def draw | |
@sprite[Gosu::milliseconds / 100 % @sprite.size].draw_rot(@x, @y, 1, 0) | |
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
class Asteroid | |
attr_reader :x, :y | |
def initialize(game) | |
@sprite = Gosu::Image.load_tiles(game, "images/asteroids.png", 320/5, 384/6, true) | |
@x, @y = 100, 100 | |
end | |
def update | |
end |