RE: Unix Trouble
This is *exactly* why you never run as root unless you absolutely have to (even then you can often get away w/ running only the current command as root using su). First suggestion is restoring from your daily backup. You *do* have a daily backup don't you? :) As far as recovery goes, assuming that the OpenBoot security level is not set to full you should be able to quickly recover with the help of the Solaris CD. Basically it will consist of booting off the CD, mounting the partition that normally contains /etc (and the partion where you think it went), and restoring it to it's proper location. For more exact details on how to do the boot and mount, you should be able to find some FAQ or info on one of the many Solaris sites ( http://directory.google.com/Top/Computers/Software/Operating_Systems/Unix/So laris/ ) or your favourite Solaris book. -Original Message- From: Erika L. Walker [mailto:[EMAIL PROTECTED]] Sent: May 26, 2001 17:02 To: CF-Talk Subject: RE: Unix Trouble Thanks Tony! I'm glad I'm not the only one! grin Makes me feel marginally better... Erika - -Original Message- From: Tony Schreiber [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 26, 2001 7:18 PM To: CF-Talk Subject: Re: Unix Trouble Haha. That's too funny. I was running OpenWindows one time and this stupid twitchy Sun mouse (really sensitive buttons ;p) MADE me mistakenly drag the /etc folder into the /bin folder... My mistake was to reboot - had to reinstall. On another computer I did a rm * when I meant to do a rm *~, lost that one too. ;) I know this isn't very helpful, but at least you know you're not the only one. OK. now don't make fun of me, yet! :) However...My question is: I accidentally lost the etc folder (don't ask) while poking around inside the files of a Sun Solaris 8 box. I thought it had just dumped itself into another folder, and while in the process of looking for the etc folder, the system crashed. Of course it wouldn't come back up on reboot...what do I do next? I know it wasn't deleted...it's still there on the drive somewhere...can I boot the machine up from an external source such as a cdrom or a floppy? Thanks in advance, Erika (with a duncecap) One of the greatest pains to human nature is the pain of a new idea. - Walter Bagehot - ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Counting
Heh, you answered your own question. count() *** Psycically trying to probe your table/field names)*** SELECT c.class_id, c.class_name, count(r.lname) FROM class c, registrant r WHERE c.class_id = r.class_id GROUP BY c.class_id, c.class_name -Original Message- From: David Clay [mailto:[EMAIL PROTECTED]] Sent: May 23, 2001 05:48 To: CF-Talk Subject: Counting Can someone help. Customers are signing up for classes and I need to know how many (Count) are in a class at any given time. That number needs to be output on the same row as the class number. Looking for code on this. Having a major brain fart. Your help is appreciated. Thank you Dave Clay Internet Facilitator Trus Joist, A Weyerhaeuser Business 5995 Greenwood Plaza Blvd, Suite 100 Greenwood Village, CO 80111 303.770.8506 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Compromising Security
Code smart. Don't allow input from a form field to ever go directly into a query: Treat all data recieved from a user as tainted. Don't rely on JS or HTML, there's nothing to stop someone doing a direct post to your script. Get rid of detailed error messages, use error templates and try/catch to make them user friendly (and disable in admin). Give CF only the permissions it needs, don't run as a dbms su when select/insert/update permissions are all that's needed for the main site. Use stored procedures, not only do you get the benifit of added speed and lower connection overhead (though portability can be effected) you can more readily control exactly what is being accessed. There are tons of other suggestion, such as always staying on top of security updates (unlike 60%+ of sysadmins out there who don't patch known issues even years after they've been dicovered and documented). It doesn't take much extra coding, and it quickly becomes second nature. Your applications will be more stable, secure, and happier for it. -Original Message- From: Peter Tilbrook [mailto:[EMAIL PROTECTED]] Sent: May 22, 2001 18:57 To: CF-Talk Subject: RE: Compromising Security The first thing you should do is store your databases in a folder that is not accessible from the Internet (out of your web root). For example: Your websites could be in c:\inetpub\wwwroot\mywebsite\ But you should store the databases somewhere else, eg: c:\datasources\ Secure this directory and update CF Administrator to look here for datasources instead. Don't think your databases have to be physically within your web site for CF to access them. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Pooh Bear Sent: Wednesday, 23 May, 2001 2:28 AM To: CF-Talk Subject: Compromising Security hey, I was wondering what are the least amount of information someone needs to compromise my database or code? I am.err...hacking? my site/database through the URL. So far, I've got 2 tablenames, the datasource, and some field names. I dont want to have to do a lot of coding to prevent this from being seen by someone else, but i will if have to, but first i want to know if anyone could do anything with this much information. Thanx! :) ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: What a task!
Haven't really been following this thread, but at it's highest level your problem seems to break down into these three steps. (If you want quick fixes skip to the bottom.) 1. Render the HTML 2. Convert rendered screen to image 3. Resize image RENDER THE HTML --- You might check out http://www.mozilla.org/ for mozilla's HTML rendering engine if you want something you can bring into your own code. There are some other engines that are open as well, I'll leave them to you to find. Alternately there's closed source such as the popular IE. Which you decide to use counts heavily on the next step. CONVERTING TO AN IMAGE -- The whole purpose of the exercise is to get the render (R) to output to a bitmapped image (I). Theoretically the easiest way would be get R I; somehow I doubt it's going to be as easy as a 'mozilla --url=www.foo.com bar.jpg' though. Given the mozilla source you may be able find where you could redirect the screen display though. I'm not overlly familiar w/ IE but it might have some COM objects accessable to pull the information from. RESIZE IMAGE So many programs and algorithms to accomplish this, choose whichever suites you (http://www.imagemagick.org/ is one of my favourite utils for this). CONCLUSSION --- I realise this isn't exactly detail specific, but if you were floating around wondering how to even begin tackling the problem this might provide some grounding. QUICK FIXES --- http://www.html2jpg.com has a win9x/IE5 specific program to accomplish step 1 and 2 if you're on that platform. http://www.tdb.uu.se/~jan/html2ps.html converts to PS, w/ http://www.imagemagick.org/ it's only a step away from a properly sized jpeg and it's not platform specific. (I don't have a clue how the html2ps script renders the HTML though) -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: May 18, 2001 19:28 To: CF-Talk Subject: Re: What a task! How many thumbnails are there going to be? It might be more cost effective to train a peon (no offense to any peons out there;-)) to use a screenshot program jon - Original Message - From: Michael Lugassy [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, May 18, 2001 8:03 PM Subject: What a task! I got this assignment recently: I need to create a thumbnail view of the front/home page of a given site. that should be done automaticlly, ofcourse. for example: I run this: CF_THUMBSITE site=http://www.imvamp.com;; somehow I need to grab all of the site content and PICTURE IT as it were on a browser. this gots you thinking, ha? I know http://www.girafa.com does something similiar. if anyone can solve this, I'm hearing! :) Thanks, -=Michael ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Array problems
First of all that's not a 3d array. Secondly from your data I'd say embedded structs would suit you better (you might also hear the concept reffered to as hashes or associative arrays). // init struct notebook = structNew(); // example using variables structInsert(notebook, Notebook_Number, structNew()); structInsert(notebook[Notebook_Number], title, Notebook_title); structInsert(notebook[Notebook_Number], owner, Notebook_Owner); // example using hard coded data structInsert(notebook, 34, structNew()); structInsert(notebook[45], 'title', 'Jim notebook'); structInsert(notebook[45], 'owner', 'Jim'); !--- example of accessing the info in a cfoutput --- Get the title of notebook 45: #notebook[45].title# If instead you wanted to use an array: // init array notebook = arrayNew(1); // example using variables arrayAppend(notebook, listToArray(data)); // example using hard coded data arrayAppend(notebook, listToArray(45,Jim notebook,Jim)); !--- example of accessing the info in a cfoutput --- Get the title of notebook 45: #notebook[2][2]# The array will be much faster (among other advantages) but you loose the ability to call data by nomen. Try reading some introduction to programming texts for the various data structures. -Original Message- From: Ray Bujarski [mailto:[EMAIL PROTECTED]] Sent: May 18, 2001 17:43 To: CF-Talk Subject: Array problems I am new to arrays, I have been using lists as a crutch for some time now. I need to insert values into this 3d array as so Notebook_Number, Notebook_title, Notebook_Owner I am looping through a query but do not understand how to set the values in this array Example needed array: notebooks 34, Rays notebook, Ray 45, Jim notebook, Jim How would I do this? Thank you!!! Ray ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: setting values
Mapping values is one option, but I really think you should consider leaving it numeric. update prod set price = 19 where price = 22; Would easily change all prices of one type to another. If it's space you're concerned about (and you use all integer prices) using an unisigned tinyint (8 bits) will give you values from 0 to 255 and take the same space as char(1). Really though even a dec(9,2) isn't bad at all for only a few thousand records. As far as input is concerned, just create a dropdown or the like so you can quicky choose the standard values. This will keep the data w/ the prices relevant and cut out the need for a join table (and application array/struct) as well as the need to work w/ a sting. If you do want to do a mapping, here's a way. CREATE TABLE table_name ( code char(1) not null, price decimal(9,2) not null PRIMARY KEY (code) ); Then just create a relation w/ cascading update to the products table. You can now either enumerate the code w/ a join in the query, or use an application struct so #application.price[query_name.price_code]# fills in the value (after do all the locking etc.). It really doesn't make sense from a complexity and speed view though, when a dropdown on input would solve all your problems. -Original Message- From: Ken Ketsdever [mailto:[EMAIL PROTECTED]] Sent: May 18, 2001 18:32 To: CF-Talk Subject: setting values Friday, May 18, 2001 5:14 PM I have a table that is dynamically populated from a db to show the item number, description, price and image of products. Although there are several hundred items there are only about 6 prices. Rather than inputting the price of each item into the database, I would prefer to put a letter designation then set the letter to equal a price. so that when prices change I only have to reset the price once per price versus changing all the prices in my database. I am pulling out #price# from a query. if I use prices as a , b, c, d, ... can I use some sort of set function to establish prices to be displayed so if an item has a price code of a in the database it will display $22.00 if it is b then it will display $26.00 etc... Or does this need to be done via a cfif statement and if so how would I do it Thank you for any help you can provide ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Imbedding IF statements into a tag.......
Inline IF? IIF() :) IIF(expression, true_expr, false_expr) Check the lang. ref. for more detail. -Original Message- From: Stevens, Jason [mailto:[EMAIL PROTECTED]] Sent: May 16, 2001 23:42 To: CF-Talk Subject: Imbedding IF statements into a tag... Is it possible to imbed IF statements into a tag? For example, you have the following statement: cfmail to=[EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=Order Information cc=#session.Form.CCEmail# type=HTML Of course, when the session variable session.Form.CCEmail doesn't exist, it error's off. Would there be a way to imbed an if statement that would only add the cc section of the cfmail tag if the variable exists without writing is as: cfif isdefined(session.Form.CCEmail) cfmail with cc section else cfmail without the cc section /cfif I would rather do it inline of the tag if possible. Even if it just leave the variable at a zero value, so long as the variable is set and it won't error off. Thanks in advance, (sorry for the newbie question :) ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: HELP: Hierarchy
Sounds like you'd be best be served by a recursive function (or for CF recursive custom tag). For performance sake I'd either have a table or application object to store the full heirchy info of each category; pre-generated on a fixed basis. You could store it w/ full html formating in a table/array: | cat_id | generated_data --- | 5| a href=blah... a href= Or if you wanted a more flexible approach an array of struct containing the cat_id and cat_name (wddxed into that field if a db or flatfile). array[0]-{24} = 'Sevier County' array[1]-{6} = 'Arkansas' array[i]-{cat_id} = cat_name (Alternately a 2D array would accomplish the same thing w/ better performance but this is for clarity) I'm using a Perlish notation to show the relation a bit more clearly (I hope). Whether you use a temporary table, memory object, or an external file really depends on your hardware and extent of the data. Okay, so how exactly do you implement recurision in CF you ask? Well I'm glad you did, let's go over that. The first thing you always want to think of w/ recursion is How the hell am I going to stop it? or you'll introduce all sorts of fun infinite loops your sysadmin will just love. In this case our stop criteria is when parent.recordcount in fig. 3 (heh, I feel so official mentioning figure numbers) becomes 0. // fig. 3 cfquery name=parent SELECT cat_id, cat_name FROM table WHERE paren_id = attributes.cat_id /cfquery Okay, well that defines our stop position and at the same time shows us a large part of our custom tag. Now let's start our thinking at the root parent (the absolute last interation of our custom tag) and work backward. Well we know we want to track the heirarchy, so we need to pass that parent value to the calling tag. caller.parent_cat = parent.cat_id; caller.parent_name = parent.cat_name; Okay, so that's done.. we're now down one level and we need to pass both the root parent, and this level is a parent too. Oviously passing tons of scalars isn't going to go over well w/ untold levels of recursion, so instead let's move to the more formatted data structure stated before we began. So we have an id and name for each level of recursion. Let's save that as a simple array: current = listToArray(cat_id, cat_name) That handles the last level (remeber root parent is the last tag to execute) but we need to track as we go, so let's store these arrays in another so we can pass them along and also keep track of the order (which is the whole purpose). So we'll arrayAppend this (push, pop, etc. are named differently in CF) array into our tracking one and pass it along to the previous caller. arrayAppend(tracking, current); caller.parents = tracking; **[Okay. it's 5:04am and as fun as the last 10-15min writing this has been... I have a bad cold and need my sleep. Someone else can probably finish this off (or suggest a better solution overall). If not I'll continue where I left off tomorrow sometime and it will probably be a lot more lucid for it. 2 quick pointers: 1) you have to write a page to loop over every line in a select * type query to start up the recursion. 2) that page will also deal w/ how you plan to store the info (key being cat_id, data being the complete lineage of each cat_id This is the extreme case of normalisation vs. perfomance :) ]** Happy coding. -Original Message- From: Tony Hicks [mailto:[EMAIL PROTECTED]] Sent: May 17, 2001 03:44 To: CF-Talk Subject: HELP: Hierarchy I have passed this question through so many cf communities... and it has still left me cf_dumbfounded Suppose you have a db with a table called categories.. The fields are: ID: Each Category's Unique ID Parent_ID: This field is the ID of the Parent Category Category_Name: The text to display to represent the category... So when you click a link like this: a href=browse.cfm?parent_id=5Test Category/a (The unprocessed CF for that is a href=browse.cfm?parent_id=#id##Category_Name#/a with a query that tells it to select just from the parent_id..)... Well that all works fine but I want to display the Level history at the top like so: Companies Brick and Mortar United States Arkansas Sevier County And if they were on the page listing all the counties in Arkansas it would be: Companies Brick and Mortar United States Arkansas Hopefully you all get the idea... does anyone know what the proper cf code would be to display this? Allaire Forums have helped me the best they can but the code people give me either errors out or loops into itself, thus locking up the server... Thanks, Tony Hicks I'd be glad to provide as much information as needed. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: HELP: Hierarchy
Ohh quick addendum, as fun as this stuff is... I'm a big fan of letting someone else do the work. OSs are great at this, they provide you with a nice organised tree structure and symbolic links should you wish to cross reference categories. Reading dirs is A LOT easier for finding parents too and much less processor intensive. -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: May 17, 2001 05:11 To: CF-Talk Subject: RE: HELP: Hierarchy Sounds like you'd be best be served by a recursive function (or for CF recursive custom tag). For performance sake I'd either have a table or application object to store the full heirchy info of each category; pre-generated on a fixed basis. You could store it w/ full html formating in a table/array: | cat_id | generated_data --- | 5| a href=blah... a href= Or if you wanted a more flexible approach an array of struct containing the cat_id and cat_name (wddxed into that field if a db or flatfile). array[0]-{24} = 'Sevier County' array[1]-{6} = 'Arkansas' array[i]-{cat_id} = cat_name (Alternately a 2D array would accomplish the same thing w/ better performance but this is for clarity) I'm using a Perlish notation to show the relation a bit more clearly (I hope). Whether you use a temporary table, memory object, or an external file really depends on your hardware and extent of the data. Okay, so how exactly do you implement recurision in CF you ask? Well I'm glad you did, let's go over that. The first thing you always want to think of w/ recursion is How the hell am I going to stop it? or you'll introduce all sorts of fun infinite loops your sysadmin will just love. In this case our stop criteria is when parent.recordcount in fig. 3 (heh, I feel so official mentioning figure numbers) becomes 0. // fig. 3 cfquery name=parent SELECT cat_id, cat_name FROM table WHERE paren_id = attributes.cat_id /cfquery Okay, well that defines our stop position and at the same time shows us a large part of our custom tag. Now let's start our thinking at the root parent (the absolute last interation of our custom tag) and work backward. Well we know we want to track the heirarchy, so we need to pass that parent value to the calling tag. caller.parent_cat = parent.cat_id; caller.parent_name = parent.cat_name; Okay, so that's done.. we're now down one level and we need to pass both the root parent, and this level is a parent too. Oviously passing tons of scalars isn't going to go over well w/ untold levels of recursion, so instead let's move to the more formatted data structure stated before we began. So we have an id and name for each level of recursion. Let's save that as a simple array: current = listToArray(cat_id, cat_name) That handles the last level (remeber root parent is the last tag to execute) but we need to track as we go, so let's store these arrays in another so we can pass them along and also keep track of the order (which is the whole purpose). So we'll arrayAppend this (push, pop, etc. are named differently in CF) array into our tracking one and pass it along to the previous caller. arrayAppend(tracking, current); caller.parents = tracking; **[Okay. it's 5:04am and as fun as the last 10-15min writing this has been... I have a bad cold and need my sleep. Someone else can probably finish this off (or suggest a better solution overall). If not I'll continue where I left off tomorrow sometime and it will probably be a lot more lucid for it. 2 quick pointers: 1) you have to write a page to loop over every line in a select * type query to start up the recursion. 2) that page will also deal w/ how you plan to store the info (key being cat_id, data being the complete lineage of each cat_id This is the extreme case of normalisation vs. perfomance :) ]** Happy coding. -Original Message- From: Tony Hicks [mailto:[EMAIL PROTECTED]] Sent: May 17, 2001 03:44 To: CF-Talk Subject: HELP: Hierarchy I have passed this question through so many cf communities... and it has still left me cf_dumbfounded Suppose you have a db with a table called categories.. The fields are: ID: Each Category's Unique ID Parent_ID: This field is the ID of the Parent Category Category_Name: The text to display to represent the category... So when you click a link like this: a href=browse.cfm?parent_id=5Test Category/a (The unprocessed CF for that is a href=browse.cfm?parent_id=#id##Category_Name#/a with a query that tells it to select just from the parent_id..)... Well that all works fine but I want to display the Level history at the top like so: Companies Brick and Mortar United States Arkansas Sevier County And if they were on the page listing all the counties in Arkansas it would be: Companies Brick and Mortar United States Arkansas Hopefully you all get the idea... does anyone know what the proper cf code would be to display this? Allaire Forums have helped me the best they can
RE: Restarting CF from Web
Starting and stoping CF will generally require root/administrator access in default install. If you take the following suggestions make sure you're aware of how to exec system commands safely in a web accessible script. *NIX: - If your under *nix w/ Perl or PHP support; change to a user w/ permissions to control the CF process then run $CF_root/bin/start and stop (default is /opt/coldfusion). WIN32: -- Under NT w/ Perl, PHP, or ASP support; change to a user w/ permissions to control the CF process then run: NET START Cold Fusion Executive NET START Cold Fusion Application Server NET START Cold Fusion RDS I think I have the correct order, there's a cycle.bat or something under %CF_root%\bin\ that will provide the correct order if I'm mistaken. Reverse order for NET STOP. If you don't have knowledge of these languages and you'd like a Perl or PHP script for *nix/NT I can whip you up one on request, or if you run Webmin I've made a quick module for it (nothing fancy at all, purely for my own use when no SSH is available). If you're IIS on NT someone w/ more knowledge than I could probably make a quick ASP script for you. -Original Message- From: Tim Painter [mailto:[EMAIL PROTECTED]] Sent: May 11, 2001 08:31 To: CF-Talk Subject: Restarting CF from Web Hello! In CF 4.0 there was a nifty java app that allowed me to stop and restart CF from a web page, however it is no more in 4.5. I no longer have a copy of 4.0 and really need to get a copy of this. Does anyone have a resource to get this or an alternative that will do the same thing? Thanks! Tim Painter ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: 2 simpl q's about locking
The timeout value repressents how long the process will wait to obtain a lock of the type specified. If throwontimeout is set to Yes it will raise an exception if a lock can not be obtained, if it's No then the code will skip to the end of the block (not executing anything in the block). Eg. 1) session.foo is exclusively locked on Page1 and is being written to for 10 seconds 2) session.foo is called on Page2 w/ a 3 second timeout only 1 second after Page1 starts 3) Page2's lock times out and raises an exception (read: error) b/c default is to throw on timeout. 4) Page1 finishes execution and releases the lock -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: May 15, 2001 04:22 To: CF-Talk Subject: 2 simpl q's about locking 2 questions about locking: 1. Do I need to lock application.engines whenever I try to isDefined() it or is this enugh: CFIF IsDefined(appliaction.engines) CFLOCK cfoutput#application.engines#/cfoutput /CFLOCK /CFIF 2. The Timeout Value - does it represent the MAXIMUM time (in seconds) that the var would be locked or does it represent the ACTUAL time that the variable would be lock (no matter if the process has ended succesfuly before the timeout)?? Thanks!! -=Michael. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: 2 simpl q's about locking
Sorry, it's late and I had completely forgetten about 1 by the time I finished reading 2.. hehe. I'm going to go a bit out on a limb here and say no. As you're only checking the symbol table to see if the name is defined -- not trying to get a coherent value from it or access the same memory address from possibly multiple simultaneous threads -- it should be thread safe. I personally don't lock on isDefined() checks but I may err in that practice (nor IIRC have I ever seen it mentioned in articles). If someone has more information on exactly how isDefined() works internally in regards to multi-threading it would be interesting to know. -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: May 15, 2001 05:02 To: CF-Talk Subject: Re: 2 simpl q's about locking Got it! and what about the isDefined(question) ? do you know the answer to it? Thanks, Michael Lugassy IT/WEB Specialist Interactive Music Ltd. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Scientific Notation Formatting
numberFormat(foo/10^iif(fix(log10(abs(foo))) gt 1, fix(log10(abs(foo))),fix(log10(abs(foo/10,9.99)Eiif(fix(log10(abs( foo))) gt 1,fix(log10(abs(foo))),fix(log10(abs(foo/10 Ugly and ineffecient you say? I agree wholeheartedly. Why log10 and not just len, other than simply the fact it counts +/- and .? Soon as a number reaches float size CF represents it internally in E notation w/ full precision. Eg. foo = 0.0424352353494; writeOutput(val(foo)); I can't say I ever do anything in CF that uses any heavy math. CF just isn't suited for it. I can't wait for CF5.0s UDFs to write function wrappers for CFXs to extend it something akin to Perl's modules for extending it's functions (haven't checked out CF5.0 other than reading a bit of the RC release notes so I could be way off on how powerful UDFs will be). If anyone knows a nicer way (there has to be one better than above) to represent numbers in a consistant scientific notation it would be great. -Original Message- From: Howie Hamlin [mailto:[EMAIL PROTECTED]] Sent: May 15, 2001 11:10 To: CF-Talk Subject: Re: Scientific Notation Formatting You can do something like: cfset num=26000 cfoutput#numberformat(num / 10^(len(num)-1),9.9)#e#evaluate(len(num)-1)#/cfoutput Just bear in mind that this works for numbers =1 HTH, Howie Hamlin - inFusion Project Manager On-Line Data Solutions, Inc. www.CoolFusion.com 631-737-4668 x101 inFusion Mail Server (iMS) - The Intelligent Mail Server - Original Message - From: Corina Moore [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 1:03 PM Subject: Scientific Notation Formatting Anyone have any ideas on how to format a number using scientific Notation? For example I have the number 2600 and I want to display 2.6e11 I would appreciate any help. Thanx * Corina S. Moore IMDC Software Developer 301-286-6124 http://imdc.nasa.gov ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Anyone hear of the HL7 protocol?
Yeah, when I had to work on a pharmacutical intranet. http://www.hl7.org/ It's a 'standard' for exchanging clinical information, etc. I didn't have to work much w/ it as someone else was writing the parser so the website's your best bet. -Original Message- From: Al Musella, DPM [mailto:[EMAIL PROTECTED]] Sent: May 15, 2001 13:08 To: CF-Talk Subject: Anyone hear of the HL7 protocol? I have to create a medical website that communicates with a program that uses the HL7 protocol. I never heard of that, and I have to talk to their programmers tomorrow and don't want to look that stupid:) Anyone know what they are talking about? Al Musella, DPM virtualtrials.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session variables.......
I'm not sure exactly what you want, but if you're talking a multi-part form (and you want to use session vars) just keep throwing all the form struct except form.formfield (if 4.5x+) into a session struct then structClear() the struct at the end. -Original Message- From: Stevens, Jason [mailto:[EMAIL PROTECTED]] Sent: May 13, 2001 20:08 To: CF-Talk Subject: Session variables... Would anyone know of a way to make session variables either expire or reset after a page is loaded? I'm having people go through a form process and want to zero out all session variables upon submission and I'm looking for a way to do that. If this is a duh, how could you not know the answer to that?, I apologize, I've only been in CF dev for a month. Thank you for you time, ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session variables.......
I should add, I don't mean structClear(session) but create a substruct then clear it at the end. So it would be structClear(session.form_a) or something akin to that. -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: May 13, 2001 20:37 To: CF-Talk Subject: RE: Session variables... I'm not sure exactly what you want, but if you're talking a multi-part form (and you want to use session vars) just keep throwing all the form struct except form.formfield (if 4.5x+) into a session struct then structClear() the struct at the end. -Original Message- From: Stevens, Jason [mailto:[EMAIL PROTECTED]] Sent: May 13, 2001 20:08 To: CF-Talk Subject: Session variables... Would anyone know of a way to make session variables either expire or reset after a page is loaded? I'm having people go through a form process and want to zero out all session variables upon submission and I'm looking for a way to do that. If this is a duh, how could you not know the answer to that?, I apologize, I've only been in CF dev for a month. Thank you for you time, ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfm-resources?
You might want to move to a language such as PHP, Perl, (ick) ASP, etc. Using CF, which is really meant to be an enterprise product and costs min. $1.2k USD, might not be the solution. I realise it's often much more rapid development and has a quicker learning curve overall, but PHP and Perl are free, ASP is in the sense it can be hosted w/ chillisoft bypassing having to pay for the OS... Server such as this have lower operating costs to begin w/ so can often offer much lower rates. I'm almost sure to get flamed for suggesting something other than CF, but it's all about the right tool for the job. If the site will be manageable enough through your admin section then the need for someone unskilled to edit the source won't occur frequently. Just a though. -Original Message- From: Robert J. Bailey [mailto:[EMAIL PROTECTED]] Sent: May 11, 2001 10:41 To: CF-Talk Subject: RE: cfm-resources? I have been having problems with them with my free account, and a friend of mine that has a pay account with them can not get a hold of them either, no matter how many emails Robert J. Bailey (646) 526-4536 -Original Message- From: Kay Smoljak [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 10:39 AM To: CF-Talk Subject: cfm-resources? Hi all, I was wondering if anyone else was having problems with free accounts at cfm-resources.com? First my password stopped working, and when I got no response to repeated emails, I gave up and signed up for another account. (Incidently, after a number of errors were thrown in the registration scripts, I ended up with three accounts but that's a different story.) Attempts to FTP in are successful after on average three or four timeouts. Everytime I do actually manage to connect, it timeouts before I can upload any files. The site itself takes ages to load and then I get server errors. The cfm-resources control panel is not even up. Now, before you tell me that you get what you pay for, I totally agree. I'm developing a site for a non-profit organisation with next to zero funding, which promotes science and technology career paths for high school students, girls in particular. The aim is to create a site that they can update and maintain themselves, thereby requiring no more funding for web work. My plan being, if I can get the site running on the free hosting service, and they see how great and easy it is and maybe interest some benefactors, I will get them to move to one of the low cost hosting services. Hell, I was even planning to pay for some of it myself. I'm not expecting great reliability or speed out of a free service. But at the moment *I* can't even view the site, and it's been like that all week. What I would like to know is, what is the reliability like on their paid accounts? I'd be reluctant to risk them after my experiences with the free service. What are the other low cost hosting services out there like? Sorry to bitch but this is driving me insane! Kay. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Outputting Raw CFML
Lots of ways, a quick fix is to run it through htmlCodeFormat() or just enclose it in code/code tags. -Original Message- From: Kuehn, Matthew [mailto:[EMAIL PROTECTED]] Sent: May 10, 2001 12:18 To: CF-Talk Subject: Outputting Raw CFML I want to build an app that will traverse our directories and extract the text within ColdFusion comments. I will use this to build a kind of dynamic help generator. I'm trying to use cffile to read in the file so that I can use Find() to look for the commented code. But, if I read in the file and then output it on a page, ColdFusion tries to process the text and display it as what it is, mainly HTML and CFML. Is there some tag I can use to just output the file I read in as plain text, so that none of the CFML gets processed or the HTML gets displayed? All I want is the text contained in the file. (Normally, I won't output the entire file, but just the results of the Find(). This is a temporary debug thing until I can get the bugs worked out.) Thanks, Matthew ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Realtime Background Task
You could also cfexecute a batch file (w/ 0 timeout) to generate the output. This is done by calling the shell CF interpretter... cfml.exe on NT? (*nix person myself). There's no user wait w/ a 0 timeout but the process will run until completion. Or if you could wait 15min you could use cfschedule to create a run once task. -Original Message- From: Calvin Moree [mailto:[EMAIL PROTECTED]] Sent: May 7, 2001 15:41 To: CF-Talk Subject: Realtime Background Task We are currently using CF 4.5.1 on NT. I have an application where a user inputs data into a form and submits the form to another page that enters the data into the database. What I want to do is at the same time as the data to going into the database, I also want the data to be sent to a totally separate page in the background. If I use CFHTTP the user cant continue until the CFHTTP is complete. I dont want the user to wait because they dont need a response from the background page. I just want to send the data and not retrieve anything back. Is there a tag or code I can use to perform this function? TIA Calvin P.S. The background page is performing several queries. The query results are then used to create a text file. We don't want the user to have to wait for the text file to be created. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFOUTPUT GROUP
Heh, not much to explain about it. On the easiest level just match the ORDER BY clause in the SQL statement w/ the grouping levels. [SQL statement] ORDER BY field1, field2, field3, .. fieldn ; [CF output] cfoutput query=foo group=field1 Stuff every time new value in field1. cfoutput query=foo group=field2 Stuff every time new value in field2. cfoutput query=foo group=field3 Stuff every time new value in field3. /cfoutput /cfoutput /cfoutput -Original Message- From: Paul Smith [mailto:[EMAIL PROTECTED]] Sent: May 7, 2001 17:01 To: CF-Talk Subject: CFOUTPUT GROUP Hello! Is there a good tutorial somewhere on the Subject? I need to group more than one level down and the subject of grouping always hurts my head ;-) Project Category 1 Project Type 1 Project 1 Project 2 etc Project Type 2 Project 89 etc Project Category 2 Project Type 7 Project 3 etc. best, paul ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Quick DB Design
Eugh, many better ways. CREATE TABLE table_name ( uid int not null, gid int not null, primary key (uid, gid) ); The junction table's primary key is a composite of the usr and grp tables' foreign keys. If your dbms supports foreign key contraints set it for cascading update and delete (of PK), etc. VERY inoften will you ever store a composite field (ie. list in a field) at the lowest level of your database design. With this structure you can find what groups a user belongs to by a simple SELECT gid FROM table_name WHERE uid = var, or how many users are in a group by SELECT count(uid) AS cnt WHERE gid = var GROUP BY gid, etc. If that data was stored in a list in a field, it would negate the purpose of storing it in a database. -Original Message- From: Michael Lugassy [mailto:[EMAIL PROTECTED]] Sent: May 6, 2001 09:38 To: CF-Talk Subject: Quick DB Design I'm trying to normalize a table to best hold the following data: username, group1, group2, group3, group4... groupN... there are 1000s of unique usernames, and 1s of unique groups every user can subscribe to 1-1 diffrent groups (so I don't know how much group colums to put). I need somehow to maintain a list of subscribed groups for each user. is there a better way then 2 fields like the following: username (nvarchar(30) groups (longtext) = group1,group3,group15,group7,group9 ? Thanks, -=Michael. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFSCRIPT-Reference
http://www.allaire.com/cfdocs/Developing_Web_Applications_with_ColdFusion/20 _Extending_ColdFusion_Pages_with_CFML_Scripting/dwa20.htm Just read the online docs Allaire has up (or in CFStudio) Developing Web Applications with ColdFusion Extending ColdFusion Pages with CFML Scripting. Pretty much just follow very basic JS syntax using CF operators. It's rather limited, so don't expect ternary (? :) operators or even anything as simple as += or ++ style shortcuts. If in doubt semi-colon all expressions and enclose control statements in curly brackets: They are rarely invalid in this class of syntax, just unnecessary at times. Err on the side of extra keystrokes and you should be fine. -Original Message- From: Brad Comer [mailto:[EMAIL PROTECTED]] Sent: May 4, 2001 21:53 To: CF-Talk Subject: CFSCRIPT-Reference Can any one recommend a good reference for CFSCRIPT code. I realize it is similar to CF code, but it is different in syntax. Thanks In Advance! Brad Comer [EMAIL PROTECTED] ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: [cold_fusion] Unusual Results, help
I'm jumping into this mid-stream w/o reading through the entire history so bear w/ me if I'm way out there. It's a bit of a kludge but I'll often just use a for(init_expr; expr; post_expr) {} style loop for queries if I need good control of the cursor over multiple loops. For simplicities sake I'll use CFSCRIPT syntax to illustrate. for (i=1; i le outer_query.recordcount; i=i+1) { for(j=1; j le inner_query.recordcount; j=j+1) { outer_query.field1[i]; // on way of accesing the element inner_query[var][j]; // another way } } I'm not fond of how the cursors function (or fails to) w/ anything complex either. And yes, I too despise silent discarding of empty elements. As long as we're going for gripes here, valueList() and similar functions ONLY work w/ queryname.field notation and won't accept any work arounds inside them. Instead of being able to use queryname[var] when needing dynamic assignment, you have to use a named var _outside_ the statement and evaluate the string [evaluate(queryname. var)] then have that variable interpolated. It's an evil evil slowdown if you're doing lots of things dynamically. With the new functions of CF5 this will become an even bigger issue and I really hope it's better in that ver. (Haven't had much time to check out the rc) /rant :) -Original Message- From: David E. Crawford [mailto:[EMAIL PROTECTED]] Sent: May 4, 2001 06:10 To: CF-Talk Subject: Re: [cold_fusion] Unusual Results, help I am not apologizing for Allaire, I am stating the facts about the way the program works. I also feel that a bug is in the eye of the beholder. Just because it doesn't work the way you a) expect it to or b)like you want it to doesn't mean it is a bug. This issue has been around since the first time you could have looping constructs (cfloop, cfoutput) nested within each other. I agree on the empty list elements issue, however. DC - Original Message - From: Aidan Whitehall [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, May 04, 2001 06:31 Subject: RE: [cold_fusion] Unusual Results, help This has always been the behavior of CF. I can agree that it at first glances appears to be counter intuitive, but at the same time, any reference to queryname.fieldname outside the context of a CFLOOP or CFOUTPUT results in a reference to the value of the field in the first row of the query. The functionality is such that there is no inheritance of references. Well, I think you're at risk of sounding like an apologist for Allaire. There are a couple of things that I feel need fixing in ColdFusion, and this is one of them (the other one that springs to mind is the inability to optionally specify that empty list elements aren't ignored - really useful if you are populating database tables from delimited lists). CFOUTPUT QUERY=GetParents *Crappy CFSET GetParents.ParentID code required here* CFOUTPUT QUERY=GetChildren #GetParents.ParentID# doesn't increment properly with each iteration of the outer loop WHY NOT ALLAIRE?!?! /CFOUTPUT /CFOUTPUT Since CF5 is feature complete and in RC testing, I would seriously doubt that a change in behavior is going to happen in this release, or for that matter even in NEO. Unfortunately, I think you might be right. Hey, we've fixed a load of old bugs! doesn't sound as good to new customers as Hey, there's a load of new features!. -- Aidan Whitehall [EMAIL PROTECTED] Netshopperuk Telephone +44 (01744) 648650 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: IIS 4, 404 http error fusebox (more data)
IIRC, due to security problems IIS disabled that form of var referening in 5.0. Possibly the SP did the same for 4.0...? (so back to ?= ) I'm far from up on most win32 matters, but you may want to check that out. -Original Message- From: JAAV [mailto:[EMAIL PROTECTED]] Sent: May 2, 2001 02:24 To: CF-Talk Subject: IIS 4, 404 http error fusebox (more data) index.cfm/fuseaction/foo/myvar/bar.htm [doesn't work] index.cfm/fuseaction/foo/myvar/bar [do work!!!] any ideas? ~Juandres - Original Message - From: JAAV [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 10:48 AM Subject: IIS 4, 404 http error fusebox Hi everyone, We are using fuseaction URLs in our local server. We had a WinNT4 SP 4 box and we upgraded to SP 6 but suddenly all the fuseaction links don't work, but all the normal links work normally. The IIS send a 404 http error. Something like 'check your URL...' anybody know what the problem is ? thanks in advance, ~Juan ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: ZIPPING with coldfusion = ARJ!
ARJ/JAR fell into disuse years ago (as LHARC did before it), RAR superseded it in that vein of compression utils. Either way though, handing a LHZ, ARJ, RAR, etc. (or the shortlived ACE) to your average windows user is like handing a gzipped tarball to a Mac user.. if they even did know how to use it they probably wouldn't bother to install the utility to decompress it. -Original Message- From: Nick McClure [mailto:[EMAIL PROTECTED]] Sent: April 18, 2001 07:13 To: CF-Talk Subject: Re: ZIPPING with coldfusion = ARJ! The problem here is that most consumers will not know what to with an ARJ file. At 04:57 PM 4/18/2001 +0200, you wrote: Forget about ZIP. ARJ IS MUCH BETTER! I just did some testing, arj32 (www.arjsoftware.com) is the best solution (using CFEXCUTE) you can arj unlimited number of files (compare with WINZIP's limit of 65535) + more intresting switches and options. Thanks, Michael Lugassy Interactive Music Ltd. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfdirectory
f you're displaying it alpha order (standard), then . and .. are always at the top. CFDIRECTORY returns a query object, so just skip the first two records using the startrow="" property. -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: April 14, 2001 14:57 To: CF-Talk Subject: cfdirectory How can I keep the . and the .. from showing when I display the contents of a directory? Joshua Tipton ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Registry size.
Yeah, just use proper error control. You should never have detailed error info showing on a production server. In the admin under the debugging section disable anything that gives info and/or proper use of cferror and cftry/cfcatch will remove anything other than "friendly" error messages you define. -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: April 13, 2001 19:02 To: CF-Talk Subject: Re: Registry size. I agree, but the problem is what if there is a problem with the DSN and CF throws an error, then it would show the dsn name and at that point its all over! Ideas? Neil - Original Message - From: "Peter Tilbrook" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 2:43 AM Subject: RE: Registry size. Just disable CF_Registry. It shouldn't be enabled unless you absolutely trust your customers. -Original Message- From: Bryan LaPlante [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 11 April 2001 16:29 To: CF-Talk Subject: Re: Registry size. I am jumping in here mid discussion but a couple of post back did you mention a concern about using a datasource for storing client var's? I have a question. If you use a DB for client var's, do the customers have any way of knowing what you named the datasource? If you set the default in CF admin to use DB for Client var's I would think the only thing you would be up against is getting the customer to comply with a policy that asks them not to purposely set Registry as the storage in their CFAPPLICATION tag. What -a- ya think? - Original Message - From: "Neil H." [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, April 10, 2001 11:50 PM Subject: Re: Registry size. You guys don't understand this is a hosting server so I don't set the code. Understand now? Thanks, Neil - Original Message - From: "Scott, Andrew" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Monday, April 09, 2001 10:08 PM Subject: RE: Registry size. Not if you follow the basic guidelines and user variables instead of hard coding this info, also to be 100% sure wrap these with cftry and have your own custom message!!! That should make it harder for anyone to second guess. -Original Message- From: Neil H. [mailto:[EMAIL PROTECTED]] Sent: 10 April 2001 12:01 To: CF-Talk Subject: Re: Registry size. Jon, If there is ever an error in the dsn won't the server throw the DSN name. This would become a security issue since user X can query user Y's client info? Thanks, Neil - Original Message - From: "Jon Hall" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Monday, April 09, 2001 6:27 PM Subject: Re: Registry size. Changing the client variables to be stored in a database is one of the first things I do on a new server. Using an Access database is much better than the registry. SQL Server or any other real rdbms is even better. jon - Original Message - From: "Neil H." [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Monday, April 09, 2001 5:58 PM Subject: Re: Registry size. I host several sites with people and some really sloppy code. Does using a MDB have any ramifications. Also won't people be able to manipulate this database?! They can't manipulate the registry since it is locked there is no CFregistry. Thanks, Neil - Original Message - From: "Arden Weiss" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, March 27, 2001 9:59 PM Subject: RE: Registry size. Time to move your client variables to ODBC source, etc... to avoid CrAsHiTiSe. ^ / \__ (@\___ / O /(_/ /_/ Whoof... 410-757-3487 -Original Message- From: Neil H. [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, March 27, 2001 7:47 PM To: CF-Talk Subject: Registry size. I noticed my registry is getting huge (128 megs) and that I increased it to 160 megs for space sakes but are the entries in there that I can remove from CF not collecting garbage? Thanks, Neil ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Numbers to Text
That's US, the "and" is sternly tought to be dropped in CA schools and I'd image so for other metric countries. -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: April 1, 2001 10:46 To: CF-Talk Subject: RE: Numbers to Text If you include the and it implies a decimal. 101.50 is one hundred one and fifty But if you're ignoring decimals, then the "and" is still required - therefore if you want the words for "101" it should still be "one hundred and one" Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: [Re: An ignorance question to the masters]
As it's your dev server I'd enable RDS and work through that. That way you can use Studio's full debugging, as well as having direct read/write to the files, the database view as reference, and quick preview w/in studio. RDS uses port 80 so there should be no firewall issues to worry about it. For easier db stuff you might want to telnet right into Oracle or grab some client tools. -Original Message- From: Julia Phu [mailto:[EMAIL PROTECTED]] Sent: April 1, 2001 13:35 To: CF-Talk Subject: Re: [Re: An ignorance question to the masters] Thank you, Brian. Julia "Brian Thornton" [EMAIL PROTECTED] wrote: I would either create a network share or a ftp directory to somewhere in your root. Use the files in Studio and upload / copy them to the network... - Original Message - From: "Julia Phu" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, March 31, 2001 10:06 PM Subject: An ignorance question to the masters Hi, I'm new to ColdFusion and yet have a stupid question. I have a development server which has IIS, Oracle8i, and CF Application Server installed. The CF Studio is installed on my laptop. My ignorance is how to do my work from my laptop and connect to the development server. Is this the right setup? Thanks in advance. Julia ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SELECT * Queries
The warning about wildcards (*) is due to users wanting specific fields yet returning a whole record b/c it's easier to type (which is a huge waste). If you truely do want every piece of information (and will continue to do so in the future ie. even if fields are added) then by all means that's what a wildcard is for. One thing to consider with large queries is the overhead of transmitting the statement itself, if you're getting a small record set with many fields (or a single record) your sql statement can be almost as large as the returned set. This is where stored procedures come in, Access doesn't support them but you can store the query server side and use it's views to mimic very basic sps. I never use Access if I have any choice in the matter, so for the exact syntax to do so you might want to check SWYNK out (http://www.swynk.com) whenver you have to do anything even remotely related to M$ it's a great place to start, so is MSDN (http://msdn.microsoft.com). Even with small queries executed thousands of times daily the transmission of the query can account for a large part of traffice. Without going into a lot of detail, other DBMSs (I use the term loosely in regards to Access ;) with varying degrees of sp support will also optimise/compile the query for added performance benefit. -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent: March 31, 2001 07:07 To: CF-Talk Subject: RE: SELECT * Queries On 3/31/01, Jonathan Lim penned: Hi Bud, My DBA told me that the * will mean more data has to be transferred from the DB server to your CF server. That's what slows it down. The DB time spent getting the data for * or for a specific field is negligable. We're working with DB2. I understand that if I only needed data for 10 out of 100 fields, then yes it would be quicker to name the fields. But what about when I need the entire record? I read from someone on here that CF had to do an extra call to the database or something. Like once to get the field names and then to query it. In answer to Luke, I'm using Access on this little app I'm building. -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Seeing who's logged in
/* in the Application.cfm */ // if user logging struct isn't there, make it so if (not isDefined('application.user')) { application.user = structNew() ; } // insert user's id and current time (for last access calcs) structInsert(application.user, session.uuid, now()) ; /* on the display page */ // run through all the users that are logged in for (u in application.user) { // if user's last access is older than their session timeout, remove them if (dateCompare(application.user[u], dateAdd('n', -20, now()), 'n') lt 1) { structDelete(application.user, u) ; // else they might still be logged in, show them as such }else{ writeOutput(u application.user[u]) ; } } This is only to illustrate the concept, you'll want to do some heavy editing before you use it: Locking, copying to local vars for display, etc. are all things to consider. I have no idea the number of users you expect, etc. so you'll have to decide if this is right for you. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: March 31, 2001 08:41 To: CF-Talk Subject: Re: Seeing who's logged in Not sure I fully understand - could you show me an example bit of code? I'm still not familiar with structures. Cheers Will Yep, using the application scope just set a var in a struct (their id as key, now() as value) then clean it up for all entries dateAdd('n', -session timeout, now()) and you'll have a pretty good idea of who's logged in (w/in the session timeout limit). Just make sure to lock the scope properly, you can also do this db in the client vars if you want. -Original Message- From: Yoshi Melrose [mailto:[EMAIL PROTECTED]] Sent: March 30, 2001 16:17 To: CF-Talk Subject: Re: Seeing who's logged in Wouldn't session variables work for this? That's what I've used in the past for anything that was sensitive to browser sessions. I know they're kinda flaky sometimes, which is why I try not to use them. Any other ideas? I'd like to know any other suggestions as well, sounds like something I could integrate into one of my own apps. - Original Message - From: "W Luke" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, March 30, 2001 5:29 PM Subject: Seeing who's logged in Hi, On one of my sites users log in, and client.email is set - for the members-only sections, it then checks to see if client.email is set and lets them in (or tells them to login) accordingly. How can I add a "Who's online" section..to display which users are currently logged in? Because even if the user closes their browser, won't their token/cfid still be in the Database and therefore they'll appear "online" even though they're not? Or have I lost the plot...(run out of Red Bull...coffee just doesn't do it...) Will -- [EMAIL PROTECTED] -=- www.lukrative.com Local-Advertising -=- www.localbounty.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Seeing who's logged in - but a question on application variab les between applications
Server scope, or name them all the same application -Original Message- From: Terry Bader [mailto:[EMAIL PROTECTED]] Sent: March 31, 2001 12:38 To: CF-Talk Subject: RE: Seeing who's logged in - but a question on application variab les between applications is it possible to read variables from one application from another... lets say you had an administrator page that was separate from the main site, thusly a separate application name, but you wanted to see who was on... could you actually read the mainsite.appliaction.user struct from the admin site?? so far, i have used 5-10 min cached database queries to do this... but wonder about the above... could have other value as well... Terry Bader IT/Web Specialist EDO Corp - Combat Systems (757) 424-1004 ext 361 - Work [EMAIL PROTECTED] (757)581-5981 - Mobile [EMAIL PROTECTED] icq: 5202487 aim: lv2bounce http://www.cs.odu.edu/~bader -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 31, 2001 2:03 PM To: CF-Talk Subject: RE: Seeing who's logged in /* in the Application.cfm */ // if user logging struct isn't there, make it so if (not isDefined('application.user')) { application.user = structNew() ; } // insert user's id and current time (for last access calcs) structInsert(application.user, session.uuid, now()) ; /* on the display page */ // run through all the users that are logged in for (u in application.user) { // if user's last access is older than their session timeout, remove them if (dateCompare(application.user[u], dateAdd('n', -20, now()), 'n') lt 1) { structDelete(application.user, u) ; // else they might still be logged in, show them as such }else{ writeOutput(u application.user[u]) ; } } This is only to illustrate the concept, you'll want to do some heavy editing before you use it: Locking, copying to local vars for display, etc. are all things to consider. I have no idea the number of users you expect, etc. so you'll have to decide if this is right for you. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: March 31, 2001 08:41 To: CF-Talk Subject: Re: Seeing who's logged in Not sure I fully understand - could you show me an example bit of code? I'm still not familiar with structures. Cheers Will Yep, using the application scope just set a var in a struct (their id as key, now() as value) then clean it up for all entries dateAdd('n', -session timeout, now()) and you'll have a pretty good idea of who's logged in (w/in the session timeout limit). Just make sure to lock the scope properly, you can also do this db in the client vars if you want. -Original Message- From: Yoshi Melrose [mailto:[EMAIL PROTECTED]] Sent: March 30, 2001 16:17 To: CF-Talk Subject: Re: Seeing who's logged in Wouldn't session variables work for this? That's what I've used in the past for anything that was sensitive to browser sessions. I know they're kinda flaky sometimes, which is why I try not to use them. Any other ideas? I'd like to know any other suggestions as well, sounds like something I could integrate into one of my own apps. - Original Message - From: "W Luke" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, March 30, 2001 5:29 PM Subject: Seeing who's logged in Hi, On one of my sites users log in, and client.email is set - for the members-only sections, it then checks to see if client.email is set and lets them in (or tells them to login) accordingly. How can I add a "Who's online" section..to display which users are currently logged in? Because even if the user closes their browser, won't their token/cfid still be in the Database and therefore they'll appear "online" even though they're not? Or have I lost the plot...(run out of Red Bull...coffee just doesn't do it...) Will -- [EMAIL PROTECTED] -=- www.lukrative.com Local-Advertising -=- www.localbounty.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Back-referencing after a REFind to set a variable?
Heh, you're not going to get anything so nice as Perl string handling. cfscript str = "foo123bar" ; found = reFind("foo([[:digit:]]+)bar", str, 1, true) ; sub_str = mid(str, found.pos[2], found.len[2]) ; /cfscript The last argument of the reFind() is 'return sub expressions', in this case it's true. When true, the var 'found' is a struct containing two arrays: POS is a return of all the starting positions of the expression (1 is full string match), and LEN is an array of lenghts of the substrings matching the POS. Backreferencing is avail. in reReplace() though for when you want to replace substrings. -Original Message- From: Jamie Jackson [mailto:[EMAIL PROTECTED]] Sent: March 30, 2001 11:50 To: CF-Talk Subject: Back-referencing after a REFind to set a variable? Hi, Is there a way to do this sort of thing? cfscript REFind("(before)(HeresTheStringIWant)(after)", myTargetString); variables.foundstring = \2; /cfscript If not, what's the usual way to go about it? Seems like it could get pretty ugly if there isn't a similar way. Thanks, Jamie ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Seeing who's logged in
Yep, using the application scope just set a var in a struct (their id as key, now() as value) then clean it up for all entries dateAdd('n', -session timeout, now()) and you'll have a pretty good idea of who's logged in (w/in the session timeout limit). Just make sure to lock the scope properly, you can also do this db in the client vars if you want. -Original Message- From: Yoshi Melrose [mailto:[EMAIL PROTECTED]] Sent: March 30, 2001 16:17 To: CF-Talk Subject: Re: Seeing who's logged in Wouldn't session variables work for this? That's what I've used in the past for anything that was sensitive to browser sessions. I know they're kinda flaky sometimes, which is why I try not to use them. Any other ideas? I'd like to know any other suggestions as well, sounds like something I could integrate into one of my own apps. - Original Message - From: "W Luke" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, March 30, 2001 5:29 PM Subject: Seeing who's logged in Hi, On one of my sites users log in, and client.email is set - for the members-only sections, it then checks to see if client.email is set and lets them in (or tells them to login) accordingly. How can I add a "Who's online" section..to display which users are currently logged in? Because even if the user closes their browser, won't their token/cfid still be in the Database and therefore they'll appear "online" even though they're not? Or have I lost the plot...(run out of Red Bull...coffee just doesn't do it...) Will -- [EMAIL PROTECTED] -=- www.lukrative.com Local-Advertising -=- www.localbounty.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Why the long processing time on queries ?
Shouldn't be doing that given an okay db structure, but try these: - specify all the fields you wish to retrieve instead of * - if PartNumber isn't the primary key make sure it has a unique index (I'll assume it's a numeric field) - remove the space from behind the first id -Original Message- From: Tracy Bost [mailto:[EMAIL PROTECTED]] Sent: March 29, 2001 14:06 To: CF-Talk Subject: Why the long processing time on queries ? I know this isn't SQL list but can someone please tell me why it could be taking ColdFusion Server soo long to process these two queries ?? ... Other queries to the same database server seem to be processing just fine. But these two queries together are taking almost 20 seconds for the CF server to process them getprodleft (Records=3, Time=8612ms) SQL = SELECT * FROM Products WHERE PartNumber IN (6956122 ,6820898,6802862) getprodright (Records=3, Time=8793ms) SQL = SELECT * FROM Products WHERE PartNumber IN (6820088 ,6390009,6849111) ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Code snippet - random password generator
Why define the alphabet? Just use decimal values for the asci char set. pass = "" ; for (c=1; c le 7; c=c+1) { pass = pass chr(randRange(65,90)) ; } pass = pass randRange(1000,) ; That will do the exact same thing as below much more efficiently, if you want case sensitive or nums mixed w/ chars it's just a couple extra rangRanges()s (you can get creative and generate one of each class then randRange(1,3) to choose which per digit). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: March 29, 2001 17:10 To: CF-Talk Subject: Code snippet - random password generator This script generates a random word 7 letters long plus 4 digits long. Example code: cfset random_word = "" cfloop index="ii" from="1" to="7" cfset random_number = "#RandRange(1,26)#" cfset alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" cfset random_letter = "#Mid(alphabet,random_number,1)#" cfset random_word = "#ListAppend(random_word,random_letter)#" /cfloop cfset random_word = "#Replace(random_word, ",", "", "ALL")#" cfset random_number = "#RandRange(1000,)#" cfset password = "#random_word##random_number#" cfoutputPASSWORD: b#password#/b/cfoutput ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: truncation problems
1. urlEncodedFormat() 2. It's not CF it's you :) First off it could be the db field only allows x chars ie. varchar(20) will store 20 max chars. Secondly, depending on how you display the info (and where) the " is a sting start/end char so could be ending the string in a tag (so only the first part shows). Knowing that either experiment w/ handling, escape chars, and the various string handling functions or read some basic programming references. -Original Message- From: Michael Gribbin [mailto:[EMAIL PROTECTED]] Sent: March 24, 2001 02:02 To: CF-Talk Subject: truncation problems Hi, I've been unable to find the way to stop "truncation" in CF. I do it in other programming languages but need to find how to do it in CF. 1. To pass information in the URL that has spaces in it. Such as "Somepage.cfm?category=big beach balls". I need a way to fill the spaces with "%20's". 2. When appending to, or updating a record in a database with information that has spaces, quotes, questionmarks, etc. The textarea/textarea input doesn't seem to have a problem, only the text type="text". I put big red blue beach balls into the database and all that getback is big red. Or I put Floor Jars (over 20" high) and all I get back is Floor Jars (over 2O . Thanks in advance, Michael Gribbin Digital Marketing Alliance ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Hostcentric concerns?
Yeah, but they have more security holes than a old fishing net. On most servers the user "Everyone" is given full read access to all accounts instead of the IIS anon user, your home dir isn't below the web root, etc. So you and the other 200+ people on that server can all access each others datasources and files w/ no problems (passwords don't help as you can just read them in the connect strings in the scripts or dsn entires). If you have any data or code you don't want to share w/ everyone I wouldn't consider them. -Original Message- From: Michael [mailto:[EMAIL PROTECTED]] Sent: March 14, 2001 15:50 To: CF-Talk Subject: Re: Hostcentric concerns? www.crystaltech.com more for your money At least look into it. 24/7 support with a human NOT email Later Michael "Jeff Epstein" [EMAIL PROTECTED] wrote in message B12BD3A8177BD3118E1E00805F2916795F91B4@SCGPDC1">news:B12BD3A8177BD3118E1E00805F2916795F91B4@SCGPDC1... We originally set up on Virtualscape, but ever since Hostcentric took over Virtualscape, I've noticed a decline in performance and service. More db errors, fewer answers, longer hold times on the phone, less knowledgable techs on the phone. Has anyone else had the same experience? Is this normal? Jeff Epstein Web Producer Search for Common Ground 1601 Connecticut Avenue, NW Suite 200 Washington, DC 20009 USA +1 (202) 265-4300 +1 (202) 777-2238 (direct) +1 (202) 232-6718 (fax) [EMAIL PROTECTED] www.sfcg.org http://www.sfcg.org/ ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Finding the CF Administrator password
Go to the CF Admin, under 'Basic Security' is a list of tags you can disable. That's of course just the first step towards securing the server. If you're running a shared environ make sure to grab the Allaire path to disable the CF Admin undocumented tags/functions as you can do all sorts of fun stuff w/ them. There are of course thousands of other things to be done, so have fun. Just a note on template encrypting: It's scarcly worth it as the server obviously needs a fixed key (as shown below) to make it portable and has to be an easy scheme to make the template run w/o much decryption overhead. Anyone w/ even basic knowledge of DES encryption and programming can sit down and reverse engineer the simplistic algorythm used. The proliferation of decryption binaries and the original key phrase now (I hadn't actual seen that before) makes it a waste of server resources. -Original Message- From: John Fix 3rd [mailto:[EMAIL PROTECTED]] Sent: March 10, 2001 07:57 To: CF-Talk Subject: RE: Finding the CF Administrator password How does one disable CFRegistry? Thanks! John -Original Message- From: CF [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 10, 2001 10:48 AM To: CF-Talk Subject: Re: Finding the CF Administrator password Yeah .. someone sent me the key a little earlier and it worked like a charm. Actually, this other peson also showed me how to find the key to begin with ... it's amazingly simple. I don't see why you should be flamed .. people should not have CFRegistry active on a machine where they wouldn't want people getting in and doing stuff like this anyway. This is just another great example of why ;) Todd Ashworth Web Application Developer Network Administrator Saber Corporation 314 Oakland Ave. Rock Hill, SC 29730 (803) 327-0137 [111] (p) (803) 328-2868 (f) - Original Message - From: "Dain Anderson" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, March 10, 2001 12:07 AM Subject: Re: Finding the CF Administrator password Todd, It's very easy to retrieve the admin password, and I'm sure I will get flamed for showing this, but what the hell: CFSET CFKey = "4p0L@r1$" CFREGISTRY ACTION=GET Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Se rver " Entry="AdminPassword" Variable="AdminPassword" CFOUTPUT Registry Password: #CFusion_Decrypt(AdminPassword, CFKey)# /CFOUTPUT The key to decrypt it spells "4 Polaris" (Allaire inside joke?) -- this isn't my doing; rather, I was sent this from an anonymous source via the [EMAIL PROTECTED] address. I hope this will show Allaire and ISPs that there is a need for encryption, not encoding, for things such as this. I am against template encryption personally, but the administrator feature should have much better security. We live and learn, strive and yearn. Dain Anderson Caretaker, CF Comet http://www.cfcomet.com/ ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: faster count
SELECTast, count(ast) AS counter FROM wweb WHERE ast IN ('ASTIndex', 'ASTAI', 'ASTft') GROUP BY ast You're using LIKE improperly here as it's useless w/o a wildcard (%) char; just use = if you want a direct match. If you do need the wildcard use a ast LIKE '%foo%' OR ast LIKE '%bar' instead of the IN(). -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED]] Sent: January 31, 2001 16:53 To: CF-Talk Subject: faster count Hello, I have an Access table that I need to get a count for a specific value in each column. The coding below does the trick (on one column), but is too slow since I have numerous columns. I'm kinda a newbie on this so I was wondering is there away to make the count quicker by combining some of the coding? Thanks in advance. Robert O. HWWADMIN cfquery name="Getastindex" datasource="wweb" Select Count(ast) AS ast_count FROM wweb Where ast like 'ASTindex' /cfquery cfquery name="Getastai" datasource="wweb" Select Count(ast) AS astai_count FROM wweb Where ast like 'ASTAI' /cfquery cfquery name="Getastft" datasource="wweb" Select Count(ast) AS astft_count FROM wweb Where ast like 'ASTft' /cfquery ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Progress bar
Expedia uses the IE specific document.readyState and a timer calling the function (Javascript). Both the initial search criteria and the "Please wait" section are on the same page. When you begin the search it hides the one part and displays the "Please wait" part. A timer is started and it periodically changes the image (for the "status bar" look) and checks the document.readyState of the loading page. When the document.readyState == 'completed' it switches over to it. It's not technically a progress bar as much as a "Please wait" page, the movement of the image is in no way tied into how far along the search is. HTML overall isn't well suited to the task, the basic premise of HTML stops any server involvement once the page is sent. Java applets, Flash, or anything else that can either maintain a persistant connection to the server or change content without a page reload are much more suited; these of course have their own drawbacks. I can think of a few work arounds that are a bit more cross-browser compliant but none of them are pretty. -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: January 31, 2001 18:00 To: CF-Talk Subject: Progress bar Has anyone here implemented a progress bar. Similar to what happens on expedia when searching for travel information. What is the key to this with a web based app? Thanks, John Anderson ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Random letter/number value
cfscript digits = arrayNew(1) ; passwd = "" ; /* fill passwd i digits long w/ random selection of number, uppercase, or lowercase characters */ for (i=1; i le 8; i=i+1) { digits[1] = chr(randRange(48, 57)) ; digits[2] = chr(randRange(65, 90)) ; digits[3] = chr(randRange(97, 122)) ; passwd = passwd digits[randRange(1, 3)] ; } cfscript If you're not case sensitive feel free to remove digits[3] and change the last randRange() to reflect it. -Original Message- From: Peter Benoit [mailto:[EMAIL PROTECTED]] Sent: January 31, 2001 10:56 To: CF-Talk Subject: Random letter/number value Hi, I'd like to produce a random letter/number value for a password field, could be around 8 characters I suppose. Can I get help with this please? Thanks, Peter ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Windows 2000 Professional and CF Server 4.0.1
Well, I'm not much of an win person... but doesn't the installer keep a log of all system changes made? I mean, an installer can't do anything you can't do by hand. Try exporting the applicable registry tree from the NT4 system, copying any dlls required into the system directory on the 2k system, then do a straight file copy (if you need to make any reg changes for differing drives do so). I'm not sure exactly what's changed between the NT versions that would effect CF, but the system libraries may be newer and slightly (or completely) incompatible versions that effect the functionality of certain tags. If your time and lack of newer features is worth the money you might save, might as well give it a try. -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: January 31, 2001 14:12 To: CF-Talk Subject: Re: Windows 2000 Professional and CF Server 4.0.1 Zac, Thanks. Afraid I'd much rather install any Windows OS clean rather than upgrading, which is another set of headaches. For a new server, of course, it's also twice as fast. I wonder what it would take to get CF 4.0.1 to install directly into Win2k. Jim - Original Message - From: "Zachary Bedell" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 11:45 AM Subject: RE: Windows 2000 Professional and CF Server 4.0.1 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 4.0.1 works great provided it was there before Win2k. If you do NT4, CF, then upgrade to Win2k, you should be okay. Basically 4.0.1 works fine under 2k, but the installer is brain dead. Rather than patch the installer, Allaire would rather you run out spend on their new version. Big surprise... I've got a machine running 4.0.1 w/ Win2k Server w/ no problems what so ever. Best regards, Zac Bedell -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 12:38 PM To: CF-Talk Subject: Re: Windows 2000 Professional and CF Server 4.0.1 - Original Message - From: "Aidan Whitehall" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 7:09 AM Subject: RE: Windows 2000 Professional and CF Server 4.0.1 Allaire does not support anything less than cf4.5 on a WIN2K box. OK, thanks. I'd still be interested in whether anyone's got a stable workaround. In general, Allaire support isn't something I use. I'm warming up to Windows 2000 - Windows 2000 Pro on workstations is great - now we're getting ready to take the plunge with our servers. CF 4.5, however, is something I don't need. I've still got it in a shrink-wrapped box from when we had a subscription. Way too many issues for me to want to deal with it. Jim ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CREATE COLUMN
ALTER TABLE tablename ADD (fieldname datatype() [other keywords]); Exactly what you can do w/ the ALTER TABLE ADD|DROP|MODIFY statement is highly dbms specific, but generally all support adding a single field per statement. For the exact restrictions your dbms places on a this statement (especially MODIFY when effecting a key or simply indexed field) consult your manual. -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: January 30, 2001 14:13 To: CF-Talk Subject: CREATE COLUMN hey yall, how do i make a co9lumn in an existing table and specify dataype and length and stuff ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sunrise/Sunset
http://www.srrb.noaa.gov/highlights/sunrise/gen.html These guys hava a fully JS version. Here's the disclaimer: NOTE: Algorithm used is an approximation. Times may contain errors of +/- 2 minutes or more. For latitudes greater than 72 degrees N and S, calculations have not been confirmed by official sunrise/sunset data. I'm sure I've seen a C/C++ version somewhere as well as a Perl script. Look around, the perl especially should be easy to port over (or just access directly). -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED]] Sent: January 30, 2001 14:45 To: CF-Talk Subject: Re: Sunrise/Sunset Got the tag and it seems to work well (one or two small bugs in the tag). One problem, however, is that in order to specify the times in local time you must know the timezone (the offset from Universal Time) for the location you're doing the calculation for. I need to use the tag for many arbitrary locations around the country. So, probably an even greater request: Anyone know of a means of looking up time zone information for a given latitude and longitude? This is a longshot, I realize. I'd also have to know whether the particular location observes daylight savings time. Jim - Original Message - From: "Paul Hastings" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, January 30, 2001 12:11 PM Subject: Re: Sunrise/Sunset a moon phase tag woulb be neat as well! well lets start with the sunrise: http://devex.allaire.com/developer/gallery/info.cfm?ID=C7984B5B-84C5-11D4-AA A700508B94F380method=Full ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCKS ??? (Nesting)
There's lots of documentation on nesting locks and locking best practices (albeit not allways overly clear). http://www.allaire.com/handlers/index.cfm?ID=17318Method=Full http://www.allaire.com/handlers/index.cfm?ID=17196Method=Full http://www.allaire.com/cfdocs/Developing_Web_Applications_with_ColdFusion/12 _Using_the_Application_Framework/dwa12_14.htm http://www.allaire.com/cfdocs/CFML_Language_Reference/2_ColdFusion_Tags/lr2_ 058.htm http://www.allaire.com/cfdocs/Administering_ColdFusion_Server/03_Configuring _ColdFusion_Server/admin0312.htm If you have a specific situation that's you're not sure of the logic, post it and I'm sure the group can answer it. -Original Message- From: Joseph Eugene [mailto:[EMAIL PROTECTED]] Sent: January 28, 2001 18:10 To: CF-Talk Subject: CFLOCKS ??? (Nesting) Hi All, It has been recomended to cflock all Application and Session variables to avoid Deadlocking, Session cross overs etc. There is a utlility "Full Checking" in variables of CF admin you can turn on for testing purposes. When you have complicated Application files nesting over Session and Application varibles, how would one cflock such a situation?. I wish there was more documentation in CFLocks. Appretiate all help. Thanks Joe ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Web Chat using CF?
For this type of interaction a java applet is the best way to go. CF is server side parser, to use it as a chat interface would require constant posting and reloading of a page... not exactly ideal. There are a whole bunch of commercial 'live rep' chat applets available and some free ones as well. http://www.humanclick.com/ -- Popular one (though I'm not overly fond of it myself) I can't find my other bookmarks for it, but a few searches should yield some good results. For some nice GPLed ones check on SourceForge. Which you go w/ will obviously be affected by your features wanted, chosen platform (for server side component if not run in jvm), db interface, etc. As a note: I'd remove any thought of using NetMeeting or anything else platform specific; as well as the customer actually having to have it (and the OS to run it), know they have it, open it up, and enter in the ip. -Original Message- From: Phil Palmer [mailto:[EMAIL PROTECTED]] Sent: January 28, 2001 20:29 To: CF-Talk Subject: Web Chat using CF? This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --_=_NextPart_001_01C08992.D7408AF0 Content-Type: text/plain; charset="iso-8859-1" Dear all I am looking for a 'web chat' facility which I can use on our web page such that people can contact us via our web page and chat with a rep rather than phoning. I know that one could do this with M$ Net Meeting but I would like to use CF or a java applet perhaps that doesnt require you to have Net Meeting installed. Is anyone aware of a CF based approach to this?? Regards Phil Palmer --_=_NextPart_001_01C08992.D7408AF0 Content-Type: text/html; charset="iso-8859-1" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1" META content="MSHTML 5.00.2314.1000" name=GENERATOR/HEAD BODY DIVFONT face=Arial size=2SPAN class=862372201-29012001Dear all/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001/SPAN/FONTnbsp;/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001I am looking for a 'web chat' facility which I can use on our web page/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001such that people can contact us via our web page and chat with a rep/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001rather than phoning.nbsp; I know that one could do this with M$ Net Meeting/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001but I would like to use CF or a java applet perhaps that doesnt require/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001you to have Net Meeting installed./SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001/SPAN/FONTnbsp;/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001Is anyone aware of a CF based approach to this??/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001/SPAN/FONTnbsp;/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001Regards/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001/SPAN/FONTnbsp;/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001Phil Palmer/SPAN/FONT/DIV DIVFONT face=Arial size=2SPAN class=862372201-29012001/SPAN/FONTnbsp;/DIV/BODY/HTML --_=_NextPart_001_01C08992.D7408AF0-- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFSCRIPT performance
CFSCRIPT gains about a 10% performance advantage (I wish I still had the source for this number, but I can't seem to find it anymore... it was a good article) and generally cleaner code if you're doing a lot of page logic; obviously it loses out on the ease of screen display to tag based though. "The problem I have with CFSCRIPT and if() is that there is no elseif()..." Actually there is, just use 'else if (expr)' with a space. The above comment is in the right vein though, CFSCRIPT just isn't very powerful. In going w/ the tag based for display they seem to have left out anything more than a meek gesture towards scripting. It's missing many tags that would be beneficial, such as; cflock, cfthrow, etc. As well, common short form syntax like 'var = (expr) ? true : false ;' or simple operators like ++, --, +=, etc. (x=x+1 gets rather annoying :) are missing. Overall though, if you're doing more than three or four lines of non-display coding, you might want to switch over to cfscript for speed and easier reading. And if you plan to work w/ objects or complex structures staying tag based is for the masochists. ;P -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: January 27, 2001 11:07 To: CF-Talk Subject: RE: CFSCRIPT performance I have a question on CFSCRIPT performance. I know that it is quicker to use CFSCRIPT than to use CFSET. Is it likewise quicker to use the CFSCRIPT if() over CFIF? I have a CFIF checking that one of 14 empressions are met (13 ORs). Would it be better to use CFSCRIPT for this? This is for the security on a web site, so it needs to be efficient. CFScript is more efficient as long as you aren't just doing just a couple CFSET or CFIF The problem I have with CFSCRIPT and if() is that there is no elseif(), you have to embed things in the else part of the code, which gets very deep if you want to check loads of variations (and can't use switch, such as ranges) CF4.5.2 has faster looping in CFSCRIPT than in CFML, so that's an advantage Also, as Robert pointed out, no white-space! Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: The real distance formula
Well, it's been quite a while since I last delved into GIS and trig but here goes. The earth does not lend itself well to simple calculations, all the below (except the last) assume a spherical earth and ignore any diffences in the terrain, elevation, roadways, etc. That said, let's look at some formulas. The formula given in the previous post [below] is a VERY UNRELIABLE way to calculate distances (and the last lat_A, lat_B should be longitude). It's based on the law of cosines for spherical trigonometry: Mathmatically it's all there but for small distances the inverse cosine gives huge room for roundoff error. In short there are much better solutions. The haversine formula is probably most used. latd = lat1 - lat2 ; lond = lon1 - lon2 ; a = (sin(latd/2)^2 + cos(lat1) * cos(lat2) * (sin(londd/2))^2 ; c = 2 * atan(sqr(a)/sqr(1-a)) ; R = 6367 ; d = R * c ; I broke the formula up into quit a few parts so you could better see what's happening: - 'land' and 'lond' are the differences in latitude and longitude respecitively - 'a' is the chord length between the points - 'R' is the accepted radius of the earth (spherical model) 6367km Feel free to make it all one line, just sub in for the variables. There are of course some caveats with this, as with any other equation. As stated before, the earth is assumed to be spherical: If your application requires greater accuracy you can vary R in respect to latitude using the eccentricity (0.08108) of the ellipsoid (earth), the equatorial radius (6379km), and the polar radius (6357km). I won't get into that, as I really don't remeber how it's done... my notes from school seem to indicate I was more interested in the brunette sitting infront of me in that class at that point... heh. Ohh.. and this equation doesn't deal well with antipodal points (ie. exact oposite side of the earth) seems it can be off by a few kilometers. If you're dealing with very local distances you might want to consider treating the earth as flat; it can actually yield more acurate results over short distances due to the assumed R. Again, not going to bother explaining this as I'm sure you can work out the math relatively easily for asimple polar coordinate system. Anyways, neat question... I've been meaning to brush up on my trig and this gave me an excuse. Later. -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: January 27, 2001 21:12 To: CF-Talk Subject: Re: The real distance formula That was me, who was asking But I'm glad you spoke up, because something I was wondering about the formulas that were being tossed around. Do they handle the fact that two sets of positions, with identical longitudes (east-west, right?) but different latitu des, would be a different distance? For example, two sets of positions - both the same longitude, but latitudes of several hundred miles difference - and two other positions, also the same longitude, and the same distance apart north-south as the other two. The northern set of positions would be a shorter distance apart than the southern set... does the formula deal with that? --Scott - Original Message - From: "Dylan Bromby" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, January 27, 2001 4:36 PM Subject: The real distance formula A week or more ago, someone posted a formula for calculating the distance between two points using latitude/longitude. I think the formula as incorrect. However, here is one that works perfectly; #Evaluate(((pi()*6378)/180)*(ACos((Sin(lat_A)*Sin(lat_B)) + (Cos(lat_A)*Cos(lat_B)*Cos(lat_A-lat_B)# This yields distance in KM. If you want miles, do the calculation after the fact, or change the value of 6378 - the earth's radius in KM - to a value in miles. --Dylan ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: . in urls
I'm not big into IIS, but in the mappings section there's a "check if file exists" checkbox. If this was checked for .cfm (for giving custom 404 in IIS for CF is the standard use I think) would this then effect a url that had ..cfm first in it? You might try unchecking it and seeing if it works. I don't deal enough w/ IIS to be sure. -Original Message- From: Michel Vuijlsteke [mailto:[EMAIL PROTECTED]] Sent: January 25, 2001 07:47 To: CF-Talk Subject: "." in urls My IIS insists on turning http://servername/index.cfm?art=MFW4.0 into a request for the file with name "MFW4" and extension ".0". There's probably something stupid I'm overlooking, but what? Any help appreciated, Michel Vuijlsteke ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF Studio 4.0.1 - displaying .cfm files through RDS
Did you accidentally use a filter? In the RDS view far click on the pane to bring up the context menu, select 'Filter', then 'All Files'. Most likely you are currently only browsing 'Web Images'. -Original Message- From: Smith, Melanie [mailto:[EMAIL PROTECTED]] Sent: January 25, 2001 12:26 To: CF-Talk Subject: CF Studio 4.0.1 - displaying .cfm files through RDS For some reason I can't see my .cfm files anymore through the RDS tab - the folders are there the files are just not visible, even after a right click and a refresh. It's happening when trying to look at files on more than one server so it is likely some sort of studio problem. I can't seem to find any option under settings, etc. that might have been changed to filter these out of the display. I can see all my .gif, .jpg files fine. HELP! I checked the Allaire forum and it looks like others have seen the problem but no one answered the questions. thanks in advance, Melanie ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Photo gallery custom tag?
Yeah, there's a CFX for win32 systems on the dev exchange. I've used the old cfx_image tag which this one is based off of, but haven't used this one much: I think it's what you're looking for though. "AutoResize uploads an image file and resizes it to a specified width. It also dynamically creates a thumbnail of a specified size." http://devex.allaire.com/developer/gallery/info.cfm?ID=CA3475C6-2830-11D4-AA 9700508B94F380method=Full http://www.cfdev.com/products/productdetail.cfm?id=6 -Original Message- From: Chris Montgomery [mailto:[EMAIL PROTECTED]] Sent: January 25, 2001 11:59 To: CF-Talk Subject: RE: Photo gallery custom tag? I have the exact same need, but my question relates to dynamically generating thumbnail images from the full-sized image files. Anyone know if there is a custom tag that can do this? Thanks, Chris Montgomery [EMAIL PROTECTED] Web Development Consulting http://www.astutia.com Allaire Consulting Partner 210-490-3249/888-745-7603Fax 210-490-4692 AIM: astutiaweb; ICQ: 7381282; Firetalk: Ag78 -Original Message- From: Maia, Eric [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 1:07 PM To: CF-Talk Subject: Photo gallery custom tag? Has anyone seen, or written, a tag to provide a "photo gallery" type interface that allows visitors to browse pages of thumbnails, then go to a detail page to view the full-size photo? This seems very basic, but I can't find one in the developer's exchange. I can probably write this pretty quickly, but I'm hoping I can save the effort, since it must have been done many times before. Thanks - Eric ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL Create Table
Depends on your dbms what the datatype is called, if I remember correctly you were using M$ SQL Server, which uses the BIT datatype. You might want to check out the T-SQL reference on MSDN. http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/sql/tsqlcon. htm You might want to consider printing off a chart of the datatype names for some of the popular dbms'. I find this help speed the process quite a bit when working w/ a dbms you don't have much experience in (as you can refference against one you do). -Original Message- From: Owens, Howard [mailto:[EMAIL PROTECTED]] Sent: January 25, 2001 14:57 To: CF-Talk Subject: RE: SQL Create Table So, I still don't know how to create a boolean column H. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: array length of a dimension?
CF doesn't have fixed dimension arrays like some other languages. So the best you can do is find the length of the first dimension, then you have to do each index individually to find the exact length of all the items in the second dimension. -Original Message- From: Rick Lamb [mailto:[EMAIL PROTECTED]] Sent: January 25, 2001 14:20 To: CF-Talk Subject: array length of a dimension? I need to find the arraylen of a 2 dimensional array. Can somebody recommend a technique to do this? Thanks, Rick ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: BEST Reccomendations for CF Hosting
Crystaltech's shared hosting is attrocious for security though. Your web root is the same as your base dir, and the NT everyone user is given read to all accounts (on most of their server). This means you if you have any sensitive data stored, you're sharing it w/ the other 200+ users on the same server as you (along w/ all your code). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: January 24, 2001 12:33 To: CF-Talk Subject: Re: BEST Reccomendations for CF Hosting If you go to the cfdj list you will find some very interesting information. Seems like a lot of people like CrystalTech. John On Wed, 24 January 2001, "Michael" wrote: Any opinions on Hosting firms for CF 4.5 not alot of HD space just something simple. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: restarting cf server
At the command prompt type "at /?". There's some GUI way to do it as well, I think that would either be in the control panel or in the management console. CF also has a cycle.bat for win32 systems (located somewhere under the CF Server root); all this batch file does is setup a bunch of NET STOP "service name" and NET START "service name" commands w/ using the "at" command mentioned above to run at ~ 2:00 every day. --- anyone know how to make a scheduled task to restart cfserver on a win 2000 box? we have one that keep puking on us and are about to replace the box (new ones came in today) but are looking for a duct tape type fix for the short term until we can switch it out. kirk ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK for 4.0.1 AND 4.5.1
The scope="" is optional as you can use the same locking syntax as in 4.0, ie. named locks (scope and name are mutually exclusive though, so don't try both). I'm running 4.5.2 ENT (and a 4.5 Pro) (so if it's a 4.5.1 bug I wouldn't know) w/ strict attribute validation and it's working fine. I don't think Allaire would cut their own throats by being that backwards incompatible; I mean they provide deprecated functions like parameterExists() still, which is a pre 4.x function. So a cflock like this: cflock name="foobar" timeout="5" Should work the exact same in CF4.0x and 4.5.x, if it isn't I think I'd contact Allaire on the issue. Hope it helps, Raymond B. Hrmm... interesting if it is something wrong w/ 4.5.1, as that could pose some problems w/ quite a few commercial apps. -Original Message- From: Gene Kraybill [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 17:31 To: CF-Talk Subject: CFLOCK for 4.0.1 AND 4.5.1 I'm struggling with implementing CFLOCK so it runs on BOTH CF 4.0.1 and 4.5.1. (The 4.5.1 server has FULL CHECKING on.) Given that 4.0.1 FORBIDS the SCOPE parameter in CFLOCK and 4.5.1 REQUIRES it, I thought I'd do a check for which version of CF was running and stash the appropriate CFLOCK parameters into a local variable. For example, if CF 4.5.1 or better, I'd set the parameter var to be equal to 'SCOPE="Application" TYPE="Exclusive"', etc. So my CFLOCK would look like this: CFLOCK #VersionSpecificParameter# code... /CFLOCK But... CF throws an error on the pound sign, apparently not allowing the specification of parameters via variable. Any ideas besides repeating the entire CFLOCK block for each version? Gene Kraybill - Gene Kraybill LPW Associates LLC www.lpw.net ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Netscape error whilst IE is fine
Not exactly an answer, but... Instead of passing all the information in the url, you might instead want to only pass a unique identifier. Then on the page in question, query the database based on the unique id for the information. http://www.accomodationsnewzealand.com/nzl/mkt/creditcardform?id=32453 A litte cleaner and perform the same function w/ db lookup. Alternately you could also you session/client vars to store some info. -Original Message- From: AustralianAccommodation.com Pty. Ltd. [mailto:[EMAIL PROTECTED]] Sent: January 23, 2001 05:51 To: CF-Talk Subject: Netscape error whilst IE is fine when I try and access this link on my site: http://www.accommodationnewzealand.com/nzl/mkt/creditcardform.cfm?businessna me=Shalimaresaddress1=9%20Shalimar%20Crescentsuburb=Khandallahisland=Nort h%20Islandpostcode=telephonenumber=64%204%20479%201776faxnumber=64%204%20 479%201786[EMAIL PROTECTED] using ie it displays fine when I use Netscape I receive the error: The parameter is incorrect. any ideas as to why this would occur in Netscape and work fine in ie ?? Kind Regards Claude Raiola (Director) AustralianAccommodation.com Pty. Ltd. Email: [EMAIL PROTECTED] Developers Of: Website: www.AustralianAccommodation.com Website: www.AccommodationNewZealand.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Netscape error whilst IE is fine
? I was under the impression the info being passed was the property to be rented/leased etc. not client info (which was being entered next page). If it was client info, then by all means don't do it the way I suggested; and don't pass it clear text in url either as that's almost as bad. SSL for anything sensitive. -Original Message- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: January 23, 2001 07:00 To: CF-Talk Subject: RE: Netscape error whilst IE is fine Not exactly an answer, but... Instead of passing all the information in the url, you might instead want to only pass a unique identifier. Then on the page in question, query the database based on the unique id for the information. http://www.accomodationsnewzealand.com/nzl/mkt/creditcardform?id=32453 A litte cleaner and perform the same function w/ db lookup. Alternately you could also you session/client vars to store some info. If you're thinking of doing it this way, NEVER (ever) pass the real Identity as the ID - if you do people can play and pick other people's info out... Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133 "Websites for the real world" ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Adam, you got to be kidding?
I don't know about Adam, but you don't have to forfeit anything you mentioned: You develop w/ browser degradation in mind. So you don't use the img w/ an onclick, as it doesn't degrade (unless you use another option in addition) but the input can be used by all. Whenever you offer a fancy menu, you make sure it doesn't even show up in older browsers (unless it degrades well) and have a low profile text nav at the bottom of the page, etc. You don't have to forfeit client-side data validation at all, as if the browser doesn't have it enabled (as many embedded devices, etc.) it just isn't there to them... but the (figurative) 98% still get the benefits: and you add in server-side validation as well for those who don't (among other reasons). This of course partially depends on your target market, but the "screw those w/ old equipment or non-standard setup" mindset should be used w/ care. Now if you're doing some high profile game site, by all means go w/ only the coolest tricks as you know the platform and general computer specs of your market. But in the end, it doesn't take too much extra effort to make sure your site is accessable to a wider variety of people. /rant :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 08:15 To: CF-Talk Subject: Adam, you got to be kidding? You actually develop with the mindset that a user might not have scripting enabled? Ouch! My guess would be that at a minimum, 98% of all users have scripting enabled. So, you would forfeit the capability of client-side data validation, client-side DOM manipulation, etc.? You would add unneeded round trips to your server to accomplish scripting, validation, etc.? So 98% of your users will pay the Performance price for the 2% of your users? Not to mention the extra load on your server and the wasted bandwidth. Not a good idea ... Please! Bill Reichard Willow Gold [EMAIL PROTECTED] http://www.willowgold.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: ASP Code within CF Code? WAS (RE: retreiving datatypes)
Yes it looks a lot like ASP b/c it's using an ADO (ActiveX Data Object? - I never remember that TLA... it's a COM object by another name) which is what ASP commonly uses. So you are using the same object, and the syntax looks superficially similar... but it is very much CF: You could do the same tag based if you desired (though it would be much harder to read IMO). Bear in mind though that accessing dbs in this way is much slower in both dev time and execution time (in almost all cases) than using CFs native functions such as CFQUERY, CFSTOREDPROC, etc. I very rarely use M$ Access so if you have a better solution for retrieving field design info from that dbms (I use the term loosely) then I'm all ears (well... eyes). ;) So while it looks a lot like ASP, it is actually CFSCRIPT code. P.S. I'd also like to ask: When using an OLEDB connection to Access instead of ODBC there are certain functions you can perform b/c of the interface? I'm not much into the NT environ but, I've heard that Access dbs perform much better under an OLEDB connection and that there is a command set that's part of the interface? -Original Message- From: Warrick, Mark [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 22:13 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: ASP Code within CF Code? WAS (RE: retreiving datatypes) That looks an awful lot like ASP code. Are you saying it's possible to run ASP-like code within CF templates? ---mark -- Mark Warrick Phone: (714) 547-5386 Fax: (714) 972-2181 Personal Email: [EMAIL PROTECTED] Personal URL: http://www.warrick.net Business Email: [EMAIL PROTECTED] Business URL: http://www.fusioneers.com ICQ: 346566 -- -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 7:25 PM To: CF-Talk Subject: RE: retreiving datatypes Unlike most dbms's Access doesn't have the system tables that allow you to retrieve table and field info though SQL statements; to my knowledge (I avoid Access like the plague so there may be easier ways than what follows). Under win you can the ADODB.Connection class object and retrieve them this way (where dsn, username, pass are vars): cfscript // initalise the DB object and open a connection to the desired db dbo = createObject("COM", "ADODB.Connection") ; dbo.Open("DSN=" dsn, username, password, -1) ; // get schema (schema 4 is field info, 20 table info) recordset recordset = dbo.OpenSchema(4) ; // assign fields to "Fields" collection from returned schema fields = recordset.Fields ; ... The fields collection contains all the info you'll need, and can be accessed like this: table_name = fields.Item("TABLE_NAME") ; // display table current field belongs too writeOutput(table_name.value) ; Other valid fields in the schema recordset are; COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_FLAGS, etc. // move the cursor to the next record recordset.MoveNext() ; In the way above you can loop through all the data in the schema, to keep track of it all I'd suggest using a struct. This may lots more info than you need, but it's the only way I know to get datatypes and other design info from an Access table. Much, much, more difficult than simply querying the db as in other dbms's. -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 13:33 To: CF-Talk Subject: retreiving datatypes I know that I can build a list of column names in an Accrss table with the columnlist variable, but is there also a way I can do the same thing in order to retrieve the corresponding datatypes for all the fields in an Access table? Terry Troxel ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validate against a mask
You're not mistaken, it's quite far from PCREs. Generally you'll be using posix expressions instead of the \char notation; so \d becomes [[:digits:]], \w becomes [[:alpha:]], etc. Substrings are also quite different in the handling (read: not nearly so nice). If you're on a dedicated server there is a CFX tag for PCREs in CF that makes life so much easier for string parsing and data validation. (http://www.rixsoft.com/ColdFusion/CFX/PCRegEx/cfx_pcregex.html) Here's a link from the old CF4 manual: http://www.allaire.com/documents/cf4/Advanced_ColdFusion_Development/04_Regular_ Expressions/adv04.htm Also read the reFind(), and reReplace() reference carefully (not the clearest of tech writing I know): http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions/lr3 _200.htm http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions/lr3 _207.htm From the venerable Fig Leaf archives g: (only time I've ever seen back refferencing used properly in a tutorial on CF regexps) http://www.figleaf.com/figleafhome/cfug/CFUGDec99/regexp/ Print refferences: Ben Forta's "Advanced Web Application Development" by Que List of posix character classes: alnum - alpha-numeric characters alpha - alphabetic characters blank - tab and space cntrl - control characters digit - decimal digits graph - all printable characters except space lower - lower case letters print - "printable" characters punct - punctuation space - whitespace characters upper - upper case letters xdigit- hexidecimal digits All the standard control characters work w/in the mask, so ^ $ ? * {num,num} etc. Sub expressions (if you set return sub expressions to true) are returned as start postion and length in an array, and the mid() function has to be used to retrieve them. So for basic validation CF is okay, but complex string handling gets long and tricky compared to Perl (but nothing so annoying as string handling in C was). If you don't get the more advanced stuff (ie. back referencing, substring manipulation, etc.) from the docs, I can send over some production code examples that might help. -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 10:32 To: CF-Talk Subject: RE: Validate against a mask I also believe that I should use Regex, but I can't find any decent reference for it for CF. It seems to be quite different from Perl's regex. Am I mistaken? -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:38 PM To: CF-Talk Subject: RE: Validate against a mask Not sure if you've ever used regexps, but that is what you want. Check out reFind() and the other regexp functions. http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions /lr3_200.htm -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 17:20 To: CF-Talk Subject: Validate against a mask Is there a way to validate against a mask like lets say in MS Access. Is there a CF function that does this? Something like ConformsToMask("mm-dd-","01-17-2001") or ConformsToMask("###-###-","111-111-") Ruslan Sivak Technologist ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Questio\n
evaluate() is the function you want -Original Message- From: Kevin Schmidt [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 15:15 To: CF-Talk Subject: Questio\n Dave, Sorry to bother you but the list is down and I have a project to get done asap. I am stuck. I have a variable that contains a string with another variable name. I want to display the variable not the variable name when I display the first. IE cfset variable1 = "stuff" cfset variable2 = "variable1" CFOUTPUT #variable2# I want to see stuff instead of variable1 when I output variable 2. I have been through all the book I have and can't figure this one out. Is it possible. I though the evaluate function might work but no luck. Kevin Schmidt, Web Technology Manager Allaire Certified ColdFusion Developer pwb inc. integrated marketing communications 350 S. Main St., Suite 350 Ann Arbor, MI 48104 734.995.5000 (tel) 734.995.5002 (fax) www.pwb.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: dynamic form vars
I like using WDDX for multipart forms. You can easily serialise the entire form struct and pass it in a single hidden field (also means you're not relying on cookies or session vars). As long as every field name is unique across the multi-part form it's fast and easy. I stole a lot of this processing techinque from an article in CFDJ (Vol. 2 Issue 2 - Feb. 2000); while the article a little too gui/M$ infantile naming schemes for my taste (No offence to the author here at all, just a personal taste preference) some of its underlying principles are great. If you need it really quick and don't care much about code reuse for the moment, post directly to the second form in the series, serialise the data at the top of that form, and shove it in a hidden field. On the final page you'll then have to just WDDX the first pages results. Anyways, play w/ the concept it's very flexible and doesn't require things like cookies and sessions. -Original Message- From: Kay Smoljak [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 03:17 To: CF-Talk Subject: dynamic form vars Hi all, I'm not sure how to go about doing this. I have a dynamically generated form, which can have any number of radio buttons. I want to submit this form to a page with another form. Once this second form is submitted, I need to process all of the data from both forms on one page. What I'm not sure about is how I can store the values from the first form on the second form page. Normally I would put them in hidden fields, but it's a problem seeing as I don't know how many there will be or what they will be called. Any pointers? I'm sure it's something obvious but my brain appears to have stopped responding. Kay. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: M$ SQL equiv of Postgre's EXPLAIN
I know this is OT, but I figure there's some people pretty familiar w/ M$ SQL Server in here. I need to do some cost-based analysis on SQL Server queries, making sure it's properly using the indices, relative costs of each section, etc. I'd like an SQL command akin to Postgre's EXPLAIN for some manual tinkering. I've searched the MSDN T-SQL guide but can't seem to find anything. For those not familiar w/ Postgre's EXPLAIN, here's a sample output: EXPLAIN SELECT * FROMtable_name WHERE cid=1 AND uid=2 ORDER BYsort_date DESC; NOTICE: QUERY PLAN: Sort (cost=2.14..2.14 rows=1 width=10) - Index Scan using usr_in_cat on table (cost=0.00..2.02 rows=1 width=10) EXPLAIN Failing a command line return, if anyone knows of some free GUI utils (or reasonable price)? As you can tell I'm not overly familiar w/ SQL Server, so another info request: Are there any nice tools akin Oracle's Cost-Based Optimizer for it? Thanks, Raymond B. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Outer Join Question...
Not using outer join, but this will do the trick. SELECT DISTINCT g.groupname FROMgrouptable g WHERE g.groupID NOT IN ( SELECT m.groupID FROMgroupusertable m WHERE m.UserID = #userID# ) Not sure the the performance costs versus doing it through a join. -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 14:30 To: CF-Talk Subject: Outer Join Question... I'm stuck: The tables: grouptable (groupID, groupname) usertable (userID, otheruserinformation) groupusertable (groupID, userID) Given the userID, how do I get a list of groups that the user is not in? This will return all the groups that the user is in: SELECT DISTINCT grouptable.groupID, grouptable.groupname FROM grouptable LEFT OUTER JOIN groupusertable ON (grouptable.groupID = groupusertable.groupID) and (groupusertable.userID = #userID#) This will return all groups the user is not in, but some other user is: SELECT DISTINCT grouptable.groupID, grouptable.groupname FROM grouptable LEFT OUTER JOIN groupusertable ON (grouptable.groupID = groupusertable.groupID) and not (groupusertable.userID = #userID#) Any help, would be appreciated. Thanks -- Jeff Houser | mailto:[EMAIL PROTECTED] AIM: Reboog711 | ICQ: 5246969 | Phone: 860-229-2781 -- Instant ColdFusion 4.5 | ISBN: 0-07-213238-8 Due out 3rd Quarter 2001 -- DotComIt, LLC database driven web data using ColdFusion, Lotus Notes/Domino -- Half of the Alternative Folk Duo called Far Cry Fly http://www.farcryfly.com | http://www.mp3.com/FarCryFly -- Promise me no dead end streets, and I'll guarantee we'll have a road ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Outer Join Question...
If this is a double post I appologize, my mail server is acting up and I think it just cacked on the send queue again. Not using outer join, but this will do the trick. SELECT DISTINCT g.groupname FROMgrouptable g WHERE g.groupID NOT IN ( SELECT m.groupID FROMgroupusertable m WHERE m.UserID = #userID# ) Not sure the the performance costs versus doing it through a join. -Original Message- From: Jeffry Houser [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 14:30 To: CF-Talk Subject: Outer Join Question... I'm stuck: The tables: grouptable (groupID, groupname) usertable (userID, otheruserinformation) groupusertable (groupID, userID) Given the userID, how do I get a list of groups that the user is not in? This will return all the groups that the user is in: SELECT DISTINCT grouptable.groupID, grouptable.groupname FROM grouptable LEFT OUTER JOIN groupusertable ON (grouptable.groupID = groupusertable.groupID) and (groupusertable.userID = #userID#) This will return all groups the user is not in, but some other user is: SELECT DISTINCT grouptable.groupID, grouptable.groupname FROM grouptable LEFT OUTER JOIN groupusertable ON (grouptable.groupID = groupusertable.groupID) and not (groupusertable.userID = #userID#) Any help, would be appreciated. Thanks -- Jeff Houser | mailto:[EMAIL PROTECTED] AIM: Reboog711 | ICQ: 5246969 | Phone: 860-229-2781 -- Instant ColdFusion 4.5 | ISBN: 0-07-213238-8 Due out 3rd Quarter 2001 -- DotComIt, LLC database driven web data using ColdFusion, Lotus Notes/Domino -- Half of the Alternative Folk Duo called Far Cry Fly http://www.farcryfly.com | http://www.mp3.com/FarCryFly -- Promise me no dead end streets, and I'll guarantee we'll have a road ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sometimes I get so sick of CF being weak.... please help
It has to do w/ the fact CFSETTING effects parser processes the page; so it effects the entire page as a whole. "When nesting CFSETTING tags, you must match each ENABLECFOUTPUTONLY="Yes " setting with an ENABLECFOUTPUTONLY="No " setting for ordinary HTML text to be visible to a user. For example, if you have five ENABLECFOUTPUTONLY="Yes " statements, you must also have five corresponding ENABLECFOUTPUTONLY="No " statements for HTML text to be displayed again." (http://www.allaire.com/cfdocs/CFML_Language_Reference/2_ColdFusion_Tags/lr2 _089.htm) So no, it's not just a toggle that when you hit off it's off. It's more the same idea as start and end tags. Hope it helps, Raymond B. P.S. I feel your pain, CF is great but it's like working w/ 3 billion sticky abstraction layers between you and the control. -Original Message- From: Ryan [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 11:56 To: CF-Talk Subject: Sometimes I get so sick of CF being weak please help In one of my custom tags I need to turn on ENABLECFOUTPUTONLY because the result of this custom tag will be going inside PRE tags, so I can't have any extra white space come out of it. Now the page that uses this tag quit working, becuase the ENABLECFOUTPUTONLY is affecting the entire request. Doesn't it make sense that it would only affect the custom tag? Shouldn't that be a separate 'scope'? It is with variables, why does the cfsetting carry across? So anyway, I need to turn ENABLECFOUTPUTONLY back off at the end of the custom tag, I guess. But what if (later on in development) a page makes use of this tag, and that page already has ENABLECFOUTPUTONLY set to on? Then the tag will turn it on again, no problem there, but at the end of the tag it will set ENABLECFOUTPUTONLY to off, totally screwing up the page that calls it. Is there a way to detect ENABLECFOUTPUTONLY, so I don't need to flip it if I don't need to? I miss Perl... Thanks for any help. Ryan ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Single Quotes in SQL HELP PLEASE!
If it's in a var CF will auto escape it, if not manually escape it. '' is an escaped single quote for SQL. INSERT INTO MyTABLE(Stuff) VALUES () Would insert a single quote into the db. Same idea as using ## to get CF to display a # inside a CFOUTPUT. -Original Message- From: Phoeun Pha [mailto:[EMAIL PROTECTED]] Sent: January 22, 2001 11:59 To: CF-Talk Subject: Single Quotes in SQL HELP PLEASE! ok, I want to enter this character into a SQL table. ' but i get an error. how do I make it enter ' into the database? INSERT INTO MyTABLE(Stuff) VALUES = ''' ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Basic Search Engine
CF has ceiling(), int() [commonly called floor()], fix(), and round() for returning integer number (input upto to real set). cfset pages = ceiling(query.recordCount / max_rows) I'd suggest you read through the language reference a few times; this will familiarise you with CFs tags, functions, and general syntax. If you're new to programming or scripting in general you might want to read some programming logic books first. Hope this helps, Raymond B. BTW, nice Flash intro on your site. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: January 21, 2001 06:32 To: CF-Talk Subject: Re: Basic Search Engine Thanks for that - very informative. On the subject of finding out how many pages in the search results there are, does anyone have any tips? The furthest I've got is to do the following: Cfset nopages = (get_results.recordcount / max) This, for example, gives results of 0.4 and 2.5 - what I need to do then is round them up or down. Any ideas? Cheers, Will this is a very good article http://www.defusion.com/articles/index.cfm?ArticleID=81 At 08:59 pm 21/01/01 , you wrote: Hi, I'm building a basic search engine to query a table in my Database, and return 10 results at a time. At the moment I've got URL parameters of url.query and url.start_row and a variable #maxrows# set to 10 - if no inital start_row is defined, then the startrow is 1. I was wondering the best way to do the following "features" of a search engine. * When and how to display a "previous" link. What I mean by this is for the first 1-10 results, we don't need a "previous results" link. * How to determine number of pages in the search. E.g. if there are 48 results, and maxrows is set to 10, then there should be 4 pages. Any hints or tips appreciated. Will -- [EMAIL PROTECTED] -=- www.lukrative.com Classifieds -=- www.localbounty.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL syntax problem
INSERT INTO table (field1) VALUES ('#form.field1#') ; When you do this, CF should automatically escape all single quotes. The preserveSingleQuotes() function is generally only needed when passing full SQL statements as variables or inserting lists (generally already quoted). If you find for some reason this is not the case, you can use the replace() function to escape them manually. -Original Message- From: Nick Slay [mailto:[EMAIL PROTECTED]] Sent: January 21, 2001 20:38 To: CF-Talk Subject: Re: SQL syntax problem Hi, you can use a function called PreserveSingleQuotes before storing the information to the database. At least that's what I think it's for!!! :^) From: "Phoeun Pha" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Tue, 21 Nov 2000 19:31:42 -0600 To: CF-Talk [EMAIL PROTECTED] Subject: SQL syntax problem ok, i have a field where people type in the names of songs. The problem is, if the song title has an apostrophe in it, like "I'm comin' ova", i get an error. i think it's cuz SQL don't read dem apostrophes as text. how do i make the database accept them?!! ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Search engine done in CF!
No, you can programatically generate a collection using the cfcollection tag. It's the same idea as scheduling which can be done either in admin or w/ the cfschedule tag. I believe there are a few cases where you might need admin but I'm not overly fond of verity as it seem to give results that are about as relevant as ones obtained on alta vista :) (read: completely unrelated -- look up dog and get articles about fish in asia). There's a video dealing w/ Verity that should answer most of your questions at http://alive.allaire.com . If you're using verity to for full text searching in a db Oracle, M$ SQL Server, etc. have much more customisable and generally much faster capabilities. For generated page content being indexed, you might want to consider Google which, while it's a simple search in term of keywords, returns incredible results: Packages are rather expensive for small sites, but if you're content doesn't change too often the "site:www.domain.com keyword1 keyword2" style (free service allows certain logos too on the result set) works well. -Original Message- From: W Luke [mailto:[EMAIL PROTECTED]] Sent: January 20, 2001 18:53 To: CF-Talk Subject: Re: Search engine done in CF! I thought that coldfusion had a 'built in' search engine - verity.. Never had the need to use Verity, until now - but could someone confirm as to whether it requires Administrative access to create the collection? Will -- [EMAIL PROTECTED] -=- www.lukrative.com Classifieds -=- www.localbounty.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Selecting on dates
If you use createODBCDateTime() it will create a timestamp, which is generally the format you should use all throughout the application (or datestamp -- createODBCDate() ): Only going to other formats for display. This solves all sorts of date/time issues as it's a distinct standard format... not variable w/ peoples prefference and locale like 'dd-mm-yy', etc. I'd suggest you not use GT and the like as ANSI SQL calls for the =, , =, , =, operators, so while it may work in your current db it's not very portable. If you're worrying about the field having more precision than the passed date, don't. If you pass it in datestamp or timestamp version the dbms will work w/ it. If you create a timestamp using only .mm.dd then the time will read 00:00:00 of that day (24h clock); if you passed a datestamp and the db field had the precision of seconds, the dbms will handle it the same. In conclusion, dateFormat() should only be used when outputting to a user (or log file w/ set format). Instantly convert all date/times to a timestamp or datestamp object and use that format exclusively inside your application. You shouldn't have any date/time problems again. -Original Message- From: Paige Chandler [mailto:[EMAIL PROTECTED]] Sent: January 21, 2001 00:09 To: CF-Talk Subject: Re: Selecting on dates Hi Jim, I've used 'GT' in other Select statements successfully - but I'm not married to it. The problem is that the field in the table is in the Date/Time format (mmddyyhhmm) Hence I was trying to use the #DateFormat(StartVisit,'mm-dd-yy')# to extract the portion of just the date for the comparison. It works for display but I can't find any examples of using hoe to use it, or something better, for comparison. Thanks. Regards, Paige - Original Message - From: "Jim McAtee" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Saturday, January 20, 2001 11:13 PM Subject: Re: Selecting on dates It might be safer to use an ODBC formatted date. Depends on the database. Also, I'm not sure what happens to your 'GT' operator (does CF translate it?), but SQL usually uses operators like , =, , =, =, . SELECT * FROM WebSite WHERE StartDate #CreateODBCDate(StartVisit)# Jim -Original Message- From: Paige Chandler [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Date: Saturday, January 20, 2001 9:03 PM Subject: Selecting on dates Hi All, The following function works great for displaying a date, but StartVisit isn't found when trying to compare it in a Select statement. I'd really appreciate an example of the correct syntax to use. TIA. Regards, Paige Select * From WebSite WHERE StartDate GT #DateFormat(StartVisit,'mm-dd-yy')# ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cftry/cfcatch and cfswitch issues?
cfcatch type="exception type" By default the exception type is "APPLICATION" which is only developer raised exception, ie. cfthrow, cfrethrow. Syntax for CFCATCH: http://www.allaire.com/cfdocs/CFML_Language_Reference/2_ColdFusion_Tags/lr2_ 101.htm Exception types: http://www.allaire.com/cfdocs/Developing_Web_Applications_with_ColdFusion/08 _Debugging_and_Error_Handling/dwa08_06.htm So if you're trying to catch code errors, etc. it won't work: To do that, define a different exception type. If it's not catching cfthrow errors, try defining an exception type in the cfthrow tag as well as in the cfcatch. CF 4.0x handles exceptions differently from 4.5x so depending on which version you're using how you handle will vary. -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 13:00 To: CF-Talk Subject: cftry/cfcatch and cfswitch issues? Hey gang, A fellow co-worker is working on adding some CFTRY/CFCATCH goodies to a site we're working on. It's a semi-FuseBox site - not 100% Fusebox but close enough for gub'mint work. So what we're trying: CFTRY CFSWITCH etc etc (all the stuff) /CFSWITCH CFCATCH blah blah /CFCATCH /CFTRY and it doesn't seem to be catching any errors. Are there issues wrapping the switch(s) inside the try? Do we need to, in each of the includes that are fired up within the cases within the switches, do try/catch? Thanks in advance, --Scott ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Studio and PHP?
You want killer internal PHP help support in studio? - The PHP website (http://www.php.net) supports function look-ups using a simple url get line - Studio supports internal scripting using it's object model The result should be obvious :). It's easy to add F1 support alá CF tags for PHP functions and keywords. Also you should download the HTML version of the PHP language reference and throw it into your Studio docs dir: A little bit of parsing/renaming based on the manual.html and you can quickly make it into a nicer heading style. If you like toolbars (I find moving the mouse always takes to long, so don't use them) there might be some out there for standard functions. Add in the colour coding for PHP (mentioned below), and all the other functions in Studio that make it an uber text editor and PHP support is almost as good as native CF support. Even though I work in a *nix environ, I run win4lin for Studio b/c it's such a great scripting tool (db viewer, etc. which for any interested work fine as you just setup DSNs on the local machine [emulation] for all your datasources in *nix) for web based stuff. -Original Message- From: DeVoil, Nick [mailto:[EMAIL PROTECTED]] Sent: January 19, 2001 04:22 To: CF-Talk Subject: RE: Studio and PHP? A friend tells me that Allaire's Studio might be supporting PHP in the future - is this true, or complete rubbish? It already does, as far as colour coding is concerned. I use Studio for *everything* - PHP, Perl, JavaScript, JSP, even VBScript. Nick ** Information in this email is confidential and may be privileged. It is intended for the addressee only. If you have received it in error, please notify the sender immediately and delete it from your system. You should not otherwise copy it, retransmit it or use or disclose its contents to anyone. Thank you for your co-operation. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validate against a mask
You're not mistaken, it's quite far from PCREs. Generally you'll be using posix expressions instead of the \char notation; so \d becomes [[:digits:]], \w becomes [[:alpha:]], etc. Substrings are also quite different in the handling (read: not nearly so nice). If you're on a dedicated server there is a CFX tag for PCREs in CF that makes life so much easier for string parsing and data validation. (http://www.rixsoft.com/ColdFusion/CFX/PCRegEx/cfx_pcregex.html) Here's a link from the old CF4 manual: http://www.allaire.com/documents/cf4/Advanced_ColdFusion_Development/04_Regu lar_Expressions/adv04.htm Also read the reFind(), and reReplace() reference carefully (not the clearest of tech writing I know): http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions /lr3_200.htm http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions /lr3_207.htm From the venerable Fig Leaf archives g: (only time I've ever seen back refferencing used properly in a tutorial on CF regexps) http://www.figleaf.com/figleafhome/cfug/CFUGDec99/regexp/ Print refferences: Ben Forta's "Advanced Web Application Development" by Que List of posix character classes: alnum - alpha-numeric characters alpha - alphabetic characters blank - tab and space cntrl - control characters digit - decimal digits graph - all printable characters except space lower - lower case letters print - "printable" characters punct - punctuation space - whitespace characters upper - upper case letters xdigit- hexidecimal digits All the standard control characters work w/in the mask, so ^ $ ? * {num,num} etc. Sub expressions (if you set return sub expressions to true) are returned as start postion and length in an array, and the mid() function has to be used to retrieve them. So for basic validation CF is okay, but complex string handling gets long and tricky compared to Perl (but nothing so annoying as string handling in C was). If you don't get the more advanced stuff (ie. back referencing, substring manipulation, etc.) from the docs, I can send over some production code examples that might help. -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 10:32 To: CF-Talk Subject: RE: Validate against a mask I also believe that I should use Regex, but I can't find any decent reference for it for CF. It seems to be quite different from Perl's regex. Am I mistaken? -Original Message- From: Raymond B. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:38 PM To: CF-Talk Subject: RE: Validate against a mask Not sure if you've ever used regexps, but that is what you want. Check out reFind() and the other regexp functions. http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions /lr3_200.htm -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 17:20 To: CF-Talk Subject: Validate against a mask Is there a way to validate against a mask like lets say in MS Access. Is there a CF function that does this? Something like ConformsToMask("mm-dd-","01-17-2001") or ConformsToMask("###-###-","111-111-") Ruslan Sivak Technologist ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Studio and PHP? (OT)
I don't want to start a PHP vs. CF war, so first I'll direct you to the documentation. CF: http://www.allaire.com/cfdocs/dochome.htm PHP: http://www.php.net/manual/en/ What follows are opinions, please don't take offence: I too would prefer to work in PHP, but the job market says otherwise (unless I wanted to take a huge paycut). It's more feature plentiful in areas such as; type casting, call by refference, call by value, better db cursor control, objects, user functions, tons more internal functions, etc. But because it's more feature plentiful, it suffers from higher development times: The very fact of having more granular control, means that you _have_ to control the small details. CFs tag based system (and not so hot cfscript) is much easier on the display side, where PHP leans more to the scripting and display becomes harder. Now the alternate control structure syntax in PHP can mimic the tag based idea to a point, but overall dev times are still higher. As always, it's pick the proper tool for the job. In no way am I banging CF, it's great for what it is... same can be said of PHP. (BTW if anyone doesn't know the alternate syntax and how you can sort of mimic the CF tag based display, feel free to email outside me outside the list or read the control structure section of the PHP manual. I find that using the alternate syntax speeds dev time incredibly, as you're not constantly dealing w/ printf ("vertias %s/n", $foobar): There is of course a caveat to it.) -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: January 19, 2001 14:56 To: CF-Talk Subject: Re: Studio and PHP? Could you please mention a few examples of how php is more powerful? jon - Original Message - From: "Joe Sheble aka Wizaerd" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 19, 2001 10:16 AM Subject: Re: Studio and PHP? There is a whole lot of support for PHP in the form of mailing lists, websites, books (of which there is more than one... closer to three or four) It is for a whole lot more than accessing databases, and while this may likely get me flamed, it a lot more powerful in functionality than CF is. But it's a lot more strict than CF is as well in it's syntax and code placement. I prefer working in PHP, but alas, there's not a lot of jobs out there for PHP developers. At least not yet [snip] ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: any ideas?
That's a very, very nice idea. For a bit more added speed though, use array assignment (given longer list or number of rows). cfset rowColour = listToArray("E7,FAFAFA,808080") ... tr bgcolor="rowColour[(query.currentrow mod 3) + 1]" ... Your solution is quite elegant Scott, I just added it to my bag of tricks :) Thanks. As a side note, you can also do alternating rows by CSS as defined by W3C. In praticallity though no browser I'm aware of supports it properly. -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED]] Sent: January 19, 2001 13:14 To: CF-Talk Subject: Re: any ideas? Or... (up higher in the file) CFSET RowColorList = "E7,FAFAFA,808080" Then tr bgcolor = "#ListGetAt(RowColorList, ((CurrentRow MOD 3) + 1))#" --Scott - Original Message - From: "Russel Madere" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, January 19, 2001 7:53 AM Subject: RE: any ideas? Use: tr bgcolor="cfif DirList.CurrentRow Mod 3 EQ 0#E7cfelseif DirList.CurrentRow Mod 3 EQ 1#FAFAFAcfelse#808080/cfif" Russel Russel Madere, Jr. Senior Web Developer ICQ: 5446158 http://www.TurboSquid.com Some days you eat the bear; some days the bear eats you. -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 14:52 To: CF-Talk Subject: any ideas? does anyone know how i can make this tag output 3 colors instead of 2? tr bgcolor="#IIf(DirList.CurrentRow Mod 2, DE('E7'), DE('FAFAFA'))#" thanks, Jay Patton Web Pro USA 406.549.3337 ext. 203 1.888.5WEBPRO www.webpro-usa.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SQL help needed - Apples but not Oranges...
I take it you want to exlude a word from a search. Valid names: Apple Time Sauce and Apples Invalid: Bob's Donuts Oranges and Apples Apples the colour of Orange Bananas Oranges SELECT DISTINCT c.id, c.firstname, c.lastname FROMClients c, Orders o, OrderItems i, Products p WHERE c.id = o.id AND o.id = i.orderid AND i.productid = p.id AND ( p.name LIKE '%Apples%' AND p.name NOT LIKE '%Oranges%' ) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: January 19, 2001 14:51 To: CF-Talk Subject: SQL help needed - Apples but not Oranges... I'm trying to select clients who have purchased "Apples", but NOT "Oranges". This query is returning clients who have bought either. SELECT DISTINCT Clients.id, Clients.firstname, Clients.lastname FROM Clients,Orders,OrderItems,Products WHERE ( Clients.id = Orders.clientid AND Orders.id = OrderItems.orderid AND OrderItems.productid = Products.id AND Products.name LIKE '%Apples%' ) AND ( Clients.id = Orders.clientid AND Orders.id = OrderItems.orderid AND OrderItems.productid = Products.id AND Products.name NOT LIKE '%Oranges%' ) Any help is most appreciated! -ron ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: URLToken Algorithm
CFID is simply a sequential integer per machine CFTOKEN is, in default setting, assigned a random unsigned long int (0 x 2^32-1). If you're client needs to know the exact algorythm used to generate the random method, you'll probably have to ask an Allaire programmer. CF doesn't validate the CFTOKEN anymore (as of 4.5 I think, not sure) so you can use any value you want for it; as it's just to stop people hijacking sessions by entering in a sequential CFID. If you want, you can have a UUID appended to CFTOKEN by changing the UUIDToken key in the registry to 1 (I've never done this on a system w/o a registry before so not sure where it would be stored). [HKEY_LOCAL_MACHINE\Software\Allaire\ColdFusion\CurrentVersion\Clients\] So if you're really uptight about someone guessing a 10 digit random number, either use your own algorythm to generate the CFTOKEN or concat the UUID on to the end. Hope it helps :) -Original Message- From: Teng-Yan Loke [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 21:41 To: CF-Talk Subject: URLToken Algorithm My client would like to know the algorithm used to generate unique values and the ranges for CFID and CFTOKEN for session management. Any help please? Thanx. Loke, Teng-Yan | [EMAIL PROTECTED] | +65-2169725 E-commerce | novaSPRINT.com (S) Pte Ltd ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: How to encript source code?
Be aware though that the encryption at best is only a slight deterent to the completely uniformed. Due to the fact that code has to be decrypted by any system to run (meaning a set key is present) and done quickly so as not to impede performance (meaning a simple hash) decrypting is extremely simple. If you know much about crypto you can sit down and figure out how to reverse the hash in an afternoon, if you don't there are premade binaries or source for most platforms that decrypt the code. I'm not slamming the Allaire people here at all, they came up w/ the best they could I'm sure to balance the various aspects. -Original Message- From: Deb Dickerson [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 22:46 To: CF-Talk Subject: RE: How to encript source code? Use cfencode.exe in the \cfusion\bin directory (for 4.5x) It was cfcrypt.exe for 4.0x Debbie -Original Message- From: George Dong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 8:25 PM To: CF-Talk Subject: How to encript source code? Hi there, If anyone can tell me to how encript source code, it can be done by cfstudio or need other application program? thank you very much. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: any ideas?
No b/c IIF() is a true/false evaluation. Mod 3 would simply be the two colours in a false, true, true arrangement. -Original Message- From: Scott, Andrew [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 23:24 To: CF-Talk Subject: RE: any ideas? Wouldn't changing the mod 2 to mod 3 do the trick:-) regards Andrew Scott Senior Cold Fusion Application Developer -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: 18 January 2001 07:52 To: CF-Talk Subject: any ideas? does anyone know how i can make this tag output 3 colors instead of 2? tr bgcolor="#IIf(DirList.CurrentRow Mod 2, DE('E7'), DE('FAFAFA'))#" thanks, Jay Patton Web Pro USA 406.549.3337 ext. 203 1.888.5WEBPRO www.webpro-usa.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Form Post with Image
input type="Image" src="image.ext" or an onclick even to submit the form w/ JS. Both have their drawbacks, you can also use CSS to change the style of the submit button itself. -Original Message- From: Albert K Arhin [mailto:[EMAIL PROTECTED]] Sent: January 18, 2001 04:56 To: CF-Talk Subject: Form Post with Image Hi all , How can I post a form with an image instead of a button. Thanks ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Studio 4.5.2 and colour coding
Nope, they were a navy by default I think. I too quickly changed that lovely blistering shade of orange to a more retina friendly version. -Original Message- From: Aidan Whitehall [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 05:44 To: CF-Talk Subject: RE: Studio 4.5.2 and colour coding Its in the Studio Settings, Editor--Color Coding, and then in the HTML Scheme, HTML Form Tags. I quite like the Orange, at least they standout. Thanks for the pointers. Can anyone remember what the old colours were (my addled brain just can't remember... were HTML green?) -- Aidan Whitehall [EMAIL PROTECTED] Netshopper UK Ltd Advanced Web Solutions Services http://www.netshopperuk.com/ Telephone +44 (01744) 648650 Fax +44 (01744) 648651 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Short Circuit Evaluation
"Note: Because ColdFusion has short-circuit Boolean evaluation..." this is the only reference I could find (http://www.allaire.com/handlers/index.cfm?ID=15923Method=Full) but I'm sure I read something about it the packaged docs as well. In short CF has supported short circuit AND statments for a while, if it's not working for you I can only mirror the previous reply and suggest looking for typos. -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 12:09 To: CF-Talk Subject: RE: Short Circuit Evaluation hmmm. I never noticed. Would have coded a few things differently. I'll check it out tonight. Eric From: "Raymond Camden" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: Short Circuit Evaluation Date: Wed, 17 Jan 2001 10:25:25 -0500 Last time I checked, CF _did_ have short circuit eval. Maybe you have a slight typo in your code? This feature has been around since 4.01 I believe. (Maybe earlier, someone feel free to correct me.) === Raymond Camden, Principal Spectra Compliance Engineer for Allaire Email : [EMAIL PROTECTED] ICQ UIN : 3679482 "My ally is the Force, and a powerful ally it is." - Yoda -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 10:12 AM To: CF-Talk Subject: Short Circuit Evaluation I have had to write this kind of code over and over, and was wondering if there is a better way like in c++, where it does lazy evaluation. This is what I want: CFIF isDefined("somevar") AND somevar IS "something" do something /CFIF Of course this fails, since if the variable is not defined, CF stil checks the second condition. In languages like C++, it did lazy evaluation, so if the first condition was false, it didn't bother checking the second condition. This let people write things like open(FILE,"file") || die "Can't open file"; So in CF I have to rewrite my above IF statement as 2 statements CFIF isDefined("somevar") CFIF somevar IS "something" do something /CFIF /CFIF ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Sessions
What you're seeing is most likely perm cookies not being accepted. Appname_CFID_CFTOKEN Is how that number breaks down, if cookies aren't being accepted then your application can't track (by default) the user therefore assigning a new session every time (as seen by the CFID increasing, CFTOKEN is random for security). I don't like perm cookies myself in most cases, so try setting CFID and CFTOKEN in the Application.cfm by hand as session cookies (in addition to the CFAPPLICATION line). Your users will need at least those to track them unless you pass the urltoken in the url. -Original Message- From: Michael Ross [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 12:07 To: CF-Talk Subject: Sessions I have an app that sets a session id. The first time you call any page(which uses application.cfm)it sets a number and works great. If i refresh the page I get a var that looks like this tcom_686_### where tcom is the application name, 686 is a number that is being incremented everytime I call a new session. and changes randomly. Anyone ever seen this??? Thanks ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Cross Browser DHTML Menu
http://www.dynamicdrive.com http://www.dynamicdrive.com/dynamicindex1/index.html -- Menu and Nav scripts They have a host of free scripts. I'm not much on the front end display side but I'm sure they'll have something you can use "out of the box" or adapt easily. -Original Message- From: Paul Johnston [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 11:31 To: CF-Talk Subject: OT: Cross Browser DHTML Menu Guys, I need a cross browser DHTML menu asap that can do drop down, and slide menus. Menu |-Item1 |-Item2 |-Item3--|-Item5 |-Item4 |-Item6 Does anyone know of a good simple API or generator, that has been tested (the important part of the question) on NN4+ and IE4+, that they would recommend? Please don't suggest CF_DHTMLMenu as it specifically states that it's not for NN. Thanks Paul ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: any ideas?
IIF in an Inline IF statement, so only has boolean TRUE and FALSE (ie. two states). If you want to vary between more use a switch/case setup again dependent on the mod and rowcount. The nicest thing about the iif() is it's inline and clean looking in your code; any type of if/elseif or switch statments are either going to be slightly removed from the line or not look as nice... but they work. cfscript // determine row colour based on mod of current query row switch (DirList.CurrentRow mod 3) { case 0: colour = "e7" ; break; case 1: colour = "fafafa" ; break; case 2: colour = "a1a1a1" ; break; } /cfscript tr bgcolor="#colour#" If you want gradients of a single colour you could also use mod to generate it mathmatically, instead of a sub type operation. tr bgcolor="0909#evaluate((DirList.CurrentRow mod 3) * 3)#9" -Original Message- From: Jay Patton [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 15:52 To: CF-Talk Subject: any ideas? does anyone know how i can make this tag output 3 colors instead of 2? tr bgcolor="#IIf(DirList.CurrentRow Mod 2, DE('E7'), DE('FAFAFA'))#" thanks, Jay Patton Web Pro USA 406.549.3337 ext. 203 1.888.5WEBPRO www.webpro-usa.com ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Session age?
You could always set a session var w/ the current date and have a not isDefined() making sure it isn't overwritten. cfif not isDefined("session.created_at") cflock scope="session" type="exclusive" timeout=2 cfset session.created_at = now() /cflock /cfif If this was thrown into the Application.cfm you'd have a created_at var initialised w/ the session and valid until it expires. I'm not aware that CF tracks the absolute creation time, but it might be some undocumented var (it's not in the session scope if you loop through the struct though). -Original Message- From: Katrina Chapman [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 07:50 To: CF-Talk Subject: RE: Session age? Merry Meet Jon, The way that I understand session variables to work you can't tell when the var was originally set on the users machine because that time stamp is reset everytime they access a new page. If it wasn't updated with the current time then the user would timeout even if they weren't done with your site. Blessed Be, --K -Original Message- From: Jon Hall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 2:53 AM To: CF-Talk Subject: Session age? Is there a way to tell when a session variable was created? jon ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: retreiving datatypes
Unlike most dbms's Access doesn't have the system tables that allow you to retrieve table and field info though SQL statements; to my knowledge (I avoid Access like the plague so there may be easier ways than what follows). Under win you can the ADODB.Connection class object and retrieve them this way (where dsn, username, pass are vars): cfscript // initalise the DB object and open a connection to the desired db dbo = createObject("COM", "ADODB.Connection") ; dbo.Open("DSN=" dsn, username, password, -1) ; // get schema (schema 4 is field info, 20 table info) recordset recordset = dbo.OpenSchema(4) ; // assign fields to "Fields" collection from returned schema fields = recordset.Fields ; ... The fields collection contains all the info you'll need, and can be accessed like this: table_name = fields.Item("TABLE_NAME") ; // display table current field belongs too writeOutput(table_name.value) ; Other valid fields in the schema recordset are; COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE, COLUMN_DEFAULT, COLUMN_FLAGS, etc. // move the cursor to the next record recordset.MoveNext() ; In the way above you can loop through all the data in the schema, to keep track of it all I'd suggest using a struct. This may lots more info than you need, but it's the only way I know to get datatypes and other design info from an Access table. Much, much, more difficult than simply querying the db as in other dbms's. -Original Message- From: Terry Troxel [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 13:33 To: CF-Talk Subject: retreiving datatypes I know that I can build a list of column names in an Accrss table with the columnlist variable, but is there also a way I can do the same thing in order to retrieve the corresponding datatypes for all the fields in an Access table? Terry Troxel ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validate against a mask
Not sure if you've ever used regexps, but that is what you want. Check out reFind() and the other regexp functions. http://www.allaire.com/cfdocs/CFML_Language_Reference/3_ColdFusion_Functions /lr3_200.htm -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 17:20 To: CF-Talk Subject: Validate against a mask Is there a way to validate against a mask like lets say in MS Access. Is there a CF function that does this? Something like ConformsToMask("mm-dd-","01-17-2001") or ConformsToMask("###-###-","111-111-") Ruslan Sivak Technologist ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Validate against a mask
Oh just to tack on an added note, you'll probably want to do it client side first in JS (which has even better regexp support). Netscape Dev area and others have great articles on JS regexps wether you're coming over from Perl and just need the differences outlined, or completely new to the entire concept. -Original Message- From: Ruslan Sivak [mailto:[EMAIL PROTECTED]] Sent: January 17, 2001 17:20 To: CF-Talk Subject: Validate against a mask Is there a way to validate against a mask like lets say in MS Access. Is there a CF function that does this? Something like ConformsToMask("mm-dd-","01-17-2001") or ConformsToMask("###-###-","111-111-") Ruslan Sivak Technologist ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Dynamic Variable Names
You're trouble is you're not using the evaluate() function (and you're using # gratuitously :). cfset varname = evaluate("form.id" x) This will now be the value of from.id1 instead of the string "form.id1" (through whatever). There are other ways to handle this as well. One thing of note is instead of using the for style cfloop, use a while (conditional) loop and you won't have to pass the number along, just add a counter. cfset x = 1 cfloop condition="isDefined('form.id' x)" cfset varname = evaluate("form.id" x) cfif varname is "Custom" !--- do this if custom --- cfelse !--- do this if NOT --- /cfif cfset x = x + 1 /cfloop This will now run from x to the first break in the ints up from it; so 1 until whatever you decide w/o you having to pass a number. Alternately, if it's all logic you might want to use cfscript. cfscript x = 1; while (isDefined("form.id" x)) { field = evaluate("form.id" x) ; if (field eq "Custom") { // do this is custom } else { // do this if not } x = x + 1 ; } cfscript -Original Message- From: Martin S [mailto:[EMAIL PROTECTED]] Sent: January 16, 2001 21:22 To: CF-Talk Subject: Dynamic Variable Names Hi, In this example I have two pages...with a form post inbetween. The first page has a lot of text boxes called ID1 to ID16 (so, 16 in total ;) ).these boxes are in a database loop (thus the number to differentiate them). Also over time the number may change from 16 to 18 etc..so there may be more text boxes. I also pass this total number (16) to the second page in a hidden field. On the second page I want to evaluate the value for each one..but as the total number is not a constant I need to do a loop. The following code is what I have come up with : cfoutput cfloop from="1" to="#Form.TotalEvents#" index="i" #I# cfset varname ="Form.ID#i#" cfif #varname# eq "Custom"#varname# = Custom/cfifbr /cfloop /cfoutput ..end code. What this is SUPPOSED to be doing is checking if the passed VALUE for Form.ID1 (through 16) equals "Custom", and if so it does something, else something else... .but what it is doing is a literal comparison, so there are NEVER any true results to the if statement, when infact with my current code 11 out of 12 should return true. Can someone help me with this...it may be trivial to some of you..but I need to get around this ASAP. Thanks heaps!!! ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Studio Removing Last Character
I've never had that problem myself (and of course saying that it will now happen all the time). Just my $0.02 ... and seeing as that's CAD, it's $-2.00 in USD. -Original Message- From: Brendan Avery [mailto:[EMAIL PROTECTED]] Sent: January 16, 2001 21:42 To: CF-Talk Subject: Re: Studio Removing Last Character Does Studio delete the last character all the time? And does it delete a single character even if that character is whitespace itself (like a br or tab or space) ? Just curious if I want to bother upgrading from 4.0.1 right now... -brendan avery / [EMAIL PROTECTED] At 08:10 AM 1/15/2001 -0500, you wrote: Yes, I have had this problem. I dont know what causes it or how to fix it either unfortunately. I have honestly given up caring about the myriad of Studio bugs and just try to work around them. jon - Original Message - From: "John Bowering" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Monday, January 15, 2001 7:41 AM Subject: Studio Removing Last Character Every once in a while when studio (4.5.2) opens a document, it deletes the last character if there isn't any spaces or line breaks after it. ie: /CFIF turns into /CFIF Anyone else having this problem? Is there any fixes or does anyone know what causes it to do this? Thanks John ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists