SQL & Distinct Results

If you are working through a large list of potentially similar entries for maybe a cascading dropdown for manual location entry then you might find the DISTINCT sql command quite valuable.

This query returned 3800+ counties with tons of double entries:

Add in our special DISTINCT keyword and we get just 91 unique counties:

Tags: SQL

How to Increase Message Size Quota

Sometimes when dealing with web services that return large amounts of data you get the follow error message.

The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.

This can be fixed by increasing the maxReceivedMessageSize, maxBufferSize, maxBufferPoolSize, maxArrayLength & maxStringContentLength variables in your web.config to their max size.

The follow code shows you what the web.config basicHttpBinding section variables should be set to:

For a second there I thought I had just undone all my custom theme work on my blog by previewing a theme that really did wipe out my html code. Thankfully Tumblr have a theme history set up. Use the link supplied and you can view the last 20 code changes you have made to your theme and revert back to the state of any of them. Phew!