Sort Select Results by Arbitrary Values
SELECT ColumnOne, ColumnTwo, ColumnThree FROM Table
ORDER BY
CASE ColumnTwo
WHEN ‘miny’ 1
WHEN ‘meeny’ 2
WHEN ‘eeny’ 3
WHEN ‘moe’ 4
END, ColumnThree
SELECT ColumnOne, ColumnTwo, ColumnThree FROM Table
ORDER BY
CASE ColumnTwo
WHEN ‘miny’ 1
WHEN ‘meeny’ 2
WHEN ‘eeny’ 3
WHEN ‘moe’ 4
END, ColumnThree
INSERT INTO dbo.Destination
(
FieldOne
,FieldTwo
,FieldThree
,FieldFour
,FieldFive
)
SELECT
FieldOne
,FieldTwo
,FieldThree
,FieldFour
,FieldFive
FROM dbo.Source
After attempting to use the CSS3 Pie method for achieving some CSS3 support in IE browsers I’ve unfortunately come to the conclusion that it is still far too buggy for any kind of use other than for testing or demonstrations. It has a pretty significant issue with the way that IE8 and lower hand page zooming in that any background image that you have will remain at it’s fixed size and simply tile.
Continue reading →
I noticed a subtle but nice feature on the Google News main page recently. The left-hand navigation that has the various section headings remains fixed to the top left area as you scroll down but it does not overlap the top banner area. Also, if your browser window is too small to fit the entire navigation vertically, when you mouseover the navigation area a set of vertical scroll bars appears. After a little digging it turns out they did this with a combination of CSS and JavaScript. Here’s a simple demo I’ve set up that illustrates how I believe they achieved the effect.
This snippet of code uses the .filter() function within jQuery to find all “li” elements that contain just the text “findthis”.
$('li:contains("findthis")').filter(function() {
return $(this).text() == "findthis";
}).addClass('active');
Ever wanted to skip right to just the double left quote in the default Windows Character Map? Well, turns out you can. Just click the “Advanced view” check box in the bottom left of the Character Map window.
Continue reading →
I recently ran across this Internet Explorer CSS3 workaround that uses a HTC file to solve the majority of my CSS3 woes when it comes to developing cross-browser layouts. Rounded corners, drop shadows, gradients, rgba, multiple backgrounds and even PNG transparency support are all solved with a simple (mostly simple) bit of CSS and the HTC file they’ve developed.
Continue reading →
Recently a client wanted to have a user agreement added to an enrollment form. The catch was that I needed to confirm that the user had at least scrolled through the text before allowing them to continue on with the form submission. Once again, jQuery to the rescue!
Continue reading →
Ran across this great little web-app that can convert your exported Blogger XML files to WordPress-friendly files.
http://blogger2wordpress.appspot.com/
A collection of the most common methods for performing 301 redirects:
Continue reading →