Viewing by month: August 2008

This is a pretty basic use of the how to capitalize on ColdFusion / Java, but I recently had to show someone else how to do this as well as use it myself today to parse a very large CSV file.

<cfscript>
    var f = "";
    var endOfFile = false;

    f = createObject("java","java.io.FileReader").init(arguments.csvFileLocation);
    f = createObject("java","java.io.BufferedReader").init(f);

    while (NOT endOfFile) {
        line = f.readLine();

        if (NOT isDefined("line")) {
            endOfFile = true;
            break;
        } else if (len(line)) {
            // {LINE PARSING CODE HERE}
        }
    }

    f.close();
</cfscript>

Some of you who know me, know that I'm getting married soon...\r\nYesterday I ran into an issue that I felt was worthy of a short story.\r\nMy girlfriend and I are trying to do a modest wedding and are keeping\r\ncosts down where we can; one of the places we cut back was on wedding\r\ninvitations and rsvp cards. We stopped into Michaels and picked up 3\r\nDIY packs that should suffice our 100+ crowd of adults plus children\r\nand created them in MS Word. I have an small-office laser printer in my\r\nhome office that prints faster than I thought was possible and it was\r\nWAY easier than I ever expected and we only spent $100ish dollars.

\r\n

So\r\n2 days after we printed them all and put them aside I get a call during\r\nthe day: \"Honey what are we going to do? All of the wedding invitations\r\nare still wet, and they smudge at the smallest touch!\". When I got home\r\nthat night and surveyed that they were in fact not drying that she\r\nwasn't nuts, I came to the most obvious conclusion that any sain purson\r\ncould: \"Lets put em in the oven\".

\r\n

Click Read More for Directions and Pictures!