# Sunday, January 24, 2010

One of my friends wrote an excellent article on Wireframing with Fisher Price.  The idea is that you can use a child's toy (similar to an Etch A Sketch) to wireframe effectively.  I believe the most important theme he captured was:

No detail – It’s very hard or nearly impossible to put any type of detail into these drawings. In some parts of design, detail is very important, but in wireframing, detail can be the downfall of the process.

Sunday, January 24, 2010 8:46:19 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I've found serversniff.net to have quite a few domain tools, including traceroute and SSL certificate inspection.

Sunday, January 24, 2010 8:41:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I've found this page very handy when it comes to writing LINQ queries.

Sunday, January 24, 2010 8:38:09 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

From this site:

select @@VERSION

exec sp_server_info

SELECT SERVERPROPERTY('ProductLevel')

  No SP
(RTM or Golden)
SP1 SP2 SP3 / SP3a SP4 SP5 SP5a
SQL Server 6.0 6.00.121 6.00.124 6.00.139 6.00.151       
SQL Server 6.5
(Hydra)
6.50.201 6.50.213 6.50.240 6.50.258 6.50.281 6.50.415 6.50.416 
SQL Server 7.0
(Sphinx)
7.00.623 7.00.699 7.00.842  7.00.961 7.00.1063    
SQL Server 2000
(Shiloh)
8.00.194 8.00.384 8.00.534 8.00.760 8.00.2039    
SQL Server 2005
(Yukon)
9.00.1399.06            

Sunday, January 24, 2010 8:34:23 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Ever need to automatically send a tweet?

Tweet#

Sunday, January 24, 2010 8:27:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Solution 1:

Select Table_name as "Table Without PK"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and
Objectproperty (Object_id(Table_name), 'TableHasPrimaryKey') = 0 and
Objectproperty (Object_id(Table_name), 'IsUserTable') = 1

Solution 2:

Select [name] as "Table Without PK"
from SysObjects where xtype='U' and
id not in
(
Select parent_obj from SysObjects where xtype='PK'
)

Sunday, January 24, 2010 8:24:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

It threw me for a loop when a Cisco CallManager version of a SQL server was on an abnormal port (not 1433).  It took me a while to find it, but if you want to connect to a non-standard TCP/IP port from SQL Management Studio, simply connect to the hostname then a comma with the port number.

Example:  MySqlServer.MyDomain.com,3821

I stole this information from here.

Sunday, January 24, 2010 4:49:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I used to run Trillian from my USB drive under U3.  Then I got a laptop with a built-in SD card reader, so I wanted to run all my apps without having a USB drive sticking out the side of the computer.  As far as I know, you can't get a U3 SD card (wouldn't make sense at all).  Also, there is not a "portable" version of Trillian other than U3.  I found a way to use the U3 version of Trillian as a truly portable application.

Trillian U3 on a standard USB drive

Instructions copied here for convenience sake:

First you will need access to a U3 drive.

  1. Download and install Trillian for U3 on to the U3 Drive.
  2. Copy the U3P file from the system\apps folder to a temporary location.
        i.e. U:\System\Apps\58EA136C-7E57-4416-B59E-394C46DD505B\Trillian-v3.11-b1028.u3p
  3. Rename the u3p file you just copied to a zip file. i.e. Trillian-v3.11-b1028.zip
  4. You can now uninstall Trillian from the U3 drive if you wish.
  5. Extract the zip file.
  6. Copy the Data\Users folder to the Host folder
  7. Delete the Data folder, delete the Exec folder, delete the manifest folder
    Optional: Rename the host folder to Trillian
  8. Copy to your usb drive
  9. Run Trillian

 

Sunday, January 24, 2010 4:46:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Have you ever needed to get the output of a program into an environment variable so another program can read it?  It's really easy to do in a Linux shell, but how about in DOS?  I've found this program to be invalueable:

XSET

Sunday, January 24, 2010 4:41:31 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

The best way to restart a Windows machine from C# code:

restart computer using c# code

admin | band-aid | code
Sunday, January 24, 2010 4:37:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I can't possibly say enough about mRemote.  This is definitely one I can't live without:

mRemote

This project merged with a commercial application which I'm sure is excellent as well, but the last "free" version (1.50) works just fine for me.

Sunday, January 24, 2010 4:24:08 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Ever wonder which services your Exchange server is exposing?  Check out the Exchange Remote Connectivity Analyzer.

Sunday, January 24, 2010 4:20:14 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I don't really set up database servers that often, but every time I do, I struggle to remember how to set up email functionality.  In SQL 2000 it was "SQL Mail".  In SQL 2005, it's "Database Mail".

Here's a good howto on how to set up SQL 2005 Database Mail.

