RE: filename in code documentation - WHY?!

2002-04-22 Thread Rick Osborne
Gyrus asked: > Every instance of code documentation [..] I've seen has 'filename' included. > Any reason? Surely it's spurious [..] Is it? I put the filename and virtual path of the file at the top of every CFM file I write (or edit). [Ex: /Admin/People.cfm] Why? Because my job is mainly writ

RE: Pausing using CF

2002-04-11 Thread Rick Osborne [mojo]
Michael Tangorre asked: > Can anyone think of a way that I can achieve a pause for like 30 > seconds to a minute between iterations in a loop? This question gets asked quite a bit, so I figured I'd forward my alternative. Elapsed: #Elapsed#ms It's nicer p

RE: record session timeout

2002-04-09 Thread Rick Osborne [mojo]
I can think of several different ways, each with their own pros and cons. Instead of thinking in terms of when a Session *has timed out*, think in terms of when a Session *will time out*. 1. Update your DB with the current time {NOW()} plus your session timeout length every time the user hits a

CF & IIS - Directories with '.com'

2002-03-28 Thread Rick Osborne [mojo]
I've run up against IIS's wonderful inability to correctly parse virtual paths before, but this one has me stumped. If I have a folder "test.com" on my web server (a domain name for a client's site we are working on), any CF files that are under the directory with the ".com" in the name are all p

RE: Reading ID3-Tags w/ColdFusion

2002-03-25 Thread Rick Osborne [mojo]
I wrote a CFX tag that parses out ID3v2 tags, but it is more Prrof-of-Concept that production-quality. It comes with full source, so you are welcome to hack on it to do what you want. http://www.rixsoft.com/ColdFusion/CFX/MP3Dir/ HTH, -R -Original Message- From: VAN VLIET, SCOTT E (S

RE: alternating rows

2002-03-18 Thread Rick Osborne [Mojo]
Whoops. That last one was from me. Sorry about that, folks. I think I pasted Michael's email into the From field instead of the CC field. Didn't want anyone to think I was trying to pull a fast one or anything ... -R -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Decryption Licensing Verbiage/Copy

2002-03-07 Thread Rick Osborne [Mojo]
We're looking to add some verbiage/copy to our licensing agreements that says something to the effect of "decrypting any encrypted templates violates the terms of this license". Our management-types want it to sound more authoritative (and nastier) than that. Does anyone have anything in their l

RE: request scope.

2002-01-31 Thread Rick Osborne [Mojo]
Jeffry Houser said: > I don't see much use beyond "A way to avoid sending > parameters to custom tags." Unless I'm mistaken the > only difference between the variables scope and the > request scope is that variables in the request scope > are available to custom tags. Actually, I just thought

RE: Build your own

2002-01-10 Thread Rick Osborne [Mojo]
Ron Anderson asked: > Has anyone reached the point of frustration with CFGraph, > where they've just built their own? I did, but I did it in Perl with the GD module. http://www.rickosborne.org/<-- Look at the Insomniograph for an example I've got a coworker here who says his friend built a

RE: Cfcontent performance issues?

2002-01-04 Thread Rick Osborne [Mojo]
Kay Smoljak asked: >> Also, the other recommendation was to get the web server >> to handle this. I will be on IIS5 on Win2K, on shared >> hosting, but my host is usually quite accomodating when >> it comes to setting things up for me. To which Dave Watts replied: > You might be able to do some

RE: general question about naming conventions

2001-12-21 Thread Rick Osborne [Mojo]
Mark Smeets asked: > When dealing with databases, how do you name your columns? Personally, I use the following structure, but I don't really have any rationale for it. foo_id int foo_dt datetime foo_d date is_foo boolean foo_tx string (could be char, or varchar,

RE: Listing MP3 files and alowing either Download or Run

2001-12-17 Thread Rick Osborne [Mojo]
I set up a music server for our Intranet a few months ago and wrote a CFX tag and a really quick-n-simple browser interface for it. (For those whom using a file interface was too difficult. :p~~~ ) It uses IceCast running on a Linux server, but it could just as easily use NFS or SMB or whatever

RE: Writing to text file

2001-12-11 Thread Rick Osborne [Mojo]
Dave recommended using a single variable: : : : : : : Actually, you could take this one step further and make it pretty transparent: #fname#,#lname# Then, your CF_SaveFileContent tag is really simple: You can do pretty much *anything* you want in that first set of tags. Ou

RE: regex find form vars in queries?

2001-12-07 Thread Rick Osborne [Mojo]
That solution will only work in Perl. The CF regex engine cannot handle non-greedy matching. If you do more than a little work with regexes you may want to consider downloading my (completely free) PCRegEx CFX tag, which gives CF Server Perl-Compatible regexes, including non-greedy matching. URL

RE: CFX for Solaris (not offering a solution, just an AOL and a gripe)

2001-12-06 Thread Rick Osborne [Mojo]
Jordie Fike asked: > Is there somewhere to go to get popular custom tags that > have been ported over to run on Solaris? Does anyone have > a URL that might point me in the right direction? AOL I don't have a solution for you, however I sincerely hope you do find one. If you do, please let m

RE: Text Compression Utility?

2001-12-05 Thread Rick Osborne [Mojo]
Alex wrote: > Then this has nothing to do with coldfusion. Your webserver > handles this. IIS has compression and Apache has mod_gzip > as a compressor. Actually, theoretically, you *could* do this with CF. Use CFHEADER to return the correct Content-Encoding (or Transfer-Encodeing) header and t

RE: Text Compression Utility?

2001-12-04 Thread Rick Osborne [Mojo]
You may want to look into the "Content-Encoding" HTTP header. Your web server can actually compress the text file on the fly, and if your web browser is smart enough to accept it you will accomplish exactly what you are looking for. I think IIS5 has an ISAPI filter that does this automagically.

RE: Regular Expression

2001-12-04 Thread Rick Osborne [Mojo]
Don Vawter wrote: > Pardon me for being naive but isnt it a lot easier to just > combine regex and regular find trying to match a substring > like this? > [...] > If find regex invaluable but sometimes combining with a plain > old find makes my life simpler. Very, very true. There's more than o

RE: Regular Expression

2001-12-04 Thread Rick Osborne [Mojo]
I know it looks nasty, but this is what I came up with: ]+textline\.cfm[^>[:space:]]*([[:space:]]+[^M][^A=]? [^X=]?[^H=]?[^S=]?[^I=]?[^Z=]?[^E=]?[_[:alnum:]]*=("[^"]*"|[^>[:space:]]*))+ [[:space:]]*> I used the following test cases: It correctly found the 3 lines that do *not* have the M

RE: Best practices storing CC

2001-11-16 Thread Rick Osborne [Mojo]
Don Vawter asked: > Any advice on storing credit card info? We're pretty radical about our beliefs on CC#'s: We don't keep them *anywhere*. We keep the last 4 digits and the CC type, and that's it. The CC# gets immediately PGP encrypted [1] and emailed to our processing center, where it is sto

RE: REFindNoCase and "]"...

2001-11-15 Thread Rick Osborne [Mojo]
Lee Fuller asked: > Ok.. I've tried just about every way I know of to escape > this puppy (the "]" character) so that I can search for it > in a string using REFindNoCase. In a character class, you have to make the right bracket the first character: []whatevr]+ -R

RE: Merant ODBC driver docs

2001-11-15 Thread Rick Osborne [Mojo]
Jim- I can't help you with your first problem, (and it looks like some people already have) but I may be able to help you with your second. > > SELECT table1.*, table2.something > FROM table1 INNER JOIN table2 ON table2.key1 = table1.key1 > WHERE table1.id = #somevalue# > > gives an error: > [

RE: Val() vs. IsNumeric

2001-11-15 Thread Rick Osborne [Mojo]
Chris Norloff asked: > The question is whether to use Val() or IsNumeric to prevent > non-numeric characters from being inserted/updated to the > database. I know this is an individual choice based on your > own need, but I'm curious what others use. > Val() or IsNumeric? Personally, I use IsNume

Request for comments : CFThreaded

2001-11-15 Thread Rick Osborne [Mojo]
want a better solution. So, what do y'all think? Is there a demand for something like this? Is this something we should (nicely) pressure/ask/beg Macromedia/Allaire to implement for us? -- Rick Osborne Certified Advanced Cold Fusion Developer, Web Guru, and Large-Egoed Programmer ~~

RE: find inputs with no maxlength

2001-11-09 Thread Rick Osborne [Mojo]
Maybe something like: It's not perfect, but it worked on a couple of really rudimentary tests I just ran. -R -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 17:37 To: CF-Talk Subject: RE: find inputs with no maxlength > Does anyone know

RE: Really delayed evaluation

2001-10-30 Thread Rick Osborne [Mojo]
How are you summing the data? Is it coming from a query? One of the hacks I use quote a bit is basically a one-line QuerySum() function: I tend to find it takes a fraction of the time that looping over the query does. If your situation is a bit more complex, you may want to consider using a

RE: Delaying template execution

2001-10-29 Thread Rick Osborne [Mojo]
Brian Ferrigno said: > the code does work by creating a deadlock for the session Deadlock, not race condition. Quite right. Too many Krispy Kremes for me. Point being, it blocks and *does not* spike your processor or anything lame like that. The only downside is that it blocks all other locks

RE: Delaying template execution

2001-10-29 Thread Rick Osborne [Mojo]
n that sessionwill also be delayed. -R Rick Osborne Certified Advanced ColdFusion 5 Developer ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ

RE: CFmail Recount

2001-10-29 Thread Rick Osborne [Mojo]
that's the price we pay for using CF for bulk mail, eh? :) -R Rick Osborne Certified Advanced ColdFusion 5 Developer ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Arc

RE: CFmail Recount

2001-10-29 Thread Rick Osborne [Mojo]
hich is just a db table full of the outgoing mail. If there are any entries, throw about 1000 into the spool. (You can write to the spool with CFFILE, or use CFMAIL. Both work.) Bail Out. 3. If the queue is empty, use CFSCHEDULE to delete the job. You may want to turn off HTTP logging for the

RE: CFmail Recount

2001-10-29 Thread Rick Osborne [Mojo]
estart it. That's a bit out of the range of the majority of their customers, but that was their solution. -R Rick Osborne Certified Advanced ColdFusion 5 Developer ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: h

RE: *** Complicated SQL riddle

2001-10-29 Thread Rick Osborne [Mojo]
leave it as an exercise to the reader. ;) Point being, you want to do all the hard work on the INSERT/UPDATE/DELETE stages so that your SELECT stage (which I presume you will be doing *much* more frequently) will be a simple as it can possibly be. I hope that answered your question. :) You

