Community Member Profile
- Profile: /members/2861-Mike-Causer.htm
- URL: jaze.com.au
- Comments: 22
- Points: 232
Recent Blog Comments By Mike Causer
-
Posting Form Values With The ColdFusion CFHttp And CFHttpParam Tags
Posted on Feb 21, 2012 at 1:08 AM
Has anyone noticed that if you try to post a string that exceeds 1,000,000 characters, it simply does not include the field with the request? ..and doesn't throw! eg. <cfscript> var h = new http( url = "http://...", method = "post" ); h.addParam( typ... read more »
-
Learning ColdFusion 9: CFScript Updates For ColdFusion Components
Posted on Sep 14, 2011 at 3:03 AM
Regarding the use of CreateUUID(). Last time I checked, this: createUUID() Was 2x slower than this: createObject("java","java.util.UUID").randomUUID().toString() They produce slighlty different results too. createUUID(): 0310A4B5-CC59-EA0... read more »
-
ColdFusion 9's NEW Operator Can Use Dynamic Class Paths
Posted on Sep 14, 2011 at 2:49 AM
It's a shame we still cant go: myCfc."dynamicMethodName"() or even: myCfc[dynamicMethodNameVar]()... read more »
-
ColdFusion Session Management And Spiders / Bots
Posted on Sep 13, 2011 at 2:27 AM
Oops... "[code]" Where's the edit button Ben? :)... read more »
-
ColdFusion Session Management And Spiders / Bots
Posted on Sep 13, 2011 at 2:23 AM
In our application.cfc we have an onRequestEnd() that detects if the current cgi.http_user_agent matches a blacklist, and if so reduces the session timeout to 15 seconds. [code] session.SetMaxInactiveInterval(javaCast('long',15)); [/code] Another thing you can do is start of... read more »
-
Ask Ben: Converting A Query To A Struct
Posted on Sep 9, 2011 at 11:10 AM
If you want all columns, in their specified case and in their selected order, use this: columns = arrayToList( myQuery.getMeta().getColumnLabels() ); getColumnLabels() returns a java string array (string[]), so if you want to use cf array methods on... read more »
-
Why NULL Values Should Not Be Used in a Database Unless Required
Posted on Jul 14, 2011 at 7:15 PM
I don't see the point in arguing for or against the use of nulls. They have their place. It's your choice as a developer whether you will use them or ignore them. The best thing about nulls is that you can use them however you want. They are simply another value. A null (eg. string) in one... read more »
-
Creating A Struct From A ColdFusion Array Using The TreeMap And The LinkedHashMap
Posted on Feb 8, 2011 at 6:07 PM
I wrote my own version of your arrayCollection() functions using TreeMaps and LinkedHashMaps without reading yours based on your sample output. Turns out we think alike! Main differences are you used arrayIsDefined() where I used isNull() with Array.get() and I favoured cfscript. The... read more »
-
Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript
Posted on Oct 24, 2010 at 8:17 PM
@Ben - only downside to that is your query columns must then be syntactically correct variable names. ie. you cant have a column (or alias) with spaces the .getColumn('column name') on the g.etResult() works around this limitation... read more »
-
Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript
Posted on Oct 21, 2010 at 6:23 PM
@Kevin try this: query = new query(...); instance.user.systemAudiences = []; instance.user.systemAudiences.addAll( query.getResult().getColumn('SystemAudienceID') ) .getColumn() supports case insensitive column name or integer offset (1=first column) be sure to ja... read more »
-
Learning ColdFusion 9: Using CFQuery (And Other Service Tags) In CFScript
Posted on Jun 21, 2010 at 12:20 AM
Is it just me or do you need spaces after your named :params? For example: myQry = new query(); myQry.setSql(' select id from table where id = :id and deleted = 0 '); myQry.addParam( name="id", value=0, cfsqltype='cf_sql_integer' ); myQry.exec... read more »
-
Ask Ben: Converting A Query To A Struct
Posted on May 23, 2010 at 7:37 PM
@Chad, Leading zeros aren't being stripped for me... Can you give more details about your setup? mysql, sql server, cf7, cf8, cf9 etc?... read more »
-
Extending ColdFusion Components And Its Impact On Page Performance
Posted on Apr 27, 2010 at 10:12 PM
I find getTickCount() doesn't have enough granularity - it only deals with milliseconds. I prefer to work with nanoseconds (1ms = 1,000,000ns) Rather than executing something in a loop 1000x times with cftimer, I use the system class timer. I'm sure there are java overheads that get in... read more »
-
Comparing ColdFusion Struct Equality With Java
Posted on Apr 21, 2010 at 9:15 PM
@Tony Wu In your example, the reason for the "NO" is because a.n is created as a java.lang.String and b.n is created as a java.lang.Double - eg. <cfset a = structNew()> <cfset a.n = 2> <cfset b = structNew()> <cfset b.n = 1 + 1> <cfoutp... read more »
-
Why NULL Values Should Not Be Used in a Database Unless Required
Posted on Feb 23, 2010 at 11:33 PM
Nulls are great! They are excluded where you expect them to be. As per your examples, if you wish to include them, you need to use the sql server isNull() function to replace the nulls with blank strings. Theres also an opposite nullIf() function for replacing values with nulls w... read more »
-
QUERY.ColumnList Does Not Return True Column Ordering
Posted on Oct 29, 2009 at 9:45 PM
If you want all columns, in their specified case and in their selected order, use this: columns = arrayToList( myQuery.getMeta().getColumnLabels() ); getColumnLabels() returns a java string array (string[]), so if you want to use cf array methods on it, you'll need to bounce it through... read more »
-
ColdFusion Application.cfc OnRequest() Creates A Component Mixin
Posted on Aug 19, 2009 at 10:56 PM
typo detected... "Executes the requested ColdFusoin template"... read more »
-
GetMetaData() Is Shared By All Instances Of A Given Class In ColdFusion
Posted on Jul 22, 2009 at 8:53 PM
Interesting... It seems the meta data is being stored with the template proxy cache. I guess they figured it wouldn't change much and people wouldn't try to modify it... The cache hangs around until you run: createObject('component','CFIDE.AdminAPI.runtime' ).clearTrustedCache('/full/... read more »
-
KinkyTwits - My ColdFusion And jQuery Powered Twitter Client (Beta)
Posted on Jul 20, 2009 at 7:31 PM
seems the problem is to do with the cf8/9 javascript-style create structs and arrays. eg. myStruct = {}; myArray = []; try replacing {} with structNew() and [] with arrayNew(1) or upgrading to cf8... read more »
-
KinkyTwits - My ColdFusion And jQuery Powered Twitter Client (Beta)
Posted on May 15, 2009 at 1:08 AM
Nice work! One thing I noticed was in TinyURLService.cfc you were pointing to http://tinyurl.com/create.php and using regex to extract the url. There is a TinyURL api which just simply returns the url, without tons of html. N... read more »



