Skip to content

Instantly share code, notes, and snippets.

<cfoutput>
<cfscript>
var rc = {};
var args.cacheKey = "xxxxxx";
var args.supplierName = "Something/ \soemthing & some ^ other thing";
var suppName = trim(args.supplierName) == "" ? "" : REReplaceNoCase(replace(trim(args.supplierName), " ", "", "all"), "[^a-z0-9]", "", "all");
var suppName = "";
if (trim(args.supplierName) !== "") {
<cfoutput>
<cfscript>
var rc = {};
var args.cacheKey = "xxxxxx";
var args.supplierName = "Something/ \soemthing & some ^ other thing";
var suppName = trim(args.supplierName) == "" ? "" : REReplaceNoCase(replace(trim(args.supplierName), " ", "", "all"), "[^a-z0-9]", "", "all");
var suppName = "";
if (trim(args.supplierName) !== "") {
<cfoutput>
<cfscript>
var rc = {};
var args.cacheKey = "xxxxxx";
var args.supplierName = "";
var suppName = trim(args.supplierName) == "" ? "" : REReplaceNoCase(replace(trim(args.supplierName), " ", "", "all"), "[^a-z0-9]", "", "all");
rc.fileName = "ap-#args.cacheKey# #suppName# #DateFormat(now(),'YYYY-MM-DD')#.xlsx";
writeDump(rc);
<cfscript>
writeDump(
var = 'hola',
label = 'test',
abort = true
);
</cfscript>
<cfset local.tStage = "">
<cfset local.tDocumentLabel = "MARRIAGECERT">
<cfif REFindNoCase("MARRIAGECERT|DIVORCEDECREE|SEPMAINTAGREEMENT|DEATHCERT|PHOTOID", local.tDocumentLabel)>
<cfset local.tStage = "UW">
</cfif>
<cfdump var="#local.tStage#">
<cfscript>
oSubject = '<div>To approve Trinity Air Conditioning invoice ##26032016 in the amount of $10,354.00 for work completed on an air conditioning unit at the LEC, to be paid from Dept. 511 with line(s) determined by the County Auditor.&nbsp;<br><br>Motion carried unanimously.&nbsp;<br></div>';
</cfscript>
<cfif len(oSubject) GTE 5 AND left(oSubject, 4) EQ "<div">
<cfset oSubject = reReplaceNoCase(oSubject, "<div[^>]*>", "<span \1>") />
<cfset oSubject = replaceNoCase(oSubject, "</div>", "</span>") />
</cfif>
<cfscript>writeOutput(encodeForHtml(oSubject));</cfscript>
<cfscript>
oSubject = '<div>To approve Trinity Air Conditioning invoice ##26032016 in the amount of $10,354.00 for work completed on an air conditioning unit at the LEC, to be paid from Dept. 511 with line(s) determined by the County Auditor.&nbsp;<br><br>Motion carried unanimously.&nbsp;<br></div>';
</cfscript>
<cfif len(oSubject) GTE 5 AND left(oSubject, 4) EQ "<div">
Hi!
<cfset oSubject = reReplaceNoCase(oSubject, "<div[^>]+>", "") />
<cfset oSubject = replaceNoCase(oSubject, "</div>", "") />
</cfif>
<cfscript>writeOutput(encodeForHtml(oSubject));</cfscript>
<cfscript>
cfhttp(url='https://tripxstorage.blob.core.windows.net/packages-stream-files/d42342a9-e945-3f33-a329-4ffa5730dee4/static-data/packages-full.ndjson', method='head', result='x')
writeDump(x.responseheader['last-modified']);
writeOutput(parseDateTime(x.responseheader['last-modified'], "UTC"))
</cfscript>
<cfscript>
cfhttp(url='https://tripxstorage.blob.core.windows.net/packages-stream-files/d42342a9-e945-3f33-a329-4ffa5730dee4/static-data/packages-full.ndjson', method='head', result='x')
writeDump(x.responseheader);
abort;
writeOutput(parseDateTime(x.Responseheader['.last-modified, "UTC"))
</cfscript>
<cfscript>
var s = {a: 1, b: 2};
writeDump({}.len());
</cfscript>