Introduction:
Platform created by J.J Allaire in 1995.
Designed to make it easier connect simple html pages to a database.
Create server side web applications quickly with less code.
What it do:
Can build websites.
Allow user to upload files.
Create / read files on server.
Downloading:
Adobe is the company that produces cold fusion.
Open windows+R run and type optional features.exe and select all checkboxes all should be on and then continue installation.
CFML is, as the name would suggest, a markup language.
Number of tags.
<(opening) and />(closing tag).
Contain one or more attributes.
Container that stores a value.
cfset:
surround the variable name with # symbols.
Enclose it with in <cfoutput> tags
cfparam:
Creates a variable if it doesnot already exist.
Assign default value using default variable.
Datatypes:
Strings/Numbers:
use the cfset command.
Append strings/numbers use & operator.
<cfset aString ="hi"/>
<cfset aNumber = 42/>
<cfset a StringAndANumber = aString & a Number />
Dates:
Built in functions like now()
<cfset DateToday = now() />
Arrays:
Ordered series of data.
<cfset Things = arrayNew() />
Structs:
Collection of data stored by a key or name.
<cfset Fruit = structNew() />
Queries:
Record sets.
Hello world program:
Loops:
Loop is a block of code that executes continuously either a specified number of times, once for each element in an object, or while a condition is true.
Index:
Loop that continues for specified number of times.
Conditional:
Executes while a condition is true.
List:
You can loop over a list.
Mathematical functions:
Abs : Return the absolute value of a number.
ArraySum : Returns the sum of all elements in an array.
BitAnd : Performs a bitwise logical AND operation.
BitNot : Performs a bitwise logical NOT operation.
Ceiling : Determines the closest integer that is greater than a specified number.
Floor : Returns the largest integer less than or equal to a specified number.
Max : Determines the greater of two numbers.
Min : Determines the lesser of two numbers.
Round : Rounds a number to the closest integer.
Sqr : Calculates the square root of a number.
Adding two strings:
Rectangle:
Digit identification:
Highest repeated character: