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> | |
<!--- Abaikan cara pembuatan tabel di ColdFusion tanpa menggunakan database ---> | |
<cfset tblemployee = queryNew("emp_id, emp_name, pos_id")> | |
<cfset queryAddRow(tblemployee, 5)> | |
<cfset querySetCell(tblemployee, "emp_id", "1", 1)> | |
<cfset querySetCell(tblemployee, "emp_name", "Ben", 1)> | |
<cfset querySetCell(tblemployee, "pos_id", "3", 1)> | |
<cfset querySetCell(tblemployee, "emp_id", "2", 2)> | |
<cfset querySetCell(tblemployee, "emp_name", "Ana", 2)> | |
<cfset querySetCell(tblemployee, "pos_id", "3", 2)> |
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="getCompleteHazardHuntsMonthlyOverview" returntype="any" access="remote" output="true" > | |
<cfargument name="company_code" type="numeric" required="yes"> | |
<cfargument name="start_date" type="string" required="yes"> | |
<cfargument name="end_date" type="string" required="yes"> | |
<cfargument name="status" type="numeric" required="no" default="0"> | |
<cfargument name="dateformat" type="string" required="no" default="mm/dd/yyyy"> | |
<cfargument name="data" type="string" required="no" > | |
<cfargument name="canvas_chart" type="string" required="yes"> | |
<cfargument name="chart_type" type="string" required="yes"> |
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> | |
stats = createObject("java", "java.util.DoubleSummaryStatistics").init(); | |
numbers = [9.5,20,25,30.5]; | |
for (n in numbers) { | |
stats.accept(javaCast("double", n)); | |
} | |
</cfscript> | |
<cfoutput> | |
Avg: #stats.getAverage()#<br> | |
Min: #stats.getMin()#<br> |
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 = "9+9"; | |
r = reReplaceNoCase( str, "([+])", "\\\1", "all" ) | |
writeDump( r ); | |
// ACF : 9\+9 | |
// Lucee : 9\\+9 | |
// boxlang : 9\\\19 | |
</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> | |
a = { | |
"middle": 5, | |
"last": 10, | |
"first": 1 | |
}; | |
x = structSort(a, 'numeric', 'asc'); | |
writeDump( x ); | |
/* |
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 source ="test.pdf" /> | |
<cfset output = listFirst(source, ".") & dateTimeFormat(now(),"yyyymmddhhnnss") & ".pdf" /> | |
#output# | |
</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
<cfoutput> | |
<cfset source ="test.pdf" /> | |
<cfset output = listFirst(source, ".") & dateTimeFormat(now(),"yyyy_mm_dd_hh_nn_ss") & ".pdf" /> | |
#output# | |
</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
<cfoutput> | |
<cfset source ="test.pdf" /> | |
<cfset output = listFirst(source, ".") & dateFormat(now(),"yyyy_mm_dd_hh_nn_ss") & ".pdf" /> | |
#output# | |
</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
<cfoutput> | |
<cfset source ="test.pdf" /> | |
<cfset output = listFirst(source, ".") & dateFormat(now(),"yyyy_mm_dd_hh_nn_ss") & ".pdf" /> | |
</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> | |
function archMemExpCompare(exp){ | |
//change return to however the front end needs it | |
checkDate = createDateTime(2026,03,31,0,0,0); | |
return exp >= now().getTime() ? 'yes':'no'; | |
} | |
writeOutput(archMemExpCompare(1743479999000)); | |
NewerOlder