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
arr = [1,2,3,4] | |
#配列の要素が2か3にマッチしたら配列中のそれを消去 | |
arr.reverse_each do |item| | |
if ((item == 2) || (item == 3)) | |
arr.delete(item) | |
end | |
end | |
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
arr = [1,2,3,4] | |
#配列の要素が2か3にマッチしたら配列中のそれを消去 | |
arr.each do |item| | |
if ((item == 2) || (item == 3)) | |
arr.delete(item) | |
end | |
end | |
#2と3を消去後の配列の出力 |
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
const int motor1 = 5; // output for motor1 on 5pin(pwm) | |
const int motor2 = 6; // output for motor2 on 6pin(pwm) | |
const int button = 2; | |
int buttonState = 0; | |
void setup() { | |
pinMode(motor1, OUTPUT); // declare the motor1 as an OUTPUT | |
pinMode(motor2, OUTPUT); // declare the motor1 as an OUTPUT | |
pinMode(button, INPUT); |
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 "selenium-webdriver" | |
print "input site url: " | |
plain_url = gets.to_s.chop | |
print "input PERFECT title: " | |
title = gets.to_s.chop | |
url_title = title.gsub(" ","+") | |
url = plain_url+"/search/?search_id="+url_title |
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
ーーー→ | |
ーーーー | |
ーー↑ー | |
ーーーー |
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
レベル; 曲名 --難易度--; 偏差値 | |
16; VANESSA --Hard--;72.64275659223495 | |
15; NEPHILIM DELTA --Hard--;73.82174304854964 | |
10; Fascination MAXX --Hard--;74.3672572114113 | |
17; London EVOLVED ver.A --Challenge--;74.53711141833358 | |
10; Fascination -eternal love mix- --Hard--;74.62031269479951 | |
16; tokyoEVOLVED (TYPE2) --Hard--;74.71908040990081 | |
10; PARANOIA survivor MAX --Hard--;74.91655184048699 | |
16; tokyoEVOLVED (TYPE1) --Hard--;75.1085926591377 |
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
// Arduino用プログラム | |
const int PUSH = 13; | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(PUSH, OUTPUT); | |
digitalWrite(PUSH, LOW); | |
} |
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 cv2 | |
import serial | |
def main(): | |
#カメラの準備 | |
cap = cv2.VideoCapture(0) | |
#シリアル通信の準備 | |
ser = serial.Serial() | |
#シリアルポートは/dev/tty.usbmodem**となってるはず |
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
#numeron | |
#if in "please input card" phase you typed '100', show the hint of 1 bite | |
def init | |
$flag = false #use in eat | |
map_num = Array.new(10,false) | |
loop do | |
print "please decide the size 1 ~ 9 :" |
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
def func(n) | |
return n+1 | |
end | |
def Bpart(head,tail) | |
if ((head == 0)&&(tail > 0)) | |
func(tail) | |
elsif ((head > 0)&&(tail==0)) | |
Bpart(head-1,1) | |
else |