Machine Learning

Running Tensorflow with native Linux Binaries in the Windows Subsystem for Linux



Arduino as a MIDI/Bluetooth Relay for Windows 8.1 Apps



Bluetooth communication between Arduino and Windows 8.1



A Custom (Async) MessageBox for WPF and Windows Phone

The System.Windows.MessageBox provided by .NET is limited to a very small set of MessageBoxButtons (Yes/No/OK/Cancel) which do not allow for custom Button texts. The System.Windows.Forms.MessageBox also blocks the UI thread, which can be an annoying disadvantage as well. The MessageBox on Windows Phone has the same disadvantages. Custom buttons in a MessageBoxe simplify the decision for the user, because they can describe the results of the action: However you need to do this with a custom control, so for WPF as well as Windows Phone I designed a simple method for asynchronously showing a MessageBox with custom buttons. (The WPF implementation based on this control by Evan Wondrasek) So let’s bring some sample code.In WPF you can use multiple custom buttons: And on Windows Phone you’re limited to 2 buttons: To use CustomMessageBox, you need to get TCD.Controls from NuGet: And on Windows Phone 7.x you also need async support,…


In-App Donations for Windows 8 Apps



Localizing Enums (in a ComboBox)

Enums have many useful applications and are often used in CoboBoxes to let the user select things. In the code behind the enum values are often defined using more or less cryptic text, because neither spaces, special characters, or leading numbers can be used in enum values (for good reasons!). Therefor it is necessary to change the text to something more understandable (language-localized in some cases). One way to achieve this is to create the ComboBox items manually, but it’s much more comfortable to fill the ComboBox items directly with the enum values, because you can get/set the SelectedItem without converting it back and forth from/to the enum value. You can’t override the .ToString() method of the Enum type, so we have to come up with another solution. Just like any other control, the ComboBox uses a Template to create its items. We will replace the default template with one…


03 Der Needleman-Wunsch-Algorithmus

Einführung in die Bioinformatik Vorbereiten der Software Grundlagen der objektorientierten Programmierung Einfaches Codebeispiel – manipulieren eines strings Referenzieren einzelner Zeichen in einem string Generieren einer zufälligen Aminosäure-Sequenz Scoring von Alignments Prüfen auf Identität Bewerten von Mutationen – Substitution Matrix Bewerten eines Alignments Der Needleman-Wunsch-Algorithmus Die F-Matrix (abstrakt) Auswählen des Alignments (abstrakt) F-Matrix (Code) Auswählen des Alignments (Code) Die F-Matrix (abstrakt) Der Needleman-Wunsch-Algorithmus geht bei der Berechnung des idealen Alignements in zwei Schritten vor, um exponentiell skalierende Rechenzeit zu vermeiden. Zunächst wird die sogenannte F-Matrix berechnet, aus welcher anschließend das ideale Alignment zusammengesetzt wird. Zur Veranschaulichung alignen wir die Sequenzen GACFC und GCFHC. Jedes Feld in der Matrix (jede Zelle der Tabelle) beinhaltet einen Score. Diese Punktzahl ist jene, die auf dem Weg zur Berechnung des Feldes gesammelt wurde. Zur Berechnung einer Zelle sind immer die Felder links oben, oben und links notwendig: Unter den drei Feldern wird jenes gewählt, durch…


TCD.Web.NotiConn – communicate between handsets without a server

Two days ago, when I was cycling, suddenly I had the answer: Imagine you have two Windows Phone 7 devices and want to establish a two-way connection between them. For example to play a game of Tic-Tac-Toe. You can do this either with a server on the internet, that connects the clients with each other, or the multicast protocol on WiFi-networks. The same WiFi network may not always be available to both users, but you don’t want to set up a server either (maybe, because you’re only doing this for fun, or you don’t have the resources). The only way to send messages to a WP7 app via the internet is to use push notifications. But how do you exchange the channel addresses between the devices? One way is to use a QR code: Establish a push notification channel on both devices Encode the channel URI into a QR code…



EDIT: If you’re interested in Skeleton tracking and calculating 3D stuff, take a look at TCD.Mathematics too^^ EDIT: There’s a WPF application that I once wrote, featuring SkeletonPainter3D: Kinect Sword. There’s a Youtube video of it ( and that’s the source code:   Hello there, I’ve created another UserControl, this time for Kinect and .NET 4.5, which hopefully has the potential to save you a lot of time. It can be used to draw three-dimensional Skeletons and explore the virtual space around them in real-time. A picture may be more appropriate: The control can be constructed in XAML: xmlns:kinect=”clr-namespace:TCD.Kinect.Controls;assembly=TCD.Kinect.Controls” <kinect:SkeletonPainter3D x:Name=”painter” Background=”Black” IsAnaglyphEnabled=”False” CameraFieldOfView=”70″ CameraPosition=”0,0.5,-1″ CameraLookAt=”0,0,2″ /> And populated with Skeletons using painter.Draw(skeletons), where skeletons is an Skeleton[] from inside the SkeletonFrameReady event. You can either get the TCD.Kinect package from NuGet, or refer to the sample implementation: Let me know if you have any questions or suggestions, and by the way: SkeletonPainter3D has an experimental…


Windows 8 TouchInjection with C#
