Skip to content

Instantly share code, notes, and snippets.

@pablitar
pablitar / samples.js
Created September 23, 2021 21:19
Samples Test 1
[
"GET /content/contents/Qmc1Ke5KLJf77PhGR8fC1Yqrt1AkBFkcewBZqbFJwvVTrZ",
"GET /content/contents/QmU7An53BmW313CDbYKhC8xgH671TaVGo8cv6LS1bDRCCE",
"GET /content/contents/QmSjHxg1E3PDLzevSom9jE6TBmGEZFH12sqpsTmbBDdug4",
"GET /content/contents/QmTeNWhRrge6wW6YBqDUNLFeCP2K3C9NRf46LRHLM58RMy",
"GET /content/contents/QmNSNwAaHL5zQTDaZVXvdh61bfqektzubMkLTiUZHj3zzs",
"GET /content/contents/Qme46DwgVqBgDZufn9pv5Fg6yLo5ybR4Xvj98VWjf9VLdP",
"GET /content/contents/Qmb7hLDqdLDkeXVbspidqJcUSRduQr1Qe3o5FDfPNJ1FsB",
"GET /content/contents/QmZ7fwLvYAo3rGBVk6toCBttDEK6rkV4NzRndCGZ3k6kJt",
"GET /content/contents/QmZzyWf2fPUyhfcpNqMgfcTooubKSZs9mQ958VBwBRjdb5",
import scala.util.Try
import scala.List
class ParseErrorException(message: String) extends RuntimeException(message)
trait ParserOutput[T] {
def isParserSuccess: Boolean
def getSobra: String
// def getResultado: Option[T] ??? -> Preguntar
}
class GiantClawAppearance(resources: Resources)(val claw: GiantClaw) extends Appearance {
object body extends TextureAppearance[GiantClaw](resources.GiantClaw.body)()(claw) {
val pivotSprite = resources.GiantClaw.pivot
override def renderOn(renderers: Renderers): Unit = {
//Render thrust
renderSpriteWithPositioned(renderers, pivotSprite, claw.topHydraulics)()
super.renderOn(renderers)
}
class GiantClaw(_position: Vector2, val world: World)(implicit resources: Resources) extends Enemy with PositionedWithTransform with SingleAppearance {
class ClawHydraulics(val flipped: Boolean = false) extends RotableJoint(-0.30f, 0.75f) {
val edge = new ClawEdge(this)
def update(delta: Float): Unit = {
if (Gdx.input.isKeyPressed(Keys.R)) {
rotationFactor += delta
}
@pablitar
pablitar / GimnasioPokemon.scala
Created October 27, 2018 23:01
Gimnasio Pokemon 20182C TADP Aula 407
package pokemon
import scala.util.Try
object GimnasioPokemon {
type Actividad = Pokemon => Pokemon
class NoPuedeRealizarActividadException extends RuntimeException
trait TipoPokemon {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<config>
<executableName>${app.executable}</executableName>
<mainClass>${app.mainclass}</mainClass>
<os>ios</os>
<arch>thumbv7</arch>
<target>ios</target>
<iosSdkVersion>11.4</iosSdkVersion>
<iosInfoPList>Info.plist.xml</iosInfoPList>
<resources>
<resource>
module TagBuilder
def method_missing(sym, *args, &block)
properties_map = args[0]
child_tag =
create_and_initialize_tag(block,sym,properties_map)
child_tag
end
def p(*args, &block)
create_and_initialize_tag(block, :p, args[0])
package ar.edu.tadp.granja
import scala.collection.mutable.Set
object GranjaApp extends App {
class Animal {
var peso = 100
def come = peso += 10
def estaGordo = peso >= 150
package holascala
object ConsolaDeCafe {
abstract class ConPrecio {
def precio: Double
}
class Cafe extends ConPrecio {
def precio: Double = 10
}