DateDiff Weirdness/Possible bug

2011-06-09 Thread Ruslan Sivak

I'm having trouble with different results for DateDiff between CF and SQL
Server.  I'm guessing it has something to do with DST, but it seems that CF
is doing it wrong.

Doing a SQL Query like this:

select DateDiff(s,'1/1/1970','6/1/2011') as datediff

I get 1306886400.

Doing



I get 1306882800.

Converting SQL's result back to Date using CF:

#dateAdd('s',1306886400,'1/1/1970')#

I get  {ts '2011-06-01 01:00:00'}

According to http://www.epochconverter.com/, 1306886400 is the correct
number of seconds for midnight on June 1st, 2011.

Is there a reason that CF is returning the wrong number of seconds?

Russ


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345140
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFMX 6.1 Shutting down

2005-05-06 Thread Ruslan Sivak
We have CFMX 6.1 on our servers with MS Sql backend on a diff server.  It's 
been running more or less stable over the past 6 months or so... Since 
yesterday, it has been crashing with the browser getting the message 

"Server Error
The server encountered an internal error and was unable to complete your 
request. 
JRun closed connection."

When I checked the server, jrun was still running, and restarting the server 
often fails (You have to end the jrun process manually through the task 
manager).  

I poked around the logs a little bit, but haven't been able to find anything 
usefull in there as to what is going on.  

We're on Windows 2003 server (standard) with about 1.5 gb of ram (I noticed 
that this happens when the PF usage in windows gets to around 1.5 GB).  We do 
have plenty of virtual memmory and I understand that it would run slower once 
it starts using the page file more, but why would it just fail like that?

We have been getting more traffic over the last few days then we're used to, 
but I still dont' see why the cf service would just hang up like that. 

Any suggestions would be appreciated. 

Russ

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205860
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


CFMail Weirdness

2004-01-25 Thread Ruslan Sivak
We have a weird problem happening with our server.  I have figured out the
how, but can't figure out they why, and/or how to prevent it. 

We have Win2k with CF 4.5 running.  We also have our stats program run every
night (basically a scheduled CF page which CFExecutes a bunch of .BAT
files).   Now for some reason, these stats (we're using analog and
reportmagic) are opening a file in the CF spool directory.  I ran some
tools, and it seems that the analog process, the report magic process and
the cmd.exe process (inside which analog and report magic run) have a handle
to a certain file in the CF's mail spool folder.  

When that happens, CF tries to send that file out, and whether it's
successful or not goes berserk. If it's a valid e-mail, then it proceeds to
send out thousands upon thousands of copies of that e-mail.  (Basically what
happens is CF reads the spool folder, sends out the e-mail, tries to delete
it and fails.  Then it again reads the spool folder, finds that e-mail in
there, and sends it again, over and over and over).  

If it's unsuccessful (I.E. for some reason it's a bad e-mail), it tries to
move a copy to the undelivr folder.  It copies it there, and then tries to
delete the original from the spool folder.  Since the file is locked, a
sharing violation occurs once again, and CF proceeds to fill up the undelivr
folder.  

Now I have no idea why the stat programs are doing in the CFMail spool
folder.  They have no business being in that drive, much less that folder.
(They read logs located on a different drive and write statistics to a
different drive.).  So I'm not sure how to prevent that, perhaps someone has
any ideas. 

Does anyone know how to make CF stop acting crazy when it encounters
something like this?  I mean it has spool.ini file, does that do anything?  

Russ
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




CFMAIL acting funny on CF 4.5

2003-11-15 Thread Ruslan Sivak
We're running CF4.5 (latest service pack as far as I can tell) and we keep having a weird problem.  If one of our pages generates a CFMail that has a blank to address, for some reason ColdFusion generates many copies of that mail (50K+).  

Has anyone come across this and knows how to fix it?

Russ
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Threads in CF

2003-01-14 Thread Ruslan Sivak
Is it possible to code CF and use threads?  For example I might have a
CFHTTP request processing, which takes around a second.  I have enough
bandwidth for several such requests.  Can I make a CFM page which runs
itself in threads, or do I have to make it thread safe and just call it
from a browser a bunch of times?  I know CF runs threads for different
requests, but can u do it programmatically from code?  

Russ

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: CFHTTP and passing cookies

2003-01-02 Thread Ruslan Sivak
I solved my problem by now.  Turns out CF was URLEncoding the = sign,
and the server didn't like that as much.  Is there a way to stop CF from
encoding the cfhttpparam variables?

Russ

