Skip to content

Instantly share code, notes, and snippets.

@wilfrem
wilfrem / web.config
Created February 22, 2014 18:04
ConsoleプロジェクトにViewsフォルダを掘って、そこにこれを置くとRazorのintelli senceが正しく効くおまじない(VS2013用)
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
@wilfrem
wilfrem / linq_vs_foreach.cs
Last active August 29, 2015 14:12
linq対foreachのコード
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LinqTest
{
class Program
@wilfrem
wilfrem / gist:912ef3bc32a4623ae9cc
Last active August 29, 2015 14:12
ToListいじった結果
17.763 ms
0.654 ms
0.002 ms
counts: 5000, 5000, 0
@wilfrem
wilfrem / gist:1e03b469a5dfcb917f89
Last active August 29, 2015 14:12
ToList弄ってみた
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LinqTest2
{
class Program
{
@wilfrem
wilfrem / gist:e4d4abf84f83551fb6b2
Created December 27, 2014 12:27
monoの実験結果その2
14.795 ms
0.152 ms
0.455 ms
counts: 5000, 5000, 5000
@wilfrem
wilfrem / gist:e4c9c1dee67939c0549b
Created December 27, 2014 11:48
monoの実験結果
379.231 ms
206.293 ms
392.178 ms
counts: 5000000, 5000000, 5000000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace UniRxEx
{
public static partial class Observable
{
@wilfrem
wilfrem / rxSideEffect.js
Last active August 29, 2015 14:18
cold observable
var rx = require("rx");
var s = new rx.Subject();
var stream = s.tap(function(){console.log("side effect");});
stream.subscribeOnNext(function(){});
stream.subscribeOnNext(function(){});
s.onNext("foo");
<?xml version="1.0" encoding="UTF-8"?>
<gtml>
<!-- Game Text Markup Language でっちあげサンプル fork -->
<node class="background">foo.jpg</node>
<node class="background"><src>foo.jpg</src><effect>effect.ef</effect></node><!--こんなのもあり-->
<node class="text"><![CDATA[これはサンプルテキストです]></node>
</gtml>
ja:
errors:
messages:
expired: "の期限がきれました。最初からやりなおしてください"
# expired: "has expired, please request a new one"
not_found: "は見つかりませんでした"
# not_found: "not found"
already_confirmed: "は既に登録済みです"
# already_confirmed: "was already confirmed, please try signing in"
not_locked: "は凍結されていません"