Skip to content

Instantly share code, notes, and snippets.

View kasei's full-sized avatar

Gregory Todd Williams kasei

View GitHub Profile
@kasei
kasei / gist:458923
Created June 30, 2010 16:47
HTML::HTML5::Writer bug
#!/usr/bin/perl
use strict;
use warnings;
use HTML::HTML5::Writer;
use HTML::HTML5::Parser;
use RDF::Trine qw(iri statement literal);
my $html = <<'END';
<?xml version="1.0" encoding="utf-8"?>
Index: basic-update/manifest.ttl
===================================================================
RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/basic-update/manifest.ttl,v
retrieving revision 1.1
diff -u -r1.1 manifest.ttl
--- basic-update/manifest.ttl 16 Apr 2010 20:12:11 -0000 1.1
+++ basic-update/manifest.ttl 13 Jul 2010 14:29:37 -0000
@@ -40,9 +40,9 @@
] ;
@kasei
kasei / gist:1056234
Created June 30, 2011 13:28
dydra bad success
[tiu:git/perlrdf/RDF-Trine] [master]% curl -v -H "Content-Type: text/plain" -d '<http://example.com/a> <http://example.com/b> <http://example.com/cd>f .' http://[email protected]:80/kasei/test/statements
* About to connect() to dydra.com port 80 (#0)
* Trying 174.129.29.14... connected
* Connected to dydra.com (174.129.29.14) port 80 (#0)
* Server auth using Basic with user 'XXXXXXXXXXXXXXXXXXXX'
> POST /kasei/test/statements HTTP/1.1
> Authorization: Basic YYYYYYYYYYYYYYYYYYYYYYYYYYYY
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> Host: dydra.com
@kasei
kasei / sparql11-manifest
Created August 30, 2011 01:39
SPARQL 1.1 Test Suite Manifest
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@prefix qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> .
<> a mf:Manifest ;
rdfs:label "SPARQL 1.1 tests" ;
mf:include (
<aggregates/manifest.ttl>
@kasei
kasei / gist:1356681
Created November 10, 2011 23:59
Bad unicode in BTC N-Quads
_:httpx3Ax2Fx2Fapix2Ehi5x2Ecomx2Frestx2Fprofilex2Ffoafx2F504083723xxbnode229 <http://xmlns.com/foaf/0.1/nick> "\u0102\uD838\uDF06\u0941\u04EANONGJEE\u04EA\u0941\uD838\uDF06\u0102" <http://api.hi5.com/rest/profile/foaf/504083723> .
@kasei
kasei / 4s-triangle.rq
Created February 24, 2012 20:03
4store triangle query bug
# http://kasei.us/temp/4store-triangle-test.nt.bz2
SELECT * WHERE {
?p <http://xmlns.com/foaf/0.1/knows> ?q .
?q <http://xmlns.com/foaf/0.1/knows> ?r .
?r <http://xmlns.com/foaf/0.1/knows> ?p .
}
@kasei
kasei / gist:1988855
Created March 6, 2012 20:41
virtuoso optimizer bug
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dgtwc: <http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX conversion: <http://purl.org/twc/vocab/conversion/>
SELECT *
WHERE {
GRAPH <http://purl.org/twc/vocab/conversion/MetaDataset> {
?dataset a conversion:CatalogedDataset ;
@kasei
kasei / gist:2065879
Created March 17, 2012 22:29
sparql service description vocab
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
### Properties
sd:endpoint a rdf:Property , owl:InverseFunctionalProperty ;
rdfs:domain sd:Service ;
rdfs:label "endpoint" ;
@kasei
kasei / gist:2321580
Created April 6, 2012 17:40
Virtuoso xsd:dateTime formatting variation
Summary:
Query 1 yields '2012-03-26 21:14:07.851', a xsd:dateTime value that isn't in W3CDTF
(no 'T' and no timezone), while Query 2 (which takes the results from Query 1 as a subquery)
returns '2012-03-26T21:14:07.851-05:00', a valid W3CDTF with 'T' and a timezone '-05:00'.
Query 1:
PREFIX dcterms: <http://purl.org/dc/terms/>
@kasei
kasei / gist:2480335
Created April 24, 2012 15:01
SPARQL 1.1 test suite xsd canonical lexical form changes
Index: aggregates/agg-err-02.srx
===================================================================
RCS file: /w3ccvs/WWW/2009/sparql/docs/tests/data-sparql11/aggregates/agg-err-02.srx,v
retrieving revision 1.4
diff -r1.4 agg-err-02.srx
13c13
< <literal datatype="http://www.w3.org/2001/XMLSchema#double">2.5e0</literal>
---
> <literal datatype="http://www.w3.org/2001/XMLSchema#double">2.5E0</literal>
29c29