「Write」を含む日記 RSS

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

2011-07-27

古い手紙

僕が死ぬ死ぬ病を発病していた頃に書いた手紙アウトライン

- [ ] I don't feel angry and hate.

- [ ] I still cry, worry and sad. That is ok. Life is not that simple to anybody

- [ ] What I really want is for you to be happy.

- [ ] I still want to disappear sometimes because I can't imagine I can be happy without you. You changed my life definition of happiness.

- [ ] this line needs to be considered

- [ ] But I always could not do it. There are too many people around me to do that.

- [ ] this line is not good.

- [ ] So I'm very lucky that I got a lot of friends and words that I need at the moment I need. I was thinking in a different way sometimes. But now I can see I am very lucky.

- [ ] You changed me a lot. There's a lot of things i know in my mind. You gave me a chance to make that happen.

日付は 2008 年 4月になってる。

2011-03-14

福島原子力発電所CNNコメント欄 MIT科学者科学者見解1【東日本巨大地震

結論:大丈夫

MvK2010

I'm going to copy paste a full blog post of a research scientist at MIT here, who explains the situation at Fukushima much better than anyone else has, his message: no worries.

This post is by Dr Josef Oehmen, a research scientist at MIT, in Boston.

He is a PhD Scientist, whose father has extensive experience in Germany’s nuclear industry. I asked him to write this information to my family in Australia, who were being made sick with worry by the media reports coming from Japan. I am republishing it with his permission.

It is a few hours old, so if any information is out of date, blame me for the delay in getting it published.

This is his text in full and unedited. It is very long, so get comfy.

I am writing this text (Mar 12) to give you some peace of mind regarding some of the troubles in Japan, that is the safety of Japan’s nuclear reactors. Up front, the situation is serious, but under control. And this text is long! But you will know more about nuclear power plants after reading it than all journalists on this planet put together.

There was and will *not* be any significant release of radioactivity.

By “significant” I mean a level of radiation of more than what you would receive on – say – a long distance flight, or drinking a glass of beer that comes from certain areas with high levels of natural background radiation.

I have been reading every news release on the incident since the earthquake. There has not been one single (!) report that was accurate and free of errors (and part of that problem is also a weakness in the Japanese crisis communication). By “not free of errors” I do not refer to tendentious anti-nuclear journalism – that is quite normal these days. By “not free of errors” I mean blatant errors regarding physics and natural law, as well as gross misinterpretation of facts, due to an obvious lack of fundamental and basic understanding of the way nuclear reactors are build and operated. I have read a 3 page report on CNN where every single paragraph contained an error.

We will have to cover some fundamentals, before we get into what is going on.

Construction of the Fukushima nuclear power plants

The plants at Fukushima are so called Boiling Water Reactors, or BWR for short. Boiling Water Reactors are similar to a pressure cooker. The nuclear fuel heats water, the water boils and creates steam, the steam then drives turbines that create the electricity, and the steam is then cooled and condensed back to water, and the water send back to be heated by the nuclear fuel. The pressure cooker operates at about 250 °C.

The nuclear fuel is uranium oxide. Uranium oxide is a ceramic with a very high melting point of about 3000 °C. The fuel is manufactured in pellets (think little cylinders the size of Lego bricks). Those pieces are then put into a long tube made of Zircaloy with a melting point of 2200 °C, and sealed tight. The assembly is called a fuel rod. These fuel rods are then put together to form larger packages, and a number of these packages are then put into the reactor. All these packages together are referred to as “the core”.

The Zircaloy casing is the first containment. It separates the radioactive fuel from the rest of the world.

The core is then placed in the “pressure vessels”. That is the pressure cooker we talked about before. The pressure vessels is the second containment. This is one sturdy piece of a pot, designed to safely contain the core for temperatures several hundred °C. That covers the scenarios where cooling can be restored at some point.

The entire “hardware” of the nuclear reactor – the pressure vessel and all pipes, pumps, coolant (water) reserves, are then encased in the third containment. The third containment is a hermetically (air tight) sealed, very thick bubble of the strongest steel. The third containment is designed, built and tested for one single purpose: To contain, indefinitely, a complete core meltdown. For that purpose, a large and thick concrete basin is cast under the pressure vessel (the second containment), which is filled with graphite, all inside the third containment. This is the so-called “core catcher”. If the core melts and the pressure vessel bursts (and eventually melts), it will catch the molten fuel and everything else. It is built in such a way that the nuclear fuel will be spread out, so it can cool down.

This third containment is then surrounded by the reactor building. The reactor building is an outer shell that is supposed to keep the weather out, but nothing in. (this is the part that was damaged in the explosion, but more to that later).

Fundamentals of nuclear reactions

The uranium fuel generates heat by nuclear fission. Big uranium atoms are split into smaller atoms. That generates heat plus neutrons (one of the particles that forms an atom). When the neutron hits another uranium atom, that splits, generating more neutrons and so on. That is called the nuclear chain reaction.

Now, just packing a lot of fuel rods next to each other would quickly lead to overheating and after about 45 minutes to a melting of the fuel rods. It is worth mentioning at this point that the nuclear fuel in a reactor can *never* cause a nuclear explosion the type of a nuclear bomb. Building a nuclear bomb is actually quite difficult (ask Iran). In Chernobyl, the explosion was caused by excessive pressure buildup, hydrogen explosion and rupture of all containments, propelling molten core material into the environment (a “dirty bomb”). Why that did not and will not happen in Japan, further below.