RE: Bar Code Scan

2001-08-21 Thread Rick Osborne [Mojo]
Paris Lundis asked: > in order to get the clueless cat to work with the cold fusion app, > do I only need to install the cue cat software? Or is there something > else instead to use... You don't even need that much. Actually, I think installing (and running) their software would probably interf

RE: Bar Code Scan

2001-08-21 Thread Rick Osborne [Mojo]
Back when CueCats were all the rage, I wrote a CF app that would take the input from it, decode it, and do neat things with the UPC. Being the geek that I am, I didn't have much use for it beyond cataloguing my (comic) books. But, it all really depends on your scanning hardware. The CueCat is a

RE: Alternating BG colors on a

2001-08-21 Thread Rick Osborne [Mojo]
Chad Gray asked: > When using a tag on a table how do i get every other > to have a background color? My favorite way: .evenrow { background-color: silver; } .oddrow { background-color: gray; } #CurrentRow# This allows me to define any styles I want in the STYLE part, including back

RE: WAY OT: Project Management Tools

2001-08-21 Thread Rick Osborne [Mojo]
pport resources, visit: http://www.macromedia.com/support/ For Customer Service and all Macromedia contacts, visit: http://www.macromedia.com/macromedia/index_contact.fhtml -Original Message----- From: Rick Osborne [Mojo] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 11:39 To: CF-T

