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
import obd | |
from obd import OBDStatus | |
import time, csv | |
import os | |
f = open("data.csv", "w") | |
writer = csv.writer(f, lineterminator="\n") | |
connection = obd.OBD() | |
print (connection.status()) |
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
# 最終ターゲット | |
mycalc: y.tab.o lex.yy.o myFunction.o | |
g++ -o mycalc y.tab.o lex.yy.o myFunction.o | |
# 構文解析処理 | |
y.tab.o: calculator.y | |
bison -dy calculator.y # -dy : yacc互換 | |
g++ -c y.tab.c | |
# 字句解析処理 |
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
/** | |
* ## 数値 ## | |
* DIGIT ::= [0-9]+ | |
* ; | |
* | |
* @param pc | |
* @param endp | |
* @return | |
*/ | |
int digit( const char* pc, const char** endp ) { |
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
// | |
// main.cpp | |
// Created by NomuraHiroki on 2016/11/06. | |
// | |
#include "main.h" | |
int main (void) { | |
double d; | |
int i; |
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
# -*- coding:utf-8 -*- | |
import datetime | |
import json | |
import re | |
import signal | |
import sys | |
import html | |
import requests |
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
<?php | |
// php7.1 | |
foreach(array_map(null, $array1, $array2) as [$val1, $val2]) { | |
echo $val1.', '.$val2; | |
} | |
// php7.0 | |
foreach(array_map(null, $array1, $array2) as list($val1, $val2)) { | |
echo $val1.', '.$val2; | |
} |
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
class AutoReply(StreamListener): | |
def on_connect(self): | |
print("on_connect") | |
def on_status(self, status): | |
# Ubuntuの時は気づかなかったんだけど、Windowsで動作確認してたら | |
# created_atはUTC(世界標準時)で返ってくるので日本時間にするために9時間プラスする。 | |
status.created_at += timedelta(hours=9) |
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
class AutoGood(StreamListener): | |
def on_connect(self): | |
print ('on_connect.') | |
def on_status(self, status): | |
try: | |
# Ubuntuの時は気づかなかったんだけど、Windowsで動作確認してたら | |
# created_atはUTC(世界標準時)で返ってくるので日本時間にするために9時間プラスする。 | |
status.created_at += timedelta(hours=9) |
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
public class AsyncHttpRequest extends AsyncTask<String, Void, String> { | |
private Context context; | |
private AsyncHttpRequest(Context context) { | |
this.context = context; | |
} | |
/** | |
* 現在日時をyyyy/MM/dd HH:mm:ss形式で取得する. |
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
class ListView_Adapter extends BaseAdapter { | |
private Context context; | |
private LayoutInflater layoutInflater = null; | |
private ArrayList<Integer> Images = null; | |
private ArrayList<String> sentences = new ArrayList<>() { | |
{ | |
put("sentences: xxxxx"); | |
put("sentences: yyyyy"); | |
} | |
} |
NewerOlder