I hereby claim:
- I am hugoferreira on github.
- I am bytter (https://keybase.io/bytter) on keybase.
- I have a public key ASAMmL1U1qmV9_HFtZ39FPzJnyWqYE2MUaog1jaexvYTjAo
To claim this, I am signing this object:
| const isArraySorted = require('is-array-sorted') | |
| async function testAsyncQueueBehavior(nOps: number): Promise<Boolean> { | |
| const result = new Array<number>() | |
| const q = new AsyncQueue<number>() | |
| const enqueue = (m: number) => q.enqueue(m) | |
| const dequeue = () => q.dequeue() | |
| const promises = Array<Promise<void>>() |
| <?php print "Hello worldfçskdljflksdjfskfjdkfsjdfkl" ?> |
I hereby claim:
To claim this, I am signing this object:
| class AsyncQueue<T> { | |
| waitingEnqueue = new Array<() => void>() | |
| waitingDequeue = new Array<() => void>() | |
| enqueuePointer = 0 | |
| dequeuePointer = 0 | |
| queue = Array<T>() | |
| maxSize = 1 | |
| async enqueue(x: T) { | |
| if ((this.queue.length + 1) > this.maxSize || this.waitingDequeue.length > 0) { |
| { | |
| "$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
| "width": 500, | |
| "height": 200, | |
| "data": {"values": | |
| [{"len":1,"p":0.631794},{"len":2,"p":0.392676},{"len":3,"p":0.282918},{"len":4,"p":0.220844},{"len":5,"p":0.181388},{"len":6,"p":0.153984},{"len":7,"p":0.133594},{"len":8,"p":0.117008},{"len":9,"p":0.10526},{"len":10,"p":0.0956},{"len":11,"p":0.086998},{"len":12,"p":0.080214},{"len":13,"p":0.073956},{"len":14,"p":0.068358},{"len":15,"p":0.064648},{"len":16,"p":0.060674},{"len":17,"p":0.05737},{"len":18,"p":0.053954},{"len":19,"p":0.051156},{"len":20,"p":0.048514},{"len":21,"p":0.046264},{"len":22,"p":0.04475},{"len":23,"p":0.042574},{"len":24,"p":0.041066},{"len":25,"p":0.038984},{"len":26,"p":0.037722},{"len":27,"p":0.036452},{"len":28,"p":0.035224},{"len":29,"p":0.03402},{"len":30,"p":0.032624},{"len":31,"p":0.031542},{"len":32,"p":0.030778},{"len":33,"p":0.029628},{"len":34,"p":0.028944},{"len":35,"p":0.028144},{"len":36,"p":0.02771},{"len":37,"p":0.026144},{"len":38,"p":0.02585},{"l |
| /* | |
| * 'Origami Programming' by Hugo Sereno Ferreira | |
| * | |
| * IEEE Talk @ FEUP (2018) | |
| * | |
| * Exercise sheet (http://goo.gl/Dd4p7b) | |
| * | |
| * Note: Make sure you have node.js, and then install the dependencies using: | |
| * | |
| * npm install -g lodash |
I hereby claim:
To claim this, I am signing this object:
| package eu.shiftforward.macroInterpreter | |
| import scala.annotation.tailrec | |
| import scala.reflect.runtime.universe._ | |
| import scala.collection._ | |
| sealed trait Expression[-ST, +A] | |
| abstract class Atom[-ST, A](implicit val ev: Liftable[A]) extends Expression[ST, A] { val value: A } |
| import javax.script.{Compilable, Invocable, ScriptEngineManager} | |
| import scala.beans.BeanProperty | |
| case class Pessoa(@BeanProperty var name: String, | |
| @BeanProperty var age: Double) | |
| trait CenasExtractor { | |
| def processRow(row: String, age: Double): Pessoa | |
| } |
| /** | |
| * Created by Hugo Sereno Ferreira on 15/06/14. | |
| */ | |
| import org.scalajs.dom | |
| import scala.collection._ | |
| sealed trait Opcode | |
| object Mov extends Opcode { override def toString = "MOV" } | |
| object Add extends Opcode { override def toString = "ADD" } |