Re: Strategy for exposing webservices

2009-06-04 Thread Jim Cumming

Thanks Andy, a really useful presentation. Certainly given me a lot to think 
about.

Cheers

Jim

>Jim...
>
>Simon Free gave an excellent presentation to the Nashville CFUG on "writing
>public facing APIs". I'd point you that direction to get started:
>
>http://www.ncfug.com/go/meeting/meetingID/2FF6B098-A6C8-07F7-403E6199D0D8FC1
>D/
>
>
>Andy matthews 
>
>Hi All, long time lurker, first time poster here.
>
>I was hoping someone could offer me some advice. A company I working for
>would like to start exposing some of their internal systems to the outside
>world using webservices. Obviously we want to do this in a secure and
>controlled manner as possible. I was hoping to pass all requests through a
>single function in a cfc. This cfc would examine the request, check
>passwords, ip adddresses and validate data before calling the actual
>required function from another cfc and passing data back to the client. I
>was thinking of doing this by passing an xml packet as the only argument to
>the main cfc and then parsing this file to determine the desired method,
>username, password and other arguments. 
>
>I'd like to know if this sounds like I'm heading in the right direction, or
>am I talking total nonsense? Is there an already written framework for
>creating webservices in a more controlled manner than just setting the odd
>cfc to 'remote'? I would be eternally grateful if anyone could assist.
>
>Jim 

~|
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:323151
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


XML Issues with webservices

2009-06-04 Thread Jim Cumming

Hello all. Was hoping someone could help me solve this irritating issue. 

Curently I have a cfc called gateway.cfc setup to recieve incoming xml, perform 
some operations and then pass back some xml. 

Here is the component







SUCCESS
100
User 
#xmlRequest.request.username.xmltext# Logged In






I'm calling this function using the following code to create some xml and then 
call the component as a webservice


xmlRequest = XmlNew();
xmlRequest.xmlRoot = XmlElemNew(xmlRequest,"Request");
xmlRequest.Request.xmlChildren[1] = XmlElemNew(xmlRequest,"Username");
xmlRequest.Request.Username.XmlText = "Jim";
xmlRequest.Request.xmlChildren[2] = XmlElemNew(xmlRequest,"Password");
xmlRequest.Request.Password.XmlText = "password";





 ws = CreateObject("webservice", "#variables.wsURL#");
 ret = ws.sfrequest(xmlRequest); 




Now this works fine if I call the cfc locally, but I get an error when I access 
it as a webservice. The webservice works fine if I just return the xmlRequest 
variable and it also works fine I I just return the generated xmlOutput without 
doing anything to the inputted xml. However as soon as I try to do anything 
with the xmlRequest such as pulling some text from it as above, it errors.

Any ideas??

Cheers

Jim





~|
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:323152
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Generating appopriate transaction IDs

2009-06-04 Thread Fawzi Amadu

I am building a electronic advertisement site and I need to generate 
transaction IDs.
Since the page will hopefully be a high volume site, I am wondering the best 
form of generating transaction IDs.

I was considering rand function, but I read that the randrange has an upper 
recommended upper limit of 100,000,000.

TIA 

~|
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:323153
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Peter Boughton

getTickcount() or createUuid() 

~|
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:323154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: [Spam?] Re: CFIF Not Working As Expected

2009-06-04 Thread Steve LaBadie

Peter,

 

I always use cfparam but I gather that also using the StructKeyExists is
more efficient. And yes agree I should be trimming as well and checking
that the submit button has been pushed.

 

Steve LaBadie, Web Manager

East Stroudsburg University

200 Prospect St.

East Stroudsburg, Pa 18301

570-422-3999

http://www.esu.edu

slaba...@po-box.esu.edu

-Original Message-
From: Peter Boughton [mailto:bought...@gmail.com] 
Sent: Wednesday, June 03, 2009 5:30 PM
To: cf-talk
Subject: [Spam?] Re: CFIF Not Working As Expected

 

 

>Why do you suggest using the StructKeyExists?

 

Because it is the most efficient way to check if the Form scope contains
the Name field.

 

 

 

>Do you see a problem in doing it this?

> 

>

>...

 

The main problem is that there is nothing to check/enforce that Name and
RequestName are defined.

You should use either StructKeyExists or cfparam to ensure you have
these fields, otherwise you will get an error when the page is accessed
directly.

 

Another issue that the validation can easily be bypassed with just a
space.

If you trim() the fields you ensure that you at least have some content
(even if you don't have full name validation).

 

 

 



~|
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:323155
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Ryan Letulle

I've been using createuuid() for a little while now and I haven't
encountered any issues.  I like it because you don't have as many smart
asses trying to go in and change the id in the querystring. :)
--
Ryan



On Thu, Jun 4, 2009 at 6:28 AM, Peter Boughton  wrote:

