Re: Thousand Separator ONLY
numberFormat(myNum, ,9) From: Richard White rich...@re-base.net Sent: Tuesday, June 26, 2012 12:59 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Thousand Separator ONLY thanks for your help Robert although that didnt work as it returns lots of zeros after the decimal place. for example: 112221.111 got changed to 112,221.111000 thanks I believe you do your own format mask? I don't know the length of your number, but I think NumberFormat(myvar,__,___. __) would work to cover most any number you throw at it. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter. com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351724 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Thousand Separator ONLY
Then try numberFormat(myNum, ,9.9) From: Richard White rich...@re-base.net Sent: Tuesday, June 26, 2012 1:15 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Thousand Separator ONLY thanks Jason, although this strips off all the decimals numberFormat(myNum, ,9) thanks for your help Robert although that didnt work as it returns lots of zeros after the decimal place. for example: 112221.111 got changed to 112,221.111000 thanks com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351727 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Thousand Separator ONLY
Did you try numberFormat(myNum, ,9.9) ? On 6/27/2012 1:34 PM, Richard White wrote: I think i may need to be clearer on what i am trying to achieve: I have any form of number, they could be integer or floats and with varying decimal places such as: 11 1.1 11.11 1.1 1. etc I need to have a function that simply adds the thousand separators and returns exactly how they were, such as: 11 11,111.1 11.11 1.1 111,111,111,111,111,111,111. i was hoping there was an existing function that would handle this but its looking like i am going to have to develop a custom function that handles this as the number either handles integers OR floats but not both? thanks Then try numberFormat(myNum, ,9.9) thanks Jason, although this strips off all the decimals numberFormat(myNum, ,9) thanks for your help Robert although that didnt work as it returns lots of zeros after the decimal place. for example: 112221.111 got changed to 112,221.111000 thanks com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351731 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Installing CF10 on IIS7.5 Win7 64-bit
I had that happen, too. Go through Control Panel and install CGI and re-try it: * Control Panel * Turn Windows features on or off * Internet Information Services * World Wide Web Services * Application Development Features * check CGI and hit OK - Jason From: Paul Vernon paul.ver...@web-architect.co.uk Sent: Wednesday, June 13, 2012 8:37 AM To: cf-talk cf-talk@houseoffusion.com Subject: Installing CF10 on IIS7.5 Win7 64-bit Iâm having real trouble getting CF10 Developer Edition installed and Iâve no idea why. I get to the point where I have to choose which websites to install CF into and I choose All sites at which point, the installer pops up and says... âCannot configure IIS connector. Enable the required options ASP.NET, ISAPI Extensions and ISAPI Filter in IIS under Windows Features and try again.â The thing is, I checked and these components are already installed and running in IIS and the error log isnât much help as it states: 86 Successes 0 Warnings 0 NonFatalErrors 0 FatalErrors Not a lot to go on so if anyone can shed any light on why Iâm not getting very far that would be a great help... I should add that this is my brand new system so itâs a full fresh installation of Win 7 Pro and IIS 7.5... Paul ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351560 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Video Streaming Provider
We use Amazon: S3 for storage and CloudFront to stream out the hosted videos from edge locations all over the world. Over the past year, Amazon has added granular permissions at the level of CloudFront 'buckets', so I would think you could manage your permissions right there. Very inexpensive and excellent service over several years now. - Jason From: Robert Rhodes rrhode...@gmail.com Sent: Wednesday, May 02, 2012 12:27 PM To: cf-talk cf-talk@houseoffusion.com Subject: Video Streaming Provider My next project involves a bunch of streaming videos (mp4) for an organization's users. Each user will need to have access to a different set of videos. So, user 1 might have access to videos 100, 211, and 513, while user 2 has access to videos 21, 100, 513 and 624. So I'll need obviously need a different login, password, and access list for each user. I don't want to stream these videos on the organization's site, but rather from an external provider. Either I would just use this provider to stream the videos through a player on the organization's site (preferred), or move the user off to the video vendor's site and have the login and streaming happen there. In that case, I would need to set up the user specific video streaming lists at the provider. Either way, I am hoping to find a streaming video provider that has a straightforward API that I can use to stream the videos and possible to set up users, their passwords, and perhaps their access permissions to specific videos. Any suggestions? Thanks to all, as always. :) -RR ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350967 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Admin System - Temp Tables? Advice?
Or have a 'versions' table attached to the 'page' table. Versions can have status, with a maximum of 1 'published' for any given pageID, and versions can have publicationStart and publicationEnd dates. Gives you the flexibility of rolling back to previous versions as well. Just a thought. From: Les Mizzell lesm...@bellsouth.net Sent: Wednesday, March 21, 2012 12:22 PM To: cf-talk cf-talk@houseoffusion.com Subject: Admin System - Temp Tables? Advice? I'm in the process of rewriting the admin system for an older website. On this version, client want to be able to edit/add/delete anything at will, and have it NOT got live until he's decided he's done with that part. My current thought is to use a temp table(s) that: a. when visiting an edit page - LOADS the live data into the temp table b. all editing is done in the temp table c. once he likes it, he can hit the publish button, and the temp data replaces whatever is currently in the live table. d. after that transaction is completed, the temp table is emptied again Seem like a plan? Is there a better way? How does everybody else handle this stuff? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350502 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to search for all occurences of a string in a text?
Start by simplifying the regex: cfset reg = [^]+/([^/]+\.(jpg|gif|png)) / (It just gets every image reference inside double-quotes.) Then use REMatchNoCase() to get an array of all matches: cfset test = reMatchNoCase(reg, string) / (REFindNoCase() only gets one match, so it only works if you put it inside a conditional loop.) Then loop over the array and get the last list element using the / as the delimiter (and also strip out the trailing quote): cfoutput cfloop array=#test# index=a #listLast(listLast(a, ), /)# br / /cfloop /cfoutput On 11/18/2011 7:32 PM, marc -- wrote: Hi, I have a series of texts, each of which I want to search for the occurence of links to images. From each text I want to extract image filenames that end on one of these strings: .gif,.jpg,.jpeg,.png,.bmp Searching a text containing the string img src=http://my.domain.com/path/to/images/testimg.gif; would give me testimg.gif, searching a text containing the strings img src=http://my.domain.com/path/to/images/testimg.gif; img src=http://my.domain.com/path/to/images/testimg.jpg; img src=http://my.domain.com/path/to/images/testimg.png; would give me testimg.gif,testimg.jpg,testimg.png I think REFindNoCase is most suitable for this since it's the only CF function that lets me search for multiple occurences of a pattern I know of. I can't get it to match _all_ occurences of the string I'm looking for. The regular expression I use: (img src ?= ?[|'][https?://]?[a-zA-Z0-9_\-/\\\.^\.jpg]+\.jpg)\s?(\1)* I do this: REFindNoCase(RE,string,1,true) where RE is the above regular expression and string is the string containing 3img tags with an .jpg resource. This gives me an array containing the starting position and the length of the _first_ element in the string that matches with the regular expression. I can't get it to include all matches in the string. Is my regular expression wrong or is it not possible what I want? Marc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348830 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Week Weirdness
I know the various JVM versions have had issues with DST settings in the past (like 10 years ago); do your 2 servers have the same JRE configured for CF? On 10/4/2011 6:13 PM, Edward Chanter wrote: Thinking about this on a more technical level, does anyone know where CF ultimately derives the week number? When I enter #now()# I assume that's the system time but when I do #week(now())# is that the CF server taking #now()# and deriving the week or does it get that from jrun or linux or does it work things out on its own? What could make a CF 8.0.1 server on one linux machine say that the exact same date/time/timezone is week 41 and every other CF server that I know of say it's week 40? Why do I feel like an evil little [enter name of favourite nasty] has decided to inhabit one of my servers? The explanation must be so simple that I will call myself an idiot for not thinking about it when I do find out what it is -Original Message- 1. Yes, exact same date and time 2. Yes both are set to timezone London and both report BST next to the time when I do a date command in linux 3. Yes in both cases I used #week(now())# to get the CF date and date +%W to get the linux date I've setup and configured quite a few CF linux servers and have only ever seen this happen on one machine. Welcome to Weirdsville, population: me :( -Original Message- Very odd indeed. It makes sense that linux and cf would differ by 1, as cf is 1-53. However it doesn't make any sense to me why cf would return 40 on one and 41 on the other. Can you verify: 1) they are both the same server date? 2) they are both the same timezone offset? 3) they are both using CF's week() function to return the integer? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347917 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: 20USD/Hour Seriously?
Morality, yes, as well as the experience of the person doing the hiring / paying: knowing when that extra 100 hours is BS ... That being said, back when I worked for a custom web development house, we quoted jobs by the project but we often got asked what the underlying hourly rate was. My boss, one of the owners, always said, What do you want it to be? The implication was that we had already fixed-bidded the project and we would do it for that amount regardless, and we had already estimated what we thought the hours were going to be, but if the client wanted to pay some specific hourly rate, we would simply adjust the hours to meet their dollar amount. (If the client didn't want to pay more than $50 / hr on a $60,000 project, then we just told them to assume it was a 1,200 hour project ...) They usually realized pretty quickly that they were asking a bad question, because they had no clue how to estimate our time. Now, when we did need to do something on actual time and materials, then of course we would agree to an hourly rate and track our hours very closely. Frankly, we tracked our hours closely on the fixed-bid work, too, because otherwise *we* had no way to determine whether or not we were making money on specific projects! In other words, it always helps to have some understanding of the work you are asking for ... like knowing when the auto mechanic is blowing smoke up your tailpipe. From: David McGuigan davidmcgui...@gmail.com Sent: Friday, September 23, 2011 3:43 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: 20USD/Hour Seriously? Morality. On Fri, Sep 23, 2011 at 7:59 AM, Al Musella, DPM muse...@virtualtrials.comwrote: This may be a stupid question - I never worked by the hour, but I do sometimes hire people by the hour to do programming - but prefer paying by by the job.. There is no way to know how much time was spent programming something. What is to stop someone from charging $20 an hour, but doubling the amount of hours on the invoice so they really get $40 an hour? I know when I am programming, sometimes I get an awful lot of work done in an hour, and sometimes I am stuck looking for a bug or adjusting something to be perfect and waste ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347649 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: matching a whole word
Yes, indeed. You want something like this: keyword = star; myString = The dog sniffed at the starfish and growled; regEx = \b keyword \b; if (reFindNoCase(regEx, myString)) { writeOutput(found it); } else { writeOutput(did not find it); } On 8/17/2011 5:20 PM, Nathan C. Smith wrote: If I want to scan a string to match only a whole word should I be looking at regular expressions? I want to scan a string like The dog sniffed at the starfish and growled And if I scan for star not match starfish. Are regular expressions the most effective way to do that? Thank you. -Nate ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346816 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Using excel NumberFormat in coldfusion
##,0 doesn't work? -Original Message- From: fun and learning funandlrnn...@gmail.com Sent: Tuesday, August 09, 2011 3:18 PM To: cf-talk cf-talk@houseoffusion.com Subject: Using excel NumberFormat in coldfusion Hi All - As suggested by a couple of coldfusion developers a weeks ago, I am using xml to generate excel sheets from coldfusion. I am stuck with the following issue. Style ss:ID=s71 Borders Border ss:Position=Bottom ss:LineStyle=Continuous ss:Weight=1 ss:Color=#00/ Border ss:Position=Left ss:LineStyle=Continuous ss:Weight=1 ss:Color=#00/ Border ss:Position=Right ss:LineStyle=Continuous ss:Weight=1 ss:Color=#00/ Border ss:Position=Top ss:LineStyle=Continuous ss:Weight=1 ss:Color=#00/ /Borders NumberFormat ss:Format=#,##0/ /Style The number format within Style tags above has pound signs which Coldfusion does not like. Escaping them does not produce the desired result. Can anyone suggest a work around for this issue? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346617 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Label Printer
Dymo LabelWriter comes with ActiveX component and code sample that make it easy to do. -Original Message- From: Chad Gray cg...@careyweb.com Sent: Wednesday, August 03, 2011 11:50 AM To: cf-talk cf-talk@houseoffusion.com Subject: Label Printer I have an inventory website and it would be nice to be able to print barcodes and product data to a label printer. Has anyone tried sending webpage content to a label printer? Or maybe there are some printers that can take XML content?? Looks like Zebra printers have their own printer language, but I dont see any way of using it with ColdFusion or any web browser content. http://www.zebra.com/id/zebra/na/en/index/products/software.html They also mention using XML with their printers, but I have not read up on how it works and the way it talks the printers that support this may be out of our price range. http://www.zebra.com/id/zebra/na/en/index/resource_library/getting_started/introduction_to_bar_code_printing/xml_enabled_printing.html If anyone has ideas or has done this let me know. Chad ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346482 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Email Management Software
If you're doing large volumes, I recommend ExactTarget. CF can't actually manage things like bounce-backs, since that's all on the email server-side. You could write all those hooks yourself, if your email server allows you to embed applications, but it's more efficient to let the pro's handle it for you, at least in my experience. Subscriptions you can certainly do with CF, but you can just as easily have your CF subscription system write back to ExactTarget when necessary, so they're not exclusive, depending on your needs. On 7/21/2011 5:05 PM, Russ Michaels wrote: You really should look outside the coldfusion box on this one. take a look at www.mailchimp.com It is free for lists up to 500 users. It has an API and is pretty easy to integrate with and also has a Gmail/Google Apps plugin. I'm sure many others will back me up on how good Mailchimp is. -- Russ Michaels www.bluethunderinternet.com : Business hosting services solutions www.cfmldeveloper.com: ColdFusion developer community www.michaels.me.uk : my blog www.cfsearch.com : ColdFusion search engine ** *skype me* : russmichaels ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346301 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: remove high ASCII chars from text
Try this (not tested): Text = reReplace(Text, [^\x20-\x7E], , all); From: Matthew Friedman m...@hozgroup.com Sent: Monday, July 11, 2011 12:48 PM To: cf-talk cf-talk@houseoffusion.com Subject: remove high ASCII chars from text Is there a simple way to remove bad ascii chars form a textarea. We are using TINYMEC as an html editor and it works great. the issue is when we copy from MS Word we get back chars that will not render correctly in HTML. We are using and have enhanced the UDF DeMoronize to pull bad chars but we also want to just remove any char that is 225. is there a way to do this other then doing a looP for (i = 128; i LTE 160; i = i + 1) { Text = Replace(Text, Chr(i), , All); } We would want to strip anything greater then 225 and we do not want to run this loop up to 3000 a large waste of processing to do this. Open to any thoughts here. Thanks in advance - the is always great. Matt -- Life is to short to drink cheep beer -- ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346180 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Email Addresses with Subdomain causes CFMAIL to fail?
Works fine for me. Goes out through the mail server and then I immediately get an Undeliverable message, as expected. CFMAIL didn't seem to mind at all, whether that was the only address in the 'to' attribute or if it was one of several. From: Jeffrey Battershall jbattersh...@gmail.com Sent: Friday, June 24, 2011 1:14 PM To: cf-talk cf-talk@houseoffusion.com Subject: Email Addresses with Subdomain causes CFMAIL to fail? Hi, This is a new one for me: user has an email address like tlk...@subdomain.domain.net and CFMAIL ls throwing an exception The value of the attribute to, which is currently tlk572@subdomain.domain .net, is invalid. Anyone run into this before? Jeff ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345640 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CDN and Coldfusion
+1 for CloudFront on Amazon S3. From: Paul Alkema paulalkemadesi...@gmail.com Sent: Wednesday, June 15, 2011 10:50 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CDN and Coldfusion Oh yeah! Something else just mentioning is that if your not hooked on Akamai as your CDN, I've found Amazon CloudFront to be reliable and relatively inexpensive. : ) http://aws.amazon.com/cloudfront/ Paul Alkema http://paulalkema.com http://twitter.com/#!/paulalkema ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345331 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CDN and Coldfusion
In that situation specifically I cannot recommend Amazon S3 + CloudFront more. It's been truly outstanding for us. We set up separate S3 buckets for each of our CMS websites and CloudFront takes care of the edge distribution. As someone else has already noted, you can mount an S3 bucket as a mapped network drive in ColdFusion, so that s3:\\mys3bucket.mydomain.com is usable like any other network drive for file and directory operations. Great stuff. From: Donnie Carvajal donnie.carva...@transformyx.com Sent: Wednesday, June 15, 2011 11:22 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CDN and Coldfusion Hi, Thanks for all of the responses. We are indeed trying to find another solution for having mirrored sites that we would have to manage. We have 5,000 CMS clients on the system and that is a ton of files (images, documents, css, etc.) to mirror, so a CDN seems like a better fit, but then that leaves the Coldfusion generated content. We are trying to determine if it would be better (cost vs. management headaches) to use the CDN to distribute the ColdFusion content as well or mirror. Donnie ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345341 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What am I missing with this code? (Javascript)
You declared slidePosition as a local variable inside the ready() function, so it doesn't exist for the other functions. Try making it global, like this: script type=text/javascript var slidePosition = 0; $(document).ready(function() { playTrack(slidePosition); }); /script On 6/12/2011 2:52 PM, Rick Faircloth wrote: script type=text/javascript $(document).ready(function() { var slidePosition = 0; playTrack(slidePosition); }); /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345210 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What am I missing with this code? (Javascript)
Not sure, but now that I look at it, you don't need to pass slidePosition around at all now that it's a global variable. Try this: script type=text/javascript var slidePosition = 1; $(document).ready(function() { playTrack(); }); /script script type=text/javascript function playTrack() { alert('1: slidePosition = ' + slidePosition); $.sound.play('slideshow0' + slidePosition + '.mp3', {timeout:12000}); if ( slidePosition 6 ) { delay = setTimeout('nextSlide()', 12000); } }; function nextSlide() { slidePosition++; alert('2: slidePostion = ' + slidePosition); playTrack(); }; /script ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345219 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: CFQuery Select and single quotes in string
Yes, and if this is form input, you should be using cfqueryparam anyway. Please see the news for Sony's latest data hack, which was simple web-based SQL injection. cfsqltype will need to match column datatype in each case. cfquery datasource=#DSN# name=GetResults SELECT Formation, Play, BallCarrier, YardsGained, Result FROM PlaysCalled WHERE PlaysCalled.Formation = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#Form.Formation# / AND PlaysCalled.Play = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#Form.Play# / AND PlaysCalled.BallCarrier = cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#Form.BallCarrier# / /cfquery From: Jim Brundle brundlefly...@gmail.com Sent: Friday, June 10, 2011 9:15 AM To: cf-talk cf-talk@houseoffusion.com Subject: CFQuery Select and single quotes in string I'm doing a look up like this: cfquery datasource=#DSN# name=GetResults SELECT Formation, Play, BallCarrier, YardsGained, Result FROM PlaysCalled WHERE (((PlaysCalled.Formation)=#Form.Formation#) AND ((PlaysCalled.Play)=#Form.Play#) AND ((PlaysCalled.BallCarrier)=#Form.BallCarrier#)); /cfquery In some cases, the Ball Carrier's name has a single quote in it. In these cases, the search doesn't find them. So for instance, it finds Bob Jones but not D'Quan Black. Do I use cfqueryparam to resolve this? I'm using cfqueryparam when I insert the data into the database, but when I use the line: cfqueryparam value=#Trim(GetPlay.BallCarrier)# cfsqltype=CF_SQL_LONGVARCHAR it doesn't find anything. Thanks, Jim ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345145 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Why would this code return this error?
imagesList = arguments.images, which is a string. The parameter for ValueList() has to be a query.column name and the query has to be available in the scope of the call to ValueList(). From: Rick Faircloth r...@whitestonemedia.com Sent: Friday, June 10, 2011 3:10 PM To: cf-talk cf-talk@houseoffusion.com Subject: Why would this code return this error? Hi, all... I've been trying to set up some CF/AJAX/CFC functionality and when it wasn't working as expected, re-coded to track variables through the functionality. All the variables have been showing up fine in alerts throughout. However, now at this point in the code: cfargument name = images type = string required = yes / cfargument name = listPosition type = string required = yes / cfset imagesList = arguments.images/ cfset imagesList = valueList(imagesList) / cfset image = listGetAt(imagesList, listPosition) / I'm getting this error: The ValueList() function has an invalid parameter: imagesList. Parameter 1 of function ValueList which is now imagesList must be pointing to a valid query name. Can anyone tell from just this much code what my problem is? Why imagesList isn't being accepted as a valid parameter or valid query? Thanks! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345150 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Coldfusion 9 and jQuery
jQuery is all client-side, so it has nothing to do with the ColdFusion server at all. The files just have to be part of the HTML that your users use. You just put the *.js files (the core and any plug-ins) in a directory where your website can include them, and then you embed them in your user views just like you would any other JavaScript: script type=text/javascript src=scripts/jquery.min.js/script or whatever is appropriate to your environment. From: Ken Hammond khamm...@saleminc.com Sent: Thursday, May 26, 2011 1:34 PM To: cf-talk cf-talk@houseoffusion.com Subject: Coldfusion 9 and jQuery Pretty simple. I have a Coldfusion 9 install and I want to use jQuery and this plug-in: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ I have never used jQuery but would like to get it installed and using this, and also keep learning more of it. I have access to everything on the server (place files, modify anything in CF ADMIN, etc...); I just need to know how to install jQuery (or is it part of CF9) and install this plug-in so I can use it. Thanks in advance! Ken ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344923 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Recordcount not working????
There is no difference: we successfully query SQL Server views all the time in several of our apps. Have you checked the permissions? Could it be that the View doesn't allow the CF service user to SELECT data? From: Phillip Vector vec...@mostdeadlygame.com Sent: Thursday, May 19, 2011 10:12 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Recordcount not working Are you under CFMX? Try to remove dbtype=ODBC This is not valid anymore: Thanks for the tip. Eliminated, but still not working. I changed the query to point to a table and that works fine. It's looking up a view that it does this. I can't find anywhere on the interwebs where the is a difference between querying a view or a table in coldfusion. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344677 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: cfdocumentitem type=pagebreak
Sounds like there's something else going on that would cause a blank at the beginning, if that's what you're seeing, but the code you've got there will also *always* append an extra page break after every record, including the first one. Try this instead: cfdocument format=pdf filename=#ExpandPath(.)#\xxx.pdf cfoutput query cfif currentRow GT 1cfdocumentitem type=pagebreak/cfdocumentitem/cfif ... query output stuff ... ... end query output stuff ... /cfoutput From: Stephens, Larry V steph...@indiana.edu Sent: Wednesday, May 18, 2011 2:10 PM To: cf-talk cf-talk@houseoffusion.com Subject: cfdocumentitem type=pagebreak cfquery ... cfdocument format=pdf filename=#ExpandPath(.)#\xxx.pdf cfoutput query ... query output stuff ... ... end query output stuff ... !--- just in case the query returns multiple records --- cfif GetRec.Recordcount GT 0cfdocumentitem type=pagebreak/cfdocumentitem/cfif cfoutput rest of tags What I expect is a pdf file with no blank pages if there is one record. (Haven't tested it yet with multiple records.) What I get (with one record) is a blank page at the top and then my data. Why does this give me a blank page at the top (and can I stop it)? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344625 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Form Field Validation
If startVal, endVal, and lengthVal represent your values in JS [like var startVal = parseInt(myForm.start.value); ], then the following should work: if (startVal % 3 != 0) { alert(Start must be a multiple of 3.); return false; } else if (endVal % 3 != 0) { alert(End must be a multiple of 3.); return false; } else if (endVal startVal) { alert(End must be larger than Start.); return false; } else if (endVal lengthVal) { alert(End cannot be larger than Length.); return false; } return true; You could put that into a function and call the function on the form onsubmit(return myFunction()). On 5/6/2011 5:51 PM, Rick Colman wrote: I have the following: length: xxxstart [ ] end [ ] I would like to test for the following conditions: * must be an integer * start and end must be evenly divisible by 3 * end cannot exceed length CFINPUT works for type test, but not sure how to generate the javascript validation that would be required. Rick. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344329 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Replace cfhttp with jquery.post()
Not sure if it's just and oversight, but you've got address in the CFHTTP version and address1 in the jQ version. As for the error, don't you get the response struct in Firebug if you click on the URL? On 5/6/2011 6:11 PM, David Mineer Jr wrote: I am trying to replace this: CFhttp URL=http://localhost:8082/; method=post cfhttpparam name=address value=68 N 4000 W type=formfield cfhttpparam name=addressline2 value= type=formfield cfhttpparam name=city value=Cedar City type=formfield cfhttpparam name=state value=UT type=formfield /CFHTTP with this $(document).ready(function(){ var url = 'http://localhost:8082/', mydata = {address1 : '68 N 4000 W', address2 : '' ,city : 'Cedar City', state : 'UT'}; $.post(url, mydata,function(resp){ alert(resp); } ); }); the jQuery seems to work, but I get nothing back and the post url turns red in firebug. How do I at least return an error. I can return that there is an error, but not the actual error message. The cfhttp works great and returns xml. If I could figure out the actual error message I could maybe move to the next step. Firebug returns the following in the post tab: POST http://localhost:8082/ HeadersPostResponse Parametersapplication/x-www-form-urlencoded address168 N 4000 Waddress2 cityCedar CitystateUT Source address1=68+N+4000+Waddress2=city=Cedar+Citystate=UT but nothing in the response tab --- David Mineer Jr - The critical ingredient is getting off your butt and doing something. It's as simple as that. A lot of people have ideas, but there are few who decide to do something about them now. Not tomorrow. Not next week. But today. The true entrepreneur is a doer. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344310 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: SOT: Select at least one select
(in JavaScript, called on the form tag: form onsubmit=return validateMyForm(this); ) function validateMyForm(frm) { var selectTest = false; if (frm.select1.selectedIndex 0) { var selectTest = true; } else if (frm.select2.selectedIndex 0) { var selectTest = true; } else if if (!selectTest) { alert(You must select at least one drop-down option to continue.); return false; } else { return true; } On 5/2/2011 6:18 AM, Kevin Parker wrote: Have an interesting problem that no end of trawling the net has solved for me. Have a form that has 6 select boxes on it. I want to check that the user has selected at least one option from any of the six select boxes (doesn't matter which one but must be at least one from any dropdown). Unfortunately its running on a plain old web server - no smarts and no elegance like CFML to the rescue so I figure JavaScript is my friend but have been unable to uncover any examples of how this might be achieved (if it can). Has anyone seen anything like this and can point me in the right direction -thank you!!! TIA!!! ++ Kevin Parker Advanced Imaging e: webmas...@advancedimaging.com.au w: www.advancedimaging.com.au m: 0418 815 527 ++ http://au.linkedin.com/in/krparker ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344118 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Problem Using QueryNew
Change all your ntext to nvarchar(MAX), if you can. And run an UPDATE to free up space after the conversion, too ;) ALTER TABLE myTable ALTER COLUMN myNText nvarchar(MAX); UPDATE myTable SET myNText = myNText; That lets SQL keep the first set of chars locally, and only points to the LOB when it needs to (only records that really have long values in myNText). nvarchar(MAX) is the new ntext, and ntext is being deprecated, so it's a good move at any rate. On 4/23/2011 8:29 PM, Jenny Gavin-Wear wrote: Hi Maureen, I found it is possible to create indexed views and add them to a fulltext catalog, however, among a longgg list of constraints MS say that the views cannot contain Ntext fields, which rules out that option for me. http://msdn.microsoft.com/en-us/library/aa933148%28v=sql.80%29.aspx -Original Message- From: Maureen [mailto:mamamaur...@gmail.com] Sent: 24 April 2011 00:26 To: cf-talk Subject: Re: Problem Using QueryNew Seems to me it would a lot more efficient to make a view in your database that only returns the two fields you want to search on plus any fields you need for search criteria. Or do a select with a join that returns the fields. Once you do that, they are already in a query, so you wouldn't need to make another query to hold them. On Sat, Apr 23, 2011 at 4:21 PM, Jenny Gavin-Wear jenn...@fasttrackonline.co.uk wrote: Many thanks, Will. Obvious now I look at it again, duh me. Anyhoo, I had this (probably dumb) idea of combining sever fulltext search query results into one table, turning into a lot more work than I expected (+ learning curve). Maybe there is a better way of going about this: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343935 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Problem Using QueryNew
Ah, yeah, pretty sure nvarchar(MAX) was added in SQL 2005, unfortunately. So, to explain further, ntext holds only a pointer to the actual content elsewhere on the server, held in a Large Object (LOB). nvarchar(MAX) holds the first 8k of data in the table, so to speak, and then only pushes overflow data out via pointer. Since oftentimes the data in ntext fields isn't really that long (but the column has to account for those times it *is* long), by using MAX you actually save space and end up with an indexable column. The UPDATE basically pulls the first 8k of data into the table, replacing the old ntext pointer with the new MAX structure. Pete Freitag had an entry on it: http://www.petefreitag.com/item/734.cfm He further linked to another post about why to run the additional UPDATE as well: http://geekswithblogs.net/johnsPerfBlog/archive/2008/04/16/ntext-vs-nvarcharmax-in-sql-2005.aspx On 4/23/2011 9:56 PM, Jenny Gavin-Wear wrote: Hi Jason, Many thanks for your reply, it would be great if this will work on SQL 2000. I tried testing this: ALTER TABLE testing ALTER COLUMN testing nvarchar(MAX); Server: Msg 170, Level 15, State 1, Line 2 Line 2: Incorrect syntax near 'MAX'. I Googled a bit and found a couple of postings from people saying that using nvarchar(max) truncated their existing data. I'm a bit confused about what you say about: That lets SQL keep the first set of chars locally, and only points to the LOB when it needs to (only records that really have long values in myNText). Could you explain a little more, please? nvarchar(MAX) is the new ntext, and ntext is being deprecated, so it's a good move at any rate. Thanks for the warning on this. Jenny -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: 24 April 2011 02:18 To: cf-talk Subject: Re: Problem Using QueryNew Change all your ntext to nvarchar(MAX), if you can. And run an UPDATE to free up space after the conversion, too ;) ALTER TABLE myTable ALTER COLUMN myNText nvarchar(MAX); UPDATE myTable SET myNText = myNText; That lets SQL keep the first set of chars locally, and only points to the LOB when it needs to (only records that really have long values in myNText). nvarchar(MAX) is the new ntext, and ntext is being deprecated, so it's a good move at any rate. On 4/23/2011 8:29 PM, Jenny Gavin-Wear wrote: Hi Maureen, I found it is possible to create indexed views and add them to a fulltext catalog, however, among a longgg list of constraints MS say that the views cannot contain Ntext fields, which rules out that option for me. http://msdn.microsoft.com/en-us/library/aa933148%28v=sql.80%29.aspx -Original Message- From: Maureen [mailto:mamamaur...@gmail.com] Sent: 24 April 2011 00:26 To: cf-talk Subject: Re: Problem Using QueryNew Seems to me it would a lot more efficient to make a view in your database that only returns the two fields you want to search on plus any fields you need for search criteria. Or do a select with a join that returns the fields. Once you do that, they are already in a query, so you wouldn't need to make another query to hold them. On Sat, Apr 23, 2011 at 4:21 PM, Jenny Gavin-Wear jenn...@fasttrackonline.co.uk wrote: Many thanks, Will. Obvious now I look at it again, duh me. Anyhoo, I had this (probably dumb) idea of combining sever fulltext search query results into one table, turning into a lot more work than I expected (+ learning curve). Maybe there is a better way of going about this: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343945 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: OT question - is this real or phishing?
We get them all the time for several B-to-B domains that are popular in China. Just DELETE and move on. It's spam. On 4/20/2011 6:37 PM, Casey Dougall wrote: On Wed, Apr 20, 2011 at 6:27 PM, Wil Genovesejugg...@trunkful.com wrote: Has anyone received emails like this for any of their domains? I'm trying to decide if this is some far fetched phishing expedition or a serious inquiry. I do own the domain in question and it's also registered as business in the state of Minnesota under my name. I may reply to this anyways, but with extreme caution. They are trying to drum up business, I had one similar to that the other day for dvsdjtv.com Right to the trash bin, I don't need a .cn or .com.cn and don't care if someone registers it in China * Dear Manager: This email is from China domain name registration center, which mainly deal with the domain name registration and dispute internationally in China and Asia. On April 10th 2011, We received HAITONG company's application that they are registering the name dvsdjtv as their Internet Keyword and dvsdjtv .cnã dvsdjtv .com.cn ã dvsdjtv .asia domain names etc.., It is China and ASIA domain names. But after auditing we found the brand name been used by your company. As the domain name registrar in China, it is our duty to notice you, so I am sending you this Email to check. According to the principle in China, your company is the owner of the trademark, In our auditing time we can keep the domain names safe for you firstly, but our audit period is limited, if you object the third party application these domain names and need to protect the brand in china and Asia by yourself, please let the responsible officer contact us as soon as possible. Thank you! Best regards, John Oversea marketing manager * ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343881 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: display dynamic algorithm
To get a string to run as code, you have to use Evaluate(), and usually with an extra DE() thrown in for good measure: try this: cfoutput#numberFormat(evaluate(de(result2)))#/cfoutput From: Keith McGee kpmc...@frontiernet.net Sent: Thursday, April 14, 2011 10:43 AM To: cf-talk cf-talk@houseoffusion.com Subject: display dynamic algorithm I am writing a program to formulate results based on other results entered. if I create the algorithm dynamically I get the value can't be converted to a number error cfset result2= '#get_result1.fld_test_result##fld_formula1##get_result2.fld_test_result##fl d_formula2#' cfoutput#numberFormat(result2)#/cfoutput The value 481*(100.08747/40.0784)+44.8*(100.08747/24.30506) cannot be converted to a number. but if I enter the value #numberFormat(481*(100.08747/40.0784)+44.8*(100.08747/24.30506))# it works fine. What am I forgetting to do? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343713 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Referencing Variables
Returntype can simply be datasource, in your example, which specifies the type without having to worry about the path, so that may be an option: cffunction name=getDatasource access=public output=false returntype=datasource ... From: Hunsaker, Michael Scott mhuns...@indiana.edu Sent: Thursday, April 07, 2011 10:30 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Referencing Variables Thanks for the input. So what about using relative paths? We are implementing a stronger development environment and these component references will change depending on the server. We are searching for ways to make the code more flexible so we can easily move from one server to another. Thanks for the help!! Mike -Original Message- From: Bobby Hartsfield [mailto:bo...@acoderslife.com] Sent: Wednesday, April 06, 2011 5:35 PM To: cf-talk Subject: RE: Referencing Variables Nope. Just like the error says, you need a constant value for the returntype. Variables are not allowed. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Hunsaker, Michael Scott [mailto:mhuns...@indiana.edu] Sent: Wednesday, April 06, 2011 2:38 PM To: cf-talk Subject: Referencing Variables Hello - I hope someone can shed some light on this... and if it's possible. Here is a small chunk of code: cffunction name=getDatasource access=public output=false returntype=sagp.datasource cfreturn variables.datasource / /cffunction In the returntype, I would like to reference a variable instead of hardcode the component reference. So, I would like to end up with this: cffunction name=getDatasource access=public output=false returntype=#application.components#.datasource cfreturn variables.datasource / /cffunction I get an error of This expression must have a constant value. Is this possible? I would appreciate any help! Mike Mike Hunsaker Systems Analysis Application Development Kelley School of Business Bloomington, IN 47405-1703 mhuns...@indiana.edumailto:mhuns...@indiana.edu (812) 855-7024 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343598 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Storing Arrays or Structures in a database
Serialize with WDDX or JSON, I would say. Those are complex variable types which need to be serialized into strings before insertion into a DB. From: Adam Bourg adam.bo...@gmail.com Sent: Wednesday, April 06, 2011 1:49 PM To: cf-talk cf-talk@houseoffusion.com Subject: Storing Arrays or Structures in a database I've got really large sets of data that are related to each day of the week and the hour. Rather then creating a massive table containing these values, I have stored them in a Structure, but I can't seem to get Structures or Arrays to insert into a database. How can I store an array or structure in a MS 2008 SQL server? Array Code: cfset name=Adam / cfscript // 7 days, day 0 = Mon, Day 7 = sun workWeek=[t,t,f,t,f,t,f]; /cfscript cfinvoke method=injectData component=anubis cfinvokeargument name=name value=#name# / cfinvokeargument name=workWeek value=#workWeek# / /cfinvoke cffunction name=injectData access=public returntype=void hint=Injects the Employee App form data cfquery datasource=DSN name=insertData INSERT INTO mod_employmentAppProfile( name, workWeekendsEvenings ) VALUES ( #ARGUMENTS.name#, #ARGUMENTS.workWeek# ) /cfquery ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343575 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: replacelist question
Per the documentation, the match is case-sensitive. From: Jenny Gavin-Wear jenn...@fasttrackonline.co.uk Sent: Tuesday, April 05, 2011 12:47 PM To: cf-talk cf-talk@houseoffusion.com Subject: replacelist question Hi all, I'm using the following to strip unwanted words from a phrase:- Cfset session.realSearch = lcase(replacelist(session.realSearch, and, or, in, of, at, it, the, on, )) results are:- Book The = Book The Book = The Book I can't understand how the is not replaced when it is the first word in the list. Could someone tell me what's wrong, please? Jenny No virus found in this outgoing message. Checked by AVG - www.avg.com Version: 9.0.894 / Virus Database: 271.1.1/3550 - Release Date: 04/04/11 19:35:00 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343548 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Including multiple variables within a database response
Can use replaceList() instead. replaceList(mystring, DECISIONMAKER,MYNAME, Bob,Scott) On 4/2/2011 12:57 PM, Scott Williams wrote: LOL -- I was afraid of that! It reminds me of the portrait of Stephen Colbert standing in front of a portrait of Stephen Colbert standing in front of a portrait of Stephen Colbert ad infinitum. Scott - Original Message From: John M Blissbliss.j...@gmail.com To: cf-talkcf-talk@houseoffusion.com Sent: Sat, April 2, 2011 9:05:28 AM Subject: Re: Including multiple variables within a database response replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME, Scott, all) On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams myscottwilli...@yahoo.comwrote: Wow! This works great! What if there are multiple things to replace within the variable? For example, you have a string like: Hi DECISIONMAKER. This is MYNAME. I want to replace DECISIONMAKER with Bob and I want to replace MYNAME with Scott. Scott Williams - Original Message From: Brian Cainbcc9...@gmail.com To: cf-talkcf-talk@houseoffusion.com Sent: Fri, April 1, 2011 8:25:31 AM Subject: Re: Including a variable within a database response Easiest way is to use the Replace function built in to CF. http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html l http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html l If you have multiple instances of the replacement value be sure to specify the All scope. You may also want to look at the ReplaceNoCase function. Brian Cain On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams myscottwilli...@yahoo.comwrote: Hi all -- I have a script that draws some text from a database, and I would like to embed a person's name within the text. For example, the database field contains this text: Hi #name#. How's it going? I would like the #name# to be replaced with a previously defined variable name. Can ColdFusion do this? If so, how? Scott ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343493 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Session Variable question
In your Application.cfc or somewhere global like that (after session is created), drop this in: cfset cfT = cookie.CFTOKEN / cfset cfI = cookie.CFID / cfcookie name=CFTOKEN value=cfT / cfcookie name=CFIDE value=cfI / By not setting an 'expires' value in CFCOOKIE, this will ensure that the session timeout = browser close. From: CraigSell craigs...@charter.net Sent: Friday, April 01, 2011 1:20 PM To: cf-talk cf-talk@houseoffusion.com Subject: Session Variable question Hi, I was doing some testing my CF pages and got a surprise. I use Session variables to hold certain pieces of user information. I had always thought session variables were unique to a browser session such that each new browser invocation would get a new, unique session variable that would be destroyed when the browser closed. The testing I did showed that my assumption is false and that session variables are held across new browser invocations. Then I read the docs (gasp) and find that this is the way it's supposed to be for CF session variables and that they are cleared only when the timeout expires. Sigh. I can't have this kind of persistence. I need unique session variables for each browser invocation and have them cleared when the browser closes. I can't use cookies either. The documentation implies that switching to J2EE session variables will create the behavior I desire. I would give it a go but I don't have access to cfadmin and it's a chore to get those that do make the change. Does anyone know if using J2EE session variables will give the desired behavior in CFMX7 and CFMX8 environments? Thanks! Warren Koch ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343471 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Session Variable question
It's the way that CF sessions are held ... cookies with 0 expiration are held in the browser, not saved to the HDD. From: Kelly webd...@gmail.com Sent: Friday, April 01, 2011 1:33 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Session Variable question Not sure if that will work if he can't use cookies. :) On 4/1/2011 1:28 PM, Jason Fisher wrote: In your Application.cfc or somewhere global like that (after session is created), drop this in: cfset cfT = cookie.CFTOKEN / cfset cfI = cookie.CFID / cfcookie name=CFTOKEN value=cfT / cfcookie name=CFIDE value=cfI / By not setting an 'expires' value in CFCOOKIE, this will ensure that the session timeout = browser close. From: CraigSellcraigs...@charter.net Sent: Friday, April 01, 2011 1:20 PM To: cf-talkcf-talk@houseoffusion.com Subject: Session Variable question Hi, I was doing some testing my CF pages and got a surprise. I use Session variables to hold certain pieces of user information. I had always thought session variables were unique to a browser session such that each new browser invocation would get a new, unique session variable that would be destroyed when the browser closed. The testing I did showed that my assumption is false and that session variables are held across new browser invocations. Then I read the docs (gasp) and find that this is the way it's supposed to be for CF session variables and that they are cleared only when the timeout expires. Sigh. I can't have this kind of persistence. I need unique session variables for each browser invocation and have them cleared when the browser closes. I can't use cookies either. The documentation implies that switching to J2EE session variables will create the behavior I desire. I would give it a go but I don't have access to cfadmin and it's a chore to get those that do make the change. Does anyone know if using J2EE session variables will give the desired behavior in CFMX7 and CFMX8 environments? Thanks! Warren Koch ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343477 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Session Variable question
Like Dave said, CF / J2EE already are using cookies, but there's a difference between cookies held only in the browser (expires when browser closes) and cookies that are written to the user's HDD. If you're using session or client vars, then you're already using 1 of these, and probably both. Setting CFCOOKIE with no expiration is a browser-level cookie; no user files necessary. From: CraigSell craigs...@charter.net Sent: Friday, April 01, 2011 2:03 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Session Variable question I really didn't want to use any kind of cookie. I have data in the session variables I don't want compromised in any way. I was just hoping the J2EE solution would be a magic bullet. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343478 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Persisting query data across cflocation
Yes, storing in a Session or Client struct is your only option. Earlier versions of CF would lose sessions set before a CFLOCATION as well, so if you're on CFMX or something, use JavaScript location.href = C.cfm for the redirect to get around that. From: Eric Cobb cft...@ecartech.com Sent: Wednesday, March 23, 2011 10:58 AM To: cf-talk cf-talk@houseoffusion.com Subject: Persisting query data across cflocation Given the following scenario, what would be the best way to persist the data across the cflocation call? I have page A, which includes page B, which does a cflocation to page C. Query results returned in page A need to be available in page C. Since we're doing a cflocation, which starts a new request, storing the query results in the request scope doesn't work, and a query result set can't be passed as a url variable in the cflocation tag. Is storing the query results in the session scope on page A, then retrieving it on page C my best option? Either that or calling the query on both page A and page C? I was really hoping there was an easier way (like storing it in the request scope!), but I can't seem to figure it out. -- Thanks, Eric Cobb http://www.cfgears.com Help me make a difference this summer.http://bit.ly/i8dJvQ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343227 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: OWASP ColdFusion security links
Great stuff on there; thanks for the link, Dave. From: Dave Watts dwa...@figleaf.com Sent: Wednesday, March 23, 2011 3:17 PM To: cf-talk cf-talk@houseoffusion.com Subject: OWASP ColdFusion security links This looks like a pretty good set of CF security links: http://www.owasp.org/index.php/ColdFusion_Security_Resources Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343235 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ColdFusion 9 Enterprise Features
Looks like Excel support is Enterprise-only: http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ ue.pdf From: Richard White rich...@j7is.co.uk Sent: Monday, March 21, 2011 8:20 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: ColdFusion 9 Enterprise Features thanks for the replies... the only thing that isnt clear to me from adobes site is whether the cfspreadsheet tag is available in the standard version, as it mentioned office interaction being an enterprise feature would anyone know if this is available in standard version? thanks Hi, I am assuming it means i am getting a bit rusty at searching the web, but i cannot seem to find anywhere that details the enterprise-only features. We only need to run a single instance on a server but am trying to work out whether we need standard or enterprise license... Would appreciate any links that details the difference thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343154 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Converting Boolean in the query
Use a cfheader name=Content-Disposition value=attachment; filename=filename.ext That 'attachment' setting should force the browser to give the user the Open / Save dialog. Works a treat thank you - but now I have a new issue if anyone can help please. The CSV file opens in the browser rather than comes up for download - I suspect this is a browser issue rather than a code issue - can anyone provide any clues please. ++ Kevin Parker Advanced Imaging e: webmas...@advancedimaging.com.au w: www.advancedimaging.com.au m: 0418 815 527 ++ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343138 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Do people still name their UPDATE, INSERT DELETE queries?
I do not and never have. Not against it, but just never saw the need. From: Dain Anderson da...@terradotta.com Sent: Tuesday, March 15, 2011 10:27 AM To: cf-talk cf-talk@houseoffusion.com Subject: Do people still name their UPDATE, INSERT DELETE queries? I may have missed conversation of this over the years, so I figured I would ask. What's the current take on this (old?) practice? If I have a CFC function that deletes a record, and that CFC contains a single query, do you find it necessary to scope that query with a name? cffunction name=DeleteMe cfset var q = / cfquery datasource=#variables.ds# name=q delete mah stuff... /cfquery /cffunction I've been refactoring some CFCs and ran into some named deletions and thought this seemed odd to name them -- thoughts? -Dain *Dain M. Anderson *Lead Developer Terra Dotta, LLC 501 W. Franklin Street, Suite 105 Chapel Hill, NC 27516 Phone/Fax: 877-DOTTA-77 (877-368-8277) http://TerraDotta.com http://terradotta. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343056 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: ColdFusion License and Builder
Dev and Hot Spare are 2 different things. You can always install full Enterprise on any server in Dev mode for free, and that has a 2 IP limit. Hot spare is a licensing change (came in 8.0.1, iirc) that allows a 'dark' server to have a full installation re-using your production license, but those 2 servers (production and hot spare) cannot both be running at the same time. This allows for true failover setups without doubling license costs, on Adobe's assumption that you are not really going to run both. From: DURETTE, STEVEN J (ATTASIAIT) sd1...@att.com Sent: Thursday, March 10, 2011 9:46 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: ColdFusion License and Builder I swear that I saw somewhere (I thought on this list but couldn't find it) that the licensing for CF9 was a change for what I had said before about the dev/hot spare, and it didn't have the ip restrictions. I thought that Adam had put both of the items out on this list, but I was looking for the actual in writing info. Thanks, Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342887 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: CFC arguments, passing large strings
My recommendation would be to initialize the CFC with the string as an initial argument, then call the different iterative methods without sending the string over and over: just modify the variable within the CFC after the init. Ex: cfcomponent displayName=stringModder cfset variables.myString = / cffunction name=init access=public cfargument name=myLongString type=string required=true / cfset variables.myString = arguments.myLongString / /cffunction cffunction name=replaceSmartQuotes access=public cfset variables.myString = replaceList(variables.myString, chr(145) , chr(146), ',') / /cffunction cffunction name=replaceLineBreaks access=public cfset variables.myString = replace(variables.myString, chr(13) chr(10), br /, all) / /cffunction /cfcomponent Then in the calling template: cfset stringObj = createObject(component, StringModder).init(form.bigTextValue) / cfset newString = stringObj.replaceSmartQuotes() / cfset newString = stringObj.replaceLineBreaks() / etc ... From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 12:41 PM To: cf-talk cf-talk@houseoffusion.com Subject: CFC arguments, passing large strings Hello, I have a CFC which does some string parsing to find and replace wildcards. Within the CFC I am calling a method over and over and passing in the entire string as an argument. The method does some magic and returns a result. The string could be a large (like a 2 page document) string and since its being provided as an argument and is not inside an object/struct, I believe its passed by value. Which means, unless I am mistaken, if I call the internal method 100 times, and pass in this large string am I creating a ton of overhead/memory usage? Would I be better off creating a temp structure to hold the string and other arguments (which change with each iteration) and passing that into my method so its passed by reference instead? What do you think? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342760 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFC arguments, passing large strings
Oh, well, if it's a singleton, then you're going to end up taking up those whacking great chunks of server memory on every request cycle. I would strongly consider moving it out of application scope for that very reason, but I certainly don't know the entire app structure so that's just a shot in the dark. From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 1:18 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: CFC arguments, passing large strings I should have mentioned the CFC is stored in the application scope, so I can't do that... Brook -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: March-04-11 9:56 AM To: cf-talk Subject: re: CFC arguments, passing large strings My recommendation would be to initialize the CFC with the string as an initial argument, then call the different iterative methods without sending the string over and over: just modify the variable within the CFC after the init. Ex: cfcomponent displayName=stringModder cfset variables.myString = / cffunction name=init access=public cfargument name=myLongString type=string required=true / cfset variables.myString = arguments.myLongString / /cffunction cffunction name=replaceSmartQuotes access=public cfset variables.myString = replaceList(variables.myString, chr(145) , chr(146), ',') / /cffunction cffunction name=replaceLineBreaks access=public cfset variables.myString = replace(variables.myString, chr(13) chr(10), br /, all) / /cffunction /cfcomponent Then in the calling template: cfset stringObj = createObject(component, StringModder).init(form.bigTextValue) / cfset newString = stringObj.replaceSmartQuotes() / cfset newString = stringObj.replaceLineBreaks() / etc ... From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 12:41 PM To: cf-talk cf-talk@houseoffusion.com Subject: CFC arguments, passing large strings Hello, I have a CFC which does some string parsing to find and replace wildcards. Within the CFC I am calling a method over and over and passing in the entire string as an argument. The method does some magic and returns a result. The string could be a large (like a 2 page document) string and since its being provided as an argument and is not inside an object/struct, I believe its passed by value. Which means, unless I am mistaken, if I call the internal method 100 times, and pass in this large string am I creating a ton of overhead/memory usage? Would I be better off creating a temp structure to hold the string and other arguments (which change with each iteration) and passing that into my method so its passed by reference instead? What do you think? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342763 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFC arguments, passing large strings
Yes, that would work. I suppose it breaks encapsulation, since the scope of the struct is 'known' to the CFC, but it should accomplish what you're after. If you do that, you technically wouldn't even need return values from the CFC, since changes to made to the method argument, would be made to the actual struct variable in the calling template. From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 2:35 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: CFC arguments, passing large strings But if I wrap it in structure, then it would be passed by reference. Wouldn't this alleviate the memory usage issue? Brook -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: March-04-11 10:24 AM To: cf-talk Subject: RE: CFC arguments, passing large strings Oh, well, if it's a singleton, then you're going to end up taking up those whacking great chunks of server memory on every request cycle. I would strongly consider moving it out of application scope for that very reason, but I certainly don't know the entire app structure so that's just a shot in the dark. From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 1:18 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: CFC arguments, passing large strings I should have mentioned the CFC is stored in the application scope, so I can't do that... Brook -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: March-04-11 9:56 AM To: cf-talk Subject: re: CFC arguments, passing large strings My recommendation would be to initialize the CFC with the string as an initial argument, then call the different iterative methods without sending the string over and over: just modify the variable within the CFC after the init. Ex: cfcomponent displayName=stringModder cfset variables.myString = / cffunction name=init access=public cfargument name=myLongString type=string required=true / cfset variables.myString = arguments.myLongString / /cffunction cffunction name=replaceSmartQuotes access=public cfset variables.myString = replaceList(variables.myString, chr(145) , chr(146), ',') / /cffunction cffunction name=replaceLineBreaks access=public cfset variables.myString = replace(variables.myString, chr(13) chr(10), br /, all) / /cffunction /cfcomponent Then in the calling template: cfset stringObj = createObject(component, StringModder).init(form.bigTextValue) / cfset newString = stringObj.replaceSmartQuotes() / cfset newString = stringObj.replaceLineBreaks() / etc ... From: Brook Davies cft...@logiforms.com Sent: Friday, March 04, 2011 12:41 PM To: cf-talk cf-talk@houseoffusion.com Subject: CFC arguments, passing large strings Hello, I have a CFC which does some string parsing to find and replace wildcards. Within the CFC I am calling a method over and over and passing in the entire string as an argument. The method does some magic and returns a result. The string could be a large (like a 2 page document) string and since its being provided as an argument and is not inside an object/struct, I believe its passed by value. Which means, unless I am mistaken, if I call the internal method 100 times, and pass in this large string am I creating a ton of overhead/memory usage? Would I be better off creating a temp structure to hold the string and other arguments (which change with each iteration) and passing that into my method so its passed by reference instead? What do you think? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342768 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: DaysInMonth issue
Nope, when I do #daysInMonth(createDate(2010, 2, 1))# it returns '28' correctly. You would get '31' for #daysInMonth(createDate(2010, 1, 2))#, though, I suppose. From: Jeff Epstein jepst...@sfcg.org Sent: Tuesday, March 01, 2011 11:13 AM To: cf-talk cf-talk@houseoffusion.com Subject: DaysInMonth issue I just had a failure of the DaysInMonth function. For a report running on February data, from 2010-02-(01 hardcoded), to being DaysInMonth, the date result was 2010-02-31!! I had to hard-code 2010-02-28 as to to make the report work. Anybody else having February problems today with DaysInMonth? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342653 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: I think I'm confused...
One solution is to have a table of sub-domains that refer to the main application config table: lookup domain.com or blog.domain.com or www.domain.com and find the parent config record for www.domain.com. In that case, you can then add dev.domain.com to the sub-domain table, but you'd still have to have the dev.domain.com entry in your local hosts file for it to work. From: Rick Faircloth r...@whitestonemedia.com Sent: Thursday, February 24, 2011 8:01 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: I think I'm confused... I could easily see that working for single sites, but if I'm developing a multiple sites, one codebase application that depends on reading specific domain names for setting sites variables, that means I have to have those dev.mydomain domains in the local hosts file, as well. I could just use the mydomain part of the url for identification, but as someone pointed out earlier in the MSOC discussion, that wouldn't account for subdomains, if they're used, such as blog.mydomain, etc. Any thoughts on this concern? Rick -Original Message- From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Thursday, February 24, 2011 6:04 AM To: cf-talk Subject: Re: I think I'm confused... I use different domain names. I have www.mydomain.com for the live server site, and dev.mydomain for my local development sites Then in my hosts file, i have the line: 127.0.0.1 dev.mydomain for each client site i have. With apache, the local dev versions and remote server versions behave in an identical manner Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Thu, Feb 24, 2011 at 9:21 PM, Rick Faircloth r...@whitestonemedia.com wrote: Ok... thanks Mark and Eric We need a better solution available to developers to be able to switch between local and server DNS. Perhaps, a switch of some kind that could be inserted into a URL to tell a browser to use a local hosts file if that switch is present. http://local/www.xyz.com or http://l:www.xyz.com That would certainly be a *lot* easier than constantly editing that hosts file. But it's good to know that I can use a local DNS file that way! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342555 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Feedback on this approach to many sites, one codebase (MSOC)
The big caveat I will give about have multiple databases with multi-tenant code is that any change to the shared code has to be reflected in every single database simultaneously. And that's a challenge and a half. From: Rick Faircloth r...@whitestonemedia.com Sent: Tuesday, February 22, 2011 10:58 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Feedback on this approach to many sites, one codebase (MSOC) I can see both sides on this one very clearly. To this point, all I've ever done is develop custom applications and websites. I haven't sold the exact same site in 10 or so years of development! However, I really want to get away from working just one-on-one with clients. They can be a real pain. Some are just downright ignorant and impossible to work with. (You can tell I've had a couple of bad experiences lately... ;o) I'm want to move into developing sites for specific uses, such as for recreation departments or real estate agents and brokers, etc., and have them sign up for the site online, choose their template, put in their content, and, after a free trial period, they pay their money. If they need support, they can email me. If they want functional customization, I'll build a custom function for a client, charge them for it, then make that function available to anyone else using my SAAS sites. The customers will never own the sites and never have the opportunity to take the code elsewhere. If they want cosmetic or style customization, I can do that and charge them for it. It will still remain my site and not the client's site. I'll still build custom apps along the way, I'm sure, but I'd like to start making my work on an app/site pay more than one time. However, like you Matt, I may end up going back to individual customizations, if things don't work out so well on the SAAS front. I do have some clients who always insist on being absolutely unique and want to have the best site. To those who want to be absolutely unique, I can sell the template for a few thousand or whatever amount, and they'll have exclusive rights to use that template, but they still won't own it. Soon as they stop paying, the template goes back into the fold. I just want to test this approach and see if I can make it work. Rick PS - when it comes to the database, I'm leaning towards a different database for each client. I'd hate to have problems with a client's data and have to parse through everyone else's data to see what the problem is. Of course, I do have some common data databases that everyone would share...local area info, etc. But I'm currently still using distinct databases for client-specific data. -Original Message- From: Matt Robertson [mailto:websitema...@gmail.com] Sent: Tuesday, February 22, 2011 1:02 PM To: cf-talk Subject: Re: Feedback on this approach to many sites, one codebase (MSOC) Even though my own CMS can handle multiple sites running off of a single installation, I don't run it that way. The points brought up about clients wanting individual customizations and portability fit my situation. I understand if you are offering software-as-a-service things change, but for me this turned out to be enough of a headache that I reverted to separate installs and have never regretted it. If a customer wants an upgrade, they pay me an hour or two individually to make that happen. If they want a specific feature that I don't want to fold into the overall codebase, I can do it - and earn the money for doing it - without worrying about consequences on 40 other web sites on the server. But thats a business decision and not coding. Mentioned just as food for thought. For sites for my own company, where presently we have about 36 up and running and will be at around 60 when we are done, we *do* share a single codebase. There are no special mappings. Each site has an Application.cfm that looks like this: request.appName=AR_060110_1033; request.rootFolder=ARDotCom/; request.FQDN=www.mysiteAR.com; cfinclude template=../common/Application_common.cfm The common file has some server vars too: server.BaseRoot=C:/foo/bar/sites/; server.dsn= etc. etc. blah blah And thats enough - along with more code in the common Application.cfm - to set up absolute and relative paths to the files I have located in the common-use folder. Every site has its own independent application scope. I've opted to set the app name manually so I can reset session and app vars if need be... a rare occurrence but its nice to have the option available. The root of this web site is a root folder in a discrete IIS web site and, since CF has no trouble recursing back up beyond a web root insofar as physical paths go, the /common/ folder is not accessible from the web, but it is from CF. Very simple to set up. ~| Order the Adobe Coldfusion Anthology now!
Re: Feedback on this approach to many sites, one codebase (MSOC)
Yes, I used this method for a long time by putting code right into the CF codebase. I used a different datasource for the DB updates, one that allowed MODIFY / ALTER / CREATE, and then had the code test against existing DB structures to decide which changes needed to be made along with that set of code changes. Still always appreciated having those changes made in one DB, but it wouldn't have mattered much because all changes were managed in the same codebase. On 2/23/2011 3:46 PM, Brian Cain wrote: I wrote a custom desktop application in VB to update all my databases at one time. Using SQL scripting this can be easily managed. When I am ready to roll out a change that requires a DB update, I can do it in real time, with minimal service interruption, and without taking the sites offline. It has not failed me yet, and I have been doing it that way for over 6 years. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342539 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: SELECT - Option selected
Same. As of CF8 I use CFFORM sometimes, but only for the built-in text editor in CFTEXTAREA ... easier than wiring up tinyMCE or ckEditor, but I don't use it for validation, I use a simple JS library for that. From: Brian Cain bcc9...@gmail.com Sent: Thursday, February 17, 2011 7:58 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: SELECT - Option selected I couldn't agree more. I abandoned CFFORM years ago. Sent from my iPhone On Feb 17, 2011, at 6:05 AM, Michael Grant mgr...@modus.bz wrote: In my experience CFForm is more trouble than it's worth. I generally just use regular forms + jquery to get elegant client-side validation. Much more lightweight and gives much more granular control over your form. On Thu, Feb 17, 2011 at 5:27 AM, Torrent Girl moniqueb...@gmail.com wrote: The solution was not to use CFFORM at all. it now works. I have a simple one: cfselect name=endampm required=yes message=Please select an AM/PM for the end time id=endampm option value=/option option value=AM cfif schedule.endampm EQ AMselected=selected /cfifAM/option option value=PM cfif schedule.endampm EQ PMselected=selected /cfifPM/option /cfselect depends on cfselect... in simple cfselect - one based on an in-page query, for example - you can provide a value in the 'selected' attribute and an option with that value will be pre-selected. advanced cfselect - one with a binding - does not support this functionality. but there are javascript work-arounds for that: google 'cfselect binding selected' and you will find them Azadi On 16/02/2011 21:34 , Torrent Girl wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342377 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Feedback on this approach to many sites, one codebase (MSOC)
Yeah, that works just fine, Rick. Have used variations of that approach for quite a few years, both with and without a 'framework' in place, and in any case that code sits quite well in the Application.cfc as you've outlined. From: Rick Faircloth r...@whitestonemedia.com Sent: Thursday, February 17, 2011 12:29 PM To: cf-talk cf-talk@houseoffusion.com Subject: Feedback on this approach to many sites, one codebase (MSOC) Hi, all... I've been tinkering around the edges with many sites, one codebase (MSOC) for awhile and was interested in getting some feedback on an approach I'm taking. The most basic part is that I use the domain name to determine variable values for a site. I'll start with that. I use application.cfc to set up the following: cfset this.name = #cgi.server_name# Any issues with that? Then I have use the onApplicationStart cffunction to clear session and application variables. Then I use the cgi.server_name, determined from the URL visited by a user, of course, and run this query to get needed values for site variables from a database: cfquery name = qGetApplicationVariables datasource=globalSiteManager select * fromsiteApplicationSettings where (select strcmp(siteName, '#cgi.server_name#')) = -1 /cfquery Then, I set site variables as follows: cfset application.dsn = #qGetApplicationVariables.applicationDSN#' etc... At this point, I'm entering all a site's variables into a database manually, although if I continue with this approach, I'll develop an automated solution. The site menu is determined also by values in a database for the site by using code such as the following: cfset application.calendar = '#qGetApplicationVariables.applicationCalendar#' If the qGetApplicationVariables.applicationCalendar value is 'yes', then the menu item is shown, if it's 'no', then the menu choice is not shown. The last piece of this approach is setting path variables, etc, for image and document uploads, image paths, etc, with this type of code: cfset application.userImagesPathAbsolute = '#qGetApplicationVariables.applicationUserImagesPathAbsolute#' etc. This seems to be working fine so far... speed is good, etc., but I'd like to know, from those of you who have been down this road before, if I'm heading for a show-stopping issue, or if this is a workable solution. And, I'm really not interested in frameworks...not at this point. Thanks for taking the time to read this and offer any feedback. I'm just ready to develop some applications that I can sell *more than once*!! Work smarter, not harder approach. Watching people getting rich selling apps for $.99, such as Angry Birds, is just killing me. I thought, surely there has got to be a better way to be a freelancer than one-off projects! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342392 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Feedback on this approach to many sites, one codebase (MSOC)
I usually use CFSWITCH and assign my own app names, which allows me to use the built-in list nature of CFCASE values: cfswitch expresssion=#cgi.server_name# cfcase value=domain.com,www.domain.com cfset appName = domain / /cfcase cfcase value=mydomain.com,www.mydomain.com cfset appName = mydomain / /cfcase cfcase value=blog.domain.com cfset appName = domainBlog / /cfcase /cfswitch etc etc ... that way my onApplicationStart is basically mapping 1-to-1 with my application config table, but I can throw as many domain variations at it as I want to. From: Mark A. Kruger mkru...@cfwebtools.com Sent: Thursday, February 17, 2011 12:59 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Feedback on this approach to many sites, one codebase (MSOC) Ooh... good point Russ. I usually strip off the www and replace the periods with underscores as well. That way I have only 1 app name per domain. So www.coldfusionmuse.com would be coldfusionmuse_com (don't like those periods in variable names). -Mark -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Thursday, February 17, 2011 11:45 AM To: cf-talk Subject: Re: Feedback on this approach to many sites, one codebase (MSOC) For a primae example of how this is best done you can look at many of the major frameworks which support this type of setup. MACH-II for example allows you to have a single core install of the framework which is used by all your apps via a simple mapping. If you plan to use the domain name to create the application name and track sessions and users and what not, then you also need to allow for the fact that the site may be accessed via multiple domains (domain.com, www.domain.com and aliases) or build in automatic redirection so that this doesn't happen. Russ On Thu, Feb 17, 2011 at 5:28 PM, Rick Faircloth r...@whitestonemedia.comwrote: Hi, all... I've been tinkering around the edges with many sites, one codebase (MSOC) for awhile and was interested in getting some feedback on an approach I'm taking. The most basic part is that I use the domain name to determine variable values for a site. I'll start with that. I use application.cfc to set up the following: cfset this.name = #cgi.server_name# Any issues with that? Then I have use the onApplicationStart cffunction to clear session and application variables. Then I use the cgi.server_name, determined from the URL visited by a user, of course, and run this query to get needed values for site variables from a database: cfquery name = qGetApplicationVariables datasource=globalSiteManager select * fromsiteApplicationSettings where (select strcmp(siteName, '#cgi.server_name#')) = -1 /cfquery Then, I set site variables as follows: cfset application.dsn = #qGetApplicationVariables.applicationDSN#' etc... At this point, I'm entering all a site's variables into a database manually, although if I continue with this approach, I'll develop an automated solution. The site menu is determined also by values in a database for the site by using code such as the following: cfset application.calendar = '#qGetApplicationVariables.applicationCalendar#' If the qGetApplicationVariables.applicationCalendar value is 'yes', then the menu item is shown, if it's 'no', then the menu choice is not shown. The last piece of this approach is setting path variables, etc, for image and document uploads, image paths, etc, with this type of code: cfset application.userImagesPathAbsolute = '#qGetApplicationVariables.applicationUserImagesPathAbsolute#' etc. This seems to be working fine so far... speed is good, etc., but I'd like to know, from those of you who have been down this road before, if I'm heading for a show-stopping issue, or if this is a workable solution. And, I'm really not interested in frameworks...not at this point. Thanks for taking the time to read this and offer any feedback. I'm just ready to develop some applications that I can sell *more than once*!! Work smarter, not harder approach. Watching people getting rich selling apps for $.99, such as Angry Birds, is just killing me. I thought, surely there has got to be a better way to be a freelancer than one-off projects! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342395 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Feedback on this approach to many sites, one codebase (MSOC)
If you're using shared server space, though, no need to spend money on a bunch of separate sites if they all need to use the same codebase. Just point them all the same IP, which I would do even if they're all on separate sites but the same server, but then I get to really have all the code in one place, with only having separate directories for site assets (CSS, HTML templates, images, file resources), just like Mura or other CMS systems do. I don't think SEO would have any way of knowing whether or not the site was set up separately in IIS or it was one app serving content on each domain through a single site in IIS. As for webstats, I go with Google Analytics, which is JS-based tracking, so the logs of the site itself are irrelevant because I don't find the need to do deep web server diagnostics. From: Russ Michaels r...@michaels.me.uk Sent: Thursday, February 17, 2011 1:21 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Feedback on this approach to many sites, one codebase (MSOC) FYI it is actually a best practice these days to only have 1 domain accessing your site and to redirect all others to that domain (including www) whether doing it in your code or using url redirection. You saw one of the reasons which is managing your code base, other reasons include web stats traffic (which usually only tracks the primary domain), SEO (which supposedly doesn't like multiple domains pointing to same site). -- Russ Michaels www.bluethunderinternet.com : Business hosting services solutions www.cfmldeveloper.com: ColdFusion developer community www.michaels.me.uk : my blog www.cfsearch.com : ColdFusion search engine ** *skype me* : russmichaels ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342404 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Feedback on this approach to many sites, one codebase (MSOC)
+1 to databasing all of it ... if you've got a system where these things change a lot, particularly new domains that might impact the Application.cfc, then definitely push the config to the database. As was mentioned before, you can handle redirects there as well: if domain.com is found in the DB and if the database record for that domain has a redirect to www.domain.com, then handle the redirect. Allows you to abstract it all in Application.cfc while giving you great flexibility in the administration of it. From: Steve Bryant st...@bryantwebconsulting.com Sent: Thursday, February 17, 2011 2:45 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Feedback on this approach to many sites, one codebase (MSOC) I prefer to have the domain names in a database mapped to a primary domain name or an application name. This allows me to have a UI to enter new domain names as they are needed (we add them pretty frequently). That also allows you to write code to your web server to add bindings for each domain name to your web site. If your DNS server allows, then you can also automatically put in the DNS entry there. If you have a large MSOC system that frequently adds domain names then a little automation can go a long way. Steve I usually use CFSWITCH and assign my own app names, which allows me to use the built-in list nature of CFCASE values: cfswitch expresssion=#cgi.server_name# cfcase value=domain.com,www.domain.com cfset appName = domain / /cfcase cfcase value=mydomain.com,www.mydomain.com cfset appName = mydomain / /cfcase cfcase value=blog.domain.com cfset appName = domainBlog / /cfcase /cfswitch etc etc ... that way my onApplicationStart is basically mapping 1-to-1 with my application config table, but I can throw as many domain variations at it as I want to. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342406 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Charge for meetings
+1 to 15-minute increments. As an employee, tracking at this level is annoying, but as an independent contractor, it's crucial. Very easy to get nickel-and-dime'd to pieces, but this way you at least get compensated for it. From: Mark A. Kruger mkru...@cfwebtools.com Sent: Monday, February 07, 2011 9:12 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Charge for meetings We also set a policy to charge in 15 minute increments. Any phone call is going to incur at least 15 minute charge. That way we have substantive discussions with customers over the phone or in meetings and avoid those 5 minute phone calls (I had a thought...). ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341930 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Charge for meetings
Completely agree. Once into a project, all the project time is client time; bill accordingly. On 2/5/2011 5:37 PM, Brian Cain wrote: I follow the same basic rule. No charge on the initial consult, but hourly after that. It helps force the client to prepare and think through why they really want. Sent from my iPhone On Feb 5, 2011, at 4:19 PM, Phillip Vectorvec...@mostdeadlygame.com wrote: I charge per hour. If you want to have a meeting for that time, I charge for it. Talk away. :) Now, the initial meeting, I tend not to charge for. But those I like to keep short and focused. On Sat, Feb 5, 2011 at 2:05 PM, Paul Alkemapaulalkemadesi...@gmail.com wrote: Hi All, I have a question; when you guys do consulting or freelance programming, do you charge for meetings? Or do you absorb meeting time into your fees? Thanks, Paul ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341880 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFImage at 300dpi
Some thoughts on dpi and what it means to screen vs paper. Dpi effectively changes the size an image will print at, relative to its pixel density. http://www.scantips.com/no72dpi.html ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341844 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFImage at 300dpi
Pretty sure that DPI is not an accessible via CFIMAGE. From: Claude Schnéegans schneeg...@internetique.com Sent: Thursday, February 03, 2011 3:22 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CFImage at 300dpi But all that still leaves us with the question of how to create a downloadable image file with CF You're right. If CFimage does not do it, I have no solution. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341848 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Math weirdness
Whoa, creepy. That is certainly very odd. From: Jen McVicker snarkmeis...@gmail.com Sent: Thursday, February 03, 2011 3:57 PM To: cf-talk cf-talk@houseoffusion.com Subject: Math weirdness OK, a coworker sent this over to me and I am puzzled: cfset number1 = evaluate(12.5 * 1.1) cfset number2 = 12.5 * 1.1 cfset number3 = 13.75 cfset testEval = number3 - number1 cfset testNoEval = number3 - number2 cfoutput number1 (12.5 * 1.1): strong#number1#/strongbr number2 (#number2#): strong#number2#/strongbr number3 (#number3#): strong#number3#/strongbr #number3# - #number1#: strong#testEval#/strongBR #number3# - #number2#: strong#testNoEval#/strongBR cfif number3 eq number1Number3 equals number1BR cfelseNumber3 does NOT equal number1BR/cfif cfif number3 eq number2Number3 equals number2BR cfelseNumber3 does NOT equal number2BR/cfif /cfoutput Results in: number1 (evaluate(12.5 * 1.1)): 13.75 number2 (12.5 * 1.1): 13.75 number3 (13.75): 13.75 13.75 - 13.75: 0 13.75 - 13.75: -1.7763568394E-015 Number3 equals number1 Number3 does NOT equal number2 Obviously number2 is set to a reference of the expression rather than the actual value that is returned. But since the variable outputs as 13.75, why does it make a difference? Can someone explain it to me in small words so that I will understand? ;-) Jen Perkins McVicker Adobe Certified ColdFusion Developer Email: jen.mcvic...@gmail.com Linked In: http://www.linkedin.com/in/jmcvicker ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341851 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Query of query help
Yes, QoQ will work here. !--- get your folders --- cfdirectory action=list name=roomList type=dir directory=#roomsDir# !--- get the rooms from the DB --- cfquery datasource=#dsn# name=roomsDB SELECT roomid FROM rooms /cfquery cfoutput query=roomList !--- loop through the folders and check against the rooms in the DB --- cfquery dbtype=query name=orphanRoom SELECT name FROM roomsDB WHERE roomid = '#name#' /cfquery cfif not orphanRoom.recordCount !--- flag this as a room without a folder --- /cfif /cfoutput ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341725 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of query help
Stefan, This might work ... can't remember if the IN () function works in QoQ or not. !--- get a list of all the rooms from the DB (after you query) --- cfset roomList = valueList(roomsDB.roomid) / !--- now query to get folders that are not in the rooms DB list --- cfquery dbtype=query name=roomsOK SELECT * FROM roomList WHERE name NOT IN ( cfqueryparam cfsqltype=cf_sql_varchar value=#roomList# list=true / ) /cfquery From: Stefan Richter ste...@flashcomguru.com Sent: Monday, January 31, 2011 2:42 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Query of query help Thanks. Guess what I was trying to avoid was a loop with 35,000 queries... I was trying to come up wit a clever way to do this in one SQL statement. One issue I noticed is that QoQ does not to seem to (easily?) support joins. Then again I'm no SQL ninja by any means. S On 31 Jan 2011, at 17:54, Jason Fisher wrote: Yes, QoQ will work here. !--- get your folders --- cfdirectory action=list name=roomList type=dir directory=#roomsDir# !--- get the rooms from the DB --- cfquery datasource=#dsn# name=roomsDB SELECT roomid FROM rooms /cfquery cfoutput query=roomList !--- loop through the folders and check against the rooms in the DB --- cfquery dbtype=query name=orphanRoom SELECT name FROM roomsDB WHERE roomid = '#name#' /cfquery cfif not orphanRoom.recordCount !--- flag this as a room without a folder --- /cfif /cfoutput ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341735 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Query of query help
Nope, nothing wrong with it. There may be a limit on the number of statements in a QoQ WHERE clause, though I don't know. I know the old Microsoft JET database engine used to have a logical limit of 40 statements in the WHERE clause. Just something to note if it bombs on 30,000 statements ... From: Stefan Richter ste...@flashcomguru.com Sent: Monday, January 31, 2011 3:21 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Query of query help I was trying something like this: cfquery name=orphanRooms dbtype=query select * from roomList WHERE name = 'x' cfloop query=roomsDBOR roomList.name = '#roomid#' /cfloop /cfquery I think I am getting somewhere with it. Anything inherently wrong with this? Stefan ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341740 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: favorite coldfusion host
I've been happy with CrystalTech or NewTek ... whatever they're called now. Definitely agree on HMS / Hosting.com ... did *not* have good experiences with them. From: Sean Corfield seancorfi...@gmail.com Sent: Tuesday, January 25, 2011 9:53 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: favorite coldfusion host FWIW, I've had unpleasant experiences with HostMySite / Hosting.com and have moved everything away from them. They used to be my 'go to' hosting company back in the day but since Neil and Lou left it's gone totally downhill as far as CF is concerned. I've had less than stellar experiences with CrystalTech (years ago, maybe they're better now?) and words can't begin to describe GoDaddy's CF hosting (one of the most viewed posts ever on my blog is a writeup of their hosting - with 170+ comments, nearly all complaints about them). Sean ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341335 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Clustering ColdFusion - some black holes
I agree with Dave on this one: set sticky sessions on the LB, and let each web server stand independently so there are no single failure points. If you need true failover, refactor the apps to use client vars and store them in a database for clean 'session' replication across the web servers. From: Dave Watts dwa...@figleaf.com Sent: Tuesday, January 25, 2011 9:11 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Clustering ColdFusion - some black holes Goal: One rock stable high performance ColdFusion cluster with session replication and quick failover Is there a specific requirement for session replication? Because you might get generally better results if you just use sticky sessions. That buys you load balancing, but not complete failover - but it may be enough, if your failure rate is acceptably low. I've set up session replication for a couple of clients, and the whole thing just seemed a bit fragile to me. I'd prefer to use a database for session management in this case, I think - which might involve using Client variables instead of Session variables, or might involve custom code to synchronize Session variables with a database. I've seen descriptions where the same cluster (same cluster name) is created on every physical server, and the connector setup is run against localhost, but that doesn't make sense either.. ? Yeah, that doesn't really make sense to me either. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341172 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Clustering ColdFusion - some black holes
Agreed. Back in the day we did actually need sessions to hold across servers, but we went with the client-vars-in-the-DB to do it. Don't know if AOL still does this, but back in 2004 when many end users (B2C) were still using AOL as their ISP, AOL had a habit of changing a user's IP every 3 or 4 page requests ... which played hell with load balanced e-commerce sites, since the LB treated a new IP as a new session which may or may not get the same server assignment. By linking the session from the browser to the application (via client vars) rather than from the browser to the server (via session vars) we were able to smoothly pass sessions within an application from one server to another without issue. Barring that, though, just for a typical web experience, it's simply not needed. If you could guarantee that users won't have their IPs changed in mid-visit, it would also not be needed. From: Sean Corfield seancorfi...@gmail.com Sent: Tuesday, January 25, 2011 12:48 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Clustering ColdFusion - some black holes I hope Mike Brunt is still on this list and will jump in on this because he has a lot of experience with clustering JRun and has a lot to say about session replication and other options (basically he agrees with Dave :) My experience with session replication on JRun was that replication could lag and you could get failover to occur without session data being fully replicated so you'd lose data anyway. This is true of most JEE containers (although JRun's session replication does seem a little less robust than some of the others). You may also generate a huge amount of internal network traffic as all session variable updates are replicated to other servers in the cluster. If you grow the cluster, you increase the network traffic as each server has to replicate to every other server - which is why most folks who even go down this path tend to partition the cluster into small, replicating groups with the load balancer set to failover only within a group (unless the whole group goes offline, when it fails over to a new group and you lose sessions). In general, very, very sites have such critical session data that they need to replicate. Everyone seems to think they need it but the reality is that failover is (should be!) rare enough that the number of end users adversely affected on most sites is minuscule and, frankly, if your servers are failing over regularly, you have bigger problems than session loss. One thing that a cluster with failover does buy you is the ability to do rolling deployments across the cluster with zero downtime (depending on how you manage database updates, of course), but even then there are other options, such as using a load balancer that supports session draining on sticky sessions etc (that was how we did it at macromedia.com / adobe.com). Sean On Tue, Jan 25, 2011 at 6:10 AM, Dave Watts dwa...@figleaf.com wrote: Is there a specific requirement for session replication? Because you might get generally better results if you just use sticky sessions. That buys you load balancing, but not complete failover - but it may be enough, if your failure rate is acceptably low. I've set up session replication for a couple of clients, and the whole thing just seemed a bit fragile to me. I'd prefer to use a database for session management in this case, I think - which might involve using Client variables instead of Session variables, or might involve custom code to synchronize Session variables with a database. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341182 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Coldfusion Standard and Load balancing env
As Dave notes, hardware load balancing works just fine in front of CF Std servers. The sticky session thing really is key, though, if you have any sort of session management in your applications. Another option to sticky sessions on the LB is to convert session structs to client structs within the applications, but that can be a bit of refactoring work, of course. If you go that route, just be sure to save Client vars to the database NOT the Registry, and understand that client scope can't hold complex data types, so structs, arrays, and queries need to be converted to WDDX or JSON or some other serialized format before they can be assigned to a client var. On 1/24/2011 5:10 PM, Dave Watts wrote: We currently run coldfusion 9 Standard on a single server, our site has grown and we are looking at adding an additional box and setup a load balancing environment for the site. Here are my questions: * Is Coldfusion Standard sufficient for this environment or will i require enterprise? Yes, Standard is sufficient for use with multiple servers behind a hardware load balancer. * If so would anyone know of any good information sources in relation to configuring coldfusion standard for this environment - anything i need to watch out for? There isn't really anything specific to CF configuration here. On the load balancer, you'll probably want to enable sticky sessions, as CF Standard can't replicate session data across CF servers like Enterprise can. That's really all, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341153 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: wireframe for developers
+1 for Balsamiq. Less about design and more about wireframing the layout and functional fell before writing actual code. From: Tom McNeer tmcn...@gmail.com Sent: Tuesday, January 18, 2011 10:55 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: wireframe for developers On Tue, Jan 18, 2011 at 10:52 AM, Gerald Guido gerald.gu...@gmail.comwrote: I use Balsamiq Mockups. Me, too. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 1735 Johnson Road NE Atlanta, GA 30306 404.589.0560 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340979 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Regex to strip out non-numerics but leave decimal point
reReplace(rc.hourlyRateInvoicedToClient, [^[:digit:]\.], , all) A set [] takes all the options in it as options, so escape the . with \. and you should be good to go. From: Nando d.na...@gmail.com Sent: Tuesday, January 18, 2011 2:09 PM To: cf-talk cf-talk@houseoffusion.com Subject: Regex to strip out non-numerics but leave decimal point I'm trying to strip out all non-numeric characters from some fields. The catch is I need the regex to leave in the decimal point, cuz these are rates that include cents. rereplace(rc.hourlyRateInvoicedToClient,'[^[:digit:]]','','all') I'm not sure how to work something like [^\.] into it. Can anyone help? Thanks, Nando ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340980 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: wireframe for developers
Yeah, clients are always going to want to know what it's going to look like. However, I've found it extremely helpful to segregate the wireframing from the design. In my experience, most clients put the cart before the horse, concentrating way too much (or too early, or both) on the aesthetics without giving much thought to how their site/app/whatever needs to work, how information will be delivered, etc. But what they don't realize is that it is, in fact, the information/content/etc. that should be driving the design, not the other way around. Amen to this! I can't count the number of times I've seen a beautiful design get completely hosed because the client decided at the last minute that half a dozen app functions should suddenly get Top Nav treatment. Nailing down the functional requirements first can be really helpful in determining what needs to be included in the design and how it needs to be treated (what's important, what's 2nd level, etc). ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340981 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: (ot) Server Setup Opinions
It used to be very bad to have DB and CF on the same server, but I'm not sure that's still the case ... probably depends largely on the RDBMS you're using. In any event, it is certainly best practice to have production boxes separate. Running dozens of databases (or even 100) on a single DB server is no problem. Running many sites on a single CF server is also no problem, assuming you give yourself proper sizing on disk space and RAM. From: Che Vilnonis ch...@asitv.com Sent: Friday, January 14, 2011 8:56 AM To: cf-talk cf-talk@houseoffusion.com Subject: (ot) Server Setup Opinions I host approx. 5-6 dozen (small traffic) database driven CF sites on multiple servers and I am in the market for new server hardware. Since I last purchased hardware, the capabilities of server hardware has increased dramatically. That said, for those of you whose company hosts CF web sites, do you: A: Have a separate database server and a separate web server for 'X' number of sites? B: Have one server that is the combined database/web server for only 'X' number of sites? C: Have one 'mega' server that is the combined database/web server for all of your sites? D: Some other combo. Please explain. I guess I'm wondering if it is still frowned upon to combine the database and the web server on the same machine? Any responses would be appreciated. Che Vilnonis Application Developer Advertising Systems Incorporated 8470C Remington Avenue Pennsauken, NJ 08110 p: 856.488.2211 f: 856.488.1990 www.asitv.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340854 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: (ot) job-placement agent
Got great help a number of years ago from TEKSystems and I've had good experiences with Kforce as well. From: John M Bliss bliss.j...@gmail.com Sent: Friday, January 14, 2011 10:25 AM To: cf-talk cf-talk@houseoffusion.com Subject: (ot) job-placement agent Have you every used a job-placement agent? (Not sure if that's exactly what they're called.) Someone who helps with your CV, markets you, sets up interviews, and then gets paid by employer that eventually hires you. If so, can you recommend one and/or a company that does this sort of thing? URL? Thanks! P.S. Boss, if you're reading this, I'm not looking...it's for a friend. :-) -- John Bliss - http://about.me/jbliss ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340872 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Accessing Visual Fox Pro
Ach, VFP ... what a pain. Still have a lot in our shop, but hoping to kill most of it this year ;) Not sure if you can actually use SQL Server as the intermediary, like you do with Access, but you can definitely create SSIS scripts to pull VFP data into SQL tables, which is what we do for a few widely used tables. I am working on a project that connects to an ERP system running Visual Fox Pro as its backend. Ideally I would like to connect SQL Server to the VFP database and use SQL Server as the interface, like you can with Access. Does anyone know if that's possible? Good idea or suicidal? Thanks, Duane ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340789 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: compare using cfcase
OR just use the list nature of CFCASE: cfcase value=-1 string 1 is neither equal nor greater /cfcase cfcase value=0,1 string 1 is equal or greater /cfcase From: Michael Grant mgr...@modus.bz Sent: Tuesday, January 11, 2011 2:59 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: compare using cfcase Try setting a var and then using _that_ in your cfcase. cfset isLTE = false / cfif string1 LTE string2 cfset isLTE = true / /cfif cfswitch expression = #isLTE# cfcase value = true h3String 1 is less than or equal to String 2/h3 IThe strings are not equal/I /cfcase cfcase value = false h3String 1 is gt than String 2/h3 /cfcase cfdefaultcase h3This is the default case/h3 /cfdefaultcase /cfswitch /cfif On Tue, Jan 11, 2011 at 2:44 PM, Orlini, Robert rorl...@hwwilson.comwrote: OK, but I have not done that in the code below. I just want to do a less than or equal comparison. Can that be done using CFCASE? Can it be cfcase value=1 or cfcase value=0 RO -Original Message- From: Russ Michaels r...@michaels.me.uk Sent: Tuesday, January 11, 2011 2:38pm To: cf-talk cf-talk@houseoffusion.com Subject: RE: compare using cfcase If you have cfcase value=0,1 And cfcase value=1 Then you are duplicating the condition as you have 1 in both cfcases. The value must only appear once. Russ -Original Message- From: Orlini, Robert [mailto:rorl...@hwwilson.com] Sent: 11 January 2011 19:29 To: cf-talk Subject: RE: compare using cfcase No Russ, Here is the full code below. I would like one of the fields to test for eq to or gt: cfif IsDefined(FORM.string1) cfset comparison = Compare(FORM.string1, FORM.string2) !--- Switch on the variable to give various responses. --- cfswitch expression = #comparison# cfcase value = -1 h3String 1 is less than String 2/h3 IThe strings are not equal/I /cfcase cfcase value = 0 h3String 1 is equal to or gt than String 2/h3 IThe strings are equal!/I /cfcase cfcase value = 1 h3String 1 is greater than String 2/h3 IThe strings are not equal/I /cfcase cfdefaultcase h3This is the default case/h3 /cfdefaultcase /cfswitch /cfif RO -Original Message- From: Russ Michaels r...@michaels.me.uk Sent: Tuesday, January 11, 2011 2:22pm To: cf-talk cf-talk@houseoffusion.com Subject: RE: compare using cfcase Have you got multiple CFCASES with the same value ? -Original Message- From: Orlini, Robert [mailto:rorl...@hwwilson.com] Sent: 11 January 2011 19:19 To: cf-talk Subject: Re: compare using cfcase Thanks Russ, That gives me an error (below) when I tried cfcase value = 0,1 to check whether String 1 is equal to or greater than String 2 Context validation error for tag CFCASE. The CFSWITCH has a duplicate CFCASE for value 1.0. ColdFusion cannot determine the line of the template that caused this error. This is often caused by an error in the exception handling subsystem. RO -Original Message- From: Russ Michaels r...@michaels.me.uk Sent: Tuesday, January 11, 2011 2:13pm To: cf-talk cf-talk@houseoffusion.com Subject: Re: compare using cfcase you mean CFCASE not CFACASE :-) to condition multiple values use a list cfcase value=1,2,3 Russ Michaels www.bluethunderinternet.com : Business hosting services solutions www.cfmldeveloper.com: ColdFusion developer community www.michaels.me.uk : my blog www.cfsearch.com : ColdFusion search engine ** *skype me* : russmichaels ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340636 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Concantenate vs Pound Signs within Quotes
Merely stylistic. Depends on the coder's feelings on readability, which is personal preference as much as anything. From: Shannon Rhodes shan...@rhodesedge.com Sent: Monday, January 03, 2011 9:18 AM To: cf-talk cf-talk@houseoffusion.com Subject: Concantenate vs Pound Signs within Quotes Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? Thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340349 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Auto Incrementing Seed vs CF UUID
Using UIDs makes it much easier to move data between servers or databases or even tables later, too, if you ever need to. For instance, moving records from production down to staging, when there's been testing going on in staging ... may have 100 records with IDs between 105 and 204 in each database, and all the related child records are keyed off of them etc ... makes it very easy to move everything around when using UIDs. In general, I just find the fact that the ID really is unique to *that* record very useful. From: Phillip Vector vec...@mostdeadlygame.com Sent: Monday, December 20, 2010 12:58 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Auto Incrementing Seed vs CF UUID If you are using it as an ID, I go with UUID. Makes it a little harder to put into the URL to look up things they shouldn't. On Mon, Dec 20, 2010 at 9:34 AM, Brian Polackoff bpolack...@gmx.com wrote: So, anyone have any thoughts on which are better... Using CF8 Ent, SQL 2k5 Ent and an enterprise application with millions of rows in the table? Thanks for all your feedback, Brian ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340162 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFWDDX Serialization and Deserialization
Sounds like the OP's issue is XML, not HTML, where the CDATA blocks can't be nested. Not sure there's a solution for that one ... ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339878 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Monster Regex
Try this, where x is your original string: clean = replaceList(reReplace(x, \s*;\d+-\d+, , all), ((,)), (,)) From: Rick Colman rcol...@cox.net Sent: Monday, December 06, 2010 2:04 PM To: cf-talk cf-talk@houseoffusion.com Subject: Monster Regex Been whacking at this one for a while, and it eludes me. ((T ACC) (I ATT) (T ACT) (P CCA) (E GAA) (T ACT) (S TCC) (R CGT) (P CCA) (I ATC) ;0-9 (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ;1210-1218) remove only single leading paren ( remove only trailing single paren ) leave all others remove ;xxx-yyy at the end of each line (unix line) where xxx is a number and yyy is a number so that the result looks like: (T ACC) (I ATT) (T ACT) (P CCA) (E GAA) (T ACT) (S TCC) (R CGT) (P CCA) (I ATC) (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) You will advance the state of genomic science !!! (yuck ... I hate RE ...) Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Monster Regex
Just add a space checker inside the '))', then, something like this: clean = reReplace(replace(reReplace(x, \s*;\d+-\d+, , all), ((, (, all), )\s*), ), all) From: Rick Colman rcol...@cox.net Sent: Monday, December 06, 2010 3:28 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Monster Regex this mostly worked, but did not remove one of the last trailing double )) results like: (T ACT) (N AAC) (D GAT) (T ACT) (A GCT) (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ) On 12/6/2010 11:26 AM, Jason Fisher wrote: clean = replaceList(reReplace(x, \s*;\d+-\d+, , all), ((,)), (,)) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339837 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Monster Regex
Ah, yep, forgot to escape the ) when I changed the outer function to REReplace: clean = reReplace(replace(reReplace(x, \s*;\d+-\d+, , all), ((, (, all), \)\s*\), ), all) From: Rick Colman rcol...@cox.net Sent: Monday, December 06, 2010 3:55 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Monster Regex getting malformed regular expression )\s*) thank you ! On 12/6/2010 12:41 PM, Jason Fisher wrote: Just add a space checker inside the '))', then, something like this: clean = reReplace(replace(reReplace(x, \s*;\d+-\d+, , all), ((, (, all), )\s*), ), all) From: Rick Colmanrcol...@cox.net Sent: Monday, December 06, 2010 3:28 PM To: cf-talkcf-talk@houseoffusion.com Subject: Re: Monster Regex this mostly worked, but did not remove one of the last trailing double )) results like: (T ACT) (N AAC) (D GAT) (T ACT) (A GCT) (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ) On 12/6/2010 11:26 AM, Jason Fisher wrote: clean = replaceList(reReplace(x, \s*;\d+-\d+, , all), ((,)), (,)) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339843 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Regex Question
Agreed. /item1/option2/part3/section4 cfoutput item = #listFirst(cgi.path_info, /)# br / option = #listGetAt(cgi.path_info, 2, /)# br / part = #listGetAt(cgi.path_info, 3, /)# br / section = #listLast(cgi.path_info, /)# /cfoutput From: Carl Von Stetten vonner.li...@vonner.net Sent: Friday, December 03, 2010 12:36 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Regex Question Robert, How about treating CGI.path_info as a list, using / as your delimiter. Then you can use the various list* functions in CF to parse it however you want. Carl On 12/3/2010 9:26 AM, Robert Harrison wrote: Regex is not my strong suit, but someone may know this off the top of their head. If I have a long url like: http://www.mysite.com/item1/option2/part3/section4 I can use cgi.path_info to get the /item1/option2/part3/section4 part of the string. Now is there an easy regex that could let me get the item1 option2 part3 section4 parts of the string easily? I'd assume there could just be one regex statement where you could just change the number(s) to get data from first / to second /; data from second / to third /, etc. Any ideas? Thanks Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be. Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339760 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Regex Question
Yep, that'll work. Of course, listGetAt(cgi.path_info, 1, /) is the same as listFirst(cgi.path_info, /), so just passing the integer is a nice solution: returnVar = listGetAt(arguments.path_info, arguments.index, /); From: Robert Harrison rob...@austin-williams.com Sent: Friday, December 03, 2010 1:03 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Regex Question listGetAt(cgi.path_info, 2, /) Great. That will work for what I want. I want to be able to pass the cgi.path_info to a CFC and pass a digit so the CFC could extract the part of the string I want to do a query... I'm using long URLs to pass variables more and more these days, as opposed to ?bin=1item=2part=3. Thanks Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339762 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF9 Service Randomly Restarting
Do you have any developers with CF Builder who might be restarting services on the server from Builder's Server tab? From: Dave Sueltenfuss dsueltenf...@gmail.com Sent: Monday, November 29, 2010 11:01 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CF9 Service Randomly Restarting Yes, we are recieveing the following error in the Windows Application log 'The ColdFusion 9 Application Server service for the coldfusion server is restarting.' Also, in CF server log, we are seeing the server come back up. -Dave On Mon, Nov 29, 2010 at 10:53 AM, Russ Michaels r...@michaels.me.uk wrote: Are you sure CF has actually restarted or is it just your application restarting ? Russ -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: 29 November 2010 15:50 To: cf-talk Subject: Re: CF9 Service Randomly Restarting Russ, We don't have FusionReactor installed in production, and the service is set to take no action if it fails for any reason -Dave On Mon, Nov 29, 2010 at 10:17 AM, Russ Michaels r...@michaels.me.uk wrote: Dave, CF can't usually restart itself, if it dies then it dies, so you must have something else in the mix. If this is a windows box then check the service properties and see if it is set to restart if unresponsive. Also if you use FusionReactor, the latest version includes options to auto restart CF. -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: 29 November 2010 15:15 To: cf-talk Subject: CF9 Service Randomly Restarting We have a CF 9.0.1 server 32 bit, in production that randomly restarts the CF service. From what we can tell, this has been happening since we upgraded from CF7 back in April. There is no pattern that we can see to the restarts either, and the logs don't show us any errors either. It seems to happen every couple of days. Has anyone else encountered this type of error before, or have a suggestion for where to look? Thanks -Dave ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339574 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Homesite on Windows 7
That would be a pain. I've only ever had that problem over RDS, and that was even before Windows 7. When working on actual local / mapped drives, HomeSite's not giving me that trouble at all. Wonder what the difference is? On 11/15/2010 6:31 PM, Michael Grant wrote: It's when you are creating a new file it kicks back an error. You have to instead create the file first then fill it with content and save. It's just a PITA more than anything else. On Mon, Nov 15, 2010 at 5:35 PM, Jason Fisherja...@wanax.com wrote: Works fine for me, on Windows 7 64-bit Home Premium. I still use HomeSite for most of my editing. What problem is it giving you when you try to save? On 11/15/2010 11:53 AM, Rick Colman wrote: I STILL like homesite because it is file based - NOT projects. I don't do projects ... Anyways, did anyone ever solve the problem where HomeSite will not do a save as in Windows 7? I know there is a work around (file - create here - copy paste - save) but it is still a pain. TNX. Rick. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339277 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Homesite on Windows 7
OK, so that problem I *do* have, but I'm pretty sure I ran into that even before I moved to Windows 7. I have no troubles saving locally, but saving New directly over RDS (or FTP) usually errors. Very annoying, I agree. From: Michael Grant mgr...@modus.bz Sent: Tuesday, November 16, 2010 11:05 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Homesite on Windows 7 This is how I have mine set up and I still can't create a new file (CTRL+N) and then save it to an FTP folder (CTRL+S). I get an error. I don't get the error saving locally though. On Tue, Nov 16, 2010 at 10:58 AM, Robert Harrison rob...@austin-williams.com wrote: Anyways, did anyone ever solve the problem where HomeSite will not do a save as in Windows 7? Yes, I have it working. Two things to note on set-up to get Homesite to run correctly on Windows 7. Go to the setting and change them to: 1) Run in XP compatability mode, and 2) Run as Administrator (this is only necessary if you are saving files to the WWW root directories). It's a protected directory on Windows 7. Hope that helps... Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339284 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Homesite on Windows 7
Works fine for me, on Windows 7 64-bit Home Premium. I still use HomeSite for most of my editing. What problem is it giving you when you try to save? On 11/15/2010 11:53 AM, Rick Colman wrote: I STILL like homesite because it is file based - NOT projects. I don't do projects ... Anyways, did anyone ever solve the problem where HomeSite will not do a save as in Windows 7? I know there is a work around (file - create here - copy paste - save) but it is still a pain. TNX. Rick. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339245 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Where to put your code
Well, I've been using frameworks since Fusebox 2 came out, so I still tend to follow generic CF framework conventions, if you can call them that. * display a message, a menu, or data: dsp.user.cfm, and depending on the framework, all displays probably go in a /views subfolder; there may be a /views folder for each module if it's a complex application; even if it's a long template, it's all in one file, I would find it highly inefficient to have to hunt around across multiple files for all the output that makes up a single page, excluding headers, footers, nav, and other site-wide or module-wide wrappers, which are generally site-level includes or wrapper templates * display a form for data entry or editing: frm.user.cfm, again usually in the proper /views subfolder * for years now I've used event-driven MVC style frameworks, so I use index.cfm as the front side controller: there is generally a site-level one and then another in each module, and the index.cfm files take care of handling the request and marshalling the necessary CFCs and views * CFCs are then used to handle all sorts of things: utility methods I tend to put in a root /components/Util.cfc or something like that and utilities as well as any singleton (yes, I know other languages don't mean the same thing, but I'm talking about the quasi-accepted CF 'singleton' here) CFCs are generally loaded into the application scope, whether by Application.cfc or by individual controllers; these generally go into /com subfolders * CFCs that are more like objects, such as file formatters or true classes (properties + methods, instances are not singletons and may be passed around within the application), I generally put into a /model subfolder, mostly just to distinguish them from the application-scope components This type of arrangement allows me, for example, to have a root-level index.cfm simply include the index.cfm of another module and voila, the whole module is available to the application. It's well organized in terms of having to show other developers around the application, and it makes the separation of concerns nice and clear, in my opinion. YMMV On 11/15/2010 5:13 PM, Paul Alkema wrote: Thanks for your feedback. You make some good points. Does anyone out there have any written coding standards or coding documentation that they would be willing to share? I would be interested in seeing what other development teams use as far as coding standards. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339248 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Blog software
+1 Ben's idea Some of those are reasonable, but CFCONTENT, CFDUMP, CreateObject()?? Go to CrystalTech for a few bucks a quarter or something. From: Ben Forta b...@forta.com Sent: Tuesday, November 09, 2010 11:37 AM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CF Blog software Change hosting companies. Really. --- Ben (Sent from my Flash enabled Android device) On Nov 9, 2010 2:35 PM, DURETTE, STEVEN J (ATTASIAIT) sd1...@att.com wrote: Hi all, So I haven't blogged in about a year because of different issues with my website provider... Any how I'm looking to get my blog going again, but I don't know how I should proceed. I used to use blogcfc, but my provider restricts a bunch of tags (below). Can anyone suggest which blog software might be good to use under these restrictions or if there are any work around tutorials for the latest versions of blogging code? I'd prefer to stick with something CF based. The restrictions I have are as follows: CF Tags not allowed: CFCOLLECTION CFCONTENT CFDUMP CFEXECUTE CFLOG CFOBJECT CFOBJECTCACHE CFREGISTRY CF Functions not allowed: SetProfileString CreateObject(COM) CreateObject(CORBA) CreateObject(JAVA) Thanks for your insights. Steve ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339003 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Blog software
Granted they shouldn't have unrestricted access, but I would argue that you should be able to call them within your own application or else the ability to build complex applications begins to be pretty well hampered, no? From: Dave Watts dwa...@figleaf.com Sent: Tuesday, November 09, 2010 12:49 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CF Blog software Some of those are reasonable, but CFCONTENT, CFDUMP, CreateObject()?? Go to CrystalTech for a few bucks a quarter or something. CFCONTENT and CreateObject both have serious security implications. Russ knows better than me about sandboxing, but those tags and functions shouldn't be allowed unrestricted access in a shared hosting environment. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339005 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF Blog software
Not necessarily. I've got several very complex apps that aren't used by many users, and they're charity apps for non-profits, so why not host for $20 / quarter instead of investing $120 / month or something in a full private server? I've had bad shared hosting experiences before, but Crystaltech has been outstanding and I've been on them for years now without issue. From: Ian Skinner h...@ilsweb.com Sent: Tuesday, November 09, 2010 1:02 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: CF Blog software On 11/9/2010 9:54 AM, Jason Fisher wrote: Granted they shouldn't have unrestricted access, but I would argue that you should be able to call them within your own application or else the ability to build complex applications begins to be pretty well hampered, no? Well, true. But hosting complex applications on shared hosting servers is pretty hampering right at the start, isn't it? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339007 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: What is wrong with this loop update?
What you want is this: cfoutput query=GetExpOrg (diagnostics) row: #currentrow# id: #ExpOrg_ID#br cfquery datasource=#application.datasource# name=UpdateExpOrg update Project_ExpOrg set OrgValue=(select org_value from expressionorganism3 where exporg_id = #ExpOrg_ID#) where project_id = #url.ProjectId# /cfquery /cfoutput Basically, the reference within the query to GetExpOrg.ExpOrg_ID is the equivalent to GetExpOrg.ExpOrg_ID[1] outside of a query output context, so you always got the first ID, I'm guessing. CFLOOP sometimes does this, and you've found one example. From: Rick Colman rcol...@cox.net Sent: Tuesday, November 02, 2010 7:29 PM To: cf-talk cf-talk@houseoffusion.com Subject: What is wrong with this loop update? I am trying to update multiple rows by looping through: cfloop query=GetExpOrg (diagnostics) cfoutputrow: #GetExpOrg.currentrow# id: #GetExpOrg.ExpOrg_ID#/cfoutputbr cfquery datasource=#application.datasource# name=UpdateExpOrg update Project_ExpOrg set OrgValue=(select org_value from expressionorganism3 where exporg_id = #GetExpOrg.ExpOrg_ID#) where project_id = #url.ProjectId# /cfquery /cfloop my diagnostics give me: row: 1 id: 2 row: 2 id: 693 so that is ok. but both rows are updated with the last value (693) instead of being individually updated? What's wrong with this? TNX if you can help. Rick. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338788 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFSTOREDPROC and invalid SQL
Been awhile since I had to use Oracle, but is sysdate a function? Can you try: datetext := to_char(sysdate(), '-mm-dd'); Hi all, So I'm very stuck and tired of saying mean things to my computer... so I hope you are able to see something I'm missing. In short, in order to trouble shoot a larger stored proc call, I've created a very simple one to get working first. It just returns a value. Platforms: Oracle11g / CFMX7 (oracle drivers) / IIS6 The Stored Proc: CREATE OR REPLACE PROCEDURE FUNDING.OMGItsMixedCase (datetext out varchar2 ) is --AUTHID CURRENT_USER IS BEGIN -- executable part starts here datetext := to_char(sysdate, '-mm-dd'); END; / --- The CF Code to call it: !--- I know setting the storedProc var works since I can call a different storedProc on another schema with this method, though it requires nothing passed in. ie: this code approach works elsewhere --- cfset storedProc = FUNDING. OMGItsMixedCase() cfstoredproc procedure=#storedProc# dataSource=databasemonster debug=yes returncode=yes cfprocparam type=out cfsqltype=CF_SQL_VARCHAR dbvarname=datetext / /cfstoredproc The error: (nemisis) [Macromedia][Oracle JDBC Driver][Oracle]ORA-00900: invalid SQL statement The error occurred in D:\somepath\act_updateProgramFund.cfm: line 50 48 : 49 : cfstoredproc procedure=#storedProc# dataSource=databasemonster debug=yes returncode=yes 50 : cfprocparam type=out cfsqltype=CF_SQL_VARCHAR dbvarname=datetext / 51 : /cfstoredproc 52 : SQL { (param 1) = call P3DEVELOPER.date_text()( (param 2) )} DATASOURCE oracle1srvr VENDORERRORCODE 900 SQLSTATE 42000 What's with the param 1 in front of the call? then another param 2?? Thanks for your time and effort, Brent ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338789 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Group BY
If this is SQL Server, than the GROUP BY has to match the un-aggregated SELECT columns, so it would need to be something like: SELECT COUNT(intMemberID) AS NewMembers, DATENAME(mm, dteAdded) + '-' + DATENAME(, dteAdded) AS Month FROM TABLE GROUP BY DATENAME(mm, dteAdded) + '-' + DATENAME(, dteAdded) Not sure if that's what you're asking. From: Monique Boea moniqueb...@gmail.com Sent: Wednesday, November 03, 2010 2:24 PM To: cf-talk cf-talk@houseoffusion.com Subject: Group BY How can I get this query to group by month? select count(intMemberID)as NewMembers, DATENAME(mm, dteAdded) + '-' + DATENAME(, dteAdded) AS Month FROM TABLE GROUP BY Month(dteAdded) When I ask on google everyone says to add: *GROUP BY Year(SomeDate), Month(SomeDate) * but that doesn't work. thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338804 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Curious problem with CFINDEX
You have to create 2 different collections, one for the 1 document and the other for the 5 database rows and then create a 3rd collection that merges the first two, iirc. From: Kevin Parker tras...@internode.on.net Sent: Monday, November 01, 2010 9:11 PM To: cf-talk cf-talk@houseoffusion.com Subject: Curious problem with CFINDEX Be grateful for some insight if anyone can help please. Have a CFINDEX script (FILE) that when run on its own against the test site correctly indexes 1 document. Have a CFINDEX script (CUSTOM) that when run on its own against the test database correctly indexes 5 rows. But when I run both together (on the same cfm template) the result is not 6. If I run the document one first and then the database one there are 5 records in the collection. If I run the database one first and then the document one there is only one record in the collection. The template commences with a PURGE and I've tried using both UPDATE and REFRESH but same result. TIA!!! ++ Kevin Parker m: 0418 815 527 ++ http://au.linkedin.com/in/krparker ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Curious problem with CFINDEX
Ah, you may be right, Ross. It's been a long time since I've done the multi-Verity thing, too, but maybe it's possible to UPDATE with 2 collections? Rings a (rather dim) bell ... From: Russ Michaels r...@michaels.me.uk Sent: Tuesday, November 02, 2010 7:52 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Curious problem with CFINDEX That is what I was going to say also, but I'm not sure if this is the case, it has been a long time since I used cfindex as I have always found it has no speed benefit over database queries, but If you check the cfdocs they seem to imply that you can index multiple types in the same collection with an update. The implication could be wrong though, they may simply be using the same collection name in all the code examples. Russ -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: 02 November 2010 11:42 To: cf-talk Subject: re: Curious problem with CFINDEX You have to create 2 different collections, one for the 1 document and the other for the 5 database rows and then create a 3rd collection that merges the first two, iirc. From: Kevin Parker tras...@internode.on.net Sent: Monday, November 01, 2010 9:11 PM To: cf-talk cf-talk@houseoffusion.com Subject: Curious problem with CFINDEX Be grateful for some insight if anyone can help please. Have a CFINDEX script (FILE) that when run on its own against the test site correctly indexes 1 document. Have a CFINDEX script (CUSTOM) that when run on its own against the test database correctly indexes 5 rows. But when I run both together (on the same cfm template) the result is not 6. If I run the document one first and then the database one there are 5 records in the collection. If I run the database one first and then the document one there is only one record in the collection. The template commences with a PURGE and I've tried using both UPDATE and REFRESH but same result. TIA!!! ++ Kevin Parker m: 0418 815 527 ++ http://au.linkedin.com/in/krparker ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338745 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Subversion Software
TortoiseSVN is pretty solid, although I've had to turn off the icon overlays on mapped network drives, just to improve Explorer performance. From: Paul Alkema paulalkemadesi...@gmail.com Sent: Thursday, October 14, 2010 8:32 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Subversion Software What do you all use to manage your svn on the client side? IE; tortoiseSvn, Dreamweaver, subeclipse? -Original Message- From: enigment [mailto:enigm...@gmail.com] Sent: Thursday, October 14, 2010 7:46 AM To: cf-talk Subject: Re: Subversion Software +1 VisualSVN Dave ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338174 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Subversion Software
No, there is a VisualSVN plugin for Visual Studio, but the same folks also make a VisualSVN Server package that is a one-step install on Windows server and is kept up to date with SVN patches etc. Very good, and free to boot. http://www.visualsvn.com/server/ From: Eric Roberts ow...@threeravensconsulting.com Sent: Thursday, October 14, 2010 3:08 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Subversion Software Isn't Visual SVN for Visual studio only? Subversive and Subclipse are 2 good plugins for Eclipse users. Tortoise is free period ;-) All three work great whether it's corporate of personal. Eric +1 for Visual SVN for corporate applications. +1 for Unfuddle for free ad-hoc projects. Greg On Wed, Oct 13, 2010 at 9:51 PM, Jochem van Dieten joch...@gmail.comwrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338193 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Subversion Software
Yep, same here. From: Rick Root rick.r...@gmail.com Sent: Thursday, October 14, 2010 3:35 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Subversion Software That's why I use VisualSVN SERVER and TortoiseSVN CLIENT =) On Thu, Oct 14, 2010 at 3:01 PM, Eric Roberts ow...@threeravensconsulting.com wrote: That's exactly why i use tortoise...*grin* I like VisualSVN because I'm lazy and windows based =) http://www.visualsvn.com/server/ and it's free and super easy to install/setup. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338196 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Microsoft rumored to be buying Adobe
Oh, man, forgot about Lasso. Back in '98 or '99 I had to convert half a dozen sites from Lasso to ColdFusion. Lasso was fine, I guess, except that it was running on a Mac server :) From: andy matthews li...@commadelimited.com Sent: Thursday, October 07, 2010 9:01 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Microsoft rumored to be buying Adobe Don't forget Lasso. Wasn't that before ASP? -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Thursday, October 07, 2010 4:15 PM To: cf-talk Subject: Re: Microsoft rumored to be buying Adobe http://sanfrancisco.cbslocal.com/2010/10/07/adobe-shares-soar-on-rumor-of-mi crosoft-bid/ What's that mean for Coldfusion!? If this actually happened, I suspect that the product would be divested or discontinued. But I really doubt that this will happen. The only thing that Adobe has that MS doesn't is the design tools market. There isn't much history of MS buying established competitors to their own products. And speaking of established competitors, during the existence of CF, Microsoft has gone through at least four different competing products: they had a couple of things before ASP (IDC and HTX I think), then there was ASP, then ASP.NET. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337975 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm