background preloader

.net

Facebook Twitter

OpenSSH Security Best Practices. SSH (Secure Shell) is a cryptographic network protocol for initiating text-based shell sessions on remote machines in a secure way.

OpenSSH Security Best Practices

OpenSSH is the standard SSH client and server used by most Linux Distributions. It is a connectivity tool that most administrators rely on to work on their Linux and *BSD servers. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. So in other words "OpenSSH ensures that the connection to your server is secure". MEF Logger – Creating plug-ins using MEF.

C# and Ruby Classes. (Apologies for the formatting of the tables - I'm working on improving the side-by-side comparisons.)

C# and Ruby Classes

Contents. Universal Type Converter. Table of Contents Introduction This article is about the different possibilities of type conversion provided by the .NET Framework.

Universal Type Converter

At the end, it offers a combination of all these methods (and more) within the UniversalTypeConverter which converts nearly every type to another type. I came across this during the requirement of mapping values, coming from a database, to some objects. Of course, a problem which could be done by an O/R mapper. Just to give you an idea about what I was looking for: int myInt = myGivenValue.ConvertTo<int>(); Regardless of myGivenValue's type.

If you keep on reading, you will get a deep look into conversions. If you are not interested in the whole story, you can jump to the end, looking after Using the code. A Solution in Mind During my research, I hit some nice articles about the TypeConverter, at which we will have a closer look, soon. Setting Up the Project At first, I built up a matrix of all kinds of combinations of type conversions which seemed useful to me. I, Interface. Let's take a simple interface and see what we can do with it. public interface ITask() { void Do(); } This is pretty much as simple as it gets- a single void method which is parameterless.

I, Interface

It models a task inasmuch as you can 'do' a task. That's all this interface is fussed with: providing clients the ability to do something. Given this very simple interface, we can exercise all sorts of patterns on it and furnish it with even more power through flexibility. A .NET State Machine Toolkit - Part III. Enumerate and Auto-Detect USB Drives. Task Parallel Library: 6 of n. Download demo source - 947 KB Introduction This is the sixth and final part of my proposed series of articles on TPL.

Task Parallel Library: 6 of n

Last time I introduced Pipelines, and covered this ground: BlockingCollection BlockingCollection basics Simple pipeline More complex pipeline This time we are going to be looking at some of the more advanced TPL things you can do right now, which will conclude what we can do with TPL using the current .NET 4.0 classes available to us. We will then proceed to look at what we will be able to do with C# 5 by using the new Async CTP. Article Series Roadmap. Developing extension packages for Visual Studio 2005/2008/2010/2012 using C# with real-life samples (1/6) Using DescriptionAttribute for enumerations bound to a ComboBox. Download source code - 11.1 KB Introduction A great maintenance headache is maintaining the View with changes in enumerations, and also just making sure that the enumeration is associated with the right item in a ComboBox (possibly a ListBox).

Using DescriptionAttribute for enumerations bound to a ComboBox

Background I have thought about how to deal with this problem for a while. I was considering ways of using the name for each item in the enumeration as the associated name in the UI. Implementation. Yet Another Universal Event Handler. Download source code - 36.3 KB Introduction If you wanted to record every event generated by any object, how would you do that?

Yet Another Universal Event Handler

This article describes what I think is a new (if only slightly different) method to allow one common point to handle any event. Why? Why would you want to handle multiple events from a single point? Three separate modules generate events indicating changes in location (from GPS), changes in radio-field-strength (from the 3G/4G modem), and changes in data download rate (from another class repeatedly downloading the same file). A single point was needed to consolidate the data from each source and record it within a common data structure. Background I must begin this with a tip of the hat to the following article that served as inspiration: commoneventhandler.aspx. .NET Weak Events for the Busy Programmer. Download source code - 14 KB Introduction By now we are all familiar with delegates in .NET.

.NET Weak Events for the Busy Programmer

Flexible Time Schedule in C# 2.0. Download source - 58.51 KB Introduction This very small project was inspired by a small project released on The Code Project by fellow CPian Aleksey Bykov.

Flexible Time Schedule in C# 2.0

Unfortunately, I was not satisfied with the flexibility provided by the offered library. Recently having dealt heavily with predicates and Iterators and having dabbled with Orcas and the new LINQ syntax (can't wait for LINQ), I felt this was the sort of project that could benefit from such knowledge. Until LINQ becomes mainstream, it will at least benefit you to get familiarized with predicates, actions, etc. Public delegate bool Predicate<T>(T obj); public delegate void Action<T>(T obj); Canny Edge Detection in C# Canny_Edge_Detection/Canny_Edge_Detection_C_.zip Introduction The purpose of edge detection in general is to significantly reduce the amount of data in an image, while preserving the structural properties to be used for further image processing.

Canny Edge Detection in C#

Coding an N-Tier Application in C# Without Any Wizard: Part II. Evaluate C# Code (Eval Function) Download source files - 15.9 Kb Introduction This example shows an "Eval" function for C# and implements different usages of this evaluate function. The library is written in C# and can be tested with the MainForm in the solution. Source view Here you will see all the trick. Windows Forms Modular App Using MEF. Write your own Code Generator or Template Engine in .NET. Creating Custom Build Components for Sandcastle. Table of Contents. Managed Extensibility Framework (MEF) Managed Extensibility Framework - Documentation. CodePlexProject Hosting for Open Source Software. Interface Detection. C#

Others' .net trees

Threading in C# - Free E-book. Patterns. C# Native Interop: Methods and Performance. Download source code - 4.7 KB Introduction C# is a great language. It allows you to be extremely productive and efficient by eliminating the need for manual memory management, and providing fast compile times, an extensive standard library, and various other handy features.

However, for applications requiring heavy number crunching, its performance can be less than adequate. The time machine. Useful links. A curry of Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI) and IoC Container. Multilayered Architecture in .NET.