-Original Message-
From: Christian Cantrell [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 02, 2003 10:53 AM
To: CF-Talk
Subject: Re: CFHTTP and passing cookies

You are saying that it works in IE, but not in another browser like  
Netscape?

One thing I noticed is that the elements in your cookie array are URL  
encoded.  I think that cfhttpparam automatically URL encodes its  
values, so it's possible your values are getting double URL encoded.  I

haven't tested any of this, though, so this is just a guess.

Christian

On Wednesday, January 1, 2003, at 06:57 PM, Ruslan Sivak wrote:

> I went to staples.com and added an item to my shopping cart.  Then I  
> got
> all the cookies that were set by using
> javascript:document.write(document.cookie);
>
> Now I'm using the following code to set the cookies and do a cfhttp.
> For some reason when I do the cfhttp it tells me that there are no  
> items
> in my cart.  When I go to the same page in IE, I see items in my cart.
>
> 
> 
> 
cookies[2]="ShopperManager%2F=ShopperManager%2F=7A7836F85ACB43FBA352335 
> 4
> CA7E4083">
> 
> 
> 
> 
>
>
> http://www.staples.com/";>
>
> http://www.staples.com/Cart/default.asp"; method="POST"
> useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
> 1.0.3705)" redirect="No">
>   
>name="#ListFirst(cookies[x],'=')#" value="#ListRest(cookies[x],'=')#">
>   
> #ListFirst(cookies[x],'=')#=#ListRest(cookies[x],'=')#; cfout
> put>
>   
>   
> 
> #cfhttp.header#
> #cfhttp.filecontent#
>
> That was the code, and here is the header I get back.
>
> HTTP/1.1 200 OK
> Server: Microsoft-IIS/5.0
> Date: Wed, 01 Jan 2003 23:43:06 GMT
> Pragma: no-cache
> Connection: Keep-Alive
> Content-Length: 19794
> Content-Type: text/html
> Expires: Tue, 01 Jan 1980 05:00:00 GMT
> Set-Cookie: PageType=1; expires=Tue, 31-Dec-2002 05:00:00 GMT; path=/
> Cache-control: no-cache
>
> If I try the get method, then I can't pass in any cookies (it tells me
> that I can't have cfhttpparam when the method is get.  Am I doing
> something wrong?  Why are the items not showing up in the shopping  
> cart?
> I can't imagine what else they can be using for passing variables.
>
>
> Russ
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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



RE: CFHTTP and passing cookies

2003-01-01 Thread Ruslan Sivak
Why would the same session ID not be valid for the server (which is
running on the same pc as the browser)?  Also I tried getting all the
cookies from the server, but I couldn't get that working either, so I'm
hoping to get it working with the same session.  

Russ

-Original Message-
From: Jesse Houwing [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 01, 2003 8:31 PM
To: CF-Talk
Subject: Re: CFHTTP and passing cookies

Ruslan Sivak wrote:

>I went to staples.com and added an item to my shopping cart.  Then I
got
>all the cookies that were set by using
>javascript:document.write(document.cookie);
>
>Now I'm using the following code to set the cookies and do a cfhttp.
>For some reason when I do the cfhttp it tells me that there are no
items
>in my cart.  When I go to the same page in IE, I see items in my cart.

>
>
>
>cookies[2]="ShopperManager%2F=ShopperManager%2F=7A7836F85ACB43FBA352335
4
>CA7E4083">
>
>
>
>
>  
>
You first need to CFHTTP the site to get a new sessionid (the one you 
used in your browser is not valid for the server) and insert that into 
your cookies.

Then CGHTTP to update the cart.

Make sure you save the ASPsessionid in a coldfusion session variable so 
you can use it again in that session.

Jesse


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



CFHTTP and passing cookies

2003-01-01 Thread Ruslan Sivak
I went to staples.com and added an item to my shopping cart.  Then I got
all the cookies that were set by using
javascript:document.write(document.cookie);

Now I'm using the following code to set the cookies and do a cfhttp.
For some reason when I do the cfhttp it tells me that there are no items
in my cart.  When I go to the same page in IE, I see items in my cart.  










http://www.staples.com/";>

http://www.staples.com/Cart/default.asp"; method="POST"
useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705)" redirect="No">



#ListFirst(cookies[x],'=')#=#ListRest(cookies[x],'=')#;
 


#cfhttp.header#
#cfhttp.filecontent#

That was the code, and here is the header I get back.  

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 01 Jan 2003 23:43:06 GMT
Pragma: no-cache
Connection: Keep-Alive
Content-Length: 19794
Content-Type: text/html
Expires: Tue, 01 Jan 1980 05:00:00 GMT
Set-Cookie: PageType=1; expires=Tue, 31-Dec-2002 05:00:00 GMT; path=/
Cache-control: no-cache

