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
{ | |
"name": "Detect if an extension installed", | |
"description": "Detect if an extension installed", | |
"version": "0.1", | |
"manifest_version": 2, | |
"permissions": [ | |
"management" | |
], | |
"browser_action": { | |
"default_popup": "popup.html" |
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
// ==UserScript== | |
// @name Trello Lists Show Num Cards | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match https://trello.com/b/* | |
// @copyright 2012+, You | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js | |
// ==/UserScript== | |
setTimeout(function() { |
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
// create a search definition | |
StringHandle handle = new StringHandle( | |
"{ \"$query\": { \"plenary\": true } }" | |
).withFormat(Format.JSON); | |
RawQueryByExampleDefinition query = queryMgr.newRawQueryByExampleDefinition(handle); | |
// create a handle for the search results | |
StringHandle resultsHandle = new StringHandle().withFormat(Format.JSON); |
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
// Create a search definition | |
StringHandle handle = new StringHandle( | |
"<q:qbe xmlns:q=\"http://marklogic.com/appservices/querybyexample\">\n" + | |
" <q:query>\n" + | |
" <PLAY>\n" + | |
" <PERSONAE>\n" + | |
" <PERSONA><q:word>brother</q:word></PERSONA>\n" + | |
" </PERSONAE>\n" + | |
" </PLAY>\n" + | |
" </q:query>\n" + |
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
for $speech in (doc()//SPEECH)[1 to 100] | |
let $speaker := $speech/SPEAKER | |
let $lines := $speech/LINE | |
return ( | |
<h2>{$speaker/text()}</h2>, | |
<p>{for $line in $lines return $line/text()}</p> | |
) |
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
{ | |
"options": { | |
"debug": false, | |
"transform-results": { | |
"apply": "raw" | |
}, | |
"constraint": [{ | |
"name": "stars", | |
"range": { | |
"type": "xs:int", |
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"; | |
declare namespace sample = "http://marklogic.com/sample"; | |
let $groupsize := 1000 | |
let $values := cts:element-values(xs:QName("sample:value")) | |
let $count := fn:count($values) | |
let $groups := | |
for $i in (0 to (xs:int($count div $groupsize) + 1)) | |
let $group := $values[(($i * $groupsize) + 1) to (($i + 1) * $groupsize)] | |
return fn:string-join($group, "|") |
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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
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
<options xmlns="http://marklogic.com/appservices/search"> | |
<search-option>unfiltered</search-option> | |
<quality-weight>0</quality-weight> | |
<return-plan>true</return-plan> | |
<debug>true</debug> | |
<constraint name="tweet"> | |
<word> | |
<field name="tweet"/> | |
</word> | |
</constraint> |
NewerOlder