Sunday, January 24, 2010 4:17:38 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I was running Dovecot on a Linux (Ubuntu) virtual machine as a place where I could store emails I'd like to keep (and be sure I had a backup copy of them).  The host was Windows and VMWare Server 1.x.  I tried everything I could think of, but nothing ever completely made the error go away other than reducing the load on the server.

Dovecot Time Moved Backwards Error

Same hardware, Linux base OS, VMWare Server 2.x.  Haven't seen the problem since.

Sunday, January 24, 2010 4:14:30 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Use the open source equivalent:

Clonezilla

Sunday, January 24, 2010 4:03:01 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Tired of using TortoiseSVN from Windows in conjunction with Visual Studio?  Integrate the two:

AnkhSVN

Sunday, January 24, 2010 4:00:35 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I wanted to had an application I was developing alert our systems administrator to events like being unable to contact a database.  I usually use a class that catches an exception and emails it out, but what happens when the problem is with the SMTP server?  I landed on using SysLog and having the alert pushed over to the actual monitoring server. 

This is very down-and-dirty code (creates the connection and packet directly instead of calling a SysLog library), but it worked like a charm for what I needed it to do.

A Low-Overhead SysLog Message Sender Class

Sunday, January 24, 2010 3:56:51 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I've used X10 for years to control the accent lights on my house.  I received an el-cheapo Firecracker controller as part of a start-up X10 pack almost ten years ago now and have been enjoying using it since.  I never used any big, fancy X10 software that you have to purchase, I always used the freely available things you find on sites like SourceForge.

Recently I swapped from using a Windows based home server (and mscm17a) to Linux.  I had no idea of which X10 tools I would need, but I had faith that the open source community behind Linux would provide.

They delivered well.

I am now using HEYU, a rough equivalent to the program I was using previously under Windows.  Just substitute cron for scheduled tasks and you're up and running.

And for the awesome part - I had always wanted to write a program that would set my accent lights to come on around sunset and go off when I normally turn in for the night.  Turning them off at a certain time was easy, it was the sunset part that was the trick, especially since that could vary from 4-8pm on any given night.  I've seen several places to get tables of this information, but no code that really let you calculate based on your lat/long when the sun would actually set.

Enter X10 Ephem.

Ephem checks your specially commented cron entries and modifies their schedule based on the parameters you set.  Call it once a day and all of your tasks will shift up and down relative to sunrise/sunset as you designate.

Put HEYU and X10 Ephem together with my X10 Firecracker and I now have what I believe is the perfect system for controlling my accent lights.

Sunday, January 24, 2010 3:40:04 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Thursday, July 30, 2009

My Windows Update kept wanting me to install KB971092 for VS 2k8 over and over again.  After a few minutes of Googling, I found the work-around.  It sounds like the installer was checking for C++ to be installed and I didn't have it, but it was trying to update it anyway.

https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=478117

Thursday, July 30, 2009 7:18:16 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Wednesday, May 27, 2009

I needed a thumbnail of a PDF for a web site.  The trick is the PDF updated daily and I didn't want to have to re-create the JPG every day.  This problem was solved in two pieces:

  1. Ghostscript - A single command rasterized the PDF into a JPG.
  2. ImageMagick - A single command (with two sub-commands in it) cropped the JPG and resized it at my output thumbnail size.

I scheduled this conversion after the PDF had been built (using MSSQL Server Agent) and the process was 100% automated to run every day.

Wednesday, May 27, 2009 10:41:05 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Friday, May 22, 2009

This is an interesting article about moving large data sets into Amazon S3:

http://www.allthingsdistributed.com/2009/05/amazon_import_export.html

Friday, May 22, 2009 12:55:12 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Monday, May 18, 2009

How do you transfer logins from one SQL server to another:

http://support.microsoft.com/kb/246133/

 

How do you fix orphaned SQL server users:

http://www.fileformat.info/tip/microsoft/sql_orphan_user.htm

Monday, May 18, 2009 12:20:21 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Ever been annoyed that your LINQ connection string isn't stored in the web.config file?  Here's how to fix that:

http://blog.newguid.net/post/Linq-to-Sql-Change-connectionstring-to-load-from-Webconfig.aspx

To me, this is almost a necessity to make applications deployable between environments.

Monday, May 18, 2009 11:42:49 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

If you're like me, you're always getting the first few rows of data from a table as you browse around a database in Query Analyzer.  Of course now, the SQL Management Studio does this for you, but just in case you're using MySQL or Oracle, here are the equivalent commands:

http://dotnet.org.za/thea/archive/2005/02/22/14715.aspx

Monday, May 18, 2009 11:40:01 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Ever wondered how to bulk script data for a database?  This would be really handy for default table data during an install, or to copy a database you only have user level access to.  Enter sp_generate_inserts:

