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> | |
studentName = "kabeer,Saad,Hamza,Ahmed,Kashif,Mohsin"; | |
foundidx = listFind(studentName, "Kabeer") | |
writeOutput(foundidx); | |
if(foundidx == 0){ | |
writeOutput("Nothing is found"); | |
}else{ | |
writeOutput("something is #foundidx# found"); | |
} | |
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> | |
str = "≥"; | |
writeDump(decodeforhtml(str)); //outputs ≥ | |
str = "&ge"; | |
writeDump(decodeforhtml(str)); //also outputs ≥ | |
</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> | |
str = "&ge"; | |
writeDump(decodeforhtml(str)); //outputs ≥ | |
str = "≥"; | |
writeDump(decodeforhtml(str)); //outputs ≥ | |
</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("#dateformat(now(),"mm/dd/yyyy")# #timeformat(now(), "hh:mm:ss")#") | |
</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> | |
// Plaintext | |
plaintext = "Secret message that needs AES encryption."; | |
// Use raw binary | |
// AES requires a 16, 24, or 32 byte key (128, 192, 256 bits). | |
// Here we'll use a 32-byte (256-bit) key for AES-256. | |
keyBin = BinaryDecode("00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF", "hex"); | |
// Convert to Base64 strings for use with encrypt() |
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 content = "1234567890"; | |
var length = 10; | |
content &= (length lt 100 ? RepeatString("", 100 - length) : "") & chr(13) & chr(10); | |
writeDump(content); | |
writeDump(RepeatString("", 100 - length)); | |
</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 string1 = " Hello "> | |
<cfset string2 = " World! "> | |
<cfset response = string1 & string2> | |
<cfoutput>#response#</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
<cfset a = ""> | |
<cfif isdefined("A")> | |
yes | |
<cfelse> | |
no | |
</cfif> | |
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 a = ""> | |
<cfif isdefined(a)> | |
yes | |
<cfelse> | |
no | |
</cfif> |
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 day1 = "monday"> | |
<cfset day2 = "MONDAY"> | |
<cfif day1 eq day2> | |
hello | |
<cfelse> | |
no | |
</cfif> |
NewerOlder