Go to content Go to navigation Go to search

Brokenwire.NET::M

PhotoSynth
· 2008-08-22 12:16 by Thijs Kroesbergen for Brokenwire.NET

I've been waiting a long time for this to be released to the public. I've seen demos of this almost two years ago. A not so long time ago SeaDragon was released under the name of "DeepZoom" and now we can enjoy PhotoSynth.

What is Photosynth?
Imagine being able to share the places and things you love using the cinematic quality of a movie, the control of a video game, and the mind-blowing detail of the real world. With nothing more than a bunch of photos, Photosynth creates an amazing new experience.

I used a tool named FlickrDown to grab a collection of pictures from Flickr.com and then put them through PhotoSynth. The result is amazing!

 

How does it work?
Photosynth is a potent mixture of two independent breakthroughs: the ability to reconstruct the scene or object from a bunch of flat photographs, and the technology to bring that experience to virtually anyone over the Internet.
Using techniques from the field of computer vision, Photosynth examines images for similarities to each other and uses that information to estimate the shape of the subject and the vantage point the photos were taken from. With this information, we recreate the space and use it as a canvas to display and navigate through the photos.
Providing that experience requires viewing a LOT of data though—much more than you generally get at any one time by surfing someone’s photo album on the web. That’s where our Seadragon™ technology comes in: delivering just the pixels you need, exactly when you need them. It allows you to browse through dozens of 5, 10, or 100(!) megapixel photos effortlessly, without fiddling with a bunch of thumbnails and waiting around for everything to load.

In plain simple English: It looks at the pictures, finds the similarities and places the pictures in a 3d environment.

Cool!

Tip:
Post your cool Synths in the comments!

Permalink -

SQL Server 2008 - RTM
· 2008-08-06 20:06 by Thijs Kroesbergen for Brokenwire.NET

Another cool product I’ve been looking forward to has been released into the wild today: SQL Server 2008 .
It is available from the MSDN subscriber site right now! Dig in, enjoy!

Now we can finally use C# as a scripting language for SSIS packages. Besides that there are a lot more exciting new features in SSIS .

Permalink -

SQL Server Service Broker: cleanup
· 2008-06-05 09:26 by Thijs Kroesbergen for Brokenwire.NET

Imagine that you've been playing with the SQL Server Service broker, and you've got thousands of conversations stuck in the queue. And then you discover that there is nothing like "truncate table" possible on the queue... You can cleanup each conversation in the queue with the "end conversation with cleanup" statement.

So, a bit of searching and this is the result:

WARNING: DO NOT USE THIS ON A PRODUCTION ENVIRONMENT: the messages in the queue are lost forever!

use [YOURDB] declare @handle uniqueidentifier declare conv cursor for select conversation_handle from sys.conversation_endpoints open conv fetch next from conv into @handle while @@FETCH_STATUS = 0 Begin END Conversation @handle with cleanup fetch next from conv into @handle End close conv deallocate conv

To see how many conversations there a left:

select count(*) from sys.transmission_queue

Have fun! (I know I did)
More about the Service Broker and ending conversations soon on this channel.

UPDATE:

The really really quick 'n dirty way:

ALTER DATABASE LogistiekeMeetpuntenAdministratie WITH NEW_BROKER

Permalink -

TFS BuildStore: Stopping and removing builds
· 2008-04-11 12:17 by Thijs Kroesbergen for Brokenwire.NET

Here is a quick tip on how to remove a build that got stuck in your Team Foundation Server build environment.

The scenario: You've started a build and someone else has decided that it's a good idea to shutdown the buildserver... (Hi Martijn!)
After that you're left with a started build in the TFS buildstore with a BuildStatus of "Compilation Started". The problem here is that this build will never finish (because the server was shutdown while building). As an additional bonus you'll have team explorer sorting this build to the top of the list as well, which is confusing. On top of that: the list of builds doesn't have a button to delete a build.

So we want to remove it. How? PowerShell!

I used my friend get-tfs, and added a line to the script for the BuildController object. The complete get-tfs function now looks like this:

