Remove Jrun Server Instance

2015-02-27 Thread Donnie Carvajal

Hi,

I've removed a Jrun Server Instance by clicking on the Delete Icon in the 
Available Servers list under CF Admin-Enterprise Manager-Instance Manager for 
CF 9, but the c:\Jrun4\Servers\[instancename] folder is still on the C drive.  
Can I remove this folder?  Also, are there any other manual steps that you 
would suggest when deleting a Jrun Server instance?

Thanks,

Donnie Carvajal 

~|
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:360176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove Jrun Server Instance

2015-02-27 Thread Jochem van Dieten

On Fri, Feb 27, 2015 at 7:39 PM, Donnie Carvajal wrote:

 I've removed a Jrun Server Instance by clicking on the Delete Icon in the
 Available Servers list under CF Admin-Enterprise Manager-Instance Manager
 for CF 9, but the c:\Jrun4\Servers\[instancename] folder is still on the C
 drive.  Can I remove this folder?  Also, are there any other manual steps
 that you would suggest when deleting a Jrun Server instance?


You can remove it. There may also be logfiles in c:\jrun4\logs and under
c:\jrun4\runtime and there may be a Windows service you have to remove
manually

Jochem


-- 
Jochem van Dieten
http://jochem.vandieten.net/


~|
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:360177
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Robert Harrison

Getting close, no I'm trying to consider any empty paragraphs. Tried this:

cfset ExtractionString=ReplaceList(comment,p/p,p 
/p,pnbsp;/p, , , )

But it does not work completely. 

How could I remove all paragraphs that are empty, or contain only blanks or 
non-breaking spaces?



Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: Monday, June 04, 2012 11:32 AM
To: cf-talk
Subject: Re: Get First Pa

~|
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:351444
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Robert Harrison

? No one know a method to strip empty paragraphs from a string?   I'd like to 
remove all occurrences of paragraphs that have no content - stuff like: , 
p/p OR p /p OR pnbsp;/p 

Any ideas?

Thanks

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com] 
Sent: Monday, June 04, 2012 12:37 PM
To: cf-talk
Subject: RE: Get First Paragraph: Remove Empty Paragraphs


Getting close, no I'm trying to consider any empty paragraphs. Tried this:

cfset ExtractionString=ReplaceList(comment,p/p,p 
/p,pnbsp;/p, , , )

But it does not work completely. 

How could I remove all paragraphs that are empty, or contain only blanks or 
non-breaking spaces?



Robert Harrison
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788 T 631.231.6600 X 119   F 
631.434.7022 http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk]
Sent: Monday, June 04, 2012 11:32 AM
To: cf-talk
Subject: Re: Get First Pa



~|
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:351445
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Matt Quackenbush

cfsavecontent variable=myString
pThis is the opening paragraph./p
p/p
pnbsp;/p
p  /p
p /p
pThis is the closing paragraph./p
/cfsavecontent

cfdump var=#reReplaceNoCase( myString, 'p([\s]|\nbsp;)*/p', '',
'all' )# /



On Mon, Jun 4, 2012 at 11:50 AM, Robert Harrison rob...@austin-williams.com
 wrote:


 ? No one know a method to strip empty paragraphs from a string?   I'd like
 to remove all occurrences of paragraphs that have no content - stuff like:
 , p/p OR p /p OR pnbsp;/p

 Any ideas?

 Thanks

 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_williams


 -Original Message-
 From: Robert Harrison [mailto:rob...@austin-williams.com]
 Sent: Monday, June 04, 2012 12:37 PM
 To: cf-talk
 Subject: RE: Get First Paragraph: Remove Empty Paragraphs


 Getting close, no I'm trying to consider any empty paragraphs. Tried this:

cfset ExtractionString=ReplaceList(comment,p/p,p
 /p,pnbsp;/p, , , )

 But it does not work completely.

 How could I remove all paragraphs that are empty, or contain only blanks
 or non-breaking spaces?



 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788 T 631.231.6600 X
 119   F 631.434.7022 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_williams


 -Original Message-
 From: Russ Michaels [mailto:r...@michaels.me.uk]
 Sent: Monday, June 04, 2012 11:32 AM
 To: cf-talk
 Subject: Re: Get First Pa



 

~|
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:351447
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Robert Harrison

Matt,

I tried your solutions and it works 100%, except when it's my variable from the 
form. It's a tiny MCE field and it seems it must be inserting some 
non-printable character.  I changed the statement

From this: #reReplaceNoCase(myString, 'p([\s]|\nbsp;)*/p', '', 
'all' )#

To This:  #reReplaceNoCase(myString,'p([^\w*?])*/p','','all' )# 

This seems to be working.

Can someone that knows regex better that I confirm the to this says:Strip 
from p to /p UNLESS it contains a letter or a number? I think that's what 
it says. Is that right?

Thanks


Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_

~|
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:351450
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Matt Quackenbush

I don't recall the exact characters, but \w will include some other
characters. Maybe this will also work for you?

reReplaceNoCase( myString, 'p([\s]|\nbsp;|[^[:print]])*/p', '', 'all' )

I think that's more clear as to intent. I prefer to be more explicit, but
it's really just personal preference. :-)


On Mon, Jun 4, 2012 at 1:29 PM, Robert Harrison
rob...@austin-williams.comwrote:


 Matt,

 I tried your solutions and it works 100%, except when it's my variable
 from the form. It's a tiny MCE field and it seems it must be inserting some
 non-printable character.  I changed the statement

From this: #reReplaceNoCase(myString, 'p([\s]|\nbsp;)*/p',
 '', 'all' )#

To This:  #reReplaceNoCase(myString,'p([^\w*?])*/p','','all' )#

 This seems to be working.

 Can someone that knows regex better that I confirm the to this says:
  Strip from p to /p UNLESS it contains a letter or a number? I think
 that's what it says. Is that right?

 Thanks


 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_

 

~|
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:351451
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Get First Paragraph: Remove Empty Paragraphs

2012-06-04 Thread Matt Quackenbush

Hmm. I just tried a couple of non-printable character insertions, and
[^[:print]] does not catch them. Mayhaps [\w] is better after all. ;-)

(BTW, I went and looked up \w for a refresher: Any alphanumeric character,
or the underscore (_), similar to [[:word]] )

On Mon, Jun 4, 2012 at 1:49 PM, Matt Quackenbush quackfu...@gmail.comwrote:

 I don't recall the exact characters, but \w will include some other
 characters. Maybe this will also work for you?

 reReplaceNoCase( myString, 'p([\s]|\nbsp;|[^[:print]])*/p', '', 'all'
 )

 I think that's more clear as to intent. I prefer to be more explicit, but
 it's really just personal preference. :-)



 On Mon, Jun 4, 2012 at 1:29 PM, Robert Harrison 
 rob...@austin-williams.com wrote:


 Matt,

 I tried your solutions and it works 100%, except when it's my variable
 from the form. It's a tiny MCE field and it seems it must be inserting some
 non-printable character.  I changed the statement

From this: #reReplaceNoCase(myString,
 'p([\s]|\nbsp;)*/p', '', 'all' )#

To This:  #reReplaceNoCase(myString,'p([^\w*?])*/p','','all' )#

 This seems to be working.

 Can someone that knows regex better that I confirm the to this says:
  Strip from p to /p UNLESS it contains a letter or a number? I think
 that's what it says. Is that right?

 Thanks


 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_

 

~|
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:351452
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread denstar

If you need a tool that understands tags, the jericho html parser is
probably a good bet.  It won't get script comments though.

:den

-- 
I don't think nationalism is alone holding the field; it's in contention
with a lot of different things.
Peter Singer

~|
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:350171
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread James Holmes

This is why we pair program. Eventually everyone on the team has seen each
bit of code in the app (or at least most of it) and when new people come
along they get to sit with someone who knows the app well and can reinforce
the design expressed in the tests. Regardless of skill level they can then
maintain the app, because face to face communication works better than
written documentation.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 1 March 2012 00:41, Bryan Stevenson br...@electricedgesystems.comwrote:


 Bingo Steve...well said!

 On Wed, 2012-02-29 at 08:25 -0500, Steve 'Cutter' Blades wrote:

  Beautiful sentiment, *if* you didn't inherit a 3500 template legacy
  application originally written on CF 4.
 
  Both (comments and TDD) have their place. Fact is, what is simple and
  clear and second nature for me is Greek to a noob, and I train those all
  of the time. Comments are for those who come behind, remembering that
  not all of them share my level of skill (or my preconceptions of what is
  right and wrong to do).



~|
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:350173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Dave Watts

 This is why we pair program. Eventually everyone on the team has seen each
 bit of code in the app (or at least most of it) and when new people come
 along they get to sit with someone who knows the app well and can reinforce
 the design expressed in the tests. Regardless of skill level they can then
 maintain the app, because face to face communication works better than
 written documentation.

