Plant soil moisture and light monitor

In this tutorial I am going to show you how to create a soil moisture and light monitor for your plants using an Arduino. You can use it to keep track of when your plants need water and light. I’m also going to show you how to collect the data on a Raspberry Pi and display it on an LCD.

Continue reading »

Raspberry Pi sync date and time

The Raspberry Pi does not have a RTC (Real Time Clock) module and it is not able to keep the date and time without a power source. If your Raspberry Pi is not connected to the Internet, you are out of luck and the only option is to buy and install an RTC module. However, if it has Internet, you can make it sync the date and time from a time-server.

Continue reading »

Dynamic tests with mstest and T4

If you used mstest and NUnit you might be aware of the fact that the former doesn’t support dynamic, data driven test cases. For example, the following scenario cannot be achieved with the out-of-box mstest: given a dataset, create distinct test cases for each entry in it, using a predefined generic test case.

Continue reading »

Modifying .NET binaries – Part 2

Description
Objective Remove the 'Trial protection' from an obfuscated .NET application
Tools
  • WinDbg
  • CFF Explorer
Target audience Advanced users
Continue reading »

Modifying .NET binaries - Part 1

The content of this post can be used for good and bad purposes. Modifying the source code to bypass trial/license checks is what crackers do in order to get paid software for free. Be advised that the purpose of this article is not to teach you how to steal. My target for this article are the .NET developers who should understand what a cracker will (try to) do in order to get access to paid features.

Continue reading »

Fancy windows previewer

Tutorial description
Objective

Create a fancy-looking application that displays the preview of the open applications.

Covered topics
  • Enumerating windows and getting various information about them
  • Creating the Aero glass effect
  • Using the DWM windows preview feature
Requirements
  • Windows Vista/7 with the Aero theme active
  • Visual Studio 2010 (or 2008 but requires some changes in code which are not covered by this tutorial)
Target audience Intermediate users
Download Source code
Continue reading »

Windows Mobile 6.5 on Toshiba G900

Before writing anything else I must warn all readers that changing the operating systems on your mobile will void the warranty. If the upgrade process fails the phone might be damaged and no service will fix that for free. Do it on your own risk and make sure the following list is satisfied:

Continue reading »

Using UAC with C# - Part 2

In part 1 of this tutorial I have presented how to run an application with and without elevation by specifying this from another process.

Continue reading »

Using UAC with C# - Part 1

User Account Control (UAC) is a new technology introduced by Microsoft in Windows Vista and most of the time it is misunderstood by users and developers. It's main purpose is to protect the operating system by running applications with reduced privileges.

Continue reading »

Access private data with Reflection

This article shows how one of the basic OOP principles - encapsulation - can be violated using reflection.

Let's assume that we have a simple class with a private field called "someHiddenValue".

Continue reading »