Friday, November 23, 2007

Daily Links - 23/11/2007

What is the MVC noise all about, anyway?
Pt 1
Pt 2
Pt 3

New Compression Features in SQL Server 2008

Snippet Editor for Visual Studio 2005/2008

Linux install for newbies
"Linux distribution based on Ubuntu 7.10 that has lots of packages in its repositories (like multimedia codecs, Adobe Flash, Adobe Reader, Skype, Google Earth, etc.) that are relatively hard to install on other distributions"

Optimise SQL Server queries with these advanced tuning techniques

DLinq (Linq to SQL) Performance

Cruise Control.NET and VS 2008 web projects

SVN Server
"everything you need to install, configure and manage Subversion server for your team on Windows platform."

Reducing Server Load and Network Traffic in REST/Ajax Architectures

Exploring one of M$ AJAX's often overlooked features

Wednesday, November 21, 2007

Daily Links - 21/11/2007

InterSystem's Cache
"high-performance object database that runs SQL five times faster than relational databases"
It's got free (single user) download, so check it out.
Anyone have experience in using Cache? Leave a comment.

15 -hot- tools that made me a coding Paris Hilton.

Yet (E)Another Tab Interface Implementation (YETII)
"simple, yet functional tab interface implementation"
Javascript tab interface

Visual Studio 2008 Express Editions
Visual Studio 2008 Express All-In-One DVD image file

AJAX Control Toolkit
AJAX Control Toolkit Samples

SQL Server 2005 Compact Edition (for Mobile Devices)
"1.7MB free redistributable runtime engine for SQL Server 2005 Compact Edition"
Downlaods

JavaScript TimePicker
Nifty clock interface with drag functionality on hour and minute hands

Friday, November 9, 2007

How To: Play Sounds (C# 2.0 Compact Framework)

NOTE: If you're targeting the 3.5 framework, you can use the new SoundPlayer class

I'm busy writing a simple Egg Timer Application in my spare time for
my Mobile Phone (I keep forgetting to switch the damn water off when
watering the plants / filling the pool!)
One of the things I needed to do was to play some sound when the time
ran out. The sound file also needed to be embedded in the application
so as to avoid dependencies (which tend to cause trouble).

I found this article from M$.
I had specific problem with this:
Sound sound = new Sound(Assembly.GetExecutingAssembly().GetManifestResourceStream("SoundSample.chimes.wav"));
sound.Play();
I spent quite a bit of time trying to get the sound loaded, but to no avail.

Here's the work-around:
1) Add a sound file as a resource:








- Open the Resources.resx file of the project, and add an Audio Resource
- Select "Audio" type, and click "Add Resource"
- Browse to the sound file you would like to use (*.wav)

2) Copy the Sound class from the above M$ article, but change the constructor that takes a Stream, and change it to a byte[] parameter. Like so:
public Sound(byte[] soundBytes)
{
m_soundBytes = soundBytes;
}

3) Then instead of using GetManifestResourceStream(), pass sound bytes into the constructor if the Sound class:
eg:
Sound sound = new Sound(JaxEggTimer.Properties.Resources.beep);
sound.Play();

If anyone has managed to get the GetManifestResourceStream thing to work, please let me know how. (Leave a comment for others to see)