This is a test.
This file contains hidden or 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
;; -*- mode: dotspacemacs -*- | |
(defun dotspacemacs/layers () | |
(setq-default | |
dotspacemacs-configuration-layers `( | |
spacemacs | |
my-web-dev | |
(colors :variables | |
colors-enable-rainbow-identifiers t | |
colors-enable-nyan-cat-progress-bar t) |
This file contains hidden or 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
prefix geof: <http://www.opengis.net/def/function/geosparql/> | |
prefix geo: <http://www.opengis.net/ont/geosparql#> | |
//get locations within 2km of Complexible HQ | |
select ?name where { | |
?loc rdfs:label ?name . | |
?loc geo:hasGeometry ?feature . | |
?hq geo:hasGeometry ?hqGeo ; rdfs:label "Complexible Headquarters" . | |
?feature geof:nearby (?hqGeo 2 <http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Kilometer>). |
This file contains hidden or 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
:m1 a :Movie; :title "The Matrix"; :year "1999-03-31". | |
:m2 a :Movie; :title "The Matrix Reloaded"; :year "2003-05-07". | |
:m3 a :Movie; :title "The Matrix Revolutions"; :year "2003-10-27". | |
:neo a :Actor; :name "Keanu Reeves". | |
:morpheus a :Actor; :name "Larry F". | |
:trinity a :Actor; :name "CAM". | |
:neo :hasRole [:as "Neo"; :in :m1]. | |
:neo :hasRole [:as "Neo"; :in :m2]. |
I hereby claim:
- I am kendall on github.
- I am kendall (https://keybase.io/kendall) on keybase.
- I have a public key whose fingerprint is 2CE3 FDE8 E638 368F E9FF C269 15E8 E495 44C2 1C54
To claim this, I am signing this object:
This file contains hidden or 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
# graph for shortest path with reasoning | |
@prefix rule: <tag:stardog:api:rule:> . | |
@prefix : <urn:test:> . | |
@prefix g: <tag:stardog:api:property:graph:> . | |
# the graph | |
:one :to :two . | |
:one :to :four . | |
:two :to :four . | |
:two :to :five . |
This file contains hidden or 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
-> % java -cp dist/lib/stardog-cli.jar com.clarkparsia.stardog.cli.console.StardogConsole | |
INFO: Stardog Server running on local:stardog | |
> help | |
Stardog 0.7.4 command line client | |
Type 'help <cmd>' or '<cmd> -h/--help' to print the usage information for a specific command | |
Available commands: | |
add | |
connect |
This file contains hidden or 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
String sparql = "CONSTRUCT { ?a <urn:test:new> ?b } WHERE { ?a <urn:test:p> ?b }"; | |
List<Map<String,String>> results = snarlTemplate.construct(sparql, new GraphMapper<Map<String,String>>() { | |
@Override | |
public Map<String, String> mapRow(Statement next) { | |
Map<String,String> map = new HashMap<String,String>(); | |
map.put(next.getSubject().stringValue(), next.getObject().stringValue()); | |
return map; | |
} | |
}); |
This file contains hidden or 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
String sparql = "SELECT ?a ?b WHERE { ?a <urn:test:b> ?b } LIMIT 5"; | |
List<Map<String,String>> results = snarlTemplate.query(sparql, new RowMapper<Map<String,String>>() { | |
@Override | |
public Map<String,String> mapRow(BindingSet bindingSet) { | |
Map<String,String> map = new HashMap<String,String>(); | |
map.put("a", bindingSet.getValue("a").stringValue()); | |
map.put("b", bindingSet.getValue("b").stringValue()); | |
return map; | |
} |
This file contains hidden or 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
<bean name="dataSource" class="com.clarkparsia.stardog.ext.spring.DataSourceFactoryBean"> | |
<property name="to" value="testdb"/> | |
<property name="createIfNotPresent" value="true"/> | |
</bean> | |
<bean name="template" class="com.clarkparsia.stardog.ext.spring.SnarlTemplate"> | |
<property name="dataSource" ref="dataSource"/> | |
</bean> | |
<bean name="importer" class="com.clarkparsia.stardog.ext.spring.DataImporter"> |
NewerOlder