t_wada == 和田卓人さん
-
プログラマが知るべき97のこと
短めのエッセイが並んでいるので読みやすい,おすすめ
きのこ本 -
SQLアンチパターン
#include "mbed.h" | |
AnalogIn sensor[] = {dp19, dp20, dp21}; | |
BusOut mdA(dp7, dp6); | |
BusOut mdB(dp9, dp8); | |
Serial pc(USBTX, USBRX); | |
int sensor2bin(float sensor_var, float threshold) |
#include "mbed.h" | |
AnalogIn sensor[] = {dp19, dp20, dp21}; | |
BusOut mdA(dp7, dp6); | |
BusOut mdB(dp9, dp8); | |
Serial pc(USBTX, USBRX); | |
int sensor2bin(float sensor_var, float threshold) |
# -*- coding: utf-8 -*- | |
class BaudotCodec(): | |
encodes = {} | |
decodes = {} | |
ltr_trans_rule = {'保留域': 'NA', | |
'SPACE': ' ', | |
'LINE_FEED': '\n'} |
# -*- coding: utf-8 -*- | |
abc = ['1', '2', '3'] | |
def move_pile(a, b, n, c): | |
if n == 0: | |
return '' | |
elif n == 1: | |
return (a + b) * 2 |
#include "mbed.h" | |
AnalogIn sensor[] = {dp19, dp20, dp21}; | |
BusOut mdA(dp7, dp6); | |
BusOut mdB(dp9, dp8); | |
Serial pc(USBTX, USBRX); | |
int motorTest(int code){ |
// http://aperiodic.net/phil/scala/s-99/ | |
// P06: Find out whether a list is a palindrome. | |
// Example: | |
// scala> isPalindrome(List(1, 2, 3, 2, 1)) | |
// res0: Boolean = true | |
import scala.annotation.tailrec | |
object P06 { |
sealed abstract class Tree | |
case class Branch(value: Int, left: Tree, right: Tree) extends Tree | |
case object Empty extends Tree | |
object TreeObject { | |
def max(tree: Tree): Int = tree match { | |
case Branch(v, l, r) => math.max(math.max(v, this.max(l)), this.max(r)) | |
case Empty => 0 | |
} |