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
Titanium.Facebook.sessionForAccessToken = function(callback) { | |
var app_id = '<APP_ID>'; | |
var app_secret = '<APP_SECRET>'; | |
xhr.onerror = function(e) | |
{ | |
Ti.API.info('Unable to exchange session for OAuth access_token ' + e.error); | |
callback(false); | |
}; | |
xhr.setTimeout(10000); |
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 net = require('net'); | |
var guestsA = []; | |
var guestsB = []; | |
var serverA = net.createServer(function (socket) { | |
//socket.write("Echo server\r\n"); | |
//socket.pipe(socket); | |
}); | |
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
/* | |
Button | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when pressing a pushbutton attached to pin 2. | |
The circuit: | |
* LED attached from pin 13 to ground | |
* pushbutton attached to pin 2 from +5V |
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
// Detect a Switch | |
// Example to detect a switch press | |
// Developed for the Developing Assistive Technology class | |
int switchPin = 2; | |
int switchValue = 0; | |
int ledPin = 13; | |
int counter = 0; |
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
/* -------------------------------------------------------------------------- | |
* SimpleOpenNI Hands3d Test | |
* -------------------------------------------------------------------------- | |
* Processing Wrapper for the OpenNI/Kinect library | |
* http://code.google.com/p/simple-openni | |
* -------------------------------------------------------------------------- | |
* prog: Max Rheiner / Interaction Design / zhdk / http://iad.zhdk.ch/ | |
* date: 02/27/2011 (m/d/y) | |
* ---------------------------------------------------------------------------- | |
* This demos shows how to use the gesture/hand generator. |
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 | |
function getListingsViaSoap($zipcode) { | |
$url = "http://www.tracmedia.com/lol/LOLService.asmx"; | |
$soap_request = '<?xml version="1.0" encoding="utf-8"?> | |
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soap:Body> | |
<InTheLife xmlns="http://tracmedia.org/"> |
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></head> | |
<body> | |
<div><input id=input placeholder=you-chat-here /></div> | |
<div id="box"></div> | |
<!-- | |
UPDATE pub-key and sub-key with your info from pubnub | |
--> |
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 | |
// Example of how to log into Google API with ClientLogin, good to use when you're not making a webapp. | |
// code taken and minimally updated from http://kovshenin.com/2009/10/google-docs-api-client-login-with-php-and-curl-1494/ | |
// Construct an HTTP POST request | |
$clientlogin_url = "https://www.google.com/accounts/ClientLogin"; | |
$clientlogin_post = array( | |
"accountType" => "HOSTED_OR_GOOGLE", | |
"Email" => "[email protected]", |
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
/************************************************ | |
FILENAME | |
server_simple.js | |
DESCRIPTION | |
creates a simple web server that | |
display "Hello Dynamic World Wide Web" | |
HOW TO START SERVER: | |
1) from terminal run 'node simple_server.js' |
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
/************************************************ | |
FILENAME | |
server_querystring.js | |
DESCRIPTION | |
creates a web server that | |
display "Hello Dynamic World Wide Web" | |
it includes a web form to accept a new name from the user via the querystring and displays it. | |
the new name will be stored in a local variable 'defaultName'. |
OlderNewer