>
> getTickcount() or createUuid()
>
> 

~|
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:323156
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Cflayout CfMenu Problem

2009-06-04 Thread Cutter (CFRelated)

No, if you are placing the cfmenu inside a border region (like "north") 
then the styles won't allow the submenu items to properly flow over your 
"center" region. You may be able to find the necessary css class for 
those sub-items and apply an overriding style definition, declaring a 
z-index that is higher than that of the "center" region...

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer

Co-Author of "Learning Ext JS"
http://www.packtpub.com/learning-ext-js/book
_
http://blog.cutterscrossing.com

On 6/3/2009 11:26 PM, Paul Henderson wrote:
> I'm experimenting with cflayout and cfmenus, following the CF8 WACK. I'm
> using a border type cflayoutarea and I've place a horizontal cfmenu in the
> top area. But the dropdown items in the menu are cut off, or layered behind
> the cflayoutarea below it. I tried setting the overflow to visible but that
> spits out an error. Any ideas? I'm guessing maybe some kind of css trick may
> help?
>
>
>
> Thanks
>
> -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:323157
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: jquery question

2009-06-04 Thread Andy Matthews

I'll second the use of Pretty Photo. I just put it in place on my site for
Flash modal windows and it works awesome. Super easy to install as well. You
can see it in action here (click the watch video):

http://andymatthews.net/read/2009/05/26/jQuery-and-AIR:-Creating-a-new-AIR-p
roject-in-Aptana



andy 

-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com] 
Sent: Wednesday, June 03, 2009 5:54 PM
To: cf-talk
Subject: Re: jquery question


check out one of the many jquery lightbox clones.

http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clo
ne/
http://www.stickmanlabs.com/lightwindow/


On Wed, Jun 3, 2009 at 3:42 PM, Mike Little  wrote:

>
> sorry, could not think of a better subject!
>
> i have a form which an admin enters a embed script such as a youtube
video.
> what i would like to achieve is to have a preview button which takes 
> the contents of the textarea (ultimately filters the content with my 
> clever param filter) and displays the output in a popup similar to...
>
> http://yensdesign.com/tutorials/popupjquery/
>
> (or alternatively the output displays in a div below the textarea?)
>
> i am very new to jquery/ajax and really would like to get into it.
> unfortunately we have issues with using cf8's ajax features on my 
> hosts shared server and would like to use native jquery/ajax.
>
> any help/pointers in the right direction would be really appreciated.
>
> mike
>
> 



~|
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:323158
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: jquery question

2009-06-04 Thread Andy Matthews

Just write the contents of the textarea into the html of the target.
 

-Original Message-
From: Mike Little [mailto:m...@nzsolutions.co.nz] 
Sent: Wednesday, June 03, 2009 7:03 PM
To: cf-talk
Subject: Re: jquery question


thanks guys,

my question is though - how to pass formatted content from my textarea to
the div upon form submission (or another button submit). ultimately i would
like to pass the content to a cfc first to check and amend data as required
so this is why i thought jquery would be the way to go.

mike 



~|
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:323159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Error register asp.net web service in CF 7 admin

2009-06-04 Thread Hong Chen

I have learned this is a general error message. It simply tells user that
the java classes(webservice stubs) could not be created. 

-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Wednesday, June 03, 2009 5:10 PM
To: cf-talk
Subject: Re: Error register asp.net web service in CF 7 admin


> We found the problem. It was a user authentication issue. We were able to
> register the web service with a network username and password and which is
> also a valid username/password in HP Trim.

Well, that explains why you had an HTML META tag in the response!

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:323160
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Gerald Weir

Hello all,

I've tried using cfhttpparam and it hasn't helped.  The only thing that I can 
think of at this moment is that CF's CFHTTP doesn't properly format the request 
if a doc-type suffix is not present.  So, since I have the following:

http://some.server.com/websvc/util?a=doHTMLRequest&event=workgroupstat

and there is not a doc-type suffix then the request doesn't work.

As I said earlier in the post I have no problems with pulling any page from the 
internet or our network using this technique and when viewed from a browser the 
request is perfectly formed and works fine.

Any other ideas out there or can someone confirm my hypothesis?

Thanks, Jerry 

~|
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:323161
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Dave Watts

> I've tried using cfhttpparam and it hasn't helped.  The only thing that I can 
> think of at
> this moment is that CF's CFHTTP doesn't properly format the request if a 
> doc-type
> suffix is not present.  So, since I have the following:
>
> http://some.server.com/websvc/util?a=doHTMLRequest&event=workgroupstat
>
> and there is not a doc-type suffix then the request doesn't work.

I'm not sure what you mean by a "doc-type suffix".

> As I said earlier in the post I have no problems with pulling any page from 
> the internet
> or our network using this technique and when viewed from a browser the 
> request is
> perfectly formed and works fine.

