Posted: August 13, 2008 at 9:04 AM by Ben Nadel
Sir, i want to know the solution for which iam struggling for some days... that is how we have to caluculate difference between two dates such that it have to show the difference in the format yyyy (years):m (months): ww (weaks):w (weakdays) : h (hours): n (minutes) : s (seconds). Sir, to confirm exactly what my doubt mean is...if we go for ebay .... read more »
Comments (2) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: August 6, 2008 at 9:04 AM by Ben Nadel
Does this utility [POI] include a way to continue to add data to the spread sheet after the first addition? Thanks again for all of your help. Yes it does. Well, sort of. The POI utility ColdFusion custom tags allows you to dictate a "template" to be used . This template is an existing Excel file whose contents are read in without alteration. Th... read more »
Comments (3) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: August 6, 2008 at 8:48 AM by Ben Nadel
Hi Ben, I have been trying to use DecimalFormat and NumberFormat to get some integers coming out of a database query to display as decimals numbers. For Example I want 415 to display as 4.15. I also need 6 to display as .60 How might I accomplish this. I really love your writings by the way. To do this, all you need to do is move over the decimal... read more »
Comments (3) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 28, 2008 at 9:09 AM by Ben Nadel
I also like to go to the gym. But, I just got a .NET development contract that allows me to work at home full time. I am kicking around the the idea of putting some gym equipment in my basement so that I don't have to commute to the gym and can spend more time at home with my kids. I don't want to go crazy and spend a ton of money. just keep it si... read more »
Comments (13) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 17, 2008 at 7:27 PM by Ben Nadel
Hi, I am learning Javascript and going through a self paced book. I am trying to use \n for new line in an example program, but it does not work. Here is the snippet: //Display the current date and time on the web page document.writeln(todays_date); if (navigator.appName == "Microsoft Internet Explorer") { document.write("\nYou are running Micro... read more »
Comments (7) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 8, 2008 at 9:24 AM by Ben Nadel
Simon Horwith and I have some very different and very strong views on dynamic variable naming and setting conventions. He thinks one thing, I think another; but, at the end of the day, both of us get the job done with our own methodologies. In a conversation that we were having about ColdFusion's archaic SetVariable() method, Horwith stated th... read more »
Comments (5) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 30, 2008 at 8:29 AM by Ben Nadel
Hi Ben, I must have searched our old friend Mr. Google and your site for nearly an hour without luck - so I figured I better ASK BEN. I normally retrieve binary object from a database by first writing them to the server's disk and then href-ing to that file. My question is, how do I retrieve a file directly from the database without the intermedia... read more »
Comments (10) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 12, 2008 at 8:40 AM by Ben Nadel
Yesterday, someone asked me about creating new XML documents. They had an XML packet that came back from a web service call. This XML had some extra information in it that had to do with the web service call itself, not the data that was being transported. As such, they wanted to create a new XML document based on the target XML data, without the ... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 3, 2008 at 8:59 AM by Ben Nadel
I saw a tutorial on your site about splitting and joining files using CF [ColdFusion]. Is there any way to do with without reading in the entire contents of the file part(s) using ReadBinary? On large files this becomes very memory intensive obviously. If you are simply joining parts, why can't you join without having to read and do the checksum a... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: May 30, 2008 at 8:57 AM by Ben Nadel
Here's a challenge. I'm trying to code a solution to replace a hefty, expensive CMS platform. ColdFusion does a lot of stuff and, I believe, can be used to replace that platform. Except for one thing; that CMS can surface CF apps and allow them to use the application.cfc within their directory. An example: /root/application.cfc /root/index.cfm /r... read more »
Comments (18) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: May 23, 2008 at 10:49 AM by Ben Nadel
About your post: Testing For The Absence Of A Text Node Using XmlSearch() And XPath... I could not post any code so I am writing you here. Useful info. Here's another one for ya. Say your looping through some XML you got via cfhttp that has, at times, *inconsistent data*. See below. <girl> . . . <name>Hayden Panettiere</name> . ... read more »
Comments (8) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: May 15, 2008 at 9:13 AM by Ben Nadel
Your site has been a great help to me over the past year, so thank you and keep it up! However I am now in the position where I just can't seem to find a coherent answer to my question anywhere else, so I need to ask directly. I am trying to learn OO and (I think) I was doing great until I needed to get data back out for a seeming simple operation... read more »
Comments (6) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: March 11, 2008 at 8:28 AM by Ben Nadel
Got one for ya... I'm extending application.cfc with ye ole' proxy.cfc trick. In root/Application.cfc I cfinclude a config.cfm file that has some sitewide variables in the request scope like upload path, dsn, root URL, etc... I do this in onRequestStart(). In my root/sub/Application.cfc that extends the root cfc, how can I get access to the reques... read more »
Comments (12) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: January 31, 2008 at 2:22 PM by Ben Nadel
I have a website where I am trying to generate a member of the day, is there anyway to cache data for a set amount of time, I know you can cache a query, just wondering if there are other methods for caching. How would you address this? This title, Simple Data Caching in ColdFusion, is a little misleading for the post. When is comes to "smart" da... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: January 29, 2008 at 8:31 AM by Ben Nadel
This wasn't quite an Ask Ben question, but it was a question that was asked of me and I would like to have a definitive place to point people when the question comes up again. A user asked me how to get ColdFusion to end the user's session when the user closes their browser. I have discussed ending sessions before, but let's just quickly hammer ou... read more »
Comments (21) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink