超雑にまとめました。修正してください。
登場人物
- アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
- 後輩: 頼んでばっかしで役に立たない。
- サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
- プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須 | |
# CentOS5 32bitのさくらVPS、OSX Lionで動作確認。(OSX LionではRTMPDumpを32bitでビルド) | |
# ラジオ第1 | |
rtmpdump --rtmp "rtmpe://netradio-r1-flash.nhk.jp" \ | |
--playpath 'NetRadio_R1_flash@63346' \ | |
--app "live" \ | |
-W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \ | |
--live \ | |
-o r1.m4a |
/* | |
* Simple MD5 implementation | |
* | |
* Compile with: gcc -o md5 -O3 -lm md5.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
こんな指針がいいのかなー 2013 夏 ver.
.NET の「例外のデザインのガイドライン」にもこう書いてある。
Content = | |
(Element / Text)* | |
Element = | |
startTag:StartTag content:Content endTag:EndTag { | |
if (startTag != endTag) { | |
throw new Error( | |
"Expected </" + startTag + "> but </" + endTag + "> found." | |
); | |
} |
const CANCEL = Symbol(); | |
class CancellationToken { | |
constructor() { | |
this.cancelled = false; | |
} | |
throwIfCancelled() { | |
if (this.isCancelled()) { |
// Parse a document using "offside rule" indentation (as in Python) into lines | |
// grouped by indentation level, using PEG.js. | |
// Attempts to segregate the "stateful" rules from the other production/parsing | |
// rules by "disallowing" indentation-level-sensitive rules from consuming any | |
// text. | |
{ var margin_stack = [""]; } | |
Document | |
= content: Element+ |
import std.stdio, std.random, std.math; | |
const POINT_AMOUNT = 1000; | |
struct Point { | |
real x, y; | |
bool isInCircle() { | |
real num = pow(x, 2) + pow(y, 2); | |
return num <= 1; | |
} |
アプリケーションによっては,製品出荷時にユニークなIDを記憶させたり,キャリブレーション値を保持する時にMCU内蔵のEEPROMへデータを書き込む事があります.
しかしながら,STM32シリーズのチップにはEEPROMがありません.どうやらFlashメモリをEEPROMのように書き換えて使う想定のようです.
FLASHメモリと言えば書き換え可能な回数が限られており,頻繁な書き換えは信頼性の低下が懸念されます.
そこでデータシートを参照してみると,最低でも1万回の書き換えが保証されているようでした.
これならループを回して書き換えたりしない限り,メモリの劣化は考えなくても良さそうです.
懸念はそれだけではありません.Flashメモリは1バイトづつ書き込む事はできるものの,消去はセクタ単位での一括消去となります.故に,書き換える場合には以下の手順が必要です.