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 express = require('express'); | |
| var path = require('path'); | |
| var favicon = require('serve-favicon'); | |
| var logger = require('morgan'); | |
| var cookieParser = require('cookie-parser'); | |
| var bodyParser = require('body-parser'); | |
| var forceSSL = require('express-force-ssl'); | |
| var routes = require('./routes/index'); | |
| var users = require('./routes/users'); |
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 concatAttribute = function(selector, attr){ | |
| var returnString = ''; | |
| $(selector).each(function(index){ | |
| returnString += $(this).attr(attr); | |
| }) | |
| return returnString; | |
| } |
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
| fs = require 'fs' | |
| hogan = require 'hogan.js' | |
| routes = {} | |
| templates = {} | |
| templates = | |
| playout: hogan.compile(fs.readFileSync('./views/partial_layout.hjs').toString()) | |
| pindex: hogan.compile(fs.readFileSync('./views/partial_index.hjs').toString()) | |
| ptweet: hogan.compile(fs.readFileSync('./views/partial_tweet.hjs').toString()) |
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
| fs = require 'fs' | |
| hogan = require 'hogan.js' | |
| routes = {} | |
| templates = {} | |
| templates = | |
| layout: hogan.compile(fs.readFileSync('./views/layout.hjs').toString()) | |
| index: hogan.compile(fs.readFileSync('./views/index.hjs').toString()) | |
| routes.index = (req, res) -> |
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
| private string function amazonDateFormat(required date dateToFormat) hint="Follows the ISO 8601 standard" { | |
| var formattedDate = dateAdd("s", getTimeZoneInfo().utcTotalOffset, arguments.dateToFormat); | |
| return "#dateFormat(formattedDate,"yyyy-mm-dd")#T#timeFormat(formattedDate,'HH:mm:ss')#Z"; | |
| } |
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 inherits = function(ctor, superCtor) { | |
| ctor.super_ = superCtor; | |
| ctor.prototype = Object.create(superCtor.prototype, { | |
| constructor: { | |
| value: ctor, | |
| enumerable: false, | |
| writable: true, | |
| configurable: 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
| <html> | |
| <head> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
| <script type="text/javascript" src="js/uploadify/jquery.uploadify.v2.1.4.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| $('#uploadify').uploadify({ | |
| uploader: 'js/uploadify/uploadify.swf', | |
| folder: '/uploads', | |
| multi: 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
| <cftry> | |
| <cfscript> | |
| //calculate the width and height of our little maps that will be combined to make our big map | |
| miniMapWidth = calculateDimension(form.width,500); | |
| miniMapHeight = calculateDimension(form.height,500); | |
| //how many columns and rows of maps will we need to create our big map? | |
| columns = form.width/miniMapWidth; |
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
| for(x = 1; x <= 100; x++){ | |
| var temp = [x, 'fizz', 'buzz', 'fizzbuzz']; | |
| var pos = 0; | |
| if(x%3 == 0){ | |
| pos += 1; | |
| } | |
| if(x%5 == 0){ | |
| pos += 2; | |
| } |
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
| #include <iostream> | |
| int main() | |
| { | |
| std::cout << "Hello, world!" << std::endl; | |
| } |
NewerOlder