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
postFile = function(file, data) { | |
if (typeof XMLHttpRequest == "undefined") | |
XMLHttpRequest = function () { | |
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } | |
catch (e) {} | |
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } | |
catch (e) {} | |
try { return new ActiveXObject("Microsoft.XMLHTTP"); } | |
catch (e) {} | |
//Microsoft.XMLHTTP points to Msxml2.XMLHTTP and is redundant |
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
<div xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | |
xmlns:gr="http://purl.org/goodrelations/v1#" | |
xmlns:foaf="http://xmlns.com/foaf/0.1/"> | |
<div typeof="gr:Offering" about="#offering"> | |
<div rev="gr:offers" resource="#company"></div> | |
<div property="gr:name" content="http://www.ebusiness-unibw.org/tools/grsnippetgen/" xml:lang="en"></div> |
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
#!/usr/bin/env python | |
import urllib | |
import httplib2 | |
cert_file = 'e.pem' | |
http = httplib2.Http(disable_ssl_certificate_validation=True) | |
http.add_certificate('', cert_file, domain='') |
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
To Compile mod_authn_webid / mod_authz_webid / mod_auth_everyone | |
1. Follow Instructions in README -- you may need to install some packages e.g. | |
sudo apt-get update | |
sudo apt-get install autoconf gcc pkg-config libssl-dev librdf-dev apache2-threaded-dev | |
2. Download files from http://dig.csail.mit.edu/2009/mod_authn_webid/ |
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 rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
<#1> | |
<http://www.w3.org/ns/auth/acl#accessTo> <https://test-rww.data.fm> ; | |
<http://www.w3.org/ns/auth/acl#agent> <http://melvincarvalho.com/#me> ; | |
<http://www.w3.org/ns/auth/acl#mode> <http://www.w3.org/ns/auth/acl#Read>, <http://www.w3.org/ns/auth/acl#Write> . | |
<#2> | |
<http://www.w3.org/ns/auth/acl#accessTo> <> ; | |
<http://www.w3.org/ns/auth/acl#agent> <http://melvincarvalho.com/#me> ; |
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
function deleteFile(file) { | |
var body = ''; | |
xhr = new XMLHttpRequest(); | |
xhr.open('DELETE', file, false); | |
xhr.setRequestHeader('Content-Type', 'text/turtle; charset=UTF-8'); | |
xhr.send(body); | |
} | |
function putFile(file, data) { | |
xhr = new XMLHttpRequest(); |
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
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
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
tabulator.panes.register( { | |
icon: tabulator.Icon.src.icon_mbpost,//This icon should be defined in icons.js | |
label: function(subject) { //'subject' is the source of the document | |
if (true) { | |
return "MicroblogPost"; //The icon text | |
} else { | |
return null; | |
} | |
}, |
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
tabulator.panes.register( { | |
icon: tabulator.Icon.src.icon_mbPost,//This icon should be defined in icons.js | |
label: function(subject) { //'subject' is the source of the document | |
var SIOCt = tabulator.rdf.Namespace('http://rdfs.org/sioc/types#'); | |
if (tabulator.kb.whether(subject, tabulator.ns.rdf('type'), SIOCt('MicroblogPost'))) { | |
return "MicroblogPost"; //The icon text | |
} else { | |
return null; | |
} |
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
for (i=0,s=''; i<$('.s0').length; i++) s+=('<#p_' + i + '> a <http://xmlns.com/foaf/0.1/Person> ; <http://xmlns.com/foaf/0.1/name> "' + $('.s0')[i].textContent + '" . <#l_'+ i +'> a <https://payswarm.com/vocabs/commerce#Transfer> ; <https://payswarm.com/vocabs/commerce#destination> <#p_'+ i +'> ; <https://payswarm.com/vocabs/commerce#amount> ' + $('.s1')[i].textContent + ' .\n' ); console.log(s); | |
putFile('FILE', s); |