background preloader

Samples for Parallel Programming with the .NET Framework

Samples for Parallel Programming with the .NET Framework

C# Tutorial - Serialize Objects to a File While storing information in memory is great, there comes a time your users will have to shut your application down. This means (probably) that you will need to write information to a file at some point, because you will want to store whatever data was in memory. Today, we are going to take a look at a feature built into .NET called Serialization that makes writing and reading data structures to and from a file extremely easy. For this example, let's say I want to create a program that keeps track of all the cars my friends own. I'm going to create two objects to achieve this: Car and Owner. The Car object will store the make, model, and year of the car.

Creating a Custom .NET Profiler Contents Introduction Have you ever wondered how profiling tools hook into .NET applications? This article shows how you can create your own custom .NET profiler for any managed application. This profiler is about as basic as it can get, but it shows how to create one and provides a skeleton that can be used to develop something further.

DSPL Developer Guide - DSPL: Dataset Publishing Language - Google Code DSPL stands for Dataset Publishing Language. It is a representation format for both the metadata (information about the dataset, such as its name and provider, as well as the concepts it contains and displays) and actual data of datasets. Datasets described in this format can be imported into the Google Public Data Explorer, a tool that allows for rich, visual exploration of the data.

Serialize List Tutorial A List can be serialized to the disk. We want to serialize (to a file) a List of objects. The next time the program runs, we get this List straight from the disk. We see an example of BinaryFormatter and its Serialize methods. Serial Port Programming – Part 3: Final touches and sending data As always, the full program (after the modification discussed here) is available in the MSDN Sample Library. There’re a few final touches left and we’ll complete our serial class. Depending on the cabling and the device your serial port is attached to you may require to let it know that your serial port is available for data. We do this by altering our Open method as shown below.

Make Script Performance Automatic with Custom Templates in Visual Studio 2010 - Devhammer's Den Jun 14, 2011 Background If you've ever used a tool like Yahoo!'s Yslow to analyze the performance of your web application, you've probably run into the recommendation that you should put your scripts at the bottom of the page, unless those scripts insert page content (a good example of this, which we'll see later in this post, is modernizr.js, which dynamically adds support for semantic HTML5 elements to older browsers that do not natively support them). Unfortunately, if you use the default MVC 3 templates in Visual Studio 2010, things like the script reference for jQuery are added in at the top of the page, in the <head> section of the document.

.NET Framework 4 The .NET Framework is a development platform for building apps for Windows, Windows Phone, Windows Server, and Microsoft Azure. It consists of the common language runtime (CLR) and the .NET Framework class library, which includes classes, interfaces, and value types that support an extensive range of technologies. The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a variety of programming languages, including Visual Basic and Visual C#. The documentation for the .NET Framework includes an extensive class library reference, conceptual overviews, step-by-step procedures, and information about samples, compilers, and command-line tools. To locate the information that interests you, see the following list of main topic areas. Provides a comprehensive overview of the .NET Framework and links to additional resources.

Advanced TreeView for .NET Download source code - 74.2 Kb Introduction Working on several different projects, I was needed to display and edit hierarchical data. Introduction to Complex UIs Using jQuery UI Building a web application with jQuery makes the task easier. Similarly, building a web application with a complex UI is made easier with jQuery’s sister project jQuery UI. With jQuery UI we have a collection of interactions, widgets and a theme builder at our fingertips that allows us to make a cohesive UI. What is jQuery UI? The jQuery UI project is an official project of the jQuery Project, that provides abstractions for low-level interactions and animations, advanced effects and high-level, themeable widgets, all built on top of the jQuery JavaScript Library, that you can use to build highly interactive web applications.

C# Tutorial - Using The ThreadPool A thread pool takes away all the need to manage your threads - all you have to do is essentially say "hey! someone should go do this work!", and a thread in the process' thread pool will pick up the task and go execute it. And that is all there is to it. Granted, you still have to keep threads from stepping on each other's toes, and you probably care about when these 'work items' are completed - but it is at least a really easy way to queue up a work item.