t_wada == 和田卓人さん
-
プログラマが知るべき97のこと
短めのエッセイが並んでいるので読みやすい,おすすめ
きのこ本 -
SQLアンチパターン
// 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 { |
# -*- 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 |
# -*- coding: utf-8 -*- | |
class BaudotCodec(): | |
encodes = {} | |
decodes = {} | |
ltr_trans_rule = {'保留域': 'NA', | |
'SPACE': ' ', | |
'LINE_FEED': '\n'} |
#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) |
#include "mbed.h" | |
AnalogIn sensor[] = {dp19, dp20, dp21}; | |
BusOut mdA(dp7, dp6); | |
BusOut mdB(dp9, dp8); | |
Serial pc(USBTX, USBRX); | |
int motorTest(int code){ |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import base64 | |
P = [27, 35, 50, 11, 8, 20, 44, 30, 6, 1, 5, 2, 33, 16, 36, 64, 3, | |
61, 54, 25, 12, 21, 26, 10, 57, 53, 38, 56, 58, 37, 43, 17, 42, | |
47, 4, 14, 7, 46, 34, 19, 23, 40, 63, 18, 45, 60, 13, 15, 22, | |
9, 62, 51, 32, 55, 29, 24, 41, 39, 49, 52, 48, 28, 31, 59] |