Skip to content

Instantly share code, notes, and snippets.

<cfscript>
// CFScript version
var objDto = {
"zuzu": "string",
"opa": "string",
"nome": "string",
}
writedump(objDto);
<cfscript>
// create the query with safe col names
qry = QueryNew("test_test,colTwo");
queryaddrow( qry );
querysetcell( qry, "test_test", 123 );
querysetcell( qry, "colTwo", "abc" );
qry.setColumnNames(["test test","colTwo"]);
<!-- Input Form -->
<form action="processNumber.cfm" method="post">
Enter the number: <input type="text" name="num">
<input type="submit" value="Submit">
</form>
<!-- Processing the Input -->
<!--<cfif CGI.REQUEST_METHOD EQ 'POST'></cfif>-->
<cfif StructKeyExists(form, "num") AND Len(form.num) GT 0>
<cfset num = Val(form.num)> <!-- Convert input to numeric -->
<cfscript>
runs = [
{ totalDuration: 10},
{ totalDuration: 20},
{ totalDuration: 30}
];
//dump(runs);
arraySort(
<cfscript>
runs = [
{ totalDuration: 10},
{ totalDuration: 20},
{ totalDuration: 30}
];
//dump(runs);
arraySort(
<cfscript>
runs = [
{ totalDuration: 10},
{ totalDuration: 20},
{ totalDuration: 30}
];
dump(runs);
arraySort(
<cfscript>
private struct function getBlankRateBodyStruct() output = "false" hint = "return default rate body struct" {
var jsonString = {
"RateRequest": {
"Request": {
"TransactionReference": {
"CustomerContext": ""
}
<cfscript>
private struct function getBlankRateBodyStruct() output = "false" hint = "return default rate body struct" {
var jsonString = {
"RateRequest": {
"Request": {
"TransactionReference": {
"CustomerContext": "CustomerContext"
}
<cfscript>
local.strText - "<a href="%pageID:12148%/test1">test1</a>
<div class="service-card-wrapper">
<div class="_2 service-icon"></div>
</div>
<div><a href="%pageID:2211%/test2">test2</a></div>
";
local.aryLinks = [];
local.javaInt1 = javaCast("int", 1);