Re: Schedule task more frequent than 1 inute

2010-12-03 Thread Michael Dawson

I would create a page that is scheduled to run every minute.

That page would call an external request via CFHTTP, CFTHREAD or whatever could 
spawn a new CF request.  Then, it would sleep for however long (20-30 seconds, 
for example) then call itself once or twice more.

Then, in the next minute, that page is requested once again and the process 
repeats.

mike 

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


Re: Querying LDAP

2010-03-23 Thread Michael Dawson

>Hi,
>
>I want to see if a user exist or not in group AI. here is my LDAP query-
>___
>action="query" 
>attributes="member" 
>start="OU=Endgroups,DC=uad,DC=su,DC=du" 
>server="someserver" 
>username="someuser"
>filter="cn=ai"
>password="somepasswd"
>name="getLdapUser">
>___
>
>And Here is the what i am getting(cfdumping getLdapUser)-
>___
>
>CN=xyz,OU=EndUsers,DC=uad,DC=su,DC=du, 
>CN=mnop,OU=EndUsers,DC=uad,DC=su,DC=du, 
>CN=pqr,CN=Users,DC=uad,DC=su,DC=du, 
>CN=stuv,CN=Users,DC=uad,DC=su,DC=du, 
>CN=wxyz,OU=EndUsers,DC=uad,DC=su,DC=du,
>___
>
>Please tell what should be correct LDAP query.
>
>Thanks

You need to specify a filter attribute, in the CFLDAP tag.

... filter = "cn=xyz" ...

You can also use "name" or "sAMAccountName" as the filter criteria (as long as 
they match the CN value).

The query will return 1 or 0 records, depending if it finds a match.

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


Re: Spreading Items Into Groups of Banks

2010-03-19 Thread Michael Dawson

Well, it wasn't too difficult to pull off.  Here is a rough, working example:


SELECT
Songs.songId
,Songs.songTitle
,Songs.presetCount
FROM
Songs
INNER JOIN SetLists
ON Songs.songId = SetLists.songId
WHERE
SetLists.showId = 8
AND
SetLists.setNumber = 1
ORDER BY
SetLists.setNumber
,SetLists.songPosition








Song
PresetCount
CurrentPreset
PresetsRemaining










#list.songTitle#
#list.presetcount#
#currentPreset#
#presetsRemainingInBank#



 

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


Spreading Items Into Groups of Banks

2010-03-19 Thread Michael Dawson

I can't think of the programming pattern for this, but, this is what I'm trying 
to do for a little side project I'm building.  I'll explain what I'm doing and 
then I ask you for the name of the programming pattern that most-closely solves 
this problem.  I'm not specifically asking you to code it for me, however.  
(Unless you want to give some clues.)  ;^)

I have a guitar signal processor that lets me store presets for each song.  
Each song will have, at least, one preset, but a song may also have two or 
three presets.  A song would never have more than five presets.  These presets 
will always be in the same order as our set lists.

I have a foot switch, that I use to select the presets for the songs.  The foot 
switch will let me choose one of five presets in 20 different banks.  For 
example Bank 1 consists of Presets 1-5.  Bank 2 consists of Presets 6-10. etc...

I have a database table of our songs.  Each record also stores how many presets 
are used for any particular song.  For example, "Born To Be Wild" uses only one 
preset.  "Feel Like Makin' Love" uses three presets.

I have another table that associates our songs with a show's set lists.

Currently, I have another table that maps each song with the preset number on 
my processor.  When I have to re-order the songs, in the set list, I have to 
also re-order them, in my processor, as well as modify the table that maps the 
songs to the presets.

This is where I want to go:

Rather than having a mapping table, I just want to make sure that my 
processor's presets match the set list's song order.  Then, as long as the 
database knows how many presets are used for each song, it would automatically 
tell me where to store the songs presets in my processor.  I have a utility 
that allows me to quickly move presets, in my processor, using a computer.

Here is the catch:  I don't want a multi-preset song to overlap a bank.

For example:  "Feel Like Makin' Love" uses three of the five presets in one 
bank.
One day, we may follow that song with another song that uses three presets.  
Therefore, I need it to start with the next bank, not in position four, five 
and then the first of the next bank.  That means the bank that holds "Feel Like 
Makin' Love" uses the first three presets and the last two are unused.

That said, what would be the closest programming pattern that would solve this 
problem?  I don't think it would be too difficult to loop and keep counters, 
but knowing when a bank is "full" because of the next preset would be the 
tricky part.

Thanks for any suggestions. 

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


Spreading Items Into Groups of Banks

2010-03-19 Thread Michael Dawson

I can't think of the programming pattern for this, but, this is what I'm trying 
to do for a little side project I'm building.  I'll explain what I'm doing and 
then I ask you for the name of the programming pattern that most-closely solves 
this problem.  I'm not specifically asking you to code it for me, however.  
(Unless you want to give some clues.)  ;^)

