Skip to content

Instantly share code, notes, and snippets.

<cfscript>
if(1 EQ 2) {
nope = 'Equal'
} else {
yep = 'NotEqual'
}
//This would error since it was never created in the if
//writeDump(nope)
<cfscript>
if(1 EQ 2) {
nope = 'Equal'
} else {
yep = 'NotEqual'
}
//This would error since it was never created in the if
if( isDefined("nope") ) {
<cfscript>
var testQuery = QueryNew('abcd');
QueryAddRow(testQuery);
query name="local.qry" dbtype="query" params={paramValue:{type:'cf_sql_integer',value:'1'}} {
echo("
select :paramValue as Number, 'a' as Letter from testQuery
union select
");
queryparam value="1" ;
<cfscript>
path = replace(expandPath('/assets/'), '/assets/', '/uploads/');
iteOutput(path);
</cfscript>
<cfscript>
</cfscript>
<cfset termID1 = "<b>3rd Grade Math</b>">
<cfset termID2 = ''>
<cfset termID3 = 3>
<cfset termID4 = 4>
<cfset iCtr = 1>
<cfoutput>
<cfset local.guidelines = "SASB IF-WM-420a.1, SASB RT-AE-150a.1, SASB RT-CH-150a.1, SASB RT-EE-150a.1"/>
<cfset local.guidelineParts = listToArray(local.guidelines)/>
<cfloop item="local.currentGuideline" array="#local.guidelineParts#">
<cfset local.guidelineClear = local.currentGuideline.Split(".")[1] />
<cfdump var="#local.guidelineClear#" />
</cfloop>
<cfscript>
people = [
{
firstName: "John",
lastName: "Doe",
age: 30,
email: "john.doe@example.com"
},
{
firstName: "Jane",
<cfscript>
var contactIds = [];
var tests = {
1 : '123',
2: '444,321',
3: 555
}
var test1 = '123'
var test2 = '123,321'
var test3 =
<cffunction name="makeXFDF">
<cfargument name="data" type="struct">
<cfoutput>
<cfxml variable="local.ret">
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<cfloop list="#structKeyList(arguments.data)#" index="el">
<field name="#el#">
<value>#arguments.data[el]#</value>