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
| # How to select *everything* in a triplestore containing several different named graphs | |
| SELECT * { { ?s ?p ?o . } UNION { GRAPH ?g { ?s ?p ?o } } } |
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
| <?xml version="1.0"?> | |
| <!DOCTYPE rdf:RDF [ | |
| <!ENTITY owl "http://www.w3.org/2002/07/owl#" > | |
| <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > | |
| <!ENTITY schedule "http://events.ccc.de/schedule.owl#" > | |
| <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > | |
| <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > | |
| <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > |
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
| ; ModuleID = 'command' | |
| target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" | |
| target triple = "x86_64-linux-gnu" | |
| %0 = type { i32, void ()* } | |
| %struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo } | |
| %struct.__type_info_pseudo = type { i8*, i8* } | |
| %struct.__va_list_tag = type { i32, i32, i8*, i8* } | |
| %struct.cline = type { i8*, i32, i32 } | |
| %"struct.hashset<hashtableentry<const char*, ident> >" = type { i32, i32, %"struct.hashset<hashtableentry<const char*, ident> >::chain"**, %"struct.hashset<hashtableentry<const char*, ident> >::chainchunk"*, %"struct.hashset<hashtableentry<const char*, ident> >::chain"* } |
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
| #include <stdio.h> | |
| int main(int argc, char **argv) { | |
| FILE *fp; | |
| char mc ; | |
| fp = fopen(argv[1],"r") ; | |
| printf("Reading contents of file\n"); | |
| while((mc = (char) fgetc (fp)) != EOF) { |
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
| ## An attempt to query the data here: http://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients | |
| ## via http://dbpedia.org/spraql to determine which IRC clients for Windows are GPL licensed | |
| prefix dbo: <http://dbpedia.org/ontology/> | |
| prefix dbpprop: <http://dbpedia.org/property/> | |
| prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
| prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
| prefix yago: <http://dbpedia.org/class/yago/> | |
| select distinct ?client ?label ?license ?os |
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
| <html> | |
| <body> | |
| <form action="prime_birthday.php" method="post"> | |
| Day: <input type="text" name="day" /> | |
| Month: <input type="text" name="mon" /> | |
| Year: <input type="text" name="year" /> | |
| <input type="submit" /> | |
| </form> |
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
| python -m SimpleHTTPServer |
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
| curl -H "Accept: application/sparql-results+xml" "http://localhost:8000/sparql/" --data-urlencode "query=SELECT ?s ?p ?o { ?s ?p ?o . }" |
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
| """Use content negotiation with a certain DOI to obtain linked data about that resource. | |
| See also: | |
| http://myemail.constantcontact.com/CrossRef-and-International-DOI-Foundation-Collaborate-on-Linked-Data-Friendly-DOIs.html?soid=1102390657767&aid=eTYx65PAErU | |
| http://www.crossref.org/CrossTech/2011/04/content_negotiation_for_crossr.html | |
| """ | |
| import urllib | |
| exampleDOI = 'http://dx.doi.org/10.1126/science.1157784' |
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
| """ | |
| An implementation of binary search, based on the challanges in the following blog posts: | |
| http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html | |
| http://reprog.wordpress.com/2010/04/19/are-you-one-of-the-10-percent/ | |
| http://www.solipsys.co.uk/new/BinarySearchReconsidered.html?tw | |
| This was not my first attempt however, there was a broken version (of course) | |
| that I wrote prior to running it for the first time. Sadly I didn't take a | |
| snapshot before I fixed it but the bug was fairly major; although I'd worked |