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 keyvalue = '46316-46513'> | |
| <cfset encodedKeyValue = EncodeForURL(keyvalue)> | |
| <cfset encodedurl = EncodeForHTML('google.com')> | |
| <cflocation url='<cfoutput>#encodedurl#</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> | |
| q = new Query() | |
| writedump( getMetadata( q ).name ) | |
| org.lucee.cfml.Query function foo( returnMe ) { | |
| return arguments.returnMe; | |
| } | |
| foo( new Query() ) | |
| mappings = getApplicationMetadata().mappings; | |
| mappings[ '/foo/bar/' ] = "/root/.CommandBox/server/F356062DC4AF2270F3F3D74FA23057BA-sbx/lucee-5.4.8.2/WEB-INF/lucee-web/components/org/lucee/cfml/"; |
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
| <cfcomponent> | |
| <cfset PEDIGREE_TECH_API = 'https://oneview2.pedigreetechnologies.com/api/inspectionData.json?'> | |
| <cfset PEDIGREE_TECH_API_SERVICES = 'https://oneview2.pedigreetechnologies.com/services/api/'> | |
| <cfset hascURL ="https://www.hacsc.com/API/DataBatch/TrainingHistory/GetHistory"> | |
| <cfcookie name="PEDIGREE_TECH_DATA"> |
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> | |
| function test() blah="whatever" { | |
| return 3; | |
| } | |
| meta = getMetadata(test); | |
| writeDump(meta); | |
| </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 var x = structNew()/> | |
| <cfset n = 99.75/> | |
| <cfset x['a'] = n/> | |
| <cfset x['b'] = "some string"/> | |
| <cfset x['c'] = "$99.75"/> | |
| <cfoutput>#serializeJson(x)#</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> | |
| s = {}; | |
| s.num = 1; | |
| s1 = serializeJSON(s); | |
| </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 array = ['a','b','c','a']; | |
| var mystruct = {}; | |
| var arraynew = []; | |
| var len = arrayLen(array); | |
| for (var i = 1; i <= len; i++) { | |
| for (var j = i + 1; j <= len; j++) { | |
| // 1. Grab your two words |
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> | |
| private numeric function sortJsonLdKeys(any a = "", any b = "") { | |
| // @context comes first | |
| if (a == "@context") return -1; | |
| else if (b == "@context") return 1; | |
| // Meta properties like @context, @id and @type come second | |
| var aIsMeta = (left(arguments.a, 1) == "@"); | |
| var bIsMeta = (left(arguments.b, 1) == "@"); |
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> | |
| myStruct=StructNew(); | |
| myStruct={c="Berlin", a="London",b="Paris",d="New York",e="Dublin"}; | |
| mySort=StructSort(myStruct,"text","asc"); //Sorts the top level keys in the struct in ascending order | |
| WriteOutput(serializeJSON(myStruct)); | |
| </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 t = { t2:22, t:nullValue()}> | |
| <cfoutput>#serializeJSON(t)#</cfoutput> |
NewerOlder