I hereby claim:
- I am vbauerster on github.
- I am vbauerster (https://keybase.io/vbauerster) on keybase.
- I have a public key ASB3b2WsmEzM0zEf5anFdzxVWDr9H54XJK0hOntQZP7v_go
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
var wg sync.WaitGroup | |
done := make(chan struct{}) |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
inch := make(chan int) | |
outch := make(chan int) |
package main | |
import "fmt" | |
type person struct { | |
Name string | |
Age int | |
} | |
func main() { |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { | |
responses := make(chan string, 3) |
I hereby claim:
To claim this, I am signing this object:
(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.
/** | |
* | |
* Print From 45 to 4578 Without Repeating Digits | |
* | |
* Write a method that prints all the numbers from 45 to 4578 to the console, | |
* with the constraint that you cannot print any number with repeating digits. | |
* This means the following numbers would be skipped: 11, 22, ...., 122, 110,.... | |
* | |
* Created by vbauer on 19/04/14. | |
*/ |
public int nextInt(int n) { | |
if (n <= 0) | |
throw new IllegalArgumentException("n must be positive"); | |
if ((n & -n) == n) // i.e., n is a power of 2 | |
return (int)((n * (long)next(31)) >> 31); | |
int bits, val; | |
do { | |
bits = next(31); |
var bsearch = function(arr, k){ | |
var l = 0, r = arr.length-1, m; | |
console.log(arr); | |
while(l<r){ | |
m = (l+r)/2^0; | |
console.log(m); | |
if(k>arr[m]) |