Live Chat Programs

March 22, 2008

App.config Examples

Filed under: Live Chat software

Also see: Generics and .NET

Below are three examples of useful application configuration files.

  1. Forces the v1.0 CLR to be run. If the v1.0 CLR is not installed, the app will fail to run.

    <?xml version =”1.0″?>
     <configuration>
        <startup>
             <requiredRuntime version=”v1.0.3705″/>
             <supportedRuntime version=”v1.0.3705″/>
         </startup>
     </configuration>

  2. Redirects “assemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=25283151a234958d“ to version 2.0.0.0 of that assembly. This is only useful for strongly-named assemblies, since versions don’t matter for those that are simply-named.

    <?xml version =”1.0″?>
    <configuration>
    <runtime>

            <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>

                    <dependentAssembly>
                            <assemblyIdentity name=”assemblyName” culture=”" publicKeyToken=”25283151a234958d”/>
                            <bindingRedirect oldVersion=”1.0.0.0″ newVersion=”2.0.0.0″/>

    (more…)

Finally, the Killer App

Filed under: Live Chat software

Also see: Scott Guthrie presents at NDDNUG

If you’ve yet to be sold on the Internet, grab a seat and your favorite pointing device. My good man Ryan sent me a link to what is undoubtedly the Internet’s Killer App: The Beer Mapping Project

Chicago’s map is a bit limited — my neighborhood alone has over 450 bars — so get on it. It takes a village, comrades.

God Bless America!

http://weblogs.asp.net/jkey/archive/2006/01/18/435889.aspx

The NCAA and the Hoosiers

Filed under: Live Chat software

Also see: Resizing a Form has always been a pain in the rectum…

Ok, so I was pissed to see Coach Sampson bought out. I completely understand that the rules are the rules and he violated them. I can’t even argue that the punishment doesn’t fit the crime. Coach Sampson appears to be a repeat offender. What I have a problem with is the NCAA and this situation is emblematic of exactly what is wrong with the organization.

The NCAA is an organization that supposedly prides itself on making sure that athletes are students and attend college with the intent to be students. What the NCAA fails to understand, IMHO, is that often students attend college with a specific goal or dream in mind. It may be to graduate and become an accountant, a musician, an artist, a teacher and any number of other professions. Every student who goes to school, post high school is given every opportunity and encouraged to maximize their effort and optimize their resources to achieve their goals. Unless of course they happen to attend a school that is a member of the NCAA and their goal is to be a professional athlete. In those cases, the NCAA does everything it can to make sure that the athlete is not a typical or traditional student.

For these student athletes, rather than doing every thing possible to excel in their chosen field, they face rules and restrictions that are exceeded in quantity and complexity only by the US Tax Code.

One summer I visited Indiana and there were some players working out and playing on the Assembly Hall court. After watching a few minutes, I walked in the h (more…)

Playing Multiple Simultaneous Sounds in WPF

Filed under: Live Chat software

Also see: LearnExpression.com is live.

WPF’s MediaElement makes simple media playback pretty straightforward, but moving beyond the simple scenarios can sometimes raise surprising challenges. For example, I recently saw someone tripped up by the MediaElement when attempting to play several sounds concurrently.

As you’ll see, one solution would have been to use MediaPlayer instead of MediaElement. The difference between these WPF classes is fairly straightforward. MediaPlayer is the class that knows how to play media files – both video and audio. MediaElement is a wrapper around MediaPlayer that provides a simple way to connect it into a visual tree (i.e. a user interface), which in turn lets us hook it into things like the animation system or event triggers.

(Note: do not be misled by the class name. Although WPF and Windows Media Player depend on the same infrastructure for media decoding, the MediaPlayer class is not a wrapper around the Windows Media Player control. While they share codecs, the path by which decoded video gets onto the screen in WPF is significantly different from Windows Media Player.)

How would that get you into trouble when using MediaElement? If it’s a wrapper around MediaPlayer, surely you could use a MediaElement any place a MediaPlayer would work? In fact it’s not always that simple. To see why, we’ll start with a simple example.

One MediaElement

(more…)

DevWeek 2008 Cross Platform Silverlight Demos

Filed under: Live Chat software

Also see: Important changes to the BASE element for IE 7

Also see: From C# to Java: Part 5

Also see: Alexbarn Leaves Microsoft…ARGH!

I just finished the Cross Platform.NET on Silverlight talk at DevWeek. Demos can be downloaded from http://www.interact-sw.co.uk/downloads/DevWeek2008XPlatDemos.zip

I’m all done at DevWeek for this year. But if you want to hear more about Silverlight, I’ll be teaching Pluralsight’s Applied Silverlight course in London later this month - running from 31st March. (And the following week I’ll be teaching our Applied WPF course, also in London.)


http://www.interact-sw.co.uk/iangblog/2008/03/12/devweek-xplat-demos

Parallels adds “Express Windows Installation”

Filed under: Live Chat software

Also see: VPC 2007 Dual Monitor support

I just ran across this over on parallels site:

http://parallelsvirtualization.blogspot.com/2006/11/installing-windows-on-mac-is-now.html

This sounds like a great feature for their virtualization product. Parallels for OSX is a top notch virtualization product and they just keep on adding features.


http://weblogs.asp.net/dfindley/archive/2006/11/02/Parallels-adds-_2200_Express-Windows-Installation_2200_.aspx

C# 3.0 Lambdas and Type Inference

Filed under: Live Chat software

Also see: Be my Support Group

Daniel Cazzulino recently wrote a blog entry whose main focus was on building pipelines using iterators in C#. Towards the end he showed a slightly irritating problem in C# 3.0. He wanted to write this:

var transformer = x => new { Original = x, Normalized = x.ToLower() };

However, the C# compiler complains because it doesn’t have enough information to infer the type of the transformer variable. The problem it reports is “Cannot assign lambda expression to an implicitly-typed local variable”.

Daniel doesn’t present a working solution to this particular problem – he ends up structuring his program differently to avoid the issue entirely. But in his discussion of this problem, he proposes something that he describes as ugly, and which, as he points out, doesn’t work anyway:

Func<string, {string Original, string Normalized}> transformer =
 x => new { Original = x, Normalized = x.ToLower() };

This is a direct approach to the problem described in the compiler error message. Can’t assign the expression to an implicitly-typed variable? OK, let’s make the variable explicitly typed. Unfortunately, you can’t specify the type because the expression involves an anonymous type. And that’s the thing about anonymous types: they don’t have names.

(more…)

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com