Reverse Image Search using tineye.com
Posted by Paul Alkema | Tags: Misc
About 6 months ago I came across a reverse image search website called tineye.com. This site's is really an excellent way to find an original or the source of image. It can also be really helpful for finding other websites that have stolen your original images.
PHP vs. ColdFusion
Posted by Paul Alkema | Tags: ColdFusion , php
PHP vs. ColdFusion
In my years I've found myself actively writing in several different languages. I've written full applications in ASP.NET, PHP and ColdFusion. My current primary languages are PHP and ColdFusion.
Throughout the years I've grown really fond of ColdFusion. In this article I'm going to explain the benefits & cons of ColdFusion over PHP.
Benefits to PHP
- Widely supported and has a huge community of people willing to help and answer questions.
- Open source.
- A vast amount of open source scripts available.
- A large number of shared hosting providers that are willing to offer hosting for very low cost. For instance $3.00 - $10.00/month.
Cons to PHP
- Is not the easiest language to learn.
- Development time can be very time consuming as everything is syntax based and requires a lot of code.
- Server settings are made through a text file called php.ini which can be a hassle and can make issues difficult to diagnose.
- Servers are typically apache, which often causes issues with file / folder rights.
- Doesn't have a very good template system compared to ColdFusion's custom tag based templates.
Benefits to ColdFusion
- Very easy to learn compared to PHP.
- Extremely easy to read compared to PHP.
- Writing ColdFusion applications require much less code compared to PHP.
- Coding applications is much less time consuming as ColdFusion is much more Robust than PHP.
- Although the Adobe ColdFusion server is not open source, there is an excellent ColdFusion alternative. http://getRailo.org/
- The ColdFusion administrator is very easy to use and has a nice User Interface.
- ColdFusion has something called Custom Tags, which makes the managing and accessing of website templates a breeze.
- Very easy to use coldfusion OOP functions. Also allows for .NET and Java integration.
- Integrates very well with Flex.
- Extremly Robust with a vast amount of built in javascript packages like cfgrid, cfwindow and cftooltip. Also coldfusion has built in functions to allow ajax binding extremly simple.
Cons to ColdFusion
- Community is not as big. However, although the community isn't as big, I think that you'll find more ColdFusion programmers per capita than php.
- Some people don't like how easy to learn and read ColdFusion is because they claim that it's so easy to code that it's not like programming it's more like talking about code. Which is probably true.
- Those who use Adobe's ColdFusion think that it's expensive. Those who use Railo think it's free.
EXAMPLES
Want to see some code examples? I'll show you how robust ColdFusion really is.
The PHP code below, will return the columns firstname, lastname from the Friends table.
<?php
//
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$result = mysql_query("SELECT friendId,firstName,lastName,nickName FROM friends");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
}
mysql_close($con);
?>
Now look at the Coldfusion Example
The ColdFusion code below, will return the columns firstname, lastname from the Friends table.
<cfquery name="getMyFriends" datasource="peter"> SELECT friendId,firstName,lastName,nickName FROM friends </cfquery> <cfloop query="getMyFriends"> #firstName# #lastName# </cfloop>
Isn't the ColdFusion code just so straight forward to the point and easy to read?
This is just a single example of hundreds, no thousands of reasons of why I personally think that ColdFusion is better than PHP.
Have an opinion why you think one is better than the other? I want to hear it!
Change IP Address Coldfusion 9 Developer Edition
Posted by Paul Alkema | Tags: ColdFusion
Are you receiving the error below and are looking at how to change the IP addresses available to your ColdFusion Developer box?
A License exception has occurred. You tried to access the Developer Edition from a disallowed IP address (xxx.xxx.x.xxx). The Developer Edition can only be accessed from 127.0.0.1 and two additional IP addresses. The additional IP addresses are: xxx.xxx.x.xxx,xxx.xxx.x.xxx
If you are, I have bad news, unfortunately there is no file or admin area to edit the allowed IP's. By default ColdFusion allocates the first two external IP addresses that hit the ColdFusion service. The only way to change the allocated IP addresses is to restart the ColdFusion service and hit the server with the correct IP addresses. Not ideal I know, but it's currently the only way.
Easily Restart ColdFusion Service
Posted by Paul Alkema | Tags: ColdFusion
Today I installed ColdFusion 9 developer edition on my local pc. When asked which server type I wanted to use, I opted to user ColdFusion 9's built-in web server. However later I wanted to restart the server however and because I didn't have IIS I didn't have an easy way to handle this so wrote a BAT file to restart the service.
I would think there would be a better way to do this, however I was unable to find a different way of restarting the ColdFusion service with ColdFusion 9's built-in web server.
To use my BAT file, create a blank text document and insert the code below.
NET STOP "coldfusion 9 application server" NET START "coldfuion 9 appliation server"
Save the file and rename it cfrestart.bat. That should do it! Now if you click on the file it should restart the service.
How to Remove the Shadow From cfwindow
Posted by Paul Alkema | Tags: ColdFusion , Javascript
While trying to get rid of cfwindow's drop shadow I came across an excellent article written by Todd Sharp on how to exactly this using a javascript function. The one issue I ran into while trying to use this method, was how to easily create windows on the fly using the ColdFusion.Window.create function.
My final solution to this, was to go into the cfwindow.js file in the application server and change the shadow attribute to false.
Find
_22c.shadow=true;
Replace With
_22c.shadow=false;
This will need to be replaced twice, as this statement appears twice in the file.
Note: A down side to using this method is that you'll have to redo this every time there is a server upgrade. Also, in order to use this method you have to have the ability to actually edit this file, which for users on a shared server is unlikely. Have better solution? I'd love to hear from you!
