「stream」を含む日記 RSS

はてなキーワード: streamとは

2015-01-22

http://anond.hatelabo.jp/20150122112057

お前それアルジャジーラでも同じこと言えんの?

stream.aljazeera.com/story/201501211521-0024505

2015-01-12

http://anond.hatelabo.jp/20150112093851

逆に入門書の一冊もまともに読んだことないんだろうなって水準の人が、自分はすごいレベル高いって思い込んでるケース多いね

SIerとか、建前上、技術力は経験年数に比例するってことになってるけど、建前じゃなくて「自分10選手からエキスパートだぜ」って思い込んでるの。

ネットとか本とかで勉強しないから自分がどの程度のレベル客観的評価できない。

このまえもJavaStream記事に「こんなの趣味しか使うな」「可読性が下がる」みたいな否定的コメントがついていて、技術的な勉強はなるべる避けたい感じの人達ならともかくはてなテクノロジーカテゴリーをチェックしてるような人でもこんな感じなんだってがっかりしたわ。

たまに関数型の言語記事に何十何百もブックマークついてることがあるけど、ああいうのもせっかくハテブ使ってるのに興味なくてぜんぜん読まないんだろうね。

ネットに対する否定的意見で「自分の興味のある情報しか見なくなって視野が狭くなる」みたいのがあるけど、はてなみたいな雑多な情報が集まるサイトを利用していても、そうなるんだって思った。

2015-01-06

http://anond.hatelabo.jp/20150106164755

http://b.hatena.ne.jp/entry/blog.livedoor.jp/itsoku/archives/42733566.html

このまえJavaStreamを紹介する記事に「読みにくくなる」「趣味で使え」「素直に別の言語つかえ」みたいなコメントがついていて、世間技術動向に興味ないSIerとかだったらともかく、はてなテクノロジーカテゴリをチェックしてるしてるような人がなんでって思ったわ。

たまに関数型の記事が数十何百もブックマークされてたりするけど、そういうのいっさい興味わかずにタイトルJavaとか知ってる単語が入ってる記事しかチェックしないのかね。

せっかくはてぶ使ってるんだから、もうすこしいろいろ興味もって情報集めたらいいのに。

2015-01-05

なんのためにハテブを見てるんだろう

http://b.hatena.ne.jp/entry/blog.livedoor.jp/itsoku/archives/42733566.html

Javastreamを薦める記事に「そんなの使うと可読性が下がる」とか「他の言語でやれ」みたいな反応してる人がいる。

SIerとかで働いてる技術的なことに興味の薄い人たちならともかくはてぶのテクノローカテゴリをチェックしてるような人でもこういう反応。

またに関数型の記事が何百もブクマを集めてるけど、ああいうのはまったく興味わかずにひたすら「Java」とか自分の見覚えのある単語タイトル記事しか読まないんだろうね。

ネットは隆盛して新聞が衰退する」みたいな話題ときにでるネット批判で「ネット自分の興味のある情報しか吸収しなくなる」みたいなのがあるけど、はてぶみたいな雑多な情報が集まるところを使っていてもそうなるんだって思った。

2014-11-09

http://anond.hatelabo.jp/20141109225221

soundcloudのexploreで好きなジャンルをあさって、良い曲を流す人followして好みのStream形成すればいいんじゃない日本の曲は少ないけど。

2014-07-30

http://anond.hatelabo.jp/20140730213518

からお前はその概念すらきちんと理解してないってことだろ?

どういう場面でどう使ってるって言えないわけで。

それを法令に準ずることとは別の標準があってそっちをやることだ、とか

馬鹿すぎると思わない、説明の仕方?

きちんと理解できてないからだよね?

で、その概念的な所を使う場面を聞いてるんだよ。

事実上標準なこと、っていうのはどういう場面で使いますか?

元増田の一番最初の話も、そもそも「デファクト」とか全く関係ないし、

ってか「スタンダード」の使い方すら違う。

ただ単に何処が主流か、とかだろ。Main streamとかだろ、使うなら。

あの例でどこのサイトが標準ですか、なんて日本語じゃ絶対わない。

カタカナから分からんくてなんとなくかっこよさげからそれっぽく使ってるだけ。

そういうバカと同列のお馬鹿だと言ってるんだよ、お前も。



さも自分が教えてるみたいな勘違いするなよ。

お前が「法律破る」と取れる話をしたからなんでそんな話したんですか?

という問なんですが、それにお答えいただけませんか?

そこを矛盾なく説明していただけませんか?

必要のない、間違いだった、と認めるか、法律を破るのは当たり前です、とするかどちらかなんですが?

2014-05-29

WinInetを使ってVBAでPOSTする

Option Explicit

Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const INTERNET_OPEN_TYPE_PROXY = 3
Private Const INTERNET_SERVICE_HTTP = 3
Private Const INTERNET_DEFAULT_HTTP_PORT = 80
Private Const INTERNET_FLAG_RELOAD = &H80000000

