Skip to content

Instantly share code, notes, and snippets.

View runceel's full-sized avatar

Kazuki Ota runceel

View GitHub Profile
@runceel
runceel / XAML.xaml
Created November 15, 2012 12:15
IValueConverter vs IEnumerable<T>
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:WpfApplication1"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<l:FirstConverter x:Key="FirstConverter"/>
</Window.Resources>
<Window.DataContext>
<l:MainWindowViewModel />
exports.get = function(request, response) {
var seeds = [1,2,3];
var r = [];
seeds.forEach(function(i){
r.push({ name: 'aaa' + i, age: 'bbb' + i});
});
response.send(statusCodes.OK, r);
};
using System;
using System.ComponentModel;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
var json = @"{""Name"": ""がりがりがりっち"" }";
@runceel
runceel / gist:9508013
Created March 12, 2014 14:26
こんな
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Web.Syndication;
namespace App1
{
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App11"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" xmlns:Core="using:Microsoft.Xaml.Interactions.Core" xmlns:Media="using:Microsoft.Xaml.Interactions.Media"
x:Class="App11.MainPage"
mc:Ignorable="d">
<Page.Resources>
// こんなんどっかで用意して
interface IDloalogService
{
Task<bool> Confirm(string content, string title);
}
class DialogService : IDialogService
{
private static IDialogService instance;
public static IDialogService Instance
using Codeplex.Reactive;
using System;
using System.Collections.Concurrent;
using System.Linq;
using System.Reactive.Linq;
using System.Runtime.CompilerServices;
namespace CSharp_vNext_ConsoleApplication2
{
class Program
using Codeplex.Reactive.Extensions;
using Codeplex.Reactive.Notifiers;
using System;
using System.Diagnostics;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace ConsoleApplication6
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Codeplex.Reactive.Binding;
using Codeplex.Reactive;
using Codeplex.Reactive.Extensions;
// ネットに接続されてる間はtrueとか
var connected = new BooleanNotifier();
// ダウンロード中はtrueとか
var downloading = new BooleanNotfier();
var command = new[]
{
connected,
downloading.Select(x => !x)
}