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
/** | |
Copyright 2012-2019 MarkLogic Corporation | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
/* ebnf file for es 6 - MAY CONTAIN ERRORS / DISAMBIGUITY */ | |
/* Edited by @ryanjdew for compatiblity with REx Parser: es6.ebnf -ll 1 -backtrack -javascript -faster */ | |
Program ::= (Shebang? Grammar+|Script|Module) EOF | |
Grammar ::= Statement | |
/* Expressions */ | |
IdentifierReference ::= Identifier | /* [~Yield] */ "yield" | |
BindingIdentifier ::= Identifier | /* [~Yield] */ "yield" | |
LabelIdentifier ::= Identifier | /* [~Yield] */ "yield" | |
Identifier ::= /* IdentifierName but not ReservedWord */ IdentifierName |
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" encoding="ISO-8859-1"?> | |
<SunopsisExport> | |
<Admin RepositoryVersion="05.02.02.04" IsLegacyIdCompatible="false" /> | |
<Encryption algorithm="AES" keyLength="128" exportKeyHash="w8MQnwAtjLTLZbjtHP3JO36rrz+IgVYbr7AcR8Sp9aM=" keyVect="4EpM8hmiUAzuarPMEHMUgw==" exportKeySalt="9930fb83-6422-4a5a-88ea-4071ee6efb22" containsCipherText="false"/> | |
<Object class="com.sunopsis.dwg.dbobj.SnpTrt"> | |
<Field name="CleanupOnError" type="java.lang.String">null</Field> | |
<Field name="CompType" type="java.lang.String"><![CDATA[DATASTORE]]></Field> | |
<Field name="DelegateClass" type="java.lang.String">null</Field> | |
<Field name="DelegateScript" type="java.lang.String">null</Field> | |
<Field name="ExpectedAstClass" type="java.lang.String">null</Field> |
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
/*jshint node: true */ | |
'use strict'; | |
var gulp = require('gulp'); | |
var config = require('konphyg')(__dirname+'/config'); | |
var appConfig = config('app'); | |
var marklogic = require('marklogic'); | |
var qb = marklogic.queryBuilder; |
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
template<class T> | |
void Bucketeer<T>:: | |
finish(OutputSequence& os, Reporter& reporter) | |
{ | |
// start the MarkLogic map | |
os.startMap(); | |
// interate over the unique keys | |
// note the use of buckets.upper_bound() to ensure we get a key only once | |
for (typename std::multimap<String, T>::iterator it = buckets.begin(); it != buckets.end(); it = buckets.upper_bound(it->first)) { | |
std::pair <typename std::multimap<String,T>::iterator, typename std::multimap<String,T>::iterator> ret; |
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
/* | |
* Encode the map in a flattened state. | |
*/ | |
template<class T> | |
void Bucketeer<T>:: | |
encode(Encoder& e, Reporter& reporter) | |
{ | |
std::map<String, int> keys_w_count; | |
int key_count = 0; | |
// determine key count and collect unique keys |
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
template<class T> | |
void Bucketeer<T>:: | |
reduce(const AggregateUDF* _o, Reporter& reporter) | |
{ | |
/* Merge matches found */ | |
const Bucketeer<T> *o = (const Bucketeer<T>*)_o; | |
typename std::multimap<String, T> o_buckets = o->buckets; | |
for (typename std::multimap<String, T>::iterator it = o_buckets.begin(); it != o_buckets.end(); it++) { | |
buckets.insert(typename std::pair <String, T> (it->first, it->second)); | |
} |
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
void BucketeerRegex:: | |
map(TupleIterator& values, Reporter& reporter) | |
{ | |
int reti = 0; | |
for(; !values.done(); values.next()) { | |
if(!values.null(0)) { | |
String cur; | |
values.value(0,cur); | |
/* Execute regular expression */ | |
regmatch_t pmatch[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
void BucketeerRegex:: | |
start(Sequence& arg, Reporter& reporter) | |
{ | |
overflow_bucket = "bucketeer:overflow"; | |
case_insensitive = false; | |
capture_overflow = false; | |
int reti; | |
int case_sensitive = 0; | |
int extended = 0; | |
arg.value(regex); |
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 "1.0-ml"; | |
import module namespace mem = "http://maxdewpoint.blogspot.com/memory-operations" at "/memory-operations.xqy"; | |
import module namespace mem-fun = "http://maxdewpoint.blogspot.com/memory-operations/functional" at "/memory-operations-functional.xqy"; | |
declare variable $test-xml := <html> | |
<head> | |
<title>This is a title</title> | |
</head> | |
<!-- old comment --> | |
<body> |
NewerOlder