We all have forms of some sort on our website: comment form, contact form, registration form, etc. Forms are good because it allows user to interact with our site but at the same time they attract spams. A common way to prevent spams is to use captcha but the problem is none of us likes to type in those funny characters, especially you may get them wrong and have to retype, not to mention they don't make my pages look very pretty.
While working on my blog, I experimented with a few different ways to prevent spams without using these ugly captchas. Below are the 4 methods that I use: ask a simple question, include a hidden field with CSS, validate request referer and check against Stop Forum Spam. Read more
After working with jboss for a while, I decided to set it as a service so that I could start and stop it easier and do not have to have a terminal window open every time I start jboss. This turns out to be easier that I thought. I know jboss is up to version 7 now but I find jboss 5 is sufficient for what I need to do so I still stick with it and that's what I use to demonstrate in this article. If you are still using jboss 5 and interested in setting it up as a service too, read on.
After jailbreaking iPad, although music and videos are deleted, photos are not. This at first seems to be a good thing as it saves me time transferring the photos again. But after using if for a while, I find it a more problematic than handy. With the iPad being jailbroken, I now use 3rd party app to manage my photos instead of the built-in one and these apps require my photos to be in different locations, different album structures, etc. That means I need to delete those in the built-in app to preserve space. Unfortunately there is no easy way to remove them without going through the iTunes sync process which I don’t want because it's likely to mess up my jailbreak (I never have full confidence in it). Read full article
If you are familiar with OOP, you know that there are basically 2 types (scopes) of variables and functions:
- Private: only available within the object itself
- Public: also available to the caller, outside the object
(There are other scopes as well but I leave them out to keep things focused in this article)
To know what's available publicly, we can either read the documentation or use some functions like cfdump in Coldfusion.
But what about the private ones? How can we know what variables and functions are available privately inside the object? I know there are many good reasons for things to remain private and I totally agree that is the good architecture. But there are times I want to know how the internal variables change, what values they are holding at runtime. This is especially useful for debugging purpose. Read full article.
While fixing my cfTrigger framework recently, I realized that I have messed up the scopes of variables inside cfcs seriously! I omitted the var keyword for local variables and used This keyword where it should have been Variables. So before continuing to fix it, I decided to take a step back and learn again in a more proper way what variable scopes are available in Coldfusion cfcs and how to use them correctly. Read full article.