Searching for a string across all of the stored procedures in a database is something that I always forget how to do and then have to quickly browse Google for..
I’m not sure why this isn’t built into the MSSQL management tools but it’s super easy and can save a bunch of time if you’re bug hunting.
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%find me please%'
AND ROUTINE_TYPE='PROCEDURE'
Recently we put together a version of Litmos that looks and feels like a native iPad app but runs via Safari on the iPad.
We were able build the UI for this in less than a day and release it due to our implementation of the WebFormsViewEngine in .Net MVC. By creating our own custom view engine which has some sneaky browser detection build in we can offer up a custom UI for desktop browsers, iPhones or iPads etc.
I will post some code at some stage soon but for an example of what can be done in very little time at all check out this video..
Recently I had to calculate the distance between 2 GPS coordinates. Theres a fair bit of help online about how to do this but I though I would share my implementation of the Haversine method.
public double GetDistance(double latitude1, double longitude1,
double latitude2, double longitude2)
{
double earthRadiusMiles = 3963;
double distance = 0;
// convert degrees to radians
latitude1 = latitude1 * Math.PI / 180;
longitude1 = longitude1 * Math.PI / 180;
latitude2 = latitude2 * Math.PI / 180;
longitude2 = longitude2 * Math.PI / 180;
// check the points are not the same
if (latitude1 != latitude2 && longitude1 != longitude2)
{
distance = Math.Sin(latitude1) * Math.Sin(latitude2)
+ Math.Cos(latitude1) * Math.Cos(latitude2)
* Math.Cos(longitude2 - longitude1);
distance = earthRadiusMiles
* (-1 * Math.Atan(distance / Math.Sqrt(1 - distance * distance))
+ Math.PI / 2);
}
return distance;
}
This is a quick preview of the new mobile version of the Litmos LMS running some Articulate Flash content on the Google Nexus One phone.
You can log javascript errors and console messages from your Android device or emulator. To do this you first need to install the Android SDK and USB drivers and enable USB debugging on the actual device.
To check if the device is connected correctly you can run the following cmd from your Android SDK tools directory and you should see a device in the list
c:\android sdk..\tools\adb devices
You can then use the Android Debug Bridge to filter debug messages so that you only see browser related messages by running the following cmd.
c:\android sdk..\tools\adb logcat browser:V *:S
By default the log is written to stdout so you will see any Javascript errors or console.log messages etc written to the cmd window.
We’ve been working on a mobile version of Litmos using jQtouch which works super nice for iPhone but we have had a few issues getting it cranking on Android browsers.
One of the issue was due to MVC rendering views by default as application/xhtml which resulted in errors in the JQuery and jQTouch libs so we wanted to change the content type output to text/html.
After a wee bit of hunting around we found that you can set the output content type on a per view basis by changing the view page directive to include a ContentType declaration.
eg.
<%@ Page Title=”" Language=”C#” ContentType=”text/html”…..
Last night the team attended the cocktail evening and announcement of the finalists for the NZ Hi-Tech awards and we were extremely pleased to be nominated as one of four finalists in the Innovative Service product of the year award.
Next step is to present to a panel of international judges and convince them that we are worthy of the title! Then its on to the gala awards dinner on May 7th where the winners will be announced.
FYI… Last years winner of the Innovative Service award was the world class SaaS based accounting system Xero.
For 1300 athletes from around globe March 6th 2010 was due to be an epic day. It was the Taupo, New Zealand Ironman race, a kind of crazy endurance triathlon that takes an awesome amount of physical training and mental strength to conquer.
After many months of training their day began at 7am with a 3.8km swim, then followed by a 180km cycle and finished up with a full marathon 42km run!!
This year a group of friends and I went along to support a mate who was doing the Ironman for the first time and he crushed it in just 10 hours, 43 minutes. Insane!
It was the most inspirational event that I have been to in a long time. Seeing people of all ages and gender out there giving it everything they’ve got in the tanks to get around the course. No doubt its a tough ask and but a never give up attitude and a strong will to succeed gets them over the line at the end of the day.
If you’re ever looking for a boost or scratching for inspiration find yourself an Ironman event and go support the hundreds of people out there doing it! It’s truly awesome.
Here’s a few videos and pics of Brad captured from around the course and crossing the Finish line.
Nothing to say here. Just watch the video and you’ll see what I mean.










Comments