Skip to content
{{ message }}

Instantly share code, notes, and snippets.

🍤
Working on Potigol Language (potigol.github.io)

# Leonardo Lucena lrlucena

🍤
Working on Potigol Language (potigol.github.io)
Created Sep 21, 2011
Cursos.xml
View curso.xml

Curso Modalidade / Campus
Created Apr 27, 2012
View Ruby Exercicio 00 1.rb
 x = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10
Last active Oct 7, 2015
Resposta da Lista de Exercícios 11
View Q01.rb
 def lerInt(n) n.times.map do gets.to_i end end vetor1 = lerInt(3) vetor2 = lerInt(4) vetor3 = vetor1 + vetor2 print vetor3
Created Jul 13, 2012
Aula de Classes e Objetos
View Dado.rb
 class Dado def rolar return 1 + rand(6) end end
Last active Oct 7, 2015
Gabarito da Lista de Exercícios 12
View Q01.rb
 # Escreva uma classe, chamada Ponto, que representa um ponto no # plano cartesiano. A figura abaixo mostra quais atributos e métodos # da classe. class Ponto attr_reader :x, :y def initialize(x,y) @x = x @y = y
Created Aug 1, 2012
Jogo do Avião
View bomba.rb
 class Bomba attr_reader :x, :y, :ativa def initialize(janela) @janela = janela @icon = Gosu::Image.new(@janela, 'bomba.png', true) @y = -rand(200) @x = rand(@janela.width-60) @ativa = true end def update(laser)
Created Nov 12, 2012
Scala Dojo - ThoughtWorks
View Map.scala
 package main.scala import math.{ abs, min } import Int.MaxValue case class Map(val airports: Seq[(Int, Int)] = Seq(), val clouds: Seq[(Int, Int)] = Seq()) { def addAirports(coordinates: Seq[(Int, Int)]) = Map(airports ++ coordinates, clouds) def airportAt(coordinate: (Int, Int)) = airports.exists(_ == coordinate)
Created Nov 12, 2012
Scala Dojo - ThoughtWorks
View Map.scala
 package main.scala import math.{ abs, min } import Int.MaxValue case class Map(val airports: Seq[(Int, Int)] = Seq(), val clouds: Seq[(Int, Int)] = Seq()) { def addAirports(coordinates: Seq[(Int, Int)]) = Map(airports ++ coordinates, clouds) def airportAt(coordinate: (Int, Int)) = airports.exists(_ == coordinate)
Created Dec 18, 2012
View Exercicios01.rb
 # Questao 1 "Programacao de Computadores".size # ou "Programacao de Computadores".length # Questao 2 media = (8.12 + 7.45) / 2.0 "A sua media foi de "+ media.to_s + " este ano!" # ou como será visto mais adiante ...
Created Dec 21, 2012
Servidor HTTP
View ServidorHttp.java
 import java.io.*; import java.net.*; public class ServidorHttp { public static void main(String args[]) { ServerSocket s = null; try { s = new ServerSocket(7896); // right now the stream is open. while (true) {