Usage:
###
fetcher = new Fetcher()
fetcher.fetch 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', null, (error, graph) ->
console.log error if error
console.log graph.toString() if graph
###
RDF resource Fetcher class:
{ | |
"groups": [ | |
{ | |
"rows": 3, | |
"cols": 8, | |
"position": [ 0, 0 ], | |
"dimensions": [ 28, 28 ], | |
"spacing": [ 30, 30 ], | |
"controls": [ | |
13, 14, 15, 16, 17, 18, 19, 20, |
{ | |
"groups": [ | |
{ | |
"rows": 8, | |
"cols": 8, | |
"position": [ 30, 30 ], | |
"dimensions": [ 28, 28 ], | |
"spacing": [ 30, 30 ], | |
"controls": [ 81, 82, 83, 84, 85, 86, 87, 88, | |
71, 72, 73, 74, 75, 76, 77, 78, |
{ | |
"groups": [ | |
{ | |
"rows": 8, | |
"cols": 8, | |
"position": [ 35, 35 ], | |
"dimensions": [ 28, 28 ], | |
"spacing": [ 30, 30 ], | |
"controls": [ 81, 82, 83, 84, 85, 86, 87, 88, | |
71, 72, 73, 74, 75, 76, 77, 78, |
function _enum(obj) { return Object.freeze(obj); } | |
class bdds extends bdds_base { | |
static apply(b, root, r, op) { | |
const get = id => op.op(b, b.getnode(id)); // fn evaluates the operator | |
const parents = []; // path from root to the current node | |
let n = get(root); // current node | |
let nn = 0; // new node (id) | |
let hi = 0; // last high leaf | |
let lo = 0; // last low leaf | |
const s = _enum({ "LO": 1, "HI": 2, "OP": 3 }); // traversing states |
%%% list all fact Predicates having an Argument as any argument. | |
argument_predicates(Argument, Predicates) :- | |
findall(Predicate, ( | |
predicate_property(M:Clause, file(_)), % list all predicates | |
\+ M = system, % exclude 'system' Module, or you can constrain it to M = user | |
clause(Clause, true), % is Clause a fact?, ie. Body = true. | |
arg(_, Clause, Argument), % Clause has the Argument as an argument (change _ to 1 if Argument has to be the first argument of a predicate). | |
current_predicate(Predicate, Clause), % extract Predicate from Clause (another way: functor(Clause,Predicate,_)) | |
\+ Predicate = ignore % exclude 'ignore' predicate since it succeeds for anything. |
#!/bin/bash | |
BITS=2048 | |
DIR=./out | |
if grep -q 'webid_generator' /etc/ssl/openssl.cnf; then | |
echo "WEBID_GEN: Found webid_generator configuration section in /etc/ssl/openssl.cnf" | |
else | |
echo "WEBID_GEN: Section webid_generator is missing in /etc/ssl/openssl.cnf. Add this configuration section manually: |
import re | |
import terminatorlib.plugin as plugin | |
import subprocess | |
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE' | |
AVAILABLE = ['EditorFileURLHandler'] | |
editor_cmd = "subl" | |
class EditorFileURLHandler(plugin.URLHandler): |
rdf = require('../..') | |
ORM = rdf.ORM | |
ORM.waitForLoad () -> | |
person = ORM.newResource('http://example.com/john#me', 'foaf', 'Person') | |
person.foaf.name = 'John Doe' | |
person.foaf.homepage = 'http://example.com/john/blog' | |
person.rdfs.label = 'john\'s label' | |
otherone = ORM.newResource('http://example.com/jane#me', 'foaf', 'Person') |
Usage:
###
fetcher = new Fetcher()
fetcher.fetch 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', null, (error, graph) ->
console.log error if error
console.log graph.toString() if graph
###
RDF resource Fetcher class:
@startuml | |
() "GAPI client" <<browser>> as GAPIClient | |
package "GAPI Web" { | |
() "Passenger" <<node module>> as Passenger | |
() "Template Engine" <<node module>> as TemplateEngine | |
[HTTP Server] as WebServer | |
[REST 2 SPARQL] <<node module>> as REST2SPARQL | |
[SPARQL-client] <<sparql-client node module>> as WebSPARQLClient |