This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Erik Wrenholt | |
import java.util.*; | |
class Mandelbrot | |
{ | |
static int BAILOUT = 16; | |
static int MAX_ITERATIONS = 1000; | |
private static int iterate(float x, float y) | |
{ |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can test this online at: https://play.golang.org/p/hhayRT1VWgj | |
package main | |
import ( | |
"crypto/sha1" | |
"encoding/hex" | |
"fmt" | |
"io" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
/* Data can be send to coroutines using `$coroutine->send($data)`. The sent data will then | |
* be the result of the `yield` expression. Thus it can be received using a code like | |
* `$data = yield;`. | |
*/ | |
/* What we're building in this script is a coroutine-based streaming XML parser. The PHP |
* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |