February 02, 2012 · By Mark Drew · 2 Comments
A couple of weeks ago, I posted about running a competition to be in my CFML Mythbusters competition, well the competition is now over and it's time to choose the winners
Before choosing them, I thought I would post the code I am using to choose them and the process, so to be nice and transparent.
First off, everyone could post multiple times and this went into a Google Docs spreadsheet, so they could have multiple entries. Since I could see how many entries there were, for example 1-20, this is easy.
I decided to create an array (because they are much sexier than lists), each position with the number of the entry. Then randomise those positions and then simply choose positions 1,2,3 and 4 from their positions in their array
So here is the code (not including the form, since I am pretty sure you know how to make a form.):
<cfscript>
aEntries = [];
loop from="#FORM.from#" to="#FORM.to#" index="e"{
ArrayAppend(aEntries,e);
}
collection = CreateObject("java", "java.util.Collections");
collection.shuffle(aEntries);
</cfscript>
<cfoutput>
<ol>
<li>First Place: #aEntries[1]#</li>
<li>Second Places: #aEntries[2]# and #aEntries[3]#</li>
<li>Third Place: #aEntries[4]#</li>
</ol>
</cfoutput>
Did you spot the Java class? Yep! The java.util.Collections class is really handy for manipulating Arrays in different ways, and of course, since (in Railo at least) an Array can be used by the Collections it is perfect.
So what do you think? Is this a fair way to select some random people?
Tags:
Book · railo
January 19, 2012 · By Mark Drew · 20 Comments
Following on from a post that Visual Studio has an Achievements Plugin (very funny if you play on the XBox, Steam or PS3) I was just thinking what Achievements could we unlock if we had a plugin for CFEclipse (or CFBuilder) whilst coding CFML?
[Read more →]
Tags:
cfeclipse · cfml · coldfusion
January 16, 2012 · By Mark Drew · 11 Comments
I shall be presenting the topic "CFML Mythbusters" at a couple of conferences this year so far (cf.Objective and OpenCF Summit)!
So that you just don't have to hear about my chosen "myths" I thought I would open it up as a competition to all the readers of my blog!
I shall be answering a lot of questions already, but would like to get some reader suggestions, for example, here are just some of the few I have (sent in by some very honorable people I have to say!):
- “CFScript is always faster! ?Even when using for loops!” - Alfred Einstein
- “Inline IF’s are much better than <CFIF>. I will stake my stake on it” - Abraham Van Helsing
- “Is isDefined() bad?” - Abe Simpson
- “<cfoutput>#Item#</cfoutput> is the only way to go” - Mohandas Gandhi
to give you some ideas!
Of course, it wouldn't be any kind of competition if you didn't win anything! So what's the prize I hear you ask?
- First place gets a physical, signed copy of my book, Railo 3: Beginners Guide, their question answered in the presentation (obiously) and my blog, the question dedicated to them and a big shout out when I cover their question EACH time I present it. WOW!
- Two second places also get their question answered in the presentation, another shout out, and an electronic version of Railo 3: Beginners Guide
- The third place ALSO gets their question answered in the presentation and this blog, and a shout out
I shall be drawing the results at the end of January 2012 so get your thinking hats on and then submit your Myths to be Busted!
EDIT: You can submit multiple suggestions!
Tags:
Book · railo
January 03, 2012 · By Mark Drew · No Comments
Happy New Year dear readers of my little blog! Just before the break for the holidays I was informed by the awesome guys and gals at Packt Publishing that my book "Railo 3: Beginner's Guide" was finally out!
It wasn't enough that they told me it was out, they even sent me a few paper versions of the book, which I shall of course treasure as my first work in print!
Anyway, the book that is over 300 pages long (actually 364), has 10 chock-a-block chapters filled with Railo Server Goodness:
- Chapter 1: Introducing Railo Server
- Chapter 2: Installing Railo Server
- Chapter 3: CFML Language
- Chapter 4: Railo Server Administration
- Chapter 5: Developing Applications with Railo Server
- Chapter 6: Advanced CFML Functionality
- Chapter 7: Multimedia and AJAX
- Chapter 8: Resources and Mappings
- Chapter 9: Extending Railo Server
- Chapter 10: Creating a Video-sharing Application
Of course, if just reading that list is not enough, why not check out the FULL listing or even download a Sample Chapter?
But instead of just skimming over the top, why not get a full copy if the book? You can get it HERE from the Packt Publishing website! It comes in many flavours, including Paper,PDF, ePub and Mobi downloads and also on PacktLib
If you do get a copy, let me know what you think! I am currently thinking of the next book too!
Tags:
Book · coldfusion · railo
November 15, 2011 · By Mark Drew · 1 Comment
If you have been having problems finding your Personal Hotspot Wifi from your iPhone after the slew of updates recently, here is how I managed to fix it.
Ok, so let's be clear, this is not about finding how to enable it, or if your cellular carrier allows you to use it, but rather, that you used to be able to find your phone in the list of Wifi hotspots, and now when you switch it on, you can't find it.
Not all the steps are necessary, but they worked for me:
- Rename your phone to something without spaces or strange characters: Settings - General - About - Name
- Reset your network settings (your phone will reboot): Settings - General - Reset - Reset Network Settings
- Restart your Personal Hotspot from Network (not from the main screen): Settings - General - Network - Personal Hotspot
I hope this helps!
Tags:
apple · iPhone
November 14, 2011 · By Mark Drew · No Comments
There are a number of times when a webservice returns some very complicated data, or inversely it requires some even more complicated parameters to be sent. In the past I have spent hours trying to figure out how to send the right parameters to remote method calls, but instead of wasting a long time using either Adobe ColdFusion's or Railo Server's Axis adaptors, I go straight to the source, and in this post, I shall show you how to do it.
[Read more →]
Tags:
October 28, 2011 · By Mark Drew · 3 Comments
CFCamp this year was again, a great event! Some awesome presentations from everyone that presentend!
I did promise to post my JQuery Mobile and PhoneGap presentation as soon as, so here you go!
Had a total blast today, I highly recommend this condensed conference! It's a total brain filler!
Tags:
cfcamp · CFConferences · html5 · iPhone · PhoneGap
September 26, 2011 · By Mark Drew · 4 Comments
Munich! City of Oktober fest and Pretzels! The big soft ones with butter inside. What could be more delicious than that? I tell you what is... CFCAMP 2011 is!
That's right ladies and gentle-folks, after a three year hiatus, there is going to be a stomping and knowledge-infusing conference in Munich this year, filled to the gills with awesome presenters and me!
For a measly €90 a ticket (going up to €119 in October, so get them whilst they are fresh!), your mind can be blown by the likes of Charlie Arehart (he of the inside secrets into ColdFusion 10!), Luis Majano (he of the mobile knowledge), Gary Gilbert exposing his JQuery to the public, Bilal Soylu will also be locking down your apps, and of course Andy Allan and myself, giving it all from our presenter's pulpit.
Sure you can't miss this?!
Head over to http://www.cfcamp.org/anmeldung.cfm http://www.cfcamp.org/registration.cfm?ChangeLanguageTo=en to get your tickets (yep, it's in German, just use Chrome and translate it, you are a clever person right? This time in English! Don't say we don't spoil you!)
Tags:
cfcamp · CFConferences · getrailo · railo
August 22, 2011 · By Mark Drew · 6 Comments
If you have ever wondered how your memory is being used in a Railo Server application, why not get the latest development release of Railo Server: 3.3.0.026 rc (you know that you can do this from the server administrator right?).
Just go to http://yourdomain/railo-context/admin/server.cfm and log in, then you can click on the "update" button, set the updates to "Development", update and then click the "execute button below to get the latest update.
Once you have done that, in the Railo Server Administrator screen, you will see info about your installation and scrolling down you will get a nice graphic on how your memory is being used, like the example below:

Yet another handy feature of Railo Server! Nice!
Tags:
getrailo · railo
August 12, 2011 · By Mark Drew · 17 Comments
As an "owner" of a blog, that has (at last count) 590 posts dating back over seven years, I noticed that I start getting a lot of comment spam.
I have been asking myself, how long should I allow comments on blog posts? I mean, I am sure I posted something in 2006 that might be relevant again, but maybe just contact me? Since I doubt someone is going through my archives (unless they got there via Google of course) and even then, since this is a technology blog, I am sure there are a lot of things that are now out of date.
So the question is, should I turn off comments on blog posts that are older than X time? and what should that X be?
Over to you!
Tags:
blogging