http://vyaskn.tripod.com/code.htm

Monday, May 18, 2009 11:35:34 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

This is pretty handy for getting rid of red eyes in pictures:

http://graphicssoft.about.com/od/photoshop/qt/redeyeaction.htm

Monday, May 18, 2009 11:32:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

If you need to make a normal program a Windows service, you can use sc.exe to get the entry inserted into the services list:

http://support.microsoft.com/kb/251192

Monday, May 18, 2009 11:29:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I was reading up on using PAE (Physical Address Extension) to address more than the 4GB limit of memory on 32-bit systems.  This works like a charm on Windows Server 2003 Enterprise, but unfortunately, doesn't work at all on Windows XP:

http://www.microsoft.com/whdc/system/platform/server/PAE/PAEdrv.mspx

This is very sad to me since I have 4GB of RAM and a discrete graphics card that has 512MB of memory.  The top 1GB comes off of my system RAM since the system needs to fit the video card into the 4GB total address space.

I'm really wishing for a 64-bit version of XP/Vista right now, but my best bet might be to wait for Windows 7.  That is a discussion for another day.

Monday, May 18, 2009 11:26:43 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I found the answer here:  http://johnnynine.com/blog/HowToListThisIndexesOnAnOracleTable.aspx

Script:

select index_name, column_name, column_position from user_ind_columns
where table_name='MYTABLENAME' order by index_name, column_position

Monday, May 18, 2009 8:17:17 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Tuesday, May 05, 2009

If you work with Cisco equipment at all, or if you have a general thirst for knowledge on networking topics in general, check out the Cisco Hands-On Training Podcast.  Also on iTunes.

Tuesday, May 05, 2009 9:30:18 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

I saw an article on Lifehacker back in the day that suggested Just One Club Card.

Recently, I was researching Yowza and noticed that there was an app in the iTunes app store called WalletZero.

Both of these let you re-create your club cards digitally.  Just One Club Card lets you re-print it on a single piece of paper you can just put in your wallet.  WalletZero lets you display them on your iPhone/iPod Touch.  I have yet to use WalletZero at the store, but from the reviews, it sounds like it works well.

Tuesday, May 05, 2009 7:22:35 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Do you have an Apple LaserWriter 16/600 PS and want to use it in Windows Vista?  The drivers no longer come with Windows, so any instructions you might have used on Windows XP have changed.  Here is what I did to get the LaserWriter working under Vista:

1) Enter the "Add Printer" diaglog.

2) Select "Add a local printer":

3) Create a new "Standard TCP/IP Port":

4) Give it the IP/hostname of your printer.  Do not query the printer automatically.

5) Select "Generic Network Card":

6) Since the Apple LaserWriter 16/600 PS driver doesn't show up under Vista like it did under XP, select something similar.  I've had good luck with the "HP LaserJet III PostScript Cartridge v52.2":

7) Give the printer a name:

8) Do not print a test page.  You're not done yet:

9) Right-click on the newly created printer and select "Properties".  Go to the "Ports" tab.  Select the port you just created a few moments ago and press "Configure Port":

10) Make sure to select "LPR", make the queue name "lp", and enable "LPR Byte Counting":

You're done.  "OK" out of all of this and give it a try.  You can still print the generic test page from the "General" tab of the printer properties screen.

Tuesday, May 05, 2009 7:00:14 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Monday, May 04, 2009

Since my last fiasco trying to install Windows XP on a Lenovo ThinkPad W500, here are the instructions on exactly how to do it, including setting the AHCI controller to compatability mode:

http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-70665

Monday, May 04, 2009 10:09:08 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

Back in the command line shell days, I had a program called "unbase64".  I think this is about as close as I can get under Windows:

http://www.funduc.com/otsoft.htm#decodeshellextension

This comes in handy when the printer at work decides a scan is too large and splits it across two emails to me.  I have to manually append the two attachments, but I can run it through this extension to get the real attachment back.



UPDATE: This does not work with Windows 7 :(
Monday, May 04, 2009 9:59:36 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 

This is pretty much the reverse of what I was trying to do previously with my SD card, but if you ever needed to format a large drive FAT32, here's your program:

http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm

Monday, May 04, 2009 9:57:03 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   | 
# Thursday, April 23, 2009

The other day I needed to write an ISO image I downloaded to a CD.  I was using one of my older DVD-R drives on a freshly installed system.  I did not have the CD full of proprietary programs that would write to that specific drive.  None of my other programs would work since they all came with different drives and the software was keyed for those drives.  I found this program through a Google search:

http://isorecorder.alexfeinman.com/isorecorder.htm

Once installed, I could right-click on an ISO file and write it to a blank without a problem.

Thursday, April 23, 2009 8:07:50 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |   |