That's great, but it's not a solution for everything. What happens
when a consultancy develops and delivers an application to a customer,
who will maintain it in the future? What happens to applications which
just don't get that much maintenance? I was just contacted this week
about an .NET assembly I'd built five years ago that interacts with
Adobe Connect's API. I didn't remember whether it had the ability to
change a user's password in an external system, because it wasn't part
of the specification (and therefore wasn't part of the test). Turns
out that the API call used to create a user also works to modify that
users, so the user of the assembly can just use the same method call.

You seem to be staking a lot on saying no one ever needs comments,
anywhere, for any reason and I just don't see why that's the hill you
want to die on. Comments are not the exclusive solution to writing
maintainable code, no one's saying they are, but they do provide
something very simple that TDD and pair programming do not - the
ability to explain your intent to any future reader of that source
code.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
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:350174
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Michael Stemle

So what do you do ten years later when nobody on the team was there when the 
code was written?

--
~ Mike Stemle, Jr.

On Feb 29, 2012, at 18:25, James Holmes james.hol...@gmail.com wrote:

 
 This is why we pair program. Eventually everyone on the team has seen each
 bit of code in the app (or at least most of it) and when new people come
 along they get to sit with someone who knows the app well and can reinforce
 the design expressed in the tests. Regardless of skill level they can then
 maintain the app, because face to face communication works better than
 written documentation.
 
 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/
 
 
 On 1 March 2012 00:41, Bryan Stevenson br...@electricedgesystems.comwrote:
 
 
 Bingo Steve...well said!
 
 On Wed, 2012-02-29 at 08:25 -0500, Steve 'Cutter' Blades wrote:
 
 Beautiful sentiment, *if* you didn't inherit a 3500 template legacy
 application originally written on CF 4.
 
 Both (comments and TDD) have their place. Fact is, what is simple and
 clear and second nature for me is Greek to a noob, and I train those all
 of the time. Comments are for those who come behind, remembering that
 not all of them share my level of skill (or my preconceptions of what is
 right and wrong to do).
 
 
 
 

~|
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:350175
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread James Holmes

I don't see why you care...

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 1 March 2012 22:30, Dave Watts dwa...@figleaf.com wrote:

  I just don't see why that's the hill you
 want to die on.


~|
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:350176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread James Holmes

Read the tests.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 1 March 2012 22:33, Michael Stemle themanchic...@gmail.com wrote:


 So what do you do ten years later when nobody on the team was there when
 the code was written?




~|
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:350177
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Dave Watts

   I just don't see why that's the hill you want to die on.

 I don't see why you care...

Presumably for the same reason you cared enough to post in the first place?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite

~|
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:350178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Dave Watts

  So what do you do ten years later when nobody on the team was there when
  the code was written?

 Read the tests.

Wait a sec. Here's a summary of what's been posted.

You: Don't use comments, use tests.
Cutter, me: Comments can help those who come to the source code later
in ways that tests may not.
You: That's why we pair program.
Michael: What if all the developers who worked on the project are long gone?
You: Read the tests.

Can you see why that's not a satisfactory answer to the people who
disagree with you?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
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:350179
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread James Holmes

That's misrepresenting the thread. This is more accurate:

Me: Don't use comments, use tests.
Cutter: Noobs can't read tests
Me: That's why we pair program.
Michael: What do *you* do if all the developers who worked on the project
are long gone?
You: Read the tests. (implication; I'm not a noob).

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 1 March 2012 22:49, Dave Watts dwa...@figleaf.com wrote:


   So what do you do ten years later when nobody on the team was there
 when
   the code was written?
 
  Read the tests.

 Wait a sec. Here's a summary of what's been posted.

 You: Don't use comments, use tests.
 Cutter, me: Comments can help those who come to the source code later
 in ways that tests may not.
 You: That's why we pair program.
 Michael: What if all the developers who worked on the project are long
 gone?
 You: Read the tests.

 Can you see why that's not a satisfactory answer to the people who
 disagree with you?

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
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:350180
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Dave Watts

  You: Don't use comments, use tests.
  Cutter, me: Comments can help those who come to the source code later
  in ways that tests may not.
  You: That's why we pair program.
  Michael: What if all the developers who worked on the project are long
  gone?
  You: Read the tests.

 That's misrepresenting the thread. This is more accurate:

 Me: Don't use comments, use tests.
 Cutter: Noobs can't read tests
 Me: That's why we pair program.
 Michael: What do *you* do if all the developers who worked on the project
 are long gone?
 You: Read the tests. (implication; I'm not a noob).

No, I think that's less representative than what I wrote:

Cutter, me: Comments can help those who come to the source code later
in ways that tests may not.

Note the me there. Cutter mentioned noobs, I mentioned ways that
comments provide information that tests don't. Again, I specified two
cases where tests and pair programming wouldn't solve problems I had,
and comments could. These are actual cases from my own personal
experience in the last couple of weeks. If I accepted your answers at
face value, they would contradict my personal experience from these
two cases.

Look, I think that TDD is great. And I think that pair programming is
great, although it's not an option for many work environments.
Everybody should do these things if they can, and they will solve more
problems than comments would. But you have said, basically, that there
is NO POSSIBLE CASE where comments can solve a problem that TDD and
pair programming can't, and I think that's going to contradict many
people's experiences. That's a pretty absolutist position. Hell, I
suspect that if I asked Kent Beck himself, he'd say there are still
some cases where comments provide value that TDD doesn't.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
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:350181
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Mike Kear

I dont understand what's the problem with comments anyway.So what if we
have comments peppered through the code?Do they slow down processing in
any significant way?Yes, they cause the files to be somewhat larger,
but if all that means is a bit more disk space gets used,  so what?If
they reduce maintenance cost because its quicker for other developers to
maintain the code later on, that must surely more than offset any overhead
due to the existence of comments.

I get that the tests in TDD are a good way to see what's happening (or
supposed to happen) in code.  But whats the problem if there are comments
in there too?   (Assuming they're accurately reflecting what's going on in
the code  - if they're misleading because they reflect old or trial
versions of the logic, that's bad but none of us is talking about that are
we?)


I just dont understand why this is even a discussion in the  first place.
As someone who often has to work on code that others have built before me
(and normally aren't around to ask questions of)  I can testify that
comments make any program file MUCH MUCH MUCH easier to work on. As I
said earlier in this thread,  I once had to work on a 1500 line convoluted
file, with nested cfif clientiD =   peppered through it,  just to change
some text being displayed. It took me hours to find the exact line I
had to correct because it wasnt every instance of the text in the file, but
only one that had to be changed.  It certainly didn't justify spending ages
and ages looking through the whole logic of the application just to make a
little tweak.   A few comments here or there would have meant it cost the
client a fraction of what I billed him for my time for that little job,
then i could have got on to another much more important job he wanted done.

You dont want comments in your code?  I get that.   Dont know why you dont,
 but I get it.   But I'm a contractor who does a lot of temp work on
existing code bases not written by me.I know I go a lot faster when I
have comments I can read.   Yes, I can read code,  and I can write code.
 But the comments make it a LOT faster for me to work out what I'm working
on and how to make the change I'm asked to do.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month




On Fri, Mar 2, 2012 at 2:04 AM, James Holmes james.hol...@gmail.com wrote:


 That's misrepresenting the thread. This is more accurate:

 Me: Don't use comments, use tests.
 Cutter: Noobs can't read tests
 Me: That's why we pair program.
 Michael: What do *you* do if all the developers who worked on the project
 are long gone?
 You: Read the tests. (implication; I'm not a noob).

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/





~|
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:350182
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Russ Michaels

I will add my 2p that uncommented code drives me nuts.
when you have to work on an app you have never seen before the lack of any
useful comments usually results in it taking many x longer to figure stuff
out and get up and running with the app.
If you have a load a load of documentation and tests distributed with the
app then than of course can help too, but this is usually not the cas ein
my experience, any docs and tests are on someone else's computer somewhere
and not distributed with the app at all.


On Thu, Mar 1, 2012 at 3:21 PM, Dave Watts dwa...@figleaf.com wrote:


   You: Don't use comments, use tests.
   Cutter, me: Comments can help those who come to the source code later
   in ways that tests may not.
   You: That's why we pair program.
   Michael: What if all the developers who worked on the project are long
   gone?
   You: Read the tests.
 
  That's misrepresenting the thread. This is more accurate:
 
  Me: Don't use comments, use tests.
  Cutter: Noobs can't read tests
  Me: That's why we pair program.
  Michael: What do *you* do if all the developers who worked on the project
  are long gone?
  You: Read the tests. (implication; I'm not a noob).

 No, I think that's less representative than what I wrote:

 Cutter, me: Comments can help those who come to the source code later
 in ways that tests may not.

 Note the me there. Cutter mentioned noobs, I mentioned ways that
 comments provide information that tests don't. Again, I specified two
 cases where tests and pair programming wouldn't solve problems I had,
 and comments could. These are actual cases from my own personal
 experience in the last couple of weeks. If I accepted your answers at
 face value, they would contradict my personal experience from these
 two cases.

 Look, I think that TDD is great. And I think that pair programming is
 great, although it's not an option for many work environments.
 Everybody should do these things if they can, and they will solve more
 problems than comments would. But you have said, basically, that there
 is NO POSSIBLE CASE where comments can solve a problem that TDD and
 pair programming can't, and I think that's going to contradict many
 people's experiences. That's a pretty absolutist position. Hell, I
 suspect that if I asked Kent Beck himself, he'd say there are still
 some cases where comments provide value that TDD doesn't.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
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:350183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Andrew Scott

First to the original poster, there is a way to do this but I would be
asking why you would want to first. With comments being used for annotated
validation for hyrule, to annotated comments for ORM.  If it is just to
purely find code that has been commented out, and needs removing then a
search and look method is perhaps the best option.

Secondly to the argument of TDD and comments. Let me first clear up that
TDD and BDD and tests in general, are there to code coverage our code. So
that there is no unexpected problems in the future, TDD and BDD are
primarily for input and output. That doesn't mean you can't comment on the
tests to say what ever you like to say.

But tests will not cover the likes of known bugs and work around's to
achieve such results, Now I have comments that as stated above are for
annotated validation for hyrule. And although they are tested through TDD,
they are still comments.

Secondly, I have rest / web services that describe what is being returned
from third parties. These are not covered by tests and my part as it is not
my code, but the comments make it very clear what is returned in the body
of the function. In that example the calls to the rest and web services,
are not affecting the final output of the result returned, where tests
cover that. But it does let the developer know that while in there making
changes they can see the expected results and any further outcomes to the
code.

Sorry but I am on the side that comments are a big and necessary thing,
that even I will admit to not doing enough off, but required in more cases
than not.

TDD is not the place to dictate why something was written the way it was
written, its job is to secure and pass on anything that is / might be
passed into that is not expected and cope with a return result. How would
these tests know why I wrote certain code the way that I did, because of
trying to get around a known issue? Would I place that comment in the
tests, no I would not, the comment is related to the way the function
behaves and not if it passes or fails because someone wants to ignore the
comments.


-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543


~|
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:350184
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Raymond Camden

Mike, some arguments are comments are:

1) Repeats what's already obvious. For example:

!--- Loops over my crap ---
cfloop index=x from=1 to=#arrayLen(crap)#

2) Easy to become outdated.
For example, a comment that says something like, This hunts for bears
using a shotgun whereas the code was modified to hunt for bears using
blunt toothpicks. Maybe another developer made that change and simply
didn't feel like updating the code.

The book, Clean Code
(http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882),
has a whole chapter on it.

Now to be clear, I don't actually agree with all the points. I'm Pro
Comment, just sharing some reasons why.

On Thu, Mar 1, 2012 at 9:34 AM, Mike Kear afpwebwo...@gmail.com wrote:

 I dont understand what's the problem with comments anyway.    So what if we
 have comments peppered through the code?    Do they slow down processing in
 any significant way?    Yes, they cause the files to be somewhat larger,
 but if all that means is a bit more disk space gets used,  so what?    If
 they reduce maintenance cost because its quicker for other developers to
 maintain the code later on, that must surely more than offset any overhead
 due to the existence of comments.


-- 
===
Raymond Camden, Adobe Developer Evangelist

Email : raymondcam...@gmail.com
Blog : www.raymondcamden.com
Twitter: cfj

~|
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:350185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-03-01 Thread Russ Michaels

I have certainly seen my fair share of bad comments.
commented out comments.
blocks of code which have been commented out and disabled but the comments
are still there for that disabled code and have not been updated.
comments for code which no longer exists.

but it all comes down to the same thing really, poor documentation and
commenting, regardless of the end result.

I tend to put very simple comments in code, for anything major or for apps
that were likley to be maintained by someone else  I wrote documentation
and refer to that in the code using in page header comments.

On Thu, Mar 1, 2012 at 4:15 PM, Raymond Camden raymondcam...@gmail.comwrote:


 Mike, some arguments are comments are:

 1) Repeats what's already obvious. For example:

 !--- Loops over my crap ---
 cfloop index=x from=1 to=#arrayLen(crap)#

 2) Easy to become outdated.
 For example, a comment that says something like, This hunts for bears
 using a shotgun whereas the code was modified to hunt for bears using
 blunt toothpicks. Maybe another developer made that change and simply
 didn't feel like updating the code.

 The book, Clean Code
 (
 http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882
 ),
 has a whole chapter on it.

 Now to be clear, I don't actually agree with all the points. I'm Pro
 Comment, just sharing some reasons why.

 On Thu, Mar 1, 2012 at 9:34 AM, Mike Kear afpwebwo...@gmail.com wrote:
 
  I dont understand what's the problem with comments anyway.So what if
 we
  have comments peppered through the code?Do they slow down processing
 in
  any significant way?Yes, they cause the files to be somewhat larger,
  but if all that means is a bit more disk space gets used,  so what?If
  they reduce maintenance cost because its quicker for other developers to
  maintain the code later on, that must surely more than offset any
 overhead
  due to the existence of comments.
 

 --
 ===
 Raymond Camden, Adobe Developer Evangelist

 Email : raymondcam...@gmail.com
 Blog : www.raymondcamden.com
 Twitter: cfj

 

~|
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:350186
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-29 Thread Steve 'Cutter' Blades

Beautiful sentiment, *if* you didn't inherit a 3500 template legacy 
application originally written on CF 4.

Both (comments and TDD) have their place. Fact is, what is simple and 
clear and second nature for me is Greek to a noob, and I train those all 
of the time. Comments are for those who come behind, remembering that 
not all of them share my level of skill (or my preconceptions of what is 
right and wrong to do).

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book

The best way to predict the future is to help create it


On 2/28/2012 8:36 PM, James Holmes wrote:
 Those using comments to plan code probably don't have any tests. Tests are
 essential to allow re-factoring with confidence; comments don't provide
 that benefit. This is not a religious belief, it's  something that can be
 demonstrated the first time you want to maintain a 1500 line file and all
 you have are comments.

 In TDD, the test is written first. It expresses the design for the code to
 follow. When the code is then re-factored, it ensures the code still meets
 the original design.

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/




~|
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:350159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-29 Thread Steve 'Cutter' Blades

Mike,

He's not a condescending troll, just passionate in what he believes. 
Which is fine, if he also respects that other's beliefs, while 
different, are not necessarily 'wrong'.

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book

The best way to predict the future is to help create it


On 2/28/2012 11:27 PM, Michael Stemle wrote:
 You're a condescending troll, and I'm done here. Have a great day.

 --
 ~ Mike Stemle, Jr.

 On Feb 28, 2012, at 21:56, James Holmesjames.hol...@gmail.com  wrote:

 And TDD is the easiest way to cover the re-factoring necessary to prevent
 1500 line files from turning up. It's also the easiest way to come up with
 the good designs that are equally as necessary.

 Dev shops who've implemented TDD can and do easily measure the improvement
 in code quality scientifically. Indicators such as number of defects
 discovered post-deployment (or even during development) are a tangible,
 improvable measurement.

 Seriously, instead of being offended, try reading more on Agile practices.
 This stuff actually works and produces measurably better results
 and measurably better value for your clients (which is what it's all about).

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/


 On 29 February 2012 09:48, Michael Stemlethemanchic...@gmail.com  wrote:

 In properly designed code you don't have 1500-line files. Now that I've
 made my ridiculous assertion can we please move on?

 This is just silly, and there is no actual reason behind your assertion,
 merely an arrogant assertion that you know how everyone else's applications
 are written, and that you have - at long last - discovered a unifying
 theory in computer science.

 Tests are great, useful, and absolutely vital to modern development
 practice... but they are a poor substitute for documentation or debuggers.

 --
 ~ Mike Stemle, Jr.

 On Feb 28, 2012, at 19:36, James Holmesjames.hol...@gmail.com  wrote:

 Those using comments to plan code probably don't have any tests. Tests
 are
 essential to allow re-factoring with confidence; comments don't provide
 that benefit. This is not a religious belief, it's  something that can be
 demonstrated the first time you want to maintain a 1500 line file and all
 you have are comments.

 In TDD, the test is written first. It expresses the design for the code
 to
 follow. When the code is then re-factored, it ensures the code still
 meets
 the original design.

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/


 On 29 February 2012 08:45, Michael Stemlethemanchic...@gmail.com
 wrote:
 We are in disagreement. Some of us actually use comments as a way of
 planning and maintaining our code.




 

~|
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:350160
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-29 Thread Bryan Stevenson

Bingo Steve...well said!

On Wed, 2012-02-29 at 08:25 -0500, Steve 'Cutter' Blades wrote:

 Beautiful sentiment, *if* you didn't inherit a 3500 template legacy 
 application originally written on CF 4.
 
 Both (comments and TDD) have their place. Fact is, what is simple and 
 clear and second nature for me is Greek to a noob, and I train those all 
 of the time. Comments are for those who come behind, remembering that 
 not all of them share my level of skill (or my preconceptions of what is 
 right and wrong to do).
 
 Steve 'Cutter' Blades
 Adobe Community Professional
 Adobe Certified Expert
 Advanced Macromedia ColdFusion MX 7 Developer
 
 http://cutterscrossing.com
 
 
 Co-Author Learning Ext JS 3.2 Packt Publishing 2010
 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book



-- 


Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: br...@electricedgesystems.com
web: www.electricedgesystems.com
 
Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.
Please consider the environment before printing this e-mail



~|
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:350163
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-29 Thread Dave Watts

 Seriously, instead of being offended, try reading more on Agile practices.
 This stuff actually works and produces measurably better results
 and measurably better value for your clients (which is what it's all about).

I think people are offended more from your tone than your advocacy of
TDD. While tests are great - and they are! - they don't fulfill all of
the purposes of comments.

Let me give you an example. Recently, I built a J2EE web app that
interacts with a Google Search Appliance. I used TDD, and that worked
out well. But I still needed to add at least one comment. I was using
a Java API that let my app talk to the GSA, and that API can
automatically make HTTP requests. Or, you can do that part yourself,
using java.net or Apache HTTPClient or whatever. I chose to use Apache
HTTPClient, although it wasn't actually needed by my app, because it
would in the future allow me to do some additional things, like
authentication handling or modifying the request URL. Now, I couldn't
very well build those into my tests, but I thought it was worth
commenting on for the people who'll maintain that code. There were a
couple of other things that I did myself instead of relying on the API
to do these things, for various reasons, and I commented those too.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
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:350166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-29 Thread Dominic Watson

Quite, commenting on choices of approach can be hard/impossible to
document through the names of tests. Things such as:

// this may seem odd, but we do x, y, z for a performance benefit - do
not be tempted to rewrite this as a, b, c

Or, as I once found:

cfif I have fixed this EQ yes I have
// many lines of code
/cfif

Ok, so that last one was a bad (but true), example.

On 29 February 2012 19:12, Dave Watts dwa...@figleaf.com wrote:

 Seriously, instead of being offended, try reading more on Agile practices.
 This stuff actually works and produces measurably better results
 and measurably better value for your clients (which is what it's all about).

 I think people are offended more from your tone than your advocacy of
 TDD. While tests are great - and they are! - they don't fulfill all of
 the purposes of comments.

 Let me give you an example. Recently, I built a J2EE web app that
 interacts with a Google Search Appliance. I used TDD, and that worked
 out well. But I still needed to add at least one comment. I was using
 a Java API that let my app talk to the GSA, and that API can
 automatically make HTTP requests. Or, you can do that part yourself,
 using java.net or Apache HTTPClient or whatever. I chose to use Apache
 HTTPClient, although it wasn't actually needed by my app, because it
 would in the future allow me to do some additional things, like
 authentication handling or modifying the request URL. Now, I couldn't
 very well build those into my tests, but I thought it was worth
 commenting on for the people who'll maintain that code. There were a
 couple of other things that I did myself instead of relying on the API
 to do these things, for various reasons, and I commented those too.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
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:350167
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Remove all CF comments

2012-02-28 Thread Chad Baloga

Are there any programs out there that will remove all CF comments from your 
code?? 

~|
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:350128
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread J.J. Merrick

You can just do a find/replace with CFBuilder. It allows for wildcards
so just do

!---*---

and replace it with 



-J.J.



On Tue, Feb 28, 2012 at 6:57 AM, Chad Baloga cbal...@gmail.com wrote:

 Are there any programs out there that will remove all CF comments from your 
 code??

 

~|
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:350129
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

This is a pretty simple task to script, but why would one wish to remove all 
comments? That seems like a poor practice.

--
~ Mike Stemle, Jr.

On Feb 28, 2012, at 6:57, Chad Baloga cbal...@gmail.com wrote:

 
 Are there any programs out there that will remove all CF comments from your 
 code?? 
 
 

~|
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:350130
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Casey Dougall - Uber Website Solutions

On Tue, Feb 28, 2012 at 8:16 AM, Michael Stemle themanchic...@gmail.comwrote:

 This is a pretty simple task to script, but why would one wish to remove
 all comments? That seems like a poor practice.



because code should be self explanatory hahaha.


~|
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:350131
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Raymond Camden

When you arrive in Heaven with all the perfect code,please send us a
postcard. ;)

On Tue, Feb 28, 2012 at 7:54 AM, Casey Dougall - Uber Website
Solutions ca...@uberwebsitesolutions.com wrote:

 On Tue, Feb 28, 2012 at 8:16 AM, Michael Stemle 
 themanchic...@gmail.comwrote:

 This is a pretty simple task to script, but why would one wish to remove
 all comments? That seems like a poor practice.



 because code should be self explanatory hahaha.


 

~|
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:350132
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread James Holmes

Try TDD. The unit tests express the design for the code; comments are
therefore unnecessary.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 28 February 2012 22:04, Raymond Camden raymondcam...@gmail.com wrote:


 When you arrive in Heaven with all the perfect code,please send us a
 postcard. ;)

 On Tue, Feb 28, 2012 at 7:54 AM, Casey Dougall - Uber Website
 Solutions ca...@uberwebsitesolutions.com wrote:
 
  On Tue, Feb 28, 2012 at 8:16 AM, Michael Stemle themanchic...@gmail.com
 wrote:
 
  This is a pretty simple task to script, but why would one wish to remove
  all comments? That seems like a poor practice.
 
 
 
  because code should be self explanatory hahaha.



~|
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:350133
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

This reminds me of the time that Ruby's developers told me that unit tests
obsoleted debuggers. This is silliness. Until unit tests can convey
developer intent, comments will remain useful.

On Tue, Feb 28, 2012 at 08:16, James Holmes james.hol...@gmail.com wrote:


 Try TDD. The unit tests express the design for the code; comments are
 therefore unnecessary.

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/


 On 28 February 2012 22:04, Raymond Camden raymondcam...@gmail.com wrote:

 
  When you arrive in Heaven with all the perfect code,please send us a
  postcard. ;)
 
  On Tue, Feb 28, 2012 at 7:54 AM, Casey Dougall - Uber Website
  Solutions ca...@uberwebsitesolutions.com wrote:
  
   On Tue, Feb 28, 2012 at 8:16 AM, Michael Stemle 
 themanchic...@gmail.com
  wrote:
  
   This is a pretty simple task to script, but why would one wish to
 remove
   all comments? That seems like a poor practice.
  
  
  
   because code should be self explanatory hahaha.
 


 

~|
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:350135
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Dinowitz

The realistic problem that you'll find in this is nested comments. You
can't just delete anything between !--- and --- as you don't know
what is actually within that range. I use a regex that tests for how
deep the comments in an application goes. Then I use another set to
remove nested blocks from the most nested to the least.
My preference for this is powergrep but you can use grepwin as well.
I'll have to write up an article on the specific regex and its usage.
It's not a simple one and needs explanation both in concept and
execution.

But this is not a single, simple, program approach which can be used
without any oversight. It can be but I've never had to make it so and
I don't know anyone who has.

Sorry


On Tue, Feb 28, 2012 at 7:57 AM, Chad Baloga cbal...@gmail.com wrote:

 Are there any programs out there that will remove all CF comments from your 
 code??

 

~|
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:350136
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread James Holmes

Really good tests and self explanatory code do exactly that. Any code that
isn't self explanatory is too complex and needs to be re-factored.

Code that's so obscure that it needs a comment is silliness.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 28 February 2012 23:32, Michael Stemle themanchic...@gmail.com wrote:


 This reminds me of the time that Ruby's developers told me that unit tests
 obsoleted debuggers. This is silliness. Until unit tests can convey
 developer intent, comments will remain useful.


~|
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:350142
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

We are in disagreement. Some of us actually use comments as a way of planning 
and maintaining our code. This is coming across as religious belief or 
trolling, not actual development or engineering. If we continue I'm virtually 
certain we will break out into an argument on tabs versus spaces for 
indentation. 

--
~ Mike Stemle, Jr.

On Feb 28, 2012, at 18:19, James Holmes james.hol...@gmail.com wrote:

 
 Really good tests and self explanatory code do exactly that. Any code that
 isn't self explanatory is too complex and needs to be re-factored.
 
 Code that's so obscure that it needs a comment is silliness.
 
 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/
 
 
 On 28 February 2012 23:32, Michael Stemle themanchic...@gmail.com wrote:
 
 
 This reminds me of the time that Ruby's developers told me that unit tests
 obsoleted debuggers. This is silliness. Until unit tests can convey
 developer intent, comments will remain useful.
 
 
 

~|
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:350143
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Brian Thornton

It hasn't been said but with eclipse these become more than
breadcrumbs. the TODO: comment allows for task tracking of left overs
also.

On Tue, Feb 28, 2012 at 7:45 PM, Michael Stemle themanchic...@gmail.com wrote:

 We are in disagreement. Some of us actually use comments as a way of planning 
 and maintaining our code. This is coming across as religious belief or 
 trolling, not actual development or engineering. If we continue I'm virtually 
 certain we will break out into an argument on tabs versus spaces for 
 indentation.

 --
 ~ Mike Stemle, Jr.

 On Feb 28, 2012, at 18:19, James Holmes james.hol...@gmail.com wrote:


 Really good tests and self explanatory code do exactly that. Any code that
 isn't self explanatory is too complex and needs to be re-factored.

 Code that's so obscure that it needs a comment is silliness.

 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/


 On 28 February 2012 23:32, Michael Stemle themanchic...@gmail.com wrote:


 This reminds me of the time that Ruby's developers told me that unit tests
 obsoleted debuggers. This is silliness. Until unit tests can convey
 developer intent, comments will remain useful.




 

~|
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:350145
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Bryan Stevenson

tabs inserted as 2 spaces ;-)

