Elance Adobe ColdFusion Test Answers 2015



I need to make multiple, related changes to a database, but all those changes must be made w/o errors before I actually commit them. Which tag should I use?
cftry and cfcatch
cfrollback
cftransaction
cfupdate


Which of the following always returns TRUE?
IsDefined("CGI.cgivariable")
IsDefined("REQUEST.requestvariable")
IsDefined("FORM.formfield")
IsDefined("URL.urlvariable")


In a custom tag, which of the following make variable x available on the calling page?
<cfset THIS.x = 123>
<cfreturn x>
<cfset CALLEE.x = 123>
<cfset CALLER.x = 123>
Without mentioning the page in question is using a custom tag, all the answers are true to some extent.


What happens to your session when the CF Server is restarted?
You lose the session
Your session remains the same
Your session can be activated back if you have the CFID and CFToken


Can you nest one ColdFusion comment inside of another ColdFusion comment?
No
Yes


Determine the output below: <cfset session.name = "Dave"> <cfset variables.name = "John"> <cfset application.name = "TestApp"> <cfset server.name = "TestServer"> <cfoutput>#name#</cfoutput>
TestServer
TestApp
No output. An error will be thrown.
John
Dave


Exceptions that are handled and catched by a <cfcatch> tag are automatically logged in the Application.log file.
FALSE
TRUE


Which of these is a valid CFML tag?
cfsave
cfsilent
cfenter
cfdraw
cfwrite


ColdFusion is compiled to what prior to execution?
Active Server Pages
Java bytecode
HTML
CFML


I want to use a CFC function as a web service. I should set the access attribute of that function to:
package
public
remote
private


In ColdFusion 10, Adobe replaced their JRun application server with:
Tomcat
Zend
Jetty
Mono


True or False? You cannot use multiple <cfmailparam> tags inside of a <cfmail> tags.
False
True


True or False? You can run a PL/SQL or TSQL block inside a cfquery.
FALSE.
TRUE.


If I suspect my ColdFusion is encountering errors while sending email via SMTP, where should I look for clues?
in the mail.log file inside the ColdFusion log directory
ask the administrator of the email server for help
in the error.log file inside the ColdFusion log directory
in the output of a <cfcatch type="email"> tag


<cfform> variables are stored in what?
a list called FORM
a structure called FORM
an array called POST
an array called FORM


True or False: You can manage multiple ColdFusion servers from a single view within Adobe ColdFusion Builder?
True
False


In a ColdFusion component, an init() method is mandatory
Yes, without it, you cannot create an object for that CFC
No. Its just a convention


Which of the following is not a ColdFusion application framework?
FuseBox
ColdBox
Zend
CFWheels
Framework 1 (FW/1)


Where can I find the Code Compatibility Analyzer?
It comes with the FuseBox framework.
In the Debugging & Logging section of your ColdFusion Administrator interface.
You have to download and install it from Adobe's ColdFusion page.


What is the default delimiter when looping through a list with <cfloop>?
period (.)
comma (,)
space ( )
None of these


True or False: Unlike many programming languages, the first index in an array in Coldfusion is 1, instead of 0.
True
False


What is the modulus operator in CFML?
#%
%
##
Mod


<cffunction name="myFunction"> <cfargument name="arg1" default="Default"> <cfreturn arg1> </cffunction> <cfoutput>#myFunction()#</cfoutput> What will be outputted after the above code is executed?
An empty string.
The string 'Default'.
An error because the required attribute in the cfargument tag defaults to true.


Which Client variables are reserved?
Client.LastVisit
Client.CFID
All of these
Client.CFToken


