The blog has moved to a new address. The blog is now located at http://devintelligence.com

Adsense

Thursday, March 27, 2008

Argotic Syndication Framework

The Argotic Syndication Framework is a Microsoft .NET class library framework that enables developers to easily consume and/or generate syndicated content from within their own applications. The framework makes the reading and writing syndicated content in common formats such as RSS, Atom, OPML, APML, BlogML, and RSD very easy while still remaining extensible enough to support common/custom extensions to the syndication publishing formats. The framework includes out-of-the-box implementations of the most commonly used syndication extensions, network clients for sending and receiving peer-to-peer notification protocol messages; as well as HTTP handlers, modules, services and controls that provide rich syndication functionality to ASP.NET developers.

Download Argotic Syndication Framework

Technorati Tags: ,,,

Tuesday, March 25, 2008

VisualSVN Server 1.1 is available for download

VisualSVN Server is a package that contains everything you need to easily setup, configure and manage SVN server on Windows.
It contains Subversion, Apache and a management application.

What's new in 1.1 release of VisualSVN Server:

  • Added support for authentication via Windows domain.
  • Implemented VisualSVN Server dashboard.
  • Edit server configuration without reinstallation.
  • Implemented "Import Existing Repository" command.
  • New user-defined configuration file named httpd-custom.conf has been added.
  • URL of the selected node is now displayed in the description bar.
  • New toolbar for the "VisualSVN Server" node has been added.

Download VisualSVN Server

Technorati Tags: , ,

Monday, March 24, 2008

NPlot - freeware .Net charting library

NPlot  is a freeware charting library for .NET. It boasts an elegant and flexible API. NPlot includes controls for Windows Forms, ASP.NET and a class for creating Bitmaps.

Take look at some examples

Download the current version of NPlot here

Technorati Tags: ,,

Thursday, January 31, 2008

System.Reflection - MethodInfo class (usage)

A MethodInfo class provides detailed information about a single method of a class or an interface. The reflected method may be a static method or an instance method. The MethodInfoSpy example shows how to obtain the method information of a class including the access modifiers, type or input parameters:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Reflection;

namespace MethodInfoSpy
{
class Program
{

static void Main(string[] args)
{
Type type = typeof(Program);
MethodInfo [] methodInfos = type.GetMethods();
foreach (MethodInfo methodInfo in methodInfos)
{
// retrive method information
Console.WriteLine("Name: {0}, Public: {1}, Is Static: {2}, Return Type: {3}",
methodInfo.Name,
methodInfo.IsPublic,
methodInfo.IsStatic,
methodInfo.ReturnType.FullName);

// retrive method parameters information
ParameterInfo [] paramInfos = methodInfo.GetParameters();
foreach (ParameterInfo paramInfo in paramInfos)
{
Console.WriteLine("Parameter Name: {0}, Parameter Type: {1}",
paramInfo.Name, paramInfo.ParameterType.FullName);
}
}
Console.ReadLine();
}


public void DoNothing()
{
}

public int Add(int x, int y)
{
return x + y;
}
}
}



A sample of the output follows:








Name: DoNothing, Public: True, Is Static: False, Return Type: System.Void

Name: Add, Public: True, Is Static: False, Return Type: System.Int32


Parameter Name: x, Parameter Type: System.Int32


Parameter Name: y, Parameter Type: System.Int32


Name: GetType, Public: True, Is Static: False, Return Type: System.Type


Name: ToString, Public: True, Is Static: False, Return Type: System.String


Name: Equals, Public: True, Is Static: False, Return Type: System.Boolean


Parameter Name: obj, Parameter Type: System.Object


Name: GetHashCode, Public: True, Is Static: False, Return Type: System.Int32




 



Technorati Tags: ,

How to support != and == operations for C# struct

Sometimes we prefer to use structs instead classes .The C# is a convenient way to store coordinates ,complex number etc .
In an example below I'm presenting how to support == and != operators in case we want to check if our structs are equal.

 

