devxlogo

The Latest

Getting Better Sound Capabilities in .NET 3.0

The .NET Framework includes a SoundPlayer class (in System.Media) that can play sound files. However, this class suffers from two crippling limitations: it can play only PCM-encoded WAV files, and

Error Using JavaScript’s this Keyword

Even though this is a reserved word in JavaScript, the following code fails… with(parent){…this.window.event…} …because it can’t back out of parent. The workaround is to assign the window object to

Create a Generic List at Run Time

You can create a list of a specific type at run time by passing the type to the MakeGenericType method, for example: Type t = Type.GetType(“System.Int32”);IList tList= (IList)Activator.CreateInstance( (typeof(List&lt&gt).MakeGenericType(t))); tList.GetType().FullName

Bricks and Mortar: Building a Castle

n an application built with object-oriented techniques, objects are the bricks. You construct little pieces of code encapsulated in these bricks. To build bigger structures, you need to hold these

Publish/Subscribe Messaging Can Be Simple with WebSphere MQ

essage-oriented middleware (MOM) decouples applications by allowing them to communicate using one of two messaging models: point-to-point messaging and publish/subscribe messaging. The models differ in fundamental ways, but neither requires

Robust, Reusable Drag-and-Drop Behavior in Silverlight

s the richness of Internet applications continues to grow through technologies such as Silverlight, AJAX, and Flash, the adoption of common desktop user interface (UI) paradigms within these applications continues

Have You Gotten Started Yet?

It’s free to join Forum Nokia, and when you become a member, you can make the most of Nokia’s extensive development, testing, signing, go to market, and community resources. Check

The Zen of Inversion of Control

n the surface, this article is about the techniques of dependency injection and inversion of control. Underneath, however, the article is intended to get you to think about the questions

The Good Parasite Class Explained

y recent C++ 10-Minute Solution titled “Using a Good Parasite Class to Design a Self-Clearing Memory Buffer” was greeted with skepticism, raised eyebrows, and a torrent of questions from readers

How Base64 Content Encoding Works

The term “Base64” refers to a specific MIME content-transfer encoding. It’s also used as a generic term for any similar encoding scheme that encodes binary data by treating it numerically

Incrementing a C# Variable Efficiently

When you’re incrementing an object of a fundamental type, there’s no difference between prefix (++obj) and postfix (obj++) operators. However, when you’re incrementing a composite object, using the postfix operator

Calling JTidy from Java to Convert HTML to XHTML

The open source JTidy project does an excellent job of converting HTML files to the newer XHTML standard. The following code shows how to invoke JTidy programmatically from Java: /*In:

Using the OneWay Web Service Attribute

When you call a web service method that doesn’t return a value (a void method), you don’t want to waste time waiting until the call returns. But by default, the

How to Declare a java.util.Date in a EJB 3.0 Entity

To map a date column value to a Java date in EJB 3.0, use this code: @Temporal(TemporalType.TIMESTAMP)private java.util.Date publishDate; Related Posts Quick Way to Print Only Certain Rows of an

Dances with Workflows (One Newbie’s Journey)

ecently I started working with a client who was interested in using Windows Workflow Foundation (WF) in a custom application. Having never used WF before, I thought it might be