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 variable $deck-counter := map:map(); | |
| declare variable $deck := map:map(); | |
| declare function local:get-card($num) { | |
| let $card := map:get($deck-counter, xs:string($num)) | |
| let $_ := xdmp:log(fn:concat("card: ", $card, " $num: ", $num), "debug") | |
| return | |
| (: call recursively with another rand number, if the |
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
| declare function app:get-content() | |
| { | |
| let $view := $config:CONTEXT/*:view | |
| return | |
| if ($view eq "search") | |
| then ( | |
| xdmp:apply($config:toolbar), | |
| if (data($config:RESPONSE/@total) eq 0) | |
| then xdmp:apply($config:error-message, | |
| concat("Your search for ",$config:CONTEXT/*:q, |
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"; | |
| <locations> | |
| { | |
| let $pins := cts:search(/pin, cts:element-query(xs:QName("location"), cts:and-query(()))) | |
| for $pin in $pins | |
| where fn:exists($pin/location/lat) | |
| return | |
| <location> | |
| <url>/detail{fn:base-uri($pin)}</url> | |
| <name>{$pin/name/text()}</name> |
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
| function initialize() { | |
| var latlng = new google.maps.LatLng(-34.397, 150.644); | |
| var myOptions = { | |
| zoom: 8, | |
| center: latlng, | |
| mapTypeId: google.maps.MapTypeId.ROADMAP | |
| }; | |
| var map = new google.maps.Map(document.getElementById("map"), | |
| myOptions); |
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
| <dev:lounge> | |
| <beverages> | |
| <coffee brew="strong" /> | |
| <soda flavor="orange"/> | |
| </beverages> | |
| <lab code="xquery" speed="awesome"/> | |
| </dev:lounge> |
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
| declare function my:function( | |
| $a as xs:string, | |
| $b as element(my:options) | |
| ) as empty-sequence() | |
| { | |
| (: body of function :) | |
| }; |
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
| (: one line if/then/else :) | |
| if ($condition) then $action else () |
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
| $(document).ready(function() { | |
| var config = { | |
| searchEndpoint: "search.php", | |
| valueEndpoint: "values.php" | |
| } | |
| ML.controller.init(config); | |
| var options = { | |
| constraint: "decade", | |
| title: "Awards by decade", |
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
| mlcp.sh import \ | |
| -host localhost \ | |
| -port 8006 \ | |
| -username user \ | |
| -password ******* \ | |
| -input_file_path /data/latest |