RE: WAY OT: Project Management Tools

2001-08-21 Thread Rick Osborne [Mojo]
Brian Yager asked: > My management is sick of Microsoft Project and wants to find another > project management tool. Actually, this may not be as OT as you think. I got this email the other day. I haven't had a chance to check it out yet, so I can't give you any recommendations, but it might be

Black Hats (was: Developers Exchange very slow)

2001-08-20 Thread Rick Osborne [Mojo]
Billy Cravens said: > There's no telling what's running [on the Allaire site]. I know it's > a different system, but about a month ago I hit the beta.allaire.com > forums, and it crashed, and [...] I got a standard Access database error! Speaking of which ... I think this raises an interesting p

RE: An extra line of defense for you IIS-types

2001-08-14 Thread Rick Osborne [Mojo]
Tom said: >Basically you're saying that it's an option now but the next >worm may be able to circumvent this as well using >simple reverse DNS lookup. Yes and no. We can get away with it because we are using pure virtual hosting. If someone does a reverse lookup of our primary server they get a

An extra line of defense for you IIS-types

2001-08-13 Thread Rick Osborne [Mojo]
so we can get away with it. YMMV. Just food for thought. -- Rick Osborne ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archi

RE: CF Studio: Can Regular expression replace form.* ?

2001-08-09 Thread Rick Osborne [Mojo]
This works for me: Replace: #(Form.[[:alnum:]_]+)# With: #Trim(\1)# Of course, if you want it to handle more complex scenarios (Functions, Structures, etc), you'll have to do a bit of tweaking. -R P.S. - Regexs under CF suck! -Original Message- From: Mark W. Breneman [mailto:[EM

