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> | |
/* Based on http://www.cflib.org/udf/justNumericList | |
Filters a list so that just numeric entries are returned. | |
Additionally filtered by number type, min/max limits & max number of values to return | |
Added SQL-type number translation to javacast type | |
Add trim to values in case user accidentally pastes tab or space characters (ie, from Excel) | |
*/ | |
function justNumericList(nList) { | |
var intIndex = 0; | |
var aryN = arrayNew(1); |
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> | |
function getShippingURL(shipper, trackingNumber){ | |
var shipURL = ''; | |
var trackingURLS = StructNew(); | |
trackingURLS['UPS'] = 'http://wwwapps.ups.com/WebTracking/track?track=yes&trackNums='; | |
trackingURLS['FedEx'] = 'http://www.fedex.com/Tracking?action=track&tracknumbers='; | |
trackingURLS['USPS'] = 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1='; | |
trackingURLS['DHLUS'] = 'http://track.dhl-usa.com/TrackByNbr.asp?ShipmentNumber='; | |
trackingURLS['DHLGlobal'] = 'http://webtrack.dhlglobalmail.com/?mobile=&trackingnumber='; | |
trackingURLS['OnTrac'] = 'http://www.ontrac.com/trackingres.asp?tracking_number='; |
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
<p>NOTE: 2 other UDFs exist that have similar functionality.</p> | |
<p><b>varNameToText()</b> - Incorrectly adds spaces between all uppercase words like "ZIP". Doesn't remove scope.<br> | |
http://cflib.org/udf/varNameToText</p> | |
<p><b>camelToSpace()</b> - If first letter is upper, adds a space. Doesn't remove underscores.<br> | |
http://cflib.org/udf/camelToSpace</p> | |
<cfscript> |
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> | |
function makeHoneyPotLink(HoneyPotPath){ | |
var a = RandRange(1, 9, 'SHA1PRNG'); | |
var str = ''; | |
var randomWords = "closed-vestpocket,digitate,microwave,integrate,ultra-round,semester,volume"; | |
var serverName = CGI.Server_Name; | |
if (arrayLen(arguments) gte 2 AND len(trim(arguments[2]))) serverName = trim(arguments[2]); //Pass server name (optional) | |
if (arrayLen(arguments) gte 3 AND len(trim(arguments[3]))) randomWords = trim(arguments[2]); // Pass random words (optional) | |
randomWords = trim(listGetAt(randomWords, RandRange(1, ListLen(randomWords), 'SHA1PRNG'))); | |
HoneyPotPath = trim(HoneyPotPath); |
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
<!--- Line 129, change this ---> | |
<cfhttp url="http://#REQUEST_HOST##REQUEST_SCRIPT#" method="POST" port="#REQUEST_PORT#"> | |
<!--- to this (if it takes more than 5 seconds, we will abort) ---> | |
<cfhttp url="http://#REQUEST_HOST##REQUEST_SCRIPT#" method="POST" port="#REQUEST_PORT#" timeout="5"> | |
<!--- After CFHTTP call (around line 144), add this ---> | |
<CFIF Findnocase("408", CFHTTP.StatusCode)> | |
<cfcontent type="text/html; charset=UTF-8"> | |
<cfheader statuscode="403" statustext="Forbidden"> | |
<CFOUTPUT><h1>Forbidden</h1></CFOUTPUT> |
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
<cfset CR = chr(10)> | |
<cfset simpleVar = "a"> | |
<cfsavecontent variable="simpleResults"><cfdump var="#simpleVar#"></cfsavecontent> | |
<cfoutput><div>simpleResults = #ListLen(simpleResults, CR)#</div></cfoutput> |
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
<cfparam name=" test " default="xyz"> | |
<cfparam name="test " default="123"> | |
<cfparam name="test" default="abc"> | |
<cfparam name="test2" default="abc"> | |
<cfparam name="test2 " default="123"> | |
<cfparam name=" test2 " default="xyz"> | |
<h2>test</h2> |
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> | |
<head> | |
<title>Form Re-Post</title> | |
<link rel="stylesheet" type="text/css" media="screen" href="http://handsontable.com/dist/jquery.handsontable.full.css"> | |
<script src="http://handsontable.com/lib/jquery.min.js" type="text/javascript"></script> | |
<script src="http://handsontable.com/dist/jquery.handsontable.full.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
var table_Data = $('#table_Data'); |
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
<cfset SupportedNet = structnew()> | |
<cfset bit32 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\"> | |
<cfset bit64 = "HKLM\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\"> | |
<cfset NetCheck = StructNew()> | |
<cfset NetCheck["4 Client"] = {branch="#bit32#v4\Client", keys={"Install"=1, "Version"="4.0.30319"}}> | |
<cfset NetCheck["4 Full"] = {branch="#bit32#v4\Full", keys={"Install"=1, "Version"="4.0.30319"}}> | |
<cfset NetCheck["3.5 Original Release"] = {branch="#bit32#v3.5", keys={"Install"=1, "SP"="0"}}> | |
<cfset NetCheck["3.5 Service Pack 1"] = {branch="#bit32#v3.5", keys={"Install"=1, "SP"="1"}}> | |
<cfset NetCheck["3.0 Original Release"] = {branch="#bit32#v3.0", keys={"Install"=1, "SP"="0"}}> |
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
<cfsetting enableCFOutputOnly="Yes"><!--- | |
Author: James Moberg | |
Date: 9/20/2013 | |
Notes: Called like cftimer but without enabling debugging. (NOTE: "debug" mode not supported.) | |
Types: outline (default), | |
Added "AllowedIPs". Enter a list of IPs. Masks acceptable (127.0.0.1,192.168.*.*) | |
CREDITS: Initial "myTimer" CFTag by Chris Phillips ( http://www.cfchris.com/cfchris/index.cfm/2007/4/5/My-CFTIMER-Custom-Tag ) | |
CFTIMER FUNCTION: https://learn.adobe.com/wiki/display/coldfusionen/cftimer | |
EXAMPLE USAGE |