BobStrogg

Stories submitted by BobStrogg

SQL Server XQuery with LINQ To SQL(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 10 months, 28 days ago

LINQ To SQL doesn’t provide a way to include Xquery expressions in queries. The simplest solution is to create SQL user-defined functions that perform the Xquery for you and return scalar results. This works pretty well for small databases, but you lose the benefit of SQL Server’s XML indexes. To get around that, we can modify the SQL command text to expand the function calls into raw Xquery expressions. read more...

add a comment |category: |Views: 117

tags: another

Modifying LINQ To SQL command text(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 11 months ago

Here’s a bit of code that’ll let you modify any command text LINQ To SQL generates before it hits the database. It’s always been possible to call DataContext.GetCommand and use modified SQL in a call to DataContext.Translate or DataContext.ExecuteQuery, but that’s pretty restrictive in the complexity of query you can use. Also, if LINQ To SQL decides it needs to batch multiple SELECT statements for the desired results, GetCommand can only give you the first one. The first thing to do is replace the IProvider implementation used by your DataContext. Unfortunately, DataContext’s Provider property is both private and read-only. Also, the IProvider interface itself is private. This is bad in every way, and we absolutely shouldn’t try to hack our way through that… but we will. read more...

add a comment |category: |Views: 39

tags: another

A Real WPF 4.0 WebBrowser(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 4 months ago

Finally updated the WPF Chromium WebBrowser for .NET 4.0 and Awesomium 1.6 RC1. Source code available on CodePlex! read more...

add a comment |category: |Views: 381

tags: another

WPF Photo Print updated(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 5 months ago

I've added basic “Save” functionality to my WPF Photo Print utility. It’s exceptionally quirky, but it gets the job done. read more...

add a comment |category: |Views: 8

tags: another

JelloPhone for Windows Phone 7(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 6 months ago

I’ve finally put source code for my Windows Phone 7 Soft-Body Physics demo on CodePlex! As a bonus it runs much faster with the current emulator. read more...

add a comment |category: |Views: 8

tags: another

Amazon S3 bucket deletion(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 6 months ago

A simple LINQPad script to delete every item from an Amazon S3 bucket. read more...

add a comment |category: |Views: 5

tags: another

NullableDictionary(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 6 months ago

Here’s an alternative to .NET’s generic Dictionary that allows a null value as a key… It’s one of those things you’ll rarely (never?) need, but when you do you might be glad of it read more...

add a comment |category: |Views: 12

tags: another

MVC IsAuthorized and AuthorizedActionLink revisited(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 6 months ago

An MVC HTML helper method that renders a link, taking the current authorization state into account (only rendering the link if the user was authorized to hit it). read more...

add a comment |category: |Views: 26

tags: another

WPF Chromium WebBrowser updates(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 6 months ago

I’ve updated the WPF Chromium WebBrowser to use the current Awesomium beta version (1.6) and .NET 4.0. It’s still a preview, but you can find the source here on CodePlex. Here are the known issues/problems: 1) Resizing the WebBrowser causes the content to flicker. This appears to be an Awesomium issue, but it needs more investigation (pending support request on Awesomium forum). 2) There is an artifact left behind when scrolling a page; this is a known bug in Awesomium and will be fixed by Awesomium RC1. read more...

add a comment |category: |Views: 40

tags: another

LINQ Query Translator(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 9 months ago

I’ve published a small project called Linq Mapper that translates simple LINQ queries between different data sources. It allows you to write queries against your domain model, but have them run against a different model (typically a data model like LINQ to SQL or Entity Framework). read more...

add a comment |category: |Views: 14

tags: another

Soft-Body Physics for Windows Phone 7(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 1 year, 10 months ago

This took me literally 5 minutes to port… I love my iPhone, but WinPhone7 has one heck of a sweet developer experience :) read more...

add a comment |category: |Views: 39

tags: another

WPF WebBrowser now with Awesomium 1.5(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 2 years ago

I’ve updated my managed Awesomium library (Cjc.AwesomiumWrapper) for the newly released Awesomium v1.5. The WPF Chromium WebBrowser and YouCube 3 (3D WPF WebBrowser) demos have also been updated, along with their source on CodePlex :) read more...

add a comment |category: |Views: 97

tags: another

Interactive Fiction + Linux + Silverlight(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 2 years, 3 months ago

Moonlight 2 beta 7 (at time of writing) is getting really close to working with SilverGlulxe / SilverFyre! The only issue right now is none of the story text appears… ;) (could just be a simple font issue). FYI one of the cool things about SilverGlulxe is its handy “Transcript” option (link at bottom of game). It gives you a transcript of the story so far (including your commands) and lets you send a copy (including XML source) by email. Apparently it’s very useful for story debugging [if you’re an Interactive Fiction writer]. read more...

add a comment |category: |Views: 3

tags: another

Silverlight VisualBrush and rounded corners(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 2 years, 4 months ago

As you know Silverlight 3 doesn’t support VisualBrush, which can make things like this pretty tricky. Here’s my attempt at a workaround It’s a control called VisualImage which can be pointed at any element and exposes it as a WriteableBitmap. You could bind an Image to this to create a reflection effect, or use it to apply clipped, rounded corners to anything! read more...

add a comment |category: |Views: 116

tags: another

YouCube 3.0 (3D Chromium WebBrowser) - Source Code(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 2 years, 5 months ago

Source code for YouCube 3.0 (WPF 3D Chromium-based WebBrowser) is now on CodePlex. See related Chromium WebBrowser source (http://wpfchromium.codeplex.com/) for Awesomium wrapper source. read more...

add a comment |category: |Views: 52

tags: another

YouCube 3.0 - WPF 3D Chromium Browser(chriscavanagh.wordpress.com)

submitted by BobStroggBobStrogg(998) 2 years, 5 months ago

There’s an updated version of YouCube (WPF 3D Web Browser) available based on my Awesomium / Chromium WPF control. read more...

1 comment |category: |Views: 653

tags: another