RE: How can I use CF to push data into a statistical package or an Ex cel spreadsheet?

2000-12-04 Thread Rick Osborne [Mojo]
Tim Dempsey asked: > How do I take that data and get it into Excel on the client's machine? We had to do something like this last month (with Doughnut charts instead of Pie charts, but it's close enough). I never could get it to work 100% in CF, as Excel wouldn't honor my Quit() command and woul

RE: Excel Charts

2000-11-13 Thread Rick Osborne [Mojo]
Strike that, I found it: http://www.cfcomet.com/cfcomet/excel/ -R -Original Message- From: Rick Osborne [Mojo] [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 20:05 To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subjec

RE: Excel Charts

2000-11-13 Thread Rick Osborne [Mojo]
This URL seems to be toasty. Does anyone happen to know where it might have been moved to? -Original Message- From: Simon Horwith [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 26, 2000 17:11 To: CF-Talk Subject: RE: Excel Charts go to: http://www.cfm-resources.com/members/comet/

RE: Novell Advanced Security Woes

2000-11-05 Thread Rick Osborne [Mojo]
FYI, I wrote an ISAPI DLL for IIS to do pretty much exactly what Steve talks about at the end there. It is completely free and comes with source. It is available at: http://www.rixsoft.com/NWAuth/ Of course, it means that IIS does the authentication instead of CF, but that may be good or bad d

RE: Finding a query in a file

2000-10-24 Thread Rick Osborne [Mojo]
Something like this will probably work for you: This will deal with the case of having non-alphanumeric tag attributes in random order. -Rick -Original Message- From: Christopher S Martin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 24, 2000 12:25 To: CF-Talk Subject: Finding a

RE: SP2 Enhancement Speculation (was Threading Issue)

2000-10-19 Thread Rick Osborne [Mojo]
I said: >> >> >> >> To which Dave said: > You can do this in 4.5.x with StructInsert. If you specify a fourth > argument, you can allow it to both insert and update: > Ummm, not quite. It'd be more like: But, you can't do that because the StructFind() will fail if var is not alread

SP2 Enhancement Speculation (was Threading Issue)

2000-10-19 Thread Rick Osborne [Mojo]
Is there documentation anywhere on what some of these enhancements (will) do? Just looking at the function names, I have a few questions. The beta site seems to have a definite paucity of information in this respect, but maybe I'm just not finding it. (Yes, yes, I know, it's beta so the functio

RE: What sort of RegEx does Cold Fusion Support?

2000-10-17 Thread Rick Osborne [Mojo]
Christopher S Martin asked: > How well does ColdFuison support Regular Expressions? Ah, the topic has come 'round again. :) This question gets asked about once a month, so I guess it was time again. :) But, if no one asked it, then I wouldn't have an excuse to plug my CFX tag. Ahem-hem. Th

RE: Thanks was RE: returning top 10

2000-10-16 Thread Rick Osborne [Mojo]
Easiest way? Recycle your new "Top 10" query as a subquery. SELECT student_pop FROM table1 WHERE student_pop NOT IN ( SELECT top 10 student_pop FROM table1 ORDER BY whatever ) -Rick -Original Message- From: Jim Watkins [mailto:[EMAIL PROTECTED]] Sent: Monday, October 16, 2000 22:

MS SQL Server connectivity from Solaris?

2000-10-06 Thread Rick Osborne \(Mojo\)
ttoms-up. I wonder if the generic ODBC drivers will handle it? Hmmm. Anyone actually got this working? -- Rick Osborne -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit

RE: Harder Math Question (Cayley-Purser)

2000-10-03 Thread Rick Osborne \(Mojo\)
It's the Cayley-Purser Algorithm for encryption. See: http://www.cayley-purser.ie/ I thought this was a broken algorithm? Yes, no? As for translating it to CF, why? Why not just use RSA or Twofish or DES? (Or, if you want to be really topical, use Rijndael. (sp?)) The patent for RSA is ove

[announce] PCRegEx final alpha (first beta) v0.1a available

2000-09-28 Thread Rick Osborne \(Mojo\)
anyone can think of additional functionality that would be useful, please let me know *in the next week*. -- Rick Osborne -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.ho

RE: [Very OT] Embedding the PCRE Engine in a CFX

2000-09-27 Thread Rick Osborne \(Mojo\)
I thought about going the COM object route, but that's more of a pain than it's worth at this point. Maybe eventually. As for CORBA, I've never done any CORBA programming. I'll have to look into it. -Original Message- From: Jared Clinton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, Sept

[Kinda OT?] Embedding the PCRE Engine in a CFX

2000-09-26 Thread Rick Osborne \(Mojo\)
(This may be OT, as I'm not sure what the list's policy is on this kind of thing, but I'm just tryin' to help, so I'll give it a shot.) In light of the vast number of questions we get on the list about the brokenness of the regular expression engine in CF, I've created a CFX tag that uses the PCR

RE: CFMODULE and weird space

2000-09-26 Thread Rick Osborne \(Mojo\)
I noticed that 4.5.1 does this. I fiddled with tags all over the place, and making sure that I never called a module from withing CFOUTPUT tags, and that seems to have cleared it up. I don't know specifically what did it, though. I'm just letting you know that you're not crazy, as it is indeed

RE: Money for Nothing & Chicks for Free?

2000-09-25 Thread Rick Osborne \(Mojo\)
Someone going by the nym "Hydra" said: >I continue to be mystified by these kinds of discussions. Would >someone take a moment to explain this phenomenon? Kindly. >If someone really writes a "FreeCF" and the Allaire Corp. goes >down the tubes, then will we really all be better off? What what?

RE: Crazy idea? (topical, but not programming)

2000-09-23 Thread Rick Osborne \(Mojo\)
Allaire gets how many thousand dollars per copy of CF? Do we *really* think they're going to GPL (or even just OpenSource) it any time soon? I'm naive, but I'm not *that* naive. :) I've often pondered the feasibility of writing a "FreeCF" of some sort. (More and more lately, actually.) Of cou

RE: [CF-Talk] CFCOOKIE problems (more info)

2000-09-19 Thread Rick Osborne
I said: >When CF tells the browser to redirect, it doesn't set a cookie >at the same time. (I'm not sure why, or if this is even legal.) Since I'm inquisitive like that, I wanted to see if setting cookies and redirecting at the same time would actually work. I don't know if it's legal or not,

RE: [CF-Talk] CFCOOKIE problems

2000-09-19 Thread Rick Osborne
This is a common question. The problem is actually with the way CF does the redirect, not with the browser (which is commonly accused of being the fault), so this will happen with all browsers. When CF tells the browser to redirect, it doesn't set a cookie at the same time. (I'm not sure why, o

RE: [CF-Talk] Dynamic query

2000-09-19 Thread Rick Osborne
I have a similar page that I use to do queries (as CFStudio tends to barf when I have too much other than it and the browser open, and the query analyzer, while functional, is slow). The part you want is that big section towards the end. Look for ColumnList. -Rick

RE: [CF-Talk] using the tag in a CF page.

2000-09-19 Thread Rick Osborne
Simple answer: No. Explanation: The request for your CFM page and the request for the embedded object are two totally different requests. (Even taking into account the case of a persistant HTTP connection, it's still a distinct request.) And, since you aren't using CF to generate the embedded o

RE: can we know database or driver name

2000-09-18 Thread Rick Osborne
For SQL Server, try: select @@version Microsoft SQL Server 7.00 - 7.00.699 (Intel X86) May 21 1999 14:08:18 Copyright (c) 1988-1998 Microsoft Corporation Standard Edition on Windows NT 4.0 (Build 1381: Service Pack 6, RC 1.3) Or, on mySQL: select version() 3.22.25

RE: Queries as Structures

2000-09-14 Thread Rick Osborne
[Steve: I'm cc-ing the list just in case others might be curious ...] >From the (admittedly minimal) research I've done on how CF stores queries internally, it appears that queries are stored as a structure of arrays. That is, you have a base structure (myQuery=StructNew()) and then each of the c

RE: dynamic variable label creation

2000-09-14 Thread Rick Osborne
Whoops! That should be: #Form["Member" & MemberIndex & "FirstName"]# #Form["Member" & MemberIndex & "MiddleName"]# #Form["Member" & MemberIndex & "LastName"]# Sorry about that! -Original Message--

RE: Queries as Structures

2000-09-14 Thread Rick Osborne
My personal point of view ... It all depends on what you are doing. I don't use dynamic queries now as often as I did on my last project, but I still do occasionally. One thing they are nice for is reporting and statistics. Say I have a set of related of UniqueIDs, Names, Emails, Dates, and Nu

RE: dynamic variable label creation

2000-09-14 Thread Rick Osborne
Maybe you are looking for something akin to the following? #Form[MemberIndex & "FirstName"]# #Form[MemberIndex & "MiddleName"]# #Form[MemberIndex & "LastName"]# Of course, if you are referencing Session vars instead of Form vars, replace appropriately. :) Does this work in 4.0? I kno

RE: Decimal places ??

2000-09-14 Thread Rick Osborne
Colin- A while back I wrote up a nice in-depth post on how to round to an arbitrary precision. I archived it at: http://www.egroups.com/message/cf-hacks/3 I won't bother reposting it here unless there is a demand for it. Let me know if it isn't what you are looking for. HTH, Rick -Origi

RE: cf query

2000-09-11 Thread Rick Osborne
This is due to the extreme strangeness that governs how CF escapes single quotes. You will probably need to use PreserveSingleQuotes(), just be aware that it will leave escaping the individual parts of the clause up to you. For example: SELECT PersonID, Name FROM People

RE: SQL Joins

2000-09-11 Thread Rick Osborne
I wrote up a HOWTO on this a while back for a couple of friends. It covers theory and benefits/losses for the different methods of joining and subquerying, all in nice normal english. It might be more useful in the long run than just telling you the answer straight out. :) See: http://www.rixs

RE: REGEX for everything but numbers

2000-09-11 Thread Rick Osborne
Try "[^[:digit:]]+". The carat (^) at the beginning of a character class ([]) negates the entire class. #original# -- #new# -Regex Rick -Original Message- From: Russel Madere [mailto:[EMAIL PROTECTED]] Sent: Monday, September 11, 2000 2:27 PM To: CF Talk Mailing List Subject

RE: More structure questions

2000-09-11 Thread Rick Osborne
Try StructDelete(): -Rick -Original Message- From: Jon Tillman [mailto:[EMAIL PROTECTED]] Sent: Monday, September 11, 2000 12:10 AM To: [EMAIL PROTECTED] Subject: More structure questions Okay, so I have a working structure that I can put data into, and show the result

RE: REFind, how to get the 1st space in an index

2000-09-07 Thread Rick Osborne
To strictly answer your qestion, try: REFind("[[:space:]]",line) However, I will tell you that it looks to me like you are doing things the long way around. :) Given the line you gave as an example, could you not just do something akin to: -Rick -Original Message- From: And

RE: next row in

2000-09-05 Thread Rick Osborne
Instead of using use . Then just make sure that you reference all your vars as #x.FieldName[i]#. Or, you should be able to use the CurrentRow variable from that first loop. EIther way will work, it just depends on which you think you like better. SELECT bug_id BugID, created_dt Created

RE: ODBC Date errors

2000-09-05 Thread Rick Osborne
You didn't read the documentation for the DaysInMonth() function, did ya? :) You can't just pass in a month number, you have to pass in a full date. Think about February. Wouldn't work in leap years, right? Instead, try using: DaysInMonth(Today) That should clear things right up. -Rick --

RE: Dates

2000-09-01 Thread Rick Osborne
Peter Theobald said: >What exactly is the difference between the different date types? Nothing. Just different ways of representing the same data to different precision. A timestamp (ts) includes hour/minute/second whereas a small date (d) includes only the year/month/day itself. Like the diff

RE: StructClear

2000-09-01 Thread Rick Osborne
Just 'cause I'm on a run of disagreeing with Jeremy today ... ;) Jeremy Allen said: >Since one object merely references something else and does nto >actually copy the data and get its own set of data >So, this opens up some interesting possibilities. >Namely custom data structures among other thi

