Repair Microsoft SAPI

0 comments
I was able to repair the microsoft SAPI text to speech engine (TTS). Save the following Powershell code to a folder alongside "extract.exe" which is a tool to extract CAB files. Change the $source_folder to the folder containing your i386 directory (mine's on my C drive).

Code:

$source_folder = "c:\i386\"
$working_inf = "sapi5.inf"

$source_inf = $working_inf.trimend('f') + "_"
$working_folder = ".\working\"
$dependency_folder = ".\working\i386\"

.\extract /y $source_folder$source_inf /l $working_folder

$files_to_extract = type $working_folder$working_inf | where {$_ -match "^[\d\w]*\.[\d\w]{3}$"}

foreach($current_file in $files_to_extract)
{
$source_file = $current_file.substring(0, $current_file.length-1) + "_"
.\extract /y $source_folder$source_file /l $dependency_folder
}


The script will extract the inf file which you can use to repair. It will also scan that inf file for dependencies and extract those. Once it completes - find the sapi5.inf and right click and select "install".

Good luck!

And the Winner Is!

0 comments
Stripe size of 128K and Allocation Unit Size of 32K.

Raid Performance Results

0 comments
Performance results being compiled...

RAID5 Performance Issues

0 comments
I'm running out of disk space on my home media server and therefore decided to upgrade to a RAID5 configuration with 4x1.5TB drives. The drives are Seagate ST31500341AS and I'm housing them in an 8-bay ESATA case Rosewill RSV-S8 (SII-3132 chipset).

The problem is that I'm seeing low write speeds in Vista. It is software based RAID however CPU utilization is low so I believe there's room for improvement. I'll be tweaking the raid chunk size (stripe size) and NTFS allocation unit size this weekend to see where the sweet spot is for read/writes of large media files.

I just wrote the following powershell script to test the read and write speeds. All I need to do is change the file_name, test_folder and control_folder variables and I'm set.

#$erroractionpreference = "SilentlyContinue"
$file_name = "test.avi"
$test_folder = "L:\"
$control_folder = "K:\"
$num_attempts = 3
$total_write_time = 0
$total_read_time = 0

#writes
for($i = 0; $i -lt $num_attempts; $i++)
{
$source = "$control_folder$file_name"
$destination = "$test_folder"

$remove = "$destination$file_name"
remove-item $remove

$total_write_time += $(measure-command{xcopy.exe $source $destination /y}).totalmilliseconds
echo $("write test " + ($i+1).tostring() + " complete.")
}

#reads
for($i = 0; $i -lt $num_attempts; $i++)
{
$source = "$test_folder$file_name"
$destination = "$control_folder"

$remove = "$destination$file_name"
remove-item $remove

$total_read_time += $(measure-command{xcopy.exe $source $destination /y}).totalmilliseconds
echo $("read test " + ($i+1).tostring() + " complete.")
}

$average = $($total_write_time / $num_attempts / 1000)
echo "Average write time: $average seconds"

$average = $($total_read_time / $num_attempts / 1000)
echo "Average read time: $average seconds"

Vista Computer Awakens Immediately After Entering Sleep Mode

0 comments
I spent a few hours last night toiling with Microsoft's software (yet again) - trying to get my new home media center server to better use it's power saving capabilities.

My task was to enable S3+S4 otherwise known as "hybrid" sleep/standby mode working on the system and usable from my Keyspan RF media center remote. This remote has a power button on it that is supposed to allow me to put the machine in and out of sleep mode.

Within Vista I enabled hybrid mode. I also enable S3 sleep mode on the mother BIOS. What I noticed was that if I use the power button on the machine - the machine would enter into sleep mode properly. If I used the remote - the machine would enter into sleep mode and then immediately turn back on. I then verified that the remote receiver was properly enable to "Allow this device to bring the computer out of standby". Still no luck... I then downloaded and configured the cool tool "MCE Standby Tool". Still no luck.

Microsoft KB article KB927821 seemed promising but no luck. Right at the point I was about to give up I found the cause.

What was happening was that during S3 standby the motherboard drops power to USB. Vista is configured to allow this USB device to awaken the machine and therefore interprets the power-down event as such an event and awakens the machine immediately after entering standby. There was a jumper on the motherboard that I flipped to allow the USB ports to be powered during standby. Enabling this resolved the issue and I'm now able to enter and exit standby from my RF remote.

Spell Checking for Web Pages in Firefox

0 comments
I'm a web developer and was hunting for a Firefox add-on that would allow me to spell check an entire web page. Firefox has the built in ability to spell-check form fields however I wanted to check the entire page.

Apparently Firefox has this ability built in! Just create a book mark with the following location and navigate to the bookmark on the page you want to check:

javascript:void(document.designMode=%22on%22);

US Halts Applications For Solar Energy Projects

0 comments
Apparently my idea's of building large solar parks in unused areas of the US is already in action and swamping the BLM.

Check out this link for more info:

http://rss.slashdot.org/~r/Slashdot/slashdot/~3/321400439/article.pl

Here's another idea. Do you know what a solar tower is? One of the complexities with these guys is that they require a height distance which increases the temperature gradient and hence the efficiency. Australia has proposed building one and the initial plan was that this would be tallest man-made structure in the world. My idea is this: build the solar tower next to a large mountain with a high to 100% incline that is perpindicular to the sun. You get half of the usable space to heat the air at the bottom but you can augment this with mirrors and objects that trap solar heat (such as shredded waste tires). Your build costs would be substantially cheaper because you can support the tower against the mountain (cheaper materials).

I live in Carson City and drive through Washoe Valley a lot. This area gets quite windy and often flips full tractor trailers on to their sides. Lets harness that power!

Obama to Pay Clinton's Debt?

0 comments
I think that would cause a few disgruntled democrats that may want to close their purse strings going forward... If this was an issue for her she should have quit when the not so subtle hints were being made ten million dollars ago.

ASP.NET Error Resolution

0 comments
Man I love how Microsoft makes me spend needless hours fixing weird oddities. My latest one was the following WinXP error:

The site [site] has not been configured for use with ASP.NET 2.0. Microsoft Visual Studio has been designed for use with ASP.NET 2.0. If not configured some features may make incorrect assumptions, and pages designed with the tool may not render correctly. - Would you like the site to be configured now?


A Google search returned some hits but nothing worked. I finally resolved the issue by using the following set of commands (within the Framework\2.0.xxx directory):

aspnet_regiis -ua
aspnet_regiis -i

If that fails - make sure the Default Site is configured for ASP.NET and run through the permissions wizard. Note, the above commands probably kills .NET 1.1.

Take care!

The Middle Class Continues the Decline

0 comments
About 6 months ago I predicted 2008's inflation at about 6.5% compared to the 4.2% from the prior year. I'm starting to wonder if I need to upgrade that target to something higher...

I woke this morning to hear that Dow Chemical is increasing prices by about 25%. This is a big company that (whether you know it or not) plays a central role in your style of life.

Link:
Dow Chemical raising prices by another 25 percent

Gabe's Deal of the Day

0 comments
Buy.com is selling a pretty well equiped laptop for $479.00 with free shipping. Reviews appear favorable.

A "Thank you!" to the United States Supreme Court

6 comments
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.


There is no doubt that the United States is in a war. Our war is not against a nation or regime but against an activity called terrorism. This is a new type of war that requires change in the way we fight and the way we make peace. We will lose lives during this war but we must remember that hostility breeds more hostility our best defense is to stick with our highest ideals because we will win by making friends, not beating enemies.

Our leadership has opened up several detention camps to house "enemy combatants" caught during our war. Whats unfortunate about this is the aura of secrecy surrounding the people in these camps. The camps are usually on foreign soil, the circumstances of capture are classified and the government process for detaining enemies is not clear to the average American citizen.

I wanted to take the time to applaud the Supreme Court for making a difficult decision. The decision was in favor of yielding the detainees the rights we take for granted as U.S. citizens.

There are arguments that these people were caught on foreign soil and therefore should not have the same rights as a U.S. citizen. I disagree, that very same argument was made for the slaves traded by the early American colonies. The argument was wrong and the higher ideals won out, yielding to us a stronger country because of it.

Poor Man's File Synchronization using PowerShell

0 comments
I developed the following Powershell function to help me synchronize code on my new servers:

function SynchronizeFolder([string]$source, [string]$destination, $recurse, $exclusions)
{
   if($source.tostring().endswith("\") -ne $true){$source = "$source\"}
   if($destination.tostring().endswith("\") -ne $true){$destination = "$destination\"}

   # Variables
   $child_items
   $destination_file
   $destination_folder
   $result

   # Folder exists?
   if((test-path $destination) -eq $false){$result = md $destination}

   # Build child items
   if($recurse)
   {
      $child_items = get-childitem $source -recurse
   }
   else
   {
      $child_items = get-childitem $source
   }

   foreach($child_item in $child_items)
   {
      $destination_file = $destination + $child_item.fullname.substring((get-item $source).fullname.length)      
      $destination_folder = $destination_file
      if($child_item.psiscontainer -eq $false){$destination_folder = $destination_folder.substring(0, $destination_folder.lastindexof("\")) + "\"}   

      if($child_item.psiscontainer -eq $true)
      {
         #folder
         if((test-path $destination_folder) -eq $false)
         {
            $result = md $destination_folder
            echo $destination_folder
         }
      }
      else
      {
         #file
         if((test-path $destination_file) -eq $true)
         {
             #exists
            if($child_item.lastwritetime -ne (get-item $destination_file).lastwritetime -or $child_item.length -ne (get-item $destination_file).length)
            {
               if($child_item.fullname -match $exclusions -eq $false)
               {
                  copy $child_item.fullname $destination_folder
                  echo $destination_file
               }
            }
         }
         else
         {
            #new
            if($child_item.fullname -match $exclusions -eq $false)
            {
               copy $child_item.fullname $destination_folder
               echo $destination_file
            }
         }      
      }
   }
}

Using Powershell to Find Unused Images on my Site

2 comments
I developed the following Powershell code to help me isolate images in my website's "images" folder that were not being used by the site code:

$image_folder_mask = ".\website\images\*"
$source_file_mask = ".\website\*.aspx",".\website\*.cs",".\website\*.ascx",".\website\*.master",".\website\styles\*.css"

$image_list = new-object system.collections.arraylist
$image_list.addrange(@(get-item -path $image_folder_mask -include "*.png","*.gif","*.jpg" | select name))

foreach($file in get-item $source_file_mask)
{
   foreach($text in $(get-content $file.fullname))
   {
      #echo $text

      if($text -match "[a-z0-9_]+\.png|[a-z0-9_]+\.gif|[a-z0-9_]+\.jpg")
      {
         foreach($current_match in $matches)
         {
            $searcher = $current_match[0]

            for($i = 0; $i -lt $image_list.count; $i++)
            {
               $searchee = $image_list[$i]

               if($searchee.name.trim() -eq $searcher.trim())
               {
                  $image_list.removeat($i)
               }
            }
         }
      }
   }
}

echo $image_list

Google Earth - Go to Disney World now!

0 comments
OK this is just plain cool!

If I had money to invest...

0 comments
Since these ideas are of no use without the means I'm going to list them here for your perusal. Here's my list of investments based on my intuition about our world's future.

1) Purchasing large tracks of land in remote areas (think BLM auctions).

The reason for this is that the world is coming to terms with our problem of peak oil (aka Hubbert's peak) and that it will eventually be hard to dig a hole and pull up cheap energy. This is something I learned about 3 years ago during my own research and I have to admit that it made me scared... But upon 3 years of contemplation I have come to realize that we have PLENTY of energy. Now I'm not a scientist but I believe that our two primary sources of energy on this planet are solar (byproducts include wind, hydro, bio, petroleum, sea currents, etc etc) and nuclear (nuclear plants and geothermal). In either scenario land will be needed to harvest this energy. To make this work, however, you'd eventually need grey/sea water piping to the site.

2) Aluminum mining operations

Steel has been our ally and friend since the industrial revolution but our new economy will require us to make better use of our energy and steel is just plain heavy. Aluminum (the 13th most common element in the universe) is the likely alternative.

3) Runabouts

I scoff at people driving 4-6,000 lb trucks alone to get to work or the grocery store. This is just plain wasteful and disrespectful of humanity and our environment. Companies with ideas to make fuel efficient 1-2 person vehicles will boom very soon (think 3 wheeled vehicles with light engines/transmissions within/near the tire-well).

Gabe's Deal of the Day

0 comments
Buy.com is selling a recertified 24" lcd monitor for $279.99 shipped.

One reviewer complains of a high frequency "hum".

Recommended Google Videos

0 comments
Conquering the Spirit of Debt
Ring of Power Pt 1
Ring of Power Pt 2
The Money Masters

Quote of the Day

1 comments
"If I allowed my honest opinions to appear in one issue of my paper, before twenty-four hours my occupation would be gone. The business of journalists is to destroy the truth; to pervert; to vilify; to fawn at the feet of mammon, and to sell this country and this race for their daily bread. We are the tools and vessels for rich men behind the scenes. We are the jumping jacks, they pull the strings and we dance. Our talents, our possibilities and our lives are all the property of other men. We are intellectual prostitutes."

The Movie Gattaca - Hidden Meanings

6 comments
I was browsing the Amazon Unbox service today and noticed the Gattaca movie rental was only 99 cents. This is one of my favorite movies because it provokes thought, has many hidden messages and a strong theme.

Since I own it I decided to watch it again and also spell out some of the hidden meanings I've so far seen in this movie.

If you haven't watched this movie, please read no further to not spoil the fun!



  1. GATTACA - Odd name right? Guanine Adenine Thymine Thymine Adenine Cytosine Adenine
  2. Notable quote: "Consider God's handiwork; who can straighten what He hath made crooked?"
  3. Notable quote: "I not only think that we will tamper with Mother Nature. I think Mother wants us to."
  4. Notice the bold letters during the opening credits.
  5. Notice there are four strong notes to this beautiful soundtrack.
  6. When the movie starts out - Vincent is in a furnace/shower and at the end - Jerome is in that very same furnace/shower - this is beautiful symmetry people!!!
  7. Notice how robotic the "valids" look when walking in the Gattaca building.
  8. The in-movie director of Gattaca strongly believes in Vincent's right to explore the moon Titan. Underpinning the flaws in that society.
  9. The doctor "Omar" mentions his son early in the movie, later we find that his son is an invalid. The doctor has always known.
  10. Irene states: "If you're going to pretend you don't care - don't look up.". She has the same flaws.
  11. Mother says after the delivery "I know you'll do something. You'll do something."
  12. During the geneticist scene there are four eggs.
  13. During the second swim scene, Anton says - "you know you're gonna lose". But Vincent doesn't lose - why? This is the point Vincent understands he has little to nothing to lose and he decides to not lose no matter if it costs him his life but when Anton nearly drowns he comes to the realization that he still had a chance.
  14. Vincent, in being a janitor at Gattaca, makes a good first step in achieving his goal. A key to being a successful is to surround yourself in the environment you wish to be in. A foot in the door so to speak.
  15. Vincent's states "thats an old edition, but I know it all by heart" and Vincent, himself, is an old edition but with a possibly flawed heart.
  16. Notice Jerome's stair-case, does that design look somewhat familiar?
  17. Jerome is right-handed while Vincent is left-handed. Again - great symmetry,
  18. Jerome was usually second best though he had a superior genetic profile. Underpinning the flaws in that society.
  19. Jerome decides to use his middle name as an alias "Eugene".
  20. Irene tests Vincent's hair follicle finding him a "9.3". But is surprisingly unhappy about her suspicions being true.
  21. During the investigation, the older investigator is wiser and more experienced but is an invalid and reports to the younger Anton.
  22. During the treadmill scene, Vincent has a heart attack but manages to walk away unseen.
  23. Jerome's last name is "Marrow", another body part
  24. Irene has an "unacceptable likelihood of heart-failure". Again more symmetry.
  25. At the jazz hall Irene plays with her insecurity about her heart problem, Vincent truly understands her but she doesn't see how that could be the case.
  26. The night with Irene against the sea is just beautiful. I personally feel that Irene understands what Vincent is after the jazz hall scene. And the night with Irene is very similar to the scene in which he was conceived. Makes you wonder huh?
  27. Vincent makes the statement "The investigators are coming by, I'm supposed to be sick" and Jerome responds "So you keep telling me".
  28. During the last swim, Vincent understands that he will likely die but sees no alternative but to give it everything he has.
  29. The best quote of the entire movie "I never saved anything for the swim back."
  30. Another great quote "I got the better end of the deal. I only lent you my body - you lent me your dream."
  31. The final scene with Omar is just great, Omar knows what is about to happen and tells Vincent the story about his son who wants to apply at Gattaca.
  32. The rocket flown into space has multiple window portals, very similar to space-ship-one.

Run Powershell PS1 From Shell

0 comments
I wanted to run Powershell scripts (PS1) files from the shell much like batch files. After searching the web I couldn't find any info on how to do this. Therefore I spent a few minutes and created a registry modification that adds an "Execute" option to the right click menu allowing one to run a PS1 file from the shell without having to create a shortcut.

I've only tested this on Windows XP. Modifying the registry can be dangerous and the following disclaimer applies: This posting is provided "AS IS" with no warranties, and confers no rights.

To install - save the following text to a .reg file on your computer and execute.

------------------------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1]
"EditFlags"=dword:00030000
"BrowserFlags"=dword:00000008
@=""

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\DefaultIcon]
@="C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\powershell.exe,0"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell]
@="Execute"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\Execute]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\Execute\command]
@="C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\powershell.exe -noexit &\"'%1'\""

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\Execute\ddeexec]

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\Execute\ddeexec\Application]
@="powershell"

[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\shell\Execute\ddeexec\Topic]
@="System"
------------------------

Hey Toshiba and Microsoft, I want to give you my business!

0 comments
There's a lot of talk lately on the format war between Blu-ray and HD DVD. Lately many news sources are starting to call HD DVD as the loser. I personally hope that this is not the case because it opens up an opportunity to provide more value for the buck to the customer.

I personally own a PS3 which has a Blu-ray drive however I have yet to watch a Blu-ray movie. Watching high definitions movies is not of value to me. What I am interested in is a cheap writable media for backing up my computer files. After a quick view of newegg.com - the only format that fits this bill is Blu-ray but the costs are too high.

Toshiba and Microsoft: Give me an inexpensive burner and I'll give you my money!