Sort Select Results by Arbitrary Values

Posted on January 26, 2012 by Gabe

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 Select Query Results into Another Table

Posted on January 26, 2012 by Gabe

INSERT INTO dbo.Destination
(
FieldOne
,FieldTwo
,FieldThree
,FieldFour
,FieldFive
)
SELECT
FieldOne
,FieldTwo
,FieldThree
,FieldFour
,FieldFive
FROM dbo.Source

CSS3 Pie Headache

Update: CSS3 Pie still pretty rough

Posted on June 24, 2011 by Gabe

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 →

Posted in Browser Quirks, CSS, CSS3, HTML, IE
Google News Sidebar

Google News style floating sidebar

Posted on February 28, 2011 by Gabe

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.

Continue reading →

Using jQuery to find elements that contain a specific text string

Posted on February 23, 2011 by Gabe

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');

Windows Character Map Search

Posted on February 21, 2011 by Gabe

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 →

Posted in Software, Windows
CSS3 PIE + Internet Explorer = Win!

Use CSS3 PIE for enabling CSS3 in IE

Posted on February 12, 2011 by Gabe

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 →

Read the Agreement Validator

Posted on February 4, 2011 by Gabe

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 →

Converting Blogger-generated XML to WordPress

Posted on January 24, 2011 by Gabe

Ran across this great little web-app that can convert your exported Blogger XML files to WordPress-friendly files.

http://blogger2wordpress.appspot.com/

301 Redirection Codes

Posted on November 14, 2010 by Gabe

A collection of the most common methods for performing 301 redirects:
Continue reading →

← Older posts