RE: DATA MISSING!!! (back button)

2000-09-01 Thread Rick Osborne
This occurs when you do something akin to the following: Start at . POST to . POST again to . Go back to . Since was generated by a POST, Navigator (and even IE) will not let you see the page again. That's the way it works. The same thing can happen if the file stays the same and is POSTing t

TTMYGG: Single-quote escaping

2000-09-01 Thread Rick Osborne
bugs_bugs WHERE (area_tx = '#struct["name"]#') Structs with brackets work. Structs with brackets are broke. -- Rick Osborne -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ T

RE: getting data from queries as a structure/array

2000-09-01 Thread Rick Osborne
Oh, one more reason for not using Evaluate() - structures can hold keys that aren't CF-Variable-Name-Compliant and Evaluate() can't handle them. For example, numeric struct keys will generate an error with Evaluate(): The code: 01: 02: 03: 04: 05: 06: 07: 08: 09: 10: #CFCATCH

RE: StructClear

2000-09-01 Thread Rick Osborne
This is not true. :) The StructClear() function does the exact same thing your loop does - it completely empties the structure of both keys and values (data). Don't believe me? Try it: #StructCount(Bag)# #StructCount(Bag)# You will get the following result: 100 0 -Rick -Original

RE: Found NT Auth_User -- Need a FULLNAME

