This Week's CF_Quiz

How do you dynamically get the names of all the form fields from the form when you post it?

Submission Deadline

We need time for recording and producing our podcast. The deadline for submitting your answer to this week's CF_Quiz is:

Noon (Eastern Time) – Saturday, February 10, 2006

How to Submit Your Answer

Skype, call or email us your answer to the CF_Quiz. We'd prefer to put your voice on the podcast. So go ahead and try out the Skype thing.

If You Skype or Call...

  • Introduce yourself (name and location)
  • "The correct answer is..." (be creative, funny or serious)
  • Please be sure to include your name and email address so we'll know how to contact you if you win. We'll delete any contact information if we broadcast your answer.

If You Email...

  • Use CFQuiz Answer for Version x.x (just change the number to the version you are answering) as the subject line of your email.
  • Please be sure to include your name (if your email address does not display it) and location.
  • Please email your answer to our quiz email address.
  • Remember, answers received with an attached MP3 are given special treatment.

How Winners Are Chosen

One lucky listener, chosen randomly from those who answered the question correctly, will win a prize from our sponsor, ColdFusionGear.com.

How to Contact Us

Skype cfweekly
Phone +1 (469) 293-3820
Email podcast@coldfusionweekly.com
quiz@coldfusionweekly.com – Quiz answers only...

Currently Running CF_Quizzes

  • Version 2.03 – January 29, 2006

    How do you dynamically get the names of all the form fields from the form when you post it?

    Deadline: Saturdary February 10th, 2007 - Noon EST

Past CF_Quizzes

  • Version 1.23 – September 25, 2006

    The winner of a free year of ColdFusion hosting from Sozo Hosting is ...
    JASON DAIGER!

    If YOU want to win a free year of hosting from Sozo Hosting you have to enter and win a weekly quiz. We'll give away more free hosting after the quiz comes back from vacation.

  • Version 1.20 – August 28, 2006

    How do you test onApplicationEnd and onSessionEnd in an Application.cfc without having to wait for these application events to occur?

    Winner: Adam M. Euans

    Answer:

    <cfinvoke component="Application" method="onSessionEnd" sessionScope="#session#">
    <cfinvoke component="Application" method="onApplicationEnd" applicationScope="#application#">
    

  • Version 1.19 – August 21, 2006

    How do you get the size (total amount of disk space used, not number of files) of a directory using ColdFusion?

    Winner: Johnny Le

    Answer:

    <cfdirectory action="list" directory="c:/cfusionmx7/" name="myDirectory" />
    <cfoutput>#arraySum(myDirectory['size'])#</cfoutput>
    

  • Version 1.18 – August 14, 2006

    What one thing would you like to see in Scorpio (CF 8)? Be detailed!

    Winner: Steven Cassady

    Answer: Steven would like to see a third edition of CF that would be free, and thinks it would be a good business move for Adobe.

  • Version 1.17 – August 7, 2006

    Which former ColdFusion Weekly guest and framework author was recently hired at Adobe?

    Winner: Sid Maestre

    Answer: Paul Kenney--congrats Paul!

  • Version 1.14/1.15/1.16 – July 10, 2006

    Choose one security vulnerabilities from the OWASP Top 10 list and describe how they apply to CF and how to handle them.

    Winner: Andrew Sanchez

    Answer: In brief, don't let potential hackers learn about your environment through your error page. Use Application.cfc's onError method or the plain old cferror tag to lock your error pages down.

  • Version 1.13 – June 26, 2006

    You're working with an HTML form and someone who shall remain nameless named the form fields badly, for example, "first name" (that's first {space} name). If you don't have the ability to change the name of the form field, how can you access these form fields in ColdFusion's form scope?

    Winner: Kyle Hayes

    Answer:

    form["first name]"
    

  • Version 1.12 – June 19, 2006

    Let's say you need to read a text file into CFML, as a variable, but you work in an environment where both CFFILE and CFOBJECT/CreateObject have been disabled by the Administrator. While CFHTTP can read it as a query, and other java tricks can get around the disabling of CFOBJECT/CreateObject, what other two simple CFML tags syntax could read the file in for you in 3 lines of code?

    Winner: Johnny Le

    Answer:

    <cfsavecontent variable="content">
    <cfinclude template="file_to_read.cfm"/>
    </cfsavecontent>
    
  • Version 1.11 – June 5, 2006

    If you use Application.cfc and the cfabort tag you have to be careful in certain situations. What's the issue with Application.cfc and cfabort?

    Winner: Jason Daiger

    Answer: If you use Application.cfc and cfabort, cfabort is considered to be an error so this triggers the onError method of Application.cfc.

  • Version 1.10 – May 29, 2006

    Write us Clown Bean and DAO code.

    Nobody won!

  • Version 1.9 – May 22, 2006

    How do you cache the results of a block of ColdFusion code?

    Winner: Andrew Sanchez

    Answer: <cfsavecontent> or <cfcache>

  • Version 1.8 beta – May 15, 2006

    Give us three new features from the ColdFusion 7.0.2 Flex Connectivity Updater Beta. Hint: Check out the release notes at Adobe Labs.

    Winner: John Barrett

  • Version 1.7 beta – May 8, 2006

    This week marked the official end of the macromedia.com web site. What year did macromedia.com first go live? And for bonus points, what was the code name for the macromedia.com + adobe.com merger project?

    Answer: Launched on June 3

    Winner: Benjamin Ellefson - "my dog ate my answer so I couldn't call in"

  • Version 1.6 beta – May 1, 2006

    ColdFusion is supposedly case-insensitive. Why should be careful when naming your files especially the extends attribute of the cfcomponent tag or the type attribute in the cfargument tag?

    Winner: Kris Jones

  • Version 1.5 beta – April 24, 2006

    How do you get UTC Time in ColdFusion?

    Answer:

    <cfset utc=DateConvert("local2utc",now())>
    Date/Time: <cfoutput>#utc#</cfoutput>
    

    Winner: Aaron Benton from ??? (get on the Frappr map people!)

  • Version 1.4 beta – April 17, 2006

    Matt forgot his password for the ColdFusion Administrator. Tell Matt how to reset the ColdFusion Administrator password without having to re-install ColdFusion...

    Answer: Reset the CF Administrator Password

    Winner: Jorg Zimmer from Germany

  • Version 1.3 beta – April 10, 2006

    Tell us how all ColdFusion data types (i.e. arrays, structs, strings, etc.) are passed (either by reference or by value). Be sure to get all the normal ones (not custom objects).

    Answer: Strings/Arrays by value and structures/objects by reference.

    Winner: Kevin Penny from Minneapolis, MN

  • Version 1.2 beta – April 3, 2006

    This quiz was held over for version 1.3 beta.

  • Version 1.1 beta – March 27, 2006

    Write a function that takes in seconds and spits out a string saying the number of hours, minutes and seconds. The caution was make sure it uses correct plurals and singulars.

    Winner: Andy Jarret from the United Kingdom

  • Version 1.0 alpha – March 20, 2006

    What file extension did ColdFusion use in the past before the current .cfm or .cfml file extension?

    Answer: .dbm

    Winner: J.J. Merrick from Nashville, TN

Got a Quiz of Your Own?

We gladly accept submissions for CF_Quizzes. Just email us your quiz question and answer. If it passes our rigorous tests, maybe it will appear in a future version of the ColdFusion Weekly. We will also take full credit for the idea...just kidding! You'll get your name announced on the air in addition to our eternal gratitiude.