Well, it's not perfect but it works. Jews like News is now live using the technology and techniques that I'll be speaking about at this summers CFUN. Want to know how the news is auto-added? Want to see the code? It'll all be there.
If you like how the site works and want to do the same for your favorite news subject, then go to http://www.cfconf.org/cfun-04/ and sign up.
Dear Mr. President,
I wish to formally request that not one cent of my tax dollars be delivered to the organization calling itself the United Nations (UN). This organization has time and again shown its hypocrisy by blaming the victims of a crime rather than the perpetrators. It is even now voting on a resolution to condemn Israel for the killing of a known Terrorist and Mass Murderer.
If it was any other country then there would be no outcry. Spain was just hit with a terrorist attack on 3/11. Israel was hit at the same time. Who's crying for Israel? No one. Why's crying for Spain? Everyone. What's the difference? Israel knows who was behind the attack on its people and killed him; Spain does not. I wonder if the world would yell and scream if Spain killed the man behind the Madrid attack? I doubt it. But Spain is not Israel. Spain is not held to an impossible standard by the world. No one is held to the standard that Israel is.
I just answered a question for someone on the Macromedia forums and it reminded me of an issue of style that I've wanted to write about. The poster wanted a 6 digit random number. Easy to do using 6 RandRange() functions in a row. I posted it this way:
Another poster did it this way:
Now, obviously they both work but there's a big difference between them. The second version looks more elegant than mine. If you were looking at the two solutions, you'd go with the second because it just looks like it's better (and if it was for a job, hire the writer of the second).
So why did I, a rather high level ColdFusion programmer do it my way? Because it saves on processing operations. In my case, I've got 1 CFSET operation and 6 function calls. In the loop case, there's 7 CFSET operations, 6 function calls as well as a CFLOOP. That's a few more operations than what's really needed (IMO).
Update: A new, cleaner and more efficient solution was just posted to the thread.
This is a total of 1 CFSET and 2 function calls. Very nice.
There are a few places in ColdFusion where a time value is needed in a certain format. The best know are the CachedWithin parameter in CFQUERY and the timeout parameters in CFAPPLICATION. All documentation for these say to use the CreateTimeSpan() function to create a time value. Now this seems a bit useless. The time value created (actually, just a number value) is not dynamic. It's being created every time just because some document said so. Want to save an operation. Just replace the CreateTimeSpan() with a number instead.
Here's how it works. Running CreateTimeSpan() with a value of 1 day results in a return of 1. This basically means that if you want your CachedWithin value to be 1 day, you just put in the number 1 rather than the (useless) function. But what about hald a day? Just use logic and its simple. 1 is 1 day so .5 is half a day (12 hours). 6 hours is .25 and you just keep going from there. The only problem is that as you get smaller and smaller in time, the resultant numbers get longer and longer.
But do we care about longer numbers? No. We care about using 1 less function for each cached query. We care about 1 (or more) less function for our CFAPPLICATION tags. We care about going totally overboard on our optimizations. And why not? It doesn't hurt anyone and telling people why gets you points for knowing some deep secret about how CF works.
Just as a side note, as you get to smaller values, you'll start to get some irrational numbers. Just round up to the 3rd or 4th decimal place and don't sweat it. Using .0208333333333 for a 30 minute time value is nice, but .02084 will work just as well. And wy round up? Because its better to give a little extra time than to give less than expected.
24 hours - 1
12 hour - 0.5
6 hour - 0.25
3 hour - 0.125
1.5 hour - 0.0625
60 minutes - 0.0417
45 minute - 0.03125
30 minute - 0.02084
15 minute - 0.010417
10 minute - 0.00695
5 minute - 0.003473
1 minute - 0.000695
Methodology - An organized way or writing and placing your code. Some methodologies include a framework, but that is NOT needed to be a methodology. There is NO standard methodology, just a number of well known ones. Fusebox 1 was a pure methodology. Mach-II is not. EVERY programmer should have a set methodology that they use for their coding practices.
Framework - A collection of code that is used as a template for writing applications. A framework allows a single, 'standard' code base to be used for all parts of the application and allows others to work on the application faster because they are using a 'standard' core of templates. A framework is used for speed of development and standardization among programmers. By its very nature, any framework will have extra code that is not optimized to a site. Mach-II is a framework.
Pods are a concept that was released with the Central product by Macromedia. From an article on Breeze, it seems that the concept has grown past Central into some form of standard for Flash programming. A working definition of a pod might be:
"A pod is a SWF which contains the UI, Code and initial data for an application. This application is not meant to be independent but instead is meant to be a sub-component of a larger application.
In layout terms, a webpage that has a standard header, sidebar, body and footer could be said to contain 4 pods, 1 for each section. Alternately, it can be said that each section displayed in the body section is a pod and the surrounding layout is the containing site/application."
My name is Michael Dinowitz. I'm a respected leader in the ColdFusion community, a religious Jew and a decent human being. If my name or any of my attributes hold any sway with you then I implore you to boycott Astoria Federal Savings Bank. They are not friendly to small businesses or the people who run them.
Why am I so upset? Because they charged me $30 dollars for a bounced withdrawal of $5 dollars. Not only did they do that but they did it 4 times. A normal bank might forgo 3 of the charges. A great bank might forgo all of the charges. What did Astoria do? They charged me, removed my account and then added my name to the ChexSystem. This means that my credit rating is basically shot for the next 7 years and why? Because of $120 dollars of fines they assigned.
I'm not happy and anyone who runs a small business should feel the same way. If it happens to me, it can happen to you. Don't use this bank as they WILL treat you as less than human and take your money.
This is a 'feature' that seems to have existed since CFMX 6.0. Basically, if you try to access a query element greater than the number of elements in a query, the result will be a blank.
Try it yourself by running a query with a single return row. Then try to access the 100th element of the query
Logically, there should be an error for trying to access an item outside the data range. In CFMX queries, this does not happen.
Read more on this CF-Talk thread
Till now I've limited the site display size to about 800 pixels wide. This has worked well, but on screens set to a larger resolution (about 48% of people it seems), this has resulted in some dead space. I've decided to use this dead space in a way both to support the site and show off other CF resources.
You may notice a google banner bar on the right hand side of the site. This has been specifically placed to be out of the way and not even seen by most people on 800x600 resolutions. The ads there SHOULD be relevant to the site as long as Google does their job right (which they seem to have done). If you happen to see a link there thats interesting and you want to visit it, please do.
Some people create their own multi-part emails using CFMAILPARAM tags to create mime parts. This works great in CFMAIL pre-6.1 but in 6.1 this fails. You have to use the new CFMAILPART to send multi-part mail as of 6.1
When moving from CFMX to CFMX 6.1, any special class path added in the admin will be rewritten with the slashes removed. This will cause an error somewhere down the line.
in CF 5, when a RegEx pattern was run and a subexpression was set to optional (i.e. had a question mark after the subexpression) AND the option to return all subexpressions was made within the REFind() tag, the optional subexpression was not added to the array if it returned nothing. Let me illistrate with some code:
^ - start at the beginning of a string
( - Start a subexpression and return everything in it as one item in an array created by the REFind() tag
[-a-z0-9_.]+ - match one or more of these characters
@ - match an @
[^[:space:]]+ - match one or more of anything that is not a space type character
) - All of the above is one subexpression
match 0 or more spaces (the actual space character)
\(? - match the literal character ( that may or may not exist
( - Start a subexpression and return everything in it as one item in an array created by the REFind() tag
[^)]+ - Match anything that is not a closing parenthesis
)? - This subexpression may or may not exist
\)?- match the literal character ) that may or may not exist
The second subexpression is optional. In CF5, there is no place in the returned array for it if it does not exist. In CFMX, an entry in the array always exists for it, even if the entry is 0.
This is an interesting error that comes up once in a blue moon and probably has to do with a failure somewhere in the install. Basically, once you install and are about to go to the migration tool, you find that you just can't log into the admin to finish your migration. The reason is that the ODBC services are not running. You try to start them up and they fail. Why? Bacause there's an error in their config files.
The fix is rather easy. Do a search on the string "c:\program files\merant" in the c:\cfusionmx\db directory (or whatever drive you've installed it on). You'll find 3 files. Replace that string (c:\program files\merant) with the string "c:\cfusionmx\db" (or whatever drive letter you have the cfusionmx directory in). After replacing all of the instances in all 3 files, start the services and finish migrating. Easy to do and only 3 people have ever reported seeing it.
Along with the ODBC error above, someone was getting 500 errors on IIS from every attempt to access a CF page, including the admin (needed for the final migration checks). The answer was to rerun the IIS connector for CFMX. Fixed the problem right up. As I don't use IIS (I'm a Website user since day 1), I can't go into more details.
In previous versions of CFMX and/or Website, any attempt to use the ancient practice of Search Engine Safe (SES) Urls resulted in failure. I don't know if it was the latest Website or CFMX 6.1 but I can use them to my hearts desire now. I've even went to far as to code the logic into a CFC, cache the CFC into the server scope and call it at will. Fast and effective.
With the help of many within the ColdFusion community, the Visual Regular Expression editor that was part of the KDE package has been ported to a standalone, windows application. For more information and to download this most useful tool, please visit www.cfregex.com.
Latest Fusion Authority Articles