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> | |
s = 'eyJuIjoxLCJhIjpbXSwibGF0aW4xIjoiYWJjMTIzIiwiZm9vIjoi4oCgIiwiZSI6IvCfkb4ifQ=="'; | |
writeDump( DeserializeJSON( toString( toBinary( s ) ) ) ); | |
</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> | |
route = "/sources?limit=100&offset=100"; | |
path = listFirst( route, "?" ); | |
writeOutput( path ); | |
writeOutput( "<br/>" ); | |
writeOutput( "<br/>" ); | |
query = listRest( route, "?" ); |
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
<cftry> | |
<cfset a = b> | |
<cfcatch></cfcatch> | |
</cftry> |
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> | |
password = "mypassword"; | |
key = "GHIJKLMNOPQR!/$test"; | |
encrypted = encrypt(password, key); | |
decrypted = decrypt(encrypted, "KLMN"); | |
dump(encrypted); | |
dump(decrypted); |
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> | |
password = "mypassword"; | |
key = "GHIJKLMNOPQR!/$test"; | |
encrypted = encrypt(password, key); | |
decrypted = decrypt(encrypted, "KLMN"); | |
dump(encrypted); | |
dump(decrypted); |
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> | |
qry = querynew( "col1", "varchar", [ ["value1"], ["value2"] ] ) | |
</cfscript> | |
<cfoutput> | |
<cfloop query="qry"> | |
#col1# | |
</cfloop> | |
</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
<cfscript> | |
q = queryNew( [ | |
{ id: 10, label: "Ten" }, | |
{ id: 20, label: "Twenty" } | |
] ) | |
</cfscript> | |
<cfoutput> | |
<cfloop query="q"> | |
#q.label# |
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> | |
q = queryNew( [ | |
{ id: 10, label: "Ten" }, | |
{ id: 20, label: "Twenty" } | |
] ) | |
</cfscript> | |
<cfloop query="q"> | |
#q.currentrow# | |
</cfloop> |
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> | |
state = 1; | |
effDate = '5'; | |
if(state = 1 && isDate(effDate) && dateDiff( "d", now(), effDate ) > 0 ) | |
{ | |
throw(message='not yet effective'); | |
} | |
else | |
{ | |
throw('good'); |
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 time="19:50"> | |
<cfif time.find(":")> | |
<cfset local.hours = time.reMatch("(\d+):(\d+)(?::(\d+))?")> | |
<cfif arrayLen(local.hours) gt 0> | |
<cfset local.hours = local.hours[1]> | |
<cfset local.minutes = local.hours[2]> | |
<cfset local.seconds = local.hours[3]> | |
<cfif not isDefined("local.seconds")> | |
<cfset time = time & ":59"> | |
</cfif> |
NewerOlder