Skip to content

Instantly share code, notes, and snippets.

<?php
$dom = new DOMDocument; // create new DOMDocument instance
$dom->load('books.xml'); // load DOMDocument with XML data
$dit = new RecursiveIteratorIterator(
new RecursiveDOMIterator($dom),
RecursiveIteratorIterator::SELF_FIRST);
@osfameron
osfameron / gist:2667424
Created May 12, 2012 16:22
Arduino Multitasking sketch
class Task {
public:
Task (boolean on, int frequency) {
_on = on;
_frequency = frequency;
_nextTick = millis();
}
virtual void runTask () = 0;
void checkTask() {
int time = millis();