Skip to content

Instantly share code, notes, and snippets.

View fumiya-kume's full-sized avatar
⌨️
Typing or Code Reading

kuu(Fumiya Kume) fumiya-kume

⌨️
Typing or Code Reading
View GitHub Profile
#define LED 13
void setup() {
pinMode(LED, OUTPUT);
}
void loop() {
delay(1000);
digitalWrite(LED,HIGH);
delay(1000);
digitalWrite(LED,LOW);
/* HTTPClient.cpp */
/* Copyright (C) 2012 mbed.org, MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
@fumiya-kume
fumiya-kume / Headless Mode Sample.cs
Last active April 8, 2016 16:39
Windows10 IoT Core チュートリアル
using Windows.ApplicationModel.Background;
namespace BackgroundApplication1
{
public sealed class StartupTask : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
}
using System;
using System.Diagnostics;
using Windows.ApplicationModel.Background;
using Windows.Web.Http;
namespace BackgroundApplication1
{
public sealed class StartupTask : IBackgroundTask
{
public async void Run(IBackgroundTaskInstance taskInstance)
@fumiya-kume
fumiya-kume / MainPage.xaml.cs
Created August 16, 2016 18:52
Prism を使っているUWP でハンバーガーパターンを使う方法
public sealed partial class MainPage : SessionStateAwarePage
{
public MainPageViewModel ViewModel => this.DataContext as MainPageViewModel;
public MainPage()
{
this.InitializeComponent();
DataContextChanged += (sender, args) =>
{
ViewModel.navigationService = new FrameNavigationService(
// 設定を保存する
// プロパティを取得
var Settings = Windows.Storage.ApplicationData.Current.RoamingSettings;
// 保存
Settings.Values["hoge"] = "hoge hoge";
// 設定を保存する
// プロパティを取得
var Settings = Windows.Storage.ApplicationData.Current.RoamingSettings;
// 読みだす
var result = (string) Settings.Values["exampleSetting"];
// 設定を削除する
// プロパティを取得
var Settings = Windows.Storage.ApplicationData.Current.RoamingSettings;
// 削除
Settings.Values.Remove("hoge");
// 設定を読みだすやつの改良版
// プロパティを取得
var Settings = Windows.Storage.ApplicationData.Current.RoamingSettings;
if (Settings.Values["hoge"] == null)
{
// データが保存されていない
}
else
{
// データが保存されていない
MonoDroidLog: Information: 0: [I:]: Found Xamarin.Android 7.1.0
MonoDroidLog: Information: 0: [I:sdk]: Runtime path: C:\Program Files (x86)\MSBuild\Xamarin\Android
MonoDroidLog: Information: 0: [I:sdk]: Framework path: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0
MonoDroidLog: Information: 0: [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkDirectory not found.
MonoDroidLog: Information: 0: [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidNdkDirectory found:
Path contains ndk-stack in \. (C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\).
MonoDroidLog: Information: 0: [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\JavaSdkDirectory not found.
MonoDroidLog: Information: 0: [I:sdk]: Looking for Android SDK..
MonoDroidLog: Information: 0: [I:sdk]: Key HKCU\SOFTWARE\Novell\Mono for Android\AndroidSdkD