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
<cfif thisTag.executionMode neq "start"><cfexit method="exitTag"></cfif><cfsetting enablecfoutputonly="YES"> | |
<!--- Server-based optimization technologies (like Google PageSpeed) may minify | |
or rewrite the HTML/JS/CSS and break CFDump's output. | |
Defaults for optional attributes, taken from the docs | |
http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_d-e_08.html ---> | |
<cfparam name="attributes.var" default=""> | |
<cfparam name="attributes.output" default="browser"> | |
<cfparam name="attributes.format" default="html"> | |
<cfparam name="attributes.abort" default="false"> | |
<cfparam name="attributes.label" default=""> |
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
<!--- 2/21/2014 ColdFusion Number Test | |
What is an integer? Validity, identification & parsed values should be consistent across all ColdFusion functions & tags. A "non-breaking space" chr(160) has been added to tests as I occassionally seen this character imported via CFSpreadsheet. ---> | |
<cfset isRailo = isDefined("Server.Railo")> | |
<cfset nbsp = chr(160)> | |
<cfset BadValues = ["1 5", " 5", "5 ", "3.14", ".99", "2.00", "2147483648", "005", "1+1", "5-1", "2/1", "3*2", "5#nbsp#", "#nbsp#5", "1#nbsp#5", "6,0", "0,6", "1,000", "$1,000", "$,1,2,$,2352345,$", "1,2,3,4"]> | |
<cfset c = 0> | |
<cfset TestQuery = QueryNew("i","integer")> | |
<cfset queryaddRow(TestQuery)> |
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
/*! | |
* Pikaday 1.2.0 (Downloaded on 3/6/2014) | |
* | |
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday | |
* DateJS modifications by James Moberg | 3/6/2014 | http://about.me/jamesmoberg | |
*/ | |
(function (root, factory) | |
{ | |
'use strict'; |
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
<!-- Compatible with ColdFusion 8-11. | |
4/28/2015 Rewritten to compensate for new undocumented CF10/11 behavior regarding getHTTPRequestData(). | |
https://bugbase.adobe.com/index.cfm?event=bug&id=3042675 | |
https://bugbase.adobe.com/index.cfm?event=bug&id=3581691 | |
http://www.bennadel.com/blog/2824-gethttprequestdata-may-break-your-request-in-coldfusion-but-gethttprequestdata-false-may-not.htm | |
---> | |
<cffunction name="isAjaxRequestPost" output="false" returntype="boolean" access="public"> | |
<cfset var response = StructNew()> | |
<cfset response.AjaxHeader = getPageContext().getRequest().getHeader("X-Requested-With") /> |
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
<!--- | |
CFHTTP https://wikidocs.adobe.com/wiki/display/coldfusionen/cfhttp | |
HTTPRequestCF http://coldfusion9.blogspot.com/2012/03/custom-cfhttp-tag.html | |
CFX_HTTP5 http://www.cftagstore.com/tags/cfxhttp5.cfm | |
Here are the results that I received: | |
ColdFusion 10 CFHTTP: 9.04 CFC: 18.14 CFX_HTTP5: 1.26 | |
ColdFusion 9 CFHTTP: 8.08 CFC: 158.92 CFX_HTTP5: 2.4 | |
ColdFusion 8 CFHTTP: 4.86 CFC: 149.14 CFX_HTTP5: 2.14 | |
---> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- IIS 7 Disable hotlinking and directory listing. http://www.emigre.com/EULWEB.php --> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Hotlinking Prevention" stopProcessing="true"> | |
<match url=".*\.(woff|eot)$" /> | |
<conditions> | |
<add input="{HTTP_REFERER}" pattern="^https?://www\.yourdomain\.com/.*$" negate="true" /> |
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
<cfscript> | |
/* Download and install the hashids CFC https://github.com/dswitzer/hashids.coldfusion */ | |
hashids = new Hashids(salt="this is my salt" | |
,minLen=8 | |
,alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"); | |
id_to_hash = listtoArray("1"); // try "1,2,3" and "3,2,1" and "1,1,1" | |
writeoutput('original = #arrayToList(id_to_hash)#<br>'); | |
hashed_id = hashids.encrypt(id_to_hash); |
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
$(function(){ | |
/* Select all text in field upon focus. | |
Chrome's mouseup event prevents select() from working without this hack. | |
Add "selectAll" class to input fields or modify to work with any input field */ | |
$('body').on('focus', 'input:text.selectAll', function(){ | |
$(this).one('mouseup', function(e){ | |
e.preventDefault(); | |
}).select(); | |
}); | |
}); |
OlderNewer