Skip to content

Instantly share code, notes, and snippets.

<cfcache action='optimal' timespan='#createTimeSpan( 1, 0, 0, 0 )#' idletime='#createTimeSpan( 0, 12, 0, 0 )#'>
<div id="some-id">Hello World!</div>
</cfcache>
<cfcache action='optimal' timespan='#createTimeSpan( 1, 0, 0, 0 )#' idletime='#createTimeSpan( 0, 12, 0, 0 )#'>
<div id="some-id">Herllo Worrld!</div>
</cfcache>
<cfcache action='optimal' timespan='#createTimeSpan( 1, 0, 0, 0 )#' idletime='#createTimeSpan( 0, 12, 0, 0 )#'>
<div id="some-id">Hello Worrld!</div>
</cfcache>
<cfscript>
x = createDateTime( 2026, 03, 20, 17, 23, 00 );
writeDump( TimeFormat( x,'HH-nn' ) ); // 17-23
writeDump( TimeFormat( x,'HH:nn' ) ); // 17:23
</cfscript>
<cfscript>
public boolean function isNumber(any val) {
if (!isNumeric(arguments.val)) return false;
if (find(" ", arguments.val) return false;
// 0001890 is not strict numeric -> serialize as string
if (arguments.val >= 1 && left(arguments.val, 1) == "0") return false;
// .111111 is not strict numeric -> serialize as string
if (left(arguments.val, 1) == ".") return false;
// 111111. is not strict numeric -> serialize as string
<cfscript>
say = (msg) => writeOutput(msg);
say(goodbye);
</cfscript>
<cfsavecontent variable="goodbye">
<svg
viewBox="0 0 1200 700"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-label="Goodbye old TryCF, Hello new TryCF"
width="100%"
height="100vh"
preserveAspectRatio="xMidYMid meet"
<cfsavecontent variable="goodbye">
<svg
viewBox="0 0 1200 700"
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-label="Goodbye old TryCF, Hello new TryCF"
width="100%"
height="100vh"
preserveAspectRatio="xMidYMid meet"
<cfscript>
goodbye = (friend) => (writeOutput('<h1>👋 Goodbye #friend#</h1>'));
goodbye('TryCF');
</cfscript>
<cfscript>
goodbye = (friend) => (writeOutput('<h1>👋 Goodbye #friend#</h1>'));
goodbye('TryCF');
</cfscript>