This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
public class MyTaskCancel : MonoBehaviour | |
{ | |
// タスクをキャンセルさせるためのCancellationTokenSource | |
private CancellationTokenSource _cts; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
public class TaskDelayCacncel : MonoBehaviour | |
{ | |
// タスクをキャンセルさせるためのCancellationTokenSource | |
private CancellationTokenSource _cts; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using UnityEngine; | |
public class AsyncAwaitWait : MonoBehaviour | |
{ | |
async void Start() | |
{ | |
// 5秒待機する | |
await ExecuteWait(); | |
Debug.Log("Complete"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
nginx: | |
image: nginx:latest | |
ports: | |
- 8080:80 | |
volumes: | |
- ./public:/usr/share/nginx/html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
web: | |
build: | |
context: ./ | |
dockerfile: deploy/web.docker | |
volumes: | |
- ./:/var/www | |
ports: | |
- "8080:80" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
// lcd変数生成 | |
// RS, E, D4, D5, D6, D7という引数が代入されます | |
LiquidCrystal lcd(4, 6, 10, 11, 12, 13); | |
void setup() | |
{ | |
// LCD1602なので、16文字2行を代入 | |
lcd.begin(16, 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <DHT.h> | |
int pin = 9; | |
DHT dht(pin, DHT11); | |
void setup() | |
{ | |
Serial.begin(9600); | |
dht.begin(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ゆっくり明るくなって、暗くなるを繰り返すサンプル | |
*/ | |
int led = 9; | |
int brightness = 0; | |
int fadeAmount = 2; | |
void setup() | |
{ | |
pinMode(led, OUTPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
gulp.task('exportcss', function () { | |
return gulp.src('./src/*.scss') | |
.pipe(sass({ | |
outputStyle: 'expanded' | |
})) | |
.pipe(gulp.dest('./dest/')); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DCモーターを3秒ごとに再生と停止を繰り返すサンプル | |
*/ | |
void setup() | |
{ | |
pinMode(11, OUTPUT); | |
} | |
void loop() | |
{ |