CFHTTP can do exactly what your browser does. So, if you can fetch a
page with a browser but can't fetch it with CFHTTP, check to see
exactly what the browser is sending, and send the exact same things
with CFHTTP. It's as simple as 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 informatio

~|
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:323162
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Gerald Weir

Hello Dave,

It's been a long time since I've received your advice, glad to see you're still 
at it and helping out.

Unfortunately, it clearly doesn't work. I can - and have - repeatedly called 
the page using that URL from a browser and it works.  It's a pretty simple 
request and returns very simple HTML code.  I've made a copy of the request 
response and saved it as a simple HTML file on the same server (using the URL 
in the CFHTTP call from a browser) and called it using CFHTTP and there is no 
problem.

Something else is going on here but I can't tell what.  We use CFHTTP quite a 
bit on our admin application for various in-house updates, etc. so we are very 
familiar with the function.  Yet, for this situation it isn't working.

doc type:  .cfm, .jsp, .asp, etc. (file type) - sorry to be unclear.

Jerry 

~|
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:323163
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Dave Watts

> Unfortunately, it clearly doesn't work. I can - and have - repeatedly called 
> the page
> using that URL from a browser and it works.  It's a pretty simple request and 
> returns
> very simple HTML code.  I've made a copy of the request response and saved it 
> as a
> simple HTML file on the same server (using the URL in the CFHTTP call from a
> browser) and called it using CFHTTP and there is no problem.

Have you examined the HTTP request and response headers in detail? You
may need to send additional information with CFHTTP, or change some of
the information that's already being sent.

Is there any redirection on the server? You may need to tell CFHTTP to
follow through the redirection, or target the redirection URL
directly.

But I can tell you, with a pretty high degree of certainty, that if
you can get something with a browser you can get it with CFHTTP.

> doc type:  .cfm, .jsp, .asp, etc. (file type) - sorry to be unclear.

That doesn't make any difference.

Is this URL publicly available?

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 informati

~|
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:323164
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Brad Wood

Gerald,

What do you mean when you say it doesn't work?  Does the remote server 
respond?  What HTTP status code comes back?  What is in the body of the 
response?

I would recommend installing a packet sniffer like wireshark.  Install it on 
your CF server and run your browser tests from there.  Start it up and make 
a request from a browser (on that server) and follow the TCP stream to find 
the exact request headers being sent to the server.  Then run the CF page 
with the cfhttp call and get the request headers from that and compare.

Also, Microsoft Fiddler has a request builder tab that lets you build any 
HTTP request you want for testing that has whatever headers you specify.

Good Luck.

~Brad 


~|
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:323165
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


reducing a query result

2009-06-04 Thread Chad Gray

Say I have a query returned with 500 records.

Is there a way in CF (not SQL) to reduce the query to only rows 1-50, 51-100 
etc?

I talking physically reducing the query object.


~|
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:323166
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: reducing a query result

2009-06-04 Thread Adrian Lynch

Query the query using the same query variable name.

Adrian

> -Original Message-
> From: Chad Gray [mailto:cg...@careyweb.com]
> Sent: 04 June 2009 16:07
> To: cf-talk
> Subject: reducing a query result
> 
> 
> Say I have a query returned with 500 records.
> 
> Is there a way in CF (not SQL) to reduce the query to only rows 1-50,
> 51-100 etc?
> 
> I talking physically reducing the query object.


~|
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:323167
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: reducing a query result

2009-06-04 Thread Chad Gray

Oh ya... duh.  I kept thinking of using functions to do it.  Guess I need 
another cup of coffee.

Thanks!

> -Original Message-
> From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk]
> Sent: Thursday, June 04, 2009 11:11 AM
> To: cf-talk
> Subject: RE: reducing a query result
> 
> 
> Query the query using the same query variable name.
> 
> Adrian
> 
> > -Original Message-
> > From: Chad Gray [mailto:cg...@careyweb.com]
> > Sent: 04 June 2009 16:07
> > To: cf-talk
> > Subject: reducing a query result
> >
> >
> > Say I have a query returned with 500 records.
> >
> > Is there a way in CF (not SQL) to reduce the query to only rows 1-50,
> > 51-100 etc?
> >
> > I talking physically reducing the query object.
> 
> 
> 

~|
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:323168
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Alan Rother

Hey Chad,
It's kind of an odd questions. Can you tell us what you are trying to
accomplish? So often on these lists people ask about their solution, not
their problem...

I'm guess you don't really want to reduce the query, you don't want it to
dump out 500 records on a page. Instead you want some sort of pagination
ability.

Is that it?

=]

-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~|
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:323169
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: reducing a query result

2009-06-04 Thread Chad Gray

