RE: Find out table names and fields?

2004-07-07 Thread Stephen Milligan
You can also dig down to the java level and do this in a database
independent way through the macromedia.jdbc.MacromediaDriver class if you
need to support more than just MSSQL and MySQL.

I have written a CFC that does this, but I haven't tested it on many
systems.

I'll try to get it tidied up and make it available once it's been tested a
bit more thoroughly.

Spike

--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of S.Isaac Dealey
>Sent: Wednesday, July 07, 2004 1:13 PM
>To: CF-Talk
>Subject: Re: Find out table names and fields?
>
>Those are specific to MySQL - MS SQL uses standard tables, views and
>sql queries to expose its meta data. i.e.
>
>select * from information_schema.columns
>where table_name = 'mytablename'
>
>and the like
>
>s. isaac dealey   214.823.9345
>
>new epoch : isn't it time for a change?
>
>add features without fixtures with
>the onTap open source framework
>http://www.sys-con.com/story/?storyid=44477&DE=1
>
>> how do i dump the results to display on the page?  Will
>> this only work for mySQL, or for MS SQL as well?
>
>> thanks!
>>   - Original Message -
>>   From: Barney Boisvert
>>   To: CF-Talk
>>   Sent: Wednesday, July 07, 2004 3:42 PM
>>   Subject: RE: Find out table names and fields?
>
>
>>   Sure, run these queries, and dump the result.
>
>>   `show databases` will list all databases you have access
>>   to via the DSN.
>>   `show tables` will list all tables in the database the
>>   DSN is connected to.
>>   `show tables in ` will list all tables in the
>>   named database.
>>   `explain ` will list the columns of the named
>>   table.  You can use
>>   cross-database tables by saying .
>
>>   Cheers,
>>   barneyb
>
>>   > -Original Message-
>>   > From: brobborb [mailto:[EMAIL PROTECTED]
>>   > Sent: Wednesday, July 07, 2004 1:26 PM
>>   > To: CF-Talk
>>   > Subject: Find out table names and fields?
>>   >
>>   > Hey guys, I have a host that has no web admin support
>>   > for
>>   > mySQL.  I mean, they have MySQL running, but no admin.
>>   > At
>>   > least thats what I'm told by my client. I was
>>   > wondering if
>>   > there was a way to extract the table names and fields
>>   > using
>>   > coldfusion instead.  Would that be possible?
>>   >
>>   >
>
>
>> 
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Encrypting strings

2004-07-07 Thread Stephen Milligan
Actually, cfusion_encrypt() uses extremely weak encryption.

It's more like encoding than encryption.

>From memory, it loops over the string performing an XOR on each character in
the string with the corresponding character in the key. When it reaches the
end of the key it starts again.

The resulting character from the XOR is converted to base64 or HEX or some
such.

Essentially it is very easy to reverse engineer if you know anything at all
about the key, the string, or the encrypted string.

If you can possibly use it, hash() will provide the most secure method of
storage, but you can never get back to the original string.

If that won't work for you, you might consider using some of the native
functionality available in the CFMX internals, or an external class file.

Spike

----
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Dawson, Michael
>Sent: Wednesday, July 07, 2004 12:38 PM
>To: CF-Talk
>Subject: RE: Encrypting strings
>
>How about using CFusion_Encrypt() to encrypt your information?  I think
>it's a bit "stronger".
> 
>Also, can't you Hash() the string and then compare it to another hashed
>value when needed?
>
>  _  
>
>From: Austin Govella [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, July 07, 2004 2:29 PM
>To: CF-Talk
>Subject: Encrypting strings
>
>
>I need to encrypt SSNs.
>
>I'm looking for something more powerful than encrypt().
>
>Also, does the length of my encryption key affect the 
>difficulty for people trying to decrypt?
>
>For example, is using "canine" for a key more secure than 
>using "dog" just because it's longer?
>
>Thanks,
>--
>Austin 
>  _  
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CFEclipse version 1.1.13 released

2004-07-07 Thread Stephen Milligan
*snip*

>
>All bug reports, support requests, etc. to this list.
>

That should read:

All bug reports, support requests etc. to the cfeclipse users list. 

You need to be a tigris.org member to submit bug reports. Membership is free
and you won't get spammed (I haven't had any at least).

Spike

--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Finding a local CFUG

2004-07-07 Thread Stephen Milligan
http://www.macromedia.com/go/usergroups

Should give you what you want.

Spike


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Greg Landers
>Sent: Wednesday, July 07, 2004 9:48 AM
>To: CF-Talk
>Subject: Finding a local CFUG 
>
>Hello,
>
>Does anyone know if there is an "official" directory of all Coldfusion 
>User Groups out there somewhere. I want to see if there is one locally 
>available to me. I have googled and googled but have hit a 
>bunch of dead 
>ends.
>
>Thanks,
>- Greg
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: search engine safe URLs

2004-07-06 Thread Stephen Milligan
I can also attest to this.

When the Farcry website (http://farcry.daemon.com.au) started using my
Friendly URL Servlet they noticed a huge increase in both search bot
spidering and a much improved ranking in google for several search terms.

The search engines all seem to be quite happy to put dynamic content in
their indexes, but pages with a URL parameter seem to get a lower ranking
than equivalent ones without.

All of this is subjective/anecdotal and I've never seen any absolute metrics
or proof of how significant the effect is, other than people telling me that
the FU Servlet has had a big impact on their search engine placement.

Whether that's wishful thinking on their part, or a result of a combination
of factors including SES URLs I don't know.

Spike

--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Michael Dinowitz
>Sent: Tuesday, July 06, 2004 9:44 PM
>To: CF-Talk
>Subject: Re: search engine safe URLs
>
>I have. When I redid the HoF site in SES urls, the amount of search
>agents hitting the site went wy up and the amount of indexed pages
>did as well.
>My SES url article should be posted to the front of HoF and FA 
>by morning.
>
>
>- Original Message -
>From: simeon <[EMAIL PROTECTED]>
>Date: Tue, 06 Jul 2004 22:36:24 -0700
>Subject: Re: search engine safe URLs
>To: CF-Talk <[EMAIL PROTECTED]>
>
>It doesnt take much searching on google or yahoo to see that dynamic
>
>pages DO get indexed.
>
>
>
>I read somewhere recently that its not an issue of dynamic pages being
>
>indexed, however, the issue is that the search engines will not spider
>
>pages from a dynamic url.
>
>
>
>This is not something that i have been able to prove incorrect.  Has
>
>anyone seen any evidence that supports or contradicts this 
>theory?  I am
>
>just curious what other developers have seen.
>
>
>
>sim
>
>
>
>On Tue, 2004-07-06 at 21:35, Sean Corfield wrote:
>
>> > http://www.mysite.com/index.cfm?page=productSummary&catID=12
>
>> > 
>
>> > however, most search engines will only index the index.cfm 
>page sine
>
>> the
>
>> > remainder of the url is "dynamic".
>
>> 
>
>> This seems to be a commonly voiced fear but searching on various
>
>> search engines simply doesn't seem to back this up and I suspect that
>
>> modern search engines *do* use the query string parameters just
>
>> fine...
>
>>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: easiest way to grab server's internal ip?

2004-07-06 Thread Stephen Milligan
Depending on exactly why you want the ip address you could do something like
this:







	
	
	
		
		
	




That will probably come out with a '/' in front of each address, but you
should be able to sort that out easily enough.

Spike

--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of S.Isaac Dealey
>Sent: Tuesday, July 06, 2004 1:27 PM
>To: CF-Talk
>Subject: Re: easiest way to grab server's internal ip?
>
>> What's the most simple CFMX way to grab the app server's
>> IP address internal
>> to the firewall? Is there some type of
>> server.getSystemIP() or something
>> like that?
>
>> Jon
>
>There's nothing native. You could execute ipconfig with the cfexecute
>tag tho.
>
>
>s. isaac dealey   214.823.9345
>
>new epoch : isn't it time for a change?
>
>add features without fixtures with
>the onTap open source framework
>http://www.sys-con.com/story/?storyid=44477&DE=1
>
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: IDE for Java, CF, ,Javascript, JSP, ASP, PHP, Perl on Mac OS X

2004-07-02 Thread Stephen Milligan
*snip*
>Spike,
>I had a discussion about this a few months ago on the cfeclipse 
>list. Basically, I want to be able to create code fragments 
>(templates) that I can invoke by keystroke combinations. For 
>example, I want to be able to type 'cff' and  and have the 
>editor insert:
>
>
>   returnType="dataType"
>   roles="securityRoles"
>   access="public"
>   output="no" >
>
>
>with the cursor sitting at <-cur>.

Ah yes,

I remember that conversation. Didn't realize that was also you. Just wanted
to see if it was something that was already on our radar for cfeclipse. It
is, and will almost certainly be added when someone gets the time to look
into it.

>
>I can do this in Mulit-Edit and IDEA, and Eclipse can do it in 
>Java, but I haven't been able to figure out how to do it in 
>Eclipse for CF. At the time of the discussion, no one else knew 
>how either. On my list of Things To Do Someday is to open up 
>Eclipse and see if I can figure how it works for Java so that I 
>can extend it for CF (contributing it back to the community of 
>course :-)

All contributions are gratefully received :)

Spike


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: I'm so frustrated - Can somebody make my day? (cfexecute)

2004-07-02 Thread Stephen Milligan
Did you try the batch file method I suggested?

For what you're trying to do I think the syntax would be:

C:\encrypt.bat would look like this:

"C:\pgp\pgp.exe -e %1 %2"

test.cfm






Spike

--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Jon Block
>Sent: Friday, July 02, 2004 9:27 AM
>To: CF-Talk
>Subject: RE: I'm so frustrated - Can somebody make my day? (cfexecute)
>
>What I'm really trying to do is encrypt a file like this:
> 
>C:\>C:\pgp\pgp.exe -e O:\temp\abc.txt MYTESTKEY
>
>This command works on the command line... but now matter what 
>I've tried, I
>just won't work. I've tried about 25 variations of  
>calls ...
>calling the tag in various ways. I've also tried 
>, but still,
>it doesn't work.
> 
>I think that this has to do with the fact that I'm running 
>CFMX in command
>line mode... not as a service.
> 
>What should I do?
> 
>Jon
>
>  _  
>
>From: Stephen Milligan [mailto:[EMAIL PROTECTED] 
>Sent: Friday, July 02, 2004 12:02 PM
>To: CF-Talk
>Subject: RE: I'm so frustrated - Can somebody make my day? (cfexecute)
>
>
>I don't think that will work either.
>
>I've found that cmd.exe doesn't play well with CFMX. I'm not 
>quite sure why,
>but it could have something to do with it being a shell for 
>other commands.
>
>What exactly was it that you wanted to do with cfexecute?
>
>The example you gave doesn't look like it does anything useful, so I'm
>assuming you were using it to try to get the command line working.
>
>If you really do need to use echo, you can use cfexecute to 
>run a batch file
>and pass the arguments to that.
>
>For some reason that seems to work, but directly accessing 
>cmd.exe doesn't. 
>
>I've also found that passing arguments as an array usually 
>works better than
>passing them as a string, so you would have something like this:
>
>
>
>
>
>
>
>
>
>And put this in echo.bat
>
>echo %1 > %2
>
>You'll probably want to put a full path to the output file, because
>otherwise it will end up somewhere inside the ColdFusion directories
>JRun\bin on my machine
>
>HTH
>
>Spike
>
>
>Stephen Milligan
>Code poet for hire
>http://www.spike.org.uk
>
>Do you cfeclipse? http://cfeclipse.tigris.org 
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts
>>Sent: Friday, July 02, 2004 7:42 AM
>>To: CF-Talk
>>Subject: RE: I'm so frustrated - Can somebody make my day? (cfexecute)
>>
>>> This is on a machine with windows 2003 server ... we're 
>>> currently running CF in command line mode... here's what's 
>>> ruining my day... please help...
>>>  
>>>  
>>
>>The program you want to run is cmd.exe. The "echo" command is 
>>part of the
>>command processor itself.
>>
>>So, you might try something like this:
>>
>>
>>
>>Personally, I usually screw CFEXECUTE commands up the first 
>>time I try them,
>>so I may have done the same above as well.
>>
>>Dave Watts, CTO, Fig Leaf Software
>>http://www.figleaf.com/
>>phone: 202-797-5496
>>fax: 202-797-5444
>>
>>
>> 
>  _  
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: IDE for Java, CF, ,Javascript, JSP, ASP, PHP, Perl on Mac OS X

2004-07-02 Thread Stephen Milligan
*snip*
>Caveat: it handles JSP (and XML) fine, but don't know how it does 
>with ASP, PHP or Perl. For HTML, CF and JS, I still rely on an 
>old but heavily customized copy of Multi-Edit. I'll check out 
>Eclipse for CF if and when I can figure out how to create 
>templates for CF code fragments.
>

Dave, 

Can you elaborate a bit on what you mean by 'templates for CF code
fragments'?

Thanks

Spike
--------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: I'm so frustrated - Can somebody make my day? (cfexecute)

2004-07-02 Thread Stephen Milligan
I don't think that will work either.

I've found that cmd.exe doesn't play well with CFMX. I'm not quite sure why,
but it could have something to do with it being a shell for other commands.

What exactly was it that you wanted to do with cfexecute?

The example you gave doesn't look like it does anything useful, so I'm
assuming you were using it to try to get the command line working.

If you really do need to use echo, you can use cfexecute to run a batch file
and pass the arguments to that.

For some reason that seems to work, but directly accessing cmd.exe doesn't. 

I've also found that passing arguments as an array usually works better than
passing them as a string, so you would have something like this:









And put this in echo.bat

echo %1 > %2

You'll probably want to put a full path to the output file, because
otherwise it will end up somewhere inside the ColdFusion directories
JRun\bin on my machine

HTH

Spike

----
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts
>Sent: Friday, July 02, 2004 7:42 AM
>To: CF-Talk
>Subject: RE: I'm so frustrated - Can somebody make my day? (cfexecute)
>
>> This is on a machine with windows 2003 server ... we're 
>> currently running CF in command line mode... here's what's 
>> ruining my day... please help...
>>  
>>  
>
>The program you want to run is cmd.exe. The "echo" command is 
>part of the
>command processor itself.
>
>So, you might try something like this:
>
>
>
>Personally, I usually screw CFEXECUTE commands up the first 
>time I try them,
>so I may have done the same above as well.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>phone: 202-797-5496
>fax: 202-797-5444
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Email Regex with weird results

2004-07-01 Thread Stephen Milligan
Ah,

Just re-joined the list, so I must have missed the previous post.

Spike


Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Mosh Teitelbaum
>Sent: Thursday, July 01, 2004 11:56 AM
>To: CF-Talk
>Subject: RE: Email Regex with weird results
>
>Stephen Milligan [mailto:[EMAIL PROTECTED] wrote:
>> I think you just need to modify the domain check a little bit...
>> [snip]
>
>Thanks.
>
>Actually, this message got posted twice and I already received 
>an answer.
>Basically the same as yours. 8^)
>
>Thanks again.
>
>--
>Mosh Teitelbaum
>evoch, LLC
>Tel: (301) 942-5378
>Fax: (301) 933-3651
>Email: [EMAIL PROTECTED]
>WWW: http://www.evoch.com/
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Email Regex with weird results

2004-07-01 Thread Stephen Milligan
I think you just need to modify the domain check a little bit...

[[:alnum:]\-_]

Should be 

[[:alnum:]_-]

Otherwise you're matching everything between '\' and '_'. The ASCII sequence
this matches is \[^_ 

Presumably you want to allow only alpha numeric, _ and - in the domain name.

Spike

----
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org 


>-Original Message-
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Mosh Teitelbaum
>Sent: Thursday, July 01, 2004 6:57 AM
>To: CF-Talk
>Subject: Email Regex with weird results
>
>All:
>
>I've been using a regex found on this list to validate email addresses.
>I've now run into a problem with the regex that I can't solve. 
> Any help
>would be greatly appreciated.
>
>The email address is not required so the field can either be 
>left blank or
>must contain a valid email address.  The regex validation code follows:
>
>
>(REFindNoCase("^[a-zA-Z]([[:alnum:]\-_]+\.?)*@([[:alnum:]\-_]+\
.)+[a-zA-Z]{2
>,4}$", FORM.Email) EQ 0)>
>	Email address is invalid
>
>
>The email address is of the form "[EMAIL PROTECTED]" (that is, the domain
>contains a dash).  If I remove the dash from the domain, the address
>validates.  However, the dash should be valid.
>
>Looking at the regex, doesn't the ([[:alnum:]\-_]+\.) portion 
>after the @
>symbol allow for dashes?
>
>TIA
>
>--
>Mosh Teitelbaum
>evoch, LLC
>Tel: (301) 942-5378
>Fax: (301) 933-3651
>Email: [EMAIL PROTECTED]
>WWW: http://www.evoch.com/
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]