Using CFML, how does one check to see if a variable called #myVarName# exists?
<cfif myVarName>...</cfif>
<cfif IsDefined(myVarName)>...</cfif>
<cfif IsDefined(#myVarName#)>...</cfif>
<cfif IsDefined("myVarName")>...</cfif>


What is the correct output in the following code: <cfset sweek = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" /> <cfoutput>#ListGetAt(sweek, 3)#</cfoutput>
Wednesday
n
Thursday
3


Arrays in ColdFusion start at which index?
-1
0
1
None of these.


I want to invoke a CFC method from within a <cfscript> tag. Which function must I use to do this?
ToScript
CreateObject
ObjectLoad


What is the Code Compatibility Analyzer?
a tool that analyzes and optimizes your SQL queries
a tool that reviews older cfm pages for deprecated and unsupported cfml tags.
a tool that helps you debug JSON-related issues.


The CGI scope is read only
True
False


The following code does what? <cfoutput>#DateFormat(Now(), "m/d/yyyy")#</cfoutput>
Converts the current date to a numeric value
Prints the current date in M/D/YYYY format
Prints the current date in MM/DD/YY format
Prints the current date in MM/DD/YYYY format


Which is a required method in Application.cfc?
OnBeginRequest
OnApplicationStart
OnRequestEnd
OnError


Which of these is NOT a valid CFML tag?
cfscript
cfsilent
cfchoice
cfloop
cfquery


Which of these is the correct syntax for a CFML comment?
<!-- my comment -->
/ my comment /
<cfcomment>my comment</cfcomment>
<!--- my comment --->
* my comment *


Which is a required attribute of <cfmail>?
subject
to
from
All of these


<cfform> controls cannot be stylized using CSS like conventional HTML form controls.
True. CFML form controls are different from conventional HTML form controls, and thus require to different styling/formatting mechanisms
False. CFML form controls are rendered by the browser as conventional HTML form controls and can be formatted/stylized the same way.


Which of the following ISN'T a method you'd expect to find in Application.cfc?
OnApplicationEnd
OnServerStart
OnSessionEnd
OnRequest
OnApplicationStart


True or False? The <cfregistry> tag is deprecated on UNIX platforms.
True
False


What ColdFusion tag should one use to help prevent a possible race condition scenario?
cfapplication
Unnecessary, because ColdFusion handles this automatically.
cfmodule
cflock
cfthread


Which of the following is NOT a valid scope type in ColdFusion?
server
form
request
client
component


True or false: It is necessary to add a default parameter in a function whose required type is set to no.
True
False


How would you access the first element of an array called attendees?
attendees[0]
attendees[1]


True or False: code within a CFThread tag body actually executes as a function call.
False
True


Which ColdFusion tag invokes a custom tag for use in ColdFusion application pages?
cfmodule
cfassociate
cfinterface
cfimport


The <cffeed> tag can:
Read and create both RSS and Atom feeds.
Can read and create RSS feeds, but not Atom feeds.
Read, but not create, RSS and Atom feeds.
Create, but not read, RSS and Atom feeds.


What does the name attribute of the <cfhttp> tag do?
Nothing. There is no name attribute for the <cfhttp> tag.
It specifies which remote server you want ColdFusion to contact.
It tells ColdFusion the name of the file you want to retrieve from the remote server.
It creates a query object from the returned HTTP response body with the name you provide.


What should I do if I've forgotten the CF Administrator password on a ColdFusion 10 server?
Delete the neo-security.xml configuration file, and generate a new one from within the CF Administrator.
Edit the password in your neo-security.xml file.
Use the passwordreset script inside the bin folder to create a new password.


In the Directory Watcher event gateway's configuration file, which of the following property is required?
directory
extensions
recurse
interval


True or False? In ColdFusion 10, if you don't specify strict attribute for <CFFILE action="upload">, you should specify MIME types for the accept attribute.
FALSE
True


<cfset x = 123> <cfif x == 123> Hello <cfelse> Goodbye </cfif> The above code will result in:
'Goodbye' printed.
'Hello' printed.
An error.


ColdFusion syntax supports a do-while loop
False
True


Determine the output below: <cfset items = "abc,efg,hij;klm;nop,qrs,tuv"> <cfset item = ListGetAt(items, 2, ";")> <cfoutput> #item# </cfoutput>
nop,qrs
klm;
;klm
klm
efg


Which of the following is correct format of comment within <cfscript> block?
# this is a comment
<!--- this is a comment --->
/* This is a comment
// this is a comment


What is the correct way of getting the last_name of a user from a <cfquery> tag below? <cfquery name="qryUsers" datasource="dsn_name"> SELECT first_name, last_name, email FROM users </cfquery>
Both
qryUsers["last_name"]
qryUsers.last_name


What is the default method for <cfform>?
post
enctype
get


What does the following code result in: <cfset x = {y = 1, z = 2}> <cfif IsArray(x)> Array <cfelse> Struct </cfif>
An error
Array
Struct


True or False: It is a good idea to enable RDS on your ColdFusion production servers.
False
True


Complete this analogy: In ColdFusion ORM, CFCs are to database tables, as properties are to:
Stored procedures
Indexes
Primary keys
Columns


Where is considered the best place to name your application so the request is tied to the right application?
In Application.cfm.
Both
Inside Application.cfc but outside of any methods.


Which of the following prints out "Fail"?
<cfif -1> Success <cfelse> Fail </cfif>
<cfif "YES"> Success <cfelse> Fail </cfif>
<cfif 1> Success <cfelse> Fail </cfif>
<cfif 0> Success <cfelse> Fail </cfif>


<cfset x = 123> <!-- <cfset x = 321> --> <cfoutput>#x#</cfoutput> What will be output after the above code executes?
321
123


How many remote IP addresses can access an installation of the free developer edition of Adobe ColdFusion?
Trick question - the developer edition of ColdFusion isn't free.
None. Only localhost access is possible.
2
5
1


True or False? In ColdFusion 8, you can upload multiple files at once by setting CFFILE action to "uploadAll"
False
True


Which of the following is NOT a required Application.cfc setting for using ORM?
this.name
this.datasource
this.ormenabled
this.ormsettings


Which of the following will result in an error?
<cfset listVar = ListNew('a,b,c,d') />
<cfset arrayVar = ArrayNew(1) />
<cfset xmlVar = XMLNew(1) />
<cfset structVar = StructNew() />


Which of the following versions of ColdFusion has passed its core support deadline, but is still within its extended support period?
Adobe ColdFusion 8
Macromedia ColdFusion 7
Adobe ColdFusion 10
Adobe ColdFusion 9


True or False: For un-scoped or unspecified scope variables, Coldfusion takes into consideration the Cookie scope before the Form scope.
True
False


Which of the following is NOT a valid Array function?
ArrayAppend()
ArrayDelete()
ArrayClear()
ArrayNew()


Which of the following IS NOT used to create a XML document object?
XMLNew function
<cfxml> tag
XMLParse function
XMLFormat function


By default, in which scope does a ColdFusion application store login information?
Request
Cookie
Session
URL


Can ColdFusion create a CAPTCHA?
No, ColdFusion cannot do that.
Yes, there is a <cfcaptcha> tag.
Yes, with the <cfimage> tag.


What is the outcome of the following piece of code? <cfset structInsert(CGI, 'newVar','CF',true)/> <cfoutput>#CGI.newVar#</cfoutput>
CF
NULL
Error


Which of the following are NOT valid CFML to check whether num1 is greater than or equal to num2?
<cfif num1 GTE num2>
<cfif num1 >= num2>
<cfif num1 GEQ num2>
<cfif num1 GE num2>
<cfif (num1 EQ num2) OR (num1 GT num2)>


From the below array, how do you access the value "banana"? <cfset arrFruits = ArrayNew(1)> <cfset ArrayAppend(arrFruits, "apple")> <cfset ArrayAppend(arrFruits, "banana")> <cfset ArrayAppend(arrFruits, "mango")>
arrFruits[2] only
arrFruits["2"] only
arrFruits[2] and arrFruits.2
arrFruits["2"] and arrFruits[2]
arrFruits.2 only


What is the correct output for the following? <cfset str1 = "The quick brown fox jumped over the lazy dog" /> <cfset str2 = Replace(str1, " ", "-") /> <cfoutput>#str2</cfoutput>
The quick brown fox jumped over the lazy dog
Nothing. The script throws an error.
Thequickbrownfoxjumpedoverthelazydog
The-quick-brown-fox-jumped-over-the-lazy-dog


Given a page, customtag.cfm, called with <cf_customtag /> will invoke the code twice whereas called with <cf_customtag> will invoke the code once.
No. As with XHTML, closing the tag is good coding practice.
Yes.


I just added a record to a table with an auto-incrementing primary key. If I stored the results of my query in a variable called lastRecord, how would I find the primary key of the record I just added?
lastRecord.RecordCount
lastRecord.IDENTITYCOL
lastRecord.GENERATED_KEY
lastRecord.generatedKey
lastRecord.ROWID


As in JavaScript, in ColdFusion you can write a function inside another function
True
False


True or False? Using <cfloop> to loop over a file opens the entire file in memory.
True
False


True or False? Arrays are passed by reference like Structs.
FALSE.
TRUE.


What does this code do? <cfloop from="Jan 1 2012" to="Dec 31 2012" index="date"> <cfoutput>#DateFormat(date, "dd mmm yyyy")#</cfoutput> </cfloop>
Error. You cannot specify such values to loop.
Display dates from Jan 1st 2012 to Dec 31st 2012.


No comments:

Post a Comment