- copy stuff from example build.gradle to your own build.gradle
- define mlcpVersion in your gradle.properties (for example:
10.0.8.2
) - Download MLCP binaries, and extract into a folder names
mlcp/
in your project - Remove bin/*.sh, bin/*.bat, lib/*.jar, lib/*.txt, src/*, docs/*
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
xquery version "1.0-ml"; | |
(: Copyright 2012 Grtjn. All Rights Reserved. :) | |
declare namespace textscan = "http://grtjn.nl/marklogic/plugin/textscan"; | |
import module namespace plugin = "http://marklogic.com/extension/plugin" at "/MarkLogic/plugin/plugin.xqy"; | |
import module namespace info="http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy"; | |
import module namespace infodev="http://marklogic.com/appservices/infostudio/dev" at "/MarkLogic/appservices/infostudio/infodev.xqy"; |
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
xquery version "1.0-ml"; | |
declare namespace html = "http://www.w3.org/1999/xhtml"; | |
declare namespace xdmp = "http://marklogic.com/xdmp"; | |
declare function xdmp:tidy-mess($query) { | |
for $tweet in xdmp:tidy(xdmp:http-get(concat("https://twitter.com/search?q=", encode-for-uri($query)))[2])[2] | |
//html:div[string(@class) = 'content'] | |
return | |
<li xmlns="http://www.w3.org/1999/xhtml">{ |
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
xquery version "1.0-ml"; | |
module namespace ext = "http://marklogic.com/rest-api/resource/analyze-data"; | |
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; | |
declare namespace roxy = "http://marklogic.com/roxy"; | |
declare namespace xs = "http://www.w3.org/2001/XMLSchema"; | |
declare namespace db = "http://marklogic.com/xdmp/database"; |
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
xquery version "1.0-ml"; | |
let $term := "werld" | |
let $start-char := substring($term,1,1) | |
let $limit := 10 | |
let $threshold := 100 | |
return ( | |
for $candidate in cts:field-words("meta-content",$start-char) | |
let $distance := | |
if (starts-with($candidate, $start-char) and string-length($candidate) le 64) then |
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
xquery version "1.0-ml"; | |
declare function local:draw-one($remaining-map, $member) { | |
let $household-name := name($member/..) | |
let $household-map := map:get($remaining-map, $household-name) | |
let $household-count := count(map:keys($household-map)) | |
let $household-key := $household-name || "/" || head(map:keys($household-map)) | |
let $remaining-members := | |
for $h-name in map:keys($remaining-map) |
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
'use strict'; | |
// Fluent interface functions | |
function document(root) { | |
return function(b) { | |
return (b || new NodeBuilder()).addDocument(root); | |
} | |
} |
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
xquery version "1.0-ml"; | |
declare option xdmp:mapping "false"; | |
declare function local:matchRegion0($region as xs:string, $country as xs:string?) | |
as xs:boolean | |
{ | |
let $in-country := '/country[name-variants/variant = $country]/regions/region/name-variants/variant' | |
let $anywhere := '/country/regions/region/name-variants/variant' |
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
{ | |
"Docker": { | |
"Name": "{{ .Docker.Name }}", | |
"NumContainers": {{ .Docker.NumContainers }}, | |
"NumImages": {{ .Docker.NumImages }}, | |
"Version": "{{ .Docker.Version }}", | |
"ApiVersion": "{{ .Docker.ApiVersion }}", | |
"GoVersion": "{{ .Docker.GoVersion }}", | |
"OperatingSystem": "{{ .Docker.OperatingSystem }}", | |
"Architecture": "{{ .Docker.Architecture }}", |
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
# hide secrets | |
secrets.properties |