AsksForApp results
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 N3 = require('n3'), | |
fs = require('fs'); | |
const stream = fs.createReadStream('file.ttl'); | |
var first = true; | |
console.log('{'); | |
const triples = new N3.Parser().parse(stream, (error, triple) => { | |
if (triple) { | |
if (first) |
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
<div vocab="http://schema.org" typeof="BlogPosting" resource="https://ruben.verborgh.org/blog/2016/06/22/querying-history-with-linked-data/"> | |
<!-- Try adding and removing the line below: --> | |
<meta property="publisher" resource="https://ruben.verborgh.org/profile/#me"> | |
<p resource="https://ruben.verborgh.org/profile/#me" typeof="Person"> | |
<span property="name">Ruben Verborgh</span> |
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
Index: src/reader.c | |
=================================================================== | |
--- src/reader.c (revision 505) | |
+++ src/reader.c (working copy) | |
@@ -760,14 +760,24 @@ | |
return r_err(reader, SERD_ERR_BAD_SYNTAX, "unexpected `%c'\n", c); | |
} | |
Ref ref = push_node(reader, SERD_LITERAL, "", 0); | |
- push_byte(reader, ref, eat_byte_safe(reader, c)); | |
- while ((c = peek_byte(reader)) && in_range(c, 'a', 'z')) { |
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
immediate = require('./lib/index'); | |
var i = 2e7; | |
immediate(function next(i) { | |
if (i > 0) | |
immediate(next, i - 1); | |
}, i); |
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
var i = 2e5, start = new Date(); | |
void setImmediate(function next(i) { | |
if (i > 0) | |
setImmediate(next, i - 1); | |
else | |
console.log((new Date() - start) / 1000); | |
}, i); |
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
diff --git 1/v1.0.6.css 2/v2.0.6.css | |
index a813751..bd0c9ab 100644 | |
--- 1/v1.0.6.css | |
+++ 2/v2.0.6.css | |
@@ -1,27 +1,42 @@ | |
+/** | |
+ * Ribbon theme for Shower HTML presentation engine | |
+ * shower-ribbon v2.0.6, https://github.com/shower/ribbon | |
+ * @copyright 2010–2016 Vadim Makeev, http://pepelsbey.net/ | |
+ * @license MIT |
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
#!/bin/bash | |
$1 $2 || echo -e "$2\terror" |
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
var AsyncIterator = require('asynciterator'), | |
TransformIterator = AsyncIterator.TransformIterator; | |
function EratosthenesIterator(base) { | |
TransformIterator.call(this); | |
base = base || AsyncIterator.range(2); | |
base.once('data', prime => { | |
this._push(prime); | |
this.source = new EratosthenesIterator(base.filter(n => n % prime)); | |
}); |
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 http = require('http'); | |
const baseUrl = 'http://en.wikipedia.org/wiki/', max = 100; | |
var index = 1; | |
(function fetchNext() { | |
if (index < max) { | |
var url = baseUrl + index++; | |
console.log(`fetching ${url}`); | |
request = http.request(url); |