Another method, which may be a bit more robust is the OWASP ESAPI's
(Enterprise Security API) Encoder methods: decodeForHTML(str) or
canonicalize(str):
http://owasp-esapi-java.googlecode.com/svn/trunk_doc/latest/org/owasp/esapi/Encoder.html#decodeForHTML%28java.lang.String%29
The last two securit
XMLUnFormat() from CFLIB should do the trick.
http://www.cflib.org/index.cfm?event=page.udfbyid&udfid=800
--
/Kevin Pepperman
"*Never memorize what you can look up in books*."
--Albert_Einstein
~|
Order the Adobe Coldfusion
thanks , I renamed the function to insertUsers and it worked fine .
thanks
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.house
In other words, call your own function something other than "insert"
because that's already the name of a CF function.
--
WSS4CF - WS-Security framework for CF
http://wss4cf.riaforge.org/
On 23 November 2010 16:49, Maureen wrote:
>
> The error not with your arguments. It is on this line:
>
The error not with your arguments. It is on this line:
The insert function takes only three parameters.
insert(substring,string,position)
On Tue, Nov 23, 2010 at 12:08 AM, mojtaba tabatabaie
wrote:
>
> hi , I'm writing a code to insert some values to my database , and there are
> 7 of the
Hi Rick,
The dump is a simulated query, you are right in reality we will not have the
depth in the table, this will be a computed column. In this case I am using the
ID-parentID relationship to generate the UL/LI order. We could also use depth
to the generate the UL-LI order in special cases w
-
From: Ketan Jetty [mailto:kje...@yahoo.com]
Sent: Sunday, September 12, 2010 11:50 AM
To: cf-talk
Subject: Re: Function to Output a query as an ol or ul
Tom King,
I have done a similar project recently and please find the a similar but
much simpler logic to convert the query to unordered list
Tom King,
I have done a similar project recently and please find the a similar but much
simpler logic to convert the query to unordered list at
http://ketanjetty.com/coldfusion/useful-code/query-to-unordered-list/
I have used your query (modified it to have parentID) as the base query to
"que
Sorry, I think my syntax is wrong. I think it's menuQ[4].depth.
On Thu, Aug 26, 2010 at 3:04 PM, Michael Grant wrote:
> You could do it as recursive calls to a function or just do it as
> procedural and compare the last record to the current record in order to
> know if you need to open and clo
You could do it as recursive calls to a function or just do it as procedural
and compare the last record to the current record in order to know if you
need to open and close new 's. So if menuQ.depth[4] LT menuQ.depth[3]
you need to open a new type thing. Make sense?
On Thu, Aug 26, 2010 at 11
It sort of makes sense that this is a recursion issue, as I keep hitting the
'You need to know the future' (i.e the next row before it's happened)
feeling..
Re: Michael, yes, assume the query is sorted (i.e the depth is how deep the
containing UL is).
It does my head in. Recursion that is.
On 2
I *THINK* what you are trying to do is a classic problem for a
recursive function.
Create a function that handles one level of your list with the proper
and tags.
Then for each record inside the logic for the ... test to see if
there is another level, if so call the same function.
Rough
It appears that your row order also indicates the order of you lists?
So for instance you want:
- One
- Two
- Three
- Four
- Five
- Six
- Seven
- Eight
Correct?
~|
Order the Adobe Coldfusion Anthol
I've updated the dummy data in my example to include multiple depths (i.e
nesting)
http://neokoenig.pastebin.com/nGBphKVN
T
On 26 August 2010 16:27, Tom King wrote:
> Hi John,
> That's fine when you just want a straight:
>
>
> Something
>
>
> But I'm trying to build something with nested ul/
Hi John,
That's fine when you just want a straight:
Something
But I'm trying to build something with nested ul/ol's from the same query
object..
T
On 26 August 2010 16:22, John M Bliss wrote:
>
>
>
> #MyQuery.MyColumn#
>
>
>
> On Thu, Aug 26, 2010 at 10:18 AM, Tom King >wrote
#MyQuery.MyColumn#
On Thu, Aug 26, 2010 at 10:18 AM, Tom King wrote:
>
> Hi all,
> Having not found an existing function to do this (output a query object as
> a
> nested ol or ul), I thought I'd try my own hand at it - I'm *so* close.
> Yet,
> not quite there.
>
> Basically, my
Thanks for the advice and the link. That is a very interesting book.
Thanks,
Mike
-Original Message-
From: Nathan Strutz [mailto:str...@gmail.com]
Sent: Tuesday, July 21, 2009 3:08 PM
To: cf-talk
Subject: Re: Function Encapsulation Gone Too Far? - Opinions
Mike,
I can get behind
;
> But, then I think that I'm making it too complex for the deed.
>
> Thanks,
> Mike
>
> -Original Message-
> From: Nathan Strutz [mailto:str...@gmail.com]
> Sent: Tuesday, July 21, 2009 2:38 PM
> To: cf-talk
> Subject: Re: Function Encapsulation Gone T
...@gmail.com]
Sent: Tuesday, July 21, 2009 2:38 PM
To: cf-talk
Subject: Re: Function Encapsulation Gone Too Far? - Opinions
It's hard to say if you're really overdoing it.
In one sense, the component is pretty well encapsulated.
Accessing the cgi scope just in the constructor is
It's hard to say if you're really overdoing it.
In one sense, the component is pretty well encapsulated.
Accessing the cgi scope just in the constructor is fair enough, though for
the true purists, you could move that out, and for the OO realists, you
could just put cgi references anywhere.
Als
>On Thu, Sep 11, 2008 at 11:15 AM, Robert Nurse <[EMAIL PROTECTED]> wrote:
>
>
>use named arguments. myfunc(arg1="string1",arg2="string2",arg4=false)
>
>--
Thanks!
~|
Adobe® ColdFusion® 8 software 8 is the most important and d
On Thu, Sep 11, 2008 at 11:15 AM, Robert Nurse <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've got a function that takes four (4) arguments. Two of which are not
> required. They both have default values set up in their
> tags. When I call the function without one/both of them, I get an error.
First, check out http://cflib.org for a possible, existing function.
Second, Find the first Sunday of the year, then CFLOOP with an interval
of 7 to get every other Sunday.
m!ke
-Original Message-
From: Dave Phillips [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2008 8:32 AM
To: CF
thanks dominic, i had tried this and it came out with the values instead so i
thought they were meant for something else.
i then realised that i had an array of structures and was passing it the top
level instead of an individual level, thanks for your help
>>
They are known as keys and the built in ColdFusion functions are:
StructKeyArray() and StructKeyList()
HTH
Dominic
On 14/04/2008, Richard White <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> does anyone know if there is a function to get the column / header names
> of a structure?
>
> thanks
>
>
I always use uppercase on functions and methods, and lowercase on variables.
I think I get this from an old C or C++ language convention. However, I have
never seen any javascript that does anything but lowercase for the first
letter of method names and of course js is case sensitive so it matters.
At least with the conventions of the languages I'm familiar with, you
use a lower case first letter on your identifiers, unless the
identifier is a type (class or interface) name. Other identifiers
(local variables, instance variables, functions, methods, etc.)
usually start with a lower-case lett
started a new
thread hoping that you all would catch it.
Bruce
-Original Message-
From: Chris Jordan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 06, 2007 9:57 AM
To: CF-Talk
Subject: Re: Function Issue Resolved
Thanks for letting us know that you solved your problem. However, it
would
Thanks for letting us know that you solved your problem. However, it
would have been nice if you'd done it in the same thread (imho). I
just responded to the original thread not knowing that you'd already
solved your own issue. :o)
Chris
On Nov 6, 2007 11:29 AM, Bruce Sorge <[EMAIL PROTECTED]> wr
On Thursday 16 November 2006 13:48, Ryan Stewart wrote:
> wsdl), but each of the three functions/webservices are in 3 different
> components so 3 different wsdls?
It's obviously some sort of set up process going on inside CF.
If it bothers you you could fire off a webservice call when your applica
Tom,
Thanks for taking the time to read through that last post. I just wonder
though, the box is running IIS (which may do something similar with the wsdl),
but each of the three functions/webservices are in 3 different components so 3
different wsdls?
Ryan
>>> [EMAIL PROTECTED] 16/11/2
On Thursday 16 November 2006 10:02, Ryan Stewart wrote:
> *3 components written as web services, but in this case all sitting as
...
> The anomoly i can't explain is that the first call reports a much higher
> time than subsequent calls. But more still, the second third and so on can
This is Cold
>>I think it was something to do with declaring a udf in
a custom tag but it was a long time ago now.
Yeah, I know about his one, but this time the fuction is not defined in
a custom tag.
And when defined in a custom tag, the error will occur every time, not
once in a while.
--
__
There was - you move the UDF to a file and cfinclude it. You also
ensure you only cfinclude when thistag.executionmode is "start"
On 5/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I remember this bug - I think it was something to do with declaring a udf in
> a custom tag but it was a long
I remember this bug - I think it was something to do with declaring a udf in
a custom tag but it was a long time ago now. IIRC there wasnt a fix.
> -Original Message-
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2006 23:08
> To: CF-Talk
> Subject: Function defined tw
I get weird errors that usually happen when the server crashes (the errors
occur as a result of - they do not cause the error). Maybe that is happening
and it just freaks out??
Do you have any sort of onREquestEnd processing that for some crazy reason
might include the parent page?? Not that that
> -Original Message-
> From: Richard Colman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 14, 2005 3:19 PM
> To: CF-Talk
> Subject: Function or CFC: reverse compliment a sequence
>
> So, I am going to use this a bunch of times. Is this kind of thing best
> setup up as a custom function
> So, I am going to use this a bunch of times. Is this kind of
> thing best setup up as a custom function or CFC?
Yes!
To provide a more serious and hopefully more useful answer, you should
certainly use one or the other, but which one you use is up to you and how
the rest of your code is struct
I see no reason to keep "state" so I would make it a UDF. Input the
original string and return the compliment.
You don't work for InGen Corp, do you?
M!ke
-Original Message-
From: Richard Colman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 14, 2005 2:19 PM
To: CF-Talk
Subject: Functi
On Thursday 11 Nov 2004 17:51 pm, Michael Dinowitz wrote:
> Very interesting. I'd never have thought of doing a var set before the
> CFQUERY. It would show up in my head as an unnecessary operation.
Yeah, I know.
When it was discovered you needed to do this (for thread safety) it was
suggested t
Just had a long talk with Sean about that. Not do-able (other than it looking
ugly). Doing an initial CFSET with the var key word is the way to go.
Especially since all the var declarations must be at the beginning of the
function.
--
Ian Skinner
Web Programmer
BloodSource
www.Bloo
It's one of those rare issues where you spend a few minutes to a few days
trying to find out why a value is being set one way when it's supposed to be
another. With small CFCs it should not be a problem, but once you get into
large ones with internal function calls, you're getting into dangerous
te
t;> so I thought maybe the other would work
> as well. Anyone have time to test?
>
> John
>
> -Original Message-
> From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 11, 2004 12:51 PM
> To: CF-Talk
> Subject: RE: Function and query name o
On Thu, 11 Nov 2004 14:33:46 -0500, Burns, John D
<[EMAIL PROTECTED]> wrote:
> Would it be possible to do ? It looks
> funny and I doubt it would work, but I know you can do name="application.getEmployees"> so I thought maybe the other would work
> as well. Anyone have time to test?
>
It won'
PM
To: CF-Talk
Subject: RE: Function and query name overwrite
Very interesting. I'd never have thought of doing a var set before the
CFQUERY. It would show up in my head as an unnecessary operation. I
think MM should add in an attribute to all tags that return data to make
the data location spe
Very interesting. I'd never have thought of doing a var set before the
CFQUERY. It would show up in my head as an unnecessary operation. I think MM
should add in an attribute to all tags that return data to make the data
location specific.
> If you scope your query as local to the function, the
Hey Mike,
If you scope your query as local to the function, the conflict will do
away. It's BP for thread safety, etc.:
Instead of:
...
Do:
...
-joe
On Thu, 11 Nov 2004 12:28:35 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> This is not a question, just something I ran
Try this:
Evaluate("#cleanerFunction#()");
Can this work? Basically want to pass in a string as an argument to a
ColdFusion function. That function will then call another function with the
name of the argument.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User S
Sorry,
I was trying to send that to the guy who needed it.
-Mark
-Original Message-
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 1:13 PM
To: CF-Talk
Subject: Function for days and years...
This function makes sure that the days match the co
Thanks. I get your point. Essentially after posting I've come up with an effective, alternative solution.
>I don't think that's how base 64 encoding works. To the best of my
>knowledge, base 64 encoding simply uses a subset of ASCII characters to
>represent binary data. I could type a bunch of c
Thanks and forgive my laziness for not reading up on Base64 instead of easy assumption.
>IsBase64 is an imposibility, aside from unencoding it and checking the
>validity of the result. Base64 encoding intentionally results in primitive
>data (a string) so it can be used wherever primitive data can
> That's not an option. What if the database is not mine (I
> don't have control over its structure or the like). My
> thought was, if you/MM have a way/algorithm, that is, BASE64
> to convert binary data, you should also know if a set of data
> has been "BASE64"ed with the same algorithm in
extra bookkeeping to track whether stuff is encoded or not.
Cheers,
barneyb
> -Original Message-
> From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 01, 2004 3:41 PM
> To: CF-Talk
> Subject: Re: Function for data type determination
>
> >I wo
>I would guess that your best bet is to store some metadata about the
>content -- maybe a "binary vs. text" flag or something.
Ben,
That's not an option. What if the database is not mine (I don't have control over its structure or the like). My thought was, if you/MM have a way/algorithm, that
Ah. Sorry. I thought you were using "simple data" in a technical sense.
As far as I know, there's not really a good way to do this. After all,
"IBM +3.75 6% 14-3/8" would make sense to some people (well, it would if
it were really a stock quote), but doesn't fit the "English or Number"
model.
OK, let's forget about the semantics here,
if data look like "a dog is looking at a cat"
or data look like "28233", fine;
but else if the data look like
JVBERi0xLjIgDQol4uPP0w0KIA
(non-English set of data)
do something here.
The goal is, if the data is non-English like the above sample, then, no
Unless I'm confused, an image converted to base64 *is* simple data.
What are you trying to do here?
--Ben Doom
Chunshen (Don) Li wrote:
> OK, here's a part of a sample data after ToBase64 conversion from an
> image file,
>
> JVBERi0xLjIgDQol4uPP0w0KIA0KMTIgMCBvYmoNCjw8DQovTGV
>
> Now, to det
To: CF-Talk
> Subject: RE: function for decimal to hex and back?
>
> Oh DER!! I keep forgetting to look for a UDF in CFLIB.
> That's a wealth of
> great stuff, and I hardly know what's in there.
>
>
>
> Thanks Pascal for pointing it out for me. Those UDFs loo
Webworks
http://afpwebworks.com
_
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 31 March 2004 12:00 AM
To: CF-Talk
Subject: RE: function for decimal to hex and back?
Don't write it:
http://www.cflib.org/udf.cfm?ID=339
http://www.cflib.org/udf.cfm?ID=340
Pas
Don't write it:
http://www.cflib.org/udf.cfm?ID=339
http://www.cflib.org/udf.cfm?ID=340
Pascal
> -Original Message-
> From: Pascal Peters
> Sent: dinsdag 30 maart 2004 15:38
> To: CF-Talk
> Subject: RE: function for decimal to hex and back?
>
> Write a u
Write a udf: if the Len() is 1, pad with 0. You can even include the
formatbaseN in the UDF
Pascal
> -Original Message-
> From: Michael Kear [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 30 maart 2004 15:13
> To: CF-Talk
> Subject: function for decimal to hex and back?
>
> Is there a funct
Subject: Re: Function parameter question
Every cfargument item has a "required" (true/false) property ... it is
important that this only works within coldfusion - if you call the
function
as a webservice, the parameter has to be supplied (is always required).
Best regar
Every cfargument item has a "required" (true/false) property ... it is
important that this only works within coldfusion - if you call the
function
as a webservice, the parameter has to be supplied (is always required).
Best regards,
Peter
Orginale Nachricht
Von: Robert Everland <
If you don't specify them, they still exist in the arguments scope..
i.e.
Function foo()
{
return arraylen(arguments);
}
Foo() should = 0
Foo(bar) should = 1
And to access them in the funtion just called them by usual structure
notation
HTH
-Original Message-
From: Robert Ev
I assume you are talking about UDFs, right?
If you are writing a script based UDF, you simply exclude the optional
args from your list of args in your UDF declaration. So, if function foo
takes one required arg and one optional arg, the optional arg must be
the second arg and you check for it's ex
dnesday, August 28, 2002 1:46 PM
> To: CF-Talk
> Subject: RE: Function?
>> Yes, you are right. I thought that she had wanted to do javascript,
>> then serverside validation, and if something is wrong, bring them back
>> to the input page with prefilled fields and aler
Nevermind Im just being forgetfull today
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 1:46 PM
To: CF-Talk
Subject: RE: Function?
> Yes, you are right. I thought that she had wanted to do javascript,
> then serverside vali
Well sense you have all been so helpful today how about someone telling
me how to have javascript select the entered text onblur?
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 1:46 PM
To: CF-Talk
Subject: RE: Function?
>
> Yes, you are right. I thought that she had wanted to do javascript, then
> serverside validation, and if something is wrong, bring them back to the
> input page with prefilled fields and alert them. If nothing is wrong,
> still
> bring them back to the input page, except this time instead of a
sday, August 28, 2002 11:24 AM
To: CF-Talk
Subject: RE: Function?
That is unconventional. Do it this way...
Put an ONCLICK attribute in the submit button. That way, if u click it, it
will run your javascript functions which u will write to validate the
fields. If something is wrong, put out a
message, display a submit button for them to click.
heh i'm sleepy i guess
-Original Message-
From: charlie griefer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 12:34 PM
To: CF-Talk
Subject: Re: Function?
Phoeun Pha writes:
> That is unconventional. Do it
ris Pilles [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 28, 2002 12:20 PM
> To: CF-Talk
> Subject: RE: Function?
>
>
> Well I want to validate certain fields throughout the application and
> use the submit for a master save of all of the data associated with the
>
.
-Original Message-
From: Kris Pilles [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 12:20 PM
To: CF-Talk
Subject: RE: Function?
Well I want to validate certain fields throughout the application and
use the submit for a master save of all of the data associated with the
Well I want to validate certain fields throughout the application and
use the submit for a master save of all of the data associated with the
form.
-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 1:01 PM
To: CF-Talk
Subject: RE: Function
You can do this in Javascript and CF...
You would use the onBlur event to call your function.
Your function would likely call a CF page into a IFrame, frame, processing
window, etc. and that page would take whatever action is necessary...
i.e.
function ConfirmSSN(sSSN) {
document.all.W
Why not just let it happen when the user clicks a submit button? Onexit AKA
OnBlur is creepy and confusing.
but it's possible to do it your way.
First write a javascript function to submit the form.
THen in the form field for the SSN, add in this attribute..
onblur="nameoffunction();"
t
> recently i just helped someone on the list with a problem, and one of the
> line(s) of code looked like this..
>
> "-"),1))&right(lcase(ListGetAt(fullname, 1,
> "-")),len(lcase(ListGetAt(fullname, 1,
> "-")))-1)&"-"&ucase(left(ListGetAt(fullname, 2,
> "-"),1))&right(lcase(ListGetAt(fullname, 2,
BT wrote:
>
> Anyone know how to do this is one line?
>
>
>
>
>
Not possible for that one because you use NewRanID1 twice. And you have
the problem that there is no way to guarantee that NewRandID is 8
characters long so in some cases the left() function will throw an
error. But if
Didnt ask for output, point deducted :)
hehe
-Original Message-
From: Bill Holloway [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 5:08 PM
To: CF-Talk
Subject: RE: Function all together?
How about:
newrandid = left(RandRange(1,100) & RandRange(1,100
I guess you could try:
But, that isn't quite identical to the four lines below, because in the
lines below you are using newRandID1 (a single value) twice, whereas in the
line above you do not have the opportunity to generate the same value
twice. ( if that makes sense).
At 07:53
Since you are refering to one variable (newRanID1) twice in your final
expression it will have to be stored in a temp variable which precludes
having all the code in one line, unless you are using CF5 and then you can
write a udf for it.
- Original Message -
From: "BT" <[EMAIL PROTECTED]
How about:
newrandid = left(RandRange(1,100) & RandRange(1,100) &
RandRange(1,100),8);
writeOutput(newrandid);
you should also consider making use of cfscript when you're doing more
than three or so cfsets.
-Original Message-
From: BT [mailto:[EMAIL PROTECTED]]
S
yea, i got after blowing up the RPG Sp a few times.. hahaha...
Thanks guys
- Original Message -
From: "JustinMacCarthy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 31, 2000 10:36 AM
Subject: Re: Function for padding strings???
> Lo
> > Here's one option:
> >
> >
> >
> >
> >
> Or you could be a smart ass and do it in one line :
>
>
>
>
> ;o)
That's still 2 lines Stephen ;-)
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.co
Look at
RJustify CJustify LJustify. RepeatString
~Justin
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 31, 2000 3:18 PM
Subject: Function for padding strings???
>
>
> Hello all,
>This might sound like a very stupid question, I n
>
> Here's one option:
>
>
>
>
>
Or you could be a smart ass and do it in one line :
;o)
Regards
Stephen
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.hou
Here's one option:
Chris Evans
[EMAIL PROTECTED]
http://www.fuseware.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 31, 2000 10:19 AM
To: [EMAIL PROTECTED]
Subject: Function for padding strings???
Hello all,
This might so
What I ended up doing was make a list of 0's with as the maximum number of
zeros you will need then put them together with the variable or text you are
inserting and use right or left and how many characters you need. That was
the only way I could get it to work for me.
Robert Everland III
Web De
88 matches
Mail list logo