In order to control the nuclear chain reaction, the reactor operators use so-called “moderator rods”. The moderator rods absorb the neutrons and kill the chain reaction instantaneously. A nuclear reactor is built in such a way, that when operating normally, you take out all the moderator rods. The coolant water then takes away the heat (and converts it into steam and electricity) at the same rate as the core produces it. And you have a lot of leeway around the standard operating point of 250°C.

The challenge is that after inserting the rods and stopping the chain reaction, the core still keeps producing heat. The uranium “stopped” the chain reaction. But a number of intermediate radioactive elements are created by the uranium during its fission process, most notably Cesium and Iodine isotopes, i.e. radioactive versions of these elements that will eventually split up into smaller atoms and not be radioactive anymore. Those elements keep decaying and producing heat. Because they are not regenerated any longer from the uranium (the uranium stopped decaying after the moderator rods were put in), they get less and less, and so the core cools down over a matter of days, until those intermediate radioactive elements are used up.

This residual heat is causing the headaches right now.

So the first “type” of radioactive material is the uranium in the fuel rods, plus the intermediate radioactive elements that the uranium splits into, also inside the fuel rod (Cesium and Iodine).

There is a second type of radioactive material created, outside the fuel rods. The big main difference up front: Those radioactive materials have a very short half-life, that means that they decay very fast and split into non-radioactive materials. By fast I mean seconds. So if these radioactive materials are released into the environment, yes, radioactivity was released, but no, it is not dangerous, at all. Why? By the time you spelled “R-A-D-I-O-N-U-C-L-I-D-E”, they will be harmless, because they will have split up into non radioactive elements. Those radioactive elements are N-16, the radioactive isotope (or version) of nitrogen (air). The others are noble gases such as Xenon. But where do they come from? When the uranium splits, it generates a neutron (see above). Most of these neutrons will hit other uranium atoms and keep the nuclear chain reaction going. But some will leave the fuel rod and hit the water molecules, or the air that is in the water. Then, a non-radioactive element can “capture” the neutron. It becomes radioactive. As described above, it will quickly (seconds) get rid again of the neutron to return to its former beautiful self.

This second “type” of radiation is very important when we talk about the radioactivity being released into the environment later on.

What happened at Fukushima

I will try to summarize the main facts. The earthquake that hit Japan was 7 times more powerful than the worst earthquake the nuclear power plant was built for (the Richter scale works logarithmically; the difference between the 8.2 that the plants were built for and the 8.9 that happened is 7 times, not 0.7). So the first hooray for Japanese engineering, everything held up.

When the earthquake hit with 8.9, the nuclear reactors all went into automatic shutdown. Within seconds after the earthquake started, the moderator rods had been inserted into the core and nuclear chain reaction of the uranium stopped. Now, the cooling system has to carry away the residual heat. The residual heat load is about 3% of the heat load under normal operating conditions.

The earthquake destroyed the external power supply of the nuclear reactor. That is one of the most serious accidents for a nuclear power plant, and accordingly, a “plant black out” receives a lot of attention when designing backup systems. The power is needed to keep the coolant pumps working. Since the power plant had been shut down, it cannot produce any electricity by itself any more.

Things were going well for an hour. One set of multiple sets of emergency Diesel power generators kicked in and provided the electricity that was needed. Then the Tsunami came, much bigger than people had expected when building the power plant (see above, factor 7). The tsunami took out all multiple sets of backup Diesel generators.

When designing a nuclear power plant, engineers follow a philosophy called “Defense of Depth”. That means that you first build everything to withstand the worst catastrophe you can imagine, and then design the plant in such a way that it can still handle one system failure (that you thought could never happen) after the other. A tsunami taking out all backup power in one swift strike is such a scenario. The last line of defense is putting everything into the third containment (see above), that will keep everything, whatever the mess, moderator rods in our out, core molten or not, inside the reactor.

http://anond.hatelabo.jp/20110314030613

へ続く

2011-02-11

http://anond.hatelabo.jp/20110210174934

insert文の際にもう一個SQL発行するの?

ただでさえwriteボトルネックになるのに更にボトルネックになる箇所増やすの?

信じられないんだけど。。。

2010-10-19

NEC VALUESTAR VW500をリカバリ領域のみで再セットアップするまでのまとめ

自分用および同様の症状で困っている方用ログ

当初の目的ブートエラーからの復帰

友人から起動しなくなったとヘルプが来たので急行

電源ボタンを押し、BIOS起動後、ブート中にこんなエラー

A disk read error occurred

Press Ctrl+Alt+Del to restart

帰省中1ヶ月ほど放置し、久しぶりに電源を押すとエラーが出るようになったらしい。

変なソフトインストールBIOSアップデート等はしていないとのこと。

エラー復旧に1週間も無駄にした挙句挫折

当初はF8キーを押して[詳細ブートオプション]を開ければ、すぐに直せると思っていたけど、

ブートから進まないのだからF8キーを押しても同じエラーが出るだけ。

一応、F2キーBIOS設定画面を開き、[Load Setup Defaults]を試すも症状変わらず。

 

また、VISTAにはXPの[回復コンソール]がなく、[システム回復オプション]という復旧手段が用意されている。

しかし、このマシンプリインストール版なので、ディスクからの起動できない。

この場合はF8キーを押して[詳細ブートオプション]を開いて、そこから起動できるようだ。

・・・・・・\(^o^)/オワタ

 

その後、試行錯誤を繰り返した結果、再セットアップするしかないという結論に至った。