On Tue, 2012-02-28 at 18:45 -0600, Michael Stemle wrote:

 We are in disagreement. Some of us actually use comments as a way of planning 
 and maintaining our code. This is coming across as religious belief or 
 trolling, not actual development or engineering. If we continue I'm virtually 
 certain we will break out into an argument on tabs versus spaces for 
 indentation. 
 
 --
 ~ Mike Stemle, Jr.


-- 


Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: br...@electricedgesystems.com
web: www.electricedgesystems.com
 
Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments.
Please consider the environment before printing this e-mail



~|
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:350146
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Matt Quackenbush

C'mon, doods and doodettes. Will someone just step up and say it the way it
really is?

Bah, no one else will, so here goes.

Anyone that puts comments in their code OR writes/generates/runs unit tests
for their code is obviously a complete ID10T wannabe. Real programmers
drink beer, watch star wars, and occasionally glance at the screen. Within
hours (if not minutes), the project is done and it's off to the next one.

If you're stuck in TDD or comment land, you suck. Programming is not for
you. Get a real job.


~|
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:350147
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

Well played :)

--
~ Mike Stemle, Jr.

On Feb 28, 2012, at 18:59, Bryan Stevenson br...@electricedgesystems.com 
wrote:

 
 tabs inserted as 2 spaces ;-)
 
 On Tue, 2012-02-28 at 18:45 -0600, Michael Stemle wrote:
 
 We are in disagreement. Some of us actually use comments as a way of 
 planning and maintaining our code. This is coming across as religious belief 
 or trolling, not actual development or engineering. If we continue I'm 
 virtually certain we will break out into an argument on tabs versus spaces 
 for indentation. 
 
 --
 ~ Mike Stemle, Jr.
 
 
 -- 
 
 
 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 phone: 250.480.0642
 fax: 250.480.1264
 cell: 250.920.8830
 e-mail: br...@electricedgesystems.com
 web: www.electricedgesystems.com
 
 Notice:
 This message, including any attachments, is confidential and may contain
 information that is privileged or exempt from disclosure. It is intended
 only for the person to whom it is addressed unless expressly authorized
 otherwise by the sender. If you are not an authorized recipient, please
 notify the sender immediately and permanently destroy all copies of this
 message and attachments.
 Please consider the environment before printing this e-mail
 
 
 
 

