Skip to content

Instantly share code, notes, and snippets.

View IActivityLivecytle.cs
// step1 以下のようなインターフェースを定義しておく
public interface IActivityLifecycle
{
// 引数は適時足す
void OnActivityResult();
}
View Dynamic.cs
using CsvHelper;
using CsvHelper.Configuration;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.Linq;
namespace ConsoleApp8
View IsModified.cs
using Reactive.Bindings;
using Reactive.Bindings.Extensions;
using System;
using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace ConsoleApp5
View Form1.cs
using Reactive.Bindings;
using Reactive.Bindings.Binding;
using Reactive.Bindings.Extensions;
using System;
using System.Data;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Windows.Forms;
View async.ts
/* 出力
now loading
now loading
now loading
done { index: 1, result: filter2: src image }
done { index: 0, result: filter1: src image }
done { index: 2, result: filter3: src image }
filter1: src image
filter2: src image
filter3: src image
View Explain.cs
class BindableBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected bool SetProperty<T>(ref T field, T value, [CallerMemberName]string propertyName = null)
{
Debug.WriteLine("PropertyChangedが {GetType().Name} で呼ばれました。");
field = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
View ImageNet-labels.json
[
{
"Index": "0",
"Label": "tench, Tinca tinca"
},
{
"Index": "1",
"Label": "goldfish, Carassius auratus"
},
{
View ReactiveGridSource.cs
// Model
public interface IData
{
IReadOnlyList<IDatum> DatumList { get; }
}
public interface IDatum
{
IReadOnlyList<int> Numbers { get; }
}
View XPlat.VUI.Idea.cs
namespace TechSummit2018.ServerlessSmartSpeaker
{
public class SmartSpeakerEndpoints
{
private IAssistant Assistant { get; }
private IPlatformService PlatformService { get; }
public SmartSpeakerEndpoints(IAssistant assistant, IPlatformService platformService)
{
Assistant = assistant;
View ViewModel.cs
class ViewModel
{
public ReactiveProperty<string> Input { get; }
public ReactiveProperty<string> Output { get; }
public ViewModel()
{
Input = new ReactiveProperty("");
Output = Input
.Delay(TimeSpan.FromSecond(1)) // Using a Rx method.