Apps mobiles

Our mobiles Apps which was buid on various platforms (Windows Phone and Windows 8, iOS and Android).

See Apps »


Code Source

Technical articles,
source code and feedback on our developments.

See code »



and information about our activities.

See news »

In this post I will compare two methods that perform matrix multiplication. We start by defining the Matrix class:

class Matrix { private readonly double[,] _matrix; public Matrix(int dim1, int dim2) { _matrix = new double[dim1, dim2]; } public int Height { get { return _matrix.GetLength(0); } } [...]
Sat, Oct 03, 2009
Source: – en Category: DEV

Enumerating files in .NET is easy. Everybody knows the GetFiles method and you may be tempted to write code like this :

var files = Directory.GetFiles(@"c:windowssystem32", "*.dll"); foreach (var file in files) { Console.WriteLine(file); }

But if you look closer you will notice that this method returns an array of strings. This could be problematic if the directory you search contains lots of files. The method will block until it performs the search and once it finishes it will load all the results [...]

Thu, Nov 12, 2009
Source: – en Category: DEV
Sample MVC Solution

In this post I will show a sample ASP.NET MVC 2.0 project structure illustrating different concepts such as data access, user input validation and mapping between the domain and the view model. The project is still under construction but the source code is available at github.

I will illustrate the usage of the following frameworks:

MvcContrib bringing useful extension methods and strongly typed helpers to ASP.NET MVC AutoMapper enabling easy mapping between the domain and the view models FluentValidation – a small validation library for .NET that uses a fluent [...]
Fri, May 14, 2010
Source: – en Category: DEV
Transactional NTFS and DotNet

Starting from Windows Vista and Windows Server 2008, Microsoft introduced a great new feature called Transactional NTFS (TxF).

It allows developers to write file I/O functions that are guaranteed to either succeed completely or fail completely.
Unfortunately there are no classes in the .NET framework that would allows us to perform, such operations.
We need to resort to P/Invoke to use the newly introduced functions CreateTransaction, CommitTransaction, RollbackTransaction and DeleteFileTransacted.

class Win32Native { [StructLayout(LayoutKind.Sequential)] [...]
Tue, May 18, 2010
Source: – en Category: DEV

Using reflection to invoke methods which are not known at compile time might be problematic in performance critical applications. It is roughly 2.5-3.0 times slower than direct method calls. Here's a sample test I've conducted:

class Program { [DllImport("kernel32.dll")] static extern void QueryPerformanceCounter(ref long ticks); static PropertyInfo _intProp = typeof(Foo).GetProperty("IntProp", BindingFlags.Public | BindingFlags.Instance); static void Main(string[] args) { [...]
Wed, May 19, 2010
Source: – en Category: DEV

LINQ to XML makes it relatively easy to read and query XML files. For example consider the following XML file:

Suppose you would like to find all records with groupid > 2. You could be tempted to [...]

Wed, May 19, 2010
Source: – en Category: DEV

Have you ever been in a situation where you needed to upload multiple files to a remote host and pass additional parameters in the request? Unfortunately there's nothing in the BCL that allows us to achieve this out of the box.

We have the UploadFile method but it is restricted to a single file and doesn't allow us to pass any additional parameters. So let's go ahead and write such method. The important part is that this method must comply with RFC 1867 so that the remote web server can successfully parse the information.

First we define a [...]

Sun, Nov 21, 2010
Source: – en Category: DEV

If there was a single feature I would like to see in ASP.NET MVC 4 that would be to remove/deprecate ViewBag/ViewData. Those two constructs lead to very ugly code in the views and should be avoided. Here are few of the things I hate about them:

They are not strongly typed and you need to cast in your views in order to obtain the actual type They are not refactor friendly because they rely on magic strings They lead to brittle unit tests because of the magic strings They lead to spaghetti code in the views

Here's the diff patch I would love to see [...]

Sun, Feb 20, 2011
Source: – en Category: DEV

In this blog post I will illustrate how you could convert an XHTML page into PDF using the flying-saucer library. This is a Java library so we need to first step would be to convert it to a .NET assembly.

I will use the IKVM.NET Bytecode Compiler (ikvmc.exe) for this purpose. So go ahead and download both the flying-saucer library and the IKVM project. Then run the following command:

ikvmc.exe -target:library -out:CoreRenderer.dll iText-2.0.8.jar core-renderer.jar

This will generate the CoreRenderer.dll assembly which could be used. And finally we would create an application which would use it [...]

Wed, Mar 02, 2011
Source: – en Category: DEV

I've updated the sample MVC project I wrote for using ASP.NET MVC 3 and the Razor view engine.

A minor change is that I no longer use the FluentValidationModelValidatorProvider but the standard one. So I decorate the view model with the necessary data annotations :

[Validator(typeof(UserViewModelValidator))] public class UserViewModel { public int Id { get; set; } [DisplayName("First name *")] public string FirstName { get; set; } [DisplayName("Last name *")] public string LastName { get; set; } public int? Age { get; set; } }

And [...]

Mon, Feb 20, 2012
Source: – en Category: DEV

The purpose of this post is to show a tutorial about creating a multilingual website in WordPress using the multisite feature.

Advantages of the proposed solution :

Lots of flexibility for content translation and presentation of the articles in different languages Different themes based on country Search Engine Optimization Step 1 : Creating multisite WordPress

Add the following line in wp-config.php.

define ('WP_ALLOW_MULTISITE', true);

This will activate a new option in the Dashboard: Tools -> Network Setup.

All that's left is to follow the instructions.

Choose the default folder options in order to have urls of the following pattern

2 actions are necessary :

Copy/Paste some code inside wp-config.php Copy/Paste some code [...]
Sun, May 11, 2014
Source: – en Category: DEV
Windows Phone 7.x, 8.0 and 8.1

3 major versions of Windows Phone exist since April: 7.x, 8 and 8.1.

The 8.1 version allows among others to create ‘classic' Windows Phone 8.1 applications called 8.1 – Silverlight (SL) and also Universal applications that can be shared between Windows 8.1 and Windows Phone 8.1.

Having common codebase was already partially possible with the PCL (Portable Class Libraries). The compiled assembly can be used in Windows Phone 7.x, WP8 and Windows 8 project for example.

With Universals Apps the UI code can also be shared.

Visual Studio 2013 allows for creating PCL compatible with WP8, W8, WP8.1, W8.1 [...]

Sat, May 17, 2014
Source: – en Category: DEV