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
var $ = jQuery; | |
CmdUtils.CreateCommand({ | |
name:"macro", | |
author: { name: "Kurt Cagle", email: "kurt@oreilly.com"}, | |
contributors: ["Kurt Cagle"], | |
license: "Apache License, v.2", | |
homepage: "http://www.xforms.org/xrx/?q=ubiquity", | |
description: "Performs regular expression replacements of web page content.", | |
help: "The macro verb takes the URL of a dictionary file (which can be set up as a default using the defaultURL property) and uses it to replace each regex term with its corresponding replacement value in either a web page (if no content is selected) or within a given selection (if one has been).", |
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
var $ = jQuery; | |
CmdUtils.CreateCommand({ | |
name:"macro", | |
author: { name: "Kurt Cagle", email: "kurt@oreilly.com"}, | |
contributors: ["Kurt Cagle"], | |
license: "Apache License, v.2", | |
homepage: "http://www.xforms.org/xrx/?q=ubiquity", | |
description: "Performs regular expression replacements of web page content.", | |
help: "The macro verb takes the URL of a dictionary file (which can be set up as a default using the defaultURL property) and uses it to replace each regex term with its corresponding replacement value in either a web page (if no content is selected) or within a given selection (if one has been).", |
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
for $item in $items/foo/bar where $item return | |
<foo>{$item}</foo> |
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
select * where { | |
?s owl:sameAs ?subject. | |
?s ?p ?o | |
} order by ?p ?o limit 1000 |
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
var Annotations = { | |
set: function (fn,key,expr){ | |
if (fn.annotation == null){ | |
fn.annotation = {}; | |
} | |
fn.annotation[key]=expr; | |
return this; | |
}, | |
get: function(fn,key){ | |
if (fn.annotation != null){ |
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 person: <http://semantical.co/ns/person/> | |
@prefix class: <http://semantical.co/ns/class/> | |
@prefix rdf: <http://semantical.co/ns/person/> | |
person:JaneDoe | |
rdf:type class:Person. | |
Yea | |
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
declare module namespace cards = "http://semantical.co/ns/cards/"; | |
import module namespace stack = "http://semantical.co/ns/stack/" at "stack.xqy"; | |
declare function cards:new() as item() { | |
let $deck := | |
for $suit in ("♥","♣","♠","♦") | |
for $spot in ("A",(2 to 10),"J","Q","K") return | |
$spot || $suit | |
let $shuffled-deck := | |
for $item in $deck order by |
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
module namespace stack = "http://optum.com/ns/stack/"; | |
declare function stack:new($seq as item()*) as map:map { | |
map:new((map:entry("stack",$seq))) | |
}; | |
declare function stack:push($stack as map:map,$item as item()) { | |
map:put($stack,"stack",($item,map:get($stack,"stack"))) | |
}; |
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 person: <http: //semantic.co/ns/person></http:> | |
prefix personName: <http: //semantic.co/ns/personName></http:> | |
person:jane_doe | |
rdf:type class:Person; | |
rdfs:label "Jane Doe"^^xs:string; | |
. |
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
user:JaneDoe | |
rdf:type class:User; | |
rdfs:label "Jane Doe"; | |
. | |
book:BooksOfFae | |
rdf:type class:Book; | |
rdfs:label "Books of Fae"; | |
book:author author:KurtCagle; | |
. |
OlderNewer