Skip to content

Instantly share code, notes, and snippets.

@kaorun55
kaorun55 / ja.yml
Created April 26, 2011 07:35
redmine_backlogs_ja
# Japanise strings go here for Rails i18n
ja:
backlogs_story_tracker: "ストーリーのトラッカー"
backlogs_task_tracker: "タスクのトラッカー"
backlogs_card_specification: "Label types for card printing"
backlogs_sprints: "スプリント"
field_story_points: "ストーリーポイント"
remaining_story_points: "残りストーリーポイント"
field_remaining_hours: "残り時間"
button_edit_wiki: "Wikiページの編集"
@kaorun55
kaorun55 / gist:2035344
Created March 14, 2012 09:25
async/await
private void Button_Click_1( object sender, RoutedEventArgs e )
{
//HeavyProcess();
var stopwatch = Stopwatch.StartNew();
var stopwatch2 = Stopwatch.StartNew();
this.button1.IsEnabled = false; //prevent re-entry
var someTask = Task<Task<int>>.Factory.StartNew( () => slowFunc( 1, 2 ) );
someTask.ContinueWith( x =>
{
this.label1.Text = "Result: " + someTask.Result.Result.ToString();
@kaorun55
kaorun55 / MainWindow.xaml
Created June 28, 2012 05:48
kinectionjp training 03
<Window x:Class="training03.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
Loaded="Window_Loaded" Closing="Window_Closing">
<Grid>
<Image Name="rgbImage" />
</Grid>
</Window>
@kaorun55
kaorun55 / MainWindow.xaml
Created July 2, 2012 15:15
kinectionjp training 04
<Window x:Class="training04.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
Loaded="Window_Loaded" Closing="Window_Closing">
<Grid>
<Image Name="rgbImage" />
</Grid>
</Window>
@kaorun55
kaorun55 / MainWindow.xaml
Created July 2, 2012 15:16
kinectionjp training 04 extra
<Window x:Class="training04_extra.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
Loaded="Window_Loaded" Closing="Window_Closing">
<Grid>
<Image Name="rgbImage" />
</Grid>
</Window>
@kaorun55
kaorun55 / MainWindow.xaml.cs
Created August 1, 2012 04:05
Kinect&OpenCV
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Microsoft.Kinect;
using OpenCvSharp;
using OpenCvSharp.Extensions;
namespace KinectOpenCV
{
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
class hoge
{
public:
hoge()
@kaorun55
kaorun55 / gist:3508814
Created August 29, 2012 08:59
C++11-2
#include <iostream>
#include <vector>
unsigned long long int operator "" _twice ( unsigned long long int value )
{
return value * 2 ;
}
int operator "" _sec ( unsigned long long int value )
{
@kaorun55
kaorun55 / gist:3615700
Created September 4, 2012 01:59
INuiSensor#NuiUniqueId()
// ConsoleApplication3.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include <Windows.h>
#include <NuiApi.h>
#include <vector>
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
@kaorun55
kaorun55 / KinectSensor.h
Created October 3, 2012 01:24
Kinect for Windows SDKのFaceTakingで取得した2Dを表示する(C++)
// Thaks : http://www.codeproject.com/Articles/394975/How-To-Use-Kinect-Face-Tracking-SDK
#pragma once
// NuiApi.hの前にWindows.hをインクルードする
#include <Windows.h>
#include <NuiApi.h>
#include <FaceTrackLib.h>
#include <iostream>
#include <sstream>