function get-tfs ( [string] $serverName = $(Throw 'serverName is required') ) { # load the required dll [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Client") $propertiesToAdd = ( ('VCS', 'Microsoft.TeamFoundation.VersionControl.Client', 'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer'), ('WIT', 'Microsoft.TeamFoundation.WorkItemTracking.Client', 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore'), ('BS', 'Microsoft.TeamFoundation.Build.Common', 'Microsoft.TeamFoundation.Build.Proxy.BuildStore'), ('BC', 'Microsoft.TeamFoundation.Build.Common', 'Microsoft.TeamFoundation.Build.Proxy.BuildController'), ('CSS', 'Microsoft.TeamFoundation', 'Microsoft.TeamFoundation.Server.ICommonStructureService'), ('GSS', 'Microsoft.TeamFoundation', 'Microsoft.TeamFoundation.Server.IGroupSecurityService') ) # fetch the TFS instance, but add some useful properties to make life easier # Make sure to "promote" it to a psobject now to make later modification easier [psobject] $tfs = [Microsoft.TeamFoundation.Client.TeamFoundationServerFactory]::GetServer($serverName) foreach ($entry in $propertiesToAdd) { $scriptBlock = ' [System.Reflection.Assembly]::LoadWithPartialName("{0}") > $null $this.GetService([{1}]) ' -f $entry[1],$entry[2] $tfs | add-member scriptproperty $entry[0] $ExecutionContext.InvokeCommand.NewScriptBlock($scriptBlock) } return $tfs }

Next I had to figure out the BuildUri for the broken build. I used the following snippet to get all builds with a status of "Compilation Started" from the BuildStore:

$tfs = get-tfs http://tfs-server:8080 $tfs.BS.GetListOfBuilds("TeamProject", "DailyBuild") | where {$_.Buildstatus -eq "Compilation Started"}

Before running this, I made sure no other builds where running and to make sure you are going to delete the correct build you MUST double check the results here! Next I copied the BuildUri from the build that I wanted to stop & delete.

Then the following three lines of PowerShell made the magic happen:

$message = "" $tfs.BC.StopBuild("vstfs:///Build/Build/04102008_134057_94286", [ref] $message) $tfs.BC.DeleteBuild("vstfs:///Build/Build/04102008_134057_94286", [ref] $message)

If something goes wrong the $message variable will be filled with a helpful error message.

By combining the BuildStore and the BuildController objects it is also possible to write an automated build-cleanup mechanism using PowerShell. (TFS2008 has this functionality built-in, but version 2005 doesn't)
The pseudo code for this script would look like this:

Loop through ListOfBuilds WHERE BuildQuality equals "Rejected" (maybe another Quality?)
And for each build found:

Writing this in PowerShell should be easy now. And as usual: the actual implementation of this script is left as an exercise for my dear readers ;)

Let me know if you succeed (or fail, in that case we'll sort it out together).

Permalink -

Come work with me!
· 2008-04-05 20:33 by Thijs Kroesbergen for Brokenwire.NET

Let me ask you a few questions. Do you like:

If you said yes to on ore more of the above items, please stay where you are. You are probably happy with your job and we all know good things will happen if you wait long enough!

But... If you disagree with all of this, take a look at this opportunity I have for you! This might be the moment for you to decide that your career needs an upgrade! And even if you are satisfied with your current job, you can always take a look. (The grass is greener on this side... it is)

So, if you:

Then you're the one we are looking for! Click the blue banner to go to a form where you can leave your information. "Don't call us, we will call you!" :)
By clicking you can also see a lot more about the company and the people. (That site is written in Dutch... but that makes sense...)

No, that's not us on the picture, we are really cool :-)

If you want to see more, here is a list of weblogs maintained by some of my colleagues:

Dick Dijkstra
Jan Kieftenbeld
José Carballosa Coré
Leon Meijer
Mathieu Diepman
Paul Deen
Ruben D'Arco

And maybe we can welcome you in our "family" soon as well!

Remember, most of the (technical) stuff I write on this blog is just part of my every day life. I get to work with latest technologies and I have the opportunity to study (getting certified & visiting conferences (in Barcelona) is just part of that).

(Yes I know, this blog post is a shameless job offering. More tech stuff blog posts are being worked on, I promise! I Do! And if you're one of my colleagues and you want a link to your blog, send me an email and I'll fix it)

Permalink -

Get the OS version in C#
· 2008-04-02 11:42 by Thijs Kroesbergen for Brokenwire.NET

After I wrote about the new wave of operating systems written in C# I noticed an increase in traffic from people who are looking for something completely different.

They did type C#, Operating system and Version into their favorite search engine, and they found this site. But they didn't find an answer to their question.

So for all these people I now show you how to determine the OS version using C# (and the .NET framework).

The very short answer:

System.OperatingSystem osInfo
=
System.Environment.OSVersion;

By looking at osInfo.Version property and the table with version numbers on the Windows Wikipedia page you can determine the OS version.

Or with PowerShell (just because it's possible)

[System.Environment]::OsVersion

Now on to the more sophisticated version. If you want not only the major versions but also the details about the product types and even information about the edition (suite) the machine is running, then you can use some (more complicated) API's, like GetVersionEx.

First of all you need to understand how the OS version number scheme of Windows works. There is a great article about this subject written by Marius Bancila. In this article he explains how the version scheme is laid out. He also shows how to use C++ and the Platform SDK to get to the information we need.

But you wanted to use C# (or .NET in general), so I've also dug up an article on CodeProject which shows the C# code to get the operating system version. The article on CodeProject is not up-to-date (think Vista, server 2008) but by combining the two articles you can create the complete OS detection code. I leave this as an exercise for those of you who really need this...

Have fun!

Permalink -

Previous Next