Friday, January 29, 2010

Big Jesus


The Christ of the Ozarks stands on a hill beside a scenic overlook near Eureka Springs, AR. It’s sort of the same thing as the Christ the Redeemer monument in Rio de Janeiro, except that its proportions are all wrong and it’s not quite big enough to be impressive. Maybe it’s a holdover from my childhood, maybe it’s a fascination with the spectacle of the monument, but I’ve always had this thing for Big Jesus.

I was in Eureka Springs a few years ago doing Quicktime VR photography for some of my web clients there. I used to really enjoy QTVR work – that’s where you stitch a dozen or more photos together into a panorama that can be moved around and zoomed on a web page – both because it’s technologically cool and because you get to be a photographer, kind of. Along with my thing for Big Jesus, I’ve also always had a thing for photography. Photographers, even in this advanced age, still seem to retain some of their romantic image from days past, Paparazzi or not. Maybe it’s just me.

I had been meaning to QTVR Big Jesus for some time, ever since I started doing it, really. (By “doing it” I refer to QTVR, not Big Jesus.) So I was finally there, waiting patiently for the pedestrians to clear the scene. Tourists can be such a pain.

Truthfully, it wasn’t so much that they were in the shot as it was that I didn’t want anyone to see what I was about to do. I had finished all but the last few shots, which were the ones that had BJ Himself in frame. What I intended to do was set the 10 second timer and make a mad dash up the hill and stand in that Big Jesus palms-forward, arms-outstretched pose. I thought it would be pretty funny to see that in a QTVR, but I was also almost certain that anyone else who came to see Big Jesus would think that was a vaguely sacrilegious thing to do.

So being neither very bold nor wont to offend, I just waited. For a long, long time. There weren’t really that many people, but they were spaced out just right not to give me the right window of time. But it was a nice day and all so I took the role of amateur tour guide, standing beside my tripod, pointing out the tops of buildings in Eureka Springs that you can see from the overlook. I’m sure people thought I was a little strange there, but at least they didn’t think I was sacrilegious.

I waited until I had just about had enough, when these four people came down the hill and started asking about the buildings, etc. Obviously one of them, a middle-aged looking woman, was a local with three out-of-staters she was showing around. We talked for a while about what I was doing and wasn’t it a great day and all and when they got ready to leave, the hostess said she wanted to get a picture of the others out in front of BJ.

She pulled out what looked like one of those handy but pathetic little film-and-camera-all-in-a-box jobs and had them pose in front of the hill. I felt absurdly self-conscious of my $1500+ camera equipment waiting patiently for me to get up the nerve to pull off an admittedly pretty childish photographic stunt. These really nice people were using a $6 disposable camera to record what, to them, was a pretty significant moment in their visit.

I have a thing for Big Jesus. It’s earnest. And kitchy. And so, so oddly shaped. But I’ve never been, you know, moved by it. They were.

So I said to hell with it and pulled the camera off the tripod and trotted up to them. I told them to pose and fired off 10 or 12 exposures with the haze filter to bring out the puffy clouds and the polarizer to make the trees nice and green. Then I told the Native to write her name and address down on the back of one of my business cards and I’d just send the prints to her.

They were kind of startled at first, but then really happy, and then really grateful. They made the de rigeur gesture of offering to pay for the film, postage, etc. I said no, of course, that I had to finish the roll anyway and that postage wasn’t worth the effort.

I developed and printed them, and they really did come out pretty well. I sent them off to the address she gave me, a rural PO box in St. Paul, Arkansas, and I suppose the visitors got a copy too. Maybe they thought something nice about our fine state because of it. I never got to shoot my disrespectful but good-natured parody. But what I want to say about this whole situation is this:

I’ve always had good hearing. As I was carrying my equipment back up the hill I heard the guy of the foursome say “That’s about the nicest thing I’ve ever seen anybody do.” It was just one of those things people do, using superlatives where they don’t really belong, as in “You’re just about the cutest thing!” But it still made me feel good. I had that moment of self-indulgent pride that you feel when you know you’ve done someone a good turn.

But then I heard one of the women repeat what he had said, you know the way people will sometimes communicate agreement. But from her it sounded … sincere. Like maybe she meant it. My God, maybe it really was the nicest thing a stranger had ever done for her.

As I lugged my equipment up the hill under Big Jesus’ left arm, I was filled with a sadness I still can’t explain.

Thursday, January 28, 2010

SQL Function to quote for CSV

MSSQL doesn't provide any way to text-qualify fields with quotes for CSV output. The SSIS filters will do this for you, but if you're using BCP or something even more primitive :) it can be a pain.

Use this function to throw double-quotes around text fields if they contain a comma:


ALTER function fn_QuoteCSV
(
@input varchar(4000)
)
RETURNS varchar(4000)
AS
BEGIN
declare @rtn varchar(4000)
select @rtn=@input

