I hereby claim:
- I am bradclawsie on github.
- I am b7j0c (https://keybase.io/b7j0c) on keybase.
- I have a public key whose fingerprint is B1C1 F146 2CE7 6E5F 2D99 4FB3 D817 E42D CCB5 AB08
To claim this, I am signing this object:
package org.b7j0c.puzzles; | |
import java.util.EnumMap; | |
import java.util.Map; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.ArrayList; | |
// the Hex class represents an id with six neighbors. the orientation of the neighbors is irrelevant | |
// but it is useful to describe them with compass directions as such: |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
c := make(chan struct{},1) | |
go func() { |
#!/usr/bin/env perl | |
use Net::IMAP::Simple::SSL; | |
$| = 1; | |
my $server = 'imap.gmail.com'; | |
my $user = 'YOU@gmail.com'; | |
my $pass = 'PASSWORD'; | |
my $imap = Net::IMAP::Simple::SSL->new($server); | |
$imap->login($user => $pass) || die "cannot connect"; | |
my $messages = $imap->select('Inbox'); | |
my $count = 0; |
package main | |
import ( | |
"errors" | |
"log" | |
) | |
func final() { | |
log.Printf("cleaning up") | |
if c := recover(); c != nil { |
package main | |
import ( | |
"log" | |
"net" | |
"net/http" | |
"github.com/bradclawsie/httpdshutdown" | |
"os" | |
"os/signal" | |
"time" | |
) |
// g++ -g -Wall -Werror -Wextra -pedantic -pedantic-errors -std=c++11 -g -O2 -c wordchain.cpp | |
// g++ -o wordchain wordchain.o | |
// example: wordchain cause north | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <algorithm> | |
#include <climits> | |
#include <memory> |
package org.b7j0c.puzzles; | |
// http://programmingpraxis.com/2013/11/15/twitter-puddle/ | |
public final class Puddles { | |
public static void main(String[] args) { | |
int[] c = {2,5,1,2,3,4,7,7,6,1,1,9,8,8,9,1,1}; | |
int cl = c.length; | |
int w = -1; | |
int sub = 0; |
{ "MandatoryString":"somestring", "OptionalUInt64":1, "OptionalString":"anotherstring" } | |
{ "MandatoryString":"somestring", "OptionalUInt64":1, "OptionalString":null } | |
{ "MandatoryString":"somestring", "OptionalUInt64":null, "OptionalString":"anotherstring" } | |
{ "MandatoryString":"somestring", "OptionalUInt64":null, "OptionalString":null } | |
{ "MandatoryString":"somestring", "OptionalUInt64":1 } |
type Foo struct { | |
MandatoryString string | |
OptionalUInt64 NullableUInt64 | |
OptionalString NullableString | |
} |