// <summary>
/// Circle
/// </summary>
struct Circle
{
public Point Center;
public double Radius;

/// <summary>
/// Compares two Circle objects. The result specifies whether the values
/// of the Center or Radius properties of the two Circle objects are equal.
/// </summary>
/// <param name="left">A Circle to compare.</param>
/// <param name="right">A Circle to compare.</param>
/// <returns>true if the the Center properties or the Radius properties
/// of left and right are equal; otherwise, false.</returns>
public static bool operator ==(Circle left, Circle right)
{
return (left.Center == right.Center) && (left.Radius == right.Radius);
}

/// <summary>
/// Compares two Circle objects. The result specifies whether the values
/// of the Center or Radius properties of the two Circle objects are unequal.
/// </summary>
/// <param name="left">A Circle to compare.</param>
/// <param name="right">A Circle to compare.</param>
/// <returns>true if the values of either the Center properties
/// or the Radius properties of left and right differ; otherwise, false.</returns>
public static bool operator !=(Circle left, Circle right)
{
return !(left == right);
}


/// <summary>
/// Specifies whether this Circle contains the same Center and Radius as
/// the specified Object.
/// </summary>
/// <param name="obj">Another object to compare to.</param>
/// <returns>
/// true if obj is a Point and has the same Center and Radius as this Circle.
/// </returns>
public override bool Equals(object obj)
{
if (!(obj is Circle))
{
return false;
}
Circle circle = (Circle)obj;
return (circle.Center == this.Center) && (circle.Radius == this.Radius);
}

/// .... You need to overload GetHashCode and ToString methods

}



Testing our struct ...




static void Main(string[] args)


Circle circle1 = new Circle();
circle1.Center = new Point(10, 10);
circle1.Radius = 20;


Circle circle2 = new Circle();
circle2.Center = new Point(10, 10);
circle2.Radius = 20;


bool result = (circle1==circle2);
Console.WriteLine("Is circle1 equal to circle2? [{0}]", result );

circle2.Center = new Point(14, 10);
result = (circle1 == circle2);
Console.WriteLine("Is circle1 equal to circle2? [{0}]", result);

Console.ReadLine();



 



Technorati Tags: ,,

Sunday, December 02, 2007

SHA1 hash calculation in C#

The SHA1 algorithm can be used to calculate check sum, that very useful when you want to ensure the string is not broken .Also for simple  password verification.The example below show how to calculate SHA1 for given string .

 

/// <summary>
/// Calculates SHA1 hash
/// </summary>
/// <param name="text">input string</param>
/// <param name="enc">Character encoding</param>
/// <returns>SHA1 hash</returns>
public static string CalculateSHA1(string text, Encoding enc)
{
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 =
new SHA1CryptoServiceProvider();
string hash = BitConverter.ToString(
cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "");

return hash;
}


The result SHA1 hash for the string "first string":



image



Technorati Tags: ,,,

Tuesday, November 20, 2007

Visual Studio 2008 and .NET Framework 3.5 Training Kit containing Labs, Demos and Powerpoint Presentations

The Visual Studio 2008 and .NET Framework 3.5 Training Kit includes powerpoint presentations, hands-on labs, and demos. This training kit is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management.

Download Visual Studio 2008 and .NET Framework 3.5 Training Kit

Wednesday, August 22, 2007

Free tool that allows administrators to schedule various SQL jobs for SQL Server Express and other versions of SQL Server

SQLScheduler is a fully functional client/server application written in C# that allows administrators to schedule various SQL jobs for SQL Server Express and other versions of SQL Server.

Features:

  • Supports all versions of SQL Server 2000 and 2005
  • Supports unlimited SQL Server instances with an unlimited number of jobs.
  • Allows to easily schedule SQL Server maintenance tasks: backups, index rebuilds, integrity checks, etc.
  • Runs as Windows Service
  • Email notifications on job success and failure

Download SQLScheduler

Monday, July 23, 2007

JavaScript SyntaxHighlighter

SyntaxHighlighter is here to help a developer/coder to post code snippets online with ease and have it look pretty. It's 100% Java Script based and it doesn't care what you have on your server.The idea behind SyntaxHighlighter is to allow insertion of colored code snippets on a web page without relying on any server side scripts.

Monday, July 02, 2007