Private Declare Function InternetOpenA Lib "wininet.dll" (ByVal sCallerName As String, ByVal dwAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal dwFlags As Long) As Long
Private Declare Function InternetConnectA Lib "wininet.dll" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nProxyPort As Integer, ByVal sUserName As String, ByVal sPassword As String, ByVal dwService As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Private Declare Function InternetReadFile Lib "wininet.dll" (ByVal hFile As Long, ByRef sBuffer As Byte, ByVal lNumberBytesToRead As Long, ByRef lNumberOfBytesRead As Long) As Long
Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInternetHandle As Long) As Long
Private Declare Function HttpOpenRequestA Lib "wininet.dll" (ByVal hConnect As Long, ByVal sVerb As String, ByVal sObjectName As String, ByVal sVersion As String, ByVal sReferer As String, ByVal sAcceptTypes As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Private Declare Function HttpSendRequestA Lib "wininet.dll" (ByVal hRequest As Long, ByVal sHeaders As String, ByVal dwHeadersLength As Long, ByVal lpOptional As String, ByVal dwOptionalLength As Long) As Long

Private Function submitPost(ByRef host, ByRef url_path, ByRef sendString) As Variant

  Dim dataArray() As Byte, dataPosition, dataSize

 'WinInet初期化
  Dim hInternet
  hInternet = InternetOpenA(vbNullString, INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
  If hInternet = 0 Then
    submitPost = dataArray
    Exit Function
  End If

 'サーバ接続
  Dim hConnect
  hConnect = InternetConnectA(hInternet, host, INTERNET_DEFAULT_HTTP_PORT, vbNullString, vbNullString, INTERNET_SERVICE_HTTP, 0, 0)
  If hConnect = 0 Then
    InternetCloseHandle hInternet
    submitPost = dataArray
    Exit Function
  End If

 'リクエスト初期化
  Dim tmpURL As String * 255
  tmpURL = url_path
  Dim hRequest
  hRequest = HttpOpenRequestA(hConnect, "POST", tmpURL, "HTTP/1.1", vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
  If hRequest = 0 Then
    InternetCloseHandle hConnect
    InternetCloseHandle hInternet
    submitPost = dataArray
    Exit Function
  End If

 'リクエストを送信
  Const strHeader = "Content-Type: application/x-www-form-urlencoded"
  HttpSendRequestA hRequest, strHeader, Len(strHeader), sendString, Len(sendString)

 'データ取得
  Dim readResult, tmpArray(1023) As Byte, tmpPosition, tmpSize
  dataPosition = 0
  dataSize = 0
  Do
    tmpSize = 0
    Erase tmpArray
    readResult = InternetReadFile(hRequest, tmpArray(0), 1024, tmpSize)
    If Not readResult = 1 Or tmpSize = 0 Then
      Exit Do
    End If

    dataSize = dataSize + tmpSize
    ReDim Preserve dataArray(dataSize - 1)
    For tmpPosition = 0 To tmpSize - 1 Step 1
      dataArray(dataPosition) = tmpArray(tmpPosition)
      dataPosition = dataPosition + 1
    Next
  Loop

 'クローズ処理
  InternetCloseHandle hRequest
  InternetCloseHandle hConnect
  InternetCloseHandle hInternet

  submitPost = dataArray

End Function

Public Function downloadFilePost(ByRef targetURL, ByVal sendArray, ByRef savePath) As Boolean

 'URLの分解
  Dim startE, endE, host, url_path
  startE = InStr(1, targetURL, "//") + 2
  endE = InStr(startE, targetURL, "/")
  endE = IIf(startE > endE, Len(targetURL) + 1, endE)
  host = Mid(targetURL, startE, endE - startE)
  url_path = Mid(targetURL, endE)

 'ポストデータエンコード
  Dim jscript
  With CreateObject("ScriptControl")
    .Language = "JScript"
    Set jscript = .CodeObject
  End With
  Dim ix, sendBuffer
  For ix = 0 To UBound(sendArray) Step 1
    sendBuffer = Split(sendArray(ix), "=")
    sendArray(ix) = sendBuffer(0) & "=" & jscript.encodeURIComponent(sendBuffer(1))
  Next
  Set jscript = Nothing

  Dim data
  data = submitPost(host, url_path, Join(sendArray, "&"))

  If LenB(data) <= 0 Then
    downloadFilePost = False
    Exit Function
  End If

 'バイナリで書き込み
  With CreateObject("ADODB.Stream")
    .Type = 1
    .Open
    .Write data
    .SaveToFile savePath, 2
    .Close
  End With

  downloadFilePost = True

End Function

2014-03-08

久々にカラオケに行った。

歌った曲(入力した曲)一覧を帰りに渡してくれるサービスとかあったらいいなぁ。

料理付き飲み放題。まずは乾杯

1.言ノ葉(刀語http://www.kasi-time.com/item-66917.html

2.続・溝ノ口太陽族天体戦士サンレッドhttp://www.kasi-time.com/item-45504.html

3.ごはんはおかずけいおん!!http://www.kasi-time.com/item-49801.html

4.CORE PRIDE青の祓魔師http://www.kasi-time.com/item-53617.html

=新顔メンバー1名到着。各自間奏で自己紹介の流れに=

5.創聖のアクエリオン創聖のアクエリオンhttp://www.kasi-time.com/item-4110.html

6.ジョジョ~その血の運命~(ジョジョの奇妙な冒険http://www.kasi-time.com/item-64604.html

7.ライオンマクロスFhttp://www.kasi-time.com/item-35900.html

8.タチアガレ!(Wake Up, Girls!)http://ameblo.jp/kana6525/entry-11754991101.html

9.愛をとりもどせ!!(北斗の拳http://www.utamap.com/showkasi.php?surl=38437

10.1/3の純情な感情るろうに剣心 -明治剣客浪漫譚-)http://www.utamap.com/showkasi.php?surl=38437

11.ラマさんのラママンボ(しろくまカフェhttp://www.kasi-time.com/item-67948.html

12.Tell Your WorldGoogle CMhttp://www.uta-net.com/song/127069/

13.YOU GET TO BURNING(機動戦艦ナデシコhttp://www.kasi-time.com/item-5835.html

14.午後の待ち合わせ(ノラガミhttp://www.kasi-time.com/item-70343.html

15.哀戦士機動戦士ガンダムII・哀戦士編)http://www.kasi-time.com/item-6141.html

16.英雄ウルトラマンネクサスhttp://www.kasi-time.com/item-28882.html

=早くもデザート登場=

17.SKILL(第2次スーパーロボット大戦αhttp://www.kasi-time.com/item-21.html

18.トポロジーロボティクス・ノーツhttp://www.kasi-time.com/item-65671.html

19.シンクロマニカ(ガリレイドンナhttp://www.kasi-time.com/item-69407.html

20.Stand Up!!!!(てさぐれ!部活ものhttp://www.kasi-time.com/item-69171.html

21.炎のさだめ(装甲騎兵ボトムズhttp://j-lyric.net/artist/a00ab58/l012783.html

22.BLOODY STREAMジョジョの奇妙な冒険http://www.kasi-time.com/item-65253.html

23.明正ロマン重音テトオリジナル曲http://www24.atwiki.jp/utauuuta/pages/2104.html

24.ニルヴァーナ妖狐×僕SShttp://www.kasi-time.com/item-64703.html

25.futuristic imagination東のエデンhttp://www.kasi-time.com/item-42576.html

26.一斉の声(夏目友人帳http://www.kasi-time.com/item-36300.html

27.希望宇宙の…(ギャグマンガ日和http://plus.himote.in/blogs/viewstory/3507

28.sister's noiseとある科学の超電磁砲Shttp://www.kasi-time.com/item-66544.html

29.only my railgunとある科学の超電磁砲http://www.kasi-time.com/item-45162.html

シンクロした!=

=出てきたパンがマギー審司の耳っぽい?=

30.Take Your Way(DEVIL SURVIVOR2 THE ANIMATION)http://www.kasi-time.com/item-66920.html

31.Beautiful Worldヱヴァンゲリヲン新劇場版:序)http://www.kasi-time.com/item-20068.html

=誤入力演歌)=

32.紅蓮の弓矢Linked Horizonhttp://www.kasi-time.com/item-67546.html

=大人の都合により?歌詞が表示されず……が、プロの集まりなので問題なし。=

=誤入力2(またも同じ演歌。もうアニメ化しちゃえよ)=

33.聖闘士神話ソルジャードリームhttp://www.utamap.com/showkasi.php?surl=S01525

34.motto☆派手にね!かんなぎhttp://www.kasi-time.com/item-38260.html

35.eternal realityとある科学の超電磁砲Shttp://www.kasi-time.com/item-68154.html

レールガンを撃ち尽くした=

36.不明(BPM200くらいの超速、冒頭ドラム連打から、女声ボーカル曲??、演奏中止)

37.God knows...涼宮ハルヒの憂鬱http://www.kasi-time.com/item-1209.html

38.secret base~君がくれたもの~(10 years after ver.)(あの日見た花の名前を僕達はまだ知らない。http://www.kasi-time.com/item-53442.html

=次を歌いたくもあり、画面と後奏で余韻を楽しみたくもあり=

39.Chase the worldアクセル・ワールドhttp://www.kasi-time.com/item-61054.html

40.きみのためなら死ねるきみのためなら死ねるhttp://j-lyric.net/artist/a051215/l0193d5.html

最後メンバー到着、ラスト1時間

41.FLY ME TO THE MOON新世紀エヴァンゲリオンhttp://www.kasi-time.com/item-7961.html

42.残酷な天使のテーゼ新世紀エヴァンゲリオンhttp://www.kasi-time.com/item-7960.html

43.ゲキテイ(檄!帝国歌劇団)(サクラ大戦http://www.kasi-time.com/item-32922.html

44.DAYS交響詩エウレカセブンhttp://www.kasi-time.com/item-23916.html

45.魂のルフラン新世紀エヴァンゲリオン シト新生http://www.kasi-time.com/item-5994.html

エヴァ中心に合唱モードへ=

46.meditations(fripSidehttp://www.kasi-time.com/item-51292.html

47.真赤な誓い武装錬金http://www.kasi-time.com/item-3246.html

48.ペガサス幻想聖闘士星矢http://www.utamap.com/showkasi.php?surl=38074

最後メンバー。「33.聖闘士神話ソルジャードリーム~」とかぶらないのが流石!=

49.コネクト(魔法少女まどか☆マギカhttp://www.kasi-time.com/item-52119.html

=あれから3年……=

50.ウィーアー!(ONE PIECEhttp://www.kasi-time.com/item-15866.html

51.ダンバインとぶ(聖戦士ダンバインhttp://www.jtw.zaq.ne.jp/animesong/se/danbain/danbain.html

52.勇者王誕生!勇者王ガオガイガーhttp://www.kasi-time.com/item-35419.html

53.Don't say "lazy"(けいおん!http://www.kasi-time.com/item-41988.html

=お時間が……=

54.BELIEVEめだかボックス アブノーマルhttp://www.kasi-time.com/item-63915.html

55.マジンガーZマジンガーZhttp://www.uta-net.com/song/2270/

パイルダー「「「「「「「「オーン!!!」」」」」」」」=

2013-08-16

社内ニートのための時間潰し

http://anond.hatelabo.jp/20130815143841

2013-08-12

Webサーバを作る】http://d.hatena.ne.jp/kmaebashi/20130804/p1

マネしてPerlで書いてみた。以下ソースコード

use Fcntl;

use strict;

use Socket;

use threads;

use POSIX qw(strftime);

use File::Spec::Functions qw(rel2abs);

my $thread = threads->new(\&serverThread, "");

$thread->join;

sub getContentType {

my $ret;

my %hashmap=(

"html" => "text/html",

"htm" => "text/html",

"txt" => "text/plain",

"css" => "text/css",

"png" => "image/png",

"jpg" => "image/jpeg",

"jpeg" => "image/jpeg",

"gif" => "image/gif"

);

$ret = $hashmap{$_[0]};

if ($ret eq "") {

return "application/octet-stream";

} else {

return $ret;

}

}

sub serverThread {

my $documentRoot = rel2abs("D:/var/www/html");

my ($line, $path, @tmp, $ext, $data, $absPath);

socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp'));

bind(SERVER, sockaddr_in("8001", INADDR_ANY)) || die;

listen(SERVER, SOMAXCONN) || die;

while (accept(CLIENT, SERVER)) {

while (<CLIENT>){

$line = $_;

last if ($line eq "" || $line eq "\r\n" || $line eq "\n");

if (index($line, "GET") == 0){

$path = (split(/ /, $line))[1];

@tmp = split(/\./, $path);

$ext = @tmp[$#tmp];

}

}

print CLIENT "HTTP/1.1 200 OK\r\n";

print CLIENT "Date: " .strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime). "\r\n";

print CLIENT "Server: Sever03.java\r\n";

print CLIENT "Connection: close\r\n";

print CLIENT "Content-type: ". getContentType($ext). "\r\n";

print CLIENT "\r\n";

$absPath = rel2abs($documentRoot. $path);

if (index($absPath,$documentRoot)==0 && sysopen(FH, $absPath, O_RDONLY | O_BINARY)) {

while ($data = <FH>) {

print CLIENT $data;

}

print CLIENT "\r\n";

close FH;

}

close CLIENT;

}

}

コアモジュールだけ使った。

元ネタJavaコードディレクトリトラバーサルになってたんで、一応対策を盛り込んだ。

といっても絶対に外向けに動かさないように。無いと思うけど。

いろいろツッコミくれるとうれしいです。

2013-07-17

YahooCEOがマリッサ•メイヤーに変わってからYahooが買収した企業の数

17だそうです。

http://venturebeat.feedsportal.com/c/34021/f/617399/s/2ebca40e/l/0Lventurebeat0N0C20A130C0A70C160Cmarissa0Emayer0Eyahoo0Efirst0Eyear0C/story01.htmより。

以下が企業リスト

1. Stamped: App that let you give a stamp of approval to your favorite bars, restaurants, songs, and apps. (Shut down)

2. OnTheAir: Short-lived online video site for people who wanted to stream to large audiences. (Shut down)

3. Snip.it: A Pinterest-like curation tool that let you “snip” content from the web, organize it, and share with friends. (Shut down)

4. Alike: Location discovery app that could find nearby places your friends also liked. (Shut down)

5. Jybe: App that recommended movies, books, restaurants, dishes, recipes, and reviews. (Shut down)

6. Summly: App that automatically shortened news articles for mobile devices. Deal included 17-year-old founder Nick D’Aloisio. (Shut down)

7. Astrid: Popular to-do list app for iOS and Android. (Shut down)

8. MileWise: Frequent flier search startup. (Shut down)

9. GoPollGo: Simple polling tool and app. (Shut down)

10. Loki Studios: Mobile gaming startup that created the game Geomon. (Shut down)

11. Tumblr: Blogging powerhouse that was purchased for $1.1 billion. (Alive and kicking)

12. PlayerScale: Cross-platform game infrastructure startup with more than 150 million users tapping into it. (Alive and kicking)

13. GhostBird Software: Photo-focused mobile app startup behind KitCam and PhotoForge2. Will help the Flickr team. (Shut down)

14. Rondee: Conference calling app launched in 2006. (Shut down)

15. Bignoggins: One-man production company behind Fantasy Monster and Draft Monster. Going to Yahoo Fantasy Sports. (Shut down)

16. Qwiki: iOS app that takes your videos and photos and automatically turns them into brief movies. (Still alive for now)

17. Xobni: Startup that made plugins and apps to better manage your email. Will bolster the Yahoo Mail team. (Still alive for now)

SummlyTumblr以外の企業が分かった人っていますか?

どこで知ったのか、わたし、気になります

経緯等ご教授戴けたら幸いです。

2012-11-21

勧善懲悪が好きな日本人 -さかもと女史へバッシング-

某女史の子供うるさい発言騒動で思ったこと。特にソーシャルメディアで訳知り顔で仮説(子供を生んだことがないから分からないとか、独身女の僻みだとか、挙句の果てに相手の気持ちが思いやれない大人が云々)をとうとうと述べる人が出てきて、本当に嫌気が差ししまった。おかげでTwitterをあまり見ないようになってしまった。ちなみに、FBはその関連の発言した人はStreamから消えてもらってます。(たぶん消したまま忘れるけど)

ちょっと「この作家さんの言うこと分かる」って人がいたら全力で否定している人がいたりするし。「まあ子供いないかあなたには分からないですよね」という上から目線を言われないためにも、私の意見は心に秘めておきます

それにしてもこの「いやー公共の場所の子供の泣き声ってちょっとつらいよね・・・特に飛行機って逃げ場ないし・・・」っていえない雰囲気は何なんだろう。すごい勢いでクレーマー呼ばわり。皆さん、お店でのタバコ死ねとか税金上げろとか大声でいうのに何でかな、と思ったけど、「タバコ吸うほうが悪い」という勧善懲悪が出来上がってるからタバコのほうをたたけばよいのですね。つまり、この場合子供の泣き声をうるさがるやつが悪い、と。

だって子供の泣き声は得意じゃないけど両方が不幸だね、って思うわけじゃないですか。この女史だってお母さんに向かって「子供どうにかしろ!」って怒ったわけじゃなくて、子供には気圧が変わる飛行機負担が大きいから、それを広める啓蒙活動をしよう、ということを言っている(作家さんなので多少の誇張はあるだろうし)だけだし。そういう「子供にとって負担」ということも考えましょうよ・・・という啓蒙コラムに私は読めたのだけれど。どうも世の中の人には違うらしい。

なんだか「どちらが悪い」ってもう大衆が決めてしまって、それじゃない人を全員で袋叩きにするような世の中になってしまったのね。ってもとから日本てそういう国でしたっけ。あああ、悲しいねえ。悲しいったら。

2012-08-27

サーバ情報監視の仕組み

cf). Software Design 2010/01号

vmstat を実行するスクリプトを書く
!#/bin/sh
vmstat 5 2 | tail -1 | awk '{print $4,$5,$6}'
xinetd のサービスとして動くようにする
  1. /etc/services にポートプロトコルを登録する
    • agent_mem 11001/tcp # memory monitoring
  2. xinetd が実行するための設定ファイルを書く
    • /etc/xinetd.d/agent_mem
  3. xinetd の再起動
  4. telnet で動作確認する
service agent_mem
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = Monitor/agent_mem.sh
        only_from       = 127.0.0.1
        disable         = no
}
xinetd に登録したポートを叩くスクリプトを書く

php場合、fopen() でもいけると思うのだが、明示的に sockopen() を使う。うむ、perlよりも楽だわこりゃ。

<?php /* -*-java-*- */
/**
 * モニタリングクライアント
 * 
 */
$fp = fsockopen( 'localhost', 11001, $errno, $errmsg, 30 );
if ( !$fp ) {
    echo "Error: $errno - $errmsg \n";
}
else {
    echo date('Y-m-d H:i:s'). "\t";
    $stmt = fgets ( $fp, 128 );
    if ( preg_match( "/([0-9]+) ([0-9]+) ([0-9]+)/", $stmt, $regs ) ) {
        $total = (int)$regs[1] + (int)$regs[2] + (int)$regs[3];
        echo $regs[1]."\t".$regs[2]."\t".$regs[3]."\t".$total."\n";
    }
    fclose( $fp );
}
cron に登録してログを取る。もしくは、スクリプトを while(1)で実行させておく

こいつをモニターとして走らせっぱなしに出来るようにする。

<?php /* -*-java-*- */
/**
 * モニタリングクライアント
 * 
 */

function mem_monitor ( $host, $port ) {
    $fp = fsockopen( $host, $port, $errno, $errmsg, 30 );
    if ( !$fp ) {
        echo date('Y-m-d H:i:s'). "\t";        echo "Error: $errno - $errmsg \n";
    }
    else {
        echo date('Y-m-d H:i:s'). "\t";        $stmt = fgets ( $fp, 128 );
        if ( preg_match( "/([0-9]+) ([0-9]+) ([0-9]+)/", $stmt, $regs ) ) {
            $total = (int)$regs[1] + (int)$regs[2] + (int)$regs[3];
            echo $regs[1]."\t".$regs[2]."\t".$regs[3]."\t".$total."\n";
        }
        fclose( $fp );
    }
}

while( 1 ) {
    mem_monitor( 'localhost', 11001 );
    ob_flush();
    flush();
    sleep( 30 );
}

2012-01-05

Types of digital cameras

Digital cameras are made in a wide range of sizes, prices and capabilities. The majority are camera phones, operated as a mobile application through the cellphone menu. Professional photographers and many amateurs use larger, more expensive digital single-lens reflex cameras (DSLR) for their greater versatility. Between these extremes lie digital compact cameras and bridge digital cameras that "bridge" the gap between amateur and professional cameras. Specialized cameras including multispectral imaging equipment and astrographs continue to serve the scientific, military, medical and other special purposes for which digital photography was invented.

[edit]Compact digital cameras

Subcompact with lens assembly retracted

Compact cameras are designed to be tiny and portable and are particularly suitable for casual and "snapshot" uses. Hence, they are also called point-and-shoot cameras. The smallest, generally less than 20 mm thick, are described as subcompacts or "ultra-compacts" and some are nearly credit card size.[2]

Most, apart from ruggedized or water-resistant models, incorporate a retractable lens assembly allowing a thin camera to have a moderately long focal length and thus fully exploit an image sensor larger than that on a camera phone, and a mechanized lens cap to cover the lens when retracted. The retracted and capped lens is protected from keys, coins and other hard objects, thus making it a thin, pocketable package. Subcompacts commonly have one lug and a short wrist strap which aids extraction from a pocket, while thicker compacts may have two lugs for attaching a neck strap.

Compact cameras are usually designed to be easy to use, sacrificing advanced features and picture quality for compactness and simplicity; images can usually only be stored using lossy compression (JPEG). Most have a built-in flash usually of low power, sufficient for nearby subjects. Live preview is almost always used to frame the photo. Most have limited motion picture capability. Compacts often have macro capability and zoom lenses but the zoom range is usually less than for bridge and DSLR cameras. Generally a contrast-detect autofocus system, using the image data from the live preview feed of the main imager, focuses the lens.

Typically, these cameras incorporate a nearly silent leaf shutter into their lenses.

For lower cost and smaller size, these cameras typically use image sensors with a diagonal of approximately 6 mm, corresponding to a crop factor around 6. This gives them weaker low-light performance, greater depth of field, generally closer focusing ability, and smaller components than cameras using larger sensors.

Starting in 2011, some compact digital cameras can take 3D still photos. These 3D compact stereo cameras can capture 3D panoramic photos for play back on a 3D TV.[3] Some of these are rugged and waterproof, and some have GPS, compass, barometer and altimeter. [4]

[edit]Bridge cameras

Sony DSC-H2

Main article: Bridge camera

Bridge are higher-end digital cameras that physically and ergonomically resemble DSLRs and share with them some advanced features, but share with compacts the use of a fixed lens and a small sensor. Like compacts, most use live preview to frame the image. Their autofocus uses the same contrast-detect mechanism, but many bridge cameras have a manual focus mode, in some cases using a separate focus ring, for greater control. They originally "bridged" the gap between affordable point-and-shoot cameras and the then unaffordable earlier digital SLRs.

Due to the combination of big physical size but a small sensor, many of these cameras have very highly specified lenses with large zoom range and fast aperture, partially compensating for the inability to change lenses. On some, the lens qualifies as superzoom. To compensate for the lesser sensitivity of their small sensors, these cameras almost always include an image stabilization system to enable longer handheld exposures.

These cameras are sometimes marketed as and confused with digital SLR cameras since the appearance is similar. Bridge cameras lack the reflex viewing system of DSLRs, are usually fitted with fixed (non-interchangeable) lenses (although some have a lens thread to attach accessory wide-angle or telephoto converters), and can usually take movies with sound. The scene is composed by viewing either the liquid crystal display or the electronic viewfinder (EVF). Most have a longer shutter lag than a true dSLR, but they are capable of good image quality (with sufficient light) while being more compact and lighter than DSLRs. High-end models of this type have comparable resolutions to low and mid-range DSLRs. Many of these cameras can store images in a Raw image format, or processed and JPEG compressed, or both. The majority have a built-in flash similar to those found in DSLRs.

In bright sun, the quality difference between a good compact camera and a digital SLR is minimal but bridgecams are more portable, cost less and have a similar zoom ability to dSLR. Thus a Bridge camera may better suit outdoor daytime activities, except when seeking professional-quality photos.[5]

In low light conditions and/or at ISO equivalents above 800, most bridge cameras (or megazooms) lack in image quality when compared to even entry level DSLRs. However, they do have one major advantage: their much larger depth of field due to the small sensor as compared to a DSLR, allowing larger apertures with shorter exposure times.

A 3D Photo Mode was introduced in 2011, whereby the camera automatically takes a second image from a slightly different perspective and provides a standard .MPO file for stereo display. [6]

[edit]Mirrorless interchangeable-lens camera

Main article: Mirrorless interchangeable-lens camera

In late 2008, a new type of camera emerged, combining the larger sensors and interchangeable lenses of DSLRs with the live-preview viewing system of compact cameras, either through an electronic viewfinder or on the rear LCD. These are simpler and more compact than DSLRs due to the removal of the mirror box, and typically emulate the handling and ergonomics of either DSLRs or compacts. The system is used by Micro Four Thirds, borrowing components from the Four Thirds DSLR system.

[edit]Digital single lens reflex cameras

Cutaway of an Olympus E-30 DSLR

Main article: Digital single-lens reflex camera

Digital single-lens reflex cameras (DSLRs) are digital cameras based on film single-lens reflex cameras (SLRs). They take their name from their unique viewing system, in which a mirror reflects light from the lens through a separate optical viewfinder. At the moment of exposure the mirror flips out of the way, making a distinctive "clack" sound and allowing light to fall on the imager.

Since no light reaches the imager during framing, autofocus is accomplished using specialized sensors in the mirror box itself. Most 21st century DSLRs also have a "live view" mode that emulates the live preview system of compact cameras, when selected.

These cameras have much larger sensors than the other types, typically 18 mm to 36 mm on the diagonal (crop factor 2, 1.6, or 1). This gives them superior low-light performance, less depth of field at a given aperture, and a larger size.

They make use of interchangeable lenses; each major DSLR manufacturer also sells a line of lenses specifically intended to be used on their cameras. This allows the user to select a lens designed for the application at hand: wide-angle, telephoto, low-light, etc. So each lens does not require its own shutter, DSLRs use a focal-plane shutter in front of the imager, behind the mirror.

[edit]Digital rangefinders

Main article: Rangefinder camera#Digital rangefinder

A rangefinder is a user-operated optical mechanism to measure subject distance once widely used on film cameras. Most digital cameras measure subject distance automatically using electro-optical techniques, but it is not customary to say that they have a rangefinder.

[edit]Line-scan camera systems

A line-scan camera is a camera device containing a line-scan image sensor chip, and a focusing mechanism. These cameras are almost solely used in industrial settings to capture an image of a constant stream of moving material. Unlike video cameras, line-scan cameras use a single row of pixel sensors, instead of a matrix of them. Data coming from the line-scan camera has a frequency, where the camera scans a line, waits, and repeats. The data coming from the line-scan camera is commonly processed by a computer, to collect the one-dimensional line data and to create a two-dimensional image. The collected two-dimensional image data is then processed by image-processing methods for industrial purposes.

Further information: Rotating line camera

[edit]Integration

Many devices include digital cameras built into or integrated into them. For example, mobile phones often include digital cameras; those that do are known as camera phones. Other small electronic devices (especially those used for communication) such as PDAs, laptops and BlackBerry devices often contain an integral digital camera, and most 21st century camcorders can also make still pictures.

Due to the limited storage capacity and general emphasis on convenience rather than image quality, almost all these integrated or converged devices store images in the lossy but compact JPEG file format.

Mobile phones incorporating digital cameras were introduced in Japan in 2001 by J-Phone. In 2003 camera phones outsold stand-alone digital cameras, and in 2006 they outsold all film-based cameras and digital cameras combined. These camera phones reached a billion devices sold in only five years, and by 2007 more than half of the installed base of all mobile phones were camera phones. Sales of separate cameras peaked in 2008. [7]

Integrated cameras tend to be at the very lowest end of the scale of digital cameras in technical specifications, such as resolution, optical quality, and ability to use accessories. With rapid development, however, the gap between mainstream compact digital cameras and camera phones is closing, and high-end camera phones are competitive with low-end stand-alone digital cameras of the same generation.

[edit]Waterproof

A Canon WP-1 waterproof 35 mm film camera

Waterproof digital cameras are digital cameras that can make pictures underwater. Waterproof housings have long been made but they cost almost as the cameras. Many waterproof digital cameras are shockproof and resistant to low temperatures; one of them is Canon PowerShot D10, one of the first underwater digital cameras.

These cameras become very popular during the holiday season, because many people want to save the best moments from their holidays at the seaside. Waterproof watches and mobile phones were produced earlier. Most makers of digital cameras also produce waterproof ones and every year they launch at least one new model, for example Sony, Olympus, Canon, Fuji.

Healthways Mako Shark, an early waterproof camera,[8] was launched in 1958 and cost around 25 dollars. It was a huge camera and pictures were black and white.

___________________________

http://www.gobatteryonline.com/canon-nb-9l-digital-camera-battery-gose.html

http://www.gobatteryonline.com/canon-lp-e5-digital-camera-battery-gose.html

http://www.gobatteryonline.com/canon-powershot-sd500-battery-charger-gose.html

2011-11-08

Thunderbird から Outlook 2007 にメールを移行

やー。面倒でした。

古い情報だと Outlook Express を経由しろと書いてあるので、後継であるらしいWindows Live Mail を経由して(Windows Live Mail からエクスポートする方法で)

Outlook に移行したのだが、どういうわけか宛名が文字列として移行されてしまい、xxx@example.com というメールアドレスの移行ができなかったんです

で eml → msg もしくは pst 形式への変換ソフトを探すのですが、無料ものが見つからなくてあんまり情報もありませんでした。が、ありましたよ!お兄さん。

これなら、msg ⇔ eml の相互変換ができますです

MrMAPI.exe

http://mfcmapi.codeplex.com/

ヘルプはっときますね。

====

MAPI data collection and parsing tool. Supports property tag lookup, error translation,
   smart view processing, rule tables, ACL tables, contents tables, and MAPI<->MIME conversion.
MrMAPI currently knows:
  3916 property tags
   801 dispids
    35 types
    58 guids
   148 errors
    27 smart view parsers

Usage:
   MrMAPI -?
   MrMAPI [-Search] [-Dispids] [-Number] [-Type <type>] <property number>|<property name>
   MrMAPI -Guids
   MrMAPI -Error <error>
   MrMAPI -ParserType <type> -Input <input file> [-Binary] [-Output <output file>]
   MrMAPI -Flag <flag value> [-Dispids] [-Number] <property number>|<property name>
   MrMAPI -Rules [-Profile <profile>] [-Folder <folder>]
   MrMAPI -Acl [-Profile <profile>] [-Folder <folder>]
   MrMAPI [-Contents | -HiddenContents] [-Profile <profile>] [-Folder <folder>] [-Output <output directory>]
          [-Subject <subject>] [-MessageClass <message class>] [-MSG] [-List]
   MrMAPI -ChildFolders [-Profile <profile>] [-Folder <folder>]
   MrMAPI -XML -Input <path to input file> -Output <path to output file>
   MrMAPI -FID [fid] [-MID [mid]] [-Profile <profile>]
   MrMAPI -MAPI | -MIME -Input <path to input file> -Output <path to output file> [-CCSFFlags <conversion flags>]
          [-RFC822] [-Wrap <Decimal number of characters>] [-Encoding <Decimal number indicating encoding>]
          [-AddressBook] [-Unicode] [-Charset CodePage CharSetType CharSetApplyType]

All switches may be shortened if the intended switch is unambiguous.
For example, -T may be used instead of -Type.

   Help:
   -?   Display expanded help.

   Property Tag Lookup:
   -S   (or -Search) Perform substring search.
           With no parameters prints all known properties.
   -D   (or -Dispids) Search dispids.
   -N   (or -Number) Number is in decimal. Ignored for non-numbers.
   -T   (or -Type) Print information on specified type.
           With no parameters prints list of known types.
           When combined with -S, restrict output to given type.
   -G   (or -Guids) Display list of known guids.

   Flag Lookup:
   -Fl  (or -Flag) Look up flags for specified property.
           May be combined with -D and -N switches, but all flag values must be in hex.

   Error Parsing:
   -E   (or -Error) Map an error code to its name and vice versa.
           May be combined with -S and -N switches.

   Smart View Parsing:
   -P   (or -ParserType) Parser type (number). See list below for supported parsers.
   -B   (or -Binary) Input file is binary. Default is hex encoded text.

   Rules Table:
   -R   (or -Rules) Output rules table. Profile optional.

   ACL Table:
   -A   (or -Acl) Output ACL table. Profile optional.

   Contents Table:
   -C   (or -Contents) Output contents table. May be combined with -H. Profile optional.
   -H   (or -HiddenContents) Output associated contents table. May be combined with -C. Profile optional
   -Su  (or -Subject) Subject of messages to output.
   -Me  (or -MessageClass) Message class of messages to output.
   -Ms  (or -MSG) Output as .MSG instead of XML.
   -L   (or -List) List details to screen and do not output files.

   Child Folders:
   -Chi (or -ChildFolders) Display child folders of selected folder.

   MSG File Properties
   -X   (or -XML) Output properties of an MSG file as XML.

   MID/FID Lookup
   -Fi  (or -FID) Folder ID (FID) to search for.
           If -FID is specified without a FID, search/display all folders
   -Mid (or -MID) Message ID (MID) to search for.
           If -MID is specified without a MID, display all messages in folders specified by the FID parameter.

   MAPI <-> MIME Conversion:
   -Ma  (or -MAPI) Convert an EML file to MAPI format (MSG file).
   -Mi  (or -MIME) Convert an MSG file to MIME format (EML file).
   -I   (or -Input) Indicates the input file for conversion, either a MIME-formatted EML file or an MSG file.
   -O   (or -Output) Indicates the output file for the convertion.
   -Cc  (or -CCSFFlags) Indicates specific flags to pass to the converter.
           Available values (these may be OR'ed together):
              MIME -> MAPI:
                CCSF_SMTP:        0x02
                CCSF_INCLUDE_BCC: 0x20
                CCSF_USE_RTF:     0x80
              MAPI -> MIME:
                CCSF_NOHEADERS:        0x0004
                CCSF_USE_TNEF:         0x0010
                CCSF_8BITHEADERS:      0x0040
                CCSF_PLAIN_TEXT_ONLY:  0x1000
                CCSF_NO_MSGID:         0x4000
                CCSF_EMBEDDED_MESSAGE: 0x8000
   -Rf  (or -RFC822) (MAPI->MIME only) Indicates the EML should be generated in RFC822 format.
           If not present, RFC1521 is used instead.
   -W   (or -Wrap) (MAPI->MIME only) Indicates the maximum number of characters in each line in the
           generated EML. Default value is 74. A value of 0 indicates no wrapping.
   -En  (or -Encoding) (MAPI->MIME only) Indicates the encoding type to use. Supported values are:
              1 - Base64
              2 - UUENCODE
              3 - Quoted-Printable
              4 - 7bit (DEFAULT)
              5 - 8bit
   -Ad  (or -AddressBook) Pass MAPI Address Book into converter. Profile optional.
   -U   (or -Unicode) (MIME->MAPI only) The resulting MSG file should be unicode.
   -Ch  (or -Charset) (MIME->MAPI only) Character set - three required parameters:
           CodePage - common values (others supported)
              1252  - CP_USASCII      - Indicates the USASCII character set, Windows code page 1252
              1200  - CP_UNICODE      - Indicates the Unicode character set, Windows code page 1200
              50932 - CP_JAUTODETECT  - Indicates Japanese auto-detect (50932)
              50949 - CP_KAUTODETECT  - Indicates Korean auto-detect (50949)
              50221 - CP_ISO2022JPESC - Indicates the Internet character set ISO-2022-JP-ESC
              50222 - CP_ISO2022JPSIO - Indicates the Internet character set ISO-2022-JP-SIO
           CharSetType - supported values (see CHARSETTYPE)
              0 - CHARSET_BODY
              1 - CHARSET_HEADER
              2 - CHARSET_WEB
           CharSetApplyType - supported values (see CSETAPPLYTYPE)
              0 - CSET_APPLY_UNTAGGED
              1 - CSET_APPLY_ALL
              2 - CSET_APPLY_TAG_ALL

   Universal Options:
   -I   (or -Input) Input file.
   -O   (or -Output) Output file or directory.
   -F   (or -Folder) Folder to scan. Default is Inbox. See list below for supported folders.
           Folders may also be specified by path:
              "Top of Information Store\Calendar"
           Path may be preceeded by entry IDs for special folders using @ notation:
              "@PR_IPM_SUBTREE_ENTRYID\Calendar"
           MrMAPI's special folder constants may also be used:
              "@12\Calendar"
              "@1"
   -Pr  (or -Profile) Profile for MAPILogonEx.
   -M   (or -MoreProperties) More properties. Tries harder to get stream properties. May take longer.
   -No  (or -NoAddins) No Addins. Don't load any add-ins.
   -On  (or -Online) Online mode. Bypass cached mode.
   -V   (or -Verbose) Verbose. Turn on all debug output.

Smart View Parsers:
    1 Additional Ren Entry IDs Ex
    2 Appointment Recurrence Pattern
    3 Conversation Index
    4 Entry Id
    5 Entry List
    6 Extended Folder Flags
    7 Extended Rule Condition
    8 Flat Entry List
    9 Folder User Fields Stream
   10 Global Object Id
   11 Property
   12 Property Definition Stream
   13 Recipient Row Stream
   14 Recurrence Pattern
   15 Report Tag
   16 Restriction
   17 Rule Condition
   18 Search Folder Definition
   19 Security Descriptor
   20 SID
   21 Task Assigners
   22 Time Zone
   23 Time Zone Definition
   24 Web View Persistence Object Stream
   25 Nickname Cache
   26 Encode Entry ID
   27 Decode Entry ID

Folders:
    1 Calendar
    2 Contacts
    3 Journal
    4 Notes
    5 Tasks
    6 Reminders
    7 Drafts
    8 Sent Items
    9 Outbox
   10 Deleted Items
   11 Finder
   12 IPM_SUBTREE
   13 Inbox
   14 Local Freebusy
   15 Conflicts
   16 Sync Issues
   17 Local Failures
   18 Server Failures
   19 Junk E-mail

Examples:
   MrMAPI PR_DISPLAY_NAME

   MrMAPI 0x3001001e
   MrMAPI 3001001e
   MrMAPI 3001

   MrMAPI -n 12289

   MrMAPI -t PT_LONG
   MrMAPI -t 3102
   MrMAPI -t

   MrMAPI -s display
   MrMAPI -s display -t PT_LONG
   MrMAPI -t 102 -s display

   MrMAPI -d dispidReminderTime
   MrMAPI -d 0x8502
   MrMAPI -d -s reminder
   MrMAPI -d -n 34050

   MrMAPI -p 17 -i webview.txt -o parsed.txt

2011-05-29

スタクラ2ってほんとすごいよな 

24時間365日必ずどこかで大会が開かれてて、しかもそれをstreamリアルタイムで見れるっていう。

ゲームの人気はもちろんだけど、おおよそ思いつく限りのPC周辺機器メーカー大会プロゲーマー個人やチームをスポンサードしてるんだもんな。

今見てる大会なんてヘッドホンメーカーの老舗「SENNHEISER」がスポンサードしてるんだが「SENNHEISER」の名前ゲーム大会で見るなんて本当に考えたこともなかった。

この前、日本の高級ディスプレイメーカーナナオ外国プロゲームチーム「Fnatic」と契約した話に驚いたばっかりだっていうのに。

2010-03-04

立川談志 STREAM CONTENTS

ttp://kodansha.cplaza.ne.jp/danshi/kodan/vol373/content.html

怒りは言えないでいると恨みに変わっていくんです。けど言ってれば収まりますから。

ログイン ユーザー登録
ようこそ ゲスト さん