Access and update Qualtrics embedded data from javascript

On multiple occasions when designing surveys in Qualtrics, I’ve run across situations where I need to both access embedded data from javascript and update the embedded data. Unfortunately, it is not immediately obvious how to do this, and it takes a few steps to accomplish this correctly.

Take an example where I’m storing a count of how many times a user is clicking in a specific area in each question (triggering a javascript function), but I only want an aggregate count across multiple questions. Assuming I’ve already added and initialized the embedded data (TotalKeyClicks) in the Qualtrics survey flow, each time I need to reference the embedded data in the javascript, I first need to add a hidden HTML element with the embedded data value:

The best practice next step would be to create a …more

Posted in it | Tagged , , , | Leave a comment

Javascript disable hidden .net validators

A quick javascript function to disable hidden .net validators involves iterating through all validators in the page, and enabling/disabling them based on whether or not they are visible. This snippet has come in handy for me many times. Define the function below and call DisableHiddenValidators() on document.ready().

Posted in it | Tagged , | Leave a comment

Can I Ride released

Can I Ride My first Windows Phone 8 app was approved and published to the Windows Store last week. It’s a simple live tile that takes advantage of background tasks and the location api. It’s available for download here.

Posted in it | Tagged , , | Leave a comment

BNS error. The maximum number of ScheduledActions of this type have already been added.

In setting up a PeriodicTask in my Windows Phone 8 project, I ran into an error while debbugging: BNS error. The maximum number of ScheduledActions of this type have already been added. This occurs when there is already a PeriodicTask for the application and another one is added (only 1 PeriodicTask is allowed per application). To fix this, I found there are two solutions. The first (which I don’t like) is to find the PeriodicTask by the same name and remove it:

A better implementation is to iterate through all PeriodicTasks for …more

Posted in it | Tagged , , , | Leave a comment

Dvorak keyboard layout – Part I

Dvorak, composer. Not the keyboard designer.I’ve been a full-timer in the workforce a pretty short length of time. At my first job out of college, I was hired as a fresh programmer onto a team with much more experience than I had. Naturally, when I started to develop aches in my fingers and palms associated with repetitive strain injury (RSI), I was more than shocked that it could happen to someone my age. I was especially surprised that I had started to notice symptoms after only 6 months on the job. This was my first desk job, and I did not think 6 months of repetition was enough for my hands to start experiencing RSI. I was wrong.

I had be working 40 hours a week programming at a desk, then coming home to do my own projects for another 4 or 5 hours a day. It’s hard to believe now that …more

Posted in mind | Tagged , , , | Leave a comment

Access referring page in

In an web application, the referring page can be accessed via the Request object. This is useful for controls that redirect to the previous page.

To access the local path and store it to ViewState, use:

It’s also possible to access the full path via:

Posted in it | Tagged , , | Leave a comment

JQuery click event fires multiple times

A quick gotcha–sometimes your click events might fire multiple times. Just double check your event handlers are inside document.ready().

In large javascript files, sometimes it’s hard to catch!

Posted in it | Tagged , | Leave a comment

Polyphasic sleep – What to expect when you’re adjusting

You'll be tired when adjustingI’m a month and some change into the Everyman sleep cycle, and I hope I never have to go back to monophasic sleep. In fact, if my schedule dictated I needed to change my schedule back closer to a monophasic schedule, I’d readily switch to a different Everyman cycle instead, or even something as simple as a core sleep and siesta nap. In fact, there was just an article in The Wall Street Journal recently that touched on the fact that monophasic sleep is a relatively new cultural habit (within the past few hundred years). This makes me think that for me to personally go back to a monophasic cycle is not necessary best for my body.

I’m completely adjusted to the schedule now. In fact, I’d say the majority of my adjustment was over the first week. It wasn’t any more difficult than I expected, but I would definitely not want to go through it again. Here are some things I experienced that …more

Posted in body, mind | Tagged , | Leave a comment

Gomad followup

It’s been quite some time since my most recent go at Gomad, but I finally got around to crunching the numbers. From my starting weight of 147 lbs. to my ending weight of 160 lbs., I gained 13 lbs. This was all over a period of 25 days. That’s an average of .52 lbs. a day. I’d say that gaining half a pound a day is certainly progress!

Here’s a graph of my daily weight during …more

Posted in body | Tagged , | Leave a comment

LINQ to Entities does not recognize method

I run into this NotSupportedException more often than I should: “LINQ to Entities does not recognize the method ‘System.String ToString()’ method, and this method cannot be translated into a store expression.” It’s a simple fix, but it always slips my mind until I run into the exception.

This is the offending code (Event.lookupCode is a string while myMeeting.Code is an int):

The exception is thrown because there is no equivalent of the ToString() method in SQL. To fix this, store the string value of the int code in …more

Posted in it | Tagged , , | Leave a comment