Ya it was a pagination thing, but I thought of a better solution using CSS and 
a better query.

I posted before I thoroughly thought it out.

Thanks though!

> -Original Message-
> From: Alan Rother [mailto:alan.rot...@gmail.com]
> Sent: Thursday, June 04, 2009 11:17 AM
> To: cf-talk
> Subject: Re: reducing a query result
> 
> 
> Hey Chad,
> It's kind of an odd questions. Can you tell us what you are trying to
> accomplish? So often on these lists people ask about their solution, not
> their problem...
> 
> I'm guess you don't really want to reduce the query, you don't want it to
> dump out 500 records on a page. Instead you want some sort of pagination
> ability.
> 
> Is that it?
> 
> =]
> 
> --
> Alan Rother
> Adobe Certified Advanced ColdFusion MX 7 Developer
> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
> 
> 
> 

~|
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:323170
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Alan Rother

Coolio...
If you ever need my good friend Nathan Strutz wrote a great tool for
pagination

http://www.dopefly.com/projects/pagination/


Sure saves a lot of time...

=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~|
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:323171
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Ryan Letulle

All I can say is wow!
--
Ryan



On Thu, Jun 4, 2009 at 10:24 AM, Alan Rother  wrote:

>
> Coolio...
> If you ever need my good friend Nathan Strutz wrote a great tool for
> pagination
>
> http://www.dopefly.com/projects/pagination/
>
>
> Sure saves a lot of time...
>
> =]
> --
> Alan Rother
> Adobe Certified Advanced ColdFusion MX 7 Developer
> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
>
>
> 

~|
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:323172
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Brad Wood

If you are looping over the query with a cfoutput tag, you can specify the 
startRow and maxRows attribute to make pagination easy.  That actually 
modify the query object though.

The easiest way to pare down a result set is with a query of queries which 
lets you run SQL commands against a query object in memory.  The trick is 
you need to have a column that represents the row numbers for you.  So, 
assuming one of the columns in your resultset is rowNumber which contains 
1 - 500, you could do this:


SELECT *
FROM youOriginalQueryName
WHERE rowNumber > 50 and rowNumber <= 100


or alternatively:


SELECT *
FROM youOriginalQueryName
WHERE rowNumber > 50


Note, those cfquerys do NOT run anything against the database.

Alternatively, if you REALLY want, you can loop over the result set manually 
and build a new result set with CF's query functions.


qryNewQuery = queryNew(#qryOrigQuery.columnList#);
i = 0;
startRow = 1;
endRow = 50;

while (++i <= qryOrigQuery.recordcount)
{
if(i >= startRow && i < endRow)
{
queryAddRow(qryNewQuery,1);
c = 0;
while (++c <=  listLen(qryOrigQuery.columnList))
 {
  QuerySetCell(qryNewQuery, 
listGetAt(qryOrigQuery.columnList,c), 
qryOrigQuery[listGetAt(qryOrigQuery.columnList,c)][i], 
qryNewQuery.recordCount);
 }
}
}


- Original Message - 
From: "Chad Gray" 
To: "cf-talk" 
Sent: Thursday, June 04, 2009 10:07 AM
Subject: reducing a query result


>
> Say I have a query returned with 500 records.
>
> Is there a way in CF (not SQL) to reduce the query to only rows 1-50, 
> 51-100 etc?
>
> I talking physically reducing the query object.
>
>
> 

~|
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:323173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Gerald Guido

+ 1 billion for pagination.cfc It "just works".

But for the record  blockfactor  maxrows can be used to limit the number of
rows returned.

On Thu, Jun 4, 2009 at 11:24 AM, Alan Rother  wrote:

>
> Coolio...
> If you ever need my good friend Nathan Strutz wrote a great tool for
> pagination
>
> http://www.dopefly.com/projects/pagination/
>
>
> Sure saves a lot of time...
>
> =]
> --
> Alan Rother
> Adobe Certified Advanced ColdFusion MX 7 Developer
> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
>
>
> 

~|
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:323174
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: reducing a query result

2009-06-04 Thread Andy Matthews

If you're using mySQL, then look into the LIMIT keyword:

SELECT [columns]
FROM [tableName]
LIMIT [totalRecords], [startingRow] 

This way you ONLY get the data you want. You could easily tie this into a
data grid via Ext (or jQuery) so that new pages call only the data for that
page.

Here's one of the preeminent jQuery versions: http://www.flexigrid.info/

And a tutorial written by a coworker of mine on Ext data grids:
http://blog.cutterscrossing.com/index.cfm/2007/4/24/My-First-ExtJS-DataGrid-
Pt-1


andy

-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com] 
Sent: Thursday, June 04, 2009 10:07 AM
To: cf-talk
Subject: reducing a query result


Say I have a query returned with 500 records.