KNOPPIXデータバックアップを取っておこう

バックアップするにもWindowsが起動しないので、こんな時はいつもLinuxOS Knoppixに頼っている。

公式サイトhttp://www.rcis.aist.go.jp/project/knoppix/)ではDVD版とCD版がiso形式で配布されており、DVDなりCDなりに焼けばOSディスク起動できる優れもの

さらにCD版をUSBインストールしたUSB版も作成できるので、非常用に1つ作っておくと便利。

以下、USBKnoppixの作り方。

こちらのサイトUSB-Knoppixではじめよう http://yumenohako.jp/cgi-bin/knoppix/wiki.cgi)を参考に簡単に解説。

【本題】リカバリディスク(再セットアップディスク)をどうやって作る?

このマシンは前述の通りプリインストール版なのでインストールディスク(再セットアップディスク)が付属していない。

では、どうやって再セットアップするかというと、

しかし、今回はF11キーを押してもエラーが表示されるのみ。それにわざわざリカバリディスク作成しているはずもなく手詰まり

リカバリディスクはこちら(http://nx-media.ssnet.co.jp/から購入できるけど価格は1万円。自作するしかない。

そもそも本来はリカバリディスク作成できるのだからHDD内のどこかにリカバリディスク用のデータが入っているはず。

そこで再びKNOPPIXを起動してみると、[NEC-RESTORE]という名前リカバリ領域が隠しパーティションとして用意されていた。

以下、リカバリ領域を使ったリカバリディスクの作り方。

こちらのサイトLaVieレストア顛末記 http://deme.jp/wing/vol019/demeshin/NEC.htm)が大変参考になった。感謝

以上の作業によりHDD故障していない限りはリカバリディスク作成して再セットアップ可能。

ただし、当初のエラーの原因がHDDにある可能性もあるので、HDDを交換してからリカバリディスクを使用した方がいいかもしれない。

今後はCrystalDiskInfoなどのソフトを使用してHDD監視をするつもり。

【失敗】再セットアップ時のエラー

再セットアップが進むと、シマンテック社の「Norton Ghost」というバックアップツールが起動し、1%2%3%...と作業が進行する。

最初にやった時は、50%ほど作業が完了したところでこんなエラーが出現。

Cannot open GHOSTERR.TXT - insert diskette (434)

File Name ? (546)

Output error file to the following location

A:\GHOSTERR.TXT

[OK] [Cancel]

おそらくGHOSTERR.TXTというファイルの出力先が見つからないのだろうとあたりを付けて、

フォーマット済みCD-RWを挿入後、A:をCDドライブのF:に書き換えてOKを押すと

Application Error 19235

Ghost has detected corruption in the image file.

Please perform an integrity check on the image.

if this program persists, please contact Symantec support center

or contact systematec support

どうやらイメージファイルが壊れているらしい。

このイメージファイルとは、前述リカバリディスク作成手順6以降の[拡張子GHSファイル]。GHSGHOSTの略か?

そこで、Disk4,5,6をNERO9体験版太陽誘電製のTHE日本製DVD-Rを使用し、

念のためディスク1枚あたり4GBを超えないようにし、4倍速で焼き直してみたところ、今度は正常に再セットアップが完了。

最初Windowsに標準装備されている[ディスクへの書き込み]+台湾製の安物DVD-Rを使用したのだが、

どこかで焼きミスしたことがエラーの原因だったらしい。

これを教訓に次からは絶対にライティングソフト国産ディスクを使うことにしよう。

(追記10/22)HDD健康状態は「注意」レベル

CrystalDiskInfoを使用してHDDの状態を調べたところ、案の定「注意」レベルだった。

注意項目生の値 
代替処理保留中のセクタB(11
回復不可能セクタ25(37)

※[生の値]の数値はデフォルトが16進数表記。括弧内は10進数に変換した数値。

やっぱり当初のエラーHDD故障とまではいかなくとも寿命が近いということだったのか。

使用時間は17000時間HDDの交換を検討した方が良いけど、一体型の交換は難しいような。

まずはWestern DigitalHDDからData Lifeguard Diagnosticsでゼロフィルをやってみる予定。

エラーチェックで完全に逝くかもしれないけど、バックアップもしてるし、リカバリディスクもあるし。

あと、VistaのバーションはSP1だと思っていたけど、まだ更新していなかった模様。

そこで更新プログラムインストールしてみると途中で止まってしまい、修復スタートアップする羽目に。

(追記10/24WD Data LifeGuard Diagnosticsのゼロフィルで「正常」に回復

Vista SP1の導入に失敗し、修復スタートアップを行ったものの、12時間経っても終わらず。

そこでいっそのことHDDデータを完全に消去して、再セットアップすることにした(7時間ほどかかる)。

方法としては先日のとおり、Western DigitalHDDの診断ツール「Data Lifeguard Diagnostics」を使用する。

このツールはFDD版とCDしかないので、いつものようにUSB版の作成を試みる。以下作り方と使用方法

再セットアップ後、CrystalDiskInfoを実行すると見事に「正常」レベルに回復。

前回注意項目だった「代替処理保留中のセクタ」と「回復不可能セクタ数」の生の値は0に変化。

なぜか使用時間が14000時間に減少していたものの、とりあえずはHDD故障心配はしなくていいかな。

ちなみにSP1の導入は成功。今後はCrystalDiskInfoを常駐させ、監視を続けることにする。

 

(追記11/8/18)そろそろ限界

あれから10か月後、悪夢ブルースクリーン降臨したので、またクリーンインストールを行った。

CrystalDiskInfoを使用してHDDの状態を調べたところ、「注意」レベルに逆戻り。

注意項目生の値 
代替処理保留中のセクタ2D9(729)
回復不可能セクタ70(112)

※[生の値]の数値はデフォルトが16進数表記。括弧内は10進数に変換した数値。

以前のエラー時よりさらに状況が悪化しており、HDD寿命がかなり迫っている模様。

いつ突然死を迎えてもおかしくないので、重要データバックアップのうえHDDの交換を予定。

 

ブログがないので、増田ログ残し。ツッコミや質問はid:frsattiまで。

2010-06-02

TwitterOAuth 許可ページがあまりにも酷いのスクリプト危険

Twitter の OAuth 許可ページがあまりにも酷い => 応急処置 - リタマス

これのGreasemonkey スクリプト危険だったので修正したよ!

twitter-oauth-caution.user.js

どこが危険だったのか

このスクリプトは、本文中にupdate(または更新)が入っている時に警告を出すようになっていたんだけど、これだとチェック漏れバグがあるとwrite権限を要求しているのに警告が出ないのでread onlyのように見えてしまう

人間が本文読めばわかるから大丈夫だろと思うかもしれないけど、このスクリプト使い続けていたら警告が出ない=read onlyだと判断して本文読まなくなるはず

どう修正したか

read onlyの時にも色を変えて警告を出すようにした(writeなら赤、read onlyなら黄)

これで警告表示の色を見れば赤ならwrite黄ならread onlyだとすぐにわかるし、警告がでなかったらなんかおかしいとすぐに気づくはずだ

まとめ

危険なものと安全なものが混ざってる中から危険なものを選り分けても安心はできないけど、安全なものを選り分けたんなら安心できるよね!(これなんか専門用語ありそうだけど僕は知らない

おまけ

最初スクリプトだと https://twitter.com/oauth/authorize?* と https://twitter.com/oauth/authenticate?* で動くようになってたけど、

twitterOAuth認証ページは他にもhttpsのかわりにhttpを使ったものとか、twitter.comのかわりにapi.twitter.comとかがあるから、それらのページでは警告が出なかった

2010-05-20

The great place.

It`s actually the first time I have written to Japanese pases.

My old brother who have been in Japan for long time introduced here to me.He said that I can write my diary right?

Anyway,I`m gonna write about my short trip for Japan.

I myself was wishing to going to Japan because my ex-girlfriend was Japanese and she always told me about "fantastic Japan".In fact in Japan I could have many fantastic experience,very polite servise in even McDonald,an a train that`s time is accurate,so fashinable people,and brabrabra.

However, the reason why I write here about my trip is not to just praise abou Japan.I wanna say something to you gays.Why do you be so surprise when we "foreigner" use chopsticks well? why do you gays be happy when we speak easy Japanese just like "KONNICHIWA"?

Why you call me American before you ask me where my birthplace?

I and some foreigner who come to Japan study about Japan and Japanese because for Love ,but many Japanese think that we do not know about Japan at all.

So please realise that we are not Idiot.We try to understand Japanese culture,Japanese custom,Japanese language.Please just treat us as your friend.

Yesterday I am going to leave here.I could have a lot of special experience.I became much like here than before.But I couldn`t make any friend.

Next time,I wanna make some friend here so please not to treat a foreigher as a foreigher.

PS

Japanese Yakiniku is the most delicious food for my life so far.

2010-02-23

第50回PHP勉強会いってきました

ブログとかもってないんでanondメモメモ

はてな記法とか無視で読みにくいですがゴメンナサイ。

かいたひと→http://twitter.com/chobi_e

follow/unfollowはご自由にどうぞ。

うん、次なんか書くまでにはブログ用意しておこう。

第50回PHP勉強会

===============

会社としてもOpenSocialに関わってるし、個人でもちょいちょい

勉強がてらに手を出しているので参加させていただきました。

会場を提供してくださったコンテンツワンさんありがとうございました。

http://www.contents-one.co.jp/


ほいではメモの公開。

聞き逃しや誤記もあるかと思うので参照はほどほどに。

mixiアプリについて(@Weboo)

=============================

mixi機能の紹介とOpenSocialAPIリファレンス的な説明。

技術的な情報についてはほぼ公開されている範囲内なので、

mixiデベロッパーページを参照ください。

あとは公開するのは微妙なので割愛。

PHPWEB開発を行うようにしてオープンソーシャルアプリを作る(@KuniTsuji)

=======================================================================

CodeIgniterを使ってのmixiアプリ構築についてのお話

OpenSocial開発しているので全て既知の情報だったので

メモがありません。ゴメンナサイ。

要約するとPCはつくるのめんどいけどモバイルだとぺらいちで済むし、

ユーザー認証mixiが全て受け持ってくれるので楽よね!

NDA的に微妙なので詳細割愛

運用した気になるモバイルオープンソーシャル (@cocoitiban)

=========================================================

ウノウさんは社員募集中、@cocoitibanは彼女募集中

@cocoitibanのお仕事

・緊急案件ネガティブ発言

・社内案件で困ると一緒に頭抱えるのがお仕事

会社でもここいちばんと呼ばれているそうです(ココイチ

ウノウサービス

映画生活(ピアに売却)、フォト増、clipp、まちつく

・まちつくについて

位置ゲー、もともとふつうモバイルアプリとして提供していた。(ユーザー数非公開)

http://mt9.jp/

mixiアプリ まちつく(ユーザー数250万人くらい)

 ・リリース

  ・社長がやりたい→同僚がすごい勢いで作成。@cocoitibanは横で傍観

  ・mixiアプリ開発工数がえらい少ない。

モバイルOpenSocialって元のサービスがあれば結構勢いですぐ作れるんですよね。)

  ・mixiアプリオープン日に各社アプリ大盛況

   ・開始数分でロードアベレージが100とかのサーバーが発生

   ・ロードアベレージ1000でも登録できるんだー

   そして、当然のように他社を含め登録ができなくなるw

   ・初日から1週間は1日10万のペースで増えた

    ・mixiに登録しているユーザーだからまちつくに登録という意識は低いっぽいですが

   ・画像生成用のサーバーパフォーマンスが最大の問題に。

    ・ウノウには3時間画像生成をキュー処理に書き換えたやつがいる

    ・ボトルネックになりそうなものを全部退治

    ・できる限り愛されゆるふわコーディング

    ・ハードウェア確実に足りないので購入進める

     ・二日目、三日目と同じように+10万人ってトラフィックをさばかなきゃいけない

   ・リリースから今まで

   ・初期(パフォーマンスアップ)

    ・回線が足りなくなりつつあることに気がつく100Mなのに・・・

    ・画像サーバーを外部へ→ AmazonS3

  ・サーバー間に合わないので一部の機能をEC2

   ・決めてから1週間くらいでリリース

  

  ・ユーザー数が数万想定のコードを書き直し

  ・Memcached適用範囲を増やす

   ・一部機能を企画レベルで見直しふかがひくなるかつ、よりよい動作へ。

  ・初期パフォーマンスアップ

    ・L7ロードバランサふやす

    ・DBマスタ分割

     クエリチューニングされていてCPUやDisk ioのreadはすかすかだけどWriteが痛い事に

    ・ORMの機能をつかって分割

     ・トランザクション上影響ないものを分割

      ・2層コミットとか。、XAトランザクションは適用せず。

    ・サーバー台数的にはそんなにない。

   ・中期

    ・DBサーバ分割も厳しくなってきた

     ・ちょっとだけいいサーバーに置き換え

      →あっさり解決

    ・本格的な機能改善

     ユーザーに不便かけてる機能とかを大幅見直し

    ・社員数増員

     ・8Fに追加して4Fに事務所を移すことに

     ・引っ越し大変でした

    ・課金等をリリース

     ・可能な限り早くしたかったがユーザーに不便をかけている段階ではリリースできなかった。

   ・中期

    ・一部処理をQ4Mに置き換え

     ・EC2とはおわかれできた

     ・EC2は悪くないがサーバーがある現状ではコスト間と運用の体制のにゃー(メモ終わる前に次のページへ)

   ・まとめると

    ・数ヶ月、数人のエンジニアでおこなわれたので長短納期

    ・力業だが安定志向を目指す方がいい

    ・変わったことやると大体トラブって死ぬ

     ・しかし新しい事やらないと間に合わない

  [そのほかメモ]

PHPキュー処理って何使ってます?

   ・Q4M

   ・Gearman

   ・ActiveMQ

 

   ・ワーカーのPHPdaemon化ってどうしよう?

    ・daemontools

    ・自前で実装

    ・そのほかいいのがあれば

   ・キュー処理っているの?

    ・実装クイズ

    ・Friends1000人いて全員取りに行く場合どうする?

    ・本サイト側では追加更新もあるし

    ・キャッシュとして定期的に削除しなきゃだめ

    ・ユーザー数分パッチでとってくる?

    ・いや1000人とってきちゃおうよ

    ・FRIENDSランキング

    ・PCだと事情は違うかもしれない

   ・トラフィックの波が激しい

    ・流入云々でかなり違う

    ・コスト意識的にどう設定したらいいのかが難しい

    ・分散のネックはやはりデータベース

    ・ORMは使うべき

    ・流行るか流行らないか分からないサービスをつくる場合には必要

     ・はやった場合にすぐ分割できるか

      ・トランザクションがネックになる

      ・DBが分かれた場合に二層コミット的なものが必要になる。

       ・XAトランザクション

      ・普通に書いただけでそのコードになるか

      ・トランザクションを正しく処理できるか

    ・KVSとの透過性

    ・逆をいえば上記はコードを綺麗にかけるかどうかなので使わなくてもいいと思う

   ・エンジニアとして思ったこと

    ・EC2はありだけど運用がイントラで運用するのとは違う形になるので経験が必要だと感じた。

    ・AmazoRDSが別の地域で使えるようになるといいなぁ。

   

   ・どきどきするのが課金コストをいやいやでもエンジニア意識せざるを得なくなる

   ・mysql

     ・かなりはやい

   ・半年1年後、国内レベルトラフィックであれば大半のWEBサービスは1台でおk

     ・別案件inno db pluginつかったら半分に

   ・ip_conntrack/iptable

   ・ulimit

   ・Symfony

    ・Symfony使ったけどそんなボトルネックにならなかった的な話。

   ・バッチ処理とかforkで悩むことが多い

# 総評

最近はめっきり大きなトラフィックを扱うことがなかったからちょっと刺激もらえました。

前の会社ではサーバー200台くらい管理してたけど今の会社では数十台程度だし、

そこまでトラフィックもこないのでサーバーエンジニアとしては体たらく気味。

まぁ、業務的には様々な方面でやっているので仕方のない事ですが。

とりあえず現状で出しておいて流行したら確実に死ぬ&寝れなくなるので事前に

コードレビューと対策だけはとっておこうかしらん。

懇親会ももちろん参加させていただきましたが非コミュの私は

震える子鹿のようにただビールをひたすら飲むのでありました。

そんな私に声かけてくださった皆様、ありがとうございます。

名前/ID出していいのか微妙なので割愛させていただきますが、感謝感動雨あられでございます。

そうそう、個人的には今の流行がTwigなので@cocoitibanともうちょっと

お話したかったですが懇親会LTもありーの、飲み過ぎて気持ちわりーので実現せず。

Twigすごく良いとは思うんだけどいまいちドキュメントが少ないので

本当にこれでいいんか?て思うことが結構あるのよねー。

Node周りの実装がぱっと見分かりづらいので難儀。

そいじゃ会社いってきまー

2010-01-14

http://anond.hatelabo.jp/20100113192313

これで40分。

タイムアタックってことでアルゴリズムは全幅探索で書き上げました。

エラーチェック皆無。

A*ならもう5分ほど延びるかな?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Maze
{
    class Program
    {
        // 探索用地図
        static int[,] maze;

        // 始点終点
        static Position Start = new Position(0, 0), Goal = new Position(0, 0);

        static void Main(string[] args)
        {
            //////////////////////////// まずは各行のリストとして読み込み
            string[] inMaze;

            using (var fp = new FileStream(args[0], FileMode.Open, FileAccess.Read))
            using (var iStream = new StreamReader(fp))
                inMaze = iStream.ReadToEnd().Split('\n');

            // 迷路幅
            int height = inMaze.Length;

            // 迷路高さ
            int width = inMaze[0].Length;

            /////////////////////////// 読み込んだ迷路を作業用地図に展開
            maze = new int[width, height];
            for (int y = 0; y < height; ++y)
            {
                string line = inMaze[y];
                for (int x = 0; x < line.Length; ++x)
                {
                    maze[x, y] = line[x] == '*'
                        ? -1
                        : 0;
                    if (line[x] == 'S') Start = new Position(x, y);
                    if (line[x] == 'G') Goal = new Position(x, y);
                }
            }

            // 探索実行
            int dist = Search(maze, Start);

            // 探索結果から最短経路を再現
            Position backTracer = Goal;
            while (dist&gt;1){
                --dist;
                backTracer = backTracer.Nearbys.First(pos =&gt; maze[pos.X,pos.Y] == dist);
                maze[backTracer.X, backTracer.Y] = -2;
            }

            //////////////////// 最短経路こみのアスキー地図に変換
            char[,] outMaze = new char[width, height];

            for (int y = 0; y < height; ++y)
            {
                for (int x = 0; x < width; ++x)
                {
                    outMaze[x, y] = maze[x, y] == -2
                        ? '$'
                        : maze[x, y] == -1
                            ? '*'
                            : ' ';
                }
            }
            outMaze[Start.X, Start.Y] = 'S';
            outMaze[Goal.X, Goal.Y] = 'G';


            ////////////////////// 結果は標準出力に。
            for (int y = 0; y < height; ++y)
            {
                for (int x = 0; x < width; ++x)
                    Console.Write(outMaze[x, y]);
                Console.WriteLine();
            }
            Console.ReadLine();
        }

        /// <summary&gt;
        /// 探索する。SG間の道のりを返す(道のり=SGが隣接しているなら1)
        /// </summary&gt;
        private static int Search(int[,] maze, Position Start)
        {
            List<Position&gt; FrontLine = new List<Position&gt;();
            FrontLine.Add(Start);
            int dist = 1;
            for (; ; )
            {
                List<Position&gt; NextFrontLine = new List<Position&gt;();
                foreach (var pos in FrontLine)
                {
                    foreach (var nextPos in pos.Nearbys)
                    {
                        if (nextPos == Goal) return dist;
                        if (maze[nextPos.X, nextPos.Y] == 0)
                        {
                            maze[nextPos.X, nextPos.Y] = dist;
                            NextFrontLine.Add(nextPos);
                        }
                    }
                }
                FrontLine = NextFrontLine;
                ++dist;
            }
        }
    }

    struct Position
    {
        public readonly int X, Y;
        public Position(int x, int y) { X = x; Y = y; }

        public IEnumerable<Position&gt; Nearbys
        {
            get
            {
                return new[]{
                    new Position(X-1,Y),
                    new Position(X,Y-1),
                    new Position(X+1,Y),
                    new Position(X,Y+1),
                };
            }
        }

        public static bool operator==(Position p1, Position p2){
            return p1.X == p2.X &amp;&amp; p1.Y == p2.Y;
        }

        public static bool operator!=(Position p1, Position p2){
            return p1.X != p2.X || p1.Y != p2.Y;
        }
    }
}

2009-06-17

[] <日本語> にほんご2

[Motivation] 学習の動機を高める having motivation for learning Japanese language

外国語学習する理由、動機を高める学習法という考え方でまとめてみる

[Food]食べ物から
  1. YouTube - Cool Japan!  Food
[Travel]旅行から
  1. FindJPN | We offer plenty of opportunity for cultural activities.

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. Learn Japanese Online! | japanese-lesson.com
  2. Learn.DumbOtaku.com - Where we take the next step beyond just kana
  3. ユッカの会ホームページ
  4. NHK高校講座 | ライブラリー
  5. JapanSoc - #1 Social Bookmarking Site for Japan
  6. Language Learning: from Syvum
  7. Japanese calligraphy | Japanese name translation | Kanji name translation | Japanese symbols for names
  8. Welcome to Able Language Laboratories
  9. Japanese Language School - MLC Meguro Language Center(in Tokyo,Japan)
  10. Learn Japanese On the Web
  11. A Few Japanese Expressions
  12. YouTube - Japanese Lesson - Hiragana 1
  13. Learn Japanese Online - Learn to speak and read Japanese fast with video lessons
  14. 東京大学留学生センター[日本語教育部門]日本語学習室
  15. 国語 文法
  16. 日本語学習支援システム
  17. 文法クイズ
  18. 学習室(岐阜県教育コンテンツ
  19. Learn Japanese - JapanSugoi - Everything Cool about Japan
  20. ポイミ! - ポエム・詩の投稿サイト -
  21. 小説の書き方・リンク集
  22. 日本語俗語辞書 - 若者言葉新語死語流行語

(Information)

  1. Learning Japanese - Japan Forums
  2. The Japanese Page | TheJapanesePage.com
  3. How to write Japanese precisely
  4. johnson banks: phonetikana

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

http://anond.hatelabo.jp/20090218024322

2009-02-18

[] <日本語> にほんご

[Resources] リンク集 Useful Link Resources

学習に役立つリンクを集めた言語学総合サイトなど。

  1. Jim Breen's Japanese Page
  2. Tae Kim’s Blog » Links
  3. Keiko Schneider's Bookmarks
  4. Japanese language learning tools on Web
  5. Learn Japanese - Japanese Language
  6. 授業で使えるWebサイト効果的な使い方
  7. オンライン小説情報リンク集オリジナル・一般向〜
  8. 日本語教材図書館*JLPT日本語能力試験対策と「みんなの日本語」教材データ
  9. Resources for Japanese Students and Educators (The Association of Teachers of Japanese)
  10. 無料でここまでできる→日本語を書くのに役立つサイト20選まとめ 読書猿Classic: between / beyond readers

[English/Japanese] 英語日本語を学ぶ Learning Japanese by English

  1. Jim Breen's Japanese Page
  2. Japanese language learning tools on Web
  3. Charles Kelly's Online Japanese Language Study Materials
  4. Japanese Idioms
  5. All Japanese All The Time Dot Com: How to learn Japanese. On your own, having fun and to fluency. » About
  6. Tae Kim's Japanese guide to Japanese grammar
  7. YASUKO'S NIHONGO HOUSE
  8. The Daily Yo-ji
  9. JGram - The Japanese Grammar database
  10. JPLANG | LOGIN
  11. Japanese: Vocabulary Guide | 日本語: ボキャブラリーガイド
  12. Learn Japanese - Japanese Language
  13. Nihongojouzu
  14. Yahoo! 360° - Japanese for you Everyday♪ - writing a letter 2
  15. Expressions used in Japanese Letters - How to write Japanese letters
  16. My Furusato: Home of Everything Japanese from History to Culture Through Humor and Art and now the Fountain of Youth to fantastic health and less disease.
  17. Japanese Language School - MLC Meguro Language Center(in Tokyo,Japan)

[Japanese/Japanese] 日本語日本語を学ぶ Learning Japanese by Japanese

  1. Learn Japanese--北嶋千鶴子日本語教室 Let's play in Japanese
  2. ひらがなタイムズ/サイトマップ
  3. 日本語勉強 - Japan Forum
  4. 日本語Q&amp;A:スペースアルク
  5. 日本語Q&A
  6. 初級日本語 げんき オンライン:げんきな自習室
  7. nihon5ch.net::::TOP::::日本語言葉日本語の文法を考えるための素材とツール提供するサイト
  8. 日本語教師の教案 みんなの日本語ハンドアウト
  9. 寺村誤用例集データベース
  10. 日本語表現インフォ(小説言葉集):ピンとくる描写が見つかる辞典
[Hiragana] ひらがな
  1. U-biq
  2. Kana Sensei
  3. オンライン日本語学習 (Online Japanese Practice)
  4. ローマ字表 (Chart for Romaji to Hiragana)
  5. POINTひらがなローマ字表|ぴよタイピング
  6. pc_roma.gif (GIF Image, 745x900 pixels)
  7. ひらがな
  8. あいうえお表でひらがなを覚えましょう!
  9. Romaji
[Kanji] 漢字
  1. Read The Kanji | Learn how to read japanese kanji!
  2. 学習ページ(岡山大学 Okayama Univ.)
  3. Learn Japanese Kanji Online : WebCMJ (名古屋大学 Nagoya Univ.)
  4. 初級日本語 げんき オンライン:げんきな自習室
  5. Most Frequent 1000 Kanji of the Japanese Language | Japanese Language Lessons: Let's Learn Japanese!
  6. 漢字の正しい書き順(筆順)のメニュー
  7. 漢字で学ぶ日本語
  8. Happy Rice ~ 漢字勉強しながら寄付をしよう! ~
  9. ▶ How to Learn Japanese Kanji the fun way (Heisig) - YouTube
[Grammer] 文法
  1. Tae Kim's Japanese guide to Japanese grammar
  2. JGram - The Japanese Grammar database
  3. NationMaster - Encyclopedia: Japanese grammar
  4. 日本語の文法のリスト - 一級
  5. ●ことばと文字にかかわるおぼえがき——「クルミノ コーボー」
  6. みんなの日本語 練習
  7. Learn Japanese Grammar Online : WebCMJ
  8. 外国人のための日本語学習について-J-Life
  9. Chopsticks New York
  10. JReK - Japanese Sentence Search

[Dictionary] オンライン辞書 Online Dictionaries

  1. WWWJDIC: Word Search
  2. 英辞郎(eijiro) on the WEB
  3. English to Japanese, Japanese to English On line Dictionary
  4. kanji romaji hiragana convert
  5. Japanese Dictionary Tangorin.com
  6. 漢和辞典 漢字辞書 漢和辞書 [無料]
  7. Wiktionary
  8. 時代日本語類語辞典 類語玉手箱 -- 類語辞典シソーラス

[Translation] 翻訳サイト Free Online Translation Sites

  1. WWWJDIC: Text/Word Translation
  2. Nice Translator - The fast, easy to use online translator

[Tool] 学習ツール Helpful Tools for Learning Language

  1. rikaichan | polarcloud.com
  2. Reading Tutor - チュウ太の道具箱
  3. フナハシ学習塾 ためになる?ページ

[Portal] 学習言語圏のポータルサイトテキストソース Portal Sites of Learning Language / Text Sources

学習言語ポータルサイトなど。

(For Beginners)

  1. Hiragana Times
  2. Yahoo!きっずニュース
  3. 学研キッズネット
  4. キッズ@nifty
  5. キッズgoo

[RSS] RSS feeds

ツールリンクアップデート更新中の教材紹介記事など。

[Podcast] ポッドキャストリスニング教材 Podcasts / Listening Resources

  1. Learn Japanese Pod
  2. Nippon VoiceBlog
  3. Learn Japanese @ Japancast.net
  4. S-J-P Study Japanese Podcast
  5. PodcastDirectory - Japanese Podcast Search Results

[Youtube] 動画学習 Movie Resources

  1. YouTube - Let's Learn Japanese Basic 1: "I'm Yan" [Episode 1, Part A]
  2. Namasennsei's Japanese lessons - YouTube

[Culture] 文化マナー生活習慣 Culture / Manner / Life Style

冠婚葬祭言語生活必要情報など

  1. OK World - Abundant Living Information for foreign residents in Japan
  2. Cultural News
  3. Japan Reference
  4. Web Japan : Top Page
  5. メニュー - 知っておこう 暮らしマナー
  6. Japan With Kids - The interactive online community for English speaking parents in Japan!
  7. みんなの知識【ちょっと便利帳】

[Set up] タイピング基礎、言語入力システムインストール Set up Instructions for the Absolute Beginners.

  1. Japanese Input | Japanese Language Lessons: Let's Learn Japanese!
  2. Google 日本語入力 - ダウンロード

(For Windows)

  1. Installing East Asian Language Support under Windows 2000 Professional
  2. How to set up the Japanese input system
  3. YouTube - learn how to install japanese input support for windows

(For Mac)

  1. macosxhints.com - More Kotoeri (Japanese input) tips

(In case you are using shared computer)

  1. Using Japanese font and IME at Internet Cafe 海外インターネットカフェ日本語を使う (フォント日本語変換IME)
  2. Type in Japanese - Google Transliteration

[Vocabulary] ボキャブラリー、語彙習得

  1. 日本語の文法のリスト - 一級

[News] ニュースソース

  1. くらべる一面 : 新s あらたにす日経朝日読売

[Extensive Reading] 読み物(小説ブログなど) Novels / Blogs

  1. 青空文庫 Aozora Bunko
  2. The Baker Street Bakery > 音声化された青空文庫リンク集
  3. 青空文庫サウンドブックス
  4. 1000文字小説 [1000moji.com]
  5. 翻訳

[Search Word] 検索ワード Words and Sites for Searching Resources

  1. 日本語
  2. 学習
  3. 勉強
  4. 教育
  5. 方法
  6. 教材
  7. 翻訳
  8. 辞書
  9. 便利
  10. 役立つ
  11. 文法
  12. 練習

[Tips] お役立ち記事など

  1. Learn Japanese with Twitter | Jayhan Loves Design &amp; Japan
  2. Beginning to learn Japanese
  3. 日本語文法 - Google ブックス

[Just For Fun] おまけ Bonus Materials

  1. Free Japanese Kanji Translation * JapaName *
  2. Rum and Monkey: The Name Generator Generator
  3. 日本語学マンガ
  4. Nihongo
  5. 感覚!「楽しむ漢字」の辞典
  6. ことわざデータバンク
  7. ユーモア誤用
  8. Funny Japanese mistakes - Japan Forums
  9. 擬音語擬態語 - 日本語を楽しもう! -
  10. Japanese: Vocabulary Guide | 日本語: ボキャブラリーガイド

[Unedited] 未編集備忘録 Transient stock/ Memorandum

  1. NHK高校講座 | ライブラリー
  2. JapanSoc - #1 Social Bookmarking Site for Japan
  3. 小説の書き方・リンク集
  4. 日本語俗語辞書 - 若者言葉新語死語流行語
  5. わかりやす技術文章の書き方

(Information)

  1. Learning Japanese - Japan Forums
  2. The Japanese Page | TheJapanesePage.com
  3. How to write Japanese precisely

語学学習サイト個人的リンクメモ / Lists of Language Learning Links)

http://anond.hatelabo.jp/20090101193230

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