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
<?php | |
$URL = 'http://dbpedia.org/resource/London.rdf'; | |
$DATA = file_get_contents('london.rdf'); | |
$FORMAT = "rdfxml"; | |
if (!extension_loaded('redland')) { | |
throw new Exception("redland extension is not loaded"); | |
} |
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
<?php | |
$URL = 'http://dbpedia.org/resource/London.rdf'; | |
$DATA = file_get_contents('london.rdf'); | |
$FORMAT = "rdfxml"; | |
$start = microtime(true); | |
// Open a pipe to the rapper command |
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
def extract_pronunciation(string) | |
result = string.dup | |
regexes = { | |
%r[\(IPA: ["\[/].*?["\]/]\) ] => '', | |
%r[\(pronounced ["\[/].*?["\]/]\) ] => '', | |
# for when pronounciation is mixed in with birthdate, e.g. (pronounced /bəˈɹɛlɪs/; born December 7, 1979) | |
%r[pronounced ["\[/].*?["\]/]\; ] => '', | |
} | |
for regex in regexes.keys | |
if result =~ regex |
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 -Naur twolame/libtwolame/common.h twolame-patched/libtwolame/common.h | |
--- twolame/libtwolame/common.h Thu Jul 26 12:10:05 2007 | |
+++ twolame-patched/libtwolame/common.h Wed Jul 25 15:08:05 2007 | |
@@ -79,7 +79,8 @@ | |
#define HAN_SIZE 512 | |
#define SCALE_BLOCK 12 | |
#define SCALE_RANGE 64 | |
-#define SCALE 32768 | |
+#define SCALE 1 | |
+#define DOWN_SCALE (1.0 / 32768.0) |
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 a/src/rdf_serializer_raptor.c b/src/rdf_serializer_raptor.c | |
index 849e378..f41e4e8 100644 | |
--- a/src/rdf_serializer_raptor.c | |
+++ b/src/rdf_serializer_raptor.c | |
@@ -169,7 +169,8 @@ librdf_serializer_raptor_set_namespace(void* context, | |
static int | |
librdf_serializer_raptor_serialize_statement(raptor_serializer *rserializer, | |
- librdf_statement* statement) | |
+ librdf_statement* statement, |
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 a/src/rasqal.h.in b/src/rasqal.h.in | |
index 52657ad..8df1027 100644 | |
--- a/src/rasqal.h.in | |
+++ b/src/rasqal.h.in | |
@@ -1041,7 +1041,11 @@ rasqal_feature rasqal_feature_from_uri(rasqal_world* world, raptor_uri *uri); | |
RASQAL_API | |
int rasqal_feature_value_type(const rasqal_feature feature); | |
+ |
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
; SVR records for Jabber | |
jabber CNAME hadrian.aelius.com. | |
_jabber._tcp SRV 5 0 5269 jabber.aelius.com. | |
_xmpp-server._tcp SRV 5 0 5269 jabber.aelius.com. | |
_xmpp-client._tcp SRV 5 0 5222 jabber.aelius.com. | |
; Other SRV records | |
_http._tcp SRV 0 100 80 www.aelius.com. |
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
// gcc -o float_test float_test.c && ./float_test | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
float f = 0.9; | |
int i = f * 10.0; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:owl = "http://www.w3.org/2002/07/owl#" | |
xmlns:foaf = "http://xmlns.com/foaf/0.1/" | |
xmlns:sioc = "http://rdfs.org/sioc/ns#" | |
xmlns:po = "http://purl.org/ontology/po/" | |
xmlns:pod = "http://purl.org/ontology/pod/" | |
xmlns:mo = "http://purl.org/ontology/mo/" | |
xmlns:skos = "http://www.w3.org/2008/05/skos#" |
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
{ "programme" : { "display_titles" : { "subtitle" : "Series 5, Wales Main", | |
"title" : "Great British Menu" | |
}, | |
"duration" : 1800, | |
"formats" : [ { "id" : "PT008", | |
"inScheme" : "formats", | |
"key" : "gamesandquizzes", | |
"label" : "Games & Quizzes", | |
"prefLabel" : "Games & Quizzes", | |
"title" : "Games & Quizzes", |