Is there a way in CF (not SQL) to reduce the query to only rows 1-50, 51-100
etc?

I talking physically reducing the query object.




~|
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:323175
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: reducing a query result

2009-06-04 Thread Ryan Stille

You can do something similar with SQL Server 2005
http://www.stillnetstudios.com/2008/11/12/pagination-mssql-2005/

-Ryan

Andy Matthews wrote:
> If you're using mySQL, then look into the LIMIT keyword:
>
> SELECT [columns]
> FROM [tableName]
> LIMIT [totalRecords], [startingRow] 
>
> This way you ONLY get the data you want. You could easily tie this into a
> data grid via Ext (or jQuery) so that new pages call only the data for that
> page.
>
> Here's one of the preeminent jQuery versions: http://www.flexigrid.info/
>
> And a tutorial written by a coworker of mine on Ext data grids:
> http://blog.cutterscrossing.com/index.cfm/2007/4/24/My-First-ExtJS-DataGrid-
> Pt-1
>
>
> andy
>
> -Original Message-
> From: Chad Gray [mailto:cg...@careyweb.com] 
> Sent: Thursday, June 04, 2009 10:07 AM
> To: cf-talk
> Subject: reducing a query result
>
>
> Say I have a query returned with 500 records.
>
> Is there a way in CF (not SQL) to reduce the query to only rows 1-50, 51-100
> etc?
>
> I talking physically reducing the query object.
>
>
>
>
> 

~|
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:323176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Gerald Weir

I'll include the whole get-go here and see if anyone sees anything else.  The 
server was disconnected accidentally for the last 2 hours so I got behind on my 
posts.


Here is the URL and the result from a browser:

http://server.somewhere.com/websvc/util?a=doHTMLRequest&event=workgroupstat

Result from the request:

Agents 
Availableworkgroup:Chatagents_available:1agents_logged_in:1

here is the CF code:




http://server.somewhere.com/websvc/util?a=doHTMLRequest&event=workgroupstat";
 />


#agentCount#


cfhttp.errorDetail:  #cfhttp.errorDetail#
cfhttp.text:  #cfhttp.text#
cfhttp.statusCode  #cfhttp.statusCode#
cfhttp.MIMEType  #cfhttp.MIMEType#
cfhttp.header  #cfhttp.header#


here is the source code from the resultant page when I use the code above:

...about 10 blank lines.

cfhttp.errorDetail:  
cfhttp.text:  YES
cfhttp.statusCode  200 OK
cfhttp.MIMEType  Unable to determine MIME type of file.
cfhttp.header  HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=CDE7D7C516BA85674B6859522ADC9CB4; Path=/websvc
Date: Thu, 04 Jun 2009 16:25:12 GMT
Content-Length: 0
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET


I expect to see the ... etc. code above the cfhttp.variables listed 
at the bottom.

Thanks in advance.
Jerry 

~|
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:323177
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Generating appopriate transaction IDs

2009-06-04 Thread Justin Scott

> getTickcount() or createUuid() 

You'll run into dupes pretty quickly by using getTickCount() since it resets
back to 1 every time the server restarts.  Not recommended.  CreateUUID()
would work much better if you don't want integer only IDs.


-Justin


~|
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:323178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Generating appopriate transaction IDs

2009-06-04 Thread Jason Fisher

The other benefit of createUUID() is that you can later split / combine 
records from different tables if you ever need to, such as pulling 
production records down to review in development ... no integer clashes 
when you've got fully unique values across the tables and datasources.


From: "Justin Scott" 
Sent: Thursday, June 04, 2009 12:42 PM
To: "cf-talk" 
Subject: RE: Generating appopriate transaction IDs 

> getTickcount() or createUuid() 

You'll run into dupes pretty quickly by using getTickCount() since it 
resets
back to 1 every time the server restarts.  Not recommended.  CreateUUID()
would work much better if you don't want integer only IDs.

-Justin

 


~|
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:323179
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Alan Rother

Just as a note, CreateUUID does have a downside
http://kb2.adobe.com/cps/190/tn_19007.html


Especially if it's on a very
high volume site. Not sure if this has been addressed in later versions of
CF.

=]
-- 
Alan Rother
Adobe Certified Advanced ColdFusion MX 7 Developer
Manager, Phoenix Cold Fusion User Group, AZCFUG.org


~|
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:323180
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Matt Williams

I usually just do a cfdump of the cfhttp variable. If you aren't getting what 
you expect then you've either got the wrong url or are not passing something 
correctly. You may need to be grabbing a cookie from an earlier landing page 
and passing that back as part of the cfhttp request. And depending on what type 
of web server the site is on that cookie may need to be appended to the url 
(;jsessionid=xyz).

I've been going rounds with various cfhttp calls too and am about to post my 
own question regarding getting pdfs... Stay tuned. :)

