Skip to main content

Posts

Showing posts with the label poorest

How to use variable prefixes in ColdFusion

ColdFusion variable prefixes VariablePrefixes.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>coldfusion variable prefixes - how to use in coldfusion application</title> </head> <body> <h2 style="color:DarkBlue; font-style:italic">coldfusion variable prefixes example: how to use</h2> <hr width="500" align="left" color="LightBlue" /> <br /> <!--enable session management in application.cfm file--> <cfset Variables.MyNumber=2> <cfset Session.MyNumber=5> <cfset Application.MyNumber=10> <cfset Total=MyNumber+MyNumber+MyNumber> <cfset TotalWithPrefixes=Variables.MyNumber+Session.MyNumber+Application.MyNumber> <table border="0" cellpadding="2" cellspacing="2" bgcolor=...

ColdFusion variables typeless feature

ColdFusion Variables are typeless TypelessVariables.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ColdFusion Variables are typeless - how to test variables typeless feature</title> </head> <body> <h2 style="color:SeaGreen; font-style:italic">ColdFusion Variables are typeless example: how to verify</h2> <hr width="600" align="left" color="DarkSeaGreen" /> <br /> <cfset TestNumber=5> <cfset TestString="20"> <cfset SampleMath=TestNumber*TestString> <cfset SampleString="First Number: " & TestNumber & " Second Number: " & TestString> <table border="0" cellpadding="2" cellspacing="2" bgcolor="OrangeRed"> <tr style="b...

ColdFusion number and date format mask

coldfusion functions masks FunctionsMasks.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>coldfusion functions masks - how to use masks in coldfusion functions</title> </head> <body> <h2 style="color:DarkBlue; font-style:italic">coldfusion functions masks example: how to use</h2> <hr width="450" align="left" color="LightBlue" /> <br /> <cfset Salary=1525> <cfset SalaryWithMask=NumberFormat(Salary,"$")> <cfset ToDay=DateFormat(Now())> <cfset ToDayWithMask=DateFormat(Now(),"mmmm-dd-yyyy")> <table border="0" cellpadding="2" cellspacing="2" bgcolor="DeepPink" width="250"> <tr style="background-color:OrangeRed; color:Snow; font-si...

ColdFusion dynamic variables

coldfusion dynamic variables DynamicVariables.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>coldfusion dynamic variables - how to create and use in coldfusion</title> </head> <body> <h2 style="color:DarkBlue; font-style:italic">coldfusion dynamic variables example: how to use</h2> <hr width="500" align="left" color="LightBlue" /> <br /> <cfset ColorName="Crimson"> <cfset "#ColorName#"="Red type color"> <cfdump var="#Variables#"> <br /> <table border="0" cellpadding="2" cellspacing="2" bgcolor="DeepPink" width="250"> <tr style="background-color:Crimson; color:Snow; font-size:large;"> <td...

ColdFusion CFscript - Do while loop in script

cfscript - do while loop in script cfscriptDoWhile.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfscript tag: How to use do while loop in cfscript</title> </head> <body> <h2 style="color:DodgerBlue; font-style:italic">cfscript example: do while loop</h2> <hr width="350" align="left" color="PaleVioletRed" /> <h4 style="color:SeaGreen;"> <cfscript> counter = 1; do{ WriteOutput("Current Position: #counter# <br />") ; counter = counter+1; } while(counter LTE 6); </cfscript> </h4> </body> </html> More ColdFusion examples cftry and cfcatch - catch exception and handle error cfdiv cfscript - if else conditiona...

ColdFusion CFscript - Create Structure in script

cfscript - structure in script cfscriptStructure.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfscript tag: How to create and use structure in cfscript</title> </head> <body> <h2 style="color:DodgerBlue; font-style:italic">cfscript example: Structure</h2> <hr width="350" align="left" color="PaleVioletRed" /> <br /> <cfscript> ColorStruct = StructNew(); ColorStruct.Name = "BlueViolet"; ColorStruct.Value = "##8A2BE2"; </cfscript> <cfif IsDefined("ColorStruct")> <cfdump var="#ColorStruct#"> </cfif> </body> </html> More ColdFusion examples cfscript - if else conditional statement in script cfscript - switch, case, default statement in script cfw...

ColdFusion - How to get server parformace metrics

GetMetricData() - get server parformace metrics GetMetricData.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>GetMetricData function example: how to get server parformace metrics</title> </head> <body> <h2 style="color:Crimson">GetMetricData Function Example</h2> <cfset MetricDataPERF=GetMetricData("perf_monitor")> <cfdump var="#MetricDataPERF#" label="Metric Data[perf_monitor]"> <cfset MetricDataSimpleLoad=GetMetricData("simple_load")> <cfset MetricDataPreviousReqTime=GetMetricData("prev_req_time")> <cfset MetricDataAvgReqTime=GetMetricData("avg_req_time")> <cfoutput> <b>MetricData Simple Load[simple_load]:</b> #MetricDataSimpleLoad# <br /> <b>MetricData Pre...