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
/* 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
// 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
#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
#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
// --------------------------------------------------------------------------- Motors | |
// These are the pins to the the motor drive chip for the left wheel | |
int motor_left[] = {12, 13}; | |
// These are the pins to the the motor drive chip for the right wheel | |
int motor_right[] = {6, 7}; | |
// --------------------------------------------------------------------------- Setup | |
void setup() { | |
Serial.begin(9600); |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://orbeon.org/oxf/xml/formatting" | |
xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:widget="http://orbeon.org/oxf/xml/widget"> | |
<head> | |
<!-- fr:error-summary has errors-count-ref which can store number of errors to data. You can use that data to enable button. --> | |
<title>Example of Visit All Failing</title> | |
<style type="text/css"> | |
.orbeon .xforms-control {display:block; padding:5px;} | |
/* not needed in a table display:inline-block; width:10ex; text-align:right; */ | |
.orbeon .xforms-label {font-weight:bold!important; display:inline-block; margin-right: 1ex;} |
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
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<head> | |
<title>XForms 2 Row Repeat Test Using nodeset and id for Repeat</title> | |
<xf:model> | |
<xf:instance xmlns="" id="save-data"> | |
<data> | |
<row> | |
<first-name>Dan</first-name> | |
<last-name>McCreary</last-name> | |
<phone-ext>111</phone-ext> |
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 8 // connect the Data In pin | |
// Parameter 1 = number of pixels in strip - I used 12 |