RE: Can this be optimized?
Have SQL server do it directly with a scheduled DTS and it will be even quicker. -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: 05 October 2003 05:21 To: CF-Talk Subject: RE: Can this be optimized? stace. i just had to do the same, i have some reports that clients run every 30 days, its about 1000+ lines in a csv, i *USED* to have it write cffile appends' for each iteration.HAH, silly me. i use cfsetting enablecfoutput and cfsavcontent to dump all the lines in 1 var, then write at once.NOW, from 21 min. down to 25-31 seconds, for about 1000 lines, to csv, then emailed, the whole thing, out of a 1900 line database, the loop, inside cfsavecontent and then dump once, wow what a difference! tony -Original Message- From: Stacy Young [mailto:[EMAIL PROTECTED] Sent: Saturday, October 04, 2003 12:22 PM To: CF-Talk Subject: RE: Can this be optimized? I owe u a cold one for that...50% less memory usage. :-) In the case where I'm emailing a CSV, I don't imagine there's much I can do...(hope I'm wrong) cfsetting enablecfoutputonly=yes showdebugoutput=no cfsavecontent variable=request.filecontent cfoutput#title##chr(10)##chr(10)##getData.columnlist##chr(10)#/cfoutp ut cfloop query=results cfset x = 0 cfloop list=#results.ColumnList# index=column cfset x = x + 1 cfoutput#Replace( Evaluate( column ) , '' , ' ' , 'ALL' )#cfif x NEQ ListLen( results.ColumnList ),/cfif/cfoutput /cfloop cfoutput#chr(10)#/cfoutput /cfloop /cfsavecontent /cfsetting cffile action="" file=#filepath# output=#request.filecontent# addnewline=Yes I originally had it looping over CFFILE but it was painfully slow...I guess with the large number of file I/O's...this one stores in request and makes single cffile dump at the end. Stace _ From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: October 4, 2003 12:05 PM To: CF-Talk Subject: Re: Can this be optimized? Stacy Young wrote: It's not often I nitpick in the sake of 'supreme optimization' but in this case it's necessary. I'm using the following code snippet to generate CSV file for different queries. The process is usually quite memory intensive, wondering if anyone with fresh pair of eyes can point out any items that can be done differently. Speed is not so much an issue, it's quite fast...but for larger recordsets it eats mega RAM. Have you tried using cfflush? Jochem _ _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Getting Field names and datatypes from MS Access database
Hey all, this topic was touched on a few threads back, but it was never fully resolved. How would I get the fieldnames and their corresponding data types for a specific table in an access database using coldfusion? -Gel [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
postgresql.cfm not found (MX6.1)
Seems that I have been bitten by the postgresql.cfm bug in CFMX 6.1 anyone have a fix for this yet?I can create datasources, but cannot edit, verify, or delete them once created due to this error: - Error Occurred While Processing Request File not found: /CFIDE/administrator/datasources/postgresql.cfm Please try the following: Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging Logging Debugging Settings, and select the Robust Exception Information option. Check the ColdFusion documentation to verify that you are using the correct syntax. Search the Knowledge Base to find a solution to your problem. - How have others worked around this issue? Thanks in advance! --Josh - This mail sent through IMP: http://horde.org/imp/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Getting Field names and datatypes from MS Access database
All info about the table sin a database are stored in the sys tables. open your DB and goto Tools -- Options -- View and check system table sand hidden tables MSysObjects is the table that contains all the info you need. Russ Michaels Macromedia/Allaire Certified ColdFusion Developer CFDeveloper The free resource and community for ColdFusion developer. http://www.cfdeveloper.co.uk http://www.cfdeveloper.co.uk/ Join the CFDeveloper discussion lists. To subscribe send an e-mail to [EMAIL PROTECTED] -Original Message- From: Angel Stewart [mailto:[EMAIL PROTECTED] Sent: 05 October 2003 15:13 To: CF-Talk Subject: Getting Field names and datatypes from MS Access database Hey all, this topic was touched on a few threads back, but it was never fully resolved. How would I get the fieldnames and their corresponding data types for a specific table in an access database using coldfusion? -Gel _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFMX/Linux: using Java to read image properties
I am under the impression that Java has some built-in ways of reading image data, but I am new to CFMX/Linux and Java and am not sure how to leverage this functionality in my code. I basically need to be able to determine the width, height, and file size of an image. I had a custom tag that handled this, but it stopped working when I upgraded to MX6.1. I believe the custom tag used CFFILE and CFDIRECTORY, along with some code to parse the image headers, to determine width, height, and file size; however, I would think that Java can do these same tasks much more efficiently. I checked the MM Exchange and found a CFC (Imaging CFC, V1.0; http://www.benorama.com/coldfusion/components/imaging.htm) that utilizes ImageJ to do all kinds of manipulation, but I found nothing for MX Linux that simply reads the basic file info I need. I did try to install the CFC, but it apparently needs some work to run on Linux. I would settle for getting width and height from Java, and the file size from CFDIRECTORY. If anyone can provide a code sample or point me to some good references on the subject I would greatly appreciate it! ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFMX/Linux: using Java to read image properties
Off the top of my head i.e. untested... cfscript image = CreateObject(java, javax.swing.ImageIcon); image.init(path to image file here); width = image.getIconWidth(); height = image.getIconHeight(); //get the size imageFile = CreateObject(java, java.io.File); imageFile.init(path to image file here); size = imageFile.length(); /cfscript The above code makes use of Java Swing, so you will need to have X11 configured on your Linux machine to make use of it. Matt Liotta President CEO Montara Software, Inc. http://www.MontaraSoftware.com (888) 408-0900 x901 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFMX/Linux: using Java to read image properties
Here is an article by Matt, i think there might be few other ways of doing the same thing with Java. http://www.macromedia.com/devnet/mx/coldfusion/articles/jai_images.html Joe Eugene -Original Message- From: Ubqtous [mailto:[EMAIL PROTECTED] Sent: Sunday, October 05, 2003 1:04 PM To: CF-Talk Subject: CFMX/Linux: using Java to read image properties I am under the impression that Java has some built-in ways of reading image data, but I am new to CFMX/Linux and Java and am not sure how to leverage this functionality in my code. I basically need to be able to determine the width, height, and file size of an image. I had a custom tag that handled this, but it stopped working when I upgraded to MX6.1. I believe the custom tag used CFFILE and CFDIRECTORY, along with some code to parse the image headers, to determine width, height, and file size; however, I would think that Java can do these same tasks much more efficiently. I checked the MM Exchange and found a CFC (Imaging CFC, V1.0; http://www.benorama.com/coldfusion/components/imaging.htm) that utilizes ImageJ to do all kinds of manipulation, but I found nothing for MX Linux that simply reads the basic file info I need. I did try to install the CFC, but it apparently needs some work to run on Linux. I would settle for getting width and height from Java, and the file size from CFDIRECTORY. If anyone can provide a code sample or point me to some good references on the subject I would greatly appreciate it! ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Major debug issues with MX 6.1
It's nothing a quick little mail rule couldn't solve. A mail rule set WHERE? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFMX/Linux: using Java to read image properties
http://www.cfmentor.com/code/index.cfm?action=""> Massimo Foti Certified Dreamweaver MX Developer Certified Advanced ColdFusion MX Developer http://www.massimocorner.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: RE: Session Variables Or Client Variables (Pros Cons - Poll)
Barney, Just curious.. how this might work. Create HashMaps/Structs in the application scope for every unique hit to the server and assign a unique cookie ID number for unique requests and store session values in application scope. if(Not structKeyExists(application.appUsers, '#uniqueID#')){ uniqueID = uniqueGeneratedID; application.appUsers[#uniqueID#] = structNew(); } //then application.appUsers[#uniqueID#]['data'] = createObject(Component,UserSessionData); No Wddx Serializing/Deserializing involved with the above method and session not used. Thoughts on the above? Thanks, Joe Eugene -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 6:51 PM To: CF-Talk Subject: RE: RE: Session Variables Or Client Variables (Pros Cons - Poll) I should give credit to John someone (either QvT or Farrar, I can't remember which) for convincing me to write a custom system, rather than use native CF client variables.I was waffling at the extra work and potential execution costs, but he convinced me I'd be much happier down the road, and he was dead on.I guess it's kind of like the don't use CFUPDATE epiphany way back when. barneyb -Original Message- From: Mike Brunt [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 3:15 PM To: CF-Talk Subject: RE: RE: Session Variables Or Client Variables (Pros Cons - Poll) Very nice Barney! Kind Regards - Mike Brunt Original Message --- Yeah, custom DB, with a read in Application.cfm and a write in OnRequestEnd.cfm.I use the 'clientvars' scope, since even if you turn off client variables, you still can't use the 'client' name.After th read, any complex data is unWDDXed for me automatically, and then reWDDXed before the write, so I don't have to think about anything if I want to store complex data.That will soon include the ability to serialize and deserialize CFCs as well. I also have a field in my table for userID (separate from clientID), so I can acutally do a join between my clientrepository table and other tables in the DB and pull up info like which user accounts are currently logged on, without having to actively record that information somewhere else.It's quite handy. I'm sure it's a little slower than the native CF client vars, but well worth it in my opinion.The queries take all of 2 or 3 milliseconds per request, and the WDDXing take another couple.I'm don't know how you'd test, but not much more overhead than what CF will do natively, and insignificant next to the typical page request time for the app (80-250 ms).The amount of time and money it saves with development and administration is very noticable, however.With one app, we just added a second CF server, and all we had to do was set up the load balancing, point the DSNs at the shared DB server and everything just worked.Plus, since it was running on CF Pro, we saved $10,000 on not going to the J2EE version for session clustering.We'll upgrade eventually, but we didn't have to right then, which was nice. We also can get around the CFC problem with session clustering, which is a huge advantage to me. barneyb -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 2:03 PM To: CF-Talk Subject: Re: Session Variables Or Client Variables (Pros Cons - Poll) What custom system are we talking about? Custom DB with data write and read with SQL for every request? Are you by-passing CF Serialization/De-Serialization? Matt.. mentioned something about using a local file system to do this. Curious.. is this any effective than CF Client var? Joe - Original Message - From: Barney Boisvert To: CF-Talk Sent: Friday, October 03, 2003 4:43 PM Subject: RE: Session Variables Or Client Variables (Pros Cons - Poll) I use a custom system, modelled on client variables.Everything is stored in a DB, but serialization and deserialization is automatic (excepting CFCs, though that'll change).The biggest advantage is simple clustering, becuase you needn't worry about session replication, and you can also access that database for non-client variable stuff.THe data format is more flexible, so I can use application logic to control the tables as well as just the client mechanism. Works very well. -Original Message- From: Joe Eugene [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2003 1:30 PM To: CF-Talk Subject: Session Variables Or Client Variables (Pros Cons - Poll) Personally i am not a big fan of Client Variables due to DB Serialize/De-Serialize Overhead and not being able to store complex variables etc... Just Curious.. What would be the CF Developer Consensus to using Client Variables Or using Session Variables? Thanks, Joe Eugene [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Major debug issues with MX 6.1
Depends what mail client you're using.In Outlook Express you simply click Message and then select Create Rule From Message. In web based mail clients such as an IMail server... there's rules that can be made there as well.So, long story short... there's no need to put up with the same virus being mailed to you a zillion times. -Novak - Original Message - From: Claude Schneegans [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, October 05, 2003 10:42 AM Subject: Re: Major debug issues with MX 6.1 It's nothing a quick little mail rule couldn't solve. A mail rule set WHERE? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: postgresql.cfm not found (MX6.1)
jtnews, On Monday, October 6, 2003, 2:43:17 AM, you wrote: jec Seems that I have been bitten by the postgresql.cfm bug in CFMX 6.1 jec anyone have a fix for this yet?I can create datasources, but cannot edit, jec verify, or delete them once created due to this error: jec - jec Error Occurred While Processing Request jec File not found: /CFIDE/administrator/datasources/postgresql.cfm I ran into the same problem, but I can't remember what the exact fix was; however, I am pretty sure it was caused by the way the JDBC URL had been entered. Some links that helped me: http://jdbc.postgresql.org/doc.html#load http://www1.oli.tudelft.nl/jochemd/index.cfm?PageID=17 http://www.macromedia.com/support/coldfusion/ts/documents/tn18338.htm I never figured out how to remove the bad DSNs once I corrected the error. I am sure there is a config file somewhere that can be manually edited. ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
OT -- JavaScript
I'm having a little trouble with this script ... here's the bit of code in question ... packageAtribs = new Object(); packageAtribs.holidaySelection = document.rentalForm.Holidays.value; if I do -- alert(document.rentalForm.Holidays.value); I get the expected value. But alert(packageAtribs.holidaySelection); gives me a blank. While, packageAtribs.holidaySelection = 1; Gives me 1 on the alert. If I parseInt() on document.rentalForm.Holidays.value, I get NaN on the alert. To me, it should be pretty straight forward ... packageAtribs.holidaySelection = document.rentalForm.Holidays.value; should produce the expected results. I can't see, right now, any other way to get the value set that I want. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Dynamic queryname in CFSCRIPT
I've got a function that needs to check a different query depending on how it's called.But I keep getting this error: You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. The function is evaluating the string properly, but the line myarray[x].RecordCount; chokes. Here's a simplified version of the script: cfscript function timeRes(x) { myarray = arrayNew(1); myarray[1] = rsEquipAvail1; myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3); rCount = myarray[x].RecordCount; return rCount; } /cfscript [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Dynamic queryname in CFSCRIPT
What happens if you write: myQuery =myarray[x]; rCount = myQuery.recordCount instead of rCount = myarray[x].RecordCount; ? -Original Message- From: Rory Lysaght [mailto:[EMAIL PROTECTED] Sent: Monday, 6 October 2003 10:45 a.m. To: CF-Talk Subject: Dynamic queryname in CFSCRIPT I've got a function that needs to check a different query depending on how it's called.But I keep getting this error: You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. The function is evaluating the string properly, but the line myarray[x].RecordCount; chokes. Here's a simplified version of the script: cfscript function timeRes(x) { myarray = arrayNew(1); myarray[1] = rsEquipAvail1; myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3); rCount = myarray[x].RecordCount; return rCount; } /cfscript _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Major debug issues with MX 6.1
Claude Schneegans wrote: Firstly I HATE this HTML cf-talk system, Outlook users I' receiving more than 200 copies of the same ^%$ stupid 150k virus everyday. Personnally I HATE Outlook users! ;-) What client do you use? Dan [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:Dynamic queryname in CFSCRIPT
What happens if you write: myQuery =myarray[x]; rCount = myQuery.recordCount instead of rCount = myarray[x].RecordCount; Good suggestion, but it generates the same error message on the rCount = myQuery.recordCount; line. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: OT -- JavaScript
try packageAtribs.holidaySelection = document.forms['rentalForm'].Holidays.value; Don't ask me what the difference is...i don't know :) -- mailto:[EMAIL PROTECTED] Sunday, October 5, 2003, 6:21:44 PM, you wrote: HO I'm having a little trouble with this script ... here's the bit of code in question ... HO packageAtribs = new Object(); HO packageAtribs.holidaySelection = document.rentalForm.Holidays.value; HO if I do -- HO alert(document.rentalForm.Holidays.value); HO I get the expected value. HO But HO alert(packageAtribs.holidaySelection); HO gives me a blank. HO While, HO packageAtribs.holidaySelection = 1; HO Gives me 1 on the alert. HO If I parseInt() on document.rentalForm.Holidays.value, I get NaN on the alert. HO To me, it should be pretty straight forward ... packageAtribs.holidaySelection = document.rentalForm.Holidays.value; should produce the expected results. I can't see, right now, any other way to HO get the value set that I want. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Dynamic queryname in CFSCRIPT
Oh here's the problem: You are placing strings in your array -- rsEquipAvail1 is a string. Try it without the quotes. -Original Message- From: Rory Lysaght [mailto:[EMAIL PROTECTED] Sent: Monday, 6 October 2003 10:45 a.m. To: CF-Talk Subject: Dynamic queryname in CFSCRIPT I've got a function that needs to check a different query depending on how it's called.But I keep getting this error: You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. The function is evaluating the string properly, but the line myarray[x].RecordCount; chokes. Here's a simplified version of the script: cfscript function timeRes(x) { myarray = arrayNew(1); myarray[1] = rsEquipAvail1; myarray[2] = rsEquipAvail2; //, rsEquipAvail2, rsEquipAvail3); rCount = myarray[x].RecordCount; return rCount; } /cfscript _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re:OT -- JavaScript
Thanks, but still shoot blanks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Major debug issues with MX 6.1
Create Rule From Message. Ok I have that (in Netscape, not Outlook of course ;-) The only problem: the rule is applied when the message is received. What I want is NOT receive them; and except by destroying all Outlooks on the planet, I don't see how it could be stopped. :-( [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Hosting Control panel ?
My hosting provider is having some difficulties getting Etrinix to answer support queries for their new Command Matrix v 1.9.1 and I think he should dump it and go for another product. Are there any people using a shared hosting control panel that works with ColdFusion?What direction should I point him to? What he'll needis support for CFMX6.1,MSSQL, MySQL, ASP, ASP.NET, resellers, individual sites, quotas etc.The Etrinix isn't working too well and I'd far rather help him solve that problem than uplift my business again and move it all somewhere else. The key problem we've had with the Ensim we were using before this Etrinix piece of junk was that it didn't allow resellers or users to set up ColdFusion datasources, which made it tiresome getting DSNs going.And also Ensim's email server is unreliable. Any other control panels we should look at? Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Major debug issues with MX 6.1
What client do you use? Netscape, but the problem is not that I connot detect and destroyed them. The problem is that they fill up my mailbox. What I need is NOT receiving them! I receive messages from ISPs warning me that they have striped a virus off a message that was sent to me from their server. This is a good practice. If all ISPs could do the same there wouldn't be so many imbeciles to click on every .exe they find in their mail. And if my own ISP could also scan received mailed, there would not be any problem. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Dynamic queryname in CFSCRIPT
I suppose rsEquipAvail1 and rsEquipAvail2 are queries? Then try this rCount = evaluate(myarray[x] .RecordCount); [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: OT -- JavaScript
Don't ask me what the difference is...i don't know :) I won't ask, because it makes NO difference ;-) Both are equivalent. The problem might be with the place the _javascript_ is defined. Try to put it inside the BODY tag. If the line of code packageAtribs.holidaySelection = document.rentalForm.Holidays.value; is executed before the form is built in the document, the variable wont get the correct value. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Hosting Control panel ?
Webminhttp://www.webmin.com/and it is free == Stop spam on your domain, use our gateway! For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1 and all databases. ISP rated: http://www.forta.com/cf/isp/isp.cfm?isp_id=772 Suggested corporate Anti-virus policy: http://www.dshield.org/antivirus.pdf == If you are not satisfied with my service, my job isn't done! - Original Message - From: Mike Kear [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, October 05, 2003 8:05 PM Subject: Hosting Control panel ? | My hosting provider is having some difficulties getting Etrinix to answer | support queries for their new Command Matrix v 1.9.1 and I think he should | dump it and go for another product. | | | | Are there any people using a shared hosting control panel that works with | ColdFusion?What direction should I point him to? | | | | What he'll needis support for CFMX6.1,MSSQL, MySQL, ASP, ASP.NET, | resellers, individual sites, quotas etc.The Etrinix isn't working too | well and I'd far rather help him solve that problem than uplift my business | again and move it all somewhere else. | | | | The key problem we've had with the Ensim we were using before this Etrinix | piece of junk was that it didn't allow resellers or users to set up | ColdFusion datasources, which made it tiresome getting DSNs going.And also | Ensim's email server is unreliable. | | | | Any other control panels we should look at? | | | | | | | | Cheers, | | Michael Kear | | Windsor, NSW, Australia | | AFP Webworks. | | | | | | | | | | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Hosting Control panel ?
OH .. thanks Doug, but I should also have said that our environment is Windows2k or Win2003. Cheers, Michael Kear Windsor, NSW, Australia AFP Webworks. -Original Message- From: Doug White [mailto:[EMAIL PROTECTED] Subject: Re: Hosting Control panel ? Webminhttp://www.webmin.com/and it is free - Original Message - From: Mike Kear [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, October 05, 2003 8:05 PM Subject: Hosting Control panel ? | My hosting provider is having some difficulties getting Etrinix to answer | support queries for their new Command Matrix v 1.9.1 and I think he should | dump it and go for another product. | | | | Are there any people using a shared hosting control panel that works with | ColdFusion?What direction should I point him to? | | | | What he'll needis support for CFMX6.1,MSSQL, MySQL, ASP, ASP.NET, | resellers, individual sites, quotas etc.The Etrinix isn't working too | well and I'd far rather help him solve that problem than uplift my business | again and move it all somewhere else. | | | | The key problem we've had with the Ensim we were using before this Etrinix | piece of junk was that it didn't allow resellers or users to set up | ColdFusion datasources, which made it tiresome getting DSNs going.And also | Ensim's email server is unreliable. | | | | Any other control panels we should look at? | | | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: OT -- JavaScript
This code works for me in IE6/Moz/Opera. The addition of the forms array call made it work for me. I couldn't get just document.rentalForm.Holidays.value to work either. script type=text/_javascript_ function init() { packageAtribs = new Object(); packageAtribs.holidaySelection = document.forms['rentalForm'].Holidays.value; alert(packageAtribs.holidaySelection); } window.> /script form id=rentalForm name=rentalForm input type=text name=Holidays value=foo /form -- mailto:[EMAIL PROTECTED] Sunday, October 5, 2003, 7:47:51 PM, you wrote: HO Thanks, but still shoot blanks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: OT -- JavaScript
Hmmm going back and running it without the forms reference and it now works. Either I had a typo originally or I'm going crazy. Either way...the problem is either somewhere else in your code, or there is something that I am overlooking in your post. -- mailto:[EMAIL PROTECTED] Sunday, October 5, 2003, 10:54:12 PM, you wrote: jon This code works for me in IE6/Moz/Opera. The addition of the forms jon array call made it work for me. I couldn't get just jon document.rentalForm.Holidays.value to work either. jon script type=text/_javascript_ jon function init() { jonpackageAtribs = new Object(); jonpackageAtribs.holidaySelection = document.forms['rentalForm'].Holidays.value; jonalert(packageAtribs.holidaySelection); jon } jon window.> jon /script jon form id=rentalForm name=rentalForm joninput type=text name=Holidays value=foo jon /form [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Hosting Control panel ?
In that case, I only have used Remote Desktopwhich can be configured with IPSEC security and login security, on a per-user basis == Stop spam on your domain, use our gateway! For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1 and all databases. ISP rated: http://www.forta.com/cf/isp/isp.cfm?isp_id=772 Suggested corporate Anti-virus policy: http://www.dshield.org/antivirus.pdf == If you are not satisfied with my service, my job isn't done! - Original Message - From: Mike Kear [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Sunday, October 05, 2003 9:31 PM Subject: RE: Hosting Control panel ? | OH .. thanks Doug, but I should also have said that our environment is | Windows2k or Win2003. | | | | | | Cheers, | | Michael Kear | | Windsor, NSW, Australia | | AFP Webworks. | | | | | | | | | | -Original Message- | From: Doug White [mailto:[EMAIL PROTECTED] |Subject: Re: Hosting Control panel ? | | | | Webminhttp://www.webmin.com/and it is free | | | | | | - Original Message - | From: Mike Kear [EMAIL PROTECTED] | To: CF-Talk [EMAIL PROTECTED] | Sent: Sunday, October 05, 2003 8:05 PM | Subject: Hosting Control panel ? | | | My hosting provider is having some difficulties getting Etrinix to answer | | support queries for their new Command Matrix v 1.9.1 and I think he should | | dump it and go for another product. | | | | | | | | Are there any people using a shared hosting control panel that works with | | ColdFusion?What direction should I point him to? | | | | | | | | What he'll needis support for CFMX6.1,MSSQL, MySQL, ASP, ASP.NET, | | resellers, individual sites, quotas etc.The Etrinix isn't working too | | well and I'd far rather help him solve that problem than uplift my | business | | again and move it all somewhere else. | | | | | | | | The key problem we've had with the Ensim we were using before this Etrinix | | piece of junk was that it didn't allow resellers or users to set up | | ColdFusion datasources, which made it tiresome getting DSNs going.And | also | | Ensim's email server is unreliable. | | | | | | | | Any other control panels we should look at? | | | | | | | | | | [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re[2]: CFMX/Linux: using Java to read image properties
Tiziana, On Sunday, October 5, 2003, 2:22:08 PM, you wrote: MTeF http://www.cfmentor.com/code/index.cfm?action=""> This looks promising, but I get the following error: /opt/coldfusionmx/runtime/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory nullThe error occurred on line 224. [All subsequent calls return a less helpful null nullThe error occurred on line 224] calling template code: cfscript objImageInfo=createObject(component,tmt_java_img); stImageInfo=objImageInfo.getDimensions(MJK.gif); writeoutput(stImageInfo.width x stImageInfo.height); /cfscript line 224 in tmt_java_img.cfc: cfset jBufferedImg=createObject(java,javax.imageio.ImageIO).read(jFile) I am running CFMX 6.1 (6,1,0,63958), with Java v1.4.2, so it seems as though my server meets the CFC's requirements. I know the image exists (in the same directory as the calling template and the CFC uses relative paths by default). Missing server package? Permissions issue? ~ Ubqtous ~ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Re[2]: CFMX/Linux: using Java to read image properties
You don't have X11 configured properly on your server. -Matt On Sunday, October 5, 2003, at 11:53 PM, Ubqtous wrote: Tiziana, On Sunday, October 5, 2003, 2:22:08 PM, you wrote: MTeF http://www.cfmentor.com/code/index.cfm?action=""> This looks promising, but I get the following error: /opt/coldfusionmx/runtime/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory null The error occurred on line 224. [All subsequent calls return a less helpful null null The error occurred on line 224] calling template code: cfscript objImageInfo=createObject(component,tmt_java_img); stImageInfo=objImageInfo.getDimensions(MJK.gif); writeoutput(stImageInfo.width x stImageInfo.height); /cfscript line 224 in tmt_java_img.cfc: cfset jBufferedImg=createObject(java,javax.imageio.ImageIO).read(jFile) I am running CFMX 6.1 (6,1,0,63958), with Java v1.4.2, so it seems as though my server meets the CFC's requirements. I know the image exists (in the same directory as the calling template and the CFC uses relative paths by default). Missing server package? Permissions issue? ~ Ubqtous ~ image.tiff [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Sorting CFCs: Structures over Arrays in collections
Just finished a marathon coding session and thought I'd share/get some opinions on some of the things I've found concerning CFCs and sorting. I'm new CFCs and OO, so much of this may seem amateurish, but I expect that many CFers are in the same position.I hope it may help somebody or prompt discussion that heads off bad habits before they set in. Specifically I've created many base domain components for this application (a festival scheduling system) such as Venue, Event, Artist, etc.Each component has a corresponding Collection component (ArtistCollection for example).These collection components have the methods you'd expect: add(), drop(), getByID(), isIDInCollection(), etc. My goal is to load these collections will all the assets for a festival and then use that data instead of hitting the database constantly.This is all pretty standard fare as far as I know. Right now I'm concerned only with the collection components. I began, as everything I've read suggests, by creating an internal array to hold the components.I now think that was a mistake and have switched to structures to maintain the internal data.However structures can't maintain an explicit order, something Arrays do by design. For this reason I use Structures internal to the component, but return Arrays for most methods. In my case the problem with using Arrays internally arose when I began worry about sorted results.For example in my VenueCollection I want to be able to return all artist components sorted by ID (the default), Name, MapID (a numeric indicator which links the Venue to a graphical map of the Festival) and so forth. Sorting arrays of components is a pain.ArraySort() won't work on arrays of complex objects so you're left with doing some sort of bubble sort, going back out to the database, or using some sort of proxy (creating, for example, a query using Query of Queries).All of these are inelegant solutions in my opinion. Also adding and dropping items from an array requires looping to discover if the element exists before adding or deleting. Structures on the other hand - they've got a lot going for them. First off the Struct functions are much cleaner and simpler for most tasks - at least if you have some unique ID you can use as the structkey (the database key makes perfect sense). For example to remove an element from an array you need to loop over the array until you find it then do an ArrayDeleteAt().With a Struct the following line does it (this assumes that the Venue component to be dropped has been passed to the Collection): cfreturn StructDelete(this.Venues, arguments.Venue.getVenueID(), true) This line returns true if the Venue existed in the collection, false if it did not. To add a component you could use StructAppend (which allows you to set an overwrite behavior if you like) but I like to do this: cfif StructKeyExists(this.Venues, arguments.Venue.getVenueID()) cfreturn false cfelse cfset ArrayAppend(this.Venues, arguments.Venue) cfreturn true /cfif I only want to add the component if it's not already in the component. Again - with an Array you'd be looping to see if the component already exists.You could augment this with StructUpdate() if you would like to overwrite existing values. The big win however comes when you want to sort the collection.CFML lacks any native component collections or component functions. However internally CF does see components as Structs (of a sort) and many Struct functions can be bent to work on components. Specifically in this case the StructSort() function will, in fact, sort a structure full of components the same way it will sort a structure of structures.This makes sorting a breeze. For example, here's the meat of my VenueCollection's getSortedByName() method cfset var curSort = StructSort(this.Venues, text, ASC, Name) cfloop from=1 to=#ArrayLen(curSort)# index=cnt cfset curSort[Cnt] = cur.Venues[curSort[Cnt]] /cfloop cfreturn curSort The first line does all the work.this.Venues is a structure containing all the Venues in the collection.Name is a simple property of Venue.One note: any property you want to sort on MUST be present in the this scope - the component's variables (local) scope is not exposed to the StructSort() function (an exception will be thrown). Anyway - the first line does the sort, then returns a sorted array containing (at this point) only the structure keys.The 3rd-5th lines loops over that array and populates it with references to the components instead.The last line returns the newly created Array of sorted component references to the caller. In my case I only wanted to sort on a few specific properties, however it would be simple to convert the above to accept an argument of any property thus creating a generic sort method. So, in the end, external calls to the collection generally return arrays - ready to loop over, present or whatever; but internally everything is stored as a structure - which offers a lot more flexibility and
RE: Sorting CFCs: Structures over Arrays in collections
You could use the java Hashmap if you really want to go nuts, but structures are just as good for most things. -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: October 5, 2003 10:17 PM To: CF-Talk Subject: Sorting CFCs: Structures over Arrays in collections Just finished a marathon coding session and thought I'd share/get some opinions on some of the things I've found concerning CFCs and sorting. I'm new CFCs and OO, so much of this may seem amateurish, but I expect that many CFers are in the same position.I hope it may help somebody or prompt discussion that heads off bad habits before they set in. Specifically I've created many base domain components for this application (a festival scheduling system) such as Venue, Event, Artist, etc.Each component has a corresponding Collection component (ArtistCollection for example).These collection components have the methods you'd expect: add(), drop(), getByID(), isIDInCollection(), etc. My goal is to load these collections will all the assets for a festival and then use that data instead of hitting the database constantly.This is all pretty standard fare as far as I know. Right now I'm concerned only with the collection components. I began, as everything I've read suggests, by creating an internal array to hold the components.I now think that was a mistake and have switched to structures to maintain the internal data.However structures can't maintain an explicit order, something Arrays do by design. For this reason I use Structures internal to the component, but return Arrays for most methods. In my case the problem with using Arrays internally arose when I began worry about sorted results.For example in my VenueCollection I want to be able to return all artist components sorted by ID (the default), Name, MapID (a numeric indicator which links the Venue to a graphical map of the Festival) and so forth. Sorting arrays of components is a pain.ArraySort() won't work on arrays of complex objects so you're left with doing some sort of bubble sort, going back out to the database, or using some sort of proxy (creating, for example, a query using Query of Queries).All of these are inelegant solutions in my opinion. Also adding and dropping items from an array requires looping to discover if the element exists before adding or deleting. Structures on the other hand - they've got a lot going for them. First off the Struct functions are much cleaner and simpler for most tasks - at least if you have some unique ID you can use as the structkey (the database key makes perfect sense). For example to remove an element from an array you need to loop over the array until you find it then do an ArrayDeleteAt().With a Struct the following line does it (this assumes that the Venue component to be dropped has been passed to the Collection): cfreturn StructDelete(this.Venues, arguments.Venue.getVenueID(), true) This line returns true if the Venue existed in the collection, false if it did not. To add a component you could use StructAppend (which allows you to set an overwrite behavior if you like) but I like to do this: cfif StructKeyExists(this.Venues, arguments.Venue.getVenueID()) cfreturn false cfelse cfset ArrayAppend(this.Venues, arguments.Venue) cfreturn true /cfif I only want to add the component if it's not already in the component. Again - with an Array you'd be looping to see if the component already exists.You could augment this with StructUpdate() if you would like to overwrite existing values. The big win however comes when you want to sort the collection.CFML lacks any native component collections or component functions. However internally CF does see components as Structs (of a sort) and many Struct functions can be bent to work on components. Specifically in this case the StructSort() function will, in fact, sort a structure full of components the same way it will sort a structure of structures.This makes sorting a breeze. For example, here's the meat of my VenueCollection's getSortedByName() method cfset var curSort = StructSort(this.Venues, text, ASC, Name) cfloop from=1 to=#ArrayLen(curSort)# index=cnt cfset curSort[Cnt] = cur.Venues[curSort[Cnt]] /cfloop cfreturn curSort The first line does all the work.this.Venues is a structure containing all the Venues in the collection.Name is a simple property of Venue.One note: any property you want to sort on MUST be present in the this scope - the component's variables (local) scope is not exposed to the StructSort() function (an exception will be thrown). Anyway - the first line does the sort, then returns a sorted array containing (at this point) only the structure keys.The 3rd-5th lines loops over that array and populates it with references to the components instead.The last line returns the newly created Array of sorted component references to the caller. In my case I only wanted to sort on a few specific properties, however it would be simple to convert the above to
Re: Sorting CFCs: Structures over Arrays in collections
Just finished a marathon coding session and thought I'd share/get some opinions on some of the things I've found concerning CFCs and sorting. I'm new CFCs and OO, so much of this may seem amateurish, but I expect that many CFers are in the same position. I hope it may help somebody or prompt discussion that heads off bad habits before they set in. You may find better responses if you send each of your questions separately as this email is rather long and touches on several subjects. I began, as everything I've read suggests, by creating an internal array to hold the components. I now think that was a mistake and have switched to structures to maintain the internal data. However structures can't maintain an explicit order, something Arrays do by design. It can often be hard to choose between arrays and structures since sometimes you want properties of each one. Thus, it is often necessary to create a data structure that has the properties you want instead working around a problem in an available data structure. Sorting arrays of components is a pain. ArraySort() won't work on arrays of complex objects so you're left with doing some sort of bubble sort, going back out to the database, or using some sort of proxy (creating, for example, a query using Query of Queries). All of these are inelegant solutions in my opinion. Implementing a well known sorting algorithm shouldn't be that difficult since all the popular ones are well documented and have examples available in many different programming languages. Bubble sort is generally not a very good one. Generally speaking, quick sort is usually the best choice. As always I'd love to hear opinions on this from those that know more than I do (which includes... well, pretty much everybody). Are there actually good reasons to use arrays rather than structs? IMHO, since all you want is to maintain key/value pairs in order, what you need is a Map that keeps its entries in order. The JDK provides two classes that do this, LinkedHashMap and TreeMap. Additionally, Apache Jakarta Commons has a number of other Map implementations that keep their entries in order. If you'd like an example of using one of these classes let me know. Of course, you may want nothing to do with Java and would rather handle the problem in CFML. If so, I would suggest creating your own ordered Map as a CFC. To do that you would create both an array and a structure to hold your data. The CFC would manage keeping the two in sync, which shouldn't be hard considering one would likely only hold references to the other. Then whenever you need to access your data as an array you have an array to access it with. When you need to access your data as a structure then you also have a structure to access it with. Matt Liotta President CEO Montara Software, Inc. http://www.MontaraSoftware.com (888) 408-0900 x901 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Sorting CFCs: Structures over Arrays in collections
-Original Message- From: Matt Liotta [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2003 12:51 AM To: CF-Talk Subject: Re: Sorting CFCs: Structures over Arrays in collections Just finished a marathon coding session and thought I'd share/get some opinions on some of the things I've found concerning CFCs and sorting. I'm new CFCs and OO, so much of this may seem amateurish, but I expect that many CFers are in the same position. I hope it may help somebody or prompt discussion that heads off bad habits before they set in. You may find better responses if you send each of your questions separately as this email is rather long and touches on several subjects. Well - there wasn't really any questions at all here.;^) This was meant to be just a general here's what I've found out; what do you think message - not a query so much as something to kick off discussion. I began, as everything I've read suggests, by creating an internal array to hold the components. I now think that was a mistake and have switched to structures to maintain the internal data. However structures can't maintain an explicit order, something Arrays do by design. It can often be hard to choose between arrays and structures since sometimes you want properties of each one. Thus, it is often necessary to create a data structure that has the properties you want instead working around a problem in an available data structure. True.In this case I think that's what I've done (sorta).I want the properties of a structure (easy random access, sorting, etc) inside the comoponent, but want it to return ordered data (properties of an array). Sorting arrays of components is a pain. ArraySort() won't work on arrays of complex objects so you're left with doing some sort of bubble sort, going back out to the database, or using some sort of proxy (creating, for example, a query using Query of Queries). All of these are inelegant solutions in my opinion. Implementing a well known sorting algorithm shouldn't be that difficult since all the popular ones are well documented and have examples available in many different programming languages. Bubble sort is generally not a very good one. Generally speaking, quick sort is usually the best choice. Bubble Sort wasn't actually what I did - it's just the first example that came to mind.If I had had to really do it then I probably would not have used bubble sorting anyway - although in some of my cases it may have actually been quite effective (small amounts of nearly sorted data). QuickSort is definitely a better choice generally however.I've never needed it in CF (yet) but I have used it in _javascript_. In any case implementing an algorithm may be simple - but leveraging the core sorting capabilities of the language seems a better choice to me - at least for simple sorts. More complex sorts may require custom coding... but that's what makes them complex.;^) As always I'd love to hear opinions on this from those that know more than I do (which includes... well, pretty much everybody). Are there actually good reasons to use arrays rather than structs? IMHO, since all you want is to maintain key/value pairs in order, what you need is a Map that keeps its entries in order. The JDK provides two classes that do this, LinkedHashMap and TreeMap. Additionally, Apache Jakarta Commons has a number of other Map implementations that keep their entries in order. If you'd like an example of using one of these classes let me know. Of course, you may want nothing to do with Java and would rather handle the problem in CFML. If so, I would suggest creating your own ordered Map as a CFC. To do that you would create both an array and a structure to hold your data. The CFC would manage keeping the two in sync, which shouldn't be hard considering one would likely only hold references to the other. Then whenever you need to access your data as an array you have an array to access it with. When you need to access your data as a structure then you also have a structure to access it with. At this point it's not so much that I want nothing to do with Java (I will get there eventually) but that it really doesn't seem like I need it.The solution I have is working just fine (for this application, of course - it may break down under different requirements). Right now I'm creating the array on demand - because I plan to cache them immediately.However creating the array on construction instead (and having them updated accordingly with the add() and delete() methods) would, I think, effectively create the ordered Map you describe (although not a generically applicable one). In that case (it seems) I would have several Map components which would have to be managed.Since I want to return a single set of components sorted several different ways I think that what I have works best for this. Of course that's not to say I won't hit a roadblock at some point and need to
Re: Re[2]: CFMX/Linux: using Java to read image properties
Missing server package? Permissions issue? What Matt said. You need to configure X11 Massimo Foti Certified Dreamweaver MX Developer Certified Advanced ColdFusion MX Developer http://www.massimocorner.com/ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]