Archive | Programming

Capturing Photo from a MediaCapture Camera Stream metro app / Windows 8

I was having some difficulty with saving an image from a MediaCapture webcam stream to the local system for a in a metro app. Below is what I came up with, I hope it helps. 12345678910111213141516171819202122232425262728/// <summary> /// Gets a picture from a MediaCapture object and saves it to a local file.  Applies the image [...] [...more]

Programming Comments (0)

Visual Studio – Test List Not Updating

I have been frustrated at the fact that I must rebuild my sollution every time I want a new test method to appear in my test list. Refreshing did not work. I discovered that there is an option which disables the discovery of new test methods, and that in Visual Studio 2010 it is enabled [...] [...more]

Programming Comments (0)

Visual Studio 2010 – Cannot Start Test Project

I created a test project in Visual Studio with some unit tests in it, but was unable to run any of the tests. The test list was empty, and when I attempted to run it I got the following error: Cannot start test project so-and-so because the project does not contains any tests. Uggh I [...] [...more]

Programming Comments (0)

Load All Comments on Reddit

I recently wanted to perform a search through all the comments for a Reddit story. Rather than clicking on all the “Load more comments” links, I figured I would let JavaScript do it for me. If you try to click them all at once, Reddit tends to freeze. This method allows a one second pause [...] [...more]

Computers, Programming Comments (1)

Reading Google Chrome bookmarks with C# & .net

Google Chome stores bookmarks for a given user in JSON format. With Windows, this file (Called Bookmarks) can typically be found located inside C:\Users\[user]\AppData\Local\Google\Chrome\User Data\Default . The bookmarks system contains two roots, the ‘Bookmarks bar’ and ‘Other bookmarks’. Within these roots there can exist a (seemingly) infiniant amount of bookmarks and folders containing bookmarks. The [...] [...more]

Programming Comments (1)

Visual Studio & XAML – IntelliSense Not Working

I’ve been working with a lot of inherited XAML code lately with Visual Studio, and have noticed that IntelliSense was not working with many of the files. It worked for some, but not others. For the files that did not work, cleaning, rebuilding, and restarting did not fix the problem. In my particular case, somebody [...] [...more]

Programming Comments (3)

Update SharePoint List Item(s) with Powershell

Today I was attempting to update every item in a SharePoint list with Powershell, which turned out to be quite the adventure. Looping through the list and grabbing the items was easy, but whenever I modified the item and called the Update() method, it either did absolutely nothing or gave me an error: “Object reference [...] [...more]

Programming Comments (3)

Updating SharePoint Database with PowerShell

Recently I needed to enable/disable a database while doing a SharePoint deployment. There is no stsadm command and we had been using a small assembly that used C Sharp to connect to the web application, get the database, and toggle the ableness of it. This worked fine, but I wanted to do it all in [...] [...more]

Programming Comments (1)

Quick and Simple SilverLight Media Player from Expression Encoder

If you have used Expression Encoder, you have probably seen the XAP files that it comes with to play video files. The sample code they have to embed and play the files seem to be either non existent or too complex. Below is an example for MediaPlayerTemplate.xap with a Smooth Streaming video file. If you [...] [...more]

Computers, Programming Comments (0)

IIS, Silverlight cross site / domain requests

If you have a SilverLight application that is making requests to a site on IIS and have reached this page, it is likely you have not put into place a client access policy. IIS by default prevents requests from other domains to prevent cross-site scripting among other malicious things. Microsoft was not too creative when [...] [...more]

Programming Comments (0)

-->