Skip to content

Instantly share code, notes, and snippets.

View elbruno's full-sized avatar
💭
@Home rocking some AI projects

El Bruno elbruno

💭
@Home rocking some AI projects
View GitHub Profile
@elbruno
elbruno / ElBrunoKinectV2GetBodies
Created January 2, 2015 11:04
El Bruno - Kinect V2 Get Tracked Bodies
/// <summary>
/// Array for the bodies
/// </summary>
private readonly Body[] _bodies;
private void Reader_BodyFrameArrived(object sender, BodyFrameArrivedEventArgs e)
{
var dataReceived = false;
var hasTrackedBody = false;
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string name = "Valentino";
int age = 7;
@elbruno
elbruno / W10RPI2 - Hello Valentino Xaml
Last active August 29, 2015 14:20
W10RPI2 - Hello Valentino
<Page x:Class="HelloValentino.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HelloValentino"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
@elbruno
elbruno / W10RPI2 - Hello Valentino Xaml
Created May 8, 2015 12:02
W10RPI2 - Hello Valentino Xaml
<Page x:Class="HelloValentino.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HelloValentino"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
@elbruno
elbruno / W10RPI2 - Hello Valentino Xaml
Created May 8, 2015 12:03
W10RPI2 - Hello Valentino Xaml Cs
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace HelloValentino
{
public sealed partial class MainPage : Page
{
public MainPage()
{
@elbruno
elbruno / W10RPi2 - Deploy Log
Created May 9, 2015 11:22
W10RPi2 - Deploy Log
All packages are already installed and there is nothing to restore.
NuGet package restore finished.
1>------ Deploy started: Project: HelloValentino, Configuration: Debug ARM ------
1>Starting remote deployment...
1>Reading package recipe file "$$$\RPi2\HelloValentino\HelloValentino\bin\ARM\Debug\HelloValentino.build.appxrecipe"...
1>*** Start of logging from deployment agent ***
1>TailoredDeploy.exe /debug /xml GetLayoutState d40d829e-3550-420f-9535-9ec75e5cc1c3:VS.Debug_ARM.$$$:CN=$$$ GetInstalledFrameworks
1>FOLDERID_DevelopmentFiles = C:\Users\DefaultAccount\AppData\Local\DevelopmentFiles
1>Default PackageVolume is a SystemVolume - system development folder path: C:\Users\DefaultAccount\AppData\Local\DevelopmentFiles
1>FindPackages: PackageManager.FindPackagesForUser(S-1-5-21-2702878673-795188819-444038987-503, d40d829e-3550-420f-9535-9ec75e5cc1c3, CN=$$$)
@elbruno
elbruno / HoloSpatialUnderstandingSampleGameStartScanner.cs
Last active April 21, 2017 04:11
HoloToolkit - Spatial Understanding Sample class: GameStartScanner
using System;
using HoloToolkit.Unity;
using HoloToolkit.Unity.SpatialMapping;
using UnityEngine;
using UnityEngine.UI;
public class GameStartScanner : MonoBehaviour
{
public float MinAreaForComplete = 30.0f;
public float MinHorizAreaForComplete = 20.0f;
using System.Collections.Generic;
using HoloToolkit.Unity.InputModule;
using UnityEngine;
using HoloToolkit.Unity;
public class ScannerAnalyzer : MonoBehaviour, IInputClickHandler
{
const int QueryResultMaxCount = 512;
const int DisplayResultMaxCount = 32;
@elbruno
elbruno / XamlUtcToLocalDateTimeConverter.cs
Created May 15, 2017 00:44
Xaml Converter to display dates on local UTC time
using System;
using Windows.UI.Xaml.Data;
namespace ElBruno.UI.Converters
{
public class UtcToLocalDateTimeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return DateTime.SpecifyKind(DateTime.Parse(value.ToString()), DateTimeKind.Utc).ToLocalTime();
@elbruno
elbruno / XamlUtcToLocalDateTimeConverter.xaml
Created May 15, 2017 00:51
Xaml UtcToLocalDateTimeConverter sample
<Page
...>
<Page.Resources>
<converters:UtcToLocalDateTimeConverter x:Key="UtcToLocalDateTimeConverter" />
</Page.Resources>
...
<TextBlock TextAlignment="Center"
Run Text="{Binding SomeEntity.Date, Converter={StaticResource UtcToLocalDateTimeConverter}}" />
</TextBlock>
...