Skip to content

Instantly share code, notes, and snippets.

View yoshiiz's full-sized avatar

よしいず yoshiiz

View GitHub Profile
@yoshiiz
yoshiiz / treetaggersample.py
Last active January 3, 2018 21:58
[Python 3] TreeTagger を Windows+Python 3 環境で利用するサンプル
# -*- coding: utf-8 -*-
import treetaggerwrapper as ttw
# 解析対象の英文
text = 'Peter piper picked a peck of pickled peppers.'
# word, pos, lemma からなるタブ区切りの文字列のリストを取得する。
tags_tabseparated = ttw.TreeTagger(TAGLANG='en').tag_text(text)
@yoshiiz
yoshiiz / Behaviors\DoubleClickAttachedBehavior.cs
Last active January 3, 2018 21:56
[Visual C# 2017][WPF] WpfDoubleClickAttachedBehaviorSample
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace WpfDoubleClickAttachedBehaviorSample.Behaviors
{
public class DoubleClickAttachedBehavior
{
public static readonly DependencyProperty CommandProperty =
@yoshiiz
yoshiiz / Commands\DelegateCommand.cs
Last active January 3, 2018 21:55
[Visual C# 2017][WPF] WpfBindableListBoxSample
using System;
using System.Windows.Input;
namespace WpfBindableListBoxSample.Commands
{
public class DelegateCommand : ICommand
{
private Action _execute;
private Func<bool> _canExecute;
@yoshiiz
yoshiiz / Converters\EnumToCheckableItemsConverter.cs
Last active December 2, 2017 08:16
[Visual C# 2017][WPF] WpfMutuallyExclusiveCheckableMenuItemsSample
using System;
using System.Windows.Data;
using System.Globalization; // CultureInfo
namespace WpfMutuallyExclusiveCheckableMenuItemsSample.Converters
{
public class EnumToCheckableItemsConverter : IValueConverter
{
public object Convert(
@yoshiiz
yoshiiz / Behaviors\FileDragAndDropBehavior.cs
Last active December 25, 2017 17:41
[Visual C# 2017][WPF] WpfFileDragAndDropBehaviorSample
using System.Collections.Generic;
using System.Windows;
using System.Windows.Interactivity; // Behavior
namespace WpfFileDragAndDropBehaviorSample.Behaviors
{
public class FileDragAndDropBehavior : Behavior<UIElement>
{
public static readonly DependencyProperty DraggedFilesProperty =
@yoshiiz
yoshiiz / Commands\DelegateCommand_T.cs
Last active December 2, 2017 08:10
[Visual C# 2017][WPF] WpfCloseWindowCommandSample
using System;
using System.Windows.Input;
namespace WpfCloseWindowCommandSample.Commands
{
public class DelegateCommand<T> : ICommand
{
private Action<T> _execute;
private Func<T, bool> _canExecute;
@yoshiiz
yoshiiz / Behaviors\ListBoxSelectedItemsBehavior.cs
Last active December 2, 2017 07:55
[Visual C# 2017][WPF] WpfListBoxSelectedItemsBehaviorSample
using System.Windows;
using System.Windows.Controls;
using System.Collections; // IList
using System.Windows.Interactivity; // Behavior
namespace WpfListBoxSelectedItemsBehaviorSample.Behaviors
{
public class ListBoxSelectedItemsBehavior : Behavior<ListBox>
{
@yoshiiz
yoshiiz / Commands\DelegateCommand.cs
Last active December 2, 2017 07:52
[Visual C# 2017][WPF] WpfListBoxDoubleClickSample
using System;
using System.Windows.Input;
namespace WpfListBoxDoubleClickSample.Commands
{
public class DelegateCommand : ICommand
{
private Action _execute;
private Func<bool> _canExecute;
@yoshiiz
yoshiiz / Commands\DelegateCommand.cs
Last active April 16, 2019 15:39
[Visual C# 2017][WPF] WpfMVVMSample
using System;
using System.Windows.Input;
namespace WpfMVVMSample.Commands
{
public class DelegateCommand : ICommand
{
private Action _execute;
private Func<bool> _canExecute;
@yoshiiz
yoshiiz / hello.c
Created October 23, 2017 15:12
[C言語] ソースコードのサンプル
#include <stdio.h>
int main(void)
{
printf("Hello!\n");
return 0;
}