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
// daiaAvailability.js | |
// ------------------- | |
// Version: 1.0 | |
// Author: Owen Stephens | |
// Last Edit: 15/03/2011 | |
// Displays availability from DAIA compliant information | |
/* | |
* Constructor arguments: |
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
use strict; | |
use warnings; | |
package TestPlackApp; | |
use Carp; | |
use parent 'Exporter'; | |
use Plack::Builder; | |
use HTTP::Request; | |
use Test::More; | |
use Plack::Test; |
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
use strict; | |
use warnings; | |
package Plack::App::LocalRedirect; | |
use parent 'Plack::Component'; | |
use Plack::Request; | |
use URI::Escape; | |
# use Plack::Util::Accessor qw(path); | |
sub call { |
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
/* | |
Truncated octahedron. | |
*/ | |
module truncocta() { | |
// octahedron based on code by Willliam A Adams | |
octapoints = [ | |
[+1, 0, 0], // + x axis | |
[-1, 0, 0], // - x axis | |
[0, +1, 0], // + y axis |
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 RDF::Trine::Exporter; | |
use strict; | |
use warnings; | |
sub serialize_iterator_to_file { | |
my ($self, $file, $iterator) = @_; | |
if ( $self->can('_iterator_to_file') ) { | |
$self->_iterator_to_file( $file, $iterator ); | |
} elsif ( $self->can('_model_to_file') ) { | |
my $model = RDF::Trine::Model->temporary_model; |
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
@prefix bibo: <http://purl.org/ontology/bibo/> . | |
@prefix daia: <http://purl.org/ontology/daia/> . | |
@prefix dbo: <http://dbpedia.org/ontology/> . | |
@prefix dcterms: <http://purl.org/dc/terms/> . | |
@prefix frbr: <http://purl.org/vocab/frbr/core#> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix sobr: <http://example.org/sobr/> . # NO URI NAMESPACE YET | |
# Emma Goldman's biography | |
<http://www.librarything.com/work/70394> |
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
#!/usr/bin/perl | |
use utf8; | |
use RDF::Dumper; | |
use RDF::Trine::Model; | |
use RDF::Trine::Serializer; | |
use RDF::Trine qw(iri); | |
my $m = RDF::Trine::Model->new; | |
my $p = RDF::Trine::Parser->new('turtle'); |
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
# Simple awk script to convert BEACON format to N-Triples | |
# First published at https://gist.github.com/gists/1438869 | |
# hereby put into public domain | |
BEGIN { | |
FS = "|" | |
link = "http://www.w3.org/2000/01/rdf-schema#seeAlso" | |
header = 1 | |
} | |
{ | |
if (header && $1 ~ /^(\xef\xbb\xbf)?[ \t]*#/) { # may contain UTF-8 BOM! |
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
-- Get highlighted parts | |
-- in /media/READER/Sony_Reader/database/books.db: | |
SELECT file_name, page, name FROM markups; |
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
An IP uniquely identifies a resource, so it should be usable as URI. Unfortunately there is no URI namespace for IP and/or IP ranges. | |
IP: | |
(((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5]))|((([\da-fA-F]{1,4})|(\:))\:){7}(([\da-fA-F]{1,4})|(\:)))) | |
CIDR IP range (see http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing): | |
(((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\/(\d|[1-2]\d|3[0-2]))|((([\da-fA-F]{0,4})|(\:))\:){7}(([\da-fA-F]{0,4})|(\:)))\/([1-9]?\d|1[01]\d|12[0-8]))) |