Fiddler 2.1 Released

Fiddler v2 is a new version of the Fiddler Debugging proxy.  Fiddler2 is freeware and can debug traffic from virtually any application, including IE, Firefox, Safari.
Fiddler2 supports viewing and tampering with HTTPS traffic.Read a quick summary of getting started with Fiddler.
Download Fiddler2

Friday, June 29, 2007

Manage Subversion servers on Windows.

PainlessSVN provides you with the ability to completely manage your Subversion  Repositories & Server conviently and effectively without the using of command line interface.

PainlessSVN Features

  1. Creates and Deletes Repositories
  2.  Creates and Deletes Directories
  3.  Creates and Deletes Users
  4.  Creates Dump Files
  5.  Creates Hot Copies
  6.  Manages access to repositories
  7. Uses the Microsoft Management Console.

Download PainlessSVN Professional Preview 3

Monday, June 25, 2007

.NET Framework 3.0 Virtual Labs

.NET Framework version 3.0 is Microsoft’s managed-code programming model for developing software on the Windows platform. .NET Framework 3.0 includes Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace technologies.Today you can learn these new technologies through a series of guided, hands-on labs which can be completed in 90 minutes or less.

 

Windows CardSpace Virtual Labs

Core Features of Windows CardSpace

Windows Presentation Foundation Virtual Labs

Building Windows Presentation Foundation Applications C# Part 1
Building Windows Presentation Foundation Applications C# Part 2
Building Windows Presentation Foundation Applications VB Part 1
Building Windows Presentation Foundation Applications VB Part 2

Windows Communication Foundation Virtual Labs

A Server Scenario Lab with Windows Communication Foundation
Understanding Windows Communication Foundation
The Fundamentals of Programming the Windows Communication Foundation
Reliable and Transacted Messaging with the Windows Communication Foundation

Windows Workflow Foundation Virtual Labs

A Server Scenario Lab with Windows Workflow Foundation
Getting Started with Windows Workflow Foundation

You get a downloadable manual and a 90-minute block of time for each module. You can sign up for additional 90-minute blocks at any time.

Wednesday, June 20, 2007

Building Silverlight Applications using .NET Talk (by ScottGu )

Scott used a few slides to explain each programming model concept in Silverlight, and then showed a very base sample for each concept that helped present concretely how it worked.

 

In the talk Scott covered fallowing Silverlight concepts:

  • XAML
  • Using Shapes and Text
  • Using Controls
  • Layout (Canvas and Layout Managers)
  • Brushes
  • Transforms
  • Handling Events and Writing Code
  • Building Custom UI Controls
  • Reaching out and Programming the HTML of a page from a Silverlight control
  • Handling HTML Events in Managed Code (e.g. html button click handled in C#/VB on the client)
  • Exposing managed APIs to HTML JavaScript in the browser
  • Using the File Open Dialog support
  • Using the HTTP Network APIs
  • Using the Web Service APIs
  • Isolated Storage for local data caching

 

You can download the slides + demos of this talk below:

Included in the .zip download are readme instructions on how to run all of the samples on your own machine.

Technorati tags: , ,

Thursday, June 14, 2007

Updated utilities from Mark Russinovich

Updated utilities are ZoomIt, Streams, String, PsExec, SigCheck and DiskExt.

List of changes:

  • ZoomIt - you can type text while zoomed and you can also create scratch pad by clearing screen.

  • Streams - Streams now supports printing and deleting streams on volume root directories. There is also new -accepteula switch - hope so it will be included with every single utility :(

  • String - improving performance by limiting no. of bytes that it is reading

  • PsExec - Officially this release to PsExec, a utility for running programs on remote systems, corrects a buffer overflow bug caused by long command line arguments. Unofficially as I found out - it also fixes bug with running PsExec against local computer (PsExec \\%ComputerName% cmd is giving you error regarding user name or password). Finally :) This is quite pain when you got automated processing.

  • SigCheck - new switches -a and -m (more version data and manifests)

  • DiskExt - now reports the mappings for volume that have not been mounted by a file system.

 

[Via MartinZugec's blog ]

Technorati tags: ,