This file contains hidden or 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
<!doctype> | |
<html> | |
<head> | |
</head> | |
<body> | |
<h1> Inheretence testing</h1> | |
<script type="text/javascript"> | |
//base object |
This file contains hidden or 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
it("Should accept a DOM node as paramater 1", function() { | |
var node = document.createElement("div"); | |
var draw = new Drawer(node) | |
expect(draw instanceof Drawer).toBeTruthy(); | |
}); |
This file contains hidden or 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
define("drawerTest", ['Drawer', "Panel"], function(Drawer, Panel) { | |
//Object init - no parameters | |
describe("Radionav Drawer object", function(){ | |
describe("Contructor accepts correct paramaters", function(){ | |
it("Should accept a DOM node as paramater 1", function() { | |
var node = document.createElement("div"); | |
var draw = new Drawer(node) | |
expect(draw instanceof Drawer).toBeTruthy(); |
This file contains hidden or 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
ompile_and_link: x86_64-apple-darwin/stage2/lib/rustc/x86_64-apple-darwin/lib/librust.dylib | |
warning: no debug symbols in executable (-arch x86_64) | |
/Users/jamie/servo/build/src/rust/x86_64-apple-darwin/stage2/bin/rustc -A default_methods -O /Users/jamie/servo/src/rust-cocoa/cocoa.rc -o libcocoa.dummy | |
/Users/jamie/servo/src/rust-cocoa/base.rs:1:4: 1:8 warning: unused import | |
/Users/jamie/servo/src/rust-cocoa/base.rs:1 use std; | |
^~~~ | |
warning: no debug symbols in executable (-arch x86_64) | |
touch libcocoa.dummy | |
/Users/jamie/servo/build/src/rust/x86_64-apple-darwin/stage2/bin/rustc -A default_methods -O /Users/jamie/servo/src/rust-core-foundation/core_foundation.rc -o librustcorefoundation.dummy | |
/Users/jamie/servo/src/rust-core-foundation/array.rs:29:42: 29:43 error: obsolete syntax: visibility-qualified trait implementation |
This file contains hidden or 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
//better soltion | |
void fade(char type[], int pins[],){ | |
//step though brightness in 255 steps, going up or down | |
for (int i = 0; i < 255; i++ ) { | |
int intensity = i; | |
if (type == "down") intensity = 255 - i; | |
//loop for each group of LEDs | |
for (int thisPin = 0; thisPin < 3; thisPin++) { | |
analogWrite(pins[thisPin], intensity); |
This file contains hidden or 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
function updateFromArray($array){ | |
foreach($array as $property => $value){ | |
if(property_exists( $this, $property)){ | |
$this->$property = $value; | |
} | |
} | |