~|
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:350149
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread James Holmes

Those using comments to plan code probably don't have any tests. Tests are
essential to allow re-factoring with confidence; comments don't provide
that benefit. This is not a religious belief, it's  something that can be
demonstrated the first time you want to maintain a 1500 line file and all
you have are comments.

In TDD, the test is written first. It expresses the design for the code to
follow. When the code is then re-factored, it ensures the code still meets
the original design.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 29 February 2012 08:45, Michael Stemle themanchic...@gmail.com wrote:


 We are in disagreement. Some of us actually use comments as a way of
 planning and maintaining our code.


~|
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:350150
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

In properly designed code you don't have 1500-line files. Now that I've made my 
ridiculous assertion can we please move on?

This is just silly, and there is no actual reason behind your assertion, merely 
an arrogant assertion that you know how everyone else's applications are 
written, and that you have - at long last - discovered a unifying theory in 
computer science.

Tests are great, useful, and absolutely vital to modern development practice... 
but they are a poor substitute for documentation or debuggers. 

--
~ Mike Stemle, Jr.

On Feb 28, 2012, at 19:36, James Holmes james.hol...@gmail.com wrote:

 
 Those using comments to plan code probably don't have any tests. Tests are
 essential to allow re-factoring with confidence; comments don't provide
 that benefit. This is not a religious belief, it's  something that can be
 demonstrated the first time you want to maintain a 1500 line file and all
 you have are comments.
 
 In TDD, the test is written first. It expresses the design for the code to
 follow. When the code is then re-factored, it ensures the code still meets
 the original design.
 
 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/
 
 
 On 29 February 2012 08:45, Michael Stemle themanchic...@gmail.com wrote:
 
 
 We are in disagreement. Some of us actually use comments as a way of
 planning and maintaining our code.
 
 
 

~|
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:350151
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread James Holmes

And TDD is the easiest way to cover the re-factoring necessary to prevent
1500 line files from turning up. It's also the easiest way to come up with
the good designs that are equally as necessary.

Dev shops who've implemented TDD can and do easily measure the improvement
in code quality scientifically. Indicators such as number of defects
discovered post-deployment (or even during development) are a tangible,
improvable measurement.