-Matt


> I'll include the whole get-go here and see if anyone sees anything 
> else.  The server was disconnected accidentally for the last 2 hours 
> so I got behind on my posts.
> 
> 
> Here is the URL and the result from a browser:
> 
> http://server.somewhere.
> com/websvc/util?a=doHTMLRequest&event=workgroupstat
> 
> Result from the request:
> 
> Agents 
Availableworkgroup:Chat 
>agents_available:1agents_logged_in:1
> 
> here is the CF code:
> 
> 
> 
> 
>method="get" 
>   url="http://server.somewhere.
> com/websvc/util?a=doHTMLRequest&event=workgroupstat" />
> 
> 
> #agentCount#
> 
> 
> cfhttp.errorDetail:  #cfhttp.errorDetail#
> cfhttp.text:  #cfhttp.text#
> cfhttp.statusCode  #cfhttp.statusCode#
> cfhttp.MIMEType  #cfhttp.MIMEType#
> cfhttp.header  #cfhttp.header#
> 
> 
> here is the source code from the resultant page when I use the code 
> above:
> 
...
> about 10 blank lines.
> 
> cfhttp.errorDetail:  
> cfhttp.text:  YES
> cfhttp.statusCode  200 OK
> cfhttp.MIMEType  Unable to determine MIME type of file.
> 
> cfhttp.header  HTTP/1.1 200 OK
> Set-Cookie: JSESSIONID=CDE7D7C516BA85674B6859522ADC9CB4; Path=/websvc
> Date: Thu, 04 Jun 2009 16:25:12 GMT
> Content-Length: 0
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> 
> 
> I expect to see the ... etc. code above the cfhttp.
> variables listed at the bottom.
> 
> Thanks in advance.
> Jerry 


~|
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:323181
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: XML Issues with webservices

2009-06-04 Thread Matt Williams

And what are the errors? Are you sure the xml is still valid? I have recently 
worked with a couple of webservices talking in XML. I have generally returned 
things as a string as opposed to type="xml". Just something else to try.

-Matt

> Hello all. Was hoping someone could help me solve this irritating 
> issue. 
> 
> Curently I have a cfc called gateway.cfc setup to recieve incoming xml, 
> perform some operations and then pass back some xml. 
> 
> Here is the component
> 
>output="false">
>   
>   
>   
>   
>   
>   SUCCESS
>   100
>   User 
> #xmlRequest.request.username.xmltext# Logged 
> In
>   
>   
>   
>   
>   
> 
> I'm calling this function using the following code to create some xml 
> and then call the component as a webservice
> 
> 

> xmlRequest = XmlNew();

> xmlRequest.xmlRoot = XmlElemNew(xmlRequest,"Request");

> xmlRequest.Request.xmlChildren[1] = XmlElemNew(xmlRequest,
> "Username");

> xmlRequest.Request.Username.XmlText = "Jim";

> xmlRequest.Request.xmlChildren[2] = XmlElemNew(xmlRequest,
> "Password");

> xmlRequest.Request.Password.XmlText = "password";
> 
> 
> 
> 
> 
 
> ws = CreateObject("webservice", "#variables.wsURL#");
 
> ret = ws.sfrequest(xmlRequest); 
> 
> 
> 
> 
> Now this works fine if I call the cfc locally, but I get an error when 
> I access it as a webservice. The webservice works fine if I just 
> return the xmlRequest variable and it also works fine I I just return 
> the generated xmlOutput without doing anything to the inputted xml. 
> However as soon as I try to do anything with the xmlRequest such as 
> pulling some text from it as above, it errors.
> 
> Any ideas??
> 
> Cheers
> 
> Jim
> 
> 
> 


~|
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:323182
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Dave Watts

> I'll include the whole get-go here and see if anyone sees anything else.  The 
> server
> was disconnected accidentally for the last 2 hours so I got behind on my 
> posts.
>
>
> Here is the URL and the result from a browser:

That's not the "whole get-go". Where are the HTTP request and response headers?

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:323183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Jason Fisher

Looks like that was fixed in JVM 1.3.1_04 ... and CF 8 is shipped with 1.6.0_4, 
with the recommendation to upgrade to 1.6.0_11 or higher, so I think we're OK 
on the server clock issue 
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4500388).  Fascinating, 
though. 

~|
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:323184
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFHTTP Problem - is file type extension required?

2009-06-04 Thread Gerald Weir

Dave,
Is this what you need?  I'm beginning to think that it is a security setting on 
the web service itself.  Like an access setting in a cffunction.  I'm not sure 
how the web service is constructed - it's not CFM.
-
http://chat.drleonards.com/websvc/util?a=doHTMLRequest&event=workgroupstat

