Skip to content

Instantly share code, notes, and snippets.

View masaru-b-cl's full-sized avatar

TAKANO Sho / @masaru_b_cl masaru-b-cl

View GitHub Profile
@masaru-b-cl
masaru-b-cl / gist:3964864
Created October 27, 2012 14:28
HeightにFontSizeを連動させる
・XAML
<TextBox Text="{Binding TextBoxHeight, UpdateSourceTrigger=PropertyChanged}" FontSize="{Binding TextBoxFontSize}" Height="{Binding TextBoxHeight, Mode=OneWay}" />
・ViewModel
#region TextBoxHeight変更通知プロパティ
private int _TextBoxHeight;
public int TextBoxHeight
{
get
@masaru-b-cl
masaru-b-cl / HtmlPage.html
Created October 30, 2012 14:16
$.getJSON to api.github.com/gists/public
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script>
$(document).ready(function () {
$("#button").click(function () {
$.getJSON("https://api.github.com/gists/public", {}, function (x) {
@masaru-b-cl
masaru-b-cl / HtmlPage.html
Created October 30, 2012 14:33
$.getJSON to api.github.com/gists/public as JSONP
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script>
$(document).ready(function () {
$("#button").click(function () {
$.get("https://api.github.com/gists/public?callback=?", {}, function (x) {
@masaru-b-cl
masaru-b-cl / Program.cs
Created November 13, 2012 06:01
「モナドの脅威」のコード写経
// Refer to
// matarillo.com: モナドの驚異
// http://matarillo.com/general/monads.php
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Stack
{
@masaru-b-cl
masaru-b-cl / ServiceHostFactoryBase.cs
Created November 21, 2012 03:11
共通のバインディング設定を使ったエンドポイント追加用Factory
using System.ServiceModel;
using System.ServiceModel.Activation;
namespace TAKANO_Sho.Wcf.Extensions
{
/// <summary>
/// 共通設定を行うWCFサービスホストを作成します。
/// </summary>
/// <typeparam name="TService">サービス型。</typeparam>
/// <typeparam name="TServiceContract">サービスコントラクト型。</typeparam>
@masaru-b-cl
masaru-b-cl / markdown-cheetsheet.md
Created November 21, 2012 08:39
自分用のMarkdown記法のチートシート

Header

H1

H2

H3

H4

H5
H6

Paragraph

first paragraph.

@masaru-b-cl
masaru-b-cl / MainWindow.xaml
Created November 21, 2012 15:03
MainWindow.xaml
<Window x:Class="WpfApplication1.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"
xmlns:vm="clr-namespace:WpfApplication1"
Background="{Binding Background}">
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
</Window>
@masaru-b-cl
masaru-b-cl / .gitignore
Created December 3, 2012 16:40
Navigation for ASP.NETのサンプル
Thumbs.db
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
@masaru-b-cl
masaru-b-cl / Program.cs
Created December 8, 2012 05:36
IEnumerableの型を指定したforeach
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Person