I have a guitar signal processor that lets me store presets for each song.  
Each song will have, at least, one preset, but a song may also have two or 
three presets.  A song would never have more than five presets.  These presets 
will always be in the same order as our set lists.

I have a foot switch, that I use to select the presets for the songs.  The foot 
switch will let me choose one of five presets in 20 different banks.  For 
example Bank 1 consists of Presets 1-5.  Bank 2 consists of Presets 6-10. etc...

I have a database table of our songs.  Each record also stores how many presets 
are used for any particular song.  For example, "Born To Be Wild" uses only one 
preset.  "Feel Like Makin' Love" uses three presets.

I have another table that associates our songs with a show's set lists.

Currently, I have another table that maps each song with the preset number on 
my processor.  When I have to re-order the songs, in the set list, I have to 
also re-order them, in my processor, as well as modify the table that maps the 
songs to the presets.

This is where I want to go:

Rather than having a mapping table, I just want to make sure that my 
processor's presets match the set list's song order.  Then, as long as the 
database knows how many presets are used for each song, it would automatically 
tell me where to store the songs presets in my processor.  I have a utility 
that allows me to quickly move presets, in my processor, using a computer.

Here is the catch:  I don't want a multi-preset song to overlap a bank.

For example:  "Feel Like Makin' Love" uses three of the five presets in one 
bank.
One day, we may follow that song with another song that uses three presets.  
Therefore, I need it to start with the next bank, not in position four, five 
and then the first of the next bank.  That means the bank that holds "Feel Like 
Makin' Love" uses the first three presets and the last two are unused.

That said, what would be the closest programming pattern that would solve this 
problem?  I don't think it would be too difficult to loop and keep counters, 
but knowing when a bank is "full" because of the next preset would be the 
tricky part.

Thanks for any suggestions. 

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


Re: CFEclipse: Taking the Plunge, Again

2007-08-02 Thread Michael Dawson
>Eclipse 3.3 (Classic should be fine). The CFE wiki states that Java 1.5 
>JRE is required.
>
>Steve "Cutter" Blades
>Adobe Certified Professional
>Advanced Macromedia ColdFusion MX 7 Developer
>_
>http://blog.cutterscrossing.com
>
>Dawson, Michael wrote:
>>

Thanks, Steve! 

~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285187
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFEclipse: Taking the Plunge, Again

2007-08-02 Thread Michael Dawson
>Eclipse 3.3 (Classic should be fine). The CFE wiki states that Java 1.5 
>JRE is required.
>
>Steve "Cutter" Blades
>Adobe Certified Professional
>Advanced Macromedia ColdFusion MX 7 Developer
>_
>http://blog.cutterscrossing.com
>
>Dawson, Michael wrote:
>>

Thanks, Steve! 

~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285188
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Chicken or Egg? Config File to Set Application Variables

2007-07-27 Thread Michael Dawson
I can use relative references, however, there appears to be a bug in CF8 that 
won't allow you include a file in the Application.cfc's "constructor" area.  
Well, that's not entirely correct.  You can include a file, however, you can't 
refer to any variables within that included file.  That makes it pretty useless.

What I want to do is very basic:

I want an Application.cfc that is exactly the same for development, testing and 
production.  I want that Application.cfc to get its settings from a Config file 
that is unique to each site (development, testing and production).

Here is a requirement:

I want to dynamically set the sessionTimeout and applicationTimeout variables 
in the THIS scope.  I want to pull these values from a config file located 
anywhere on the server (under the web root or outside of it).

Theoretically, it should work like this:

Config.cfm
--




Application.cfc
---










When running this simple code, the CFINCLUDE tag does not throw an error, 
however, you can't refer to the variables set within the included file.

I would just like a solution to this simple problem.

Thanks
M!ke

>> I have structured my web site (CF8) so that my config 
>
>Use a relative reference to get to the parent directory or to siblings, etc.
>Obviously, something will have to be hard-coded - the relative location of
>the config file, or perhaps the name of the config file if you wanted to
>mimic the behavior of CF when it's looking for Application.cfc/cfm.

~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284689
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Chicken or Egg? Config File to Set Application Variables

2007-07-27 Thread Michael Dawson
I can use relative references, however, there appears to be a bug in CF8 that 
won't allow you include a file in the Application.cfc's "constructor" area.  
Well, that's not entirely correct.  You can include a file, however, you can't 
refer to any variables within that included file.  That makes it pretty useless.

What I want to do is very basic:

I want an Application.cfc that is exactly the same for development, testing and 
production.  I want that Application.cfc to get its settings from a Config file 
that is unique to each site (development, testing and production).

Here is a requirement:

I want to dynamically set the sessionTimeout and applicationTimeout variables 
in the THIS scope.  I want to pull these values from a config file located 
anywhere on the server (under the web root or outside of it).