Seriously, instead of being offended, try reading more on Agile practices.
This stuff actually works and produces measurably better results
and measurably better value for your clients (which is what it's all about).

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 29 February 2012 09:48, Michael Stemle themanchic...@gmail.com wrote:


 In properly designed code you don't have 1500-line files. Now that I've
 made my ridiculous assertion can we please move on?

 This is just silly, and there is no actual reason behind your assertion,
 merely an arrogant assertion that you know how everyone else's applications
 are written, and that you have - at long last - discovered a unifying
 theory in computer science.

 Tests are great, useful, and absolutely vital to modern development
 practice... but they are a poor substitute for documentation or debuggers.

 --
 ~ Mike Stemle, Jr.

 On Feb 28, 2012, at 19:36, James Holmes james.hol...@gmail.com wrote:

 
  Those using comments to plan code probably don't have any tests. Tests
 are
  essential to allow re-factoring with confidence; comments don't provide
  that benefit. This is not a religious belief, it's  something that can be
  demonstrated the first time you want to maintain a 1500 line file and all
  you have are comments.
 
  In TDD, the test is written first. It expresses the design for the code
 to
  follow. When the code is then re-factored, it ensures the code still
 meets
  the original design.
 
  --
  Shu Ha Ri: Agile and .NET blog
  http://www.bifrost.com.au/
 
 
  On 29 February 2012 08:45, Michael Stemle themanchic...@gmail.com
 wrote:
 
 
  We are in disagreement. Some of us actually use comments as a way of
  planning and maintaining our code.
 
 
 

 

~|
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:350154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread James Holmes

I should also have added, tests *are* the documentation.

--
Shu Ha Ri: Agile and .NET blog
http://www.bifrost.com.au/


On 29 February 2012 09:48, Michael Stemle themanchic...@gmail.com wrote:


 Tests are great, useful, and absolutely vital to modern development
 practice... but they are a poor substitute for documentation or debuggers.




~|
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:350155
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove all CF comments

2012-02-28 Thread Michael Stemle

You're a condescending troll, and I'm done here. Have a great day. 

--
~ Mike Stemle, Jr.

On Feb 28, 2012, at 21:56, James Holmes james.hol...@gmail.com wrote:

 
 And TDD is the easiest way to cover the re-factoring necessary to prevent
 1500 line files from turning up. It's also the easiest way to come up with
 the good designs that are equally as necessary.
 
 Dev shops who've implemented TDD can and do easily measure the improvement
 in code quality scientifically. Indicators such as number of defects
 discovered post-deployment (or even during development) are a tangible,
 improvable measurement.
 
 Seriously, instead of being offended, try reading more on Agile practices.
 This stuff actually works and produces measurably better results
 and measurably better value for your clients (which is what it's all about).
 
 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/
 
 
 On 29 February 2012 09:48, Michael Stemle themanchic...@gmail.com wrote:
 
 
 In properly designed code you don't have 1500-line files. Now that I've
 made my ridiculous assertion can we please move on?
 
 This is just silly, and there is no actual reason behind your assertion,
 merely an arrogant assertion that you know how everyone else's applications
 are written, and that you have - at long last - discovered a unifying
 theory in computer science.
 
 Tests are great, useful, and absolutely vital to modern development
 practice... but they are a poor substitute for documentation or debuggers.
 
 --
 ~ Mike Stemle, Jr.
 
 On Feb 28, 2012, at 19:36, James Holmes james.hol...@gmail.com wrote:
 
 
 Those using comments to plan code probably don't have any tests. Tests
 are
 essential to allow re-factoring with confidence; comments don't provide
 that benefit. This is not a religious belief, it's  something that can be
 demonstrated the first time you want to maintain a 1500 line file and all
 you have are comments.
 
 In TDD, the test is written first. It expresses the design for the code
 to
 follow. When the code is then re-factored, it ensures the code still
 meets
 the original design.
 
 --
 Shu Ha Ri: Agile and .NET blog
 http://www.bifrost.com.au/
 
 
 On 29 February 2012 08:45, Michael Stemle themanchic...@gmail.com
 wrote:
 
 
 We are in disagreement. Some of us actually use comments as a way of
 planning and maintaining our code.
 
 
 
 
 
 
 

~|
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:350156
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


remove high ASCII chars from text

2011-07-11 Thread Matthew Friedman

Is there a simple way to remove bad ascii chars form a textarea.

We are using TINYMEC as an html editor and it works great. the issue is when we 
copy from MS Word we get back chars that will not render correctly in HTML.

We are using and have enhanced the UDF DeMoronize to pull bad chars but we also 
want to just remove any char that is  225.
is there a way to do this other then doing a looP

for (i = 128; i LTE 160; i = i + 1)
{
 Text = Replace(Text, Chr(i), , All);
}

We would want to strip anything greater then 225 and we do not want to run this 
loop up to 3000 a large waste of processing to do this.

Open to any thoughts here.
Thanks in advance - the is always great.

Matt

-- Life is to short to drink cheep beer -- 

~|
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:346179
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


re: remove high ASCII chars from text

2011-07-11 Thread Jason Fisher

Try this (not tested):

Text = reReplace(Text, [^\x20-\x7E], , all);



From: Matthew Friedman m...@hozgroup.com
Sent: Monday, July 11, 2011 12:48 PM
To: cf-talk cf-talk@houseoffusion.com
Subject: remove high ASCII chars from text

Is there a simple way to remove bad ascii chars form a textarea.

We are using TINYMEC as an html editor and it works great. the issue is 
when we copy from MS Word we get back chars that will not render correctly 
in HTML.

We are using and have enhanced the UDF DeMoronize to pull bad chars but we 
also want to just remove any char that is  225.
is there a way to do this other then doing a looP

for (i = 128; i LTE 160; i = i + 1)
{
Text = Replace(Text, Chr(i), , All);
}

We would want to strip anything greater then 225 and we do not want to run 
this loop up to 3000 a large waste of processing to do this.

Open to any thoughts here.
Thanks in advance - the is always great.

Matt

-- Life is to short to drink cheep beer -- 



~|
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:346180
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: remove high ASCII chars from text

2011-07-11 Thread Peter Boughton

Jason wrote:
Text = reReplace(Text, [^\x20-\x7E], , all);

That'll also strip tabs, newlines and carriage returns, which probably isn't 
desired.

Use [^\t\n\r\x20-\x7E] to keep them.


However, this shouldn't be necessary - doesn't TinyMCE already have the ability 
to clean-up MS Word pastes? 

~|
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:346185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-04 Thread Dave Burns

Thanks, Russ. Interesting. I've always ruled out using CF's temp directory for 
security reasons. I'm on shared hosting at CT. If I'm generating PDF invoices 
and account statements for customers, seems like I don't want them sitting 
around in the temp directory where other people on the same box could get into 
them. That's why I always have managed my own temp directory in my dir tree. 
Make sense? Or do you think there's a better way?


~|
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:344225
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-04 Thread Russ Michaels

well if you are storing the attachments within your own webspace, then why
not just have a schedule that cleans them up each night, then you wont have
to worrk about deleting them before they been sent.

On Wed, May 4, 2011 at 4:57 PM, Dave Burns cft...@burnsorama.com wrote:


 Thanks, Russ. Interesting. I've always ruled out using CF's temp directory
 for security reasons. I'm on shared hosting at CT. If I'm generating PDF
 invoices and account statements for customers, seems like I don't want them
 sitting around in the temp directory where other people on the same box
 could get into them. That's why I always have managed my own temp directory
 in my dir tree. Make sense? Or do you think there's a better way?


 

~|
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:344226
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-04 Thread Jochem van Dieten

On Tue, May 3, 2011 at 7:23 PM, Dave Burns wrote:
 I just spent an hour working with a tech at Crystal Tech diagnosing an email 
 problem which ended up with me realizing that the very convenient remove 
 attribute that is new to CF9's cfmail tag will not work in their environment. 
 The reason for this is that they don't use CF's built-in mail client, instead 
 handing off to SmarterMail.

Disable spooling alltogether with the spoolenable attribute of cfmail.

Jochem


-- 
Jochem van Dieten
http://jochem.vandieten.net/

~|
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:344227
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-04 Thread Dave Burns

Uh, well, that's what I suggested in my original post. :-) I wanted to see if 
anyone else had experience with better ideas. Thanks!


~|
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:344234
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-04 Thread Dave Burns

Jochem, that's an interesting idea and I'll give it some thought. The downside 
is that it will slow down page processing somewhat since sending mail would be 
synchronous. Thanks.


~|
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:344235
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CF9's cfmail remove attribute not working at Crystal Tech

2011-05-03 Thread Dave Burns

I just spent an hour working with a tech at Crystal Tech diagnosing an email 
problem which ended up with me realizing that the very convenient remove 
attribute that is new to CF9's cfmail tag will not work in their environment. 
The reason for this is that they don't use CF's built-in mail client, instead 
handing off to SmarterMail. So although CF believes an email has left the 
spooler and its attachments can be deleted, SmarterMail will still come back 
for them but fail when it finds the attachments are gone.

What do people recommend as a viable way to deal with this (I assume everyone 
had to deal with this anyway before CF9)? Is the answer to set up a scheduled 
task that cleans out some directory of email attachments at regular intervals?

db


~|
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:344173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF9's cfmail remove attribute not working at Crystal Tech

2011-05-03 Thread Russ Michaels

your host should actually be the ones cleaning up the temp folders not you
:-)
we run scheduled tasks to do things like this on all our servers

1. respool failed mail for 24 hours before deleting it
2. clean up all the coldfusion temp folders
3. delete old class files and reduce the memory usage.
4. delete old log files (not just CF)

on top of these I actually review the CF logs and FusionReactor logs and
inform customers of recurring problems so that they can fix them and improve
the performanc eof their site.

I can tell you now that not many hosts do that :-)



--

Russ Michaels

www.bluethunderinternet.com  : Business hosting services  solutions
www.cfmldeveloper.com: ColdFusion developer community
www.michaels.me.uk   : my blog
www.cfsearch.com : ColdFusion search engine
**
*skype me* : russmichaels


~|
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:344186
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-27 Thread Michael Grant

So _part_ of it seems to work. However the query string is still being
appended to the end. Is there a way to nix that?

