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
<cfprocessingdirective pageencoding="utf-8"> | |
<cfheader name="Content-Disposition" value="attachment; filename=myworddoc.doc" charset="utf-8"> | |
<cfcontent type="application/msword; charset=utf-8"> | |
<html xmlns:o="urn:schemas-microsoft-com:office:office" | |
xmlns:w="urn:schemas-microsoft-com:office:word" | |
xmlns="http://www.w3.org/TR/REC-html40"> | |
<head> | |
<style> | |
<!--[if gte mso 9]> |
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
public string function getIPAddress() { | |
local.rv = ""; | |
try { | |
try { | |
local.headers = getHttpRequestData().headers; | |
if (structKeyExists(local.headers, "X-Forwarded-For") && len(local.headers["X-Forwarded-For"]) > 0) { | |
local.rv = trim(listFirst(local.headers["X-Forwarded-For"])); | |
} | |
} catch (any e) {} | |
if (len(local.rv) == 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
// If a plugin has a jar or class file, automatically add the mapping to this.javasettings. | |
this.wheels.pluginDir = this.wheels.rootPath & "plugins"; | |
this.wheels.pluginFolders = DirectoryList(this.wheels.pluginDir, "true", "path", "*.class|*.jar|*.java"); | |
for (this.wheels.folder in this.wheels.pluginFolders) { | |
if(!structKeyExists(this, "javaSettings")){ | |
this.javaSettings={}; | |
} | |
if(!structKeyExists(this.javaSettings, "LoadPaths")){ |
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
component extends="tests.Test" hint="Unit Tests" { | |
function setup(){ | |
super.setup(); | |
params = {controller="dummy", action="dummy"}; | |
loc.controller = controller("dummy", params); | |
} | |
function teardown(){ | |
super.teardown(); | |
} |
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
component extends="wheelsMapping.Test" hint="Unit Tests" { | |
include "../wheels/test.cfm"; | |
function setup(){ | |
} | |
function teardown(){ | |
} | |
} |
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
component extends="app.controllers.Controller" hint="Locations Controller" | |
{ | |
// Name of your model: | |
this.modelName="location"; | |
// Optional nested properties to include: | |
// this.includeNestedProperties = "somethign"; | |
function config() { | |
super.config(); | |
} | |
function index(){ |
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
<cfscript> | |
products = [ | |
{"sku": "prod_one", "title": "Product One"}, | |
{"sku": "prod_two", "title": "Product Two"}, | |
{"sku": "prod_three", "title": "Product Three"}, | |
{"sku": "prod_four", "title": "Product Four"} | |
]; | |
skuToFind="prod_two"; |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
sass:{ |
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
mapper() | |
.resources("users") | |
.root(to="wheels##wheels", method="get") | |
.end() |
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
addRoute(name="users", pattern="/users/[action]/[key]", controller="users"); | |
addRoute(name="users", pattern="/users/[action]/", controller="users"); | |
addRoute(name="users", pattern="/users/", controller="users", action="index"); |
NewerOlder