I hereby claim:
- I am raboof on github.
- I am raboof (https://keybase.io/raboof) on keybase.
- I have a public key whose fingerprint is B354 2F13 5550 0168 DD4F F2FA 1431 BC1D 5327 EB56
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def addItem(newItem: BasketItem): BasketState = { | |
copy( | |
items.foldRight((false, List.empty[BasketItem])) { | |
case (item, (_, out)) if (item.matchesProductAndSizeOf(newItem)) ⇒ (true, item.incrementNumberBy(newItem.numberOfProducts) :: out) | |
case (item, (didSomethingMatch, out)) ⇒ (didSomethingMatch, item :: out) | |
} match { | |
case (false, _) ⇒ newItem :: items | |
case (true, modifiedItems) ⇒ modifiedItems | |
} | |
) |
import akka.actor.ActorPath | |
trait AtLeastOnceTransmission[A] extends akka.persistence.AtLeastOnceDelivery { | |
private var unconfirmed = Map[A, Set[Long]]() | |
def transmit(destination: ActorPath, transmissionId: A, message: Any): Unit = { | |
deliver(destination, { deliveryId ⇒ | |
unconfirmed = add(unconfirmed, transmissionId, deliveryId) | |
message | |
}) |
implicit class PimpMyMap[A,B](map: Map[A,B]) { | |
def mapValue(a: A, f: B =>B) = map.map { | |
case (`a`, b) => (a, f(b)) | |
case other => other | |
} | |
} |
type ListMultiMap[A, B] = Map[A, List[B]] | |
implicit class ListMultiMapOps[A, B](val map: ListMultiMap[A, B]) extends AnyVal { | |
/** May be overridden */ | |
def makeList: List[B] = Nil | |
def addBinding(key: A, value: B): ListMultiMap[A, B] = map + (key -> { value :: map.getOrElse(key, makeList) }) | |
def removeBinding(key: A, value: B): ListMultiMap[A, B] = map.get(key) match { | |
case None => map |
html { | |
font-size: 22px | |
} | |
linter-message { | |
font-size: 22px | |
} | |
@media (min-width: 1920px) { | |
[theme-one-dark-ui-layoutmode="auto"] { font-size: @font-size + 10px; } | |
} |
Verifying that +raboof is my blockchain ID. https://onename.com/raboof |
diff -r d3b0a91b15b3 make/mapfiles/libjava/mapfile-vers | |
--- a/make/mapfiles/libjava/mapfile-vers Tue Oct 06 12:54:22 2015 +0300 | |
+++ b/make/mapfiles/libjava/mapfile-vers Fri Oct 09 22:15:40 2015 +0200 | |
@@ -56,6 +56,7 @@ | |
JNU_ThrowArrayIndexOutOfBoundsException; | |
JNU_ThrowByName; | |
JNU_ThrowByNameWithLastError; | |
+ JNU_ThrowByNameWithLastErrorAndMsg; | |
JNU_ThrowClassNotFoundException; | |
JNU_ThrowIllegalAccessError; |
/* | |
* Usage: | |
* - open https://updates.xebia.com/smoelenboek/ | |
* - paste this file into chrome developer tools js console | |
* - look at the picture in the top-left corner and choose from the names in the js console | |
*/ | |
images = jQuery('dt.portrait img') | |
answer = [ , , , ] |