Keyboard Face
msgbartop
when you find QWERTY imprinted on your cheek – it’s time to go to bed.
msgbarbottom

05 Aug 09 CSS: Default Padding/Margin for a p element

Resetting your css styles is a good thing to do to ensure that your site is rendered the same on all browsers.

Unfortunately, this often wipes out the default p tag padding and margin. The following style will restore a p to it’s normal margin (it doesn’t have a padding).

Each browser styles the p tag differently, thus this restores it to what it would look like in Firefox, creating a uniform look. Exactly what we’re going for.
p{
margin: 1em 0px;
}

Source

Here’s a link on how to use CSS Style Resets correctly:
Resetting Yoru Styles with CSS Reset

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

Tags:

30 Jul 09 Automatically Log Off Disconnected RDP Users

It’s tempting and easy to just close Remote Desktop Sessions rather than log off. Unfortunately, this can cause problems where only one or two sessions are allowed to be open at a time.

If you’re Windows license only allows 1 open connection, it can be easy to leave your own session connected and then bar entry again in the future.

Cameron over at Sumo Consulting posted the steps to automatically log off RDP users when they close their windows rather than properly logging them off.

I set mine to log them off 10 minutes after they close the window.

Here are his instructions:

  1. On the server, go to "Start > Programs > Administrative Tools > teminal Services Configuration"
  2. Select "Connections", then right click on RDP-Tcp and select Properties
  3. Select the Sessions tab and Check the "Override user settings" checkbox.
  4. Choose the criteria under which you’d like to start killing off sessions.
Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

Tags: ,

20 Jul 09 Awesome Comic on XKCD today

Author of the Windows Copy Dialog Visits Some Friends

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

07 Jul 09 IE5 and IE6 CSS Hacks

Wow! That was annoying. As most know, IE5 and IE6 both tend to misinterpret standard CSS forcing us to resort to hacks designed to make them comply and display correctly.

I just recently found two very useful resources when it comes to making div tags float and pad correctly:

First explains and gives a fix for the odd fact that IE5 and IE6 will double the left margin of an element that has a float:left in it.

The fix is awesomely simple. You just set display:inline;.

http://www.positioniseverything.net/explorer/doubled-margin.html

The other explains gives a fix for the fact that IE5 and IE6 treat padding differently. Per CSS specifications, padding should add to the overall width. So, if you have a 100px div tag with 20px padding on all sides, it should be 140px wide.

The previous versions of IE keep the width exactly and simply pad inward rather than outward. All fine and dandy, except all other browsers don’t.

This is a bit more complicated, here’s the overall hack:
div.content {
width:400px;
voice-family: "\"}\"";
voice-family:inherit;
width:300px;
}
/* CSS1 UAs should see and use 2nd width */

html>body .content { width:300px }

http://tantek.com/CSS/Examples/boxmodelhack.html

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

Tags:

21 Apr 09 MSSQL: Joining another server in a select statment

I’ve often wondered if I could have a select statement that retrieved data from two databases at a time. I just got a SQL Server tip in the mail this morning that walks you through the steps. It’s awesome! Does everything and more. The keyword is OPENROWSET.

Here’s the link:
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1353663_mem1,00.html

Example from above article:
SELECT e1.EmployeeID, e2.FirstName, e2.LastName, e1.JobTitle
FROM OPENROWSET(
'SQLNCLI',
'Server=SqlSrv1;Trusted_Connection=yes;',
'SELECT EmployeeID, FirstName, LastName, JobTitle
FROM AdventureWorks.HumanResources.vEmployee'
) AS e1
INNER JOIN OPENROWSET(
'Microsoft.Jet.OLEDB.4.0',
'C:\Data\Employees.mdb'; 'admin';' ',
'SELECT EmployeeID, FirstName, LastName, JobTitle
FROM Employees'
) AS e2
ON e1.EmployeeID = e2.EmployeeID
ORDER BY e2.LastName, e2.FirstName