2000-09-01 Thread Rick Osborne
Don't forget to send the author an email and let him know that you find the tag useful. Compliments and feedback keep freeware/opensource developers motivated. ;) -Rick -Original Message- From: Paul Sizemore [mailto:[EMAIL PROTECTED]] Sent: Friday, September 01, 2000 11:40 AM To: '[EMA

RE: Structures, Arrays, Array of Structures

2000-09-01 Thread Rick Osborne
Robert - Depends on your data layout. I use arrays of structures, structures of arrays, structures of structures, and arrays of arrays, all the time. Whatever is most logical and most efficient for you to use. I'm sure if you want to post a small exaple of your data structures that you'll get a

RE: Escaping Pound Signs in a CF Query....

2000-09-01 Thread Rick Osborne
Mark- I haven't worked with Access in a while, but IIRC ... (can someone verify this?) You can escape a table name or field name with non-alphanumeirc characters by surrounding it with brackets []. Seeing as how this particular character is a hash, you'll probably also have to escape it, too.

RE: StructClear

2000-09-01 Thread Rick Osborne
Stas- The StructClear() function completely empties a structure; keys and everything. Let's extend this for a second. Take the following situation: A structure with 2 keys, right? Now, you can clear this structure one of two ways: There is an important distinction,

RE: getting data from queries as a structure/array

2000-09-01 Thread Rick Osborne
I have several reasons for not using evaluate: 1. I think it is *very* ugly. 2. I think that if you're using Evaluate() then you're probably not doing something right, or you haven't thought it through fully. There are a few occasions where it is necessary, but not as often as it is used. (Tie-

RE: Rounding to two decimal places

2000-08-31 Thread Rick Osborne
Try: In case the math isn't intuitive: You take Float (=3.1415926). You multiply it by 100 (=314.15926). You round it off (=314). You then divide by 100 (=3.14). You can get any number of decimals using this. If you need it to be variable: HTH, -Rick -Original Message- From:

RE: Structures No? Cached Queries Yes?

2000-08-31 Thread Rick Osborne
I'm a little confused as to what you are doing here. Can you paste a short code snippet? I keep queries in structures in memory all the time and access is pretty much instantaneous, so I'm guessing that's not what you are doing? -Rick -Original Message- From: paul smith [mailto:[EMAIL

RE: getting data from queries as a structure/array

2000-08-31 Thread Rick Osborne
Yep, this is pretty cool. You can say: As it seems, you will get the UniqueID field of the 3rd row of myQuery. You can therefore think of a query as a structure of arrays (it isn't, but that's how you can think of it if that helps you). A common mistake is to use the (more natural, I think,

RE: dynamic variables (cont.)

2000-08-30 Thread Rick Osborne
You just need another Evaluate() in your second loop: You Picked: #ThisName# (#ThisValue#) HTH, Rick -Original Message- From: Kathy Bergman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 30, 2000 2:45 PM To: [EMAIL PROTECTED] Subject: dynamic variables (cont.) On t

RE: Too many queries?

2000-08-28 Thread Rick Osborne
Not that I've found so far ... I saw one guy who did over 100 queries in a page. (Which was the first thing I changed when I got hold of the code.) Of course, there were only 4 or 5 different names, so they just kept overwiting eachother. So, I don't know about a large number of uniquely-named

RE: password generation code snippet needed

2000-08-28 Thread Rick Osborne
How about: #GenWord# HTH, Rick -Original Message- From: Stas Newdel [mailto:[EMAIL PROTECTED]] Sent: Monday, August 28, 2000 4:49 PM To: CFTalk Subject: password generation code snippet needed Hello, Does anyone have code lying around that will generate an alpha-numeric

RE: Sorting Query results

2000-08-28 Thread Rick Osborne
>>> Lisa Hamlin [mailto:[EMAIL PROTECTED]] We have a customer who wants to take the results of a query and sort them by a specific column. <<< There are several tags that will do this. Some are straight CF, some are CFX. See: http://devex.allaire.com/Developer/Gallery/SearchResults.cfm?keyword

What I want in CF (was: Learning ASP)

2000-08-28 Thread Rick Osborne
>>> Dave Watts [mailto:[EMAIL PROTECTED]] I agree that the interfaces for SMTP, POP, HTTP, etc. need a lot of work. As for other stuff, I'm kind of curious. What basic functionality would you like to see? I can't really think of all that much that I'd like to see added. <<< Personally, I've got a

RE: How do I get my Current URL

2000-08-25 Thread Rick Osborne
That should not work. The PATH_INFO variable should go *after* the SCRIPT_NAME and *before* the QUERY_STRING. You also left out SERVER_PORT, just in case, and you'll probably even want to add in something to check for HTTPS, but that can't be done in one line without an IIF. ;) Try: http://#C

RE: Concatenate Strings

2000-08-24 Thread Rick Osborne
-Rick -Original Message- From: Peter Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 24, 2000 1:57 PM To: '[EMAIL PROTECTED]' Subject: Concatenate Strings How can I concatenate 2 strings in CF?

RE: ColdFusion Regex

2000-08-24 Thread Rick Osborne
Jeremy Allen said: > ","","ALL")> > the "script.*" portion of the regex searches ALL the way > to the end of the string and then it goes backwards one > character at a time until it finds the closing ">" > How to fix this? > $strFoo =~ s/<\/?script.*?>//ig; You are correct in your non-greedy need

RE: splitting strings

2000-08-24 Thread Rick Osborne
In true Perl fashion, there's more than one way to do it (tho, I wouldn't recommend anything but the first): Just to name a few ... -Rick -Original Message- From: Peter Benoit [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 24, 2000 11:54 AM To: '[EMAIL PROTECT

RE: checking for tables?

2000-08-24 Thread Rick Osborne
I tend to go for the simple approach: if object_id('tablename') is null create table tablename ( ... ) Since it's all done in one statement in SQL, you don't have to worry about reentrancy. -Rick -Original Message- From: Jon Tillman [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 24,

RE: How To Create A Live Session Counter

2000-08-21 Thread Rick Osborne
We built something like this as part of an anti-data-mining script. Basically, we kept a structure in the Application scope that was a pool of Session IDs (keys) and last time visited (values). When each page was hit this time was updated and there was a chance that a "garbage collection" routine

  1   2   >