I hereby claim:
- I am bwmcadams on github.
- I am rit (https://keybase.io/rit) on keybase.
- I have a public key whose fingerprint is 4419 19F1 1211 E233 F91E 03AA DD35 5DFB C6DD E69E
To claim this, I am signing this object:
package foo | |
import scodec.bits._ | |
import scodec._ | |
import scodec.codecs._ | |
case class Document(fields: Vector[(String, Field)]) | |
sealed trait Field | |
case class IntField(value: Int) extends Field |
package codes.bytes.macros_intro.macros | |
import scala.annotation.{ compileTimeOnly, StaticAnnotation } | |
import scala.language.postfixOps | |
import scala.reflect.macros.whitebox.Context | |
import scala.language.experimental.macros | |
object ADT { | |
def impl(c: Context)(annottees: c.Expr[Any]*): c.Expr[Any] = { |
!/usr/bin/env python | |
# | |
# Quick Script to Fix the Local Settings of Deckset Themes | |
# | |
# Deckset uses `xattr` metadata which isn't preserved | |
# by version control. | |
# | |
# Note that Vim will also overwrite your metadata unless you `set backupcopy=yes` | |
# | |
# Brendan McAdams <brendan@boldradius.com> |
public class TestStrings { | |
public static void main(String[] args) { | |
String foo = "Foo " + "bar"; | |
String omg = "OMG" + "WTF" + "BBQ"; | |
String test = foo + omg; | |
} | |
} |
insert.transact(xa).attemptSomeSqlState { | |
case INTEGRITY_CONSTRAINT_VIOLATION => | |
ERR_PartnerEntryExists | |
}.run |
I hereby claim:
To claim this, I am signing this object:
import org.scalatest.Suite | |
import scalaz._ | |
import Scalaz._ | |
import org.scalatest.matchers._ | |
/** | |
* Helper matchers for hacking with Scalaz. | |
*/ |
I'm interested in community input, as I'm finally finishing adding support to Casbah's Query DSL for MongoDB Aggregation.
The trick is to try to prevent accidental usage of the aggregation syntax for queries, and check statements as cleanly as possible.
There are a few ways to go about this, and some concerns with each. My current favorite looks a bit like this:
(scroll over to see the whole thing)
val agg = | $group { ("lastAuthor" $last "$author") ++ ("firstAuthor" $first "$author") ++ ("_id" -> "$foo") } $unwind "$tags" $sort ( "foo" -> 1, "bar" -> -1 ) $skip 5 $limit 10 $match { "score" $gt 50 $lte 90 }
CREATE EXTERNAL TABLE scores ( student int, name string, score int ) | |
ROW FORMAT SERDE "com.mongodb.hadoop.hive.BSONSerde" | |
STORED AS INPUTFORMAT "com.mongodb.hadoop.hive.input.BSONFileInputFormat" | |
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' | |
LOCATION "/Users/brendan/code/mongodb/mongo-hadoop/hive/test"; | |
LOAD DATA LOCAL INPATH "scores.bson" INTO TABLE scores; |
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? r | |
[info] Loading global plugins from /Users/brendan/.sbt/plugins | |
[info] Loading project definition from /Users/brendan/code/mongodb/mongo-hadoop/project | |
[info] Compiling 1 Scala source to /Users/brendan/code/mongodb/mongo-hadoop/project/target/scala-2.9.1/sbt-0.11.2/classes... | |
[error] Reference to undefined setting: | |
[error] | |
[error] {.}/*:hadoop-release from {.}/*:library-dependencies | |
[error] | |
[error] Use 'last' for the full log. | |
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? |