Skip to content

Instantly share code, notes, and snippets.

View nuitsjp's full-sized avatar

Atsushi Nakamura nuitsjp

View GitHub Profile
public App()
{
// The root page of your application
MainPage = new MapPage();
}
@nuitsjp
nuitsjp / Xamarin.Forms Authentication 01
Created March 21, 2016 12:49
Xamarin.Forms & Azure Mobile Appsでユーザ認証 No.01
[Authorize]
public class TodoItemController : TableController<TodoItem>
@nuitsjp
nuitsjp / file0.cs
Last active March 3, 2016 07:19
WPFでコントロールからフォーカスを外す方法 ref: http://qiita.com/Nuits/items/89097e3e25a95bcd19f4
System.Windows.Input.Keyboard.ClearFocus();
@nuitsjp
nuitsjp / file0.cs
Last active February 16, 2016 00:44
時間の間隔定義にはTimeSpanが便利! ref: http://qiita.com/Nuits/items/00010cf724c6ce6e1974
/// <summary>
/// ポーリング間隔:1分
/// </summary>
private static readonly int PollingInterval = 60 * 1000;
static void Main(string[] args)
{
while (true)
{
// 一定時間スリープする
@nuitsjp
nuitsjp / file0.cs
Last active December 13, 2015 03:04
やりがちなアンマネージドメモリのリークと対処方法 ref: http://qiita.com/Nuits/items/9ce6a205a50bf8e3dbeb
IntPtr srcIntPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(length);
try
{
// ここに処理を記載する
}
finally
{
System.Runtime.InteropServices.Marshal.FreeCoTaskMem(srcIntPtr);
}