This file contains hidden or 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> | |
| hack = '{"COLUMNS":["*meh,col"],"DATA":[["twp"]]}'; | |
| writeDump(deserializeJSON(hack, false).getColumns()); | |
| writeDump(deserializeJSON(hack, false).getColumnNames()); | |
| </cfscript> |
This file contains hidden or 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> | |
| hack = '{"COLUMNS":["currency (£,$ & €)"],"DATA":[["GBP"],["USD"]]}'; | |
| writeDump(deserializeJSON(hack, false)); | |
| </cfscript> |
This file contains hidden or 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> | |
| error = "111-errore - prova"; | |
| msg = findNoCase(",", myList) | |
| </cfscript> |
This file contains hidden or 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> | |
| hack = '{"COLUMNS":["*meh,col"],"DATA":[["twp"]]}'; | |
| writeDump(deserializeJSON(hack, false)); | |
| </cfscript> |
This file contains hidden or 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 dStart = CreateDate(2000, 1, 1)> | |
| <cfloop from="1" to="700" index="iDayIndex"> | |
| <cfset dStart = DateAdd("d", 1, dStart)> | |
| </cfloop> |
This file contains hidden or 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> | |
| d = createDate( 2024, 1, 8 ); // Monday, January 8, 2024 | |
| writedump(dateFormat(d, "full")) | |
| // Monday + 5 working days = next Monday (Jan 15) | |
| r = dateAdd( "w", 5, d ); | |
| // BoxLang: Saturday, January 13, 2024 | |
| writedump(dateFormat(r, "full")) | |
| </cfscript> |
This file contains hidden or 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> | |
| itemData = { | |
| "ccRecipients" : [ | |
| "Bob", | |
| "Kate", | |
| "Mike" | |
| ] | |
| } | |
| for( cc = 1; cc <= structKeyExists( itemData, "ccRecipients" ) && arrayLen( itemData.ccRecipients ); cc++ ){ |
This file contains hidden or 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> | |
| newStartDate = createDate( 2018, 06, 29 ); | |
| writeDump( { | |
| newStartDate: newStartDate, | |
| wdateadd: dateadd( "w", 0, newStartDate ), | |
| ddateadd: dateadd( "d", 0, newStartDate ), | |
| mdateadd: dateadd( "m", 0, newStartDate ), | |
| wwdateadd: dateadd( "ww", 0, newStartDate ) |
This file contains hidden or 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
| <!--- variabel ---> | |
| <cfset mood = "calm"> | |
| <cfoutput> | |
| <h1>Hi!!!</h1> | |
| <p>Today is #dateFormat(now(), "mmmm dd, yyyy")#</p> | |
| <p>Today's mood is #mood#</p> | |
| </cfoutput> | |
| <!--- conditionals ---> |
This file contains hidden or 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 searchstr = "</q>asxasx</verse>"> | |
| <cfset searchrslts = refind('</.*?>',searchstr,1,true,'all')> | |
| <cfif arrayLen(searchrslts) GT 1> | |
| <cfloop from="#arrayLen(searchrslts)#" to="1" step="-1" index="i"> | |
| <cfset thisItem = searchrslts[i] /> | |
| <cfset insert(chr(10),searchstr,thisItem.pos+thisItem.len)> | |
| <cfset insert(chr(10),searchstr,thisItem.pos)> | |
| </cfloop> | |
| </cfif> | |
| <cfdump var="#searchstr#"> |
NewerOlder