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> | |
| x = 1 | |
| switch ( x ) { | |
| case 1:case 2:case 3:case 4:case 5: | |
| // DO A | |
| break; | |
| case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13: | |
| // DO B | |
| break; | |
| case 14:case 15:case 16: |
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> | |
| something = '{"something": null}'; | |
| writedump(deserializejson(something)); | |
| </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
| <!---<cfinput type="date" name="endDate" id="endDate" required="no" mask="MM/dd/yyyy" class="dateField">---> | |
| <!---<cfinput name="stDate" type="datefield" label="date:" mask="mm/dd/yyyy"/>---> | |
| <!---<cfcalendar name="myDate" value="#now()#">---> | |
| <input type="date" name="myDate" value="#dateFormat(now(),'yyyy-mm-dd')#"> | |
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
| <!---<cfinput type="date" name="endDate" id="endDate" required="no" mask="MM/dd/yyyy" class="dateField">---> | |
| <!---<cfinput name="stDate" type="datefield" label="date:" mask="mm/dd/yyyy"/>---> | |
| <!---<cfcalendar name="myDate" value="#now()#">---> | |
| <input type="date" name="myDate" value="#dateFormat(now(),'yyyy-mm-dd')#"> | |
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> | |
| </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 x = Floor((0.29 *100))> | |
| <cfset a = 0.29 * 100> | |
| <cfset y = Int(x)> | |
| <cfoutput>x=#x#</cfoutput> | |
| <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
| <cfset x = Floor((0.29 *100) + 0.01)> | |
| <cfset a = 0.29 * 100> | |
| <cfset y = Int(x)> | |
| <cfoutput>x=#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
| <cffunction name="displayEmployeeName" returntype="void" output="true"> | |
| <cfargument name="dataSourceName" type="string" required="true"> | |
| <cfargument name="sEmployeeID"> | |
| <cfquery name="qEmployeeName" datasource="#arguments.DataSourceName#"> | |
| SELECT | |
| firstname | |
| ,lastname | |
| FROM employee WITH (nolock) |
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
| <!--- | |
| Intent (goal): return one submission record. | |
| [BAD] url.submissionId is user input. | |
| [BAD] tenant-only scoping without object-level checks. | |
| [BAD] serialise and return without a policy decision. | |
| ---> | |
| <cfparam name="url.submissionId" type="string" /> | |
| <cfset tenantId = session.tenantId /> | |
| <cfset submissionId = url.submissionId /> <!--- [BAD] user-controlled identifier ---> | |
| <cfquery name="qSubmission" datasource="appDSN"> |
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
| <!--- | |
| Intent (goal): return one submission record. | |
| [BAD] url.submissionId is user input. | |
| [BAD] tenant-only scoping without object-level checks. | |
| [BAD] serialise and return without a policy decision. | |
| ---> | |
| <cfparam name="url.submissionId" type="string" /> | |
| <cfset tenantId = session.tenantId /> | |
| <cfset submissionId = url.submissionId /> <!--- [BAD] user-controlled identifier ---> | |
| <cfquery name="qSubmission" datasource="appDSN"> |
NewerOlder