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
(: Redis interface test: expiring keys :) | |
declare namespace JedisPooled = "java:redis.clients.jedis.JedisPooled"; | |
declare variable $REDIS:=JedisPooled:new("odroid.local", 6379); | |
let $_:=JedisPooled:set($REDIS,"name", "andy") (: create key :) | |
let $_:=JedisPooled:expire($REDIS,"name",10) (: expire in 10 secs :) | |
let $_:=JedisPooled:set($REDIS,"calls", "0") | |
(: query Redis as fast as possible until key disappears, returns number of queries made before expiry :) | |
return |
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 b = 'b'; | |
import module namespace c = 'c' at 'c.xqm'; |
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 function local:fib($n as xs:integer, $a as xs:integer, $b as xs:integer){ | |
switch ($n) | |
case 0 return $a | |
case 1 return $b | |
default return local:fib($n - 1, $b, $a + $b) | |
}; | |
declare function local:fib($n as xs:integer){ | |
local:fib($n,0,1) | |
}; |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>BaseX CORS test (with Vue.js)</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="description" content="BaseX CORS test, (with Vue.js)" /> | |
<meta name="author" content="andy bunce" /> | |
</head> | |
<body> | |
<h1>BaseX CORS test, (with Vue.js)</h1> |
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
(:~ | |
:process srt subtitles | |
: @see https://en.wikipedia.org/wiki/SubRip | |
:) | |
module namespace s = 'quodatum.text.format.subrip'; | |
declare function s:with-numbers($lines as xs:string*) | |
as 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
WEBVTT | |
00:00:00.500 --> 00:00:02.000 | |
Captions are always changing | |
00:00:02.500 --> 00:00:04.300 | |
and the APIs we access it are changing |
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
Exception in thread "Thread-305" Exception in thread "Thread-324" Exception in thread "Thread-326" Exception in thread "Thread-307" Exception in thread "Thread-308" Exception in thread "Thread-300" Exception in thread "Thread-286" java.lang.NullPointerException | |
at org.basex.core.locks.Locking.release(Locking.java:153) | |
at org.basex.core.jobs.Job.unregister(Job.java:59) | |
at org.basex.core.jobs.QueryJob.run(QueryJob.java:183) | |
at java.lang.Thread.run(Unknown Source) | |
java.lang.NullPointerException | |
at org.basex.core.jobs.QueryJob.run(QueryJob.java:186) | |
at java.lang.Thread.run(Unknown Source) | |
java.lang.NullPointerException | |
at org.basex.core.jobs.QueryJob.run(QueryJob.java:186) |
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
xquery version "3.0"; | |
(: | |
Various Date String Parser | |
- Parses various flavors of date strings, returns as xs:dateTime or xs:date | |
- Key functions: dates:parseDateTime() and dates:parseDate() | |
- adapted to an eXist-compatible module from date-parser.xqy from | |
http://xqzone.marklogic.com/svn/commons/trunk/dates/date-parser.xqy | |
- by Joe Wicentowski |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="description" content="BaseX socket test" /> | |
<meta name="author" content="andy bunce." /> | |
<title>BaseX Socket test v2</title> | |
</head | |
<body> | |
<h1>BaseX Socket test</h1> |
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
<?xml version="1.0"?> | |
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> | |
<Configure id="Server" class="org.eclipse.jetty.server.Server"> | |
<!-- Force all communication over secure channels. --> | |
<Set name="handler"> | |
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> | |
<Set name="handlers"> | |
<Array type="org.eclipse.jetty.server.Handler"> | |
<Item> |
NewerOlder