Theoretically, it should work like this:

Config.cfm
--




Application.cfc
---










When running this simple code, the CFINCLUDE tag does not throw an error, 
however, you can't refer to the variables set within the included file.

I would just like a solution to this simple problem.

Thanks
M!ke

>> I have structured my web site (CF8) so that my config 
>
>Use a relative reference to get to the parent directory or to siblings, etc.
>Obviously, something will have to be hard-coded - the relative location of
>the config file, or perhaps the name of the config file if you wanted to
>mimic the behavior of CF when it's looking for Application.cfc/cfm.

~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284690
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Chicken or Egg? Config File to Set Application Variables

2007-07-26 Thread Michael Dawson
For some reason, this message isn't getting through the "system".

Is anyone else seeing this post?

M!ke

>I have structured my web site (CF8) so that my config settings are
>outside of the web root such as this:
> 
>C:\Components
>C:\Config
>C:\CustomTags
>C:\WebSite
> 
>I'm building the site at: http://acelinktest.evansville.edu/ and will
>publish it to http://acelink.evansville.edu/.
> 
>With the exception of the C:\Config folder, all other folders will be
>published to the production site.  The contents of the C:\Config folder
>will contain site-specific information such as the site name
>"AceLinkTest" vs "AceLink" and different values for session and
>application timeouts.  (The test site will have shorter timeouts.)
> 
>Now, I'm building the Application.cfc and can't figure out the best way
>to set the Application variables such as:
> 
>this.name = #appName#;
>this.sessionTimeout = #sessionTimeout#;
>this.mappings["CustomTags"] = #customTagsServerPath#;
> 
>I want to use either an Include or Component (not wanting to argue which
>is better), but I can't include a config.cfm file if it's outside the
>web root since the mapping is not yet created.  I can't create the
>mapping because I can't read the config.cfm file that is outside the web
>root.
> 
>I want to keep the web site as dynamic as possible, regarding server
>paths and URLs, and also keep a separate directory for my site
>configuration.  However, where do I get that first bit of information
>that ties it all together?
> 
>Thanks

~|
ColdFusion 8 beta - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284669
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Chicken or Egg? Config File to Set Application Variables

2007-07-26 Thread Michael Dawson
For some reason, this post didn't make it through the mail system.

>I have structured my web site (CF8) so that my config settings are
>outside of the web root such as this:
> 
>C:\Components
>C:\Config
>C:\CustomTags
>C:\WebSite
> 
>I'm building the site at: http://acelinktest.evansville.edu/ and will
>publish it to http://acelink.evansville.edu/.
> 
>With the exception of the C:\Config folder, all other folders will be
>published to the production site.  The contents of the C:\Config folder
>will contain site-specific information such as the site name
>"AceLinkTest" vs "AceLink" and different values for session and
>application timeouts.  (The test site will have shorter timeouts.)
> 
>Now, I'm building the Application.cfc and can't figure out the best way
>to set the Application variables such as:
> 
>this.name = #appName#;
>this.sessionTimeout = #sessionTimeout#;
>this.mappings["CustomTags"] = #customTagsServerPath#;
> 
>I want to use either an Include or Component (not wanting to argue which
>is better), but I can't include a config.cfm file if it's outside the
>web root since the mapping is not yet created.  I can't create the
>mapping because I can't read the config.cfm file that is outside the web
>root.
> 
>I want to keep the web site as dynamic as possible, regarding server
>paths and URLs, and also keep a separate directory for my site
>configuration.  However, where do I get that first bit of information
>that ties it all together?
> 
>Thanks

~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284672
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Securing CF Apps against SQL Injection & Cross Site Scripting

2004-12-16 Thread Michael Dawson
Would you be willing to share your modded cf_codecleaner custom tag?

Thanks!
MAD

> Yes, I did virtually the same except I modified cf_codecleaner to do 
> the CompareNoCase within the tag, email me the details and cflocation 
> (I'm going to make a "special" 500 page as I can't get cfheader to 
> work with all browsers - notably cfheader, and do away with 
> cflocation). This keeps the application.cfm less "cluttered" as I can 
> then do all the business within one line of code in application.cfm.
> 
> Also I use #urldecode(cgi.query_string)# as otherwise %3c (percent 3 
> c) will not be scrubbed (also applies to all other HTML escaped 
> encoding).
> 
> Within the script tags I also added:
> 
> // remove other...
> // [ and ] have to be handled seperately
> 

> other="[\(){}]"; 

> tmp = REReplace(tmp,other,"","ALL"); 

> tmp = Replace(tmp,"[","","ALL"); 

> tmp = Replace(tmp,"]","","ALL");
>   
>   tmp = Replace(tmp,"+","","ALL");
>   tmp = Replace(tmp,"*","","ALL");
> 
> It's pretty consistant at around 15-16ms which is good.
> 
> regards, Andrew.

~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187934
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54