はてなキーワード: messageとは
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://anond.hatelabo.jp/20111006234714 http://twitter.com/i315 さんでしょうか さてわたしも不登校なわけですが,お前とはどうかんがえても方向性が違うので ただおもしろがって見ているだけにしますね!!!! sora_h でした!!! 匿名性ないね!!! 追記: http://twitter.com/#!/Glass_saga/status/124131595606167554 ということでPGP署名を施しました. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQEcBAEBAgAGBQJOlaZiAAoJEIHMzVZz47asMIsH/0AUmA8eAkXrtNzDVX7asUYs 5FO06sNUxMYZEeVDTyOwDsYxjPkDnW7QGe7na7ZRHFm1/WeaYepRhvf7Q4QePCjX B0ZTPwt0liQpRecZIwh615UmDVv5nd6wLJiNNQZqJQc+CMfeT1tzqr/nwuqfTJSz wU1MeVBVaxKbpl+iOIDGu/nbXlcTsNSE0gKieTuLFcoHOmXyKDwbF27+s2vt0TkK oBwJZWZVCQRHTMCLSRc/iAaQnV6zjQpeRPVxyd8fzuLedcArKYGDQsgvpPP7Gycy yxPuJHc5q5Q5LiHVYkcMQ1FzzGTKy7U0b5MIkm6es6qMutPTOM3CA7BA6fuGDgw= =qKpD -----END PGP SIGNATURE-----
gpg: Signature made Wed Oct 12 23:38:26 2011 JST using RSA key ID 73E3B6AC
gpg: Good signature from "Shota Fukumori <sorah@tubusu.net>"
(http://anond.hatelabo.jp/20110409164209からの続き)
今回の未曾有の原子力災害に関しては、政府の災害対策本部の指揮・命令のもと、国を挙げてその対策に当たっているところであり、当学会の気象学・大気科学の関係者が不確実性を伴う情報を提供、あるいは不用意に一般に伝わりかねない手段で交換することは、徒に国の防災対策に関する情報等を混乱させることになりかねません。放射線の影響予測については、国の原子力防災対策の中で、文部科学省等が信頼できる予測システムを整備しており、その予測に基づいて適切な防災情報が提供されることになっています。防災対策の基本は、信頼できる単一の情報を提供し、その情報に基づいて行動することです。会員の皆様はこの点を念頭において適切に対応されるようにお願いしたいと思います。
不確実な情報で混乱させないように注意されたし、という日本気象学会から会員への呼び掛け。自粛要請ではない。
火山防災に携わってきた小山真人静岡大教授は、かつて雲仙岳の噴火で火砕流の危険を伝えることに失敗した経験をふまえ、「通知は『パニック神話』に侵されている。住民は複数の情報を得て、初めて安心したり、避難行動をしたりする。トップが情報統制を命じるのは、学会の自殺宣言に等しい」と話している。
マスメディアや一部の研究者、ネットユーザーはこれに猛反発した。
また、気象学会の方針とは関係ないのだが、時を同じくして別の事実が発覚した。IAEAの要請により気象庁が放射性物質の拡散を連日予測していたが、国内には公表していなかったというもの。マスメディアなどはやはりこれを徹底非難した。
日本政府が公開しないことについて内外の専門家からは批判が上がっており、政府の原発事故に関する情報開示の在り方が改めて問われている。
被ばく医療に詳しい長崎大学の長瀧重信名誉教授は「国は、どれぐらいの被ばくが予想され、どれぐらいの危険があるかをもっと公表し、住民と共に避難などの対策を決めるべきだ」と話すなど、今回のような予測データの公表の在り方を巡ってはさまざまな意見があり、今後検討の対象になりそうです。
本当にめちゃくちゃな話です。これは国民に対する裏切りであり、情報隠蔽と言われても仕方ないと思います。気象庁によれば「要望があれば公表したい」とのことなので、はやく公開して欲しいと思います。ていうか要望するに決まってますやん。
では、何故政府はこれを公表しなかったのか。
つまり、この予測は極めて精度の低く、しかも観測によって裏付けられていない机上の予測。原発から数千kmとか数万km離れた外国では参考になるかも知れないが、原発から1000km圏内の国内ではあまり参考にならないので公表しなかった、という。これは納得できる説明だと思われる。
例えば、東大教授の早野龍五はその1週間以上も前からprediction(予報)よりもpostdiction(検証)すべきだと主張している。
どこの誰だか分からないが、高エネルギー加速器物理が専門というbunogetoも同意見。
枝野官房長官は4日午後の記者会見で、「少なくとも隠す必要のない情報。誤解を生まない説明を付けて、公表すべきだった」と述べた。
政府は公表しなかったことを反省した、というだけ。枝野の説明とか、予測はあくまで予測なのだからあまり信用すべきでないという研究者の声も全然紹介されていない。
つまり、本来はさほど重要でない、というよりも誤解を招き易い情報を公表しなかっただけなのに「隠蔽」と批判され、何故公表しなかったのかをちゃんと説明し、それを支持する研究者もいるのに報道されない。こんなバカな話があるか。
というわけで、読売新聞の説明は不十分、というよりもミスリーディングで、これのために誤解が広まったようです。さて、読売新聞の記者はこれをどういうつもりで書いたのか。本当に意味を知らなかったのか、あるいはわざとやったのか。単に説明不足では済まないように思いますが、どうでしょうか。
日本の研究機関のシミュレーションがなかなか発表されないのは問題なのですが、だからといって外国のシミュレーションを見て「なんの目的で、どのように行なったか」を調べもせずに「大変だ大変だ」と大騒ぎするのも、まずいでしょう。それは結局「デマ」以外のなにものでもありません。これをなんの注釈もなく紹介したマスコミや「大変だ」と大騒ぎしたジャーナリストなどは、情報を読む能力がないだけでなく、「デマの発生源」にもなっているわけですから、反省してもらいたいものです。訂正なり反省なりがない限り、僕ならその人たちの言うことを今後信じませんね。
次の産経の記事も大同小異。
ドイツや英国、フランス、オーストリアなどの気象当局や原子力当局が、福島第1原発から放出された放射性物質の拡散状況を独自に予測、ホームページ上で公開し、注目を集めている。こうした背景には、1986年に起きた旧ソ連のチェルノブイリ原発事故で放射性物質が欧州に飛来し、飲料水や野菜などが汚染されたことがある。国際原子力機関(IAEA)からの要請を受け、日本の気象庁も放射性物質の拡散予測を行っているが「仮定の数値のため、予測精度が低い」として5日まで非公表にしてきたのとは対照的。インターネット上では「日本政府は頼りにできない。貴重な情報源だ」などと評価する声が多い。
読売と異なり、産経では日本政府が気象庁の予測を公開しなかった理由も紹介している。ただし、専門家の意見は紹介せず、「日本政府は頼りにできない」というネットユーザーの声を紹介。ド素人のネットユーザーからの評価なんてどうでもいいだろ、バカ。
政府や東電がより多くの情報を公表提供するだけならば、さほど問題はない。しかし、それを国民に周知させるマスメディアは、周知させるべき情報を精選しなければならない。
このようなときに、「学問」の本質が判っている学者はどういうふうに発言するでしょうか。「学問的に、わたくしの研究では100ミリシーベルトぐらいまでは大丈夫だと思います。しかし一部に、100ミリシーベルトを浴びると1000人の内に5人から10人の人がガン(過剰発がん)になるという結果もあります。もともと学問は、真実が判っているわけではないので、皆さんはできるだけ放射線に被曝しないように気をつけてください。学者は新しい知見があれば論文を出すことができますが、皆さんの健康は損なわれると元に戻ることはできません。従って、国際放射線防護委員会で決められたように安全という意味では、「1年間に1ミリシーベルト」を目安に生活設計をされた方がよいと思います。お役所も市民を守るのが役目ですから、法律に基づいた値で市民の健康を守ってください。」今、福島市で行われていること、学問的に言えば「人体実験」ということができます。つまり学問は「100ミリシーベルトだから大丈夫だ」ということを断定的にいう事ができないのですから、学者が自分の判断で勝手に被曝量を決めるということは、学問の本質に反することなのです。
通説では人体に危険がないとされている100ミリシーベルとの被曝でも、人体に有害だとする研究が一部にあるという。しかしだからと言って、
従って、国際放射線防護委員会で決められたように安全という意味では、「1年間に1ミリシーベルト」を目安に生活設計をされた方がよいと思います。
などと忠告することは完全に間違っている。100ミリシーベルとの被曝ならば人体に危険がないと証明することは、悪魔の証明に近い。考慮する必要のない可能性まで考慮していたら、人は何も出来なくなってしまう。
例えば、被災地で「外国人窃盗団」「雨当たれば被曝」などのデマが広がっているという。
では、これがデマだと証明することが出来るだろうか。「外国人窃盗団が横行しているが、警察が把握できていないだけかも知れない」「雨に当たれば被曝するが、現在の科学が観測できていないだけかも知れない」という可能性は決して皆無でない。しかしだからと言って、そのような皆無に近い可能性を警察や現代科学よりも信用するのは完全に間違っている。
これは原発事故についても同様だ。福島の原発が暴走して日本とブラジルを一つの穴で繋いでしまう可能性も、月が明日地球に落下する可能性と同じく決して皆無でない。しかしそのような考慮すべきでない可能性を、たとえ「可能性」としてでも発信したならば、異常な状況にあって判断力の低下している人たちは少なからず混乱するだろう。
いや、彼らが言っているのは可能性の話なので。原発の事故に関しては、必ず最悪の事態を想定して書いて、その上で現状はこうですよ、というのは正しい報道の仕方だと思います。日本のように「安心です、安全です。逃げなくていいです」って新聞やテレビが言っちゃ駄目ですよね。海外メディアの取り上げ方は、全然問題ないと思います。不安を煽るのではなくて「ここまでになる可能性はあります。ただし、現状はこういう状態なので、今は安心してください」とやればいいわけですから。
これも大いなる幻想によるものだ。毎日様々な事象について「これこれこういう可能性もあるが、しかしこれこれこういう理由により現在は安全だ」と報道しても、人々が正しく理解できるとは考え難い。
プレゼン用語に「take home message」というものがある。「これだけは覚えて帰って欲しい要点」の意味だ。そして結局のところ、国民が覚えて帰りたがっているのは、現在自分は安全かどうかということでしかない。その要点のみを強調し、必要でない情報を強調しないことは決して間違いでない。
【ベルリン=弓削雅人】国連の放射線影響科学委員会(事務局・ウィーン)のワイス委員長は6日、福島第1原発事故について「チェルノブイリ原発事故(1986年)と、米スリーマイル島原発事故(79年)の中間」との見解を示した。事故の国際評価では「レベル6(大事故)」に当たる。AP通信が伝えた。
ワイス委員長は「(第1原発事故は)チェルノブイリほど大規模ではないが、スリーマイルより深刻であることは確かだ」と述べた。チェルノブイリは「レベル7(深刻な事故)」と最悪の評価を受けている。
一方、第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.
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
へ続く
w
その人は見つかりませんでした。スペルは合っていますか?
d
Send 'm username message' to send a (private) message. You may reply to a message the same way.
f
Send 'follow @username' to follow one's tweets, e.g. 'follow @jack'. Have your friends send 'follow @testmanand007' to get your tweets
g
その人は見つかりませんでした。スペルは合っていますか?
l
Send 'leave username' to stop following someone. Send 'follow username' to follow again.
m
Send 'm username message' to send a (private) message. You may reply to a message the same way.
*
その人は見つかりませんでした。スペルは合っていますか?
改行
Something is technically wrong. Please try again in a moment.
pタグやdivタグのclass要素を指定できるのでHTMLでそのまま記述する。
いつくかはてなダイアリーでの使用可能なはてな記法は無効になっており、例えばキーワードリンク無効記法が使えないためフォントカラーが キーワードリンクの黒に潰されちゃうかんじ。
以下サンプル。アルファベットはクラス名(自動アンカーついていててコピペしにくい。ソースみたほうがいいかも)。
オブジェクトのシリアライズツールであるプロトコルバッファについて書きます。
Protocol Buffers 本家
http://code.google.com/apis/protocolbuffers/
XMLはもう不要!? Google製シリアライズツール「Protocol Buffer」
http://journal.mycom.co.jp/articles/2008/07/18/protocolbuffer/index.html
Protocol Buffers (Protocol Buffers の内部解説記事。とても参考になります)
http://dodgson.org/omo/t/?date=20080712
プロトコルバッファは異種言語間でオブジェクトのやりとりをするための規格です。
独自の言語によりオブジェクトのインターフェースを規定することで、多言語対応を行っています。
例えばこんな感じ。
package tutorial; message Person { required string name = 1; required int32 id = 2; // Unique ID number for this person. optional string email = 3; enum PhoneType { MOBILE = 0; HOME = 1; WORK = 2; } message PhoneNumber { required string number = 1; optional PhoneType type = 2 [default = HOME]; } repeated PhoneNumber phone = 4; } // Our address book file is just one of these. message AddressBook { repeated Person person = 1; }
以上のようなprotoファイルから各言語のソースコード、または何らかのデータ操作ライブラリを使いオブジェクトの処理を行います。
googleによってC++, Java, Python用のライブラリが作成されましたが、他の言語に対応したサードパーティー製のライブラリがいくらでもあるので、実質的にほぼすべての言語で使えると言っても過言ではありません。
数字が多きければ大きいほど、長いバイト長で保存されます。ただし、負数の場合は符号ビットが立つ関係で、ほとんど常に変換後のバイト数が最長バイト数(10)になってしまいます。フィールドの型をsint32, sint64で宣言しると、各数値にzig-zags変換が行われるため、負数であってもその値の絶対値で使用バイト数が決まるようになります。
バイナリに保存されるデータは各メッセージのID/型/値のみです。なので、同じ定義の二つのメッセージ型は、プロトコルバッファ上では全く同じように扱うことが出来ます。例えば、片方からシリアライズしたデータを、もう片方の型でデシリアライズすることが可能です。
またオブジェクトを連続でシリアライズ/デシリアライズすることもできます。
すでに存在する継承関係のあるクラスを、Protocol Buffersでシリアライズ/デシリアライズしたい場合は次のようにします。
(ソースコード中になぜか日本語が書けないので、コメントはすべて英語になっています)
message PbBase { require int32 id = 1; require int32 value = 2; require Derived derived = 10; // - Point !!! } message PbDerived { require string string_value = 1; }
継承元のメッセージの定義に、継承先のメッセージを持たせます。Baseを継承するクラスをシリアライズ/デシリアライズしたい場合は、PbBaseメッセージを中心に処理を行うことで、比較的簡単に処理を実装することが出来ます。
例えばこんな感じ
Base *Base_DeserializeFrom(PbBase &amp;pbobj) { // Arrange the classes which inherits from Base. if (pbobj.has_derived()) { return new Derived(pbobj); } else ... } class Base { ... virtual void Base::SerializeTo(PbBase &amp;pbobj) { // Set the fields of 'pbobj', } ... }; class Derived { ... virtual void Base::SerializeTo(PbBase &amp;pbobj) { PbDerived *derived = pbobj.mutable_derived(); Base::SerializeTo(pbobj); // Set the fields of 'derived', ... } ... };
protoファイルを以下のように書くと、メッセージの扱いが非常に難しくなります。
message PbBase { require int32 id = 1; require int32 value = 2; } message PbDerived { required PbBase base = 1; // - Here is the point !!! require string string_value = 2; }
仕事切り上げて
How to Begin and End Email
Beginnings and endings are a challenge in most activities, but in email getting off to a good start and ending positively will strengthen the communication and increase understanding.
Start with a specific subject line.
Choose the better subject line in each pair below:
1. a. New Phones
b. New Phone Installation: Your Action Required
2. a. Update on Development of Sales Model
3. a. Summer newsletter
b. 10 Great Tips for Summer vacation
In number 1, the second choice conveys a sense of urgency and action, whereas the first choice falls flat. In 2, the longer title focuses the reader on which update the email is explaining. In 3, you don’t really have much choice. Who would take a?
Next comes the greeting.
Examples:
• Hi, Fred and Lauri.
• Hi, team.
• Greetings, everyone
• Good morning, Sayed. (If Sayed this message in the morning)
• Jian, we are looking forward to meeting you next week.
• To: Finance and Administration Team
• To all employees:
• David,
• Ruth, Mala and Felicia:
The last five examples must be on a separate line at the top of the message. All the others can be either a separate line or at the beginning of a paragraph.
Choose the greeting that matches your relationship with the reader(s) and the purpose of the message. “Hi” is friendly but too informal in certain situations—for example, in response to a request for a proposal. “Hello” is friendly and professional. “Hey”is too informal and slangy for most messages.
“To” followed by a pronoun like “all” or the name of a group sounds professional but does not convey warmth. Warmth is required in all messages, but please remember that you must always consider the position of the receiver.
Avoid gender-based greetings such as “Ladies.” Even if the group you are writing it is all women, some among them will object to this greeting.
Do not greet people whose name is included on the Cc line. Only greet people whose names are on the To line of the email.
The punctuation of greetings is a topic for discussion. All the punctuation used in the list above is correct. Some people use “Hi team” and “Hello Robin” without the comma, but traditional writers retain the comma. The reason is that these words are in “direct address.” When we directly address the reader, as in “Hi, team” (or in the example that begins with “Jian”) the name is separated from the other words by a comma.
“Dear Mr. Mathews” is followed by a colon in a business letter and in an email that replaces a business letter. However, it is also acceptable to use a comma after a
“Dear” greeting in a business email.
In a quick exchange of email with someone it is not necessary to continually greet your reader. Compare such an exchange with putting the person on hold on the telephone. When you return to the phone call, you say, “Thanks for holding. I have the information: rather than “Hi Laurie.”
The last sentence of an email is like the last words of a phone call. They may be a quick signoff or a courteous close, depending on the formality of the communication.
Examples:
• See you in Tokyo!
• Have a great trip!
• I will email you in August to schedule lunch.
• Please call me again with any questions
• Thanks again for all your help with the design.
• Thank you for your cooperation. We appreciate the opportunity to work with you.
Avoid continually using “Have a great day!” or similar expression as your closing sentence. It became meaningless with constant use and it is a bad fit with email that communicates a policy or serious announcement.
It is not wise to save a request for action or approval until the end of the message. Email readers do not read to the end of a message when they believe they have gotten the main point already.
A complimentary close—yes or no?
Business letters typicall end with phrases called “complimentary closes” such as “Sincerely yours,” “Best wishes,”and “Best regards.” A complimentary close is not required in email. However, business email often uses such a close to sound formal, look professional, or simply communicate courteously.
Examples:
• Sincerely,(the most formal of the list)
• Best regards, (professional)
• Warm regards, (professional and warm, as you would expect)
• Regards, (less friendly than the other 2 regards choices)
• With best wishes, (or) Best wishes, ( professional)
• With thanks, (professional and grateful)
• Ciao! (friendly and rather informal)
• Cheers, (friendly)
A word like “Greetings” does not belong in a close. It may be used in the last sentence, though, to greet others who might see the message:
• Please give our greetings to Dr. Carr
• Greetings to your colleagues in Systems Research
Although people frequently use “Thanks” as a close, it is not standard, and careful writers avoid it. Do not use “Thanks in advance” as a close, because many people find it presumptuous. Rather than “Thanks” or “Thanks in advance,” create a better sentence, such as “Thanks for considering my request.” Or use “With thanks” as a complimentary close followed by a comma.
Advice for those who receive less-than-perfect Email. You will sometimes receive email that is less than perfect, which means you might feel a bit offended by them. My advice to you on this is to get through them and leave them behind. Bring a bright smile to your face and a kind tone to your email reply. Forgive those whose writing was clumsy, abrupt, or annoying. They were merely experiencing moments of being human and imperfect.
http://tedxtokyoyz.com/program/
http://tedxtokyoyz.com/files/TEDxTokyoyz_program.pdf より
13:00 - 13:15 15min Welcome message "What's TEDx and TEDxTokyo yz?"
13:15 - 13-40 25min Open Reel Ensemble
13:40 - 13:50 10min Nosigner
13:50 - 14:00 10min 高木 美香
14:00 - 14:15 15min TED Talk:Kiran Ver Sethi
14:15 - 14:35 20min Chuck Sandy
14:35 - 14:45 10min 岡美織
14:45 - 14:55 10min TED Talk:Derek Sivers
15:55 - 16:05 10min 川上 俊
16:05 - 16:20 15min TED Talk : Erin McKean
16:20 - 16:35 15min 菅野康太
16:35 - 16:55 10min ACCI BABA
16:55 - 17:35 40min Workshop
17:35 - 17:45 15min TED Talk : Tom Wutijec
17:45 - 17:55 10min Annie Virnig
17:55 - 18:10 15min 兼松佳宏
18:10 - 18:15 05min Closing "Now What?"
JRuby上で動くRubyとJavaのログを同じファイルに保存したいときなど
JRuby界隈で何かいい方法ないかな~と探していたけど見つからないので
RubyのLoggerのインターフェースをcommons-loggingを使用して実装してみた
使用バージョンは以下
require 'logger' class CommonsLoggingLogger def initialize(name="ruby") @progname = nil @logger = org.apache.commons.logging.LogFactory.getLog(name) end def add(severity, message=nil, progname=@progname, &amp;block) if message.nil? and block_given? message = yield end case severity when Logger::DEBUG debug(progname){message} when Logger::INFO info(progname){message} when Logger::WARN warn(progname){message} when Logger::ERROR error(progname){message} else fatal(progname){message} end end def debug(arg0=nil, &amp;block) @logger.debug make_log(arg0, &amp;block) end def info(arg0=nil, &amp;block) @logger.info make_log(arg0, &amp;block) end def warn(arg0=nil, &amp;block) @logger.warn make_log(arg0, &amp;block) end def error(arg0=nil, &amp;block) @logger.error make_log(arg0, &amp;block) end def fatal(arg0=nil, &amp;block) @logger.fatal make_log(arg0, &amp;block) end def debug? @logger.isDebugEnabled end def info? @logger.isInfoEnabled end def warn? @logger.isWarnEnabled end def error? @logger.isErrorEnabled end def fatal? @logger.isFatalEnabled end def level if debug? Logger::DEBUG elsif info? Logger::INFO elsif warn? Logger::WARN elsif error? Logger::ERROR else Logger::FATAL end end def level=(lv) #do nothing end def sev_threshold level end def sev_threshold=(lv) #do nothing end def datetime_format nil end def datetime_format=(fm) #do nothing end attr_accessor :progname private def make_log(message_or_progname, &amp;block) if block_given? progname = message_or_progname || @progname message = yield else progname = @progname message = message_or_progname end progname_message(progname, message) end def progname_message(progname, message) progname.nil? ? message : "#{progname}: #{message}" end end
デンマーク戦及び総括 -Vancouver 2010 Winter Olympics
ttp://www.teamaomori.com/message/van_rep_den/index.htm
デンマークにも敗退し、3勝6敗の8位。
これが日本代表の最終成績でした。 情けない結果に痛烈な怒りを感じてます。 過ごし慣れたバンクーバーでの五輪。
恵まれた職場環境の中で練習させていただき、挑んだ最高の五輪へのシチュエーション。 選手が競技に集中できる環境を作ってきた事が、結果的に繋が りませでした。
チーム・協会関係者でもう一度しっかり話し合って世界に通用 するチームの強化と方針を固めていかなければなりません。 最後に、多額な渡航費をかけて会場までお越しいただいたフ ァンの方、所属会社・スポンサー各社の方々。
早朝から深夜まで取材していただいたマスメディアの方々。
近藤 学
針君、どこ行ってもうたんや・・
July 30, 2009 04:39 UTC
This is an Open Letter to Lance Davis from fellow CentOS Developers
5年前に入社した針君は、全然仕事をしません。
It is regrettable that we are forced to send this letter but we are left with no other options. For some time now we have been attempting to resolve these problems:
手紙には、遺憾ながら解決手段を書いておくったのだが、ふたを開けてみたら、、
You seem to have crawled into a hole ... and this is not acceptable.
タバコを吸いに出たらいつまでたっても穴から戻ってこないし、
You have long promised a statement of CentOS project funds; to this date this has not appeared.
You hold sole control of the centos.org domain with no deputy; this is not proper.
ドメインを任せてもいい加減でお客さんから大目玉を食らうし、
You have, it seems, sole 'Founders' rights in the IRC channels with no deputy ; this is not proper.
全く困ったもんなんです。
Please do not kill CentOS through your fear of shared management of the project.
Clearly the project dies if all the developers walk away.
でもねもう、彼を首にしてしまったら、
次に使ってくれるところはないんじゃないかと思って、我慢しています。
When I (Russ) try to call the phone numbers for UK Linux, and for you individually, I get a telco intercept 'Lines are temporarily busy' for the last two weeks. Finally yesterday, a voicemail in your voice picked up, and I left a message urgently requesting a reply. Karanbir also reports calling and leaving messages without your reply.
そんな彼ですが、返事はまるっきりだめでも、
根気よくかけていれば、留守番電話が見つかるもんです。
Please contact me, or any other signer of this letter at once, to arrange for the required information to keep the project alive at the 'centos.org' domain.
今回も、すごい復帰は望んでいません。
針くんよりもプロジェクトができれば、御の字です。
でも、期待しています。
あなたに、うちのプロジェクトの将来がかかっているんですから。
Sincerely,
親愛なる・・・
参考:
http://blog.kenichimaehashi.com/?article=12489718770
http://blog.kenichimaehashi.com/?article=12491035180
UserAgentなしでアクセスすると。。
http://marj.jp/
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at com.hmsystems.common.struts.extension.HmsActionServlet.process(HmsActionServlet.java:28) ...
http://pkga.jp/
HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException at com.hmsystems.sns.presentation.struts.RequestProcessor.processForwardConfig(RequestProcessor.java:91) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at com.hmsystems.common.struts.extension.HmsActionServlet.process(HmsActionServlet.java:28) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:696) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
両方ともHM SYSTEMSさんが作っていたんですね。
http://www.youtube.com/watch?v=k6_1P2EKKYo&feature=PlayList&p=56E3E51E650A4CE7&index=0
Mac OSX 10.5.6にて。
GnuCash とかいう家計簿ソフトをインストールしてみたわけだが、起動しない。
どうしたものか。
[***:~] ***% sudo port install gnucash Password: ---> Fetching gnucash ---> Verifying checksum(s) for gnucash ---> Extracting gnucash ---> Applying patches to gnucash ---> Configuring gnucash ---> Building gnucash ---> Staging gnucash into destroot ---> Installing gnucash @2.2.9_0 ---> Activating gnucash @2.2.9_0 ---> Cleaning gnucash [***:~] ***% gnucash gnc.bin-Message: main: binreloc relocation support was disabled at configure time. Xlib: extension "RANDR" missing on display "/tmp/launch-6BB0ZT/:0". The application 'gnucash' lost its connection to the display /tmp/launch-6BB0ZT/:0; most likely the X server was shut down or you killed/destroyed the application.
村上春樹講演英文と和訳まとめ(仮)http://anond.hatelabo.jp/20090219051511
の付録として、共同通信=Kと毎日新聞=Mの英文を対照させてみました。
英文
(ハアレツ紙)http://www.haaretz.com/hasen/spages/1064909.html
(共同通信47News=K)http://www.47news.jp/47topics/e/93880.php
(毎日新聞=Mの前半)http://mdn.mainichi.jp/mdnnews/news/20090302p2a00m0na004000c.html
和訳
(K和訳)http://www.47news.jp/47topics/e/93925.php
(M前半和訳)http://mainichi.jp/enta/art/news/20090302mog00m040057000c.html
Kとの類似から、Mはテープから起した英文のようです。ただし、「失礼しました、大統領」(M前半和訳)に相当する部分は書き起こされていません。K和訳は、ハアレツ紙のみにある’’ This is an impression, of course, that I would not wish to give. I do not approve of any war, and I do not support any nation.’’にあたる部分を含んでいますが、M前半和訳はそれを含みません。
前回同様、番号は便宜的につけただけ。
1
(K)Politicians do it, too, as we all know.
(M)Some politicians do it, too, as we all know.
2
(K)The lies of novelists differ from others, however,
(M)The lies of novelists, however, differ from others,
3
4
5
6
(K)where the truth-lies within us,
(M)where the truth lies within us,
7
(K)a few days in the year when I do not engage in telling lies,
(M)a few days in the year I do not engage in telling lies,
8
9
(K)Some even warned me they would instigate a boycott
(M)Some even warned me that they would instigate a boycott
10
(K)after receiving notice of the award,
(M)after receiving notice of this award,
11
(K)accepting a literary prize was the proper thing to do, whether
(M)accepting a literary prize is a proper thing to do, and whether
12
13
14
(K)Perhaps, like many other novelists,
(M)Like many other novelists,
15
(K)If people are telling me—and especially if they are warning me— “Don’t go there,” “Don’t do that,” I tend to want to
(M)If people are telling me, and especially if they are warning me, “Don’t go there,” or “Don’t do that,” I tend to … want to
16
(K)They cannot genuinely trust anything they have not seen
(M)They cannot genuinely trust anything that they haven’t seen
17
(K)Please do allow me to deliver a message, one very personal message. It is something that I always keep in mind
(M)So, please do allow me to deliver a message--one very personal message. It is something I keep in my mind … always keep in mind
18
(K)it is carved into the wall of my mind, and it goes
(M)it is carved into the wall of my mind. It goes
19
(K)no matter how right the wall may be and how wrong the egg,
(M)no matter how right the wall may be, how wrong the egg,
20
(K)What is the meaning of this metaphor?
(M)What is the meaning of this metaphor, of the wall and the egg?
21
(K)The eggs are the unarmed civilians who are crushed and burned and shot by them.
(M)The eggs are unarmed civilians who are crushed, burned and shot by them.
22
(K)This is one meaning of the metaphor.
(M)This is one meaning of this metaphor that is true.
(つづく)
http://mainichi.jp/enta/art/news/20090302mog00m040057000c.html?link_id=TT002
署名記事: ハアレツ紙 http://www.haaretz.com/hasen/spages/1064909.html
テープ起こし: 共同通信 http://www.47news.jp/47topics/e/93880.php
テープ起こし: 毎日新聞(前半) http://mdn.mainichi.jp/mdnnews/news/20090302p2a00m0na004000c.html
毎日新聞(後半) http://mdn.mainichi.jp/mdnnews/national/news/20090303p2g00m0dm005000c.html
(ハアレツ紙より)
増田さん訳: http://anond.hatelabo.jp/20090218005155
sho_ta さん訳: http://d.hatena.ne.jp/sho_ta/20090218/1234913290
びじうさん訳: http://blog.livedoor.jp/bijoux_iris/archives/51179283.html
finalvent さん訳: http://finalvent.cocolog-nifty.com/fareastblog/2009/02/post-1345.html
ちぶぞうさん訳: http://lsi.cocolog-nifty.com/blog/2009/02/post-118d.html
wh_cm さん訳: http://d.hatena.ne.jp/wh_cm/20090218
mousecat さん訳: http://www.geocities.co.jp/Playtown-Spade/2177/diary0902.html#20090218
fujipon さん訳: http://d.hatena.ne.jp/fujipon/20090218#p1
adfjpn さん訳: http://d.hatena.ne.jp/adfjpn/20090218
yu-kuboさん訳: http://www3.atwiki.jp/cloud9science/pages/121.html
m_debuggerさん訳: http://d.hatena.ne.jp/m_debugger/20090218/1234917019
youghsoroさん訳: http://d.hatena.ne.jp/youghsoro/20090219
maki555さん訳: http://maki555.blog88.fc2.com/blog-entry-1161.html
Ryo-maさん訳: http://ameblo.jp/fwic7889/entry-10210795708.html
chorocoさん訳: http://choroco.tumblr.com/post/79548962
giantpandaさん訳: http://d.hatena.ne.jp/giantpanda/20090220
適当社長さん訳: http://ameblo.jp/at-nine/entry-10210524463.html
細馬さん訳: http://12kai.com/murakami_jerusalem.html
(共同通信より)
共同通信訳: http://www.47news.jp/47topics/e/93879.php
ただし、共同通信記事では省略されているハアレツ紙記事の内容が含まれていたり、単語が落ちていたりするので、英文ともども最終版なのかは注意が必要。
共同通信訳微修正版: http://www.47news.jp/47topics/e/93925.php
変更箇所
(前)父が朝食前に毎日、長く深い仏教の祈りを捧げている
(後)父が朝食前に毎日、長く深いお経を上げている
(毎日新聞より)
毎日新聞訳(前半):http://mainichi.jp/enta/art/news/20090302mog00m040057000c.html
毎日新聞訳(後半I):http://mainichi.jp/enta/art/news/20090303dde018040076000c.html
毎日新聞訳(後半II):http://mainichi.jp/enta/art/news/20090303dde018040076000c2.html
番号は便宜的につけただけ。
1
(H)I have come to Jerusalem today as a novelist,
(K)Good evening. I have come to Jerusalem today as a novelist,
2
(H)Diplomats and military men
(K)Diplomats and generals
3
(H)no one criticizes the novelist as immoral for telling them
(K)no one criticizes the novelist as immoral for telling lies
4
5
(H)we first have to clarify where the truth lies within us.
(K)we first have to clarify where the truth-lies within us, within ourselves.
6
7
8
(H)in the blockaded Gaza City
(K)in the blockaded city of Gaza
9
(H)unleash its overwhelming military power. This is an impression, of course, that I would not wish to give. I do not approve of any war, and I do not support any nation. Neither, of course, do I wish to see my books subjected to a boycott.
(K)unleash its overwhelming military power. Neither, of course, do I wish to see my books subjected to a boycott.
10
(H)I chose to speak to you rather than to say nothing.
This is not to say that I am here to deliver a political message. To make judgments about right and wrong is one of the novelist's most important duties, of course.
It is left to each writer, however, to decide upon the form in which he or she will convey those judgments to others. I myself prefer to transform them into stories - stories that tend toward the surreal. Which is why I do not intend to stand before you today delivering a direct political message.
Please do
(K)I chose to speak to you rather than to say nothing.
Please do
11
(H)Please do, however, allow me to deliver one very personal message.
(K)Please do allow me to deliver a message, one very personal message.
12
(H)Someone else will have to decide what is right and what is wrong; perhaps time or history will decide
(K)Someone else will have to decide what is right and what is wrong; perhaps time or history will do it
13
14
(H)This is not all, though.
(K)But this is not all.
15
(H)The System
(K)the System
16
(H)I fully believe it is the novelist’s job
(K)I truly believe it is the novelist’s job
17
18
19
20
(H)the people who had died in the war.
(K)the people who had died in the battlefield.
21
(H)individuals transcending nationality and race and religion, fragile eggs
(K)individuals transcending nationality and race and religion, and we are all fragile eggs
22
(H)and from the warmth we gain by joining souls together.
(K)and from our believing in the warmth we gain by joining souls together.
23
(H)I am grateful that my books are being read by people in many parts of the world. And I am glad to have had the opportunity to speak to you here today.
(K)I am grateful that my books are being read by people in many parts of the world. And I would like to express my gratitude to the readers in Israel. You are the biggest reason why I am here. And I hope we are sharing something, something very meaningful. And I am glad to have had the opportunity to speak to you here today. Thank you very much.
英語読みの読者が思い浮かべるのは、やはり''Hard-boiled Wonderland and the End of the World''(『世界の終りとハードボイルド・ワンダーランド』の英訳)になるでしょうか。パレスチナを念頭に置いて見ると、''The End of the World''の地図は強烈に感じるものがあります。私は主人公(=作者)の選択と「卵の未来」について思いを馳せました(このような読みの良し悪しは脇に置きます)。
追記:
adfjpnさん訳へのリンクを追加
yu-kuboさん訳、m_debuggerさん訳、youghsoroさん訳へのリンクを追加
共同通信訳微修正版へのリンクと変更箇所の引用、蛇足としての感想を追加
maki555さん訳、Ryo-maさん訳、chorocoさん訳へのリンクを追加、蛇足部分の誤記を訂正、追記が増えたため見出し化
蛇足部分の訂正箇所
giantpandaさん訳、適当社長さん訳、細馬さん訳へのリンクを追加
付録II http://anond.hatelabo.jp/20090302222413 を別に作成、リンクを追加
付録III http://anond.hatelabo.jp/20090303214139 を別に作成、リンクを追加
せっかく書いたから匿名でのせてみるよ
使い方は
必要なものを gem で取ってくるにはこうすればいいよ
長すぎてelispが消えたから続きがあるよ
@echo off setlocal set WD=%~dp0 cd /d %WD% ruby get_movies.rb ruby get_images.rb ruby create_m3u.rb
user: ユーザID password: パスワード ids_file: ids.txt done_file: ids_done.txt movies_dir: movies log4r_config: pre_config: global: INFO loggers: - name: app type: Log4r::Logger level: INFO outputters: - STDOUT - FILE outputters: - name: STDOUT type: Log4r::StdoutOutputter formatter: type: Log4r::PatternFormatter pattern: "%d [%l] %C - %M" date_pattern: "%H:%M:%S" - name: FILE type: Log4r::FileOutputter filename: "#{LOGDIR}/sangels.log" formatter: type: Log4r::PatternFormatter pattern: "%d [%l] %C - %M" date_pattern: "%Y-%m-%d %H:%M:%S"
require 'fileutils' require 'logger' require 'mechanize' BASEDIR = File.dirname($0) require "#{BASEDIR}/util" require "#{BASEDIR}/sangels" $config = load_config(BASEDIR) prepare_logger(BASEDIR) $log = new_logger("get_movies") WWW::Mechanize.log = new_logger("mechanize") WGet.log = $log class IDFile def initialize(file) @file = file unless File.exist?(@file) Fileutils.touch(@file) end end def ids(contains_comment = nil) File.open(@file) {|io| io.to_a.map {|x| x.chomp }.select {|x| if x.empty? nil elsif contains_comment true else not /^\s*\#/ =~ x end } } end def add(id) ids = ids(true) unless ids.any? {|x| x == id} write(ids + [id]) end end def delete(id) ids = ids(true) if ids.any? {|x| x == id} write(ids - [id]) end end def write(ids) File.open(@file, "w") {|io| ids.each {|x| io.puts x} } end end $log.info("BEGIN #{$0} ================") exit_code = 0 begin ids_file = IDFile.new($config.ids_file) done_file = IDFile.new($config.done_file) movies_dir = $config.movies_dir wget = WGet.new sangels = SAngels.new sangels.login($config.user, $config.password) ids_file.ids.each {|id| begin movies = sangels.movies(id) rescue SAngels::Movies::InvalidMoviesError $log.warn("invalid movie id: #{id}") next end dir = File.expand_path(id, movies_dir) movies.each {|link| wget.retrieve(link.href, dir) } expected = movies.movie_links.map{|x| File.basename(x.href)} actual = Dir.glob("#{dir}/*").map {|x| File.basename(x)} if (expected - actual).empty? done_file.add(id) ids_file.delete(id) end } rescue => e $log.error(e) exit_code = 1 end $log.info("END #{$0} (#{exit_code}) ================") exit exit_code
require 'fileutils' require 'logger' require 'mechanize' require 'ostruct' BASEDIR = File.dirname($0) require "#{BASEDIR}/util" require "#{BASEDIR}/sangels" $config = load_config(BASEDIR) prepare_logger(BASEDIR) $log = new_logger("get_images") WWW::Mechanize.log = new_logger("mechanize") WGet.log = $log $log.info("BEGIN #{$0} ================") exit_code = 0 begin movies_dir = $config.movies_dir sangels = SAngels.new sangels.login($config.user, $config.password) thumbnails = sangels.thumbnails Dir.glob("#{movies_dir}/*").each {|dir| next unless File.directory? dir id = File.basename(dir) url = thumbnails.url(id) unless url $log.warn("#{id} is not found") next end path = File.expand_path("00_thumbnail#{File.extname(url)}", dir) next if File.exist? path $log.info("retrieving #{url}") thumbnail = thumbnails.get_file(id) File.open(path, "wb") {|io| io.write(thumbnail)} } rescue => e $log.error(e) exit_code = 1 end $log.info("END #{$0} (#{exit_code}) ================") exit exit_code
BASEDIR = File.dirname($0) require "#{BASEDIR}/util" $config = load_config(BASEDIR) movies_dir = $config.movies_dir Dir.glob("#{movies_dir}/*") {|dir| next unless File.directory? dir name = File.basename(dir) files = Dir.glob("#{dir}/*.wmv").sort File.open("#{movies_dir}/#{name}.m3u", "w") {|io| files.each {|file| io.puts "#{name}/#{File.basename(file)}" } } File.open("#{dir}/00_movies.m3u", "w") {|io| files.each {|file| io.puts "#{File.basename(file)}" } } }
require 'mechanize' require 'hpricot' BASEDIR = File.dirname($0) require "#{BASEDIR}/util" class SAngels HOST = "real2.s-angels.com" LOGIN_URL = "http://#{HOST}/member/" INFO_URL = "http://#{HOST}/teigaku/item.php" THUMBNAILS_URL = "http://#{HOST}/teigaku/" THUMBNAIL_URL = "http://#{HOST}/images/default/thumb/" def initialize() @agent = WWW::Mechanize.new end def login(user, password) login_form = @agent.get(LOGIN_URL).forms.find {|form| form.fields.any? {|field| field.name == "frmLoginid"} } login_form.frmLoginid = user login_form.frmPw = password @agent.submit(login_form) end def movies(id, no_validate = nil) Movies.new(@agent, id, !no_validate) end def thumbnails Thumbnails.new(@agent) end class Thumbnails def initialize(agent) @agent = agent doc = Hpricot(@agent.get_file(THUMBNAILS_URL)) elems = doc.search("div[@class=realthum]/a") @links = Hash( elems.map {|elem| href = elem["href"] id = $1 if /ID=(.+)/ =~ href url = elem.search("img")[0]["src"] [id, url] }) end def get_file(id) @agent.get_file(url(id)) end def url(id) @links[id] end def exist?(id) url(id) end end class Movies class InvalidMoviesError < StandardError end def initialize(agent, id, no_validate) @agent = agent @id = id if !no_validate && !valid? raise InvalidMoviesError end end def info_page_url "#{INFO_URL}?ID=#{@id}" end def info_page @agent.get(info_page_url) end def movies_page @agent.click(info_page.links.find {|link| /P=10/ =~ link.href}) end def movie_links movies_page.links.select {|link| /wmv$/ =~ link.href }.sort {|a, b| File.basename(a.href) <=> File.basename(b.href) } end def valid? info_page.uri.to_s == info_page_url end def each(&block) orig_links = movie_links orig_links.each {|orig_link| link = movie_links.find {|l| File.basename(l.href) == File.basename(orig_link.href)} block.call(link) } end end end
require 'log4r' require 'log4r/yamlconfigurator' require 'singleton' require 'fileutils' require 'ostruct' def Hash(a) Hash[*a.flatten] end def load_config(basedir) OpenStruct.new(File.open("#{basedir}/config.yaml") {|io| YAML.load(io)}) end def new_logger(name) Log4r::Logger.new("app::#{name}") end def prepare_logger(basedir, logdir = nil) logdir ||= basedir Log4r::YamlConfigurator["LOGDIR"] = logdir Log4r::YamlConfigurator.load_yaml_file("#{basedir}/config.yaml") end class NullObject include Singleton def method_missing(message, *arg) NullObject.singleton end end class WGet class << self attr_accessor :log def initialize super @log = NullObject.singleton end end def log self.class.log end def retrieve(url, dir) FileUtils.mkdir_p(dir) file = File.expand_path(File.basename(url), dir) if File.exist?(file) log.info("already retrieved #{url}") return true end tmp = "#{file}.part" log.info("retrieving #{url}") ret = system("wget", "-c", "-O", tmp, url) if ret log.info("retrieving succeeded #{url}") File.rename(tmp, file) else if $? == 0x020000 # Ctrl-C exit($?) else log.error("retrieving failure #{url} (#{$?})") end end return ret end end
外国の人が日本語を勉強するためのサイトというのはあるのだろうか?
誰か動画とかでつくらない?ちょっと協力するよ。
適当に修正してくれ。
1st:
Japanese is very simple accent intonation prominence.
Only have 5th vowel.
「あ(a)、い(i)、う(u)、え(e)、お(o)」
sounds like [ah,y,wu,et,oh]
- vowel:vowelの英々説明
2ne:
Hiragana is Japanes alphabet.
Hiragana totary 51 word.
don't be afraid!
That's very simple.
Just only 5th vowel,The other word is just variation!
「あ( a)、い( i)、う( u)、え( e)、お( o)」
「か(ka)、き(ki)、く(ku)、け(ke)、こ(ko)」
「さ(sa)、し(si)、す(su)、せ(se)、そ(so)」
「た(ta)、ち(ti)、つ(tu)、て(te)、と(to)」
「な(na)、に(ni)、ぬ(nu)、ね(ne)、の(no)」
「は(ha)、ひ(hi)、ふ(hu)、へ(he)、ほ(ho)」
「ま(ma)、み(mi)、む(mu)、め(me)、も(mo)」
「や(ya)、------、ゆ(yu)、------、よ(yo)」
「ら(ra)、り(ri)、る(ru)、れ(re)、ろ(ro)」
「わ(wa)、------、を(wu)、------、ん(wo)」
that's all!
only you need remember
[a,i,u,e,o]
and
[a,ka,sa,ta,na,ha,ma,ya,ra,wa]
Thats all used in combination.
3rd:
Japanes is Easy to listen and easy tongue.
Evry word notation form Hiragana and Katakana.
Katakana is same work as hiragana.
like different of cursive-style and block-letters.
4th:
Why Japanese know as so difficult language.
Becouse Japanes and Asia is far from your cultur.
For exsample,
If you don't know what "INU" is.
If you can hear or read "INU" but You can't understand.
Simply "DOG" is sounds like "INU" in Japanese.
So different And any similar.
But Never despair.
Manga or Animetion is helpful.
Can tell just by looking what "INU" is.
Other Many different.
But you master Only Hiragana.
You can enjoy Japanes Munsic,Manga,Anime and so on.
Hiragana master is Talk or message to Japanes people.
And They certainly help you.
Take if Easy!
あとは任せた。
yutori.2ch.net.hp.infoseek.co.jp/w/r/e/wrestleangel/post2ch.swf#host=yutori.2ch.net
ここ↑にあるやつ。
解説よろしく。
movie 'post2ch.swf' { // flash 8, total frames: 17, frame rate: 12 fps, 320x320 px frame 1 { System.useCodepage = true; nret = function (k, v) { return (flash.external.ExternalInterface.call('d', k, v)).toString(); }; host2ch = 'tmp6.2ch.net'; i = _url.indexOf('://'); if (-1 < i) { host2ch = _url.substring(i + 3); } i = host2ch.indexOf('.2ch.net'); if (-1 < i) { host2ch = host2ch.substring(0, i + 8); } path2ch = '/test/bbs.cgi?guid=ON'; l = new LoadVars(); i = _url.indexOf('#'); u = ''; if (0 < i) { u = _url.substring(i + 1); } LoadVars.prototype.sendNoEnc = function (url, target, method) { LoadVars.prototype._toString = LoadVars.prototype.toString; LoadVars.prototype.toString = function () { return unescape(this._toString()); }; ASSetPropFlags(LoadVars.prototype, '_toString', 3); this.send(url, target, method); LoadVars.prototype.toString = LoadVars.prototype._toString; }; ASSetPropFlags(LoadVars.prototype, 'sendNoEnc', 3); } frame 2 { _root.nowtime = null; _root.secondpost = null; _root.FROM = null; _root.mail = null; _root.MESSAGE = null; _root.subject = null; _root.ng = null; } frame 3 { (flash.external.ExternalInterface.call('c')).toString(); } frame 9 { if (_root.nowtime == null) { if (!_root.ng) { gotoAndPlay(3); } else { this.stop(); } } } frame 10 { if (_root.nowtime == null) { gotoAndPlay(3); } nowtime = _root.nowtime; l.addRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); l.hana = 'mogera'; l.time = '1180000000'; if (l.time < nowtime) { l.time = nowtime; } l.key = ''; l.bbs = 'kitchen'; l.MESSAGE = '%82%D3%82%F1%82%C7%82%B5'; l.subject = '%82%D3%82%F1%82%C7%82%B5'; l.mail = ''; l.FROM = '%82%D3%82%F1%82%C7%82%B5'; l.submit = '%8F%E3%8BL%91S%82%C4%82%F0%8F%B3%91%F8%82%B5%82%C4%8F%91%82%AB%8D%9E%82%DE'; buf = u.split('&'); i = 0; goto 623; for (;;) { ++i; label 623: if (i >= buf.length) break; a = buf[i].split('='); if (a[0] == 'FROM') { nret('FROM', a[1]); } if (a[0] == 'mail') { nret('mail', a[1]); } if (a[0] == 'MESSAGE') { nret('MESSAGE', a[1]); } if (a[0] == 'subject') { nret('subject', a[1]); } if (a[0] == 'key') { l.key = a[1]; } if (a[0] == 'time') { l.time = a[1]; } if (a[0] == 'bbs') { l.bbs = a[1]; } if (a[0] == 'host') { host2ch = a[1]; } if (a[0] == 'path') { path2ch = a[1]; } } } frame 16 { if (_root.nowtime == null) { gotoAndPlay(3); } if (_root.FROM != null) { l.FROM = _root.FROM; } if (_root.mail != null) { l.mail = _root.mail; } if (_root.MESSAGE != null) { l.MESSAGE = _root.MESSAGE; } if (_root.subject != null) { l.subject = _root.subject; } if (l.key != '') { l.subject = ''; } if (l.subject != '') { l.key = ''; } l.sendNoEnc('http://' + host2ch + path2ch, '_2ch', 'POST'); } frame 17 { if (_root.secondpost != null) { _root.secondpost = null; gotoAndPlay(4); } _root.nowtime = null; gotoAndPlay(2); } } ||>
<body onload="document.frm.submit()"> <form name="frm" method="post" action="http://yutori.2ch.net/test/bbs.cgi?guid=ON"> <input value="書き込む" name="submit" type="submit"> <input name="FROM" size="19"> <input name="mail" size="19"><br> <textarea rows="5" cols="70" wrap="off" name="MESSAGE">てst</textarea> <input name="bbs" value="news4vip" type="hidden"> <input name="key" value="key" type="hidden"> <input name="time" value="time" type="hidden"> </form>
Safari3.1.1 LeopardでPithHelmet-2.8.3-aのインストールに失敗してしまう。インストーラのログには↓が残される。
Jun 19 16:11:31 macbook Installer[3201]: Install failed: pithhelmetPreflight のパッケージからファイルを抽出できませんでした。ソフトウェアの製造元に問い合わせてください。 Jun 19 16:11:31 macbook Installer[3201]: Displaying 'Install Failed' UI. Jun 19 16:11:31 macbook Installer[3201]: 'Install Failed' UI displayed message:'pithhelmetPreflight のパッケージからファイルを抽出できませんでした。ソフトウェアの製造元に問い合わせてください。'.
おかしいなぁ。http://www.culater.net/software/PithHelmet/PithHelmet.phpから落としたmpkgを実行するだけでインストールできるはずなんだけど。
米トレンドマイクロは2007年9月6日(米国時間)、「Word」の文書ファイル(拡張子がdoc)を添付した迷惑メール(スパム)が出回っていることを明らかにした。製品やサービスの広告をWord文書ファイルに記載して添付することで、メール本文を解析する迷惑メールフィルター(迷惑メール対策製品)を回避しようとする。
2006年以降、宣伝文句などを添付ファイルに記載する迷惑メールが増えている。2006年に出現して流行したのは「画像スパム」。これは、広告などをGIFやJPEGといった画像ファイルにして添付するもの。2007年1月には迷惑メールの過半数を占めるに至った。
その後、PDFファイルを添付した「PDFスパム」や、Excelファイル(拡張子がxls)を添付した「Excelファイル」などが出現。そして今回、Wordの文書ファイルを添付した迷惑メールが確認された。
PDFスパムやExcelスパムのほとんどは、株価の操作が目的。特定企業の好業績などを伝える偽情報を記載し、その企業の株購入をあおって株価をつり上げようとする。それに対して、今回確認されたWordスパムは、ある医薬品の販売を目的とした広告。ファイル中のリンクをクリックすると、その医薬品を販売するWebサイトへ誘導される。
メールの本文には、英語で「このメッセージは、3日するとサーバーから消去されます」と記述。加えて、メールの件名を「3 Days to read(3日間のうちに読んでください)」、添付ファイル名を「Private Message(個人的なメッセージ)」や「Confidential Message(極秘メッセージ)」などとすることで、受信者に添付ファイルを開かせようとしているという。
Return-Path: <direct@mini-saki.com>
Received: from gmail-smtp-in.l.google.com ([202.75.37.206])
by mx.google.com with SMTP id v39si9729804wah.44.2008.01.29.03.18.31;
Tue, 29 Jan 2008 03:18:33 -0800 (PST)
Received-SPF: neutral (google.com: 202.75.37.206 is neither permitted nor denied by best guess record for domain of direct@mini-saki.com) client-ip=202.75.37.206;
Authentication-Results: mx.google.com; spf=neutral (google.com: 202.75.37.206 is neither permitted nor denied by best guess record for domain of direct@mini-saki.com) smtp.mail=direct@mini-saki.com
Date: Tue, 29 Jan 2008 03:18:33 -0800 (PST)
From: ジェントルマン木下 <direct@mini-saki.com>
To: 俺@Gmail
Subject: 毎日土下座していますか?
Message-ID: <8O4X33M53Z.9222@mini-saki.com>>
どうも。ジェントルマン木下です。
どのくらいジェントルマンかと言うと、デートマナーマニュアルを
12冊読破し、車のドアも女性には開けさせず自分の手で開けて乗せ、
運転席にかけて行くくらいジェントルマンです。
私のジェントル魂はそれだけでは飽き足りずテーブルマナーも覚え、
そんな苦悩に満ちた日々を送っていた時、ある人物が目に入りました。
その人物はなんと女性の目の前で土下座してセックスを懇願しているのです。
そう思いながらその光景を冷ややかな視線で傍観していたのですが、
なんと女性はOKしているじゃないですか!!
ジェントルマン改め、ジェットマンに変身して
大空に飛び出しそうなくらい驚きました。実際、飛んでましたね。
そして大空を羽ばたきながら気がついたのです。私は外国かぶれな人間だった…、
そうさ日本人じゃないか…と。日本にもこんなにもジェントルマンな作法があったのだと。
その日を境に、私はありとあらゆる土下座を試してきました。なかでも一番効果があった
土下座中もドアがバタンバタンと私の体を挟み、音を立てて演出効果を高めます。
それをされた女性は必ずOKします。
あまりのジェントルマンぶりにOKせざるを得ないからです。正直なところ女性も「セックスを
する口実」が欲しいのだと思います。「あそこまでされたら仕方ないよね」って。
そして、その成功率の一番高かったところがここです。
(URL 省略)