IF CHARINDEX(',',@input) > 0
BEGIN
select @rtn = QUOTENAME(@input,CHAR(34))
END

return @rtn

END

Monday, December 28, 2009

Change Background on Invalid Fields

.NET doesn't provide a way to change the background color (or other attributes) of fields that fail validation when using the built-in validators. I think color prompting is a nice way to indicate bad user input, so rather than going to a whole lot of code-behind nonsense you can just shim on to the .NET validation display routine by putting this javascript on your ASPX page:


var OriginalValidatorUpdateDisplay = null;

function NewValidatorUpdateDisplay(val) {
OriginalValidatorUpdateDisplay(val);
if (val.controltovalidate) {
var ctrlIsValid=true;
var ctrl = document.getElementById(val.controltovalidate);
for (var i = 0; i < ctrl.Validators.length; i++) {
if (!ctrl.Validators[i].isvalid) {
ctrlIsValid = false;
}
}
if (ctrlIsValid) {
ctrl.style.backgroundColor = '';
ctrl.style.color = '';
}
else {
ctrl.style.backgroundColor = '#FF0000';
ctrl.style.color = '#FFFFFF';
}
}
}

if (typeof (ValidatorUpdateDisplay) == 'function') {
OriginalValidatorUpdateDisplay = ValidatorUpdateDisplay;
ValidatorUpdateDisplay = NewValidatorUpdateDisplay;
}


That's it!

The only downside is that as-written there is only one "pass" and one "fail" attribute per page. You could change classes on the fly and accomplish more customization, but that sort of violates the elegance of this approach.

Friday, December 18, 2009

Visual Studio GridView designer bug

There is a bug in Visual Studio 2008 that prevents property changes in design view from being reflected back to source code when controls are embedded in wizards or master pages. For simple controls this is not a big deal, but for complex controls, like DevExpress's ASPxGridView, the designer is a huge time saver -- which is the only reason you pay good money for a nice RAD toolkit in the first place.

Luckily, there is a hotfix:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=17185

Get it.

Thursday, August 27, 2009

Move around a transparent AIR window

Some things are made out to be more complex than they have to be. If you want an Adobe AIR application without a standard window frame ("chrome" as they call it) then you have to manage allowing the user to move the window around yourself, as well as a way to close the app. It's harder to find a simple example than it should be.


// $background and $close can be any mouse-active
// display object on the stage, of course

// close the app on clicking a button
$close.addEventListener(MouseEvent.CLICK, closeApp);
function closeApp(ev:MouseEvent)
{
var myWindow:NativeWindow = this.stage.nativeWindow;
if (myWindow) myWindow.close();
}

// drag app around
$background.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
function startMove(ev:MouseEvent)
{
var myWindow:NativeWindow = this.stage.nativeWindow;
if (myWindow) myWindow.startMove();
}


You can do a lot more than that, of course.

Tuesday, August 25, 2009

Access variables passed from HTML in AS3

In AS2 accessing variables passed into Flash from a web page was as easy as referencing _root.{whatever}. AS3 makes things a little more complicated. Why? Just because. Deal with it.


// myVariable is the name of a var passed to the SWF, as in
// <EMBED ...>FlashVars="myVariable=Hello"
// or even
// mymovie.swf?myVariable=Hello

var myVariable:String = LoaderInfo(loaderInfo).parameters["myVariable"] || "defaultValue";
trace(myVariable);
// "Hello"


While working in the IDE, or if the page doesn't supply the proper variable, the "parameters" object property will be undefined. It's always best to set a default value, which is what that
|| "defaultValue"
bit is about.

If you have a lot of variables you need to access... well first off you should consider reading an XML file for configuration, but if that's too much trouble, try this, just for convenience:


var flashVars:Object = new Object();
for (var name in LoaderInfo(loaderInfo).parameters) {
this[name] = LoaderInfo(loaderInfo).parameters[name];
}
// now you can access variables like:
trace(this.myVariable);
// very much like the old AS2 _root.myVariable

Friday, October 3, 2008

Distance

Cottonwood leaves. Cottonwood bark. Steel benches dipped in plastic to seal away rust. Enjoy Heineken responsibly dot com. The thrum of a tugboat. I like that word: thrum. Someone is smoking upwind of me. The tug pushes steel steel steel coal and steel. A tiny spider looking for God knows what on the back of my ring finger. I look into the inside of the blue shell afternoon sky and still I see stars. Afternoon. After hours. In the universe of my creation there will be more stars than space. More hours. More leaf than tree. Or simply less space. In the universe of my creation I can sit here and touch the hazy limestone bluffs across and down the river. I can read the crags and escarpments like braille. I can walk to work in seven steps. On the back of my neck I can feel the air displaced by the migrating ducks overhead. I can heel-to-toe onto the steelbarge with a tiny baby step. In the universe of my creation I can drive three hundred miles in ten minutes.

© Copyright 2008 JD Robinson