This file contains 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
# -*- encoding: utf-8 -*- | |
require 'rubygems' | |
require 'eventmachine' | |
require 'em-rocketio-linda-client' | |
require 'arduino_firmata' | |
$stdout.sync = true | |
EM::run do | |
arduino = ArduinoFirmata.connect ENV["ARDUINO"], :eventmachine => true | |
puts "Arduino connect!! (firmata version v#{arduino.version})" |
This file contains 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
require 'arduino_firmata' | |
arduino = ArduinoFirmata.connect ENV["ARDUINO"] | |
puts "Arduino connect!! (firmata version v#{arduino.version})" | |
i = 0 | |
loop do | |
# 正弦波で温度差を分ける | |
sin = Math.sin(i*Math::PI/180.0) | |
p sin |
This file contains 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
javascript:prompt("",function(){ var a = document.title.match(/^(.+)?· Issue (#\d+)/); return "fixed " + a[2] +" " + a[1]; }()); |
This file contains 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
import android.app.Activity | |
import android.app.Fragment | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
abstract class BaseFragment : Fragment() { | |
fun <O> Any.wrap(tag: String, body: () -> O): O { |
This file contains 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
/* | |
The MIT License (MIT) | |
Copyright (c) 2017 Yusuke Sakurai / @keroxp. | |
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 |
This file contains 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
- ー | |
~ 〜 | |
. 。 | |
, 、 | |
;/ ・ | |
;- 〜 | |
;[ 『 | |
;] 』 | |
[ 「 | |
] 」 |
OlderNewer