Saturday, July 25, 2009
jQuery execution after image load
If you need to run JavaScript that's based on some attribute of a loaded image (e.g. height or width), use a callback with $(window).load() instead of $(document).ready().
Friday, June 5, 2009
Pure T-SQL (Geo) Distance Calculations
Awesome post by Joe Finsterwald (http://www.wtfdeveloper.com/Default2.aspx) shows how to implement geographical distance calculation functionality in pure T-SQL.
Monday, April 27, 2009
T-SQL Epoch Date Conversion
I needed a way to convert a BIGINT containing a date in SSE (seconds since epoch - 1/1/1970) format into a DATETIME. The following query does the trick:
SELECT DATEADD(DAY, CAST(sse_value AS BIGINT)/86400000, CAST('19700101' AS DATETIME))
Thanks to some guy named Steve Kass for pointing this out on DevelopmentNow.
SELECT DATEADD(DAY, CAST(sse_value AS BIGINT)/86400000, CAST('19700101' AS DATETIME))
Thanks to some guy named Steve Kass for pointing this out on DevelopmentNow.
Saturday, April 11, 2009
Safari color issues?
If you're experiencing color issues with your images in Safari, make sure that an embedded color profile was not saved with the image. Open the image in Photoshop; File --> Save As; uncheck Embed Color Profile; save image.
Wednesday, January 7, 2009
Another IE z-index bug workaround tip thingy
If you're having trouble getting z-indexes to work right in IE, the order of your style declarations in your css file might matter. Try putting the style code for the element you want to stack on top at the bottom of your css file and see if the problem persists.
Monday, December 29, 2008
Followup: IE6 PNG Alpha Transparency Fix
I, like many others, ran into the issue of <a> links not being click-able when they sit on top of an element upon which the alpha fix has been run.
A hint I got off of this site gave me the answer I was looking for: The element containing the filtered png must not have a position set, and the links within that element must have a position set.
Thursday, December 4, 2008
Vertically & Horizontally Centered <div>
Ran across this beautiful CSS example of a perfectly centered <div>:
#mydiv
{
position:absolute;
top: 50%;
left: 50%;
width:30em;
height:18em;
margin-top: -9em; /*set to a negative number 1/2 of your height*/
margin-left: -15em; /*set to a negative number 1/2 of your width*/
}
Subscribe to:
Posts (Atom)