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
#include <Wio3GforArduino.h> | |
#include <MMA7660.h> | |
#define INTERVAL (1000) | |
#define RECEIVE_TIMEOUT (10000) | |
Wio3G Wio; | |
MMA7660 accelemeter; | |
void setup() { |
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
library(readr) | |
library(dplyr) | |
library(rpart) | |
library(rpart.plot) | |
library(randomForest) | |
library(kernlab) | |
taisen <- read_csv( | |
"~/Downloads/taisen.csv", | |
col_types = cols(Date = col_date(format = "%Y/%m/%d")) |
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
<div class="share"> | |
<ul> | |
<!-- はてなブックマーク --> | |
<li class="share-hatena"> | |
<a href="http://b.hatena.ne.jp/add?mode=confirm&url={Permalink}&title={Title}" target="_blank"><i class=" blogicon-bookmark"></i></a> | |
</li> | |
<!-- Twitter --> | |
<li class="share-twitter"> | |
<a href="https://twitter.com/intent/tweet?text={Title}&url={Permalink}&hashtags=はてなブログ" target="_blank"><i class="fa fa-twitter-square" aria-hidden="true"></i></a> | |
</li> |
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
/path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/plugin/storage_local.rb:59:in `configure': implement this feature later with system_config (NotImplementedError) | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/plugin_helper/storage.rb:62:in `storage_create' | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/plugin/in_dummy.rb:67:in `configure' | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/root_agent.rb:237:in `add_source' | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/root_agent.rb:95:in `block in configure' | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fluent/root_agent.rb:92:in `each' | |
from /path/to/fluent-plugin-gcloud-pubsub/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.6/lib/fl |
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
#include "mbed.h" | |
#include "EthernetInterface.h" | |
#include "GraphicOLED.h" | |
#include <string> | |
const string SERVER_HOST = "your-app.herokuapp.com"; | |
const int SERVER_PORT = 80; | |
const int CATEGORY_NUM = 28; | |
const string NICO_CATEGORIES[CATEGORY_NUM] = { |
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
#include <string> | |
#include <list> | |
// 文字列strからstart_strとend_strで囲まれた部分を抽出する。 | |
string match_slice(string str, string start_str, string end_str) | |
{ | |
int start_pos = str.find(start_str); | |
int end_pos = str.rfind(end_str); | |
return str.substr(start_pos + 1, end_pos - start_pos - 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
<?php | |
//現在時刻を取得 | |
$now = new DateTime('now'); | |
//Mysqlのdatetime形式で出力してみたり | |
echo $now->format('Y-m-d H:i:s'); | |
echo "<hr><br>"; | |
//UNIXタイムでインスタンスを作るときは@をつける |
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
<?php | |
$url = '適当なURL'; | |
$data = array( | |
'hoge' => 'foo' | |
); | |
//file_get_contentsの設定 | |
$options = array( |
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
<?php | |
/** | |
* 割り切れるとき | |
*/ | |
$decimal = 1/10; | |
echo $decimal . PHP_EOL; | |
//0.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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); |
NewerOlder