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
<cfif structKeyExists("form","username")> | |
<cfoutput> | |
<h2>Thank You, #form.username#</h2> | |
<br /> | |
<p>You are #form.age# years old.</p> | |
</cfoutput> | |
<cfelse> | |
<form method="post" action=""> | |
<label for="username">Name:</label> | |
<input type="text" name="username" /> |
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
<!---<cfoutput> | |
<cfset matrix = ArrayNew(2)> | |
<cfset num = 0> | |
<ul> | |
<cfloop from="1" to="3" index="row"> | |
<li style="font-size:30px;"> | |
<cfloop from="#row#" to="9" step="3" index="step"> | |
<span style="margin-top:5px;font-size:40px;display:inline"> | |
#step# | |
</span> |
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
<!---<cfoutput> | |
<cfset matrix = ArrayNew(2)> | |
<cfset num = 0> | |
<ul> | |
<cfloop from="1" to="3" index="row"> | |
<li style="font-size:30px;"> | |
<cfloop from="#row#" to="9" step="3" index="step"> | |
<span style="margin-top:5px;font-size:40px;display:inline"> | |
#step# | |
</span> |
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
<!---<cfoutput> | |
<cfset matrix = ArrayNew(2)> | |
<cfset num = 0> | |
<ul> | |
<cfloop from="1" to="3" index="row"> | |
<li style="font-size:30px;"> | |
<cfloop from="#row#" to="9" step="3" index="step"> | |
<span style="margin-top:5px;font-size:40px;display:inline"> | |
#step# | |
</span> |
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
<!---<cfoutput> | |
<cfset matrix = ArrayNew(2)> | |
<cfset num = 0> | |
<ul> | |
<cfloop from="1" to="3" index="row"> | |
<li style="font-size:30px;"> | |
<cfloop from="#row#" to="9" step="3" index="step"> | |
<span style="margin-top:5px;font-size:40px;display:inline"> | |
#step# | |
</span> |
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> | |
// Original in-memory query | |
employees = queryNew( | |
"id,name,dept,salary", | |
"CF_SQL_INTEGER,CF_SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_INTEGER", | |
[ | |
{ id: 1, name: "Alice", dept: "IT", salary: 50000 }, | |
{ id: 2, name: "Bob", dept: "HR", salary: 45000 }, | |
{ id: 3, name: "Carol", dept: "IT", salary: 52000 }, | |
{ id: 4, name: "Dan", dept: "Finance", salary: 47000 } |
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> | |
/** | |
* @returntype String | |
*/ | |
function foo(){} | |
</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> | |
/** | |
* @param foo bar | |
* @param foo2 bar2 | |
*/ | |
function foo( foo ) {} | |
writedump( getMetadata( foo ) ) | |
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
<!---<cfoutput> | |
<cfset matrix = ArrayNew(2)> | |
<cfset num = 0> | |
<ul> | |
<cfloop from="1" to="3" index="row"> | |
<li style="font-size:30px;"> | |
<cfloop from="#row#" to="9" step="3" index="step"> | |
<span style="margin-top:5px;font-size:40px;display:inline"> | |
#step# | |
</span> |
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> | |
fruits = ["apple", "banana", "cherry"]; | |
javaArray = javaCast("java.lang.Object[]", listToArray(arrayToList(fruits, ","))); | |
Arrays = createObject("java", "java.util.Arrays"); | |
Stream = Arrays.stream(javaArray); | |
stOutput = Stream.collect(createObject("java", "java.util.stream.Collectors").joining(", ")); | |
writedump(stOutput) | |
</cfscript> |