If I try the get method, then I can't pass in any cookies (it tells me
that I can't have cfhttpparam when the method is get.  Am I doing
something wrong?  Why are the items not showing up in the shopping cart?
I can't imagine what else they can be using for passing variables.  


Russ

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Make a template run forever

2002-11-11 Thread Ruslan Sivak
I know there is a timeout attribute... but is there one that will make
it run forever?  

I'd like to use a template with some CFX_SLEEP's in it, and I don't want
it to stop executing due to timing out.  What can I use?  

I can restart the cf service if needed to stop the execution later on.  

Russ


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



CFHTTP, CFFILE and JPG files

2002-11-11 Thread Ruslan Sivak
I'm trying to save an image using CF.  
Here is my code.  It should be working although it says that CFFILE
action=write is for text files.  However, once I run this in a browser,
cfhttp.filecontent seems to only have 4 bytes of data.  And it's not an
image.  

What am I doing wrong?

Russ

http://www.x-deals.com/bar.jpg"; method="GET"
useragent="Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+6)"
throwonerror="Yes" timeout="20" redirect="Yes">


#cfhttp.mimeType#
#cfhttp.header#
#cfhttp.statuscode# 
#Len(cfhttp.fileContent)# 
#cfhttp.fileContent#






~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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



RE: last day of month

2002-11-03 Thread Ruslan Sivak
Hmm... how about adding a month and subtracting a day to the first day
of the month?  

#DateAdd("d",-1,DateAdd("m",1,CreateDate(Year(Now()),Month(now()),1)))#

Russ
-Original Message-
From: Tony Weeg [mailto:tony@;navtrak.net] 
Sent: Monday, November 04, 2002 12:56 AM
To: CF-Talk
Subject: last day of month

is there an easy way to generate a lastDayofMonth
kinda number, knowing the month/year?

want to give the user the ability to click a checkbox
that will autopopulate two date fields, with the first day
and last day of month based on the month that Now() will
give me.  ive got it all down, i can globally put 1 in for
beginningDayofMonth, however
i cant seem to figger out an easy way to make it dynamic for
the lastDayofTheMonth

make sense?

..tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331 


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: permission Issue

2002-11-03 Thread Ruslan Sivak
I think the problem might be that Bobby doesn't have permission to read
files in the directory above the protected one.  And since Bobby is not
IUSER, he doesn't have access to the directory above the protected one.
ColdFusion is probably trying to read some file in that directory (like
application.cfm), and is failing. 

So the solution is to give Bobby read access to the whole site.

Russ

-Original Message-
From: brook [mailto:brook@;maracasmedia.com] 
Sent: Sunday, November 03, 2002 11:24 PM
To: CF-Talk
Subject: permission Issue

This sounds like the same problem Lee was having.

I have a website which allows anonymous connections. The cfm file's are 
served up properly here. The folder has read/read&execute permissions
for 
the IUSER.

Then there is Virtual Directory inside of this website which restricts 
access using windows authentication. This folder has read/read&execute 
permissions for a user, lets call him Bobby. Bobby can log into this 
directory when prompted but when he attempts to access a cfm file, he
gets 
the password prompt. Bobby has permissions on the files in the directory

and also read/read&execute on the wsconfig\1\jrun.dll. Bobby can access 
html files just fine. If access to this virtual directory is set back to

allow anonymous access, there is no password prompt when the cfm files
are 
requested.

So, Bobby does not have permission to execute cfm files. Where did I go 
wrong on the settings, what am I missing?

Brook


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Commit one query while rolling back the rest within a CFTRANSACTION

2002-10-07 Thread Ruslan Sivak

I have a piece of code that has CFTRANSACTION tags around it.  When the
credit card authorization fails, I roll back all the queries, however I
would like to insert a record into a log table.  Is there a way to do
that?  

Russ

Example



some credit card processing code here








   query I want to run


  



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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



RE: iif usage

2002-09-08 Thread Ruslan Sivak

Iif is necessary in certain cases.  Last time I checked, you can't use
cfif inside other cf tags...  (Maybe in mx you can). 

Russ

-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 8:48 PM
To: CF-Talk
Subject: Re: iif usage

On Sunday, September 8, 2002, at 02:24 , Ruslan Sivak wrote:
> Hi, I'm having a problem with iif.

Don't use it. If you used cfif, you wouldn't be having these problems.
You'
ve got a boolean test and you set a string value which you then test
later 
(why not just use the same test or at least use a boolean type - fast - 
instead of a more expensive string test?). iif() should be avoided in 
almost all cases.

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: iif usage

2002-09-08 Thread Ruslan Sivak

That's the whole point, Joe... I have the following code above it
 

somequery



So therefore, qryAreas.name will only be defined if qryCustomer.allareas
is false.  

