/* BeejBlog */

Using SourceGear DiffMerge as the Difference/Merge viewer in SourceSafe 2005

Paul Roub’s blog entry

Visual SourceSafe 2005 is located on the Visual Studio 2005 installation media… and yes it does work with Visual Studio 2008 (which does not include it on the installation media).

SQL Split AWK Script

Split the output from SQL Server Management Studio (SSMS) > View > Object Explorer Details > “Script {function|view|procedure} as” into individual files
Note: The current RegEx’s are tailored around the following scripting options (see comments to change):
  • “Include descriptive headers” = true  (this is the default after SSMS 2008 install) – located under:  SSMS > Tools > Options > SQL Server Object Explorer > Scripting > General scripting options)
  • “Schema qualify object names” =  false (NOT the default) - under: … > Object scripting options
Download GAWK.exe for Windows: link1, link2
# example: gawk -f sqlsplit.awk file-to-split.sql

BEGIN {
  outfile = "erase_me.sql" #start off with a dummy file to get the ball rolling
  IGNORECASE = 1
}

END {
  #close off last file
  print "grant "grant" on "arr[1]" to public\ngo\n" >>outfile
  close(outfile)
}

/\/***** Object:/ {
  #upon matcing the "object" comment, close off the previous output file
  print "grant "grant" on "arr[1]" to public\ngo\n" >>outfile
  close(outfile)

  #start up the new one
  match($0, /\[(.*)\]/, arr) #change to something like /\[dbo\]\.\[(.*)\]/ if you want “Schema qualify object names” enabled
  outfile = arr[1]".sql"
  print "--$Author:$\n--$Date:$\n--$Modtime:$\n--$History:$\n" > outfile
}

/^(create) +(proc|function|view)/ {

  grant = "execute"
  if ($2 == "view") grant = "select"

  printf "if not exists(select 1 from sysobjects where name = '"arr[1]"')\n\texec('create "$2" "arr[1] >>outfile

  # function is a little trickier because it could be a table or scalar return type requiring slightly different create function signature
  if ($2 == "function") {
 
    lines = ""
    while((getline line) >0) {
      lines = lines line"\n"
      match(line, /returns/, a)
      if (a[0] != "returns") { continue }

      #debug: printf "line = %s, a[0] = %s, a[1] = %s, a[2] = %s, a[3] = %s\n", line, a[0], a[1], a[2], a[3]

      match(line, /table/, a)
      if (a[0] == "table") {
        grant = "select"
        print "() returns table as return select 1 as one')" >>outfile }
      else print "() returns int begin return 0 end')" >>outfile
      break

    }
  }

  #proc/view
  else {
    print " as select 1 as one')" >>outfile
  }

  print "GO" >>outfile

  sub(/create/, "alter") #change the create to alter
  sub(/$/, lines) #tack back on the lines "eaten" to figure out whether function was tabular or scalar
}


{ 
  print  >>outfile
}

Unprotect MS Word Document

  • Here’s the gist – fire up Word, open your file, then select Tools > Macro > “Microsoft Script Editor”, you’ll get an HTML view, search for “UnprotectPassword” and change it to all zero’s – voila!
  • I had to un-check IE > Tools > Internet Options > Advanced > Disable Script Debugging (other) to get the MSE menu item in MS Word enabled.
  • MSE exe location on my system (Office 2003) -  C:\Program Files\Microsoft Office\OFFICE11\MSE7.exe

Media Players

Popcorn Hour boxes - ($200 – $350)

One of the most popular right now… especially Euro/Asian markets… very much a kitchen sink of features

imageimageimage

Patriot (memory company) - “Box Office” ($100)

image image

Iomega – Sreenplay line (<$100 for Iomega ScreenPlay TV Link Director Edition w/o drive)

ScreenPlay TV Link Director Edition Director HD

Seagate – FreeAgent Theater+, GoFlex TV ($120 range)

image image

Mede8er

image

  • $159 for hard drive less model

ASUS – O!Play Air (HDP-R3) (Best One Yet!?)

212208941  212208941_007 212208941_005 m7RevEHHZoGGWUUg_500

  • $130 Street
  • great to see eSATA! finally as well as typical USB
  • WiFi-N built in
  • cardreader slots
  • haven’t found a good review of it yet but 2 folks on Buy.com liked the non air version

 

(Update: 5 Jan 2010) LaCie - LaCinema Rugged HD

LaCinema_Rugged_HD_Top_Angle_Remote LaCinema_Rugged_HD_Back_Bezel

  • Loving the looks of that enclosure!  Nice job there Neil!
  • $175 street seems reasonable including 500GB drive
  • This review uses words like “frustrating” :\

(Update: 5 Jan 2010) Western Digital – WD TV Live (WDBAAN0000NBK)

wdfWDTV_Live

  • Western Digital’s latest lineup has added a “Live” model with network connectivity for $120 street
  • as well as a lower end “Mini” model for $60 street

 

Western Digital – WD TV (WDAVN00BN)
mainimage
Highlights:

  • $100 street
  • HDMI & Component
  • only 4” x 4” x 1.6”, 0.67 lbs
  • carry case doesn’t come with but looks pretty slick

IOGear (GMD2025U120)

Highlights:
  • $120 street w/120GB drive
  • HD is definitely upgradeable (2.5”)
  • “only” component and composite, no HDMI


Cirago (CMC1000)
image image
Highlights:

GPS Receivers

Garmin GPS Models

Here’s the main page for the receiver only products (so called “OEM”)

10x (BlueTooth) - this is the one Andrew and I have

  • I finally got it to work well with my WinXP BlueTooth stack by turning off “AUTO CONNECT” checkbox buried under the BlueTooth virtual serial port properties
  • Andrew has always said it works well with his HP WinCE based hand held
  • Runs on a rechargeable battery so you do have to tether it (with included USB cable) every once in a while to recharge
  • Garmin also included the cigarette lighter power adapter in my package… Pretty sure I wound up with two of these due to a screwed up initial shipment so I have a spare in case you don’t wind up with one… cigarette lighter to mini-usb is kindof a handy thingy to have in general these days… would charge other USB power based stuff like MP3 players etc.
  • $107 retail
  • Garmin GPS 10x Receiver for mobile devices
  • The annoying thing is I managed to find an actual Garmin.com link where it was posted as $50… BUT I DIDN’T SAVE THE DANG LINK <ARG!>
  • Cheapest new street price I’ve seen is around $80 (from reputable vendors like TheNerds.net, etc)
  • eBay has a refurb for $50 at the moment

I still wonder if USB might be slightly easier to deal with than waiting for BlueTooth to connect, especially if you’re primarily using in a static environment like a car and it avoids the rechargeable battery dance so here’s a couple of those…

20x (USB)

  • $70 retail
  • this seems to be the one Garmin “recommends” for their PC oriented mapping products

18x (USB)

  • $85 retail
  • says it’s magnetic to hold onto your dash or something

Mapping Software

Maps