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 ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"unsafe" | |
"github.com/creachadair/misctools/sizeof" |
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
{ | |
spielberg as var(func: allofterms(name@en, "steven spielberg")) { | |
uid | |
} | |
cameos(func: uid(spielberg)) @cascade @normalize { | |
director : name@en | |
director.film { | |
film : name@en | |
starring { | |
performance.actor @filter(uid(spielberg)) { |
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 ( | |
"context" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"log" | |
"strings" |
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 ( | |
"log" | |
"math/rand" | |
"sync" | |
"time" | |
"github.com/dgraph-io/badger/v2" | |
) |
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 ( | |
"flag" | |
"image" | |
"image/color" | |
"image/png" | |
"log" | |
"os" | |
) |
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 ( | |
"flag" | |
"image" | |
"image/color" | |
"image/png" | |
"log" | |
"os" | |
) |
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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", handler) | |
log.Fatal(http.ListenAndServe(":8080", 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
function sum(row, emit) { | |
const memory = new WebAssembly.Memory({ initial: 256, maximum: 256 }); | |
const env = { | |
'abortStackOverflow': _ => { throw new Error('overflow'); }, | |
'table': new WebAssembly.Table({ initial: 0, maximum: 0, element: 'anyfunc' }), | |
'tableBase': 0, | |
'memory': memory, | |
'memoryBase': 1024, | |
'STACKTOP': 0, | |
'STACK_MAX': memory.buffer.byteLength, |
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
const memory = new WebAssembly.Memory({ initial: 256, maximum: 256 }); | |
const env = { | |
'abortStackOverflow': _ => { throw new Error('overflow'); }, | |
'table': new WebAssembly.Table({ initial: 0, maximum: 0, element: 'anyfunc' }), | |
'tableBase': 0, | |
'memory': memory, | |
'memoryBase': 1024, | |
'STACKTOP': 0, | |
'STACK_MAX': memory.buffer.byteLength, | |
}; |
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" | |
"strings" | |
) |
NewerOlder