GET /websvc/util?a=doHTMLRequest&event=workgroupstat HTTP/1.1
Host: chat.drleonards.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) 
Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729) Creative ZENcast v2.00.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: JSESSIONID=95FCD9A6D380DE31D8958B3B6AAE; 
BIGipServerDRL_HTTP_Pool_Prod=1291911434.22528.; 1=2001181047

HTTP/1.x 200 OK
Connection: close
Date: Thu, 04 Jun 2009 19:12:46 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Set-Cookie: JSESSIONID=B58C0E963067748C08B3FC13AB747576; Path=/websvc
Set-Cookie: 1=2001181050; Path=/
Content-Type: text/html;charset=UTF-8
--

I have to leave for the day but thanks for taking the time to help with this.

Jerry 

~|
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:323185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: CFHTTP Problem - is file type extension required?

2009-06-04 Thread brad

Gerald, 

We're still missing one more thing.  That is what the request headers
look like when your CF server makes its CFHTTP call.  You need to know
what that looks like so you can find the differences.

Install MS Fiddler, go to its "Request Builder" tab and paste in these
exact headers your browser is sending.  Fiddler has separate form fields
for the host/get part and http version.  Click "Execute".

That should exactly emulate your browser's request.  Change the request
line by line to look like CF's request and re-submit it until it stops
returning what you expect.  That will be the difference.

I can tell you right now that CFHTTP isn't going to be sending those
cookies which are very likely part of the problem.  

You can specify cookie headers with 

Here is blog post on the topic:
http://www.bennadel.com/blog/725-Maintaining-Sessions-Across-Multiple-ColdFusion-CFHttp-Requests.htm

The web service provider should have documented information as what the
web service requires to be consumed including whether cookies need to be
accepted and returned.

~Brad

 Original Message 
Subject: Re: CFHTTP Problem - is file type extension required?
From: Gerald Weir 
Date: Thu, June 04, 2009 2:12 pm
To: cf-talk 


Dave,
Is this what you need? I'm beginning to think that it is a security
setting on the web service itself. Like an access setting in a
cffunction. I'm not sure how the web service is constructed - it's not
CFM.


~|
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:323186
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Peter Boughton

> it resets back to 1 every time the server restarts.

Huh?

I was under the impression it was number of milliseconds since the unix epoch 
(1-Jan-1970).

Certainly that's what Railo is returning, and no resetting after restart there.
I'm 99% certain that CF7 acts in the same way.

The CF docs are a bit vague/contradictory on it though:

Description - Returns the current value of an internal millisecond timer.
Returns - A string representation of the system time, in milliseconds.
Usage - The value of the counter has no meaning.



~|
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:323187
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Ryan Stille

I just fired up Tomcat and tried getTickCount() on all 3 CFML engines within a 
second or two of each other.
OpenBD:  276282Railo:  1244157288529cfusion:  1244157287685
Running date "+%s" on my linux box gives me 1244157286 so it looks like cfusion 
and Railo do indeed return milliseconds since the epoch.  This may not have 
always been the case, hence the fuzzy documentation.
-Ryan


From: Peter Boughton 
Sent: Thursday, June 04, 2009 4:43 PM
To: cf-talk 
Subject: Re: Generating appopriate transaction IDs 

> it resets back to 1 every time the server restarts.

Huh?

I was under the impression it was number of milliseconds since the unix epoch 
(1-Jan-1970).

Certainly that's what Railo is returning, and no resetting after restart there.
I'm 99% certain that CF7 acts in the same way.

The CF docs are a bit vague/contradictory on it though:

Description - Returns the current value of an internal millisecond timer.
Returns - A string representation of the system time, in milliseconds.
Usage - The value of the counter has no meaning.



~|
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:323188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Generating appopriate transaction IDs

2009-06-04 Thread Ryan Stille

Eh sorry my webmail sucks, lets see if this one comes through formatted better.
__
I just fired up Tomcat and tried getTickCount() on all 3 CFML engines within a 
second or two of each other.

OpenBD:  276282
Railo:  1244157288529
cfusion:  1244157287685

Running
date "+%s" on my linux box gives me 1244157286 so it looks like cfusion
and Railo do indeed return milliseconds since the epoch. This may not
have always been the case, hence the fuzzy documentation.

-Ryan


From: Peter Boughton 
Sent: Thursday, June 04, 2009 4:43 PM
To: cf-talk 
Subject: Re: Generating appopriate transaction IDs 

> it resets back to 1 every time the server restarts.

Huh?

I was under the impression it was number of milliseconds since the unix epoch 
(1-Jan-1970).

Certainly that's what Railo is returning, and no resetting after restart there.
I'm 99% certain that CF7 acts in the same way.

The CF docs are a bit vague/contradictory on it though:

Description - Returns the current value of an internal millisecond timer.
Returns - A string representation of the system time, in milliseconds.
Usage - The value of the counter has no meaning.



