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> | |
| var someString = "This is line 1" & newLine() & "This is line 2"; | |
| <cfoutput>#someString#</cfoutput> | |
| </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> | |
| var someString = "This is line 1" & newLine() & "This is line 2"; | |
| </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> | |
| //writeDump( arrayMap( queryNew("c").getClass().getDeclaredMethods(), m=>m.toString()) ) | |
| q = queryNew("name","varchar",[["Brad"],["Luis"],["Jon"]]) | |
| while( q.next() ) { | |
| writeDump( q.getObject( "name" ) ) | |
| } | |
| </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> | |
| dump( dateFormat( "01-31-2026 23:59:59" ) ) | |
| </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> | |
| startTime = getTickCount(); | |
| arr = []; | |
| for (var i = 1; i <= 9999; i++) { | |
| arrayappend(arr,i); | |
| } | |
| endTime = getTickCount(); | |
| Time = endTime - startTime; | |
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> | |
| a = [0]; | |
| writeDump([a[1]?:2, a[3]?:4, a.len()]); | |
| function arrayCompare(required array arr1, required array arr2, boolean order = false) { | |
| if (ArrayLen(arr1) != ArrayLen(arr2)) { | |
| return false; | |
| } |
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> | |
| qry = queryNew( "col", "varchar", [["brad"]] ); | |
| </cfscript> | |
| <cfquery name="result" dbtype="query"> | |
| SELECT * | |
| FROM qry | |
| WHERE col = <cfqueryparam value="brad"> | |
| </cfquery> | |
| <cfdump var="#result#"> |
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 local.header = "Microsoft-Azure-Application-Gateway/v2"> | |
| <!--- header such as awselb/2.0 or Microsoft-Azure-Application-Gateway/v2 are ok ---> | |
| <cfif NOT reFind("^(awselb|Microsoft-Azure-Application-Gateway)/v?[0-9.]+$", local.header)> | |
| BAD HEADER | |
| <cfelse> | |
| ALLOW | |
| </cfif> | |
| <Br> | |
| <cfoutput>#local.header#</cfoutput> |
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> | |
| calltest(); | |
| function callTest () { | |
| var test = "hello"; | |
| writedump(variables.test); | |
| } | |
| </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> | |
| writeOutput("'" & chr(10) & "'"); | |
| </cfscript> |
NewerOlder