I hereby claim:
- I am derdackel on github.
- I am der_dackel (https://keybase.io/der_dackel) on keybase.
- I have a public key ASCfD1OTF4Xx-9FWNs_92eqBxeMnjzmPsgBENNktRkQf3wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Un' genau dann hatten unsere Leute den Esoterischen Orden des Dagon organisiert un' die Freimaurerhalle von der Golgota-Kommende dafür gekauft... |
import java.util.concurrent.atomic.AtomicBoolean; | |
public class ToggleBoolean { | |
public static void getAndToggle(AtomicBoolean a) { | |
for (;;) { | |
boolean current = a.get(); | |
if (a.compareAndSet(current, !current)) { | |
return current; | |
} |
//Scala: | |
//----------------------------------------------------------------- | |
val params = Map( | |
'foo -> "bar", | |
'baz -> "bang" | |
) | |
//pretty prints | |
println(params mkString " & ") // 'foo -> bar & 'baz -> bang |
// Since this link got passed around some, I'm going to paste here the | |
// versions made by sirthias. If you want to see the old ones, | |
// look up the history. | |
// Well, actually, these are non-pimped versions. See the comments to | |
// a link where they are provided as pimped methods on String. | |
import scala.annotation.tailrec | |
def fastSplit(s: String, delimiter: Char): List[String] = { |