Skip to content

Instantly share code, notes, and snippets.

View tomkerkhove's full-sized avatar
🤓
Writing bugs faster than his own shadow.

Tom Kerkhove tomkerkhove

🤓
Writing bugs faster than his own shadow.
View GitHub Profile
[^\\]*(?=[.][a-zA-Z]+$)
<Border>
<TextBlock Text="Hello World" />
</Border>
public abstract CarBase
{
public void Drive()
{
// Program Drive-functionality
}
}
public class Jeep : CarBase
{
template.DocumentElement.SetAttribute("launch", "{'Prop1':$(notification_tag1),'Prop2':$(notification_tag2)}");
USE ShopDB
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Tom Kerkhove
-- Create date: 14/03/2014
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Microsoft.Kinect;
using Microsoft.Kinect.Face;
namespace K4W.Expressions
{
public partial class MainWindow : Window
@tomkerkhove
tomkerkhove / Kinect - Handling multiple faces
Created November 30, 2014 17:10
Handle multiple faces
private Dictionary<ulong, FaceFrameSource> _faceSources = new Dictionary<ulong, FaceFrameSource>();
private Dictionary<ulong, FaceFrameReader> _faceReaders = new Dictionary<ulong, FaceFrameReader>();
/// <summary>
/// Process body frames
/// </summary>
private void OnBodyFrameReceived(object sender, BodyFrameArrivedEventArgs e)
{
// Get Frame ref
BodyFrameReference bodyRef = e.FrameReference;
@tomkerkhove
tomkerkhove / Create expiring queue
Created January 7, 2015 18:46
Code snippets for my blog post on Service Bus deadlettering
// Create namespace manager
NamespaceManager nsFactory = NamespaceManager.CreateFromConnectionString(cs);
// Create description about the queue
QueueDescription queueDescription = new QueueDescription(queueName)
{
// Enable dead-lettering of expired messages
EnableDeadLetteringOnMessageExpiration = true,
// Assign a default Time-To-Live
DefaultMessageTimeToLive = new TimeSpan(0, 5, 0)
@concat('>>> _"', triggers().outputs.body.MessageText, '"_ by *', triggers().outputs.body.SenderName, '* _(', triggers().outputs.body.WebUrl, ')_')
CREATE PROCEDURE GetUserInformation
@emailAddress nvarchar(max)
AS
BEGIN
SELECT * FROM Users WHERE LOWER(EmailAddress) = LOWER(@emailAddress)
END