mcnamaragio

Stories submitted by mcnamaragio

Faking num lock, caps lock and scroll lock leds(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 17 days, 5 hours ago

Some time ago I came across a post where the author wanted to turn on and off num lock, cap lock and scroll lock led light without actually toggling their state. This sounded challenging and impossible but after some googling I found a piece of code in C for achieving exactly what I was looking for. In this post I show how it works and how to port it to C# read more...

1 comment |category: |Views: 143

tags: another

Building Expression Evaluator with Expression Trees in C# – Improving (www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 1 month, 4 days ago

Our expression evaluator has support for variables but it has a big disadvantage: values of the variables are bound by position and not by name. This means that you should pass values for the variables in the same order as they appear in the expression. On the other hand binding by name has following advantages: If you change the expression you do not have to worry about keeping order of the variables you pass in sync. In this post we are going to change expression evaluator to bind parameters by name. We will also add a new overload for better performance when we need to evaluate same expression with different parameter values. read more...

add a comment |category: |Views: 122

tags: another

Using Reactive Extensions for Streaming Data from Database(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 1 month, 24 days ago

You have probably heard about Reactive Extensions, a library from Microsoft that greatly simplifies working with asynchronous data streams and allows to query them with Linq operators. There are many different scenarios where using rx results in a much more simple and flexible code. This post demonstrates how to use reactive extensions for loading data from database asynchronously in chunks. read more...

add a comment |category: |Views: 168

tags: another

Async Iterators(davesexton.com)

submitted by mcnamaragiomcnamaragio(283) 1 month, 27 days ago

You’ve already heard about async in C# 5. This new feature is going to improve UI responsiveness and developer productivity simultaneously, to say the least. I’ll assume that you’re also familiar with Task<T>, the generic type in the .NET Framework that provides a common model for asynchronous functions, and one of the types on which the async feature depends. read more...

add a comment |category: |Views: 8

tags: another

Building Expression Evaluator with Expression Trees in C# – Part 3(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 2 months, 6 days ago

A third post of a series about building expression evaluator using expression trees in C#. This post adds support for variables using shunting yard algorithm. read more...

add a comment |category: |Views: 183

tags: another

Building Expression Evaluator Part 2(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 2 months, 29 days ago

A second post of a series about building expression evaluator using expression trees in C#. This post adds support for parentheses using shunting yard algorithm. read more...

add a comment |category: |Views: 115

tags: another

Building Expression Evaluator with Expression Trees in C# – Part 1(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 3 months, 4 days ago

This is first part of a series about writing expression evaluator in C#. Even though there are several of them available already I decided to write my own as this one is based on expression trees and is very simple. The evaluator supports numeric expressions as well as expression with parameters. read more...

1 comment |category: |Views: 159

tags: another

ViewState with dynamic properties in aspnet webforms - Part 2(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 3 months, 26 days ago

How to use DynamicObject class to implement dynamic viewstate just like the ViewBag in ASP.NET MVC - Part 2 read more...

add a comment |category: |Views: 8

tags: another

Dynamic ViewState in ASP.Net WebForms(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 4 months, 10 days ago

How to use DynamicObject class to implement dynamic viewstate just like the ViewBag in ASP.NET MVC read more...

2 comments |category: |Views: 38

tags: another

AppDomain.AssemblyResolve Event Tips(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 4 months, 23 days ago

AppDomain.AssemblyResolve event can be used to load referenced assemblies at runtime. This can be useful in multiple scenarios: you can use it to load a library from a different location or load a library based on bitness or load a library which is embedded in the executable file. In all cases there are some tips and tricks which can help you to easily implement the event handler and avoid exceptions. read more...

add a comment |category: |Views: 14

tags: another

Silverlight slideshow with remote control and windows taskbar support (www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 4 months, 29 days ago

A demo slideshow application built with Native Extensions For Microsoft Silverlight showing to use remote control in Silverlight 4. read more...

add a comment |category: |Views: 1

tags: another

Mono in 2011 (tirania.org)

submitted by mcnamaragiomcnamaragio(283) 5 months, 5 days ago

Mono in 2011 This was a very interesting year for Mono, and I wanted to capture some of the major milestones and news from the project as well as sharing a bit of what is coming up for Mono in 2012. read more...

3 comments |category: |Views: 267

tags: another

How to Get Elevated Process Path in .Net(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 5 months, 5 days ago

As you know retrieving process path in .Net is quite straightforward. For example if you have process instance someProcess you can get the process path by accessing someProcess.MainModule.FileName However for elevated processes the previous code snippet throws Win32Exception. read more...

add a comment |category: |Views: 4

tags: another

The rise and rise of JavaScript(dannorth.net)

submitted by mcnamaragiomcnamaragio(283) 5 months, 6 days ago

I’ve been using JavaScript for a while now, but only really programming in anger with it during the last year. I’ve found it in turns frustrating and enlightening, ridiculous and brilliant. I have never felt so empowered by a language and its ecosystem, so I thought I’d take some time to write about why that is. I’m starting with a ramble through the history of JavaScript, or rather my undoubtedly inaccurate understanding of it, to provide some context for where and how I’ve been using it. read more...

2 comments |category: |Views: 210

tags: another

Bugs in System.Diagnostics.Process Class(www.aboutmycode.com)

submitted by mcnamaragiomcnamaragio(283) 5 months, 7 days ago

While working on an application which makes use of Process class I found several bugs which occur in special conditions. More specifically accessing StartTime or HasExited properties causes a Win32Exception with NativeErrorCode equal to five. This indicates that the exception is caused by not having enough rights to retrieve the required information. The exception occurs under the following conditions read more...

4 comments |category: |Views: 52

tags: another

Window Tabifier(mcnamara.qsh.eu)

submitted by mcnamaragiomcnamaragio(283) 3 years, 6 months ago

This program allows to host several open Windows in one parent window so that you can easily access and navigate between them, as well as clean up space in the taskbar. read more...

add a comment |category: |Views: 32

tags: another