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
#include <Adafruit_NeoPixel.h> | |
// Sample code for using a breadboard Arduino to drive WS2812B LED strip with Adafruit NeoPixel library | |
// I got mine on e-bay: | |
// http://www.ebay.com/itm/181268207260?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 | |
// Note - colors for data and ground vary | |
// I used a 16MHZ Crystal Oscilator | |
#define PIN 12 // connect the Data In pin | |
const int pingPin = 7; | |
int pixelToSet = 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
#include <Adafruit_NeoPixel.h> | |
/* Rotary encoder read example | |
http://www.circuitsathome.com/mcu/programming/reading-rotary-encoder-on-arduino | |
connect the center wire to ground. Connect the side pins to Analog ports */ | |
#define ENC_A 14 // Analog pin A0 | |
#define ENC_B 15 // Analog pin A1 | |
#define ENC_PORT PINC | |
#define LEDPIN 9 // connect the Data In pin |
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
// This #include statement was automatically added by the Spark IDE. | |
#include "lib1.h" | |
// This #include statement was automatically added by the Spark IDE. | |
#include "neopixel/neopixel.h" | |
#include "application.h" | |
//#include "spark_disable_wlan.h" // For faster local debugging only | |
#include "neopixel/neopixel.h" |
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
/* rotery encoder demo by Budd Churchward. | |
See: https://www.youtube.com/watch?v=FGxLXqzPe3Q | |
*/ | |
const byte pinA = 2; // encoder pin A to Arduino pin 2 which is also interrupt pin 0 which we will use | |
const byte pinB = 3; // encoder pin B to Arduino pin 3 which is also interrupt pin 1 but we won't use it | |
byte state = 0; // will store two bits for pins A & B on the encoder which we will get from the pins above | |
int level = 0; // a value bumped up or down by the encoder | |
int haveNewInterrupt = 0; // 1 if we have a new interrupt to show, 0 otherwise |
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 admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; | |
import module namespace style = "http://danmccreary.com/style" at "/modules/style.xqy"; | |
let $nl := " " | |
let $namespace := xdmp:get-request-field('namespace') | |
let $localname := xdmp:get-request-field('localname') |
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
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
SELECT (str(?prefTerm) AS ?pTerm) (str(?altTerm) AS ?aTerm) | |
FROM <urn:x-evn-master:BenefitSectionDetails0> | |
FROM <urn:x-evn-master:BenefitSection> | |
WHERE { | |
?s (skosxl:prefLabel | skosxl:altLabel) / skosxl:literalForm ?allTerms . | |
FILTER (LCASE(str(?allTerms)) = LCASE('IUD')) |
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
import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; | |
declare namespace map="http://marklogic.com/xdmp/map"; | |
let $prefixes-map := <map>{sem:prefixes("skosxl: http://www.w3.org/2008/05/skos-xl#")}</map> | |
return $prefixes-map/map:map/map:entry/map:value/text() |
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
import module namespace sem = "http://marklogic.com/semantics" at "/MarkLogic/semantics.xqy"; | |
declare namespace map="http://marklogic.com/xdmp/map"; | |
let $prefixes-map := <map>{sem:prefixes("skosxl: http://www.w3.org/2008/05/skos-xl#")}</map> | |
return $prefixes-map/map:map/map:entry/map:value/text() |
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
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
SELECT ?s ?p ?o | |
WHERE | |
{ | |
?s skosxl:prefLabel ?o . | |
OPTIONAL {?s skosxl:altLabel ?o} | |
} |
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
#!/bin/sh | |
# this program has been updated to list both the images and the largest images and the slide numbers together | |
# get the parameter | |
echo "working on" "$1" | |
rm -r /tmp/big-images 2> /dev/null | |
mkdir /tmp/big-images | |
# copy the ppt file to /tmp | |
cp "$1" /tmp/big-images | |
# rename it to be .zip | |
mv "/tmp/big-images/$1" "/tmp/big-images/$1.zip" |