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> | |
numbers = [ | |
one = "tahi", | |
two = "rua", | |
three = "toru", | |
four = "wha" | |
] | |
cfwddx(action="cfml2wddx", output="asWddx", input=numbers) | |
cfwddx(action="wddx2cfml", output="asStruct", input=asWddx) |
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
<cffunction name="createLink"> | |
<cfargument name="arg_regId" type="string" required="true"> | |
<cfargument name="arg_attendNo" type="string" required="true"> | |
<cfargument name="first_name" type="string" required="true"> | |
<cfargument name="last_name" type="string" required="true"> | |
<cfargument name="reg_code_for_fees" type="string" required="true"> | |
<cfargument name="event_title" type="string" required="true"> | |
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
<cffunction name="createLink"> | |
<cfargument name="arg_regId" type="string" required="true"> | |
<cfargument name="arg_attendNo" type="string" required="true"> | |
<cfargument name="first_name" type="string" required="true"> | |
<cfargument name="last_name" type="string" required="true"> | |
<cfargument name="reg_code_for_fees" type="string" required="true"> | |
<cfargument name="event_title" type="string" required="true"> | |
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> | |
pattern = ""; | |
tests = { | |
validLotNo1 = "1234567A", | |
validLotNo2 = "12345678", | |
validLotNo3 = "12A", | |
invalidLotNo1 = "", | |
invalidLotNo2 = "A", | |
invalidLotNo3 = "1234567^" | |
}; |
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> | |
pattern = ""; | |
tests = { | |
validLotNo1 = "1234567A", | |
validLotNo2 = "12345678", | |
validLotNo3 = "12A", | |
invalidLotNo1 = "", | |
invalidLotNo2 = "A", | |
invalidLotNo3 = "1234567^" | |
}; |
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> | |
<!---array1=[{'fruit'='mango','rating'=3},{'fruit'='grapes','rating'=4},{'fruit'='lemon','rating'=2}]; | |
filteredvalue=arrayFilter(array1,funtion(item) | |
{ | |
return item.rating >= 2; | |
}); | |
writeDump(serializeJSON(filteredvalue));---> |
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> | |
originalText = "Hello World!"; | |
// Step 1: Convert string to binary | |
binaryData = ToBinary( ToBase64(originalText) ); // this is NOT what you want here | |
// Instead: Convert string to raw bytes (Java-style) | |
byteArray = CharsetDecode(originalText, "utf-8"); | |
// Step 2: Encode binary to Base64 |
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> | |
originalText = "Hello World!"; | |
// Step 1: Convert string to binary | |
binaryData = ToBinary( ToBase64(originalText) ); // this is NOT what you want here | |
// Instead: Convert string to raw bytes (Java-style) | |
byteArray = CharsetDecode(originalText, "utf-8"); | |
// Step 2: Encode binary to Base64 |
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> | |
originalText = "Hello World!"; | |
// Step 1: Convert string to binary | |
binaryData = ToBinary( ToBase64(originalText) ); // this is NOT what you want here | |
// Instead: Convert string to raw bytes (Java-style) | |
byteArray = CharsetDecode(originalText, "utf-8"); | |
// Step 2: Encode binary to Base64 |
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> | |
// Use a 16-byte (128-bit) AES key | |
key = "12345678901234567890123456789012"; // 16 characters | |
// Text to encrypt | |
originalText = "kiosk"; | |
// Encrypt the text (returns Base64 string) | |
encryptedBinary = encrypt(originalText, key, "AES", "Base64"); | |
NewerOlder