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
var module = function(){ | |
var privateVar = “I’m out of scope since function executes and returns”; | |
//getPrivateVar is a property of the returned function. | |
this.getPrivateVar = function() { | |
return privateVar; | |
} | |
}(); // () causes anonymous function to automatically execute | |
module.getPrivateVar === “I’m out of scope since function executes and returns”; //true |
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
<?php | |
date_default_timezone_set('America/New_York'); | |
$client = new SoapClient('http://frontdoor.ctn5.org/CablecastWS/CablecastWS.asmx?WSDL', array('cache_wsdl' => 0)); | |
$searchLength = strtotime(date("Y-m-d")."T".date("H:i:s")) + (60*60*24*35); | |
$channelID = 1; | |
$showID = 1; | |
$schedule = $client->GetScheduleInformation(array( | |
'ChannelID' => $channelID, | |
'FromDate' => date("Y-m-d")."T00:00:00", |
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
<?php | |
$ss = isset($_GET['ss']) ? $_GET['ss'] : "peace"; //use a default search term for testing | |
$client = new SoapClient("http://tctvsbs.tctv.net/CablecastWS/CablecastWS.asmx?wsdl", array('cache_wsdl' => 0)); | |
$channels = array( | |
array("name" => "Channel 3", "id" => 1), | |
array("name" => "Channel 22", "id" => 4), | |
array("name" => "Channel 26", "id" => 5), |
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
{ | |
"uno": { | |
"displayName": "Arduino Uno", | |
"pins": [ | |
{"pinNumber": 1, "supportedTypes": ["flow", "onewire-temp", "onewire-presence", "relay", "id-12-rfid", "buzzer" ]}, | |
{"pinNumber": 2, "supportedTypes": ["flow", "onewire-temp", "onewire-presence", "relay", "id-12-rfid", "buzzer" ]}, | |
{"pinNumber": 3, "supportedTypes": ["onewire-temp", "onewire-presence", "relay", "id-12-rfid", "buzzer" ]}, | |
{"pinNumber": 4, "supportedTypes": ["onewire-temp", "onewire-presence", "relay", "id-12-rfid", "buzzer" ]} | |
], | |
"image": "http://kegbot.org/arduino/images/uno.jpg" |
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
{ | |
"id": 24, | |
"boardName": "Ray's Kegboard", | |
"boardType": "uno", | |
"pins":[ | |
{"pinNumber": 1, "type": "flow", "name": "Flow Meter A"}, | |
{"pinNumber": 2, "type": "flow", "name": "Flow Meter B"}, | |
{"pinNumber": 5, "type": "buzzer", "name": "Buzzer"}, | |
{"pinNumber": 10, "type": "onewire-temp", "name": "Temperature"}, | |
{"pinNumber": 13, "type": "relay", "name": "Solenoid A"} |
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
<!-- This is the form element that will be transformed into a datepicker --> | |
<div type="text" id="ScheduleDate style="float:left;margin-left:15px"> | |
<!-- This script finds the above datepicker and when a day is selected goes to the current url with a different date --> | |
<!-- EXAMPLE: http://YourServer/Schedule.php?date=2012-01-13 --> | |
<script> | |
$(function() { | |
$("#ScheduleDate").datepicker({ | |
onSelect: function(dateText, inst) { window.location.href = location.href.substring(0,location.href.lastIndexOf("?"))+"?date="+dateText}, | |
}); |
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
<html> | |
<head><title>CreaTV Limelight Player Example</title></head> | |
<body> | |
<h1>Limelight Player From Cablecast API</h1> | |
<p> | |
<?php | |
//Setup Script | |
$server = "173.11.100.21"; //cablecast server address | |
$showID = isset($_GET['ShowID']) ? $_GET['ShowID'] : 15859; | |
$client = new SoapClient("http://$server/CablecastWS/CablecastWS.asmx?WSDL"); |
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
<script type="text/x-handlebars" data-template-name="tasks"> | |
<div class="row"> | |
<div class="span3"> | |
<h3>Task Sets</h2> | |
<ul> | |
{{#each taskSet in controller}} | |
<li>{{#linkTo "taskSet" taskSet}}{{ taskSet.name }}{{/linkTo}}</li> | |
{{/each}} | |
</ul> | |
</div> |
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
<?php | |
//Configure Script | |
$server = "http://129.19.150.20/"; //include trailing backslash | |
//End Configure | |
$client = new SoapClient($server."CablecastWS/CablecastWS.asmx?WSDL"); // Creates New SOAP client using WSDL file | |
//Get the schedule from the web service | |
$result = $client->RenameDigitalFile(array( |
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
// Working on getting html5sortable plugin working | |
// Key part is needing to call the sortable() method using Ember.run.next | |
// If called straight away the functionality quickly gets applied, but then is lost | |
// At least that's what it looks like when stepping through chrome debugger | |
// http://farhadi.ir/projects/html5sortable/ | |
App.SortableView = Ember.CollectionView.extend({ | |
tagName: 'ul', | |
itemViewClass: 'App.SortableItemView', |