Friday, November 2, 2012

Fitting Big Files (over 4GB) On A Fat32 Thumb Drive

Recently I made a back up of a VirtualBox VM drive clone for the intention of moving the drive to another machine.  The VM drive was using a variable sized hard drive with a cap at 200GB.  The clone was only 52GB so far.  I had a spare 64GB thumb drive, so I figured that would be the best way to move it since the target computer was not on the same network as the source computer.  I wanted to compress this folder and them copy it to the thumb drive to speed the copy process.  So I used WinRAR.  It took an hour and a half to zip that 52GB folder to a 19GB ".rar" file.  I then plugged in my trusty thumb drive and attempted to copy the file.  To my horror, I got the dreaded message, "The file 'Ubuntu 10.04 Clone.rar' is too big for the destination file system." ...  What?!  But I have 64GB available!

Long story short.  The thumb drive was formatted using FAT32 (as opposed to NTFS), which is an "older" Windows file system that does not allow for files greater than 4GB.  WinRAR is now my best friend.  I then needed to re-compress the 52BG folder, but this time set "Split to Volumes, size" as "4,095 MB (FAT32)".  What WinRAR does is creates a set of files that are broken up by the file limit you set.  The last file is usually smaller.  So now I ended up with 5 files all 4GB each except the last one was 2GB.  And copying them to the thumb drive worked great.

In order to decompress these files, you need them all together, and right click one of them, usually the first file.  Select Extract to... and select the details.

Problem solved!

Monday, December 5, 2011

Determine WHEN and WHAT FILE was LAST Used to RESTORE a SQL SERVER Database

Sometimes you've restored a database from a production copy or whatever, and you move on to a different project.  Time goes by, and someone needs to run something on that database, but they need to know if the database has already been restored from a recent copy of production...  How do you find out when the last time a database was restored and what file was used to restore it?

This little script has been a HUGE time saver.  I use this script to determine if I need to have our IT group backup and download a copy of a production database.  If the database I'm looking at was recently refreshed from production already, I don't need them to waste that kind of time.  That can save us up to literally 24 hours in wasted time in some cases.

To run this, copy and paste this code into SQL Server Management Studio 2005 or greater (I think this works with SQL 2000 as well with Query Analyzer).  Don't forget to make sure you have the database selected in the dropdown list for which you want to find out this information:

DECLARE @backup_finish_date DATETIME
DECLARE @source_database_name VARCHAR(100)
DECLARE @restore_date DATETIME
DECLARE @backup_file_used_for_restore VARCHAR(500)

SELECT TOP 1 @restore_date = [rs].[restore_date],
             @backup_finish_date = [bs].[backup_finish_date],
             @source_database_name = [bs].[database_name],
             @backup_file_used_for_restore = [bmf].[physical_device_name]
FROM   msdb..restorehistory rs
       INNER JOIN msdb..backupset bs
         ON [rs].[backup_set_id] = [bs].[backup_set_id]
       INNER JOIN msdb..backupmediafamily bmf
         ON [bs].[media_set_id] = [bmf].[media_set_id]
WHERE  [rs].[destination_database_name] = Db_name()
ORDER  BY [rs].[restore_date] DESC

PRINT @@SERVERNAME + ' : ' + Db_name()

PRINT 'was restored on: ' + Isnull(CAST(@restore_date AS VARCHAR), 'No Date')

PRINT 'from a backup of database: ' + Isnull(@source_database_name, 'No Name')

PRINT 'taken on: ' + Isnull(CAST(@backup_finish_date AS VARCHAR), 'No Date')

PRINT 'in file: ' + Isnull(@backup_file_used_for_restore, 'No Name')  


The results will typically look like this:

CCGTESTDB\SQL2005 : stIowaProd
was restored on: Dec  5 2011  1:15PM
from a backup of database: db_CNPProd
taken on: Nov  8 2011  1:49PM
in file: E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Iowa\db_CNPProd_201111081349\db_CNPProd_201111081349.bak


How do you determine this information?  Any better solution, please comment.

Saturday, December 3, 2011

5 All-Time Greatest Toys


The holidays come every year, and we stress over toys and gifts.  But some toys will always be the best...  follow to see the 5 all-time greatest toys ever.

Sunday, November 6, 2011

Windows Phone 7.1 SDK Error


I need your help! "GetCopyToOutputDirectoryContentProjectItems"

I went to a Microsoft Code Camp a few days ago and got all pumped up about the Windows Phone 7.1 release (Mango) SDK.  They handed it out to us. I installed it.  I have tried building many default projects but to no avail, I'm getting the following error:

The target "GetCopyToOutputDirectoryContentProjectItems" does not exist in the project.
WHAT DOES THIS MEAN???? I'm going to lose all my hair from this error.

I'm using the release candidate (not the beta 2, at least I don't think it is...) that was given to us at the Mango Code Camp here in AZ a few days ago.  I tried to uninstall, re-boot, re-install, re-boot.  And all combinations of the same.  Nothing is working.  There is something else I found strange:  Part of the install cannot install the XNA Game Studio plugin and some other XNA item.  I don't have the XNA Game Studio installed.  I' not sure if it the Windows Phone 7.1 SDK tris to install XNA GS or not, but I tried to manually install it and I' getting an error with that as well.  I think that it had to do with the live installer.  I uninstalled it too and tried to install again.  Still same error.  It seems like the project is fine (since this happens on ALL my Windows Phone Projects including one I've tried to target the 7.0 Windows Mobile.  Something seems like it's missing but I cannot figure it out. I'd be happy to send any log files if needed.

FYI, The 3 guys at MS that were there at the phone camp had never seen this error and didn't have any idea what to do other than re-install and re-boot.  No help.  PLEASE HELP!!!  Any other ideas?  Thanks!

Note:  I also uninstalled the Silverlight 4 SDK and even installed the Silverlight 5 SDK once it still did not work and both tries still did nothing to help resolve this.

Friday, February 11, 2011

Facebook and Android API Documentation

I recently integrated Facebook access into one of my android apps (My Missionary). It was the worst pain in the backside! Why, you ask? Because the documentation is not accurate. Documentation directly from Facebook! Its terrible. The only way I figured it out was through scouring the web all night long. And I mean all night. Then, I even had to modify some of the Facebook code (the library you can download from FB) in order to make it work! Oh well. I learned. I'll post my findings here so you don't have to waste a night of sleep...

Wednesday, April 21, 2010

EasyStar Flight cam 1.mov

A friend of mine (names are changed to protect the innocent) just purchased a camera for his radio controlled airplane. He took some footage of it and posted it. Check it out. It's a pretty good camera for a little plane.

Thursday, March 25, 2010

SSE with SIMD for Particle Systems in Realtime

Intel has released a new library that can be included in your game/program that is designed to use multiple cores and threads. Checkout the video to see how this library will help. I have not dove into the architecture of the library, but you can download the source code and the binaries to include in your project. Happy threading!