Skip to content

Instantly share code, notes, and snippets.

//pins:
// 1
//2 0
// 3
//6 4
// 5
const int pins[7]={1,2,3,4,5,6,13};
const int num[10][7]={
{LOW,LOW,LOW,HIGH,LOW,LOW,LOW},
{LOW,HIGH,HIGH,HIGH,LOW,HIGH,HIGH},
<html lang="ja">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
</head>
<style type="text/css">
#main {}
const ValidStyle = {
style: {
invalid: {
border: "2px solid #b71c1c"
},
valid: {
border: "2px solid #ccc"
}
}
};
swagger: "2.0"
info:
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache 2.0"
<html lang="ja">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
</head>
<style type="text/css">
#main {
<html lang="ja">
<head>
<meta charset="UTF-8">
</head>
<style type="text/css">
#main {
color: rgb(0, 255, 0);
}
</style>
from graphillion import GraphSet
import graphillion.tutorial as tl
import sys
param = sys.argv
graph=[(1,6,6),(1,2,9),(1,4,10),(2,4,3),(2,3,7),(3,4,5),(3,5,14),(4,5,9),(5,6,5),(1,5,11),(4,6,12)]
if (len(param)>=3):
graph=eval(param[1])
//use StandardFirmata
String port="COM8";
int motorPin=12;
String ip="127.0.0.1";
//---------------------------------
import processing.serial.*;
import cc.arduino.*;
@gutugutu3030
gutugutu3030 / networkChecker.pde
Last active February 1, 2017 10:20
ネットワークがつながってるか監視するクラス(不完全)
import java.io.IOException;
import java.net.InetAddress;
import java.lang.reflect.*;
void setup() {
NetworkListenner nl=new NetworkListenner(this,"127.0.0.1");
nl.setConnectedListenner("connectedNetwork");
nl.setDisconnectedListenner("disconnectedNetwork");
nl.start();
}
function init() {
var prop = PropertiesService.getScriptProperties();
prop.setProperty("token", "すらっくのとーくん");
var chatworkToken="ちゃっとわーくのとーくん";
prop.setProperty("chatworkToken",chatworkToken);
var channels=[{channelid:"すらっくのDMちゃんねるID",roomid:"ちゃっとわーくの部屋番号",time:"1475554785.023776"}];
prop.setProperty("channelsNum",channels.length);
for(var i=0;i<channels.length;i++){
prop.setProperty("channelid"+i,channels[i].channelid);
prop.setProperty("roomid"+i,channels[i].roomid);