Skip to content

Instantly share code, notes, and snippets.

View laurentvaills's full-sized avatar

Laurent Vaills laurentvaills

View GitHub Profile
@laurentvaills
laurentvaills / forcomptran.md
Created November 9, 2012 11:04 — forked from loicdescotte/Forcomptran.md
Scala for comprehension translation helper

#Scala for comprehension translation helper

##Example 1

    for {
         i <- 1 until n
         j <- 1 until i
         if isPrime(i + j)
 } yield (i, j)

Keybase proof

I hereby claim:

  • I am laurentvaills on github.
  • I am laurentvaills (https://keybase.io/laurentvaills) on keybase.
  • I have a public key whose fingerprint is DE27 057A 3D07 8864 D439 5024 4F10 D631 C203 F53D

To claim this, I am signing this object:

@laurentvaills
laurentvaills / BucketMain.java
Created June 12, 2015 14:18
Ensure throttling works as expected
package org.forgerock.openig.filter;
import static org.forgerock.util.time.Duration.duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;