~|
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:323189
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: ColdFusio 8.0.1 cfinput binded variable truncating off leading zero in a text string?

2009-06-04 Thread Dennis House of Fusion

> The zero is not missing going into the query its missing going back to 
> the cfinput text box. If I dump the CFC results the leading zero is 
> there. Something is happening with the bind output results. 

heres a seriously STUPID way of having to het this done...  This fn will ensure 
a leading 0 in a zip code...  Sorry about any code wrapping


  
  




function test(x) {
var imdone = false;
if(!imdone) {
var dd = 
document.getElementById('OrgZip');
for(var i = 0; i < dd.length; i++){
with (dd.options[i]) {
if(text.length < 5 ){
text = '0'+text;
value = 
'0'+value;
}
}
}
imdone = true;
}
}



~|
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:323190
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ColdFusio 8.0.1 cfinput binded variable truncating off leading zero in a text string?

2009-06-04 Thread Dennis House of Fusion

> The zero is not missing going into the query its missing going back to 
> the cfinput text box. If I dump the CFC results the leading zero is 
> there. Something is happening with the bind output results. 

heres a seriously STUPID way of having to het this done...  This fn will ensure 
a leading 0 in a zip code...  Sorry about any code wrapping

Quoted printable format to get past the filters...

  =0D=0A  =0D=0A  =09=09=0D=0A  =09=09=0D=0A  =09=09=09=0D=0A  
=09=09=0D=0A  =09=09=09function test(x) {=0D=0A  =09=09=09=09var imdone =3D 
false;=0D=0A  =09=09=09=09if(!imdone) {=0D=0A  =09=09=09=09=09var dd =3D 
document.getElementById('OrgZip');=0D=0A  =09=09=09=09=09for(var i =3D 0; i < 
dd.length; i++){=0D=0A  =09=09=09=09=09=09with (dd.options[i]) {=0D=0A  
=09=09=09=09=09=09=09if(text.length < 5 ){=0D=0A  =09=09=09=09=09=09=09=09text 
=3D '0'+text;=0D=0A  =09=09=09=09=09=09=09=09value =3D '0'+value;=0D=0A  
=09=09=09=09=09=09=09}=0D=0A  =09=09=09=09=09=09}=0D=0A  =09=09=09=09=09}=0D=0A 
 =09=09=09=09=09imdone =3D true;=0D=0A  =09=09=09=09}=0D=0A  =09=09=09}=0D=0A  
=09=09=09

~|
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:323191
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Generating appopriate transaction IDs

2009-06-04 Thread Justin Scott

> Railo:  1244157288529
> cfusion:  1244157287685

I was remembering back in the CF4/5 days where it returned the ms count
since the application server was started.  Or maybe my memory is starting to
go (ack!).  Good to know for the future.


-Justin


~|
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:323192
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Need a fresh perspective

2009-06-04 Thread Ben Densmore

I've been working on an event scheduling application for the past 2 weeks.
I'm pretty close to wrapping it up but have now run into an issue on my last
part of the display. I'm thinking my data model might be the issue and would
like to get some ideas from people on how I might be able to fix it.

The way this thing works is:
Step 1. user Creates a Title and description for their event
Step 2. the user can select as many dates as they want
step 3. the user enters in multiple times for each date they selected

The structure I'm using for storing the data looks like:

Table 1
PollID|UserID|Title|Description

Table 2
DateID|PollFK|DateValue

Table 3
DateFK|PollFK|TimeValue|Order

This structure made the most sense to me only because they can add any
number of dates that they want so if they added 15 dates I create a new row
for each date and the ID for that date will then relate to the times they
enter in step 3. This is what one event might look like in these 3 tables

Table 1
PollID | UserID | Title | Description
1 25My Title   My Description

Table 2
DateID | PollFK | DateValue
112009-06-25
212009-06-26
312009-07-27

Table 3
DateFK | PollFK | TimeValue | Order
1 19:00 AM  1
1 110:00 AM2
1 112:00 PM3
2 111:00 AM1
2 112:00 PM2
3 1 6:30 PM 1

In My last display page I need to show a table similar to this:


June
July
 Wed 25 Thur 26
 Wed 01
9:00 AM 10:00 AM 12:00 PM11:00 AM 12:00 PM6:30 PM

I'm just really struggling to get this layout done with multiple queries.
I'm doing one query to group the dates by month then going back and getting
the days that were entered in for that month which I can do fine but I can't
get the display to show up as I showed above.

So I guess my 2 questions are:

1. Does anyone see a more efficient way to store the dates and times,
keeping in mind that a user can add as many dates as they want, so creating
x amount of columns doesn't really seem feasible.

2. What would be the best way to build my display page?

Thanks,
Ben


~|
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:323193
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4