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 / CreateNewGist.bat
Created June 21, 2012 06:46
Vimから外部プログラムとして簡単にCreateNewGist.exeを呼ぶためのbatファイル
REM execute command
REM :!CreateNewGist.bat %
set CREATE_NEW_GIST_PATH="C:\Standalone Programs\CreateNewGist\CreateNewGist.exe"
%CREATE_NEW_GIST_PATH% %0 username password
@masaru-b-cl
masaru-b-cl / Default.aspx
Created June 22, 2012 17:04
ViewState無効時のSelectedIndexChangedイベントの挙動確認
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = "SelectedIndexChanged!";
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
@masaru-b-cl
masaru-b-cl / Program.cs
Created June 24, 2012 14:44
手動トランザクション制御コード例
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
namespace ConsoleApplication1
{
class Program
{
@masaru-b-cl
masaru-b-cl / Program.cs
Created July 17, 2012 04:13
Z会三年生中学受験コース5月のてんさく問題を C# で解いてみた
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
@masaru-b-cl
masaru-b-cl / Program.cs
Created July 20, 2012 05:41
文字列のbyte[]をエンコーディングを指定して取得する拡張メソッド
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public static class StringExtensions
{
public static byte[] ToShiftJISBytes(this string value)
@masaru-b-cl
masaru-b-cl / Form1.cs
Created July 26, 2012 16:08
async/awaitを利用したコード名称非同期表示イメージ
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@masaru-b-cl
masaru-b-cl / Program.cs
Created August 8, 2012 00:49
Fibonacci
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Fibonacci
{
class Program
{
static void Main(string[] args)
@masaru-b-cl
masaru-b-cl / Program.cs
Created August 9, 2012 07:13
末尾再起なフィボナッチ関数
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static int cnt;
@masaru-b-cl
masaru-b-cl / Program.cs
Created August 9, 2012 08:17
菊池さん考案のフィボナッチ数列なIEnumerable<int>を返す関数
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FibonacciSequence
{
class Program
{
static void Main(string[] args)
@masaru-b-cl
masaru-b-cl / Program.cs
Created August 10, 2012 04:58
ReactiveFizzBuzz
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reactive.Linq;
namespace ReactiveFizzBuzz
{
class Program
{