On Tue, Apr 26, 2011 at 11:07 AM, Wil Genovese jugg...@trunkful.com wrote:


 But did it work?


 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com

 wilg...@trunkful.com
 www.trunkful.com

 On Apr 26, 2011, at 6:24 AM, Michael Grant wrote:

 
  you==star
 
  thanks!
 
  On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com
 wrote:
 
 
  Michael,
 
  Try this
 
  RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/
 
  Also, get the Regular Expressions Tester plugin for FireFox. It works
  great!
 
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com
  www.trunkful.com
 
  On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:
 
 
  I so suck at regex and redirects. I suck at lots of other stuff to, but
  that's irrelevant to this post.
 
  The simple explanation of what I want is a url like :
  mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
  mysite.com/sales/1/122.
 
  The ideal situation is anything that ends in /122 (mysite.com/*/122/)
 to
  redirect to mysite.com/sales/1/122/.
 
  So first, strip the query string, second if it's /122 go to
 sales/1/122.
 
  Any help would be greatly appreciated.
 
  -Michael
 
 
 
 
 
 
 

 

~|
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:344014
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-27 Thread denstar

On Wed, Apr 27, 2011 at 4:48 AM, Michael Grant wrote:

 So _part_ of it seems to work. However the query string is still being
 appended to the end. Is there a way to nix that?

Try adding a ?

RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/?

Dunno if it'll work, but mebbe.

:Den

-- 
To know what people really think, pay regard to what they do, rather
than what they say.
George Santayana

~|
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:344019
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Michael Grant

you==star

thanks!

On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com wrote:


 Michael,

 Try this

 RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/

 Also, get the Regular Expressions Tester plugin for FireFox. It works
 great!




 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com

 wilg...@trunkful.com
 www.trunkful.com

 On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:

 
  I so suck at regex and redirects. I suck at lots of other stuff to, but
  that's irrelevant to this post.
 
  The simple explanation of what I want is a url like :
  mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
  mysite.com/sales/1/122.
 
  The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
  redirect to mysite.com/sales/1/122/.
 
  So first, strip the query string, second if it's /122 go to sales/1/122.
 
  Any help would be greatly appreciated.
 
  -Michael
 
 
 

 

~|
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:343990
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Wil Genovese

But did it work?


Wil Genovese
Sr. Web Application Developer/
Systems Administrator
CF Webtools
www.cfwebtools.com

wilg...@trunkful.com
www.trunkful.com

On Apr 26, 2011, at 6:24 AM, Michael Grant wrote:

 
 you==star
 
 thanks!
 
 On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com wrote:
 
 
 Michael,
 
 Try this
 
 RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/
 
 Also, get the Regular Expressions Tester plugin for FireFox. It works
 great!
 
 
 
 
 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com
 
 wilg...@trunkful.com
 www.trunkful.com
 
 On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:
 
 
 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.
 
 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.
 
 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.
 
 So first, strip the query string, second if it's /122 go to sales/1/122.
 
 Any help would be greatly appreciated.
 
 -Michael
 
 
 
 
 
 
 

~|
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:343991
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-26 Thread Michael Grant

I dunno yet. I won't be able to test for a bit. However you're a star just
for replying.


On Tue, Apr 26, 2011 at 11:07 AM, Wil Genovese jugg...@trunkful.com wrote:


 But did it work?


 Wil Genovese
 Sr. Web Application Developer/
 Systems Administrator
 CF Webtools
 www.cfwebtools.com

 wilg...@trunkful.com
 www.trunkful.com

 On Apr 26, 2011, at 6:24 AM, Michael Grant wrote:

 
  you==star
 
  thanks!
 
  On Tue, Apr 26, 2011 at 1:40 AM, Wil Genovese jugg...@trunkful.com
 wrote:
 
 
  Michael,
 
  Try this
 
  RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/
 
  Also, get the Regular Expressions Tester plugin for FireFox. It works
  great!
 
 
 
 
  Wil Genovese
  Sr. Web Application Developer/
  Systems Administrator
  CF Webtools
  www.cfwebtools.com
 
  wilg...@trunkful.com
  www.trunkful.com
 
  On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:
 
 
  I so suck at regex and redirects. I suck at lots of other stuff to, but
  that's irrelevant to this post.
 
  The simple explanation of what I want is a url like :
  mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
  mysite.com/sales/1/122.
 
  The ideal situation is anything that ends in /122 (mysite.com/*/122/)
 to
  redirect to mysite.com/sales/1/122/.
 
  So first, strip the query string, second if it's /122 go to
 sales/1/122.
 
  Any help would be greatly appreciated.
 
  -Michael
 
 
 
 
 
 
 

 

~|
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:343992
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-25 Thread Michael Grant

Anyone?

Bueller... Bueller... Bueller... Anyone... Anyone... Anyone?


On Sat, Apr 16, 2011 at 2:24 PM, Michael Grant mgr...@modus.bz wrote:

 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.

 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.

 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.

 So first, strip the query string, second if it's /122 go to sales/1/122.

 Any help would be greatly appreciated.

 -Michael



~|
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:343982
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: htaccess - 301 - wildcard and remove query string.

2011-04-25 Thread Jenny Gavin-Wear

Hi Michael,

OK .. so you have a link with:

http://www.mysite.com/mypage.cfm?key1=1key2=122

On the mypage.cfm (which could be the same page with the link) one providing
the link have something like:

ciff isdefined(url.key1) and val(url.key1)
cflocation url=../myredirectpage.cfm/#url.key2#
/cfif

Is this what you are trying to achieve?

Jenny


-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz]
Sent: 25 April 2011 19:37
To: cf-talk
Subject: Re: htaccess - 301 - wildcard and remove query string.



Anyone?

Bueller... Bueller... Bueller... Anyone... Anyone... Anyone?


On Sat, Apr 16, 2011 at 2:24 PM, Michael Grant mgr...@modus.bz wrote:

 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.

 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.

 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.

 So first, strip the query string, second if it's /122 go to sales/1/122.

 Any help would be greatly appreciated.

 -Michael





~|
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:343984
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-25 Thread Michael Grant

Thanks for the reply! unfortunately I'm trying to do this in htaccess not cf. I 
know it's cf-talk and all, but I generally ask here even for some non-cf stuff 
since this list has some of the most intelligent peeps on the inter tubes.

Thank you very much for posting though I appreciate it.

Sent from my iPhone.


On 2011-04-25, at 6:26 PM, Jenny Gavin-Wear jenn...@fasttrackonline.co.uk 
wrote:

 
 Hi Michael,
 
 OK .. so you have a link with:
 
 http://www.mysite.com/mypage.cfm?key1=1key2=122
 
 On the mypage.cfm (which could be the same page with the link) one providing
 the link have something like:
 
 ciff isdefined(url.key1) and val(url.key1)
 cflocation url=../myredirectpage.cfm/#url.key2#
 /cfif
 
 Is this what you are trying to achieve?
 
 Jenny
 
 
 -Original Message-
 From: Michael Grant [mailto:mgr...@modus.bz]
 Sent: 25 April 2011 19:37
 To: cf-talk
 Subject: Re: htaccess - 301 - wildcard and remove query string.
 
 
 
 Anyone?
 
 Bueller... Bueller... Bueller... Anyone... Anyone... Anyone?
 
 
 On Sat, Apr 16, 2011 at 2:24 PM, Michael Grant mgr...@modus.bz wrote:
 
 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.
 
 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.
 
 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.
 
 So first, strip the query string, second if it's /122 go to sales/1/122.
 
 Any help would be greatly appreciated.
 
 -Michael
 
 
 
 
 
 

~|
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:343987
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-25 Thread Wil Genovese

Michael,

Try this

RewriteRule ^([^\/]*)/sales/([0-9]){1}/(122)  mysite.com/sales/$2/$3/

Also, get the Regular Expressions Tester plugin for FireFox. It works great!




Wil Genovese
Sr. Web Application Developer/
Systems Administrator
CF Webtools
www.cfwebtools.com

wilg...@trunkful.com
www.trunkful.com

On Apr 16, 2011, at 1:24 PM, Michael Grant wrote:

 
 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.
 
 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.
 
 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.
 
 So first, strip the query string, second if it's /122 go to sales/1/122.
 
 Any help would be greatly appreciated.
 
 -Michael
 
 
 

~|
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:343988
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: htaccess - 301 - wildcard and remove query string.

2011-04-18 Thread Michael Grant

Any redirect ninja's wanna show some love?


On Sat, Apr 16, 2011 at 2:24 PM, Michael Grant mgr...@modus.bz wrote:

 I so suck at regex and redirects. I suck at lots of other stuff to, but
 that's irrelevant to this post.

 The simple explanation of what I want is a url like :
 mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
 mysite.com/sales/1/122.

 The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
 redirect to mysite.com/sales/1/122/.

 So first, strip the query string, second if it's /122 go to sales/1/122.

 Any help would be greatly appreciated.

 -Michael



~|
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:343814
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


htaccess - 301 - wildcard and remove query string.

2011-04-16 Thread Michael Grant

I so suck at regex and redirects. I suck at lots of other stuff to, but
that's irrelevant to this post.

The simple explanation of what I want is a url like :
mysite.com/sales/1/122/?key=valuekey2=value2 to redirect to just
mysite.com/sales/1/122.

