Skip to content

Instantly share code, notes, and snippets.

James Fuller xquery

Block or report user

Report or block xquery

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xquery
xquery / single-issue-presidency.txt
Last active Aug 5, 2019
'single issue' candidacy for President
View single-issue-presidency.txt
Once in office will work with congress to pass rational gun law (and nothing else).
Choose vice president running mate based on 2nd best polling.
Once gun laws have been passed or executive orders declared, retire.
@xquery
xquery / topo.xqy
Created Feb 8, 2019
example topo sort in xquery
View topo.xqy
declare function local:topo-sort($unsorted, $sorted ) {
if (empty($unsorted)) then $sorted
else
let $allnodes := $unsorted [ every $id in depends/@id satisfies $id = $sorted/@id]
return
if ($allnodes) then
local:topo-sort( $unsorted except $allnodes, ($sorted, $allnodes ))
else ()
};
View data-composition.xqy
xquery version "3.0";
(: the power of algebraic data types in xquery
This example shows how we can composite up data models
which 'carry' their own operations along with them.
:)
(: using John Snelson's inspirational https://github.com/jpcs/data.xq :)
View alt-svc.h
#ifndef HEADER_CURL_ALTSVC_H
#define HEADER_CURL_ALTSVC_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
View gist:9541ccd72091df1005aebf3d19d8dc95
#ifndef HEADER_CURL_ALTSVC_H
#define HEADER_CURL_ALTSVC_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
View gist:50dc6fb1c06193da69928d7b996480b8
#include <iostream>
#include <map>
using namespace std;
typedef multimap <string, tuple<int,int> > ptable;
int main() {
string orig = "a large span of text";
View gist:6e3b4e970bf597762b8d59abd3396403
#! /bin/bash
query=${1:-*}
echo ${query} >/dev/null
echo "query returned no results"
View gist:b6d11a04fbff33afb9293a6b20f4f00a
Herewith my experiences of building curl.
1) fork (curl)[https://github.com/curl/curl]
2) setup build env
```
./configure --disable-shared --enable-debug --enable-maintainer-mode
```
@xquery
xquery / build.gradle
Last active May 27, 2016
mlcp is a powerful tool for loading data into MarkLogic but many (including myself) consistently trip up on installing deps or getting classpaths right. Drop the following 2 files into a directory and then create a nested dir (lets call it /data) and put some docs in there and run 'gradle importData'.
View build.gradle
plugins {
id "com.marklogic.ml-gradle" version "2.2.0"
}
repositories {
jcenter()
maven { url "http://developer.marklogic.com/maven2/" }
maven { url "http://repository.cloudera.com/artifactory/cloudera-repos/" }
}
@xquery
xquery / test.gradle
Created Apr 13, 2015
Run xmlcalabash with gradle
View test.gradle
gradle -b test.gradle -Dexec.args="-isource=test1.xpl -oresult=- test1.xpl"
You can’t perform that action at this time.