Skip to content

Instantly share code, notes, and snippets.

View cfoster's full-sized avatar

Charles Foster cfoster

  • Warwick, United Kingdom
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cfoster on github.
  • I am crf (https://keybase.io/crf) on keybase.
  • I have a public key whose fingerprint is EF63 14C0 129E C1B0 AE22 028B 6CC3 57CD 3BF7 6287

To claim this, I am signing this object:

<rdf:RDF
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:swc="http://data.semanticweb.org/ns/swc/ontology#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:ical="http://www.w3.org/2002/12/cal/ical#"
xmlns:swrc="http://swrc.ontoware.org/ontology#"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:xlswc="http://xmllondon.com/ns/swc/ontology#"
@cfoster
cfoster / sedna.sh
Last active August 29, 2015 14:07
Sedna XML Database - Linux Service CentOS / Fedora / RedHat
#!/bin/bash
############################################################
# Sedna Database Service
# Copyright (c) 2008-2014 Charles Foster
# http://www.cfoster.net/
#
# Start, stop, restart or query the status
# of the Sedna XML Database.
#
@cfoster
cfoster / jmeter.sh
Created October 10, 2014 15:52
JMeter init.d Service script for Amazon AWS
#!/bin/sh
#
# Startup script for the Apache JMeter server
#
# chkconfig: - 85 15
# description: Apache JMeter server
# processname: tomcat
# pidfile: /var/run/$JMETER.pid
# config:
#set -x
@cfoster
cfoster / filter.xqy
Created September 8, 2014 10:45
Potential Filter Pattern for RXQ
xquery version "1.0-ml";
import module namespace functx = "http://www.functx.com" at
"/MarkLogic/functx/functx-1.0-nodoc-2007-01.xqy";
declare option xdmp:mapping "false";
declare variable $filters-sequence as function(*)* :=
fn:function-lookup(xs:QName("local:upper-case"), 1),
fn:function-lookup(xs:QName("local:reverse"), 1),
@cfoster
cfoster / XQueryExample.java
Created December 4, 2013 18:38
Using BaseX Local/Embedded via XQJ 1.3.0-SNAPSHOT.
import net.xqj.basex.local.BaseXXQDataSource;
import javax.xml.xquery.*;
public class XQueryExample
{
public static void main(String[] args) throws XQException
{
XQDataSource xqds = new BaseXXQDataSource();
XQConnection conn = xqds.getConnection();
import org.basex.core.Context;
import org.basex.io.out.ArrayOutput;
import org.basex.io.serial.Serializer;
import org.basex.query.QueryProcessor;
import org.basex.query.iter.Iter;
import org.basex.query.value.item.Item;
public class PTest
{
public static Context ctx = new Context(); // mainContext