はてなキーワード: BEGINとは
It had been a little situation of one's before one of the many high-end camera makers learned the particular Live life Access manner with a DIGITAL SLR requested a good online video media picture after which you can created a way to help you listing the item. Olympus seemed to be hinting at the capability in Present cards 2006, as soon as E-330 (the very first video camera by means of survive viewing) is released. Nonetheless Nikon was towards the blog post while using the D90 along with Cannon is definitely soon after along with the just-announced Canon EOD 5D Mark II Battery.
Typically the 12. 3-megapixel D90 carries LARGE DEFINITION online video from a conclusion with 1280 back button 720 pixels at 27 frames/second using the understanding and also depth-of-field restrain which usually simply a DIGITAL SLR offer. Naturally, Nikon isn't going to space an expensive precedence about this skill (and not undertake most people, finding the software when alot more of the adjunct you'll take advantage of once in a while, than only a main objective just for obtaining that D90). But, because this can be a 'world first', Photography Analyze is going to tackle the application ahead of moving on that will alternative further important qualities.
Virtually no owner guide book was initially supplied with a analysis camera still (after some hassles) most of us made it possible to down load an important PDF FILE type from Nikon European union ?nternet site. Surprisingly, this manually operated exclusively devotes one-and-a-half of 270 pages of content for you to video clip producing tasks and approximately a couple thirds of the site to help you videos playback. Less a page can be specified up to a show frame proportions in addition to appear possible choices : the 120 websites following on from the primary arguments belonging to the video clip manner.
Picture Abilities
Training video in any DIGITAL CAMERA is really a important loan -- primarily for the Nikon D90 Battery cost. Beforehand, any time you required a fabulous video camera by using compatible contact lenses, which you were taking a look at round $7000 for just a unit which will would not quite possibly track record high-definition, widescreen picture. However the D90 presents way more for just a cheaper package price by providing visitors while using same sorts of manipulate in excess of centering, subjection and additionally depth-of-field like they have having a DIGITAL CAMERA digicam, combined internet site snap by using almost any Nikkor website.
But, the actual D90's online video media model is absolutely not fantastic. As movie can certainly sole often be captured throughout Are located Perspective application, you are jammed aided by the prohibitions this means that (see below). The actual noise is normally taped monaurally and then the video recording formatting is certainly AVI which will, even though it truly is best with a large number of updating functions, uses so much ram (roughly 400MB for minute). Within assessments, some 24-second cut saved for 1280 times 720 LARGE DEFINITION method for 176 kbps appeared to be 40. 7MB dimensions.
Amazingly, this high-end camera works iwth using the premier random access memory playing cards. SOME SORT OF 32GB SDHC should help you track record as much as sixty units for training video, even though a different reduction is definitely which will video plans will be available to personal training minutes for HARLEY-DAVIDSON function and 20 short minutes with typical quality.
Saddest of can be the possibility that any autofocusing procedure :Nikon D90 Charger as well as some other primary adjustments - are not to be implemented if you find yourself photographing online video media. You can actually place emphasis quickly well before taking any preview not to mention make use of the manual place emphasis wedding ring within the contact lens even while photographing. Although if the content steps near as well as from everyone as long as you're taking, blurring might be unavoidable.
Different works that need to be placed well before taking a good movie involve getting exposed compensation, vivid white stability in addition to tact surroundings. For anyone utilizing aperture-priority AE, you can actually transformation a aperture functions even though tracking your movie and as well lens quality in and additionally available - nevertheless it will be hazardous seeing that sticking to center is usually hard.
Well before beginning online video grab you have to find the wished-for audio mode from Dvd movie Controls sub-menu while in the firing navigation. 3 selections are offered: 1280 back button 720 (16: 9), 640 back button 424 (3: 2) not to mention 320 x 216 (3: 2). You too can change this reasonable producing at as well as out (the default setting up might be ON).
Most of online video media photographing pattern goes as follows:
1. Arranged this high-end camera to have Perspective way by simply hitting a LV tab.
step 2. Target about them just by half-pressing a shutter mouse if you are throughout autofocus form; also concentrate personally.
3. Marketing a O . K . key in the center from the arrow topper to get started producing.
check out. Prevent the theme presented plus centred throughout the taking progression.Nikon Coolpix S3100 Charger for anyone within information option, you can actually switch totally focus by hand while you step on the way to and / or clear of this issue. Cautious mainly vigilant while blasting close-ups when smallish differences within the place emphasis position can display simply because blurring on the content. (To confuse issues, you'll find it tough to ascertain if the appearance within the LCD is definitely pin-sharp through bright normal light while you can not use a viewfinder on Take up residence Check out manner. )
5. To cure documenting, advertising OKAY all over again.
Taking part in lower back taped video tutorials is simple. Mass media all the LV control key the next time for you to disengage Live life Watch consequently touch typically the review button in the software. Make use of the arrow mattress pad to pick out your snap you need to have fun with not to mention press RIGHT to begin the process preventing this video clip playback.
-----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>"
誤字脱字は勘弁な。
I was at home the other night inth middle of my dinner when the phone rang.
ME:Hello.
ME:Thie is AT&T,
ME:Is this AT&T.?
AT&T:Yes! This is AT&T, may I speak to Mr.Byron, please?
ME:OK, hold on.
At this point I put the phone down for a solid 5 minutes thinking that, surely, this person would have hung up the phone. I ate my salad. Much to my surprise, when I picked up the receiver, they were still waiting,
ME:Hello?
ME:May I ask who is calling, please?
ME:This is AT&T?
ME:The phone company.
ME:I thought you said this was AT&T.
AT&T:Yes, sir, we are phone company.
ME:I already have a phone.
AT&T:We aren't selling phones today, Mr.Byron. We world like to offer you 10 cents a minute, 24 hours a day, 7 days a week, 365 days a year.
ME:Now, that's 10 cents a minute, 24 hours a day?
AT&T:(getting a little excited at this point by my interest) Yes, sir, that's right! 24 hours a day!
ME:7 days a week?
ME:I am definitely interested in that! Wow!! That's amazing!
AT&T:We think so!
ME:That's quite a sum of money!
AT&TYes, sir, it's amazing how it adds up.
ME:OK, so will you send me checks weekly, monthly or just one big one at the end of the year for the full $52,560; and if you send an annual check, can I get a cash advance?
AT&T:Excuse me?
ME:You know, the 10 cents a minute.
AT&T:What are you talking about?
ME:You said you'd give me 10 cents a minute, 24 horus a day, 7 days a week, 365 days a year. Thats comes to $144 per day, $1008 per week and $52,560 per year, I'm just interested in knowing how you will be making payment.
AT&T:Oh, no sir. I didn't mean we'd be peying you, You pay us 10 cents a minute.
ME:Wait a minutes. how do you figure that by saying that you'll give me 10 cents a minute, that I'll give YOU 10 cents a minute? Is this some kind of subliminal telemarketing scheme? I've read about things like this in the Enquirer, you know.
AT&T:No, sur, we are offering 10 cents a minute for
ME:THERE YOU GO AGAIN! Can I speak to supervisor please?
AT&T:Sir, I don't think that necessary.
ME:I insist on speaking to supervisor!
AT&T:Yes, Mr.Byron. Pleas hold.
At this point, I begin trying to finish my dinner.
ME:Yeah.
SUPERVISOR:I understand you are not quite understanding our 10 cents a minute program.
ME:is This AT&T?
SUPERVISOR:Yes, sir, it sure is.
ME:(I had to swallow before I choked on my food, It was all I could do to suppress my laughter and I had to be Careful not to produce a snort.) No, actually, I was just waiting for someone to get back to me so that I could sign up fo the plan.
SUPERVISOR:Ok, no problem, I'll transfer you back to the person who was helping you.
ME:Thank you.
I was on hold once again and managed a few more monthfuls. I need to end this conversation. Suddenly, there was an aggravated but polite voice at the other end of the phone.
AT&T:Hello, Mr.Byron, I understand that you are interested in sighning up for our plan?
ME:No, but I was wondering - do you have that "Friend and Family" thing because I'm an only child and I'd really like to have a little brother...
変な英文しか書けないけど。
まあいいよね。
Please help us to protest, please!
Hello. I am a Japanese womanlives in Tokyo. I am now pregnant.
I am deeply grateful for the BBC to the report on serious accident of the nuclear power plant of first in Fukushima.
Because Japanese mainstream media did not report radioactive contamination seriously.
To happen is a new serious problem in Japan now. Would you cooperate with us?
Is about to be burned debris contaminated radioactive material In Kawasaki City, next to Tokyo.
This debris brings from Fukushima.
If this debris is incinerated in Kawasaki, it would be contaminated by radioactive material to the entire Kanto region.
This problem has been determined at the discretion of the Mayor of Kawasaki City, Takao Abe.
Of course, citizens in Kawasaki are protesting against Kawasaki to accept the debris.
This public protests over two thousand.
However, the mayor is ignoring this protest.
It is an act that violates the right to life of its inhabitants.
We want to stop the radioactive contamination of children and pregnant women and young men and women in Japan.
But, Japanese government has not come up with something even while knowing that measures have been flooded with protests in Kawasaki City.
Japan's mainstream media are not widely reported this problem.
There is no time to start burning debris.
Kawasaki City commented on the transport of debris to begin in April.
Please take this issue on BBC.
Now, many foreigners are in Kawasaki and Tokyo and the Kanto region.
Also spans the risk of radioactive contamination on them.
This issue is no longer just for the Japanese.
Please take this matter greatly on BBC networks.
In Japan today, keeping a close eye on this issue for some Internet users.
But many Japanese are indifferent to this issue.
----------------------------------------------------------------------
The report of this issue in Japan
http://www.jiji.com/jc/c?g=soc&k=2011041500649
http://www47.atwiki.jp/pboxdro?cmd=upload&act=open&pageid=30&file=jiji+english.txt
----------------------------------------------------------------------
どうか私たちに協力してください!
福島第一原子力発電所に関するBBCの報道に深く感謝しています。
なぜなら日本の大手マスコミは放射能汚染を深刻に報道していないからです。
今日本で新しい深刻な問題が起きようとしています。私達に協力していただけませんか?
東京に近い川崎という町で放射性物質に汚染された瓦礫が燃やされようとしています。
もし川崎でこの瓦礫が焼却された場合、関東地方全体が放射性物質によって汚染されてしまいます。
この問題は川崎市長の専決で事態が推移しています。もちろん川崎市民は瓦礫を受け入れることに対して抗議しています。抗議は2千件超えています。しかし川崎市長はこの市民の声を無視しています。
・安全基準を明確に策定していない
・具体的な検査方法を策定していない
・4月中にも貨物列車を使って汚染された瓦礫を運ぼうとしている
日本の子どもや妊婦や若い男女がこれ以上放射性物質に汚染されることを避けたいのです。
しかし日本政府は川崎市に抗議が殺到していることを知りながら何の対策も打ち出していません。
瓦礫の焼却が始まるまでに時間がありません。
どうかBBCでもこの問題を取り上げてください。
そして私たちの抗議を取り上げてください。
どうかこのことを大きく取り上げてください。
今日本では心あるネットユーザーしかこの問題を問題視していません。
----------------------------------------------------------------------
http://www.jiji.com/jc/c?g=soc&k=2011041500649
http://www47.atwiki.jp/pboxdro?cmd=upload&act=open&pageid=30&file=jiji+english.txt
----------------------------------------------------------------------
When the diesel generators were gone, the reactor operators switched to emergency battery power. The batteries were designed as one of the backups to the backups, to provide power for cooling the core for 8 hours. And they did.
Within the 8 hours, another power source had to be found and connected to the power plant. The power grid was down due to the earthquake. The diesel generators were destroyed by the tsunami. So mobile diesel generators were trucked in.
This is where things started to go seriously wrong. The external power generators could not be connected to the power plant (the plugs did not fit). So after the batteries ran out, the residual heat could not be carried away any more.
At this point the plant operators begin to follow emergency procedures that are in place for a “loss of cooling event”. It is again a step along the “Depth of Defense” lines. The power to the cooling systems should never have failed completely, but it did, so they “retreat” to the next line of defense. All of this, however shocking it seems to us, is part of the day-to-day training you go through as an operator, right through to managing a core meltdown.
It was at this stage that people started to talk about core meltdown. Because at the end of the day, if cooling cannot be restored, the core will eventually melt (after hours or days), and the last line of defense, the core catcher and third containment, would come into play.
But the goal at this stage was to manage the core while it was heating up, and ensure that the first containment (the Zircaloy tubes that contains the nuclear fuel), as well as the second containment (our pressure cooker) remain intact and operational for as long as possible, to give the engineers time to fix the cooling systems.
Because cooling the core is such a big deal, the reactor has a number of cooling systems, each in multiple versions (the reactor water cleanup system, the decay heat removal, the reactor core isolating cooling, the standby liquid cooling system, and the emergency core cooling system). Which one failed when or did not fail is not clear at this point in time.
So imagine our pressure cooker on the stove, heat on low, but on. The operators use whatever cooling system capacity they have to get rid of as much heat as possible, but the pressure starts building up. The priority now is to maintain integrity of the first containment (keep temperature of the fuel rods below 2200°C), as well as the second containment, the pressure cooker. In order to maintain integrity of the pressure cooker (the second containment), the pressure has to be released from time to time. Because the ability to do that in an emergency is so important, the reactor has 11 pressure release valves. The operators now started venting steam from time to time to control the pressure. The temperature at this stage was about 550°C.
This is when the reports about “radiation leakage” starting coming in. I believe I explained above why venting the steam is theoretically the same as releasing radiation into the environment, but why it was and is not dangerous. The radioactive nitrogen as well as the noble gases do not pose a threat to human health.
At some stage during this venting, the explosion occurred. The explosion took place outside of the third containment (our “last line of defense”), and the reactor building. Remember that the reactor building has no function in keeping the radioactivity contained. It is not entirely clear yet what has happened, but this is the likely scenario: The operators decided to vent the steam from the pressure vessel not directly into the environment, but into the space between the third containment and the reactor building (to give the radioactivity in the steam more time to subside). The problem is that at the high temperatures that the core had reached at this stage, water molecules can “disassociate” into oxygen and hydrogen – an explosive mixture. And it did explode, outside the third containment, damaging the reactor building around. It was that sort of explosion, but inside the pressure vessel (because it was badly designed and not managed properly by the operators) that lead to the explosion of Chernobyl. This was never a risk at Fukushima. The problem of hydrogen-oxygen formation is one of the biggies when you design a power plant (if you are not Soviet, that is), so the reactor is build and operated in a way it cannot happen inside the containment. It happened outside, which was not intended but a possible scenario and OK, because it did not pose a risk for the containment.
So the pressure was under control, as steam was vented. Now, if you keep boiling your pot, the problem is that the water level will keep falling and falling. The core is covered by several meters of water in order to allow for some time to pass (hours, days) before it gets exposed. Once the rods start to be exposed at the top, the exposed parts will reach the critical temperature of 2200 °C after about 45 minutes. This is when the first containment, the Zircaloy tube, would fail.
And this started to happen. The cooling could not be restored before there was some (very limited, but still) damage to the casing of some of the fuel. The nuclear material itself was still intact, but the surrounding Zircaloy shell had started melting. What happened now is that some of the byproducts of the uranium decay – radioactive Cesium and Iodine – started to mix with the steam. The big problem, uranium, was still under control, because the uranium oxide rods were good until 3000 °C. It is confirmed that a very small amount of Cesium and Iodine was measured in the steam that was released into the atmosphere.
It seems this was the “go signal” for a major plan B. The small amounts of Cesium that were measured told the operators that the first containment on one of the rods somewhere was about to give. The Plan A had been to restore one of the regular cooling systems to the core. Why that failed is unclear. One plausible explanation is that the tsunami also took away / polluted all the clean water needed for the regular cooling systems.
The water used in the cooling system is very clean, demineralized (like distilled) water. The reason to use pure water is the above mentioned activation by the neutrons from the Uranium: Pure water does not get activated much, so stays practically radioactive-free. Dirt or salt in the water will absorb the neutrons quicker, becoming more radioactive. This has no effect whatsoever on the core – it does not care what it is cooled by. But it makes life more difficult for the operators and mechanics when they have to deal with activated (i.e. slightly radioactive) water.
But Plan A had failed – cooling systems down or additional clean water unavailable – so Plan B came into effect. This is what it looks like happened:
In order to prevent a core meltdown, the operators started to use sea water to cool the core. I am not quite sure if they flooded our pressure cooker with it (the second containment), or if they flooded the third containment, immersing the pressure cooker. But that is not relevant for us.
The point is that the nuclear fuel has now been cooled down. Because the chain reaction has been stopped a long time ago, there is only very little residual heat being produced now. The large amount of cooling water that has been used is sufficient to take up that heat. Because it is a lot of water, the core does not produce sufficient heat any more to produce any significant pressure. Also, boric acid has been added to the seawater. Boric acid is “liquid control rod”. Whatever decay is still going on, the Boron will capture the neutrons and further speed up the cooling down of the core.
The plant came close to a core meltdown. Here is the worst-case scenario that was avoided: If the seawater could not have been used for treatment, the operators would have continued to vent the water steam to avoid pressure buildup. The third containment would then have been completely sealed to allow the core meltdown to happen without releasing radioactive material. After the meltdown, there would have been a waiting period for the intermediate radioactive materials to decay inside the reactor, and all radioactive particles to settle on a surface inside the containment. The cooling system would have been restored eventually, and the molten core cooled to a manageable temperature. The containment would have been cleaned up on the inside. Then a messy job of removing the molten core from the containment would have begun, packing the (now solid again) fuel bit by bit into transportation containers to be shipped to processing plants. Depending on the damage, the block of the plant would then either be repaired or dismantled.
Now, where does that leave us?
・The plant is safe now and will stay safe.
・Japan is looking at an INES Level 4 Accident: Nuclear accident with local consequences. That is bad for the company that owns the plant, but not for anyone else.
・Some radiation was released when the pressure vessel was vented. All radioactive isotopes from the activated steam have gone (decayed). A very small amount of Cesium was released, as well as Iodine. If you were sitting on top of the plants’ chimney when they were venting, you should probably give up smoking to return to your former life expectancy. The Cesium and Iodine isotopes were carried out to the sea and will never be seen again.
・There was some limited damage to the first containment. That means that some amounts of radioactive Cesium and Iodine will also be released into the cooling water, but no Uranium or other nasty stuff (the Uranium oxide does not “dissolve” in the water). There are facilities for treating the cooling water inside the third containment. The radioactive Cesium and Iodine will be removed there and eventually stored as radioactive waste in terminal storage.
・The seawater used as cooling water will be activated to some degree. Because the control rods are fully inserted, the Uranium chain reaction is not happening. That means the “main” nuclear reaction is not happening, thus not contributing to the activation. The intermediate radioactive materials (Cesium and Iodine) are also almost gone at this stage, because the Uranium decay was stopped a long time ago. This further reduces the activation. The bottom line is that there will be some low level of activation of the seawater, which will also be removed by the treatment facilities.
・The seawater will then be replaced over time with the “normal” cooling water
・The reactor core will then be dismantled and transported to a processing facility, just like during a regular fuel change.
・Fuel rods and the entire plant will be checked for potential damage. This will take about 4-5 years.
・The safety systems on all Japanese plants will be upgraded to withstand a 9.0 earthquake and tsunami (or worse)
・I believe the most significant problem will be a prolonged power shortage. About half of Japan’s nuclear reactors will probably have to be inspected, reducing the nation’s power generating capacity by 15%. This will probably be covered by running gas power plants that are usually only used for peak loads to cover some of the base load as well. That will increase your electricity bill, as well as lead to potential power shortages during peak demand, in Japan.
If you want to stay informed, please forget the usual media outlets and consult the following websites:
http://www.world-nuclear-news.org/RS_Battle_to_stabilise_earthquake_reactors_1203111.html
http://bravenewclimate.com/2011/03/12/japan-nuclear-earthquake/
http://ansnuclearcafe.org/2011/03/11/media-updates-on-nuclear-power-stations-in-japan/
元記事にも100人1000人のユーザーならSQLでも問題ないって話をしたと思うが 1万人ユーザーって簡単なの?そもそも。って話だよね。
そしてその時のサービスは本当にツイッターみたいな大量データーサービスなの?と。(それってツイッターのコンペでサービスとして成り立たなそう。違えばいいけど)
ORACLでハイエンドサーバーのグリッド使うのと 自分でMYSQL分散書くのと HADOOPにするのと どれが得かはやってみないと分からん。
ダウンタイムを短くしようとすると、2011年現在では組めるならばオラクルな気はする。すくなくとも簡易的にベンチとらないとわからん。
Hadoopの怖いところは所詮Apache.orgということで、Apache.httpdのように急激な開発が流行から外れて止まってるかのようになることがあることなんだよねぇ。
Apache.httpdって、MPMがいまだpreforkとか あってWorkerで event とかって、しばらく前は、いまだ不安定とかそういう開発状況だと思ってるんだけど。
event MPMってもう安定化したの?event MPMのコア概念である
『Workerですら遅いから カーネルコールバックを使おうっていう流れ』自体はもう10年近く昔の概念だと思ってるんだけど・・・
今現在 一番イケてるのはHADOOPだとは思うけど。 Rubyが一時期ほどには勢いがないのと一緒で(いちおうRoR前から知っているみとしては、RoRによる隆盛が奇跡のようなものだが)
まだ、怖いよね。 障害復旧の実装もまだ、弱いし。個人的にはZookeeperがもっとちゃんとなったら、もう1度 調査する! という感じで塩漬け状態なのがHadoop.
少なくとも単一障害点のフェールーバー周りが本家でどうなるかとかだねー。
どうでもいいけどPHPの方が好きなので PHP for apache event MPMを安定化希望・・・ まぁ、Perlもいいよね。
だがRubyとPASCAL だけは無理だ。BEGINとか書いてあるソースを高速に読みこむのは無理。()ぐらいならいけるけど、BEGINってなんだよ。図形認識できないから読みづらいよ。
仕事切り上げて
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.
This is a guide for foreign people who want to make money without difficulty.
Now, families will begin receiving about 130 US dollars monthly allowance for every child of junior high school age or younger. From next year, families will get about 260 US dollars month by month. That is to say, if you have 100 children, you can receive about 260,000 US dollar every month. Even adopted children are OK. The only things you need are your certificate of residence in Japan and your children's translated certificates of residence in any countries. Japanese citizenship is not needed. There is no number of children limit.
The Child Allowance is a concrete form of the Prime Minister Yukio Hatoyama's idealistic theory. He puts emphasis on the spirit of friendship. Thus, you don't need to hesitate to receive. Welcome to Japan.
You can receive about 130 US dollars monthly allowance for every child of junior high school age or younger.
No, there is no limit.
All you have to do is to stay in Japan.
Legally, there is no obvious distinction between biological children and adopted children.
Even if your children live in abroad, you can receive the Child Allowance.
He or she will receive 1.56 million US dollars. From next year, about 3.12 million US dollars will be paid.
The source is a tax which Japanese people pay.
My intention is to make the idiocy of the Child Allowance known all over the world. Now, fool politicians reign over Japan.
34分
現役のときに比べて腕が鈍ってるなあ
ソースは汚いよ
同じところを二回訪れないことに注意して、次の状態をキューに入れていけばいいだけ
隣は距離1なのでただのFIFOでいい
重み付きのグラフならpriority queueを使う
dequeなんちゃらの前までが入力で、while の中が重要なコード
答えはSとGも塗り潰しちゃったのを出力してる
サンプルの入力で最短距離であることを確認してる
#include <map> #include <string> #include <iostream> #include <vector> #include <iterator> #include <deque> #include <set> using namespace std; typedef pair<int, int> P; int dir_x[] = {0,1, -1, 0}; int dir_y[] = {1, 0, 0, -1}; int main() { string line; vector<string> input; while (getline(cin, line)) { input.push_back(line); } const int X = input.size(); const int Y = input.begin()->size(); vector<P> start; P goal; for (int i = 0; i < X; i++) { for (int j = 0; j < Y; j++) { if (input[i][j] == 'S') { start.push_back(P(i, j)); } else if (input[i][j] == 'G') { goal = P(i, j); } } } deque<vector<P> > Q; set<P> visited; Q.push_back(start); while (!Q.empty()) { vector<P> p = Q.front(); Q.pop_front(); if (visited.find(p.back()) != visited.end()) { continue; } visited.insert(p.back()); if (p.back() == goal) { for (int i = 0; i < p.size(); i++) { input[p[i].first][p[i].second] = '$'; } copy(input.begin(), input.end(), ostream_iterator<string>(cout, "\n")); break; } for (int i = 0; i < 4; i++) { P next = P(p.back().first + dir_x[i], p.back().second + dir_y[i]); if (input[next.first][next.second] == '*') { continue; } vector<P> new_state(p.begin(), p.end()); new_state.push_back(next); Q.push_back(new_state); } } return 0; }
非常に頭が悪いやり方ですが、一応動くので置いておきます
# -*- coding: utf-8 -*- require 'uri' require 'open-uri' require 'rubygems' require 'twitter' require 'json' LAST_YEAR = Time.now - 12*31*60*60*24 USERNAME = 'hogehoge' PASSWORD = '********' def following_me? other base = URI.parse('http://twitter.com/friendships/exists.json') base.query = "user_a=#{other}&amp;user_b=#{USERNAME}" times = 0 begin sleep 60 open(base).read == 'true' rescue if times < 2 times += 1 retry else true end end end def posted? hash begin sleep 60 last_post = @client.timeline_for(:user, :id=>hash[:user], :count=>1).first.created_at rescue Twitter::RESTError # protected ~A~K~A following ~A~L 0 ~A | ~P~H~A~Y~T~_~A~W~A~_~_ p "#{$!}" p "passing #{hash[:user]}" return true # ~D~P~F~_~P~F~J~\~A~Q~B~K rescue # twitter~A~L~P~A~A~B~K~Y~B対~V p "#{$!}" sleep 180 retry end p "last_post was #{last_post}" last_post > hash[:from] end @client = Twitter::Client.new(:login => USERNAME, :password => PASSWORD) (1..20).each do |pg| @client.my(:friends, :page=>pg).each do |friend| p "checking #{friend.screen_name}" unless ((following_me? friend.screen_name) &amp;&amp; posted?({:from=>LAST_YEAR, :user=>friend.screen_name})) p "removing #{friend.screen_name}" sleep 60 @client.friend(:remove, friend) end end end
function returner() { return 100; } function profiler(aFunction) { var begin = new Date(); for (var i = 0; i < 500000; ++i) { aFunction(); } var end = new Date(); return end - begin; } function profileLambdaExpression() { // lamda expression print("lamda expression : " + profiler(function () returner()) ); // equal to above expression print("normal form : " + profiler(function () { return returner(); }) ); // not return the value print("return no value : " + profiler(function () { returner(); }) ); } profileLambdaExpression();
>> lamda expression : 1521
>> return no value : 1431
SpiderMonkey 1.8.0 pre
http://www.geocities.jp/jazzdoriura/karaoke/intro.html
ジャズのスタンダードを歌いたい人にとっては、いつも『All Of Me』や『Take The A Train』、『Route 66』というわけにはいかず、かといって『The Shadow Of Your Smile』『The Girl From Ipanema』『Begin The Beguine』なんかはちょっと違うし…と悩むところかもしれません。
この辺はあるらしいな。よー知らんが。
Practically speaking, the April 2009 G20 Summit is probably the last chance to put on the right tracks the forces at play, i.e. before the sequence of UK and then US defaults begin (2).
http://www.leap2020.eu/GEAB-N-32-is-available!-4th-quarter-2009-Beginning-of-Phase-5-of-the-global-systemic-crisis-phase-of-global-geopolitical_a2805.html
基軸通貨どうするかで対立とかしてる場合じゃないんだけどねー。
まあ無理だろうね。終わりが始まる。
Practically speaking, the April 2009 G20 Summit is probably the last chance to put on the right tracks the forces at play, i.e. before the sequence of UK and then US defaults begin (2).
http://www.leap2020.eu/GEAB-N-32-is-available!-4th-quarter-2009-Beginning-of-Phase-5-of-the-global-systemic-crisis-phase-of-global-geopolitical_a2805.html
24 from know
23 who because with
22 economy
21 an new people plan so
20 by every health
19 us
17 do
16 also that's these
15 all Americans It's must years your
14 about education energy here jobs make no
13 budget if
12 cost country one recovery than there tonight we've why
11 crisis how out reform those when
at banks college Congress don't future money nation next responsibility some tax what where world
children deficit even just me meet need put up work year
afford back cannot down economic end first help lending my see take times was way
again businesses confidence days each ensure get government high history invest issue million once only power right system
already another been begin bring buy century challenges clean come credit debt fact families financial goal helping largest long-term made most over president recession save schools still support through too
address any ask bad before business called chamber commitment cut cuts effort ever family finally global home its job keep last lead like loans many market necessary never off opportunity other programs provide spend united we'll were would
able accountable across act action administration am asked can't could critical cyber cycle cynical difficult does dollars easy force four-year he homes investment Iraq let longer may men moment national nearly old pay percent price private problems promise receive renewable restore say security send sense she should single soon stand States street struggle technology tell think values war well well-being we're without words workers worse yet
ability absolutely after auto bank begins beyond breaks build cause change child comes community compete comprehensive concern confront costs created decade decisions Democrats depend depends didn't dime done efficient enough entrepreneurs everyone federal forward foundation given good govern great half her higher hold hope housing I'm includes industry inherited insurance into I've lay layoffs legislation letter life long lost major makes Medicare move nor often part passed place problem progress protect pushed regulations Republicans resources restart return root said same savings says seen Sen. sent serve simply solar solve speak spirit step struggling students taxpayer thank then today together training understand use wait want watching ways whatever which women won't working young
abuse accounts affordable Afghanistan agenda allow along amid appointed approach areas around arrived assistance assure away balance become begun being believe benefits best billions bless boldly both bought built burden car career Carolina cars children's citizens clear close committed common company complete continue continued corporations countries creating crushing debates decline demand did different diploma directly disease doctors doesn't dollar doors dreams eliminate enterprise era example expand expanded extremism face failure far fastest-growing father few fiscal forces forge found four fraud full fully generation generations getting give God Greensburg had hard haven't healthy held helped highest him his historic households ideas ignore important industries innovation inspiration instead invented kind lasting launched law laying lift line lines list living loan look lose lower massive millions months mortgage much nations neighbor nobody office oil open order ordinary ourselves overseas own pass paychecks payment payments places policies priorities probably process program prosperity provided public quality quick quickly quitters quitting rates real rebuild recover reflects renewed require responsible re-start result revive rewards rules sacrifice safe second secure seek serious service set ship sitting small Social something source South spending spur state stock stopped stores strength strengthen strong stronger submit suffering surely takes teacher teachers term terrorists third though thousands threats three told tomorrow took tough trust trying tuition turn under upon very Vice view wake walk Wall waste wasteful weakened went what's wind worthy yourself
変化とか無視した。1個なんて載せられるかー!
http://www.leap2020.eu/GEAB-N-32-is-available!-4th-quarter-2009-Beginning-of-Phase-5-of-the-global-systemic-crisis-phase-of-global-geopolitical_a2805.html
the next four months, before summer 2009. Practically speaking, the April 2009 G20 Summit is probably the last chance to put on the right tracks the forces at play, i.e. before the sequence of UK and then US defaults begin (2).
It is high time for the general population and socio-political players to get ready to face very hard times during which whole segments of our societies will be modified (4), temporarily disappear or even permanently vanish.
去年あたり『経済?大丈夫に決まってんだろwww歴史を見ていままで大丈夫だったじゃねーかwww馬鹿な悲観論乙wwばーかばーかwww』とか言ってた馬鹿増田共が今頃どんな顔をしてるのか見てみたい。
http://anond.hatelabo.jp/20090121144441
(M)先人がミサイルや戦車を使うのみならず、信念と確固たる同盟をもってファシズムや共産主義に勇敢に立ち向かったことを思い出そう。
(A)先人たちがファシズムと共産主義を屈服させたのは、ミサイルや戦車によってだけではなく、頼もしい同盟国と強固な信念によってでもあることを思い起こしてほしい。
(Y)前の世代は、ファシズムや共産主義と、ミサイルや戦車だけではなく、強固な同盟と強い信念を持って対峙(たいじ)したことを思い出してほしい。
(M)先人は軍事力だけが我々を守るのではないことや、またそれを好き勝手に使えないことを知っていた。
(A)彼らは自らの力だけが自分たちを守ったのではないことも、その力が、自分たちが好きなように振る舞う資格を与えたのでもないことを理解していた。
(Y)彼らは、我々の力だけでは我々を守れず、好きに振る舞う資格を得たのではないことも理解していた。
(M)代わりに、彼らは慎重にそれを使うことで力が増し、安全は目的の正しさや、他国の手本となる振る舞い、謙虚さや自制心から発することを知っていた。
(A)その代わりに先人たちは、自らの力は慎重に使うことで増大し、自らの安全は、大義の正しさ、模範を示す力、謙虚さと自制心から生まれると知っていた。
(Y)代わりに、慎重に使うことで力が増すことを理解していた。我々の安全は、大義の正当性や模範を示す力、謙虚さ、自制心からいずるものだ。
(M)我々はこの遺産を引き継ぐ。
(A)私たちはその遺産の継承者だ。
(Y)我々は、この遺産の番人だ。
(M)これらの原理に再び導かれ、解決により一層の努力が求められる新しい脅威に対抗できる。
(A)いま一度こうした原理に導かれることにより、私たちはより厳しい努力、つまり、より強固な国際的協力と理解を必要とする新たな脅威にも立ち向かうことができる。
(Y)こうした原則にもう一度導かれることで、我々は、一層の努力や、国家間の一層の協力や理解が求められる新たな脅威に立ち向かうことができる。
(M)我々は責任を持ってイラクから撤退し始め、イラク人に国を任せる。そしてアフガンでの平和を取り戻す。
(A)私たちは、責任ある形でイラクをその国民の手に委ねる過程を開始し、アフガニスタンの平和構築を始める。
(Y)我々は、責任ある形で、イラクをイラク国民に委ね、苦労しながらもアフガニスタンに平和を築き始めるだろう。
(M)古くからの友人とかつての敵と共に、核の脅威を減らすために絶えず努力し、さらに地球の温暖化とも戦う。
(A)また古くからの友好国とかつての敵対国とともに、核の脅威を減らし、地球温暖化の恐れを巻き戻す不断の努力を行う。
(Y)古くからの友やかつての敵とともに、核の脅威を減らし、地球温暖化を食い止めるためたゆまず努力するだろう。
(M)我々の生き方について言い訳はしないし、それを断固として守る。
(A)私たちは、私たちの生き方を曲げることはなく、それを守ることに迷いもしない。
(Y)我々は、我々の生き方について謝らないし、それを守ることを躊躇(ちゅうちょ)しない。
(M)無実な人々を殺したり、脅迫で自己の目的の実現を図る者に対し、告げる。
(A)自分たちの目的を進めるためにテロを引き起こし、罪のない人々を虐殺しようとする者に対し、私たちは言おう。
(Y)テロを引き起こし、罪のない人を殺すことで目的の推進を図る人々よ、我々は言う。
(M)我々の意思の方が強く、我々の意思を曲げることはできない。
(A)いま私たちの精神は一層強固であり、くじけることはない。
(Y)我々の精神は今、より強固であり、壊すことはできないと。
(M)我々の方が長く生き、そして打ち負かす。
(A)先に倒れるのは君たちだ。私たちは君たちを打ち負かす。
(Y)あなたたちは、我々より長く生きることはできない。我々は、あなたたちを打ち破るだろう。
(M)我々の多様な出自は強みであり、弱みではない。
(A)なぜなら、私たちの多様性という遺産は、強みであり、弱点ではないからだ。
(Y)我々のつぎはぎ細工の遺産は強みであって、弱みではない。
(M)キリスト教徒、イスラム教徒、ユダヤ教徒、ヒンズー教徒、そして無宗教者の国だ。
(A)私たちの国はキリスト教徒、イスラム教徒、ユダヤ教徒、ヒンドゥー教徒、そして無宗教者からなる国家だ。
(Y)我々は、キリスト教徒やイスラム教徒、ユダヤ教徒、ヒンズー教徒、それに神を信じない人による国家だ。
(M)地球上の津々浦々から来たあらゆる言語と文化で形作られている。
(A)世界のあらゆる所から集められたすべての言語と文化に形作られたのが私たちだ。
(Y)我々は、あらゆる言語や文化で形作られ、地球上のあらゆる場所から集まっている。
(M)内戦(南北戦争)や人種差別という苦い経験もしたが、その暗い時代をへて、我々はより強くなり、きずなも深くなった。
(A)私たちは、南北戦争と人種隔離という苦い経験をし、その暗い歴史の一章から、より強く、より結束した形で抜け出した。
(Y)我々には、南北戦争や人種隔離の苦い経験があり、その暗い時代から出てきて、より強く、より団結するようになった。
(M)かつての憎しみはいずれ消え、我々を分け隔てた壁はいずれ消える。
(A)それがゆえに、我々は信じる。古い憎悪はいつか過ぎ去ることを。種族的な境界は間もなく消え去ることを。
(Y)我々は信じている。古くからある憎しみはいつかなくなり、民族を隔てる線も消えると。
(M)世界が小さくなるにつれ、我々が共通に持つ人類愛が出現する。
(A)世界がより小さくなるにつれて、共通の人間性が姿を現すことを。
(Y)世界が小さくなる中で、我々に共通の人間愛が現れることになると。
(M)そしてアメリカは平和の時代をもたらす役割を果たさねばならない。
http://anond.hatelabo.jp/20090121123006
(M)この旅を今日、我々は続けている。
(A)これが、私たちが今日も続けている旅だ。
(Y)これが今日、我々が続けている旅なのだ。
(M)我々は今でも地上で最も繁栄し強力な国だ。
(A)私たちは地球上で最も繁栄した、強力な国であり続けている
(M)我々の労働者は今回の危機が始まった時と同様、生産性は高い。
(A)私たちの労働者は、この(経済)危機が始まったときと比べ、生産性が落ちたわけではない。
(Y)我々の労働者は今回危機が始まった時と同様、生産性は高い。
(M)発明心に富み、商品やサービスは先週、先月、昨年と同様に求められている。
(A)先週、先月、昨年と比べ、私たちの創造性が低くなったのでもなければ、私たちの商品やサービスが必要とされなくなったのではない。
(Y)我々は相変わらず創意に富み、我々が生み出す財やサービスは先週や先月、昨年と同様、必要とされている。
(M)我々の能力は落ちていない。
(A)私たちの能力は衰えていない。
(Y)能力も衰えていない。
(M)だが、過去に固執し、狭い利益しか守らず、面倒な決定は後回しにする時代は終わった。
(A)ただ、同じところに立ち止まり、狭い利益を守り、不快な決断を先延ばしする時代は明らかに過ぎ去った。
(Y)しかし、同じ手を用いるだけで、狭い利益にこだわり、面倒な決定を先送りする、そんな時代は確実に終わった。
(M)今日からは、我々は立ち上がり、ほこりを払い、アメリカ再建の仕事に取りかからねばならない。
(A)私たちは今日から、自らを奮い立たせ、ほこりを払い落として、アメリカを再生する仕事を、もう一度始めなければならない。
http://ja.wikipedia.org/wiki/%E4%BA%BA%E3%82%92%E5%8B%95%E3%81%8B%E3%81%99
http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People
Seven Rules For Making your Home Life Happier(幸福な家庭を作る七原則)は日本語訳無し。
某大学の6年生なんだが、今更ながら『勉強することができる奴、これ最強』ということに気付いた。
勉強ができる、ということは、自分の能力を状況に応じてカスタマイズしていくことができる、ということだ。
高校までの勉強は基礎教養であること以上に、勉強する力を身につけることに意味がある。数学が出来て将来何の役に立つんですか?という中二の問いには、数学は君の生活を支えている大切な学問だ、という答えよりも、数学が出来るようになる過程で勉強の仕方を身につけることが必要なんだ、という答えの方が適切だろう。前者は理科系の素養を持つ中二にしか響かないが、後者はより一般的な答えとなりうるからである。
『勉強をするスキル』がこの過程で身に付いていれば、向き不向きはあるにしてもほとんどどんな職業にも就くことが出来るだろう。また、環境の変化にも強くなれる。環境が変化してもそれに応じて必要なことを勉強すればいいだけの話なのだから。しかし『勉強をするスキル』が身に付いていなかったら?単調労働等の誰にでも出来る仕事しか出来ないだろうし、環境の変化に対応することも難しいだろう。
そしてこのスキルは、若いうちから身につけるのが一番お得であり効率もいい。というより多分、若いうちに習慣づけておかないとどうしようもない。小中高の宿題を9割以上踏み倒した奴が大学生になって、たとえ単位や留年がかかっていてもいきなりレポートをしっかり提出できるようになるわけがないのだ(体験談)。
この文章を高校生までの若年層が読むかどうかは分からないが、もし読んでいたらどうか心に留めておいてほしい。
『勉強することができる奴、これ最強』
しかし勉強の出来不出来で人を分類する方法ってよく考えついたなー、と思う。社会の役割分担としての適材適所がかなりの程度自発的に(創発的に?)行われるからだ。教育の大切さというのは一人の人間を育てるための大切さだけでなく、社会全体を上手く回すための大切さでもあるのだ。
あとこんなこと書いたけど、勉強の出来不出来で決まるのはあくまで社会の中での自分の立ち位置であり、幸せな人生をおくれるかどうかはまた別問題だよ。だからもしかしたら本当に大切なのは、『勉強をするスキル』よりも『どんな勉強をするのか、またはしないのか』を見極めることかもしれんね。
=end
Could not load class (App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS) because : Can't locate XML/LibXML.pm in @INC (@INC contains: /home/pc/mobirc/lib /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /home/pc/mobirc/lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm line 5.
BEGIN failed--compilation aborted at /home/pc/mobirc/lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm line 5.
Compilation failed in require at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 151.
at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 133
Class::MOP::load_first_existing_class('App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS') called at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 157
Class::MOP::load_class('App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS') called at /usr/local/share/perl/5.8.8/MooseX/Plaggerize.pm line 20
App::Mobirc::load_plugin('App::Mobirc=HASH(0x8d7e490)', 'HASH(0x8d7536c)') called at /home/pc/mobirc/lib/App/Mobirc.pm line 44
App::Mobirc::_load_plugins('App::Mobirc=HASH(0x8d7e490)') called at /home/pc/mobirc/lib/App/Mobirc.pm line 35
Class::MOP::Class:::around('CODE(0x8ab5250)', 'App::Mobirc', '/home/pc/mobirc/config.yaml') called at /usr/local/lib/perl/5.8.8/Class/MOP/Method/Wrapped.pm line 129
Class::MOP::Method::Wrapped::__ANON__('App::Mobirc', '/home/pc/mobirc/config.yaml') called at /usr/local/lib/perl/5.8.8/Class/MOP/Method/Wrapped.pm line 89
App::Mobirc::new('App::Mobirc', '/home/pc/mobirc/config.yaml') called at mobirc/mobirc line 36
pc@ubuntu-vm:~$ sudo mobirc/mobirc
Could not load class (App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS) because : Can't locate XML/LibXML.pm in @INC (@INC contains: /home/pc/mobirc/lib /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /home/pc/mobirc/lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm line 5.
BEGIN failed--compilation aborted at /home/pc/mobirc/lib/App/Mobirc/Plugin/HTMLFilter/DoCoMoCSS.pm line 5.
Compilation failed in require at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 151.
at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 133
Class::MOP::load_first_existing_class('App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS') called at /usr/local/lib/perl/5.8.8/Class/MOP.pm line 157
Class::MOP::load_class('App::Mobirc::Plugin::HTMLFilter::DoCoMoCSS') called at /usr/local/share/perl/5.8.8/MooseX/Plaggerize.pm line 20
App::Mobirc::load_plugin('App::Mobirc=HASH(0x8d799e0)', 'HASH(0x8d7089c)') called at /home/pc/mobirc/lib/App/Mobirc.pm line 44
App::Mobirc::_load_plugins('App::Mobirc=HASH(0x8d799e0)') called at /home/pc/mobirc/lib/App/Mobirc.pm line 35
Class::MOP::Class:::around('CODE(0x8ab4390)', 'App::Mobirc', '/home/pc/mobirc/config.yaml') called at /usr/local/lib/perl/5.8.8/Class/MOP/Method/Wrapped.pm line 129
Class::MOP::Method::Wrapped::__ANON__('App::Mobirc', '/home/pc/mobirc/config.yaml') called at /usr/local/lib/perl/5.8.8/Class/MOP/Method/Wrapped.pm line 89
App::Mobirc::new('App::Mobirc', '/home/pc/mobirc/config.yaml') called at mobirc/mobirc line 36
YourFileHostのCAPTCHA画像をなんとかするの続きの続き。
まぁ、なんというか、一応できたので張ってみる。微妙な出来栄えだけど。
decaptcha.rbと同じディレクトリに置いて適当に動かしてみてください。
どっかにいいRSSがないかなぁ。。。
しかし、CAPTCHA画像を相手にしてた時の方が楽しかったなぁ。。。
あと、添削とかいろいろ歓迎です。
なぜか&が&amp;に置き換えられてるみたいなので、適当に&に読み替えてください。
#!/usr/local/bin/ruby $LOAD_PATH << File::dirname(File::expand_path($0)) require 'rubygems' require 'rss' require 'mechanize' require 'decaptcha' # require 'ruby-debug' # require 'pp' DESTDIR = 'files' TMPDIR = '/tmp' class Downloader COOKIE_URI = 'http://www.yourfilehost.com/media.php?cat=video&file=%s' DOWNLOAD_URI = 'http://www.yourfilehost.com/downloadlink.php?cat=video&file=%s&adult=1' VERBOSE = false DEBUG = false def self.fetch(file, destdir) puts "Fetching file: #{file}" destfile = destdir + '/' + file if test(?e, destfile) then puts ' - Already exists. skip' puts return nil end # # Initialize Mech # mech = WWW::Mechanize.new mech.user_agent_alias = 'Windows IE 6' mech.max_history = 3 mech.open_timeout = 15 mech.read_timeout = 3 # # get cookie # uri = COOKIE_URI % file page = mech.get(uri) # # Challenge against CAPTCHA # uri = DOWNLOAD_URI % file page = mech.get(uri) for i in 0...3 captcha_path = (page/'img[@height="38"]').attr(:src) captcha_uri = 'http://www.yourfilehost.com/%s' % captcha_path gif = mech.get_file(captcha_uri) open("#{TMPDIR}/captcha.gif", 'w') {|fd| fd.write(gif) } mech.back code = DeCAPTCHA.decode("#{TMPDIR}/captcha.gif") File.unlink("#{TMPDIR}/captcha.gif") if code.nil? then puts ' - CAPTCHA decode failed. retry' if VERBOSE next end form = mech.page.forms.first form.verify = code page = mech.submit(form) break unless page.links.empty? end if page.links.empty? then puts ' - Failed 3 times. Try another one.' puts return nil end # # download # puts " - Downloading: #{page.links.first.href}" if DEBUG retry_count = 0 video = nil begin video = page.links.first.click rescue Timeout::Error => evar retry_count += 1 if retry_count < 5 then puts " * Timedout, retry" if VERBOSE retry end raise evar end unless video.instance_of?(WWW::Mechanize::File) then if DEBUG then puts " - Something wrong while downloading. skip." puts end return nil end video.save(destfile) return destfile end end # # main # [DESTDIR, TMPDIR].each do |dir| if !test(?d, dir) or !test(?w, dir) then puts "#{dir}: Directory not exists or cannot write." exit end end files = [] # collect URIs from RSS RSS_URI = [ ['http://www.yourfilehost.com/make-rss.php?range=day&af=off', lambda {|rss| rss.items.map {|x| x.link }}, ], ] RSS_URI.each do |uri, preprocessor| rss = RSS::Parser.parse(uri) uris = preprocessor.call(rss) #=> Array of URI of YourFileHost uris.map {|x| /file=([^&]*)/.match(x).to_a[1] }.each do |file| # next if file !~ /\.wmv/ # uncomment it if you need only wmv files << file end end files.uniq! # download files.each do |file| begin Downloader.fetch(file, DESTDIR) rescue SystemCallError, Timeout::Error => evar puts " - error (#{evar.to_s}). skip." puts end end __END__