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
package exclaim | |
import ( | |
"server" | |
) | |
func Handle(message string) string { | |
return message + "!" | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
struct S1 { | |
int64_t TradeId; | |
int64_t ClientId; | |
int VenueCode; | |
int InstrumentCode; | |
int64_t Price; |
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
AttendEvent = Context( | |
function(event, attendee) { | |
Event = event; | |
Attendee = attendee; | |
Attendee.attend(); | |
}, { | |
Attendee: { | |
attend: function(){ | |
this.attendedEvents.push(Event); | |
Event.trackAttendence(); |
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
func (w *Writer) WriteString(input string) (int, error) { | |
total := 0 | |
for len(input) > w.Available() && w.err == nil { | |
wrote := w.writeChunk(input) | |
total += wrote | |
input = input[wrote:] | |
w.flush() | |
} | |
if w.err != nil { |
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
// State Machine Library | |
function Machine(first, $){ | |
var cur = {}, next = $[first]; | |
var self = { | |
go: function(to){ next = next ? next : ($[to] || $.undefined); }, | |
trigger: function(event){ var t = cur.tx && cur.tx[event]; t && self.go(t); } | |
}; | |
return function(){ | |
if(next){ |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"sort" | |
"strings" | |
"time" |
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
package main | |
import ( | |
"fmt" | |
"gopkg.in/tomb.v2" | |
) | |
type Pipeline struct { | |
tomb.Tomb |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type errors []error | |
func (e errors) Error() string { |
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
package set | |
type Hash int64 | |
type Elem interface { | |
Hash() Hash | |
Equals(e Elem) bool | |
} | |
type Set struct { | |
buckets map[Hash][]Elem |
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 "Applicability Statement for Secure Health Transport" at 2.1 it says that | |
A Health Content Container (prior to signing and encrypting, as otherwise described in | |
this document) SHALL be an Internet Message Format document conforming to RFC 5322. | |
Now the Unwrapped message, as sent out by TTT, is not a proper IMF, it is missing the necessary headers. | |
The specification says that we must implement the following. (I'm using mathy notation because it will be easier to follow than words) | |
First we have an HCC: [2.1] |
OlderNewer