number of active sessions in memory of CF
Hi all, I have a question regarding active sessions numbers in memory. We are using Adobe Coldfusion 9 enterprise and I have a difference between the number of active sessions shown in the server monitor and the number shown in my cfm page that I used before having enterprise version. Here is my code : cfoutput cfset tot=0 cfset oSession = createObject(java,coldfusion.runtime.SessionTracker) cfset so = oSession.getSessionCollection() cfset tot=tot+#oSession.getSessionCount()# cfset so = oSession.getSessionCollection(Y) cfset tot=tot+#oSession.getSessionCount()# cfset so = oSession.getSessionCollection(Z) #tot# /cfoutput The number shown by my page is much more than the number in the server monitor. Somebody could explain me why I have a difference? Many thanks and Happy New Year 2011 :) . ~| 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:340344 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Concantenate vs Pound Signs within Quotes
Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? 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:340345 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Concantenate vs Pound Signs within Quotes
Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? The former would be faster in some situations back in ColdFusion 5, but with newer versions (6+) it all gets compiled into Java byte code and ends up being the same either way once it actually gets executed. -Justin ~| 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:340346 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Concantenate vs Pound Signs within Quotes
Shannon, There is likely a speed difference because CF does not have to introspect and evaluate the string any further with the second option... but I would say you would need a really really long string to see the difference :) Still, I'd have to say I favor the second in most cases. I only use the first when I have a lengthy strting in cfscript and most of the string is constant. The second approach is semantically descriptive of what is actually going on here (a concat operation)... so I like to see that in my code. I don't really have any objection to the former approach however so I'd say that yes it is mostly a style difference. I would also have to say that the first approach is kind of how cfsavecontent works and I use that all the time for XML or content etc. -Mark Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Shannon Rhodes [mailto:shan...@rhodesedge.com] Sent: Monday, January 03, 2011 8:10 AM To: cf-talk Subject: Concantenate vs Pound Signs within Quotes Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? 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:340347 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Concantenate vs Pound Signs within Quotes
Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? The former would be faster in some situations back in ColdFusion 5... Oops, I meant the latter would have been fasted in 5. Too early in the morning. -Justin ~| 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:340348 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
re: Concantenate vs Pound Signs within Quotes
Merely stylistic. Depends on the coder's feelings on readability, which is personal preference as much as anything. From: Shannon Rhodes shan...@rhodesedge.com Sent: Monday, January 03, 2011 9:18 AM To: cf-talk cf-talk@houseoffusion.com Subject: Concantenate vs Pound Signs within Quotes Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? 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:340349 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Concantenate vs Pound Signs within Quotes
Marginally valid test for giggles...(on CF8)... cfset myvar = arrayNew(1) cfset starttick = getTickCount() cfloop index=i from=1 to=100 cfset myvar[i] = What do you think of #i#? / /cfloop cfoutput#Evaluate(getTickCount() - starttick)#/cfoutput ...produced 1119. cfset myvar = arrayNew(1) cfset starttick = getTickCount() cfloop index=i from=1 to=100 cfset myvar[i] = What do you think of i ? / /cfloop cfoutput#Evaluate(getTickCount() - starttick)#/cfoutput ...produced 1207. So that seems to confirm no significant speed diff. I prefer i On Mon, Jan 3, 2011 at 8:09 AM, Shannon Rhodes shan...@rhodesedge.comwrote: Is it merely a stylistic difference between cfset myvar = What do you think of #this#? / and cfset myvar = What do you think of this ? / Or is there a speed advantage to the latter which cancels out any increased readability in the former? 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:340350 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Concantenate vs Pound Signs within Quotes
Thanks guys, that's about what I expected. As a stylistic difference, I would not advocate changing existing code to eliminate pound signs, whereas there are those who argue the speed advantage of moving to concantenation only. While I like concantenation, I see no problem with choosing ease of editing/readability sometimes if the speed difference is not perceptable. ~| 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:340351 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Concantenate vs Pound Signs within Quotes
I try to use pound signs as little as possible. It's a bit of a hang over from the old cf4.x days but I personally find it a) easier to read and b) more akin to other languages. On Mon, Jan 3, 2011 at 9:27 AM, Shannon Rhodes shan...@rhodesedge.comwrote: Thanks guys, that's about what I expected. As a stylistic difference, I would not advocate changing existing code to eliminate pound signs, whereas there are those who argue the speed advantage of moving to concantenation only. While I like concantenation, I see no problem with choosing ease of editing/readability sometimes if the speed difference is not perceptable. ~| 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:340352 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Basic mySQL workbench question
Hi folks I have created a table in mysql and need to modify the column attributes. Using mysql workbench I can create the model and modify the columns but how do I save the changes to the table columns. Thanks Rob ~| 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:340353 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Basic mySQL workbench question
You don't have an Apply button bottom-right on the Alter Table... window? On Mon, Jan 3, 2011 at 9:05 AM, Rob Voyle robvo...@voyle.com wrote: Hi folks I have created a table in mysql and need to modify the column attributes. Using mysql workbench I can create the model and modify the columns but how do I save the changes to the table columns. Thanks Rob ~| 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:340354 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfhttp multipart facebook
Hi, I'm playing with the facebook graph api, and was attempting to send an image to my wall. According to facebook, you just send the image, your access key a caption... see below my code: cfoutput cfif fileexists(D:\myPath\images\menubar.jpg) cfhttp method=post url=https://graph.facebook.com/me/photos; multipart=yes cfhttpparam type=formfield name=access_token value=myAccessToken cfhttpparam type=file name=source file=D:\myPath\images\menubar.jpg cfhttpparam type=formfield name=message value=this is a test picture. /cfhttp cfdump var=#cfhttp# /cfif /cfoutput When I run this, I get a 400 bad request error (OauthException an unknown error occurred returns from facebook). Does anyone know what I'm doing wrong? 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:340355 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Basic mySQL workbench question
Rob, You might want to join this list: http://lists.mysql.com/gui-tools Rob Voyle said the following on 1/3/2011 9:05 AM: I have created a table in mysql and need to modify the column attributes. Using mysql workbench I can create the model and modify the columns but how do I save the changes to the table columns. -- Best regards, Chris Montgomery ~| 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:340356 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
SOT: Show time in field on click
Hi, I have this code I gleaned that will show the time as a popup when clicked. I was wondering how I can have it enter the time into an input field of a form as opposed to being a popup? Thanks. RO HWW html head title(Type a title for your page here)/title script type=text/javascript function show_now() { var my_time = new Date(); alert(my_time); } /script /head body bgcolor=#ff text=#00 link=#ff vlink=#800080 alink=#ff input type=button value=Show Time onclick=show_now(); /body /html ~| 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:340357 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: SOT: Show time in field on click
say you have a field named myDate in a form named myForm then instead of: alert(my_time); put: document.myForm.myDate.value = my_time; On Mon, Jan 3, 2011 at 3:25 PM, Orlini, Robert rorl...@hwwilson.com wrote: Hi, I have this code I gleaned that will show the time as a popup when clicked. I was wondering how I can have it enter the time into an input field of a form as opposed to being a popup? Thanks. RO HWW html head title(Type a title for your page here)/title script type=text/javascript function show_now() { var my_time = new Date(); alert(my_time); } /script /head body bgcolor=#ff text=#00 link=#ff vlink=#800080 alink=#ff input type=button value=Show Time onclick=show_now(); /body /html ~| 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:340358 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Apache Worker MPM w/ JRun
Were you ever able to sort this out? We're having the same problem, any help would be much appreciated. I've been all around mod_jrun22 in the last couple days, and I know way more than I want to. However, I can't get it to work quite right. Environment: Debian Lenny 5.0.6 Apache 2.2.9, Worker MPM (ideally) JRun4 build 108673 CF 8.0.1 Enterprise in multiserver config I've compiled the connector with apxs2. Debian's default MPM is the worker (threaded) MPM. Under load I received a bunch of messages in the apache error log, along the lines of startSync - detected broken mutex!... In digging through the code, it appears unless APACHE_APR_THREAD is defined when the connector is compiled, the mutex library call is never made. (At least for linux... Windows connectors have other means) I find this interesting because wsconfig doesn't define that flag either, and I can't find it anywhere in /usr/include/... So, I define the flag and recompile. All the errors go away and the connector works great. Except that a couple requests go out to lunch. Under heavy load, mod_jrun will drop random connections with the following message: JRun will not accept request. Check JRun web server configuration and JRun mappings on JRun server. Which responds to the client with an ugly 500 error. I understand the error when you send a file extension like .html to JRun and there's no mapping in the web.xml... However, this is for a cfm page, whether it's a index.cfm found via DirectoryIndex or some other cfm page on the server. 99%+ of the requests go through fine, it's just this one request every couple hours that won't behave that's driving me crazy. So it can't be a config issue. Turning on tracing would likely write so much information to the log as to be unusable with the load required to reproduce this issue. Switching to the perfork MPM removes the problem entirely. It does, however, significantly increase CPU load on the server. I've used JMeter to send tens of thousands of requests against the connector without any issues. It's very hard to create artificial load to reproduce the problem... but real load makes it happen several times a day. Which brings me to my question... Is anyone out there successfully using mod_jrun22 in an Apache 2.2 environment with the worker MPM? CF8. 0.1/CF9/CF9.0.1? Success stories? I've considered upgrading JRun/CF to more recent versions, but a quick scan of the JRun connector code in CF9 and 9.0.1 yields only minor changes... Looks like mod_deflate fixes finally made it into 9.0.1 and 9.0 mostly pertained to Winsock2 upgrades. Any information would be helpful! Thanks. Joe ~| 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:340359 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Apache Worker MPM w/ JRun
Were you ever able to sort this out? We're having the same problem, any help would be much appreciated. I've been all around mod_jrun22 in the last couple days, and I know way more than I want to. However, I can't get it to work quite right. Environment: Debian Lenny 5.0.6 Apache 2.2.9, Worker MPM (ideally) JRun4 build 108673 CF 8.0.1 Enterprise in multiserver config I've compiled the connector with apxs2. Debian's default MPM is the worker (threaded) MPM. Under load I received a bunch of messages in the apache error log, along the lines of startSync - detected broken mutex!... In digging through the code, it appears unless APACHE_APR_THREAD is defined when the connector is compiled, the mutex library call is never made. (At least for linux... Windows connectors have other means) I find this interesting because wsconfig doesn't define that flag either, and I can't find it anywhere in /usr/include/... So, I define the flag and recompile. All the errors go away and the connector works great. Except that a couple requests go out to lunch. Under heavy load, mod_jrun will drop random connections with the following message: JRun will not accept request. Check JRun web server configuration and JRun mappings on JRun server. Which responds to the client with an ugly 500 error. I understand the error when you send a file extension like .html to JRun and there's no mapping in the web.xml... However, this is for a cfm page, whether it's a index.cfm found via DirectoryIndex or some other cfm page on the server. 99%+ of the requests go through fine, it's just this one request every couple hours that won't behave that's driving me crazy. So it can't be a config issue. Turning on tracing would likely write so much information to the log as to be unusable with the load required to reproduce this issue. Switching to the perfork MPM removes the problem entirely. It does, however, significantly increase CPU load on the server. I've used JMeter to send tens of thousands of requests against the connector without any issues. It's very hard to create artificial load to reproduce the problem... but real load makes it happen several times a day. Which brings me to my question... Is anyone out there successfully using mod_jrun22 in an Apache 2.2 environment with the worker MPM? CF8. 0.1/CF9/CF9.0.1? Success stories? I've considered upgrading JRun/CF to more recent versions, but a quick scan of the JRun connector code in CF9 and 9.0.1 yields only minor changes... Looks like mod_deflate fixes finally made it into 9.0.1 and 9.0 mostly pertained to Winsock2 upgrades. Any information would be helpful! Thanks. Joe ~| 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:340360 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: iCalendar (.ics) file creation?
Hello everyone, I found this posting because we've come into a problem with our code possibly. We have developed an issue after importing the .ics file into a MacBook iCal program when a client goes to view an event it comes up with the option of accepting the event or not accepting for every event. Is there a way to add in an auto accept in our code that'll make that change. Our code is for 2007 so maybe there's something new that I haven't discovered yet that any of you may have found? One other point I need to make. We don't have this problem with outlook on a PC or replicate this issue on our version of iCal (Version 3.0.8 (1287) I'm not sure what version she was running on her machine if that has any relevance to this issue. I hope that helps. Thanks in advance! Matt... We are using the following code to email to a user's shared email/calendar system. We use the same code without the cfmailpart bits to create a calendar of events for users. Hope this helps. cfmailpart type=text/calendar; method=REQUEST; name=meeting.ics charset=utf-8BEGIN:VCALENDAR VERSION:2.0 METHOD:REQUEST BEGIN:VEVENT UID:#getregid.regid#-#eventid#- SUMMARY:#eventtitle# LOCATION:#eventlocation# ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION; RSVP=FALSE:mailto:#form.rsvpemail# ORGANIZER:mailto:my...@uwm.edu DTSTART:#dateformat(realdate,'mmdd')#T#timeformat(starts,'HHmmss')# DTEND:#dateformat(realdate,'mmdd')#T#timeformat(end,'HHmmss')# STATUS:CONFIRMED CLASS:PUBLIC END:VEVENT END:VCALENDAR /cfmailpart On Fri, Aug 8, 2008 at 10:29 AM, Pete Ruckelshaus pruckelsh...@gmail.comwrote: ~| 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:340361 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfhttp multipart facebook
myAccessToken should be #myAccessToken# ??? just a thought... Andrew. cfhttpparam type=formfield name=access_token value=myAccessToken Hi, I'm playing with the facebook graph api, and was attempting to send an image to my wall. According to facebook, you just send the image, your access key a caption... see below my code: cfoutput cfif fileexists(D:\myPath\images\menubar.jpg) cfhttp method=post url=https://graph.facebook.com/me/photos; multipart=yes cfhttpparam type=formfield name=access_token value=myAccessToken cfhttpparam type=file name=source file=D:\myPath\images\menubar. jpg cfhttpparam type=formfield name=message value=this is a test picture. /cfhttp cfdump var=#cfhttp# /cfif /cfoutput When I run this, I get a 400 bad request error (OauthException an unknown error occurred returns from facebook). Does anyone know what I'm doing wrong? 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:340362 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm