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
<cffunction name="NameCase" returntype="String" output=false access="public" | |
hint="Capitalise first letter of each word, with exceptions (McIntire,Mackie,O'Connor)" | |
> | |
<cfargument name="Text" type="String" required=true /> | |
<cfscript> | |
// Uppercase first letter of every word, except special cases... | |
var Name = rereplace | |
( lcase(Arguments.Text) | |
, "\b(?!(?:a[lp]|dell[ae]|de[rl]?|d[ai]|l[eo']|of|the|v[oa]n)\b)\w+" |
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
<cfsetting showdebugoutput=false /> | |
<cfset ascii32to126 = "!""##$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"> | |
<cfcontent reset type="text/plain"> | |
<cfoutput> | |
Unmodified: | |
#ascii32to126# | |
encodeForJavaScript: | |
#encodeForJavaScript(ascii32to126)# |
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
<cffunction name="QueryStringToStruct" returntype="struct" output=false access="public" | |
hint="Converts a querystring into a struct of name value pairs." | |
> | |
<cfargument name="QS" type="string" required=true /> | |
<cfargument name="Decode" type="Boolean" default=true /> | |
<cfargument name="Delimiter" type="String" default="," | |
hint="Used to delimit values provided from multiple keys of same name." | |
/> | |
<cfset var Results = StructNew() /> |
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 | |
{ | |
This.Name = "jsoup_with_cfhttp"; | |
This.JavaSettings = { LoadPaths:["./jsoup-1.7.2.jar"] }; | |
} |
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
<cffunction name="StructToQueryString" returntype="String" output=false access="public" | |
hint="Converts a struct into a url-encoded querystring." | |
> | |
<cfargument name="Data" type="Struct" required=true /> | |
<cfset var QS = '' /> | |
<cfif NOT StructCount(Arguments.Data)><cfreturn '' /></cfif> | |
<cfloop item="local.Key" collection=#Arguments.Data#> |
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
addAssertions( new path.to.below.Component() ); | |
$assert.isSameInstance( ObjA , ObjB ); |
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
\b(orm|sql|)type\s*+=\s*+\S+(?<=<cfproperty\s[^>]{1,500}|\sproperty\s[^;]{1,500}) |
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
function\s+\w+\(event,rc,prc\)\s++([^v}]++|v(?!ar\s++rc)|(?<!\n\t)\})*var\s++rc |
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 | |
{ | |
function init() | |
{ | |
this.stuff = {'a a':'a','b b':'b','c c':'c'}; | |
var keys = StructKeyList(this.stuff); | |
for (var i=1; i<=listLen(keys); i++) | |
{ |
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
<cffunction name="getRequestTimeout" output="false"> | |
<cfadmin | |
type="web" password="yourwebadminpassword" | |
action="getApplicationSetting" | |
returnvariable="local.DefaultAppSettings" | |
/> | |
<cfif DefaultAppSettings.AllowURLRequestTimeout AND StructKeyExists(Url,'RequestTimeout')> | |
<cfreturn createTimespan( 0 , 0 , 0 , Url.RequestTimeout ) /> |
NewerOlder