Here’s the MSDN link on OPENROWSET.
http://msdn.microsoft.com/en-us/library/ms190312.aspx

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

Tags:

17 Mar 09 Installing PHP on IIS

I just recently needed to install PHP on my development machine, which has Vista Home Premium on it. I downloaded the installer version of PHP5 from the website and ran it. It killed my IIS process and didn’t hook up to PHP extensions. Every 5 minutes, I’d get a IIS process stopped working message.

After searching the net for a good tutorial on how to install PHP on Vista, I found the following from an engineer at Microsoft. It worked like a charm:

http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx

You’ll need to download the zip version of php, not the installer, here:
http://www.php.net/downloads.php

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

25 Feb 09 Invalid access to memory location. PHP Windows

Just finished debugging a persistent error with a PHP5 install on Windows 2003. Kept saying:
“Invalid access to memory location.”

Finally figured out that it means that there is a file or folder referenced in the php.ini that doesn’t exist. To fix, simply search “c:\” and find the uncommented line with the wrong path.

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

22 Feb 09 Calendar Sync with the IPhone for Google Apps for Domains

Google just released a new feature – iPhone sync for Google Calendar! That was the first thing I tried to do when I got my iPhone. I ended up using a workaround through NeuvaSync.com. It worked perfectly and thus I was a little hesitant to try the official version out. The little banner at the top of my Google Calendar homepage, finally got to me though:

I had to try it out.

I went through all of the steps, but it the instructions didn’t work! It appeared that it worked perfectly for regular google calendar owners, but when you used Google Apps for Domains it didn’t work.

It took several hours of searching to finally figure out what was going on. The Mobile Sync wasn’t enabled in my Google Apps account. But also, I didn’t even have the ability to enable it! Here are the steps that I had to take to get Calendar Sync working for my Google Apps for Domains account:

1. Go to Domain Settings at the top:

2. All the way at the bottom, make sure that your control panel has Next Generation selected.

3. Now, go over to Service Settings on the top right. You’ll now have a “Mobile” option. This wasn’t there for me until I selected “Next Generation” in the control panel section.

4. Enable the Sync and you’re off. The original instructions link should now work perfectly!
http://www.google.com/mobile/apple/sync.html

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

17 Feb 09 Verify Email Address

Sometimes you just want to test an email address to see if it’s valid, but you don’t actually want to send them an email.

Instead of sending an email with the subject of “Just testing”, it’s a simple programming task to check the validity of the address. You can check the syntax, if the domain name is valid and if the receiving mail server will accept mail for the address.

I did a search today and found several websites. One was broken, but this one worked perfectly:

http://verify-email.org/

Do you have any other good ones that should be mentioned?

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb

28 Jan 09 Testing Your CSS and HTML accross multiple browsers

It’s very important to test your code on multiple browsers. Your audience could have any of them and you want your site to look the best no matter what, even if they have an ancient computer.

I’ve found several very good resources out there that have excellent free options.

CrossBrowserTesting.com

I love this site. It actually gives you a remote desktop session with the OS and the browsers that you need to test.
NOTE: They used to have a free option, but it is gone now. Lowest cost is $19.95 for one month subscription.

BrowserShots.org

Enter your URL and it returns screen shots of your site in over 80 browser and OS combinations. It even gives you the option of downloading them all as a zip file. Extremely handy!

Lastly, if your site is running into problems with older versions of IE, there is no easy way to install previous versions of IE on top of a more current version.

Tredo Soft has a program you can install called Multiple IE’s. It lets you do just what you couldn’t. Install previous versions of IE and test them on your computer. No more waiting for browser sessions on CrossBrowserTesting.com just to test IE! Here is the link:

http://tredosoft.com/Multiple_IE

If you’re using Vista, Multiple IE’s won’t work, however. You may need to use My DebugBar’s IE Tester:
http://www.my-debugbar.com/wiki/IETester/HomePage

Best,
Tom

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb