Re: ColdFusion Coding Contest
I really like the idea about the web service competitions... you enter your webservice agent into a contest on some server somewhere and tournaments are held to determine winners. othello backgammon chess boxing hockey simulations... I think it would be fun. Eric - Original Message - From: cfhelp To: CF-Talk Sent: Wednesday, April 07, 2004 11:05 PM Subject: RE: ColdFusion Coding Contest What someone needs to do is set this up and a few other puzzles and form development teams. Team 1: CF Team 2: ASP/.Net Team 3: PERL Team 4: PHP Rick -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 9:19 AM To: CF-Talk Subject: RE: ColdFusion Coding Contest WOW, this contest is on fire!:-) We are up to three. Kevin _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ColdFusion Coding Contest
what's the contest URL again? - Original Message - From: cfhelp To: CF-Talk Sent: Wednesday, April 07, 2004 11:05 PM Subject: RE: ColdFusion Coding Contest What someone needs to do is set this up and a few other puzzles and form development teams. Team 1: CF Team 2: ASP/.Net Team 3: PERL Team 4: PHP Rick -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 9:19 AM To: CF-Talk Subject: RE: ColdFusion Coding Contest WOW, this contest is on fire!:-) We are up to three. Kevin _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: ...just took 60+ seconds to load Hello World in Flex!
We're developing a set of commercial charting components for Flash and for Flex--we actually demoed them last November at MAX.Hence the familiarity. I don't know of any way to get rid of the loading message.If you look at the AS code generated by a Flex app, the loading thing is generated by the compiler on the _root timeline of the generated SWF.It doesn't even come from one of the components (it is a component, but it's kicked off from the timeline).Maybe there's an option somewhere though. The overhead will be addressed as soon as Flex supports runtime shared libraries.With this then the classes only have to be downloaded once.I would say that RSL are critical to the success of Flex, but it's really strange they weren't made a high-enough priority to be included in 1.0.I'd expect to see them in a 1.x or at least a 2.0 release. I also don't expect to see more than a handful of companies actually go into production with Flex 1.0.The price will keep it to only the largest companies (my company excluded) and the expected development timelines are for medium to long term projects.How many people do you know would bet a half million dollar project on a 1.0 product?That's the price point you're looking at for ROI over the purchase price of Flex (keeping in mind that large products typically have more CPU's and $12,000 is just the starting price). Sam Blog http://www.rewindlife.com TeamMM http://www.macromedia.com/go/team -Original Message- From: Dick Applebaum [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 11:25 PM To: CF-Talk Subject: Re: ...just took 60+ seconds to load Hello World in Flex! On Apr 8, 2004, at 7:41 PM, Samuel R. Neff wrote: The second run should be significantly faster, but still a lot slower than a Flash Hello World app since every app will have the 130kb of Flex base classes. Sam You seem to have a lot of Flex experience. Is this just a Newness of Flex thing?I hope that as Flex matures that repackaging (whatever) will reduce the default overhead of using Flex. btw, is there a way to get rid of the loading message that appears with the rendering of each FlexFlash page? New to Flex but trying to learn! TIA Dick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ...just took 60+ seconds to load Hello World in Flex!
On Apr 9, 2004, at 1:04 AM, Samuel R. Neff wrote: I don't know of any way to get rid of the loading message. If you look at the AS code generated by a Flex app, the loading thing is generated by the compiler on the _root timeline of the generated SWF. It doesn't even come from one of the components (it is a component, but it's kicked off from the timeline). Maybe there's an option somewhere though. How do you look at the AS code generated by a Flex app? TIA Dick [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
App Mappings dilema
The last couple years of my life as a CF developer have been plagued by painful settings on their webserver. They established app mappings to force all .htm and .html files to be parsed by CF so they could stick CF tags into existing, previously-static pages and not have to change filenames to add dynamic funcionality. Aside from the excess load on the sever, it worked fine under CF5 for the past few years. Last night I upgraded that webserver, finally, to CFMX 6.1 -- unfortunately, the app mappings didn't carry over. I reset them to point to C:\CFusionMX\runtime\lib\wsconfig\1\jrun.dll -- but that didn't do the trick. So then I edited the XML-based servlet mapping in the web.xml file, as per instructions I found here: http://www.macromedia.com/support/coldfusion/ts/documents/tn18289.htm Still no luck. But the strangest thing is I get a very vague, generic error message. It just says: Error Occurred While Processing Request and gives me the standard error box without any details other than my browser build and IP address. What happens is .cfm files parse and display fine. But .htm files throw that error every time. If I rename a .htm file that contains no CF tags, and I just change the extension to .cfm, it renders fine. Does anyone know what I could be missing? Thanks in advance for any help... I'm in kind of a hurry because I don't want to back out of this upgrade but the sun has risen... Brian [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: nesting custom tags
The first tag... cfset dsn=caller.dsn cfquery name=getSets datasource=#dsn# select * from TMSSets where TMSSETID='#attributes.setid#' order by tmssetid /cfquery cfif getsets.Router is 1 cfset Complist=GWS,ADUA,DSA,Router cfelse cfset Complist=GWS,ADUA,DSA /cfif cfloop list=#CompList# index=i cf_TMSStatusColor setid=#attributes.setid# type=#i# cfquery datasource=#dsn# update ComponentStatus set FENStatus='#FENStatusBackground#' where setid='#attributes.setid#' and comptype='#i#' /cfquery cf_TMSStatusColorIAVA setid=#attributes.setid# type=#i# cfquery datasource=#dsn# update ComponentStatus set IAVAStatus='#IAVAStatusBackground#' where setid='#attributes.setid#' and comptype='#i#' /cfquery /cfloop cfset FullList=GWS,ADUA,DSA cfif getsets.router is 1 cfset FullList=ListAppend(FullList, Router) /cfif cfif getsets.TACLANE is 1 cfset FullList=ListAppend(FullList, TACLANE) /cfif cfloop list=#FullList# index=i cf_TMSStatusColorAI setid=#attributes.setid# type=#i# cfquery datasource=#dsn# update ComponentStatus set AIStatus='#AIStatusBackground#' where setid='#attributes.setid#' /cfquery /cfloop /cfloop CFQUERY NAME=getComps datasource=#dsn# select * from componentstatus where setid='#attributes.setid#' /CFQUERY cfloop query=getcomps cfif (getcomps.fenstatus is 'red') OR (getcomps.iavastatus is 'red') OR (getcomps.aistatus is 'red') cfset myoverallstatus='red' cfelseif (getcomps.fenstatus is 'green' and getcomps.iavastatus is 'green' and getcomps.aistatus is 'green') cfset myoverallstatus='green' cfelseif (getcomps.fenstatus is 'yellow' OR getcomps.fenstatus is 'green') and (getcomps.iavastatus is 'yellow' OR getcomps.iavastatus is 'green') and (getcomps.aistatus is 'yellow' OR getcomps.aistatus is 'green') cfelse cfset myoverallstatus='cyan' /cfif cfquery datasource=#dsN# update componentstatus set Overallstatus='#myoverallstatus#' where setid='#attributes.setid#' and comptype='#i#' /cfquery /cfloop hr cfloop query=getsets CFQUERY NAME=getComps2 datasource=#dsn# select setid,overallstatus from componentstatus where setid='#attributes.setid#' /CFQUERY !---create list and loop over list looking for red, then yellow and finally greens--- cfset StatusList=valuelist(getcomps2.overallstatus) cfloop query=getcomps2 cfif len(statuslist) is 0 cfset MySetoverallstatus='green' cfelse cfif ListContainsNoCase(statuslist, 'red') cfset MySetoverallstatus='red' cfelseif ListContainsNoCase(statuslist, 'yellow') cfset MySetoverallstatus='yellow' cfelse cfset MySetoverallstatus='green' /cfif /cfif /cfloop cfquery datasource=#dsn# update TMSSets SET Overallstatus='#mysetoverallstatus#' where tmssetid='#attributes.setid#' /cfquery TMSStatusColor - the first custom tag that the one above calls... cfset dsn=#caller.dsn# cfif attributes.type is not 'TACLANE' cfquery name=getsoftware datasource=#dsn# select * from dmssoftwarebaseline where dmscomponent='#attributes.type#' /cfquery cfset THECriteria= cfloop query=getsoftware cfset statusbackground=orange cfset TheSoftware=Getsoftware.DMSComponent getsoftware.DMSProduct cfset thecriteria=TheSoftware '=' 'yes' ' OR ' TheCriteria /Cfloop cfset thecriteria=left(Thecriteria, len(thecriteria)-4) cfset Thecriteria='(' TheCriteria ')' cfset THecriteria= thecriteria ' and (Fens.Status = ''Closed. Applicable to TMS'' and FenFinal.finalrecommendation=''Closed. Applicable to TMS'' and Fens.Fennumber=Fentestlabreview.fennumber AND FENs.FENNumber NOT IN (select FENNUMBER from FEN2COmponent where TMSSETID=''#attributes.setid#'' AND DMSCOmponent=''#attributes.type#''))' cfquery name=getfens datasource=#dsn# select FENs.fennumber, FENTestlabReview.InstallNLTDate from Fens, FenTestLabReview, FENFinal where #preservesinglequotes(TheCriteria)# /cfquery cfset caller.FENstatusbackground=orange cfif getFENs.recordcount is 0 cfset caller.FENStatusBackground=green cfelse Cfloop query=getFENs cfset CompareDate=DateCompare(getFENs.installnltdate, now(), 'd') cfif CompareDate LT 0 cfset caller.FENStatusBackground=red cfbreak Cfelseif comparedate gte 0 cfset caller.FENStatusBackground=Yellow /cfif /Cfloop /cfif cfelse cfset caller.FENstatusbackground=green /cfif [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
JS help - checkboxes
I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
If your calling that script from the OnSubmit function of your form tag, simply return FALSE to the call: FORM ACTION="" ACTION PAGE NAME=myFORM > anyCheck('myForm') Then in the script: if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); return false } } return true This is of course you need no other validation -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: App Mappings dilema
Brian, I've never known CF to parse html files, in any of it's incarnations. I've known other servers (Apache, IIS, etc.) to parse the html files, while the CF on top of it parsed all the cfml files, but I've never seen it any other way. Someone let me know if I'm wrong here. Cutter Brian Dominick wrote: The last couple years of my life as a CF developer have been plagued by painful settings on their webserver. They established app mappings to force all .htm and .html files to be parsed by CF so they could stick CF tags into existing, previously-static pages and not have to change filenames to add dynamic funcionality. Aside from the excess load on the sever, it worked fine under CF5 for the past few years. Last night I upgraded that webserver, finally, to CFMX 6.1 -- unfortunately, the app mappings didn't carry over. I reset them to point to C:\CFusionMX\runtime\lib\wsconfig\1\jrun.dll -- but that didn't do the trick. So then I edited the XML-based servlet mapping in the web.xml file, as per instructions I found here: http://www.macromedia.com/support/coldfusion/ts/documents/tn18289.htm Still no luck. But the strangest thing is I get a very vague, generic error message. It just says: Error Occurred While Processing Request and gives me the standard error box without any details other than my browser build and IP address. What happens is .cfm files parse and display fine. But .htm files throw that error every time. If I rename a .htm file that contains no CF tags, and I just change the extension to .cfm, it renders fine. Does anyone know what I could be missing? Thanks in advance for any help... I'm in kind of a hurry because I don't want to back out of this upgrade but the sun has risen... Brian [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: App Mappings dilema
I've never known CF to parse html files, in any of it's incarnations. CF will parse anything as CFML if the HTTP server asks it to do. The setting is in the HTTP server. -- ___ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: [EMAIL PROTECTED] Thanks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: ColdFusion Coding Contest
http://tech.badpen.com/cfcontest When you are done, submit your entry to me for the judging.You have until midnight on Sunday to submit. Kevin. _ From: Eric Dawson [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:50 AM To: CF-Talk Subject: Re: ColdFusion Coding Contest what's the contest URL again? - Original Message - From: cfhelp To: CF-Talk Sent: Wednesday, April 07, 2004 11:05 PM Subject: RE: ColdFusion Coding Contest What someone needs to do is set this up and a few other puzzles and form development teams. Team 1: CF Team 2: ASP/.Net Team 3: PERL Team 4: PHP Rick -Original Message- From: Tangorre, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 9:19 AM To: CF-Talk Subject: RE: ColdFusion Coding Contest WOW, this contest is on fire!:-) We are up to three. Kevin _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Ahh... I didn't know that... never used radio buttons before ... I'll check out that possibility -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:10 AM To: CF-Talk Subject: RE: JS help - checkboxes Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Breaking up table for printing (long)
I think you can do this with style sheets. This is just off my head, and completely untested (I'm writing it into this email as I think of it). What you want to do is create your panels as you want them to print them in div blocks.Then tell these div blocks to float left.What will happen is that if there is not enough room for the next div to fit to the right of the previous one, it will fall to below it in line.This works on the screen and on a printer.We did something like this for a telephone directory, we set the names into groups that would output in columns when printed. Don't forget you can define a print style sheet with different properties then your screen.Makes it very easy to make your display look good both on screen and paper. Some code snippets. style media=print div { width: 8in; float: left; } /style cfset sec = 1 div id=Panel1-#sec# cfloop over data by dates OUTPUT RESULTS cfif Columns greater then 5 cfset sec = sec + 1 /div div ID=Panel1-#sec# /cfif /cfloop /div I'm sure this will take quite a bit of refinement, but hopefully it gets you started.If you need more specific help let me know. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Thanks Chris... was easy and works great Randy... thanks also for your suggestion on the checkbox approach -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:10 AM To: CF-Talk Subject: RE: JS help - checkboxes Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Breaking up table for printing (long)
OK, that was a bit more complex then I thought.Luckily I enjoy a challenge.Here is a prototype of the display that you want, but this could be a challenge to integrate with a query, I think using the array notation of a query may be the best way.Anyway here is some tested code. cfloop from=1 to=3 index=panel cfoutput cfset sec = 0 cfloop from=1 to=100 step=5 index=data cfset sec = sec + 1 cfset start = data cfset end = start + 4 div id=Panel#panel#-#sec# style=margin-bottom: 1em; span style=width: 1.25in; font-weight:bold;Panel: #panel# Sec: #sec#/span cfloop from=#start# to=#end# index=result span style=width: 1in; font-weight:bold; DATE #Result# /span /cfloop cfloop from=1 to=5 index=test div id=row#test# span style=width: 1.25in;Test #test#/span cfloop from=#start# to=#end# index=result span style=width: 1in; ABCDEF /span /cfloop /div /cfloop /div /cfloop /cfoutput /cfloop [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: JS help - checkboxes
Glad to help.Here's one more tip.If you want HTML checkboxes and radio buttons to activate by clicking on the label (like other form-based apps), try this snippet of code: LABEL FOR="" TYPE=radio ID=RB1 NAME=Foo VALUE=1Option 1/LABEL I don't think it works on every browser, but it works on most modern ones and the others just ignore the LABEL tags.Note that the FOR parameter of the LABEL tag must match the ID parameter of the radio button or checkbox. Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:46 AM To: CF-Talk Subject: RE: JS help - checkboxes Thanks Chris... was easy and works great Randy... thanks also for your suggestion on the checkbox approach -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:10 AM To: CF-Talk Subject: RE: JS help - checkboxes Would it make more sense to use radio buttons, which only allow one selection? Chris -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: JS help - checkboxes I have a little script that throws up an alert when more than 1 checkbox is selected.However, is there some code I can put in this script that will also prevent anything else in the cold fusion page from processing until the more than one checkbox problem is corrected?Here's the script: SCRIPT LANGUAGE=_javascript_ !-- Begin function anyCheck(form) { var total = 0; var max = form.type_no.length; for (var idx = 0; idx max; idx++) { if (eval(document.registration.type_no[ + idx + ].checked) == true) { total += 1; if (total 1) alert(You cannot select more than 1 registration type); } } } //End -- /script TIA Tim _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ...just took 60+ seconds to load Hello World in Flex!
On Apr 8, 2004, at 11:25 PM, Dick Applebaum wrote: btw, is there a way to get rid of the loading message that appears with the rendering of each FlexFlash page? You can set the usePreloader attribute of the Application tag to false like this: mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml usePreloader=false You can also customize it using the preloader attribute. Christian [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: ...just took 60+ seconds to load Hello World in Flex!
On Apr 8, 2004, at 10:41 PM, Samuel R. Neff wrote: The second run should be significantly faster, but still a lot slower than a Flash Hello World app since every app will have the 130kb of Flex base classes. Small applications requiring little interaction can still benefit from the look and functionality that Flex provides, but as Sam points out, they are going to be significantly larger than their Flash or HTML equivalents.Medium to large applications, however, which are more interactive, start to benefit very quickly from a bandwidth perspective from the Flex application model.It's not unusual for pages on sites like Amazon or eBay to be anywhere from 60K to 90K in size, not counting external assets like images, style sheets, scripts, etc.It only takes one or two clicks before you are actually saving significant amounts of bandwidth with Flex. Christian [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: ...just took 60+ seconds to load Hello World in Flex!
Yes, I was probably too negative in my earlier post.A Flex app will generally save bandwidth when comparing the whole app to an equivalent HTML app, but will be larger compared to the equivalent Flash app, and most importantly, larger than necessary due to current lack of RSL or ability to specify classes that will be available dynamically at run-time. Of course Flex is not made for Hello World apps and the 130kb startup size stays at just 130 for a while even when you load up a bunch of components as they reuse a lot of code.In my experience a typical real-world Flex app will be 200-400kb. Sam -Original Message- From: Christian Cantrell [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 10:30 AM To: CF-Talk Subject: Re: ...just took 60+ seconds to load Hello World in Flex! On Apr 8, 2004, at 10:41 PM, Samuel R. Neff wrote: The second run should be significantly faster, but still a lot slower than a Flash Hello World app since every app will have the 130kb of Flex base classes. Small applications requiring little interaction can still benefit from the look and functionality that Flex provides, but as Sam points out, they are going to be significantly larger than their Flash or HTML equivalents.Medium to large applications, however, which are more interactive, start to benefit very quickly from a bandwidth perspective from the Flex application model.It's not unusual for pages on sites like Amazon or eBay to be anywhere from 60K to 90K in size, not counting external assets like images, style sheets, scripts, etc.It only takes one or two clicks before you are actually saving significant amounts of bandwidth with Flex. Christian [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Regex newbie has partial success
I am trying to go through a string and replace instances of D, that may or may not have spaces after them, with uppercase D adjacent to the following numbers. cfset testcase =d 307,569|d307,558|d 221,145| cfset testcase = ReReplace(trim(testcase),[dD][\s]?,D) If anyone looking at this has a pointer or can nudge me towards the field of regex study to complete my task I would appreciate it.I have Ben's new book in front of me, but clearly I am missing something. Thank you much. -Nate Nathan SmithMcKee, Voorhees Sease, P.L.C.515.288.3667 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Join 2 like queries
Is there a way that I can join 2 queries that have the exact same columns returned. Let me give you some background. I am trying to query an ldap server. It can only return 1000 users, so I had to filter it. So I had to make 2 different ldap queries that both return the same columns but have different information. I want to join them together without have to run 2 different loops to do some other things I'm doing. So anyone have any idea? Bob Everland [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Regex newbie has partial success
disclaimer:I'm a total n00b with regex too.i've only spent 4 minutes with Ben's 10 minute book so far... so if there may be a better way to do this (and if there is, I'm sure somebody will speak up)...but this works: cfset testcase =d 307,569|d307,558|d 221,145| cfset testcase = ReReplace(trim(testcase),([Dd]\s?),D,all) the problem that I think I see with yours is that you put both the dD and the space within character classes, which only match a single character.By taking the space (\s) out of the character class, you're saying, one upper or lower 'D' optionally followed by a space (the optional flag being the '?'). charlie - Original Message - From: Nathan C. Smith [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:33 AM Subject: Regex newbie has partial success I am trying to go through a string and replace instances of D, that may or may not have spaces after them, with uppercase D adjacent to the following numbers. cfset testcase =d 307,569|d307,558|d 221,145| cfset testcase = ReReplace(trim(testcase),[dD][\s]?,D) If anyone looking at this has a pointer or can nudge me towards the field of regex study to complete my task I would appreciate it.I have Ben's new book in front of me, but clearly I am missing something. Thank you much. -Nate Nathan SmithMcKee, Voorhees Sease, P.L.C.515.288.3667 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Join 2 like queries
UNION is your saviour, and you can even do it with a QofQ: cfldap ... Name=ldap1 / cfldap ... Name=ldap2 / cfquery dbtype=query name=ldap SELECT * FROM ldap1 UNION SELECT * FROM ldap2 /cfquery Cheers barneyb -Original Message- From: Robert Everland III [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:52 AM To: CF-Talk Subject: Join 2 like queries Is there a way that I can join 2 queries that have the exact same columns returned. Let me give you some background. I am trying to query an ldap server. It can only return 1000 users, so I had to filter it. So I had to make 2 different ldap queries that both return the same columns but have different information. I want to join them together without have to run 2 different loops to do some other things I'm doing. So anyone have any idea? Bob Everland [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Regex newbie has partial success
How do you like that, I thought I was lacking regex knowledge turns out I was lacking CF knowledge too. The more I learn the less I know. Thanks. -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 10:54 AM To: CF-Talk Subject: Re: Regex newbie has partial success disclaimer:I'm a total n00b with regex too.i've only spent 4 minutes with Ben's 10 minute book so far... so if there may be a better way to do this (and if there is, I'm sure somebody will speak up)...but this works: cfset testcase =d 307,569|d307,558|d 221,145| cfset testcase = ReReplace(trim(testcase),([Dd]\s?),D,all) the problem that I think I see with yours is that you put both the dD and the space within character classes, which only match a single character.By taking the space (\s) out of the character class, you're saying, one upper or lower 'D' optionally followed by a space (the optional flag being the '?'). charlie - Original Message - From: Nathan C. Smith [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, April 09, 2004 8:33 AM Subject: Regex newbie has partial success I am trying to go through a string and replace instances of D, that may or may not have spaces after them, with uppercase D adjacent to the following numbers. cfset testcase =d 307,569|d307,558|d 221,145| cfset testcase = ReReplace(trim(testcase),[dD][\s]?,D) If anyone looking at this has a pointer or can nudge me towards the field of regex study to complete my task I would appreciate it.I have Ben's new book in front of me, but clearly I am missing something. Thank you much. -Nate Nathan SmithMcKee, Voorhees Sease, P.L.C.515.288.3667 _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
7 days old
I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: 7 days old
hey dan. here is what ya want. CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = dateFormat(dateAdd('d',-7,now()),'mm/dd/') order by dateAdded DESC /CFQUERY hth tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:31 PM To: CF-Talk Subject: 7 days old I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: 7 days old
or you could do it all in sql logic like this CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = DATEADD('d',-7,getDate()) order by dateAdded DESC /CFQUERY that should work, although im not 100% on the 'd' part, might just need the d plain, and not in single quotes. try it either way to see which is right. later tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:31 PM To: CF-Talk Subject: 7 days old I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: 7 days old
oops in the code you will need to surround the dateFormat with the #'s so it would really look like... CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = '#dateFormat(dateAdd('d',-7,now()),'mm/dd/')#' order by dateAdded DESC /CFQUERY tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:35 PM To: CF-Talk Subject: RE: 7 days old hey dan. here is what ya want. CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = dateFormat(dateAdd('d',-7,now()),'mm/dd/') order by dateAdded DESC /CFQUERY hth tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:31 PM To: CF-Talk Subject: 7 days old I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
Daniel Kessler wrote: I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY CFQUERY NAME=whatsnew DATASOURCE=puhweb SELECT * FROM whats_new WHERE dateAdded cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# ORDER BY dateAdded DESC /CFQUERY Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
assuming (yeah, yeah, i know) that dateAdded is a date/time datatype, why the dateFormat() function?my understanding is that it's more for formatting output/display (also, if it's a date/time datatype, no single quotes). i'd think if anything, you want to throw a createODBCDate() around that. SELECT * FROM whats_new WHERE dateAdded = #createODBCDate(dateAdd('d', -7, now())# - Original Message - From: Tony Weeg [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:39 AM Subject: RE: 7 days old oops in the code you will need to surround the dateFormat with the #'s so it would really look like... CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = '#dateFormat(dateAdd('d',-7,now()),'mm/dd/')#' order by dateAdded DESC /CFQUERY tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:35 PM To: CF-Talk Subject: RE: 7 days old hey dan. here is what ya want. CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = dateFormat(dateAdd('d',-7,now()),'mm/dd/') order by dateAdded DESC /CFQUERY hth tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:31 PM To: CF-Talk Subject: 7 days old I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: 7 days old
yeah, more than was needed...ur right, my bad. tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:50 PM To: CF-Talk Subject: Re: 7 days old assuming (yeah, yeah, i know) that dateAdded is a date/time datatype, why the dateFormat() function?my understanding is that it's more for formatting output/display (also, if it's a date/time datatype, no single quotes). i'd think if anything, you want to throw a createODBCDate() around that. SELECT * FROM whats_new WHERE dateAdded = #createODBCDate(dateAdd('d', -7, now())# - Original Message - From: Tony Weeg [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, April 09, 2004 9:39 AM Subject: RE: 7 days old oops in the code you will need to surround the dateFormat with the #'s so it would really look like... CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = '#dateFormat(dateAdd('d',-7,now()),'mm/dd/')#' order by dateAdded DESC /CFQUERY tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:35 PM To: CF-Talk Subject: RE: 7 days old hey dan. here is what ya want. CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE dateAdded = dateFormat(dateAdd('d',-7,now()),'mm/dd/') order by dateAdded DESC /CFQUERY hth tony r e v o l u t i o n w e b d e s i g n [EMAIL PROTECTED] www.revolutionwebdesign.com its only looks good to those who can see bad as well -anonymous -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:31 PM To: CF-Talk Subject: 7 days old I'm doing a query for all records that are newer than 7 days.I inserted the date using DateFormat(Now()).Unfortunately it gives me an error that dateAdded is unidentified.True, it's a column and I want it to search the column for anything less than 7 days old.Can anyone help me word this WHERE? CFQUERY NAME=whatsnew DATASOURCE=puhweb select * FROM whats_new WHERE '#DateDiff(d,dateAdded,the_date)#' 7 order by dateAdded DESC /CFQUERY thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFUN-04 interviews 8 - CFMX XML with Jeff Tapper
In this CFUN-04 interview, Michael Smith interviews Jeff Tapper about his CFMX XML talk at CFUN-04. Jeff has been coding ColdFusion since 1995, and has co-authored several books on Internet application development. Michael Smith: Why should developers be interested in XML, Jeff? Jeff Tapper: The eXtensible Markup Language (XML) is incredibly powerful because of its flexibility.While many think of XML as a revolutionary way for businesses to exchange data, that is but one of the very important roles that XML fills today.XML-based documents are often being used to share common data between different technologies, such as allowing a single configuration file to work for both a ColdFusion back end and a Flash front end of an application. MS: What are other uses for XML? JT: Others are using XML to create Microsoft Office Documents (such as Word, Excel, etc.), and... [the rest of this interview is at http://www.cfconf.org/CFUN-04/news.cfm or at Fusion Authority http://www.fusionauthority.com/ CFUN-04 is Saturday 6/26/04 - Sunday 6/27/04 in Washington DC area. It costs $199 until 3/31/04 then $269. For more information on CFUN see http://www.cfconf.org/cfun-04/. --- CFMX XML tricks and traps by Jeff Tapper ColdFusion has powerful XML support: some of its power is made available by simple tags and functions, and some requires a little digging around. In this session, you'll learn how to read and write XML data, how to perform searches and apply transformations, and how to access the internal XML processing in ColdFusion for even more power. Jeff Tapper is the Chief Technologist for Tapper.net Consulting. He has worked on a myriad of projects, for clients that include Toys R Us, IBM, Allaire, Dow Jones, American Express, MT Bank, Verizon, and Allied Office Supplies, among others. As a Macromedia Instructor, he is currently certified to teach all of Macromedia's courses on ColdFusion and Flash development. Jeff has been a member of the ColdFusion development community since 1995, and has co-authored several books on Internet application development, including: Allaire Spectra e-Business Construction Kit, Advanced Macromedia ColdFusion 5 Application Development, Dynamic Publishing with ColdFusion MX, Actionscript 2.0 Dictionary, and most recently Object Oriented Programming with ActionScript 2.0. He is also a frequent speaker at Macromedia Development Conferences and user groups. Jeff formed Tapper.net Consulting to focus on developing Rich Internet Applications and empowering clients through mentoring. --- CFUN is organized by TeraTech who received four CFDJ awards. If you need ColdFusion project help, mentoring or training then ask the experts at http://www.teratech.com/ Best Consulting - TeraTech Finalist Training - TeraTech Finalist Community site - CFConf Finalist Web Dev Tool - CFXGraphicsServer --- This year's conference has 32 nationally known speakers including Charlie Arehart, Steve Drucker, Raymond Camden, Hal Helms, Michael Smith, Michael Dinowitz, Simon Horwith and Shlomy Gantz. CFUN-04 Washington DC area 6/26 - 6/27/04: * Learn CF MX, Flash and more! * Network with your peers and top national speakers * Have fun exploring what is new from Macromedia Tracks: * Advanced Topics - for gurus, XML, CFCs, SQL * MX Integration - Flash, Java, Flex, .Net, Webservices * Empowered Programming - OO, Fusebox, PM, Testing, Debug * CF Bootcamp - for beginners in CF and Flash * Accessibility - making sites that disabled people can use, section 508 Pricing schedule - register today to save! * Just $199 Early Bird Price from 1/1/04 - 3/31/04 * Ok$269 Regular Price 4/1/04 - 6/15/04 * Opps $299 Late Registration 6/15/03 - 6/25/03 * Onsite $350 Register today http://www.cfconf.com/CFUN-04/ -- Michael Smith, TeraTech Inc - Tools for Programmers(tm) TeraTech voted Best Consulting Service by CFDJ readers! CF/ASP Web, VB, Math, Access programming tools and consulting 405 E Gude Dr Ste 207, Rockville MD 20850 USA Please check out http://www.teratech.com/ - email mailto:[EMAIL PROTECTED], or call us for more information; in the USA at 1-800-447-9120, +1-301-424-3903 International, Fax 301-762-8185Thanks! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
7 days old
WHERE dateAdded = '#dateFormat(dateAdd('d',-7,now()),'mm/dd/')#' I guess this works cause it's querying a date field with a date. Interestingly, it previously had {currentDate()-7}.Maybe it was currDate().I'm updating it. So now it's doing the query, it's giving me not a valid month, but It seems to me that we're adding a date here (subtracting really). Looks like this is close. Oh wait, I did:WHERE dateAdded #dateAdd(d,-7,Now())# This seems to have worked.I removed the dateFormat because as suggested, it seemed unnecessary.I also removed the quotes.I don't have alot of data to test from but it seems ok. WHERE dateAdded = DATEADD('d',-7,getDate()) well this is ORACLE, but the function looked the same there, though I didn't look up getDate(); This gave me the error, invalid column name, though I don't know why as dateAdded is the right column.It specifies the top line of the query with the error. WHERE dateAdded = #createODBCDate(dateAdd('d', -7, now())# error: Invalid CFML construct found on line 34 at column 64. (the WHERE line) ColdFusion was looking at the following text: # assuming (yeah, yeah, i know) that dateAdded is a date/time datatype, why the dateFormat() function? good point. WHERE dateAdded cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# and would this change since it's ORACLE? sorry folks, I should have mentioned that it was ORACLE. I'm doing a query for all records that are newer than 7 days. whew. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
Daniel Kessler wrote: WHERE dateAdded cfqueryparam cfsqltype=cf_sql_timestamp value=#DateAdd(d,-7,Now())# and would this change since it's ORACLE? Why don't you just try it and tell us? Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
7 days old
Why don't you just try it and tell us Which one, the time-stamp? As far as getting it working, I did mention that I used: WHERE dateAdded #dateAdd(d,-7,Now())# which didn't have the DateFormat or the single-quotes. Since there was several options mentioned I was trying to learn more about the problems that I encountered with each.so are you saying that I should try out an oracle version of cfsqltype=cf_sql_timestamp? -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
Daniel Kessler wrote: Why don't you just try it and tell us Which one, the time-stamp? The one where you wanted to know if it worked. Since there was several options mentioned I was trying to learn more about the problems that I encountered with each.so are you saying that I should try out an oracle version of cfsqltype=cf_sql_timestamp? Yes. Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
I am having some server issues with my server reporting NULL NULL and JavaOutofMemory Errors. This happened to me before and it was specifically caused by some bad regEx when parsing very large strings. Since it is happening again, I am looking at the regex usage in the app. Does this look like a greedy RegEx? Anyway to change it to make it more friendly? rereplace(myVar,[[:space:]][[:space:]]*, ,all) Brook Davies [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: 7 days old
Brook Davies wrote: I am having some server issues with my server reporting NULL NULL and JavaOutofMemory Errors. This happened to me before and it was specifically caused by some bad regEx when parsing very large strings. Since it is happening again, I am looking at the regex usage in the app. Does this look like a greedy RegEx? No. Anyway to change it to make it more friendly? rereplace(myVar,[[:space:]][[:space:]]*, ,all) rereplace(myVar,[[:space:]]+, ,all) Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Breaking up table for printing (long)
Original Message: From: Ian Skinner Thanks.I've actually figured out a solution.I spent an hour late yesterday developing a mathematical formula for how to display this data on my dry erase board (I felt like Good Will Hunting :) ). I've since managed to get this working in ColdFusion, too :). Here's the basics: The formula is: recordNumber = c + (colsPerRow * (i-1)) + ((n-1) * numDates) where c = the column number in the table ( from 1 to colsPerRow ) colsPerRow = columns per row i = number of the iteration through all of the dates (i.e., if there are 3 sets of dates, i will be from 1 to 3) n = the row number in the table ( from 1 to the numTests ) numDates = the number of total dates (ListLen(datelist)) numIterations = Ceiling(numDates / colsPerRow) numTests = the number of tests [from a query] Once you know that formula, you can do this (pseudo code): 1) Loop along the number of iterations (using i as the index) 2) Loop along the number of tests (using n as the index) 3) Loop along the colsPerRow (using c as the index) 4) If c = 1, then display the test name for that row [returned in a query] (using the above formula] 5) Then, display each result(getPanels.result[recordNumber]) This works and appears to work for all the values I've tested it with.Thank goodness. This has been a thorn in my side for a while now. Thanks for the suggestions! Scott --- Scott Brady http://www.scottbrady.net/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CF in a database
I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database
The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database
Yes and Yes Once it is saved into the DB such as the following into a field called: myCode : CFOUTPUTCFSET myName = Randy#myName#/CFOUTPUT When you call it from the DB to be ran on the server: CFOUTPUT QUERY=qGetMyCode #EVALUATE(qGetMyCode.myCode)# /CFOUTPUT -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:45 PM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
spoke to soon, doh nevermind, thats right, you can't cause the evaluae would to display the code as string and not as commands.. My apologies.. lack of sleep the last few days -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:53 PM To: CF-Talk Subject: RE: CF in a database The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Compressing for download
CF 5.0, IIS, NT Server 2003. Is there any way to implement a page where a user might select multiple files, then when he/she hits submit, have the files zipped together and downloaded? If it can't be done with CF alone, are there any 3rd-party solutions? On a related topic, is there any way to force the open/save dialogue for downloads such as .doc .pdf, ignoring any helper mods the user's browser might have? TIA Dave If these aren't CF problems, my apologies [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Email Not Being Sent from Local Server (CF5)
Howdy, Since migrating to a new computer a couple months back, now running Win XP Pro with CF version 5, I can't get any mails generated with the cfmail tag to leave the local server. They keep getting stuffed in the cfusion/mail/UnDelivr folder. I've tried using 127.0.0.1 and my regular SMTP mail server for my ISP (which used to work on the old machine). Any ideas on what I can check? It ain't critical, but it's very annoying when developing/testing pages that need to send emails and they won't go. Thanks! -- Chris Montgomery Airtight Web Serviceshttp://www.airtightweb.com Web Development, Web Project Management, Software Sales 210-490-2415 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database
Lets not get into the ugliness of this!!! CFOUTPUT QUERY=qGetMyCode #EVALUATE(qGetMyCode.myCode)# /CFOUTPUT [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
23.5 hours and counting :-) -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:56 PM To: CF-Talk Subject: RE: CF in a database (my apologies) spoke to soon, doh nevermind, thats right, you can't cause the evaluae would to display the code as string and not as commands.. My apologies.. lack of sleep the last few days -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:53 PM To: CF-Talk Subject: RE: CF in a database The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
You're not totally off base.You could use evaluate for some things (expressions), but certainly not for any actual CFML.Not sure if that would be useful for anything, but it could well be. Cheers, barneyb -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:56 AM To: CF-Talk Subject: RE: CF in a database (my apologies) spoke to soon, doh nevermind, thats right, you can't cause the evaluae would to display the code as string and not as commands.. My apologies.. lack of sleep the last few days -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:53 PM To: CF-Talk Subject: RE: CF in a database The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Compressing for download
CFX_Zip is a great utility, I think you can find it on Ben Forta's page: www.forta.com http://www.forta.com -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:55 PM To: CF-Talk Subject: Compressing for download CF 5.0, IIS, NT Server 2003. Is there any way to implement a page where a user might select multiple files, then when he/she hits submit, have the files zipped together and downloaded? If it can't be done with CF alone, are there any 3rd-party solutions? On a related topic, is there any way to force the open/save dialogue for downloads such as .doc .pdf, ignoring any helper mods the user's browser might have? TIA Dave If these aren't CF problems, my apologies _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Email Not Being Sent from Local Server (CF5)
Chris Montgomery wrote: Since migrating to a new computer a couple months back, now running Win XP Pro with CF version 5, I can't get any mails generated with the cfmail tag to leave the local server. They keep getting stuffed in the cfusion/mail/UnDelivr folder. I've tried using 127.0.0.1 and my regular SMTP mail server for my ISP (which used to work on the old machine). Any ideas on what I can check? mail.log Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
yeah I know ... just running on empty here. pushing 35 hours of non-sleep... soon I can go home and crash for awhile. -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:03 PM To: CF-Talk Subject: RE: CF in a database (my apologies) You're not totally off base.You could use evaluate for some things (expressions), but certainly not for any actual CFML.Not sure if that would be useful for anything, but it could well be. Cheers, barneyb -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:56 AM To: CF-Talk Subject: RE: CF in a database (my apologies) spoke to soon, doh nevermind, thats right, you can't cause the evaluae would to display the code as string and not as commands.. My apologies.. lack of sleep the last few days -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:53 PM To: CF-Talk Subject: RE: CF in a database The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
How many class files do YOU have?
I repoted to this list awhile ago about really long start up times for one of my apps on the first run. It seems that this problem has been resolved by defragging the HD? The C:\CFusionMX\wwwroot\WEB-INF\cfclasses folder had a lot of fragmented files as well as other areas on the HD. Does that make sense? Anyhow, I have 6,591 class files in my class folder taking up about 80 megs. So, I am curious now how many class files ya'll have on your servers? And another question related to disk usage; what are the guidelines for a paging file and is it needed if you have lots of physical ram? The reason I ask is because I wonder if a fragmented HD, and a page file on that disk might cause problems. I've had some JavaOutOfMemory errors, so I am looking for answers everywhere :) Brook [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Determining if a value exists in a query result
I have a list of generic features. And I have a list of features assigned to a specific item. I want to print out the generic features with checkboxes next to them. If the item in question has been assigned one of the features, I would like the checkbox for that feature to be checked. In the input tag for the checkbox, what function should I be using to compare the feature_id to the query results? Thanks, -- Austin [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Email Not Being Sent from Local Server (CF5)
Howdy Jochem, Friday, April 9, 2004, 2:09:34 PM, Jochem van Dieten wrote: mail.log Ok, so this is saying that authentication is required. I didn't have this problem when I was running Win2k, but anywayif I check the box for Verify Mail Server Connection in CF Admin, I get the message ColdFusion connected to your server. Verification completed without error. I don't understand what's happening. Also, how does one provide authentication data for the mail server...I am not seeing a way to enter that anywhere. Like I said, sending mail from the local dev box wasn't a prob before I moved to Win XP Pro. Thanks. -- Chris Montgomery Airtight Web Serviceshttp://www.airtightweb.com Web Development, Web Project Management, Software Sales 210-490-2415 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Email Not Being Sent from Local Server (CF5)
Chris Montgomery wrote: Friday, April 9, 2004, 2:09:34 PM, Jochem van Dieten wrote: mail.log Ok, so this is saying that authentication is required. I didn't have this problem when I was running Win2k, but anywayif I check the box for Verify Mail Server Connection in CF Admin, I get the message ColdFusion connected to your server. Verification completed without error. I don't understand what's happening. Verification only does a HELO, it doesn't actually try to send a message. Also, how does one provide authentication data for the mail server...I am not seeing a way to enter that anywhere. With the username and password attributes of cfmail. Jochem -- I don't get it immigrants don't work and steal our jobs - Loesje [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: How many class files do YOU have?
And another question related to disk usage; what are the guidelines for a paging file and is it needed if you have lots of physical ram? The reason I ask is because I wonder if a fragmented HD, and a page file on that disk might cause problems. Ideally, on a Windows machine, you'd place the pagefile on a separate partition, and you'd set it with a fixed size equal to the recommended size, so that it's always exactly the same size. If you do this during your initial machine configuration, you won't have to worry about pagefile fragmentation. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
If the data does not change that often, you should be okay writing it to a cfml file and then including it. On future uses of the data you can check to see if the file already exists and if not re-generate it, and if it does, just include it. Whenever the data in the DB record is updated, also delete the generated cfml file which will force the script it to re-generate it the next time it is requested. I do this with one of my apps and it works good. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: How many class files do YOU have?
Here's something pretty scary: I've got 4,105 on my localhost, and there's 4,107 on our server. Dangit, better go find the two different ones! :-) -Dain Brook Davies wrote: Anyhow, I have 6,591 class files in my class folder taking up about 80 megs. So, I am curious now how many class files ya'll have on your servers? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: How many class files do YOU have?
There is a slick utility offered by Sysinternals 'http://www.sysinternals.com/ntw2k/freeware/pagedefrag.shtml' called pagedefrag that does a great job defragmenting your pagefile (if you don't have the luxury of putting it on another disk.I've been using it for a year now on all our windows NT+ class systems, at the worst it doesn't seem to create problems, at the best I think it helps machines start and stop faster. Dave's recommendation of setting the minimum size to the same as the maximum size is mandatory on our systems (one of the first performance setting we make). Also, if you have a lot of memory you can disable paging 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management' 'DisablePagingExecutive' to stop the OS from putting peices of itself in swap. Even if you do have a lot of memory many programs will not work unless you have a paging file, I guess even computer programs like to have a place to doodle? -Nate -Original Message- From: Brook Davies [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:25 PM To: CF-Talk Subject: How many class files do YOU have? I repoted to this list awhile ago about really long start up times for one of my apps on the first run. It seems that this problem has been resolved by defragging the HD? The C:\CFusionMX\wwwroot\WEB-INF\cfclasses folder had a lot of fragmented files as well as other areas on the HD. Does that make sense? Anyhow, I have 6,591 class files in my class folder taking up about 80 megs. So, I am curious now how many class files ya'll have on your servers? And another question related to disk usage; what are the guidelines for a paging file and is it needed if you have lots of physical ram? The reason I ask is because I wonder if a fragmented HD, and a page file on that disk might cause problems. I've had some JavaOutOfMemory errors, so I am looking for answers everywhere :) Brook [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Java bootcamp for CF Developers?
I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Java bootcamp for CF Developers?
Hal Helms has a java class that I've been trying to get into. He's based in Sarasota. He is way too expensive for me, but he's local to you and I, if and when he does another class here in Tampa Bay. http://www.halhelms.com/ Lofback, Chris wrote: I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Java bootcamp for CF Developers?
I think what you are looking for is Hal Helms' Java For ColdFusion Programmers: http://www.halhelms.com/index.cfm?fuseaction=training.detail -Cameron - Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- land:858.509.3098 cell:678.637.5072 aim:cameroncf email: [EMAIL PROTECTED] -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 12:58 PM To: CF-Talk Subject: Java bootcamp for CF Developers? I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Java bootcamp for CF Developers?
how about this class? package com.gurumaker.training import java.io.*; import java.thrashing.*; public class cfhead2javahead { public javahead train(cfhead inStudent) throws IOException//student might skip class! { JavaHead javahead = thrash(inStudent); return javahead; } } LOL...couldn't resit...hey, its friday already! Doug -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:58 PM To: CF-Talk Subject: Java bootcamp for CF Developers? I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Determining if a value exists in a query result
Austin Govella wrote: I have a list of generic features. And I have a list of features assigned to a specific item. I want to print out the generic features with checkboxes next to them. If the item in question has been assigned one of the features, I would like the checkbox for that feature to be checked. In the input tag for the checkbox, what function should I be using to compare the feature_id to the query results? This has taken me all day, but I think the break at lunch helped clear things up for me. After querying the selected features, create an empty variable (it will eventually hold the list of features): cfset variables.selected_features = Using cfoutput, add each of the selected features to the list: cfoutput query=q_selected_features cfset variables.selected_features = listappend(variables.selected_features,#q_selected_features.feature_id#) /cfoutput If you output variables.selected_features, you'll see a comma delimited list of feature id's. While ouputting the complete list of possible features, you add a cfif statement to the checkboxes: input name=footnote type=checkbox value= cfif listfind(variables.selected_features, #feature_id#) IS NOT 0 checked=checked /cfif / variables.selected_features is our list of currently selected features. feature_id comes from the full list of possible features. This *is* the easy way to solve this, right? -- Austin [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: How many class files do YOU have?
If you have that many CFM's then the reason you are getting OutOfMemory errors is due to the fact that you are running out of space in the permanent generation of the Java Heap. I won't get into specifics with JVM tuning. I have some info on my blog http://bpurcell.org but to fix this bump up the -XX:MaxPermSize value in your jvm.config to 192 or 256 it should get rid of the problem. Also load testing has found that you can uncheck the value save class files in the admin and still get the same performance without storing the class files to disk. They will be compiled on first hit and loaded into memory. With the slick new compiler in 6.1 it is very efficient, in fact more efficient than having to sort through 6000 class files to load the appropriate file. Hope that helps Brandon [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Determining if a value exists in a query result
That is very similar to the way I do it. I think you can skip the query loop by using valuelist(): cfset variables.selected_features = valuelist(q_selected_features. feature_id) Note you can simplify that cfif statement in the checkbox down to: cfif listfind(variables.selected_features, feature_id) The above code *should* work the same as your code just a little simpler. Mark W. Breneman -Cold Fusion Developer -Network Administrator Vivid Media [EMAIL PROTECTED] www.vividmedia.com 608.270.9770 -Original Message- From: Austin Govella [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:26 PM To: CF-Talk Subject: Re: Determining if a value exists in a query result Austin Govella wrote: I have a list of generic features. And I have a list of features assigned to a specific item. I want to print out the generic features with checkboxes next to them. If the item in question has been assigned one of the features, I would like the checkbox for that feature to be checked. In the input tag for the checkbox, what function should I be using to compare the feature_id to the query results? This has taken me all day, but I think the break at lunch helped clear things up for me. After querying the selected features, create an empty variable (it will eventually hold the list of features): cfset variables.selected_features = Using cfoutput, add each of the selected features to the list: cfoutput query=q_selected_features cfset variables.selected_features = listappend(variables.selected_features,#q_selected_features.feature_id#) /cfoutput If you output variables.selected_features, you'll see a comma delimited list of feature id's. While ouputting the complete list of possible features, you add a cfif statement to the checkboxes: input name=footnote type=checkbox value= cfif listfind(variables.selected_features, #feature_id#) IS NOT 0 checked=checked /cfif / variables.selected_features is our list of currently selected features. feature_id comes from the full list of possible features. This *is* the easy way to solve this, right? -- Austin _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
7 days old
Why don't you just try it and tell us? I had tried it and received an error, though now hours later I don't remember the error.Since I'm a bit new at this, I don't know if the error was due to me or the fact that I was trying several things at once and one after the other, or that it didn't apply to Oracle. I did a search before I wrote back and didn't find any references to 'cfqueryparam' and oracle.I had barely any hits and saw a mention that it was for SQL, which I assumed meant NOT Oracle, so that's why I asked. I don't know whether it's not for Oracle or that it 'just worked' as is for Oracle and no one mentions it specifically.So Anyhoo, I have it working and I learned a bit. Thanks for all the replies. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Backing Up Studio FTP/RDS
Is there a way to backup/export your Studio FTP/RDS connections? I saved my UserData folder and I figure I can just replace those items in another Studio installation. Thanks, Greg [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Java bootcamp for CF Developers?
WOW, what a diss. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 4:22 PM To: CF-Talk Subject: RE: Java bootcamp for CF Developers? how about this class? package com.gurumaker.training import java.io.*; import java.thrashing.*; public class cfhead2javahead { public javahead train(cfhead inStudent) throws IOException//student might skip class! { JavaHead javahead = thrash(inStudent); return javahead; } } LOL...couldn't resit...hey, its friday already! Doug -Original Message- From: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:58 PM To: CF-Talk Subject: Java bootcamp for CF Developers? I'm looking for a training class that can turn an experienced CF developer (me) into a competent Java developer.Ideally, I'd like something that will include the web development side of Java, like JSP, J2EE, servlets, beans, etc.Can anyone recommend something in the Tampa Bay, FL area?Or within a long drive (or cheap flight) of Tampa? I know there's someone on the list from a company who has a great reputation for their CF training.If you see this, do you also offer Java? Thanks, Chris _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database
I've not tried this in MX (have they actually improved it that much?) but in previous version EVALAUTE() would NOT evaluate tags, only expressions. So you could do EVALUATE(#myName#) or EVALUATE(#Len(myName)#) or even EVALUATE(#Iif(Len(myName), DE(Hi), DE(Bye))#) But NOT EVALUATE(cfoutput#myName#/cfoutput) Of course since 5.0 you could also abstract much of the Tag work you might need into UDFs allowing you to perform much more complex evaluations.But in the end also remember that Evaluate() is one of the most expensive and slowest of the CF functions so that that into account. Jim Davis _ From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:55 PM To: CF-Talk Subject: RE: CF in a database Yes and Yes Once it is saved into the DB such as the following into a field called: myCode : CFOUTPUTCFSET myName = Randy#myName#/CFOUTPUT When you call it from the DB to be ran on the server: CFOUTPUT QUERY=qGetMyCode #EVALUATE(qGetMyCode.myCode)# /CFOUTPUT -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:45 PM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Determining if a value exists in a query result
Mark W. Breneman wrote: I think you can skip the query loop by using valuelist(): cfset variables.selected_features = valuelist(q_selected_features. feature_id) Note you can simplify that cfif statement in the checkbox down to: cfif listfind(variables.selected_features, feature_id) The above code *should* work the same as your code just a little simpler. Thanks a ton. I'm going to try the simplified version now. Thanks, -- Austin [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CF in a database (my apologies)
If the data does not change that often, you should be okay writing it to a cfml file and then including it. On future uses of the data you can check to see if the file already exists and if not re-generate it, and if it does, just include it. Whenever the data in the DB record is updated, also delete the generated cfml file which will force the script it to re-generate it the next time it is requested. I do this with one of my apps and it works good. cfset requestedpage = 5.cfm !--- include CFML from Record ID 5 --- cfif not fileExists(#request.fileroot#generatedCFML/#requestedpage#) cfquery name=myCFML select * from tbl_CFMLRespository where ID=5 /cfquery ! write the cfml to a file --- cfilfe action="" file=#request.fileroot#generatedCFML/#requestedpage# output=#myCFML.cfml# /cfif !--- include the generated cfml file --- cfinclude template=generatedCFML/#requestedpage# On your page where the CFML in the Database gets updated, you would simply delete the file after it was updated: cfquery name=myCFML update tbl_CFMLRespository set cfml='cfif x is 7 or z is 9cfset myFlag=true/cfif' where ID=5 /cfquery ! delete the cfml file if it exists --- cfif fileExists(#request.fileroot#generatedCFML/5.cfm) cfilfe action="" file=#request.fileroot#generatedCFML/5.cfm /cfif Brook P.S This is Pseudo Code! At 12:11 PM 4/9/2004, you wrote: yeah I know ... just running on empty here. pushing 35 hours of non-sleep... soon I can go home and crash for awhile. -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:03 PM To: CF-Talk Subject: RE: CF in a database (my apologies) You're not totally off base.You could use evaluate for some things (expressions), but certainly not for any actual CFML.Not sure if that would be useful for anything, but it could well be. Cheers, barneyb -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:56 AM To: CF-Talk Subject: RE: CF in a database (my apologies) spoke to soon, doh nevermind, thats right, you can't cause the evaluae would to display the code as string and not as commands.. My apologies.. lack of sleep the last few days -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 2:53 PM To: CF-Talk Subject: RE: CF in a database The short answer is no. The long answer is you can do it by writing the CF from the DB to a file, and the include that file.However, that's nasty because you have the compilation cycle every request, and writing files and then deleting them adds a lot of overhead.Back in the pre-MX days, I know some people used this solution on a RAMDISK which probably worked pretty well, because there wasn't a precompile cycle (the CFML was interpreted). Cheers, barneyb -Original Message- From: Eric Jones [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 11:45 AM To: CF-Talk Subject: CF in a database I posted this on CF-Newbie as well. Sorry for the cross post. Hey all, I'm wondering is it possible to store CF Code in a database and then have the CF server execute it when it's extracted? if so can you give me a working example?? ERJ _ _ -- [http://www.houseoffusion.com/lists.cfm/link=t:4Todays Threads] [http://www.houseoffusion.com/lists.cfm/link=i:4:159520This Message] [http://www.houseoffusion.com/lists.cfm/link=s:4Subscription] [http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=905.825.4Fast Unsubscribe] [http://www.houseoffusion.com/signin/User Settings] -- http://www.houseoffusion.com/banners/view.cfm?bannerid=36 [] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: How many class files do YOU have?
Brandon, OKay, I set the server to NOT write cache files to disk and deleted all the cache files. I also increased the maxPermSize as suggested. Any reason I should not increase it to 512? I have the 3 gigs of ram on the server. Also,my app writes lots of cfm files to disk, that why I have 6000 class files. Will this still be okay using the on-the-fly-compiler? Should I set the template cache higher than 1024? Brook At 01:52 PM 4/9/2004, you wrote: If you have that many CFM's then the reason you are getting OutOfMemory errors is due to the fact that you are running out of space in the permanent generation of the Java Heap. I won't get into specifics with JVM tuning. I have some info on my blog http://bpurcell.org but to fix this bump up the -XX:MaxPermSize value in your jvm.config to 192 or 256 it should get rid of the problem. Also load testing has found that you can uncheck the value save class files in the admin and still get the same performance without storing the class files to disk. They will be compiled on first hit and loaded into memory. With the slick new compiler in 6.1 it is very efficient, in fact more efficient than having to sort through 6000 class files to load the appropriate file. Hope that helps Brandon -- [http://www.houseoffusion.com/lists.cfm/link=t:4Todays Threads] [http://www.houseoffusion.com/lists.cfm/link=i:4:159534This Message] [http://www.houseoffusion.com/lists.cfm/link=s:4Subscription] [http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=905.825.4Fast Unsubscribe] [http://www.houseoffusion.com/signin/User Settings] -- http://www.houseoffusion.com/banners/view.cfm?bannerid=17 4a4000d.jpg [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: How many class files do YOU have?
Should I set the template cache higher than 1024? Yes, I think you should set it to the number of CFM files you have (or expect to have). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
IGNORE Test
Sorry for the inconvenience, mail server troubles... Paul [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Date list using SQL IN operator
Ok, I figured out I should use ListQualify on the list to add the single quotes and preservesinglequotes within the query to preserve the quotes for revised code of: cfoutput query=checkForEmp21Overlap cfset overlapRecordCount= ListAppend(overlapRecordCount,DateFormat(myStart,mm/dd/)) cfif DateFormat(myStart,mm/dd/) gte DateFormat(finalDay,mm/dd/) cfbreak /cfif /cfoutput cfset overlapRecordCount = ListQualify(overlapRecordCount,',,,CHAR) cfquery name=megaquery_output_recordspecific_dateRestricted dbtype=query SELECT * FROM megaquery_output_recordspecific WHERE (myStart BETWEEN cfqueryparam cfsqltype=CF_SQL_TIMESTAMP value=#formattedBeginDay# and cfqueryparam cfsqltype=CF_SQL_TIMESTAMP value=#formattedEndDay#) cfif listlen(overlapRecordCount) gt 0 AND (myStart NOT IN (#preserveSingleQuotes(overlapRecordCount)#)) /cfif ORDER BY myStart; /cfquery Now the problem is I get a Query Of Queries runtime error. Unsupported type comparison. I tried using cfqueryparam to set the type to date, but it doesn't seem to be compatible with lists. Any new suggestions? Thanks! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
IGNORE final test
Sorry for the inconvenience. Paul [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]