OpenOfficespace.com

Companies that have unused office space can sublet it to individuals or other small group swho need an office but can’t afford the full deal.

It’s great for independent contractors who want to have an office outside of their house.

http://openofficespace.com attempts to make these arrangements (and other more standard office space) easy to list/find.  While it “kinda” worked for me, the implementation is really lacking.  Lots of the results that came back were not in the specified area radius and some that WERE were not shown until I modified my location.

People listing $0/month is also quite useless for people who don’t want to have to call the agent to find out that actual asking price.

But still, probably a useful resource.

Threaded Comments Database Schema

Interesting post on how to use a different schema strategy for nested comments that doesn’t involve a recursive hierarchy:

http://stackoverflow.com/questions/3763273/asp-net-threaded-comments

———————–

One approach I remember seeing somewhere was rather than using a Comment ID and a Parent ID , comments had a Comment ID and a “sort key” which was a concatenation of all the Comment IDs of their ancestors.

E.g. If comment 1 had two replies, comments 2 and 3, the sort keys would be:

1 : 0001
2 : 0001.0002
3 : 0001.0003

Then if someone replied to comment 2, it would be..

4 : 0001.0002.0004

So if you select all comments and sort by this sort key, they’ll fall out in the right order.

Then, to do the indenting, you simply look at the length of the sort key to see how many levels deep the comment is, and indent an appropriate amount.

Adding comments is easy: the sort key of the new comment is simply it’s parent’s sort key, with its own ID added on to the end.

———————–

Obviously you’d have to pad the ID values sufficiently.  In addition, if you wanted to just show comment 12345 and all children, you could just display the thread where code like ‘%00012345%’.

Repoint Access linked tables to different connection string

I’ve been looking for a way to do this for a project I’m working on.

The access app has linked tables that are on a SQL server, but it doesn’t use a DSN.  Instead the connection string is somewhere unknown to the user and so repointing it (like user server1 instead of server2, or db1 instead of db2) was a major pain point.

Finally I found some code that I can use to change it.  I changed some names, but you get the idea. 

Private Sub Detail_DblClick(ByVal Cancel As Integer)
     Dim db As Database, source As String, path As String
     Dim dbsource As String, i As Integer, j As Integer

     db = DBEngine.Workspaces(0).Databases(0)

     For i = 0 To db.TableDefs.count - 1
         If db.TableDefs(i).Connect <> " " Then
             If Right(db.TableDefs(i).Connect, 15) = "DbNameHere12345" Then
                 db.TableDefs(i).Connect = db.TableDefs(i).Connect & "Updated"
                 db.TableDefs(i).RefreshLink()
             End If

         End If
     Next
 End Sub

 

Beware of the Invisible Shield by ZAGG for Iphone

I just coughed up a rediculous amount of money for one of these screen protectors as I know the iphone 4 tends to scratch easily.

I’ve owned iphones going all the way back to the original 2G version and I’ve always used a screen protector on all of them.

I have never been so disappointed as with this piece of crap ZAGG product.

It looks terrible, it doesn’t go one smooth or easy AT ALL, and it’s texture is like rubbery so your finger doesn’t slide on it.

I’ve never had issues with screen protectors on any of my other phones (or my wife’s iphone as well) but this one is the absolute worst.  Garbage!

I hope you can avoid wasting your money like I just did.  Orders something online, there is no way there could be a worse product b/c I’ve used half a dozen others and none come close to being as crappy as this one.

UPDATE: I just tried installing the back protector and it was even worse than the front.

The way they have you apply the the cover is to lay it out using a larger area applicant strip.  You then peel away the large area thing and you are left with the protector in the right place.  Only problem is, the adhesive between the 2 is 100x stronger than the adhesive between the protector and your iphone.  In order to seperate the 2 you have to stretch out the protector and then you are left trying to apply it by hand.  What a total joke. 

Stay clear of this waste.

Telerik Radgrid Filtering Error

When trying to filter my RadGrid using the built in filtering options, I kept getting an exception on the server:

  Stack: System.ArgumentOutOfRangeException:
  Specified argument was out of the range of valid values.
  Parameter name: index
  at System.Web.UI.ControlCollection.get_Item(Int32 index)
  at Telerik.Web.UI.GridTemplateColumn.GetCurrentFilterValueFromControl(TableCell cell)
  at Telerik.Web.UI.GridColumn.RefreshCurrentFilterValue(GridFilteringItem filteringItem)
  at Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source)
  at Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e)
  at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
  at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
  at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
  at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e)
  at Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument)
  at Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
  at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Doing some research I found one guy who solved this problem by removing a duplicate UniqueName on his columns, but unfortunately I didn’t have any duplicates :(.

Turned out that the problem was I, in an effort to disable filtering for some columns that should have a filter option, had stumbled upon a quick solution, which was to use the following markup in my template column:

<FilterTemplate />

Instead of:

AllowFiltering="False"

Having the empty filter template seemed to do the trick visually, but it was causing the errors under the covers.

So if you are getting the error above make sure you are dealing with filters in your template columns correctly.