I mean I have commented out the cfif above, so that the query runs in
either case, but I'd still like to know how to get the iif to work the
way I want it to. 

Russ

P.S.  Yes, sorry about missing the single quotes in the middle.  I have
the following code now, but still has the same problem if the qryAreas
is not defined and qryCustomer.allareas is true:

#iif(qryCustomer.allareas," 'All Areas' "," '#ValueList(qryAreas.name,',
')#' ")#
-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 6:32 PM
To: CF-Talk
Subject: Re: iif usage

Carefully note the usage of single and double quotes.. there are there
for a
reason!
and make sure... u have the query.columnName.. u are pointing..to

#IIF(qryCustomer.allareas," 'All Areas' ","
'#ValueList(qryAreas.name,',')#'
")#


Joe
- Original Message -
From: "Ruslan Sivak" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, September 08, 2002 6:03 PM
Subject: RE: iif usage


> #iif(qryCustomer.allareas,"All Areas"," '#ValueList(qryAreas.name,',
> ')#' ")#
>
> Doesn't work either.
>
> Parameter 1 of function ValueList which is now "qryAreas.name" must be
> pointing to a valid query name
>
> Russ
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 08, 2002 5:49 PM
> To: CF-Talk
> Subject: Re: iif usage
>
> qryCustomer.allareas should be a "0" or any number other than "0"
which
> is
> True
>
> your statment should look like below.. u dont need "DE"
>
> #IIF(qryCustomer.allareas," 'All Areas' ","
> '#ValueList(qryAreas.name,',')#'
> ")#
>
> Which means if qryCustomer.allareas !=0 ...display "ALL Areas"
> else
> Display qryAreas.name list..
>
> Joe
>
>
> - Original Message -
> From: "Ruslan Sivak" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Sunday, September 08, 2002 5:24 PM
> Subject: iif usage
>
>
> > Hi, I'm having a problem with iif.
> >
> > If I do
> >
> > #iif(qryCustomer.allareas,DE("All
> > Areas"),DE("#ValueList(qryAreas.name,', ')#"))#
> >
> > and qryCustomer.allareas is true, therefore qryAreas is undefined (I
> > check for it with an cfif somewhere else), then I get an error
> > "Parameter 1 of function ValueList which is now "qryAreas.name" must
> be
> > pointing to a valid query name"
> >
> > If I make it
> >
> > #iif(qryCustomer.allareas,DE("All
> Areas"),DE("ValueList(qryAreas.name,',
> > ')"))#
> >
> > then it works fine in this case, but fails when qryCustomer.allareas
> is
> > false as it doesn't evaluate the ValueList(qryAreas.name,', ')
> >
> > What am I doing wrong?
> >
> > Russ
> >
> >
>
> 

__
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: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: iif usage

2002-09-08 Thread Ruslan Sivak

#iif(qryCustomer.allareas,"All Areas"," '#ValueList(qryAreas.name,',
')#' ")#

Doesn't work either.

Parameter 1 of function ValueList which is now "qryAreas.name" must be
pointing to a valid query name

Russ
-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, September 08, 2002 5:49 PM
To: CF-Talk
Subject: Re: iif usage

qryCustomer.allareas should be a "0" or any number other than "0" which
is
True

your statment should look like below.. u dont need "DE"

#IIF(qryCustomer.allareas," 'All Areas' ","
'#ValueList(qryAreas.name,',')#'
")#

Which means if qryCustomer.allareas !=0 ...display "ALL Areas"
else
Display qryAreas.name list..

Joe


- Original Message -
From: "Ruslan Sivak" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, September 08, 2002 5:24 PM
Subject: iif usage


> Hi, I'm having a problem with iif.
>
> If I do
>
> #iif(qryCustomer.allareas,DE("All
> Areas"),DE("#ValueList(qryAreas.name,', ')#"))#
>
> and qryCustomer.allareas is true, therefore qryAreas is undefined (I
> check for it with an cfif somewhere else), then I get an error
> "Parameter 1 of function ValueList which is now "qryAreas.name" must
be
> pointing to a valid query name"
>
> If I make it
>
> #iif(qryCustomer.allareas,DE("All
Areas"),DE("ValueList(qryAreas.name,',
> ')"))#
>
> then it works fine in this case, but fails when qryCustomer.allareas
is
> false as it doesn't evaluate the ValueList(qryAreas.name,', ')
>
> What am I doing wrong?
>
> Russ
>
> 

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



iif usage

2002-09-08 Thread Ruslan Sivak

Hi, I'm having a problem with iif.  

If I do

#iif(qryCustomer.allareas,DE("All
Areas"),DE("#ValueList(qryAreas.name,', ')#"))#

and qryCustomer.allareas is true, therefore qryAreas is undefined (I
check for it with an cfif somewhere else), then I get an error
"Parameter 1 of function ValueList which is now "qryAreas.name" must be
pointing to a valid query name"

If I make it 

#iif(qryCustomer.allareas,DE("All Areas"),DE("ValueList(qryAreas.name,',
')"))#

then it works fine in this case, but fails when qryCustomer.allareas is
false as it doesn't evaluate the ValueList(qryAreas.name,', ')

What am I doing wrong?

Russ

__
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
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Regular Expressions

2002-09-03 Thread Ruslan Sivak

What does  [^>]*? Mean exactly?  I seem to be using something similar in
my old code but can't remember what it means.  

I know perl regular expressions and this doesn't seem to make sense.
[^>] means expression starting with a > then * is a modifier meaning
zero or more and ? is a modifier meaning 0 or 1 times.  I don't
understand how that is legal regex.  Is CF regex that much different
then perl?

Russ

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 10:34 AM
To: CF-Talk
Subject: Re: Regular Expressions

> Posted this yesterday, but it never made it on the list.

> I'm a little rusty on my regular expressions.  Can somebody help me
out
> with these two that I'm having problems with.

> The first is

>  color=".?AA">\$([0-9\.]+)',testString,1,"TRUE")>
> 
> #price#

> It's supposed to match

> Our New Price: $84.00
>
> It works fine, but I think the regex could be better?
>

Try this

]*?>\$([\.,0-9]+?)',"\1")>
#price#

This will ignore any attributes within the font tag so you don't have to
worry about them changing... It also sets your price with a single

rather than 2

> The second one I can't get to match
>
>  ALT="[A-Za-z ]+" HEIGHT="125" WIDTH="100">',testString,1,"TRUE")>
> 
> #src#
>
> Is supposed to match
>
> 
SRC="http://a1204.g.akamai.net/7/1204/1401/02050212011/images.barnesandn
> oble.com/images/507/5077366.gif" vspace=0 border=0 ALT="Operating
> Systems" HEIGHT="125" WIDTH="100">
>
> and return the URL.

Depends on your requirements... Do you need the image specifically which
has
the ALT attribute of "Operating Systems"? If so, you might try this:

]*?alt="Operating
Systems"[^>]*?>)',"\1")>


