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
This is the first file. |
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
[{ | |
"_id": "FD12E675-52BF-499C-B651-25D6B92BA8BE:1", | |
"globalId": "7C768D9E-DA0E-4413-98D0-5C730BAEB461", | |
"aggregateType": "contact", | |
"event": { | |
"type": "createContact", | |
"firstname": "Jens", | |
"lastname": "Rantil", | |
"telephone": "+46401234567", | |
}, |
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
{ | |
"_id": "_design/eventProjections", | |
"views": { | |
"map": "function(doc) { | |
if (doc.aggregateType=='contact' && | |
(doc.event.type=='ContactCreated' || | |
doc.event.type=='DescriptionChanged') && | |
doc.event.description) { | |
var colon = doc._id.indexOf(':'); | |
var version = parseInt(doc._id.substr(colon + 1)); |
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
public class Image { | |
public void getImage() { | |
return; | |
} | |
} |
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
$ brew install go --cross-compile-all | |
==> Downloading https://go.googlecode.com/files/go1.1.2.src.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/go-1.1.2.tar.gz | |
==> ./make.bash --no-clean | |
==> ./make.bash --no-clean | |
==> ./make.bash --no-clean | |
/private/tmp/go-q5rl/go/src/cmd/5l/../ld/lib.c:661:9: error: no case matching constant switch condition '53' [-Werror] | |
switch(thechar){ | |
^~~~~~~ | |
1 error generated. |
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
$ brew install go --cross-compile-common | |
==> Downloading https://go.googlecode.com/files/go1.1.2.src.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/go-1.1.2.tar.gz | |
==> ./make.bash --no-clean | |
==> ./make.bash --no-clean | |
==> ./make.bash --no-clean | |
/private/tmp/go-5MJo/go/src/cmd/5l/../ld/lib.c:661:9: error: no case matching constant switch condition '53' [-Werror] | |
switch(thechar){ | |
^~~~~~~ | |
1 error generated. |
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
def generate_job(param): | |
"""Generate a job the yields only rows identical to `param`.""" | |
class CsvInnerJoiner(Job): | |
def map(self, rows, params): | |
for row in rows: | |
if row == param: | |
yield row, "found" |
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
from django.utils.datastructures import SortedDict | |
dictionary = {} | |
# populating `dictionary`... | |
sortedDictionary = SortedDict() | |
for word in sorted(dictionary.iterkeys()): | |
sortedDictionary[word] = dictionary[word] | |
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
from fabric.api import * | |
from __future__ import print_function | |
@task | |
def supertask(): | |
execute(create_user) | |
execute(deploy) | |
@task |
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
/** | |
* A first name. | |
* <p> | |
* In other programming languages, you would be able to write something like | |
* <code> | |
* typedef FirstName String; | |
* </code> | |
*/ | |
public class FirstName { | |
private String firstName; |