The ideal situation is anything that ends in /122 (mysite.com/*/122/) to
redirect to mysite.com/sales/1/122/.

So first, strip the query string, second if it's /122 go to sales/1/122.

Any help would be greatly appreciated.

-Michael


~|
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:343783
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Remove html characters

2010-05-18 Thread Rick Sanders

Hey all,

 

What's the best way to remove html characters and make something plain text?
reReplace?

 

Thanks,

 

Rick

Webenergy

 

 




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


RE: Remove html characters

2010-05-18 Thread Paul Alkema

Try this...

cfset html = 'pa href=test with link/a /p' 
 
cfset withoutHtml = REReplaceNoCase(html,a .*(href=[']?)([^' ]+)['
][^]+([^]+)/a,\3: \2,all) 
cfset withoutHtml = REReplaceNoCase(withoutHtml,p[^]*,Chr(10),all) 
cfset withoutHtml = REReplaceNoCase(withoutHtml,[^]+,,all) 
cfoutput#withoutHtml#/cfoutput

Paul Alkema
http://Paulalkema.com/



-Original Message-
From: Rick Sanders [mailto:c...@webenergy.ca] 
Sent: Tuesday, May 18, 2010 9:38 AM
To: cf-talk
Subject: Remove html characters


Hey all,

 

What's the best way to remove html characters and make something plain text?
reReplace?

 

Thanks,

 

Rick

Webenergy

 

 






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


RE: Remove html characters

2010-05-18 Thread Rick Sanders

That's what I thought. I would have to put all the tags in there I want to
remove like div, strong, font, etc...

Thanks.

-Original Message-
From: Paul Alkema [mailto:paulalkemadesi...@gmail.com] 
Sent: Tuesday, May 18, 2010 10:57 AM
To: cf-talk
Subject: RE: Remove html characters


Try this...

cfset html = 'pa href=test with link/a /p' 
 
cfset withoutHtml = REReplaceNoCase(html,a .*(href=[']?)([^' ]+)['
][^]+([^]+)/a,\3: \2,all) 
cfset withoutHtml = REReplaceNoCase(withoutHtml,p[^]*,Chr(10),all) 
cfset withoutHtml = REReplaceNoCase(withoutHtml,[^]+,,all) 
cfoutput#withoutHtml#/cfoutput

Paul Alkema
http://Paulalkema.com/



-Original Message-
From: Rick Sanders [mailto:c...@webenergy.ca] 
Sent: Tuesday, May 18, 2010 9:38 AM
To: cf-talk
Subject: Remove html characters


Hey all,

 

What's the best way to remove html characters and make something plain text?
reReplace?

 

Thanks,

 

Rick

Webenergy

 

 








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


Re: Remove html characters

2010-05-18 Thread Casey Dougall

On Tue, May 18, 2010 at 9:38 AM, Rick Sanders c...@webenergy.ca wrote:


 Hey all,



 What's the best way to remove html characters and make something plain
 text?
 reReplace?




Maybe something like this, there are a couple functions in cflib for this.

http://cflib.org/udf/stripHTML


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


RE: Remove html characters

2010-05-18 Thread Robert Harrison

#REReplace(trim(MYTEXTSTRING), [^]*, , All)#


Robert B. Harrison
Director of Interactive Services
Austin  Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be .

Plug in to our blog: AW Unplugged
http://www.austin-williams.com/unplugged

 

__ Information from ESET Smart Security, version of virus signature
database 5124 (20100518) __

The message was checked by ESET Smart Security.

http://www.eset.com
 

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


Re: Remove html characters

2010-05-18 Thread Tom Chiverton

On Tuesday 18 May 2010 15:33:01 you wrote:
 #REReplace(trim(MYTEXTSTRING), [^]*, , All)#

But if I say that this is  the other thing, which is  that thing, it'll go 
all wrong...

-- 
Tom Chiverton
Helping to centrally extend industry-wide plug-and-play slick products as part 
of the IT team of the year 2010, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
“partner” to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.co

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


RE: Remove html characters

2010-05-18 Thread Paul Alkema

I don't know if this will actually help you or not, But I figured it might
help someone someday. Lol

If your using MSSQL and pulling the data your looking to strip from a
database, than you can actually do this from a mssql user defined function.



-- FIRST, RUN THE CODE BELOW ONCE TO CREATE YOUR INITIAL FUNCTION

USE [yourDataBaseName] --  yourDataBaseName  
GO
/** Strips html **/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE FUNCTION [dbo].[stripHTML]
(@HTMLText NVARCHAR(MAX))
RETURNS NVARCHAR(MAX)
AS
BEGIN
DECLARE @Start INT
DECLARE @End INT
DECLARE @Length INT
SET @Start = CHARINDEX('',@HTMLText)
SET @End = CHARINDEX('',@HTMLText,CHARINDEX('',@HTMLText))
SET @Length = (@End - @Start) + 1
WHILE @Start  0
AND @End  0
AND @Length  0
BEGIN
SET @HTMLText = STUFF(@HTMLText,@Start,@Length,'')
SET @Start = CHARINDEX('',@HTMLText)
SET @End = CHARINDEX('',@HTMLText,CHARINDEX('',@HTMLText))
SET @Length = (@End - @Start) + 1
END
RETURN LTRIM(RTRIM(@HTMLText))
END

-- USAGE EXAMPLE
SELECT dbo.udf_StripHTML('pa href=Test/a/p') as noHtml

-- OR YOU COULD DO THIS
SELECT dbo.udf_StripHTML(table.column) noHTML
FROM table

I've found this very helpful. :)

Regards,
Paul Alkema
http://paulalkema.com/


-Original Message-
From: Tom Chiverton [mailto:tom.chiver...@halliwells.com] 
Sent: Tuesday, May 18, 2010 11:21 AM
To: cf-talk
Subject: Re: Remove html characters


On Tuesday 18 May 2010 15:33:01 you wrote:
 #REReplace(trim(MYTEXTSTRING), [^]*, , All)#

But if I say that this is  the other thing, which is  that thing, it'll go

all wrong...

-- 
Tom Chiverton
Helping to centrally extend industry-wide plug-and-play slick products as
part 
of the IT team of the year 2010, '09 and '08



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A
list of members is available for inspection at the registered office
together with a list of those non members who are referred to as partners.
We use the word partner to refer to a member of the LLP, or an employee or
consultant with equivalent standing and qualifications. Regulated by the
Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may
be confidential or legally privileged.  If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents.  If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.co



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


Re: Remove html characters

2010-05-18 Thread Jochem van Dieten

On 5/18/10, Rick Sanders wrote:
 What's the best way to remove html characters and make something plain text?
 reReplace?

Will the HTML be well-formed?

Jochem

-- 
Jochem van Dieten
http://jochem.vandieten.net/

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


Re: Remove html characters

2010-05-18 Thread Wil Genovese

I use this to create text part message from HTML.  This lets you keep basic  
line break formatting while stripping tags.

!---#
# TextMessage   
 #
# Receive string and return string with any and all tags striped out
 #
# 1. replace BR tags with CRLF
 #
# 2. Strip all remaining html tags from a string
 #
# 3. return plain text message  
 #
##---
cffunction name=TextMessage access=public returntype=string
cfargument name=string required=true type=string
cfscript
var pattern = br;
var CRLF = chr(13)  chr(10);
var message = ReplaceNoCase(arguments.string, pattern, CRLF , 
ALL);
var pattern = [^]*;
/cfscript
cfreturn REReplaceNoCase(message, pattern,  , ALL);
/cffunction

And Tom, how many people use '' or '' in normal writing?  I'll risk it. 

Wil Genovese

One man with courage makes a majority.
-Andrew Jackson

A fine is a tax for doing wrong. A tax is a fine for doing well. 

On May 18, 2010, at 10:21 AM, Tom Chiverton wrote:

 
 On Tuesday 18 May 2010 15:33:01 you wrote:
 #REReplace(trim(MYTEXTSTRING), [^]*, , All)#
 
 But if I say that this is  the other thing, which is  that thing, it'll go 
 all wrong...
 
 -- 
 Tom Chiverton
 Helping to centrally extend industry-wide plug-and-play slick products as 
 part 
 of the IT team of the year 2010, '09 and '08
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in England and 
 Wales under registered number OC307980 whose registered office address is at 
 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
 of members is available for inspection at the registered office together with 
 a list of those non members who are referred to as partners.  We use the word 
 „partner‰ to refer to a member of the LLP, or an employee or consultant with 
 equivalent standing and qualifications. Regulated by the Solicitors 
 Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above and may 
 be confidential or legally privileged.  If you are not the addressee you must 
 not read it and must not use any information contained in nor copy it nor 
 inform any person other than Halliwells LLP or the addressee of its existence 
 or contents.  If you have received this email in error please delete it and 
 notify Halliwells LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.co
 
 

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


Remove multple EXTRA spaces from string

2010-04-23 Thread UXB Internet

I am having a senior moment and can't for the life of me figure this dumb
thing out.  I am trying to remove all extra spaces from a string but leave
the single space there.  Example:
var=this has   many   extra  spaces and return with this has
many extra spaces




Dennis Powers
UXB Internet - A Website Design  Hosting Company
P.O. Box 6028
Wolcott, CT 06716
203-879-2844
http://www.uxbinternet.com







~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333110
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove multple EXTRA spaces from string

2010-04-23 Thread Leigh

 I am having a senior moment 
Space, the final frontier. These are the ... (Oh, that kind of space)

I am not a regex guru. But maybe this?
cfset newStr = reReplace(str, [ ]{2,},  , all)



  

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333111
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Remove multple EXTRA spaces from string

2010-04-23 Thread brad

This appears to work for me:

cfset string = rereplace(string,( +), ,all)


 Original Message 
Subject: Remove multple EXTRA spaces from string
From: UXB Internet denn...@uxbinternet.com
Date: Fri, April 23, 2010 3:26 pm
To: cf-talk cf-talk@houseoffusion.com


I am having a senior moment and can't for the life of me figure this
dumb
thing out. I am trying to remove all extra spaces from a string but
leave
the single space there. Example:
var=this has many extra spaces and return with this has
many extra spaces


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333112
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Remove multple EXTRA spaces from string

2010-04-23 Thread Charlie Griefer

On Fri, Apr 23, 2010 at 1:26 PM, UXB Internet denn...@uxbinternet.comwrote:


 I am having a senior moment and can't for the life of me figure this dumb
 thing out.  I am trying to remove all extra spaces from a string but
 leave
 the single space there.  Example:
 var=this has   many   extra  spaces and return with this has
 many extra spaces


var myString = this has many extra   spaces;

myString = rereplace( myString , \s+ , ' ' , 'all' );

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333113
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Remove multple EXTRA spaces from string

2010-04-23 Thread Leigh

 cfset string = rereplace(string,( +), ,all)

Knew there was a more elegant method I was forgetting..


  

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333114
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Remove multple EXTRA spaces from string

2010-04-23 Thread UXB Internet

 This appears to work for me:
 cfset string = rereplace(string,( +), ,all)


And for me as well. smile Thank you very much.  It has been a long week
today.


Dennis Powers
UXB Internet - A Website Design  Hosting Company
P.O. Box 6028
Wolcott, CT 06716
203-879-2844
http://www.uxbinternet.com





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex to remove script and style blocks

2010-04-07 Thread Charlie Griefer

See
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0a38f-7ffb.html
for
the flag to trigger multi-line capabilities in regex.

(?m)script\b[^]*.*?/script

should do it.

cfset newString = rereplaceNoCase( string ,
'(?m)script\b[^]*.*?/script' , '' , 'all' )

On Tue, Apr 6, 2010 at 9:29 PM, UXB Internet denn...@uxbinternet.comwrote:


 I am at a loss as to how to structure a regex to remove a JavaScript block
 from a file using CF5.  What I am trying to do is remove the script and
 everything including and between /script. something like this:

 script language=JavaScript
!--

   JavaScript code here

// --
 /script

 I have tried this but it give me and error: Bad regular expression

 cfset Newstring = ReReplaceNoCase(string,script.*?.*?/script,,
 all)

 Assistance would be appreciated.


 Dennis Powers
 UXB Internet - A Website Design  Hosting Company
 P.O. Box 6028
 Wolcott, CT 06716
 203-879-2844
 http://www.uxbinternet.com











 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332688
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex to remove script and style blocks

2010-04-07 Thread UXB Internet

I have two mental blocks Secure certificates and REgEx. I am sure therapy
might help smile but right now I just need to someone to tell me where I
am going wrong.  The rereplace does not seem to work.

cfset newString = rereplaceNoCase( string ,
'(?m)script\b[^]*.*?/script' , '' , 'all' )


These are the actual code snippets I am trying to remove from a page:

script type=text/javascript
var gaJsHost = ((https: == document.location.protocol) ? https://ssl.; :
http://www.;);
document.write(unescape(%3Cscript src=' + gaJsHost +
google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E));
/script

script type=text/javascript
try {
var pageTracker = _gat._getTracker();
pageTracker._trackPageview();
} catch(err) {}/script/head




-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com] 
Sent: Wednesday, April 07, 2010 3:22 AM
To: cf-talk
Subject: Re: Regex to remove script and style blocks


See
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172
e0811cbec0a38f-7ffb.html
for
the flag to trigger multi-line capabilities in regex.

(?m)script\b[^]*.*?/script

should do it.

cfset newString = rereplaceNoCase( string ,
'(?m)script\b[^]*.*?/script' , '' , 'all' )

On Tue, Apr 6, 2010 at 9:29 PM, UXB Internet denn...@uxbinternet.comwrote:


 I am at a loss as to how to structure a regex to remove a JavaScript block
 from a file using CF5.  What I am trying to do is remove the script and
 everything including and between /script. something like this:

 script language=JavaScript
!--

   JavaScript code here

// --
 /script

 I have tried this but it give me and error: Bad regular expression

 cfset Newstring = ReReplaceNoCase(string,script.*?.*?/script,,
 all)

 Assistance would be appreciated.


 Dennis Powers
 UXB Internet - A Website Design  Hosting Company
 P.O. Box 6028
 Wolcott, CT 06716
 203-879-2844
 http://www.uxbinternet.com











 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Regex to remove script and style blocks

2010-04-06 Thread UXB Internet

I am at a loss as to how to structure a regex to remove a JavaScript block
from a file using CF5.  What I am trying to do is remove the script and
everything including and between /script. something like this:

script language=JavaScript
!--

   JavaScript code here

// --
/script

I have tried this but it give me and error: Bad regular expression

cfset Newstring = ReReplaceNoCase(string,script.*?.*?/script,,
all)

Assistance would be appreciated.


Dennis Powers
UXB Internet - A Website Design  Hosting Company
P.O. Box 6028
Wolcott, CT 06716
203-879-2844
http://www.uxbinternet.com











~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332684
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CF8 richtext cfextarea: remove styling from pasted txt?

2010-03-02 Thread Paul H

I've put together a very simple html editor for a client using the cf8
richtext cftextarea but the problem I'm having is that whenever the users
cut and pastes, the styling of their original data (most often from MS Word)
is  also pasted into the text area. Is there an easy way to automatically
remove the styling from the pasted text?

 

Thanks in advance.

-Paul

 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331275
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF8 richtext cfextarea: remove styling from pasted txt?

2010-03-02 Thread Tony Bentley

And still maintain links, bold italics, etc? Paste from work function and check 
'ignore font face definitions' and check 'remove styles definitions'. Otherwise 
they can always first copy to notepad then copy from notepad to the editor. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331277
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CF8 richtext cfextarea: remove styling from pasted txt?

2010-03-02 Thread Paul H

Sorry Tony could you please clarify what you mean by paste from work
function? I'm not sure how to go about that. 
Thanks again. -Paul

-Original Message-
From: Tony Bentley [mailto:t...@tonybentley.com] 
Sent: March-02-10 7:16 PM
To: cf-talk
Subject: Re: CF8 richtext cfextarea: remove styling from pasted txt?


And still maintain links, bold italics, etc? Paste from work function and
check 'ignore font face definitions' and check 'remove styles definitions'.
Otherwise they can always first copy to notepad then copy from notepad to
the editor. 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331278
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CF8 richtext cfextarea: remove styling from pasted txt?

2010-03-02 Thread Will Swain

I'm guessing it's a typo and he means the 'Paste from Word' function of the
richtext editor - it's a toolbar option.

-Original Message-
From: Paul H [mailto:p...@smashedvision.com] 
Sent: 03 March 2010 00:42
To: cf-talk
Subject: RE: CF8 richtext cfextarea: remove styling from pasted txt?


Sorry Tony could you please clarify what you mean by paste from work
function? I'm not sure how to go about that. 
Thanks again. -Paul

-Original Message-
From: Tony Bentley [mailto:t...@tonybentley.com] 
Sent: March-02-10 7:16 PM
To: cf-talk
Subject: Re: CF8 richtext cfextarea: remove styling from pasted txt?


And still maintain links, bold italics, etc? Paste from work function and
check 'ignore font face definitions' and check 'remove styles definitions'.
Otherwise they can always first copy to notepad then copy from notepad to
the editor. 





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331279
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CF8 richtext cfextarea: remove styling from pasted txt?

2010-03-02 Thread Paul H

Thanks Will. That sounds familiar now that I think about it. Cheers.


-Original Message-
From: Will Swain [mailto:w...@hothorse.com] 
Sent: March-02-10 7:58 PM
To: cf-talk
Subject: RE: CF8 richtext cfextarea: remove styling from pasted txt?


I'm guessing it's a typo and he means the 'Paste from Word' function of the
richtext editor - it's a toolbar option.

-Original Message-
From: Paul H [mailto:p...@smashedvision.com] 
Sent: 03 March 2010 00:42
To: cf-talk
Subject: RE: CF8 richtext cfextarea: remove styling from pasted txt?


Sorry Tony could you please clarify what you mean by paste from work
function? I'm not sure how to go about that. 
Thanks again. -Paul

-Original Message-
From: Tony Bentley [mailto:t...@tonybentley.com] 
Sent: March-02-10 7:16 PM
To: cf-talk
Subject: Re: CF8 richtext cfextarea: remove styling from pasted txt?


And still maintain links, bold italics, etc? Paste from work function and
check 'ignore font face definitions' and check 'remove styles definitions'.
Otherwise they can always first copy to notepad then copy from notepad to
the editor. 







~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331280
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Philip Kaplan

I'm allowing people to FTP-upload into one of my web server directories, but
I don't want them to be able to upload and run cfm (or asp, etc) scripts.

I right-clicked on the directory in IIS and changed execute permissions to
none, but it seems the cfm files in that directory are still running.

Here's an example:
http://hitmelater.com/affiliate/index.cfm

Any ideas?


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325567
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Agha Mehdi

You can add application.cfm or Application.cfc to the folder and cfabort
any request. that will ensure that no cfm file is executed

On Thu, Aug 20, 2009 at 11:21 AM, Philip Kaplan pkap...@gmail.com wrote:


 I'm allowing people to FTP-upload into one of my web server directories,
 but
 I don't want them to be able to upload and run cfm (or asp, etc) scripts.

 I right-clicked on the directory in IIS and changed execute permissions
 to
 none, but it seems the cfm files in that directory are still running.

 Here's an example:
 http://hitmelater.com/affiliate/index.cfm

 Any ideas?


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325569
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Philip Kaplan

That's a clever idea but I would preferably like to give users delete
permission on that directory, in which case someone could just delete the
application.cfm file.

On Thu, Aug 20, 2009 at 11:40 AM, Agha Mehdi aghaime...@gmail.com wrote:


 You can add application.cfm or Application.cfc to the folder and cfabort
 any request. that will ensure that no cfm file is executed

 On Thu, Aug 20, 2009 at 11:21 AM, Philip Kaplan pkap...@gmail.com wrote:

 
  I'm allowing people to FTP-upload into one of my web server directories,
  but
  I don't want them to be able to upload and run cfm (or asp, etc) scripts.
 
  I right-clicked on the directory in IIS and changed execute permissions
  to
  none, but it seems the cfm files in that directory are still running.
 
  Here's an example:
  http://hitmelater.com/affiliate/index.cfm
 
  Any ideas?
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325571
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread sslone

Phil-
Your FTP folder should be below your web root - I believe anything in the
web path will be served via the browser. I don't think you can turn off
processing for a directory in the web path. If you are using the content of
the FTP as web content, you can use an upload function through ColdFusion
instead and allow only certain file types and extensions. 

/S

On Thu, 20 Aug 2009 11:21:53 -0700, Philip Kaplan pkap...@gmail.com
wrote:
 
 I'm allowing people to FTP-upload into one of my web server directories,
 but
 I don't want them to be able to upload and run cfm (or asp, etc) scripts.
 
 I right-clicked on the directory in IIS and changed execute permissions
 to
 none, but it seems the cfm files in that directory are still running.
 
 Here's an example:
 http://hitmelater.com/affiliate/index.cfm
 
 Any ideas?
 
 
 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325572
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Ian Skinner

ssl...@rubbergumball.net wrote:
 Phil-
 Your FTP folder should be below your web root -
   

I beleive that quote should be above or outside or possible not be 
below.

I.E.  Yes, your FTP folder should have NO relation to your web root 
folder.  Only after you have scrutinized ANYTHING uploaded would you 
then move it to such a vulnerable location.

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325573
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Agha Mehdi

There are multiple ways you can do it depending on your setup.
1. Have your ftp folder below the web root
2. Add cfabort to a directory above the ftp folder in the web root so that
it stops any processing on any sub folders.
3. uncheck all options (Read, Write etc) under Directory for that folder and
set the execute permission to None

On Thu, Aug 20, 2009 at 11:47 AM, Philip Kaplan pkap...@gmail.com wrote:


 That's a clever idea but I would preferably like to give users delete
 permission on that directory, in which case someone could just delete the
 application.cfm file.

 On Thu, Aug 20, 2009 at 11:40 AM, Agha Mehdi aghaime...@gmail.com wrote:

 
  You can add application.cfm or Application.cfc to the folder and
 cfabort
  any request. that will ensure that no cfm file is executed
 
  On Thu, Aug 20, 2009 at 11:21 AM, Philip Kaplan pkap...@gmail.com
 wrote:
 
  
   I'm allowing people to FTP-upload into one of my web server
 directories,
   but
   I don't want them to be able to upload and run cfm (or asp, etc)
 scripts.
  
   I right-clicked on the directory in IIS and changed execute
 permissions
   to
   none, but it seems the cfm files in that directory are still running.
  
   Here's an example:
   http://hitmelater.com/affiliate/index.cfm
  
   Any ideas?
  
  
  
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325574
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How do I remove execute permissions from a directory in IIS?

2009-08-20 Thread Dave Watts

 I'm allowing people to FTP-upload into one of my web server directories, but
 I don't want them to be able to upload and run cfm (or asp, etc) scripts.

 I right-clicked on the directory in IIS and changed execute permissions to
 none, but it seems the cfm files in that directory are still running.

You would have to set read but not execute in Windows Explorer or
CACLS/XCACLS/whatever the new version of CACLS is.

But the real answer is, as Ian indicated, don't let people upload
files into a web directory. Even if you could disable them from
running through CF, a user could upload a plain old HTML file with
malicious JavaScript in it, and another user could conceivably run
that.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325579
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cferror remove frames

2009-07-21 Thread Mark McArthey

Hello all!
I have a custom page for errors and would like to know if it's possible to 
remove all frames from the page prior to displaying the error page?  Currently 
I have an example where the error is being displayed in the header of a page 
(with no scrollbars, of course).  I'd like to remove all frames prior to 
displaying the error page so it can be viewed full screen.

Thanks! 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324757
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cferror remove frames

2009-07-21 Thread Barney Boisvert

You can't remove the frames without a page referesh, but you should be  
able to pull them all to zero width/height with JS to give the  
appearance of a full page.  However, I'd generally recommend  
redirecting to a dedicated error page rather than showing errors  
inline.  If you do that, just throw some frames busting code at the  
top and you're set.

cheers,
barneyb

--
Barney Boisvert
bboisv...@gmail.com
http://www.barneyb.com/

On Jul 21, 2009, at 7:00 AM, Mark McArthey wer...@hotmail.com wrote:


 Hello all!
 I have a custom page for errors and would like to know if it's  
 possible to remove all frames from the page prior to displaying the  
 error page?  Currently I have an example where the error is being  
 displayed in the header of a page (with no scrollbars, of course).   
 I'd like to remove all frames prior to displaying the error page so  
 it can be viewed full screen.

 Thanks!

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324758
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


  1   2   3   4   >