The first regex gets your image tag, then the 2nd regex gets the src
attribute out of that. This should work even if they move the alt tag
around...


hth

Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Regular Expressions

2002-09-03 Thread Ruslan Sivak

Posted this yesterday, but it never made it on the list.  

I'm a little rusty on my regular expressions.  Can somebody help me out
with these two that I'm having problems with.  

The first is 

\$([0-9\.]+)',testString,1,"TRUE")>

#price#

It's supposed to match 

Our New Price: $84.00

It works fine, but I think the regex could be better?

The second one I can't get to match

',testString,1,"TRUE")>

#src#

Is supposed to match 

http://a1204.g.akamai.net/7/1204/1401/02050212011/images.barnesandn
oble.com/images/507/5077366.gif" vspace=0 border=0 ALT="Operating
Systems" HEIGHT="125" WIDTH="100">

and return the URL.  

Any ideas?

Russ

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: TEST

2002-09-03 Thread Ruslan Sivak

test

-Original Message-
From: Frank Mamone [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 03, 2002 9:20 AM
To: CF-Talk
Subject: TEST

TEST


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CF 5 Certification

2001-07-17 Thread Ruslan Sivak

Well, as of last Saturday, CF 4.5 certification is no longer being
offered and as of last Sunday, the CF 5.0 Certification is offered.  I'm
about to take it this coming Sunday, but I'm a little nervous, as Ben's
book (Certified ColdFusion Developer Study Guide) doesn't talk about CF
5 features at all, even though the book was just published a few months
ago.  

Has anyone taken the CF 5 exam yet, or does anyone know if it will cover
any CF 5 specific features? 


Russ


~~
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: "isdefined" obsolete?

2001-02-23 Thread Ruslan Sivak

The only time I had a problem using isDefined is when I forgot to use
quotation marks around the variable.  The other thing is I don't think
isdefined works well on structs, you have to use StructKeyExists. 

-Original Message-
From: C Frederic Valone [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 1:48 PM
To: CF-Talk
Subject: Re: "isdefined" obsolete?


If you see my previous response you'll see I tried all forms of syntax...
even those I "knew" were incorrect as stated the
problem was not logical so I tried illogical solutions as well.
This happened I would say two years or more ago... so I doubt very much I
was using 4.5.1 as it hadn't been released...I only
mentioned the whole issue as an FYI. I see it did happen for someone else on
the list as well.
Frederic

Philip Arnold - ASP wrote:
> 
> > Sorry to contadict you Adrian, but I can say with complete conviction
> > (and no explanation at all) that these experiences did happen...I
> > know that obviously a variable either exists or doesn't. That
> > doesn't mean that in every instance a function will work though.
> > I replaced the  isdefined function (after checking to be sure the
> > syntax was correct) with parameterexists and it worked. I
> > switched it back to isdefined and it did not. I did it in more than one
> > instance and I confirmed the issue and verified the results of
> > the workaround with other cf programmers on site.
> 
> As long as the quotes are around the variable name, then it will work -
> unless you're running a not-upgraded version of CF (4.0 or 4.5 rather than
> 4.0.1 and 4.5.1 SP2)
> 
> I've never had a problem with isDefined(), and it's much easier to use
than
> ParameterExists(), especially if you're using dynamic names
> 
> isDefined("form.#i#") is easier than Evaluate("ParameterExists(form.#i#)")
> for obvious reasons although both should work exactly the same
> 
> 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: Dynamic Structs

2001-02-22 Thread Ruslan Sivak

Where would I have to use an evaluate?  I though most of these evaluated
automatically?


-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 12:28 PM
To: CF-Talk
Subject: RE: Dynamic Structs


u have to do an evaluate. look at it this way.  let's say i want to output
Form variables (which already have values) dynamically.  Let's say
Form.Item1 = "hi"  Form.Item2 = "how" and Form.Item3 = "who".  u must use
the EVALUATE function




Evaluate('Form.Item' & number)




  u get...
hi
how
who







-Original Message-
From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 10:34 AM
To: CF-Talk
Subject: Dynamic Structs


I'm trying to create a dynamic struct.  I have something like this


Is It Defined -
#IsDefined("Session.#form.session_prefix#selected_locations")#




Is it a Struct -
#IsStruct("Session.#form.session_prefix#selected_locations")#


It prints out:
Is It Defined - NO Is it a Struct - NO 

Whey doesn't it create the struct properly?

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



Dynamic Structs

2001-02-22 Thread Ruslan Sivak

I'm trying to create a dynamic struct.  I have something like this


Is It Defined -
#IsDefined("Session.#form.session_prefix#selected_locations")#




Is it a Struct -
#IsStruct("Session.#form.session_prefix#selected_locations")#


It prints out:
Is It Defined - NO Is it a Struct - NO 

Whey doesn't it create the struct properly?

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



CF Source Code?

2001-02-16 Thread Ruslan Sivak

I'm planning to develop the core of CF in Java for my Senior Project class
in college.  I know that CF is a commercial product, and finding the source
code would be next to impossible, so can anyone suggest what direction I
should look to find out the CF internals?  Are there any good books on
writing interpreters?  Are there books that explain the CF internals?  Any
other comments?


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: WINNT/TASK could not start

2001-02-15 Thread Ruslan Sivak

Hmm... try running the task yourself and see if it runs.  (Going to the task
schelduler and selecting run for that task.)  If it doesn't run, you might
have a permission problem, make sure you set the right username/pw in the
run as page.

-Original Message-
From: PEREZ, RICHARD RINGO (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:06 PM
To: CF-Talk
Subject: OT: WINNT/TASK could not start


Does anybody here experience a message "COULD NOT START" status on your
scheduled WINNT tasks? I don't know where to fix this? Can somebody let me
know if they experience this and know how to fix it.

Thank you.
~~
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



VTML

2001-02-02 Thread Ruslan Sivak

I build a custom tag and I'm trying to do an "Edit Tag" wizard for it.  I
pretty much got an idea on how to do it, but it's a pain.  Are there tools
to help with this kind of thing?

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



iif usage

2001-01-25 Thread Ruslan Sivak

I'm using iif, and running into some weird things.  Well first of all I'm
generating CF on the fly, so I need to escape # so that the variables don't
get evaluated until they are in the generated file.  For example I'm using
something like this.  Is this the right way to do it or is there an easier
way?

#iif(isDefined("Attributes.display"),DE(RTrim("#attributes.name#_query.#
attributes.display#")),DE(""))#

Do I really need the 5 pound signs?  Attributes.name is getting evaluated
right now, and so is attributes.display.  Lets say Attributes.name is
"first" and attributes.display" is "first_name" then it should return
#first_query.first_name#  with the pound signs around it.  

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: setting multi line strings

2001-01-19 Thread Ruslan Sivak

No, I've already figured it out.  It works.  What I'm trying to do is to
generate CF on the fly.  Simple cfinclude would not work.  

-Original Message-
From: Cornillon, Matthieu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 2:53 PM
To: CF-Talk
Subject: RE: setting multi line strings


Ruslan,

I'm not sure what you're aiming for here.  How will you use myhtml later?
If you plan to use it to include bits of HTML within other pages, I would
put the HTML in a separate file and do a CFINCLUDE wherever you want to
insert it.  Does that do what you want?

Hope this helps,
Matthieu

> -Original Message-----
> From: Ruslan Sivak [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 17, 2001 12:03 PM
> To: CF-Talk
> Subject: setting multi line strings
> 
> 
> Is there a way to set multi line strings in CF.  For example 
> I have a piece
> of html and i want to set it to a variable. Something like this
> 
> 
> 
> 
> 
>   Untitled
> 
> 
> 
> 
> 
> 
> 
> ">
> 
> Is there a way to accomplish this?
> 
> 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: Storing/Encrypting Credit Cards

2001-01-19 Thread Ruslan Sivak

What I would do is encrypt the credit card, as well as the password using
the user's password as the key.  That way you need to know the password to
decrypt both of them.  So when the user logs in and makes an order, the
credit card can be decrypted, since they logged in with their password. 

I'm not sure exactly how the billing process works, and if you need the
credit card later to actually bill the order, but in that case you can store
it in a temporary table (with a different encryption method if necessary).

Just my $0.02

-Original Message-
From: Matt Wisdom [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 10:47 AM
To: CF-Talk
Subject: Storing/Encrypting Credit Cards


We need to store credit cards in a certain situation. I realize that this is
recommended against.

That being said, I have searched through the archives, and I haven't found
any solutions that are great. The best I found was to use a solid ( or
"pretty good" ;-) encryption for the credit card numbers in the database,
and then force the hacker to figure out how CF is unencrypting the numbers.
The other suggestions were ways to further obfuscate this process, but none
were "100%" solutions.

An alternate solution I am considering is to store part of the credit card
in our database, and part in a user cookie, both encrypted of course. We
already have a cookie requirement in the case where we need to store credit
cards, so that is not a problem. Also, I don't think that the users will
mind only being able to access their credit cards from the machine from
which they were saved.

Is anybody utilizing this method?

Matt
~~
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

2001-01-18 Thread Ruslan Sivak

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: Unable to Verify ODBC

2001-01-17 Thread Ruslan Sivak


The system account is a special account that most services run under.  It
has special permissions for files, etc, and I believe you cannot log on as
system.  You can add or remove the permissions for system, but I wouldn't
recommend removing any unless you know what you're doing.

Russ
-Original Message-
From: Peter J. MacDonald [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 2:50 PM
To: CF-Talk
Subject: RE: Unable to Verify ODBC


What is the System Account?


Thank You,
Peter

Peter J. MacDonald II
Creative Computing, Inc.
100 Middle Street
Lincoln, RI 02865
Phone: 401.727.0183 x208
Fax: 401.727.4998
Portable: 401.965.3661
E-MAIL: [EMAIL PROTECTED]
Web Page: www.creatcomp.com



-Original Message-
From: Warrick, Mark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 14:08
To: CF-Talk
Subject: RE: Unable to Verify ODBC


Sure.

Open up the Services applet in the Control Panel. Click on the ColdFusion
Application Server, then Startup.

Look at the "Log On As" options.  The simplest way to solve this problem is
to make sure that you're using the System Account.

Do the same for the other ColdFusion services: Executive &  RDS.

Now I'm assuming that the DSN you're trying to hook up is for an Access
database.  Find that MDB file on the server and check it's permissions by
right-clicking on it, choosing properties, then security, then permissions.

If you used the SYSTEM account for the services, then it won't matter what
permissions are applied here, but if you used any other account, make sure
that same account has full control of the MDB file.

Hopefully this helps.  Basically, to sum it all up, don't screw with the
account settings unless you understand Windows NT security!


---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: Peter J. MacDonald [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 10:33 AM
> To: CF-Talk
> Subject: RE: Unable to Verify ODBC
> 
> 
> Mark,
> 
> Could you be a little more specific about the security issues.  I login as
> Administrator and have check all of the directories and files and
> administrator can open them no problem through that.  The 3 different CF
> services where running as default system login and now as administrator.  
> 
> 
> Thank You,
> Peter
> 
> Peter J. MacDonald II
> Creative Computing, Inc.
> 100 Middle Street
> Lincoln, RI 02865
> Phone: 401.727.0183 x208
> Fax: 401.727.4998
> Portable: 401.965.3661
> E-MAIL: [EMAIL PROTECTED]
> Web Page: www.creatcomp.com
> 
> 
> 
> -Original Message-
> From: Warrick, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 16, 2001 11:49
> To: CF-Talk
> Subject: RE: Unable to Verify ODBC
> 
> 
> If you're able to run ODBC connectivity tests through the control 
> panel with
> no problems, but not with the CF Administrator, then you probably have a
> permissions/security conflict.  Make sure that the ColdFusion server is
> running as a SYSTEM account or some other account that has permission to
> access those datasources.
> 
> ---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: Peter J. MacDonald [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 16, 2001 7:55 AM
> > To: CF-Talk
> > Subject: Unable to Verify ODBC
> > 
> > 
> > Help Please,
> > 
> > I have installed CFServer 4.5.1 on an NT Workstation 4.0 Build 5.  I am
> > trying to get it setup and run the Demo Applications.  I have 
> > installed the
> > current MDAC from MS.  I have checked ODBC connectivity through other
> > software and it is fine.  I can also change ODBC information 
> > through the CF
> > Admin interface.  When I run the Administrator test query I get a S1000
> > General ODBC error  Disk or network error.  Any Ideas appreciated.
> > 
> > 
> > Thank You,
> > Peter
> > 
> > Peter J. MacDonald II
> > Creative Computing, Inc.
> > 100 Middle Street
> > Lincoln, RI 02865
> > Phone: 401.727.0183 x208
> > Fax: 401.727.4998
> > Portable: 401.965.3661
> > E-MAIL: [EMAIL PROTECTED]
> > Web Page: www.creatcomp.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?s

Validate against a mask

2001-01-17 Thread Ruslan Sivak

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: setting multi line strings

2001-01-17 Thread Ruslan Sivak

Please ignore the previous message.  I should really test my code out before
posting the question. 

Russ

>  -Original Message-
> From:     Ruslan Sivak  
> Sent: Wednesday, January 17, 2001 12:03 PM
> To:   CF-TALK (E-mail)
> Subject:  setting multi line strings
> 
> Is there a way to set multi line strings in CF.  For example I have a
> piece of html and i want to set it to a variable. Something like this
> 
> 
> 
> 
> 
>   Untitled
> 
> 
> 
> 
> 
> 
> 
> ">
> 
> Is there a way to accomplish this?
> 
> 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: Short Circuit Evaluation

2001-01-17 Thread Ruslan Sivak

I must have been mistaken.  I will try to go and see the exact code that was
causing that error.  

Russ

-Original Message-
From: Aaron Johnson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 10:45 AM
To: CF-Talk
Subject: RE: Short Circuit Evaluation


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey Ruslan,

Sure... what you mentioned works for me all the time...


Do this

Do this


However, the loop thing you mentioned probably wouldn't work... you
should do as others suggested and set the loop count outside of the
actual cfloop...


Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
617.350.0339
617.350.8884
66172567
[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



setting multi line strings

2001-01-17 Thread Ruslan Sivak

Is there a way to set multi line strings in CF.  For example I have a piece
of html and i want to set it to a variable. Something like this





Untitled







">

Is there a way to accomplish this?

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



Short Circuit Evaluation

2001-01-17 Thread Ruslan Sivak

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:  


do something


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



 do something
    


Is there a better way?

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: Conditional loops

2001-01-17 Thread Ruslan Sivak

I guess I should've been more clear about what I want to do.  







I have gotten a suggestion to rewrite it as










-Original Message-
From: Dylan Bromby [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 9:20 PM
To: CF-Talk
Subject: RE: Conditional loops


why don't you just use the CONDITION attribute of CFLOOP?

-Original Message-
From: Bud [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 4:59 PM
To: CF-Talk
Subject: Re: Conditional loops


On 1/16/01, Ruslan Sivak penned:
>Is there a way to have conditional loops such as
>
>
>   
>
>   
>
>
>   

Nope. You'll have to put the opening and closing loop tags either
both inside each cfif, cfelse block, or put them outside the entire
cfif.




#variable#





#variable#




Or




#variable1#

#variable2#



--

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



Conditional loops

2001-01-16 Thread Ruslan Sivak

Is there a way to have conditional loops such as 









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



Passing Queries to custom tags

2001-01-16 Thread Ruslan Sivak

Is there a way to pass a query to a custom tag?  

example


Select name
FROM sometable




and then inside the custom tag i would like to be able to access that query.


#test.name#

or more appropriately

#evaluate("#attributes.query#.name")#


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



Custom Tag Attributes collection

2001-01-12 Thread Ruslan Sivak

Does anyone know if there is an attributes collection that I can access
inside the custom tag so I can loop through all the attributes passed to me?
For example if the main template has



instead of saying 


#Attributes.name# #attributes.value#


I could say 



#att# 



Is there such collection of some sort that exists inside the custom tag?

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