Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / SceneBase
Created December 4, 2013 02:45
俺のシーン管理システムが火を噴くぜ!その2
using RailloadCity.Core.Infrastructures.DependencyInjections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RailloadCity.Core.Infrastructures.Scenes
{
/// <summary>
@wilfrem
wilfrem / SceneManagerBase
Created December 4, 2013 02:43
俺のシーン管理システムが火を噴くぜ!
using RailloadCity.Core.CityScenes;
using RailloadCity.Core.Infrastructures.DependencyInjections;
using RailloadCity.Core.InputDevices;
using RailloadCity.Core.Storages;
using RailloadCity.Core.Surfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@wilfrem
wilfrem / gist:7630796
Created November 24, 2013 18:50
MonoGameのTexture2DでFromStreamをasync/await内で呼び出すと、(理由が不明だが)処理が帰ってこない
例えば、Windows Store App(WinRT)ではファイル読み込みは非同期なので読み込み処理内でasync/awaitを使うと楽だが(そして、外ではTask.Waitする)
その中でTexture2D.FromStreamを呼び出すと、何故か処理が帰ってこない。。。(Task.Waitのところで)
DirectXかWICのどちらかでデッドロックしてる???
回避方法は、FromStreamを呼び出すところを同期的に呼び出す
@wilfrem
wilfrem / gist:6573156
Created September 15, 2013 18:22
PSM (PS Vita)でデバイスへのデプロイがTimeoutする場合
・コンテンツ管理アシスタントはアンインストールする
・psmdevice.exeを何回か殺す
そうすると(どういうわけか)つながるようになる