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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Using Return Statements When Invoking Callbacks</title> | |
<script type="text/javascript"> | |
// Define a success handler. | |
var successHandler = function(){ |
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
<!--- | |
Create a buffer for our output of the way various Scopes are | |
presented during different HTTP requests. | |
---> | |
<cfsavecontent variable="debugOutput"> | |
<cfdump | |
var="#cgi#" | |
label="CGI Scope" | |
show="content_type, request_method" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery.whenSync() For Asynchronous, Deferred Chaining</title> | |
<!-- Include jQuery and the whenSync() plugin. --> | |
<script type="text/javascript" src="../jquery-1.7.1.js"></script> | |
<script type="text/javascript" src="./jquery.whensync.js"></script> | |
<script type="text/javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cross-Origin Resource Sharing (CORS) With jQuery And Node.js</title> | |
</head> | |
<body> | |
<h1> | |
Cross-Origin Resource Sharing (CORS) With jQuery And Node.js | |
</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Using jQuery $.whenSync() For Asynchronous Form Processing</title> | |
<!-- Include jQuery and the whenSync() plugin. --> | |
<script type="text/javascript" src="../jquery-1.7.1.js"></script> | |
<script type="text/javascript" src="./jquery.whensync.js"></script> | |
<script type="text/javascript"> |
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
#! /usr/local/bin/node | |
// ^-- Tell the terminal which interpreter to use for the execution | |
// ^-- of this script. For our purposes, we'll be using the Node.js | |
// ^-- interpretor (which was installed in the local BIN directory | |
// ^-- using HomeBrew. | |
// ---------------------------------------------------------- // | |
// ---------------------------------------------------------- // |
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
<!--- | |
Start a CFScript block. Closures can only be used inside | |
of CFScript due to the syntax required to define them. | |
---> | |
<cfscript> | |
// I map one array onto a new array, invoking the callback | |
// on each target array item. If NULL is returned, no item | |
// is added to the new array; if an array is returned, all |
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
<!--- | |
Start a CFScript block. Closures can only be used inside | |
of CFScript due to the syntax required to define them. | |
---> | |
<cfscript> | |
// I return any arguments that I received. | |
function echoArguments(){ |
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
<!--- | |
Start a CFScript block. Closures can only be used inside | |
of CFScript due to the syntax required to define them. | |
---> | |
<cfscript> | |
// I am a factory for the thread callbacks. | |
function getThreadCallback(){ |
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
<!--- | |
Start a CFScript block. Closures can only be used inside | |
of CFScript due to the syntax required to define them. | |
---> | |
<cfscript> | |
// Create an instance of our new component and access the | |
// closure "Tunnel" that we've tried to create. | |
getter = new Simple().getClosure(); |