I hereby claim:
- I am gresrun on github.
- I am gresrun (https://keybase.io/gresrun) on keybase.
- I have a public key whose fingerprint is 585E 9622 1E3D B929 8F20 2187 44E3 BD67 7E77 92A8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package net.greghaines.jesque.perftest; | |
import static net.greghaines.jesque.utils.JesqueUtils.entry; | |
import static net.greghaines.jesque.utils.JesqueUtils.map; | |
import static net.greghaines.jesque.worker.WorkerEvent.JOB_SUCCESS; | |
import static net.greghaines.jesque.worker.WorkerEvent.WORKER_START; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.Callable; |
public class GoNumSquares { | |
private static final int BOARD_SIZE = 19; | |
public static void main(final String... args) { | |
int squareSum = 0; | |
for (int i = BOARD_SIZE; i > 0; i--) { | |
final int dim = (BOARD_SIZE - i) + 1; | |
squareSum += (dim * dim); | |
} |
public class ASCIIDiamond { | |
public static void main(final String... args) { | |
printDiamond(Integer.parseInt(args[0])); | |
} | |
public static void printDiamond(final int size) { | |
if (size % 2 == 0) { | |
throw new IllegalArgumentException("Size must be an odd number"); | |
} | |
final int halfSize = (size / 2); |
package net.greghaines.jesque; | |
import static net.greghaines.jesque.utils.JesqueUtils.entry; | |
import static net.greghaines.jesque.utils.JesqueUtils.map; | |
import java.util.Arrays; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import net.greghaines.jesque.worker.Worker; | |
import net.greghaines.jesque.worker.WorkerEvent; |
import java.util.Arrays; | |
import java.util.BitSet; | |
import redis.clients.jedis.Jedis; | |
public class SieveOfEratosthenes { | |
/** | |
* @param args | |
*/ |
function isPrime(n) { | |
if (n<2) return false; | |
if (n==2) return true; | |
for (var i=2; i<(n/2); i++) { if (n%i==0) return false; } | |
return true; | |
} |
$ brew update | |
Already up-to-date. | |
$ brew doctor | |
We couldn't detect gcc 4.2.x. Some formulae require this compiler. | |
NOTE: Versions of XCode newer than 4.2 don't include gcc 4.2.x. | |
/Library/Frameworks/Mono.framework detected | |
This can be picked up by Cmake's build system and likely cause the | |
build to fail, finding improper header files for libpng for instance. |
greg@macgreg:~ $ brew missing | |
greg@macgreg:~ $ brew doctor | |
Your OS X is ripe for brewing. | |
Any troubles you may be experiencing are likely purely psychosomatic. | |
greg@macgreg:~ $ brew install -v gtk+ | |
==> Downloading http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.4.tar.bz2 | |
File already downloaded and cached to /Users/greg/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/greg/Library/Caches/Homebrew/gtk+-2.24.4.tar.bz2 | |
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.4 --disable-glibtest | |
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk+/2.24.4 --disable-glibtest |
greg@macgreg:~ $ brew info gnutls | |
gnutls 2.10.4 | |
http://www.gnu.org/software/gnutls/gnutls.html | |
Depends on: pkg-config, libgcrypt, libtasn1 | |
/usr/local/Cellar/gnutls/2.10.2 (617 files, 7.1M) | |
http://github.com/mxcl/homebrew/commits/master/Library/Formula/gnutls.rb | |
greg@macgreg:~ $ brew install -v gnutls | |
==> Build Environment | |
CC: /usr/bin/cc => /usr/bin/gcc-4.2 | |
CXX: /usr/bin/c++ => /usr/bin/c++-4.2 |