Skip to content

Instantly share code, notes, and snippets.

View pushrbx's full-sized avatar

pushrbx pushrbx

View GitHub Profile
@pushrbx
pushrbx / SpringNetContextMerge.cs
Created September 8, 2015 13:39
Spring.NET - Merge two application contexts. Extension methods.
public static void MergeWith(this AbstractApplicationContext targetContext,
AbstractApplicationContext sourceContext)
{
Check.NotNull(sourceContext, "sourceContext");
targetContext.Stop();
foreach (var definitionName in sourceContext.GetObjectDefinitionNames())
{
var definition = sourceContext.GetObjectDefinition(definitionName);
targetContext.RegisterObjectDefinition(definitionName, definition);
@pushrbx
pushrbx / SerialPortWrapper.cs
Created September 8, 2015 13:36
C# Serial Port wrapper. Works great with arduinos.
using System;
using System.IO.Ports;
using System.Threading;
using System.Threading.Tasks;
namespace AwesomeSerialDeviceWrapper
{
public class SerialDevice : IDisposable
{
private long m_timeSinceLastEvent;
@pushrbx
pushrbx / springdotnet-contextmerge.cs
Last active August 29, 2015 14:22
Spring.NET - Merge two application contexts.
public static void MergeWith(this AbstractApplicationContext targetContext,
AbstractApplicationContext sourceContext)
{
Check.NotNull(sourceContext, "sourceContext");
targetContext.Stop();
foreach (var definitionName in sourceContext.GetObjectDefinitionNames())
{
var definition = sourceContext.GetObjectDefinition(definitionName);
targetContext.RegisterObjectDefinition(definitionName, definition);
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})