はてなキーワード: Getとは
やー。面倒でした。
古い情報だと Outlook Express を経由しろと書いてあるので、後継であるらしいWindows Live Mail を経由して(Windows Live Mail からエクスポートする方法で)
Outlook に移行したのだが、どういうわけか宛名が文字列として移行されてしまい、xxx@example.com というメールアドレスの移行ができなかったんです。
で eml → msg もしくは pst 形式への変換ソフトを探すのですが、無料のものが見つからなくてあんまり情報もありませんでした。が、ありましたよ!お兄さん。
====
MAPI data collection and parsing tool. Supports property tag lookup, error translation, smart view processing, rule tables, ACL tables, contents tables, and MAPI<->MIME conversion. MrMAPI currently knows: 3916 property tags 801 dispids 35 types 58 guids 148 errors 27 smart view parsers Usage: MrMAPI -? MrMAPI [-Search] [-Dispids] [-Number] [-Type <type>] <property number>|<property name> MrMAPI -Guids MrMAPI -Error <error> MrMAPI -ParserType <type> -Input <input file> [-Binary] [-Output <output file>] MrMAPI -Flag <flag value> [-Dispids] [-Number] <property number>|<property name> MrMAPI -Rules [-Profile <profile>] [-Folder <folder>] MrMAPI -Acl [-Profile <profile>] [-Folder <folder>] MrMAPI [-Contents | -HiddenContents] [-Profile <profile>] [-Folder <folder>] [-Output <output directory>] [-Subject <subject>] [-MessageClass <message class>] [-MSG] [-List] MrMAPI -ChildFolders [-Profile <profile>] [-Folder <folder>] MrMAPI -XML -Input <path to input file> -Output <path to output file> MrMAPI -FID [fid] [-MID [mid]] [-Profile <profile>] MrMAPI -MAPI | -MIME -Input <path to input file> -Output <path to output file> [-CCSFFlags <conversion flags>] [-RFC822] [-Wrap <Decimal number of characters>] [-Encoding <Decimal number indicating encoding>] [-AddressBook] [-Unicode] [-Charset CodePage CharSetType CharSetApplyType] All switches may be shortened if the intended switch is unambiguous. For example, -T may be used instead of -Type. Help: -? Display expanded help. Property Tag Lookup: -S (or -Search) Perform substring search. With no parameters prints all known properties. -D (or -Dispids) Search dispids. -N (or -Number) Number is in decimal. Ignored for non-numbers. -T (or -Type) Print information on specified type. With no parameters prints list of known types. When combined with -S, restrict output to given type. -G (or -Guids) Display list of known guids. Flag Lookup: -Fl (or -Flag) Look up flags for specified property. May be combined with -D and -N switches, but all flag values must be in hex. Error Parsing: -E (or -Error) Map an error code to its name and vice versa. May be combined with -S and -N switches. Smart View Parsing: -P (or -ParserType) Parser type (number). See list below for supported parsers. -B (or -Binary) Input file is binary. Default is hex encoded text. Rules Table: -R (or -Rules) Output rules table. Profile optional. ACL Table: -A (or -Acl) Output ACL table. Profile optional. Contents Table: -C (or -Contents) Output contents table. May be combined with -H. Profile optional. -H (or -HiddenContents) Output associated contents table. May be combined with -C. Profile optional -Su (or -Subject) Subject of messages to output. -Me (or -MessageClass) Message class of messages to output. -Ms (or -MSG) Output as .MSG instead of XML. -L (or -List) List details to screen and do not output files. Child Folders: -Chi (or -ChildFolders) Display child folders of selected folder. MSG File Properties -X (or -XML) Output properties of an MSG file as XML. MID/FID Lookup -Fi (or -FID) Folder ID (FID) to search for. If -FID is specified without a FID, search/display all folders -Mid (or -MID) Message ID (MID) to search for. If -MID is specified without a MID, display all messages in folders specified by the FID parameter. MAPI <-> MIME Conversion: -Ma (or -MAPI) Convert an EML file to MAPI format (MSG file). -Mi (or -MIME) Convert an MSG file to MIME format (EML file). -I (or -Input) Indicates the input file for conversion, either a MIME-formatted EML file or an MSG file. -O (or -Output) Indicates the output file for the convertion. -Cc (or -CCSFFlags) Indicates specific flags to pass to the converter. Available values (these may be OR'ed together): MIME -> MAPI: CCSF_SMTP: 0x02 CCSF_INCLUDE_BCC: 0x20 CCSF_USE_RTF: 0x80 MAPI -> MIME: CCSF_NOHEADERS: 0x0004 CCSF_USE_TNEF: 0x0010 CCSF_8BITHEADERS: 0x0040 CCSF_PLAIN_TEXT_ONLY: 0x1000 CCSF_NO_MSGID: 0x4000 CCSF_EMBEDDED_MESSAGE: 0x8000 -Rf (or -RFC822) (MAPI->MIME only) Indicates the EML should be generated in RFC822 format. If not present, RFC1521 is used instead. -W (or -Wrap) (MAPI->MIME only) Indicates the maximum number of characters in each line in the generated EML. Default value is 74. A value of 0 indicates no wrapping. -En (or -Encoding) (MAPI->MIME only) Indicates the encoding type to use. Supported values are: 1 - Base64 2 - UUENCODE 3 - Quoted-Printable 4 - 7bit (DEFAULT) 5 - 8bit -Ad (or -AddressBook) Pass MAPI Address Book into converter. Profile optional. -U (or -Unicode) (MIME->MAPI only) The resulting MSG file should be unicode. -Ch (or -Charset) (MIME->MAPI only) Character set - three required parameters: CodePage - common values (others supported) 1252 - CP_USASCII - Indicates the USASCII character set, Windows code page 1252 1200 - CP_UNICODE - Indicates the Unicode character set, Windows code page 1200 50932 - CP_JAUTODETECT - Indicates Japanese auto-detect (50932) 50949 - CP_KAUTODETECT - Indicates Korean auto-detect (50949) 50221 - CP_ISO2022JPESC - Indicates the Internet character set ISO-2022-JP-ESC 50222 - CP_ISO2022JPSIO - Indicates the Internet character set ISO-2022-JP-SIO CharSetType - supported values (see CHARSETTYPE) 0 - CHARSET_BODY 1 - CHARSET_HEADER 2 - CHARSET_WEB CharSetApplyType - supported values (see CSETAPPLYTYPE) 0 - CSET_APPLY_UNTAGGED 1 - CSET_APPLY_ALL 2 - CSET_APPLY_TAG_ALL Universal Options: -I (or -Input) Input file. -O (or -Output) Output file or directory. -F (or -Folder) Folder to scan. Default is Inbox. See list below for supported folders. Folders may also be specified by path: "Top of Information Store\Calendar" Path may be preceeded by entry IDs for special folders using @ notation: "@PR_IPM_SUBTREE_ENTRYID\Calendar" MrMAPI's special folder constants may also be used: "@12\Calendar" "@1" -Pr (or -Profile) Profile for MAPILogonEx. -M (or -MoreProperties) More properties. Tries harder to get stream properties. May take longer. -No (or -NoAddins) No Addins. Don't load any add-ins. -On (or -Online) Online mode. Bypass cached mode. -V (or -Verbose) Verbose. Turn on all debug output. Smart View Parsers: 1 Additional Ren Entry IDs Ex 2 Appointment Recurrence Pattern 3 Conversation Index 4 Entry Id 5 Entry List 6 Extended Folder Flags 7 Extended Rule Condition 8 Flat Entry List 9 Folder User Fields Stream 10 Global Object Id 11 Property 12 Property Definition Stream 13 Recipient Row Stream 14 Recurrence Pattern 15 Report Tag 16 Restriction 17 Rule Condition 18 Search Folder Definition 19 Security Descriptor 20 SID 21 Task Assigners 22 Time Zone 23 Time Zone Definition 24 Web View Persistence Object Stream 25 Nickname Cache 26 Encode Entry ID 27 Decode Entry ID Folders: 1 Calendar 2 Contacts 3 Journal 4 Notes 5 Tasks 6 Reminders 7 Drafts 8 Sent Items 9 Outbox 10 Deleted Items 11 Finder 12 IPM_SUBTREE 13 Inbox 14 Local Freebusy 15 Conflicts 16 Sync Issues 17 Local Failures 18 Server Failures 19 Junk E-mail Examples: MrMAPI PR_DISPLAY_NAME MrMAPI 0x3001001e MrMAPI 3001001e MrMAPI 3001 MrMAPI -n 12289 MrMAPI -t PT_LONG MrMAPI -t 3102 MrMAPI -t MrMAPI -s display MrMAPI -s display -t PT_LONG MrMAPI -t 102 -s display MrMAPI -d dispidReminderTime MrMAPI -d 0x8502 MrMAPI -d -s reminder MrMAPI -d -n 34050 MrMAPI -p 17 -i webview.txt -o parsed.txt
「結婚は金と顔の交換」と何かで読んで、
彼氏のことを企業(=年収)や学歴で主に評価している彼女らを言い得て妙と感じた。
ただ、彼女らのいい分もわかる部分もある。
彼女らが好むのは、有能な、世の中をサバイブできる男性、狩り能力のある男性。
これはむかしっから女性が結婚相手に選ぶ条件としてかわっていないんじゃないか。
極端な話
彼氏を自慢するとき「うちの彼氏はこないだ鹿を何匹しとめて」とか「だんなは村一の毛皮もち」みたいな感じだったかも。
それが現代になって、
「お金を稼いで自由さをGETできる能力のある男性」が評価されるようになり
マンモス肉→金銭パワー になった。
現状の日本社会では、大企業(特に商社、銀行、代理店、医者弁護士)につとめるだけの戦闘力のある男が評価されているわけで・・
そして、彼と彼女の間には、愛はあるんじゃないだろうか。
それをひがむのは
AutoHotKey・KeySwap・Atok2005を使った
また、これは AutoHotkey.ahk (AutoHotkey設定ファイル) 自身でもある。
ATOKプロパティ =>キー・ローマ字・色 タブ =>キーカスタマイズ
ここから。
────────────────────
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one ahk file simultaneously and each will get its own tray icon.
; SAMPLE HOTKEYS: Below are two sample hotkeys. The first is Win+Z and it
; launches a web site in the default browser. The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one). To
; try out these hotkeys, run AutoHotkey again, which will load this file.
#z::Run www.autohotkey.com
^!n::
WinActivate
else
Run Notepad
return
; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded. So feel free to customize it to suit your needs.
; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks. It also explains more about hotkeys.
; ! → Alt
; ^ → Control
; + → Shift
;────AutoHotKey.ahk のキーボードリマップ 2011_08_29_
; 変換 = IME ON (日本語) =>Atokの機能で実現
; 無変換 = IME OFF (英語) =>Atokの機能で実現
; CapsLock = F10 =>KeySwapで実現
; 右Ctrl = End =>KeySwapで実現
; その他はAutoHotKeyの機能で実現。
;vk1D::return ;無変換キー単体で動かないようにする
;RShift::^z ;右Shift で Ctrl+z
;SC07B & Space::send,{Blind}{Enter} ;無変換+Space で Enter
;SC07B & j::send,{Blind}{Home} ;無変換+j で Home
;SC07B & k::send,{Blind}{End} ;無変換+k で End
;SC07B & h::send,{Blind}^{Home} ;無変換+h で Ctr+Home
;SC07B & l::send,{Blind}^{End} ;無変換+l で Ctr+End
;SC07B & u::send,{Blind}{} ;無変換+u で
;SC07B & i::send,{Blind}{} ;無変換+i で
;SC07B & LButton::send,{Blind}{Home} ;無変換 + LButton でHome
;SC07B & RButton::send,{Blind}{End} ;無変換 + RButton でEnd =>Ctrlと組み合わせ可。
;SC07B & y::send,{Blind}^{ } ;無変換+y で Ctr+
;SC07B & o::send,{Blind}^{ } ;無変換+o で Ctr+
;SC07B & w::send,{Blind}{Home} ;無変換+w で Home
;SC07B & r::send,{Blind}{End} ;無変換+r で End
;SC07B & e::send,{Blind}{Up} ;無変換+e で Up
;SC07B & d::send,{Blind}{Down} ;無変換+d で Down
;SC07B & f::send,{Blind}{Right} ;無変換+f で Right
;SC07B & s::send,{Blind}{Left} ;無変換+s で Left
2::+2 ;2 を Shift+2 に
3::+3 ;3 を Shift+3 に
4::+4 ;4 を Shift+4 に
5::+5 ;5 を Shift+5 に
6::+6 ;6 を Shift+6 に
7::+7 ;7 を Shift+7 に
8::+8 ;8 を Shift+8 に
9::+9 ;9 を Shift+9 に
0::+- ;0 を Shift+- に
\::+\ ;\ を Shift+\ に
;──────────────────── http://nanabit.net/softwares/autohotkey/
; Alt+F6 (例:2011_08_04_)
; Ctrl+F6 (例:03:48)
; Alt+Ctrl+F6 (例:2011_08_04_16:45)
!F6::
Send, %A_YYYY%_%A_MM%_%A_DD%_
return
^F6::
Send, %A_Hour%:%A_Min%
return
!^F6::
Send, %A_YYYY%_%A_MM%_%A_DD%_%A_Hour%:%A_Min%
return
Ifは、「世にも奇妙な物語」の流れで、たまに見たり見なかったりする程度だったんだが、この回は見てなかった。どうやらとても評判が高い内容らしいということだけを聞いていて、しかし、気になる一方で、あまりこの話について調べようとすると、オチがわかってしまうので、積極的には触れないようにしてたら、17年。岩井俊二の公式サイトで公開されたと知ったので見てみた。
中身は、俺が想像していたのとは全然違ってた。以下、俺が想像してた話。
全然、予想と違うじゃねーか。なんだこの甘酸っぱいの。北川昌弘が、べた褒めしていた時点で、どういう中身か気づくべきだった。
それに、14歳の奥菜恵に12歳の小学生役は無理がありすぎるだろ。せめて、13歳で中1くらいにしておこうぜ。学校でも私服なのもあって、子供とお姉さんって感じでなんかなぁ。あと、花火はどこからみても、丸く見えることを"既に知ってしまっていた"のが、残念だった原因かもしれない。
って、なんかありますかね?
失恋3日め。
全ては私のせい。
常日頃からの素行と口の悪さが原因。
いつもいつも母から注意されていた。
いやはや・・・。
後悔あとにたたず・・。
どんだけ泣いても落ち込んでも時間は流れていく。
私がどうなろうがしったこっちゃなく世界は回る。
いい加減、なにから行動せねばということで、復縁もちょっとは期待したいけど、まあ次に進まなきゃと思った。
move on するために、指針となりうる情報(けっこうマジメなの)を求めてネット・図書館を徘徊してみた。
が、これといった収穫は無かった。
探せてないだけなのか?
たぶんそうだな。
まあ当たり前かもしれんけど、
彼をgetするための情報はちょっとした雑誌から書籍、DVD、映画等々大量に氾濫してる一方、
彼をget overするノウハウって、それを真正面から取り扱ったモンってどれだけあんだろうか。
あるにはあるんだろうが、比較的かなり少ない気がする。
小悪魔テクとかモテはもういいから、失恋の乗り越え方みたいなTipsで特集組んでくれんかな、雑誌社さん・・・
ツライ。
誤字脱字は勘弁な。
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...
2010年の日本のヒップホップ音楽 【作業用BGM】 ‐ ニコニコ動画(原宿) の曲目。
01. LOST IDENTITY - 道(TAO) (YouTube)
"Lost Identity", 08.15. ILL EAST RECORDS
02. 都市伝説 - 韻踏合組合 (YouTube)
"都市伝説", 10.10. IFK RECORDS
03. 極悪JAZZ feat. 鬼 - キリコ (YouTube)
Produced by DJ OLDFASHION
04. Black File 200回記念フリースタイル (Vimeo)
"Black File", 06.24. スペースシャワーTV
05. 夕方 - S.L.A.C.K. (YouTube)
"Swes Swes Cheap", 08.04. Dog Ear Records
06. 思考品M.T.B.D. feat B.D. - DJ Mitsu the Beats (YouTube)
"UNIVERSAL FORCE", 08.04. PLANET GROOVE
07. CAMP'S RULE - RAMB CAMP (YouTube)
Produced by DJ GQ
"RAMB CAMP", 05.14. FILE RECORDS
08. MECCHA MECHA - コッペパン (YouTube)
09. GOOD MORNING BABY - やけのはら (YouTube)
10. 捕食 - asa x CUBEc.u.g.p (YouTube)
"捕食-hoshoku-", 06.11. Jar-BeatRecord
11. イッちゃってイイ? (SUGAR CRACK REMIX) - SD JUNKSTA (YouTube)
12. TORA TORA TORA - TETRAD THE GANG OF FOUR (YouTube)
"SPY GAME", 11.12. FILE RECORDS
13. SUNDAYfeat. WAX - PONY (YouTube)
Produced by KURABEATS
"Verseday", 05.05. 桃源響RECORDS
14. Get Da Passports - Black Mont Blanc (YouTube)
15. 音楽ワルキューレ - DOTAMA (YouTube)
Produced by Fragment
16. いつもそう - WAX from SD JUNKSTA (YouTube)
Produced by KYN
"神成り", 07.21. 諭吉レコード
17. MADE IN JAPAN feat. X-MAN - L-VOKAL (YouTube)
Produced by 1689
"Lovin'", 03.03. MATENRO RECORDS
18. Homeward Journey - Uyama Hiroto (YouTube)
"Homeward Journey", hydeout productions
19. G.H.E.T.T.O - SHINGO☆西成 (YouTube)
Produced by TRAMP
20. STRAIGHT CASH - YING YANG (YouTube)
"TOTAL ECLIPSE", 10.13. YING YANG PRODUCTION
21. ILLMATIC RACER feat. 来門 - UNDER BROS (YouTube)
Produced by TAKE-C
22. トーキョー難民 - あるぱちかぶと (YouTube)
"◎≠", 02.03. Slye Records 在音
23. 森羅万象 - AXIS (YouTube)
"UNPOPULAR -在日外国人奇声集-", 04.21. Libra Records
24. iPhone for GAGLE - GAGLE (YouTube)
Produced by DJ Mitsu The Beats
exclusive, 07.02. (twitter)
25a. 24 BARS TO KILL feat. ANARCHY, RINO LATINA II, 漢, MACCHO - Ski Beatz (YouTube)
"24 HOUR KARATE SCHOOL JAPAN", 10.20. R-RATED RECORDS
25b. 24 Bars To Kill "IFK REMIX" feat. Hidaddy, Erone, Satussy, 遊戯 - Ski Beatz (YouTube)
exclusive, 11.05.
25c. 24 Bars To Kill "MYC REMIX" feat. RYUZO, DABO, SUIKEN, 般若 - Ski Beatz (YouTube)
exclusive, 11.06.
26. 東京哀歌-トウキョウエレジイ- - 空也MC (Youtube)
Produced by fanfan
27. 禁断の惑星 feat. 志人 - TABOO1 (YouTube)
Produced by DJ KENSEI
"LIFE STYLE MASTA", 10.20. Libra Records
28. Break Boy in the Dream feat. 七尾旅人 - 環ROY (YouTube)
"BREAK BOY", 03.17. POPGROUP RECORDINGS
29. DREM SKY - RAU DEF (YouTube)
Produced by PUNPEE
"ESCALATE", 09.10. FILE RECORDS
30. MOTHER feat. MMM, CHIYORI - おみゆきChannel (YouTube)
"おみゆきさん", 03.10. Mary Joy Recordings
31. MISSION POSSIBLE - OLIVE OIL×ILL-BOSSTINO×B.I.G.JOE (YouTube)
"MISSION POSSIBLE", 07.21. OILWORKS THA BLUE HERB RECORDINGS TRIUMPH RECORDS
32. WAKE UP feat. MARIA - QN from SIMI LAB (Amebreak)
"THE SHELL", 07.29. FILE RECORDS
HTMLはわかるけど、サーバーサイドはお遊びでphpを触ったぐらいだったので、会員制でデータをためこむサイト作りに初めて挑戦した。
今回重視したのは、「いかに個人情報をお漏らししないようにして、万が一漏らしても被害を少なくするか」ということ。
世の中、有償サービスでもパスワードを平文で保存してるサービスが意外と多いらしいので、流出した時のリスクを少しでも減らせる対策として書きます。
サーバー:ロケットネットのキャンペーンにでレンタルサーバ年1000円ポッキリプラン クライアント側の処理:HTML+CSS+jQuery(とプラグインもろもろ) サーバ側の処理:PHP Webサーバー:Apache データベース:MySQL
俺も巻き込まれたところでは、サミータウンがメールアドレスとパスワードセットでお漏らししてお詫びに1ヶ月無料なにそれこわい。
サミータウンだけならまだいいけど、メアドとパスワードを他のサービスで共通化して使ってる情弱なので、
共通化してメアドとパスワードをどこかのサービスが一箇所でも漏らすと、ヤフオクID乗っ取り事件みたいなことになる。
http://internet.watch.impress.co.jp/cda/news/2008/09/26/20967.html
俺だってできれば人様のメールアドレスとパスワードとか預かりたくない。
万が一、肉親のメールドレスを発見してパスワードにrapemeとか入ってたら明日からどういう顔すればいいかわからない。
ググってみてもどこにも情報のってない。うーん困った。ダメもとで「個人情報ってどうやって保存したらいいんだろう。。。」
って、twitterでつぶやいたら、「住所とかは可逆暗号化でいいけど、パスワードはハッシュで不可逆化しないとだめだよ!」
「住所とかは可逆暗号化でいいけど、パスワードはハッシュで不可逆化しないとだめだよ!」
何のことかわからなったので、調べてみると、
・ハッシュ=ハッシュ値を使った、元のデータに戻せない暗号化方式
うーん。。。よくわからん。。。
電話番号とか住所は、第三者が使用する情報なので、可逆が必要。パスワードは、認証にしか使わないので、
ハッシュ値の結果が一致すれば元のデータがわからなくてもOK、という方式なのでこういった暗号の使い分けをする。
●可逆暗号のイメージ(もとにもどせる) 暗号化キーは開発者が指定する。 090-xxxx-xxxx →(暗号化)→ !'&amp;%($% →(復号化)→ 090-xxxx-xxxx ●ハッシュのイメージ(もとにもどせない) 登録password(DBに保存)→(ハッシュ値抽出)→!"$#'$#=" ログインpassword →(ハッシュ値抽出)→!"$#'$#=" ※二つのハッシュ値が合っていれば、パスワード一致として認証する。
今回はMySQLの関数で実現した。encode関数で暗号化して、decode関数でもとに戻す。
例えばtel_noという項目だけあるテーブルがあるとすると、
//データベースに保存する時 insert into テーブル名 (tel_no) values (encode(tel_no,'暗号化キー')); //データベースから取得する時 select decode(tel_no,'暗号化キー') from テーブル名;
これで、データベース格納時は暗号化(バイナリ化)されて、データベースから取り出してHTML表示する時に復号化はされる。
<ユーザ登録時>
$password=(フォームから取得) $hash=hash('sha512',$password) //ユーザ登録時は、ここで生成した$hashをデータベースにぶっこむ。
ユーザ認証時は、入力されたパスワードと、データベースのパスワードが一致するかチェック。
//フォームから入力されたパスワード $input_password=(フォームから取得) $input_hash=hash('sha512',$input_password); //MySQLに保存されたパスワードを取得(略) $db_hash==(データベースから取得) //判定 if($input_hash==$db_hash) echo 'ログインしますよ!'; //ここにログイン処理を書く else die('メアドとパスワードがあってないよ!');
これでもしSQLインジェクションとかでデータが流出しても、ハッシュ暗号のパスワードに関してはまず解析されないはず。。。
可逆暗号のデータもphp側の暗号化キーが盗まれない限りバレない。。。はず。。。
何でもかんでも暗号化するとコードが煩雑になるし、パフォーマンスにも影響でそうなので、
住所データの都道府県とか、漏れても良いような情報は暗号化しませんでした!!
個人情報保護法 2条による定義 「個人情報」とは、生存する個人に関する情報であって、当該情報に含まれる氏名、生年月日その他の記述等により特定の個人を識別することができるもの(他の情報と容易に照合することができ、それにより特定の個人を識別することができることとなるものを含む。)をいう。
これで、もし漏れても、俺、ウンコ漏らして臭いけど、パンツから出てないからいいよね?というレベルにはなった。はず。
万が一漏れても大丈夫!と書いたけど、そもそも漏らすなというお話になる。色々調べた結果、以下の対策をほどこした。
・当初jQuery側でSQL組み立ててPHPに渡してたので、これだと任意のSQLが実行できて漏らし放題なのでやめる。
・GETとかPOSTでDBに渡すパラメータを扱ってる場合、ちゃんとエスケープする。
例えばログイン認証するPHPで、GETメソッドでフォームからデータを取得するような場合、
$id=$_GET['id'] $pwd=$_GET['pwd'] $sql="select * from ユーザーテーブル where uid='$id' and pwd='$pwd'
とかやってると、login.php?id=admin'&pwd=' OR '1'='1とかパラメータを渡されるとあら不思議!
select *from ユーザテーブル where uid='root' and pwd='' or 1=1
で、誰でもログイン出来ちゃう!ので、mysql_real_escape_stringでエスケープしたり、渡されたパラメータが想定した値かどうか(例えば数値かどうか、とか)のチェックをいれたりする。
・保存するデータにタグやJavascriptを埋め込まれないように、保存されたデータを出力する場合はPHP側でhtmlspecialchars関数使ってエスケープするようにする。
こんな感じでお漏らし対策をした。間違いがあったら教えて欲しい。
ちなみに出来上がったサイトはこれ。
http://1-byte.jp/2011/03/20/20_tips_you_need_to_learn_to_become_a_better_php_programmer/
良いPHPerだって?そんなものは丸めてゴミ箱にでも捨ててしまった方が資源の再利用になる分いくらかマシだ。
つまり俺たちがしなくちゃならないことは「より良いPHPerにならないため」に何ができるかってことなのさ。
それじゃ、始めよう。
?>なんて使っちゃいけない。そう俺たちはBAD PHPer。
無駄なホワイトスペースの出力に悩まされるくらいなら対称性なんて丸めてゴミ箱にでも捨てた方がまだマシだ。非対称性こそが賛美。
require_once("config.php");
未だにこんなことやってるやつがいるのかいベイベー。絶対にダメだ。この一行を見たら俺は悶絶する。
ダメだ、早く何とかしないと。
大抵このconfig.phpの中身はこうなっている。見て絶望だ。
$hoge_path = ''; if (!LOCAL) { define('FOO_FLAG', 1); if (HONBAN) { define('HOGE_FLAG', 1); } else if (TEST) { define('HOGE_FLAG', 2); } } else { $hoge_path = '/local'; define('FOO_FLAG', 2); define('HOGE_FLAG', 3); } define('HOGE_URL', $hoge_path.'/hoge/');
こういうのが延々と続くわけだ。もういやだ。もう見たくない。
本番環境とテスト環境でどういう値の違いがあるのか、ローカル環境だとどうなるのか、まったく把握できる気がしない。
なまじPHPな設定ファイルのせいで、処理をついつい書いてしまう。そしてどんどん複雑になってしまう。
やはり設定データは基本的にYAML等のデータしか定義できない形式のもので用意すべきだ。そして環境ごとに設定ファイルを分けるべきである。
そうすることで何にどういう違いがあるのかすぐにわかるし、diffすれば一度にすべて把握することができる。
# 本番環境設定ファイル foo_flag: 1 hoge_flag: 1 hoge_url: '/hoge/'
# テスト環境設定ファイル foo_flag: 1 hoge_flag: 2 hoge_url: '/hoge/'
# ローカル環境設定ファイル foo_flag: 2 hoge_flag: 3 hoge_url: '/local/hoge/'
// ここで後の処理のためにhogeメソッドを呼び出しておく $q->foo(); // $a['foo']はここに来る時点で真のはず // 2010-03-10 判定がおかしいので修正 // 2010-06-21 やっぱり値が入ってる方が正しい if ( !isset($hoge[0]) ) { }
コメントは保守されない。そう、それは真実。こんなコメントを発見したら即効削除しよう。コメントは基本信じるな。
俺たちにちょっとしたヒントと大きな損害を与えてくれる、それがコメントの役割なのだ。
わかる。いいたい事はとてもわかる。俺たちはしばしばインデントにスペースを使うはずだ。一方でIDEのしっかりした言語ではタブも使うことがある。しかし悪いことに、両者を混同しているプログラマも一定数いるのだ。
タブを画面上で認識しにくいエディタが世の中には存在する(何とは言わないが)
そして画面上で認識しにくいことを理由にタブを気にしないプログラマがいる。
この二つの条件が重なると、タブとスペースの交じり合ったインデントが完成する。もうぐちゃぐちゃだ。これは永遠に続く戦いだ。
私たちが勝利を掴むためにできることなどせいぜい、常にスペースしか使わない。タブを見つけたらその都度スペースに変換する。そういった地道な活動が明日へとつながるのだ。
われわれがプログラムをするとき、何に一番時間がかかってるか。実は変数の命名なのである。ここで拘り過ぎて時間をかけ過ぎては何も進まない。
御託はイイからさっさと書け、だ。しかしとはいっても変数名は重要。日頃からどういうときにどんな名前を使うかを決めておくといい。
そして変数名に型はまったく必要ない。型宣言のないPHPにおいて、型の変数名をつけること自体ナンセンスだ。
$iNumber = 'aaa';
になんの意味もない。コメントを信じるなでも言ったが、これはプログラマを混乱させるだけの害悪なものだ。
変数を使う前に初期化するのは、警告を出さないという意味でも良い癖だ。しかし具体的にどこでやるかが問題だ。
$foo = null; $foo = $q->foo();
こんな初期化に意味はない。よくあるのはやはり、if文で値を振り分けるケースだろう
$foo = null; if ( $hoge ) { $foo = 1; } else if ( $bar ) { $foo = 2; }
このときの初期化はとても有効だ。もしnullの初期化を忘れたまま$fooを使うと警告が出るが、ちゃんと初期化してるので出ない。基本中の基本だ。
function getStatus() { $bReturn = false; if ($i == 2) $bReturn = true; return $bReturn; }(中略)
もし、何かしらの理由で、あなたの書いたif文が間違っていたら?
この書き方をしていれば、間違った値に対して、常にfalseが返る。
私たちが、PHPでsensitiveなデータを取り扱うなら、正しいデータが入力されるまでは、動かないコードを書くべきだ。
trueとfalseの条件がいまいち明確ではないが、本当に動かないコードを書けというのであれば以下のようにすべきだ
function getStatus() { $bReturn = false; if ($i == 2) $bReturn = true; else if ($i == 1) $bReturn = false; else throw new Exception("bad status! $i"); return $bReturn; }
中途半端にfalseを返して生存させる必要性はまったくない。今すぐ死ね!
連想配列のキーを指定する場合だけ定数と間違わないようにクオートで囲まなければならない。そして逆に定数を使いたい場合はクオートで囲ってはいけない。
更に後世のプログラマが処理を見たときに、定数が使いたかったのか、文字列が使いたかったのかを明確にしたい場合はconstantを使うと良い。
// 定数のFOOを使うよということが明確になる print $a[constant('FOO')];
もし、文字列を変数の値と一緒に出力するとき、PHPではコンマの代わりにprintfを使うことが使える。
printf( “Hello, my name is %s“, $sName);
以下の代わりに上記のコードを使う。
echo “Hello, my name is “, $sName;
出力すべき変数が増えれば増えるほど、有効になっていく。とにかく迷ったならば、printfを使え、だ。
三項演算子はとても有効だ。しかし優先順位に難があるせいで、三項演算子をネストしようとすると以下のようなコードになってしまう
$n = (($i == 1) ? 2 : (($i == 2) ? 3 :$i));
括弧だらけで読みにくいったらありゃしない。三項演算子を使うなら一回まで。約束守れないやつは丸めてゴミ箱にでも捨てちまえ。
if ( $flag ) { }
仕様をちゃんと把握しているなら真偽値のチェックなどこれで十分。
もし事前にbool型だというのが確定してるのなら「$flag === true」を使えばいい。
インクリメント、デクリメント演算子は前に付くか後ろに付くかで意味が変わるので慣れるまでは非常にややこしい。
わけがわからなくなるくらいなら初めから使わないほうが良い。見極められないなら使うな。それがPHPerなのだ。
文句なしだ。これは文句がない。
他にも色々あるので覚えておこう
$a %= 1; $a &= 1; $a |= 1; $a ^= 1; $a <<= 1; $a >>= 1;
てっとり早く画面に表示する際にpreはよく使うが、デザインの関係上画面の文字が見えないときがある。
なのでdivを使って以下のようにしとくと便利だろう。
function p($var) { echo "<div align='left' style='background-color:white;color:black;'><pre>"; print_r($var); echo "</pre></div>"; }
君らが通常作るアプリケーションなんぞに、定数なんぞ必要ない。いいか、もう一度言う、お前ら程度のもんが、定数使おう何ぞ、おこがましいわ!
大丈夫。なんでもかんでも定数にする必要はない。結局設定ファイルに定数をずらずら作りまくってわけがわからなくなってるパターンが多い。
貴様みたいなもんに、定数は制御できん。いいか設定ファイルはYAML等のデータで持つようにし、その連想配列のデータ構造を一つ持ってるだけで定数の変わりになる。
このメリットに比べれば、定数だと書き換えられなくて良いという利点などこの歯のカスほどのものだ。そんなものは丸めてゴミ箱へ捨ててしまうといい。
認識を改めろ。俺たちはより良いPHPerにならないために努力している。
class Request { private $parameters; private $method; function __construct () { $this->method = $_SERVER['REQUEST_METHOD']; if ( strtoupper($this->method) === 'POST' ) { $this->parameters = $_POST; } else { $this->parameters = $_GET; } } function param ($key) { return isset($this->parameters[$key]) ? $this->parameters[$key] : null; } }
これだけでもいい。たったこれだけでもとても便利だ。ここから拡張してGETやPOSTを明示的に取るメソッドとかも作ってみるといい。自分の手を動かすのだ!
例が良くない。こんなのは引数が20個ある関数から、setを20回呼ぶオブジェクトに変わっただけではないか。
そもそもこの20個の引数とはなんなのか。何かのデータ構造なんであれば連想配列にして引数一つとして渡すべきだし、それぞれまったく異なる用途の変数なのであればWindowsプログラミングじゃあるまいし、20個も引数取る時点で設計が間違えている。
何がいいたいか。別に関数でもオブジェクトでもどっちでもいいということだ。
そんなことで悩んでる暇があったら設計を見直せ。
スキあらば自分自身を返せ。スキあらばオブジェクトを返せ。配列はArrayObjectのARRAY_AS_PROPSで返せ。
ひたすらメソッドチェイン。来る日も来る日もメソッドチェイン。とにかくメソッドチェインを使い続けろ。そこに未来はある。
どんなコードも繰り返すな。もし、少しでも同じコードを書いていたなら、それは関数に置き換えてしまえ。
・・・と、いうのはやめなさい。
一見同じように見えた処理でも前後の流れでまったく違うものということが往々にしてある。
まとめ方にも問題があるケースもある。何でもかんでも関数化すると、関数が膨大に増えていく。君は見たことがあるだろうか。common.phpやfunction.phpの恐ろしさを。
確かに細かく関数化はされているが、適切に関数化していないのである。結合度が非常に高い。なんでもかんでも盲目的にまとめれば良いという話ではないのだ!
あまりに極度に意識しすぎると、プログラムそのものができなくなる。そういう状態に陥る。
気を抜いて。そう気を抜いて。所詮あなたのコードなんてすぐに消えてなくなるよ。きっともっと偉い人が作り直すよ。だからまずは思うが侭にやるといい。
結合度を減らすというのは非常に難しい。何度も何度も失敗し続けて、ようやくここは分けた方が良かったんだなと気付く。次に活かそうと心に決める。そしてまた同じ過ちを繰り返していくわけだ。
まずは実装することだ。これが一番の早道だ。まずはがっつり結合した関数をあえて作るといい。何も考えずに作ろう。
そしてその後に、一部分使いまわしたいとおもうことがあるはずだ。その時に関数に切り出そう。それを繰り返すといい。そのうち初めから分けた方が良いと気付く。
何事も経験が必要である!経験を積まないプログラマは丸めてゴミ箱に捨ててしまえ。
さて、先の例で言うならば、私ならadd_result_outputという関数を作ってしまうだろう。だって、addとresultを連続して呼ぶのはめんどくさいんだもん。一連の流れをいつも使うのなら、その流れをやってくれる関数を作ればいいじゃないか。
function add_result_output ($iVar, $iVar2) { $r = add($iVar, $iVar2); echo result($r); }
もっと言えばクラス化してしまってもいいかもしれない。どんな感じになるかは君の手を動かして確認しよう!
このTipsはとてもわかりにくく、ニッチ過ぎる部分も多いかもしれない。
あくまでも「より良いPHPerにならないための20Tips」なのだ。
君はこの記事を鵜呑みにしてはならない。PHPをPHPと見抜けないPHPerはPHPを使うのは難しい。
もし、あなたがPHPプログラマなら、公式のPHPドキュメントはあなたのケツの穴を拭くための紙になるだろう。
私は、それぞれのセクションを眺めて、各関数でどんなことが出来るかなんぞ、歯クソのゴミ程に役に立たないとおもっている。動けばいい。はは。
あなたは、PHPで用意された既製関数で多くのことが実現できることに、(俺の仕事を減らすなと)驚くはずだ。
この記事があなたの役に立たない事を。
ふざけんな!
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/
結論:大丈夫。
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
へ続く
等位 Coordinating Conjunctions
相関 Correlative Conjunctions
お悔やみの言葉
会話一般
(語学学習サイト個人的リンクメモ / Lists of Language Learning Links)
Slicehost VPS Hosting is now Rackspace Cloud Servers hosting
Slicehost Articles: IP failover - High Availability explained
All requests for the website come to the front end Slice.
That Slice then proxies the request to larger Slices running in the backend of the network.
Slicehost Articles: IP failover - Slice setup and installing Heartbeat
Monitoring Ubuntu Services Using Monit | Ubuntu Geek
$ sudo tasksel
Slicehost Articles: Ubuntu Hardy setup - page 1
Slicehost Articles: Ubuntu Hardy setup - page 2
Automatic Rails on Ubuntu 8.04 LTS « Enjoying Rails
joerichsen's gist: 16225 — Gist
Setting up Ubuntu Jaunty for Ruby and Rails development | Joe Ocampo's Blog
5-minutes to Rails // Slicehost VPS Hosting is now Rackspace Cloud Servers hosting
slicehostでRails2.2.2を動かすまで - なんとなく日記
Slicehost Articles: Ubuntu Hardy - Ruby on Rails
Slicehost Articles: Ubuntu Gutsy - Django installation
UbuntuにLAMPサーバを手早くインストールする方法 - builder
LAMP(Linux、Apache、MySQL、PHP)サーバを手早くインストールする最も簡単な方法
Slicehost Articles: CentOS setup - page 1
Slicehost Articles: CentOS setup - page 2
CentOSのPHPにはマルチバイト対応入ってませんのであとから入れましょう (技術メモ)
タグ「slicehost」を含む新着エントリー - はてなブックマーク
naotaka blog » Blog Archive » Slicehostに申し込み
slicehostでUbuntu8.04の設定1 初期設定 - delab
Slicehost : Tag Archives - delab
ホスティングサービス Slicehost のドキュメントがすばらしい : 僕は発展途上技術者
SlicehostへのRedmine導入手順(Ubuntu Gutsy)
つくるぶガイドブログ: 失敗しない Rails が動かせるホスティングサービス選びと環境構築
具体的にどこがおすすめかという質問を受けた場合、共用サーバーならば海外の Slicehost、専用サーバーならさくらインターネット
Slicehost に移行しました - milk1000cc
Web 管理画面で、OS 再起動・再インストール、コンソール操作、DNS 設定などができます。
バックアップ入れても月額 $25、
レンタルサーバはさくらインターネット | 「さくらのレンタルサーバ」「さくらのマネージドサーバ」
格安レンタルサーバーならステップサーバー | 高機能で格安なレンタルサーバーTOP
レンタルサーバーNSF - 月額100円〜容量無制限可の格安レンタルサーバー
ロリポップ!レンタルサーバー - 月額105円~容量最大30GB 初期費用半額キャンペーン中!
チカッパ!レンタルサーバー - ご利用中のユーザー様へのご案内
レンタルサーバー「heteml」 - 大容量・高機能のレンタルサーバー
Slicehost VPS Hosting is now Rackspace Cloud Servers hosting Slicehost Login
Linode - Xen VPS Hosting Linode Login
Linode.comのVPSホスティングを契約してみた - m-kawato@hatena_diary
Webbynode Hosting - Host and Deploy Ruby on Rails, Django, Node.js, PHP and more
VPS Hosting � Virtual Private Server Hosting | DataRealm.com
Coupon codes, promotions and special offers - CheapVPS
VPS :: VPS Hosting :: VDS :: Virtual Private Servers :: Virtual Dedicated Servers :: Server Axis
RootBSD - FreeBSD and OpenBSD VPS Hosting - Welcome to RootBSD
レンタルサーバーならVPSレンタルサービス|VPS stock
激安の専用サーバ:ServerPronto なんと月額$29〜 | 海外サーバ.jp
サーバ本体無償提供、ホスティング向きハウジングサービスを月額7,780円で
専用サーバの料金と仕様 | 専用レンタルサーバ(ホスティング)のさくらインターネット
Dedicated servers | Windows and Linux dedicated web servers
Dedicated Servers, Self-Managed Dedicated Server, Dedicated Hosting at ServerPronto
MegaNetServe - Value Driven Dedicated Servers on Linux, Windows 2008, Windows 2003 & FreeBSD
Domain Names, Web Hosting and SSL Certificates - Go Daddy
Dedicated Servers, vSERVERs – SERVER4YOU
Web Hosting | Dedicated Hosting | Domain Registration |
海外の安い専用サーバプランをいろいろ並べて検討してみた - GIGAZINE
再度、レンタルサーバ(共有ではなく「専用」です)で、国内外を.. - 人力検索はてな
Website Hosting in the Yahoo! Directory
デル株式会社(Dell Japan)の公式サイト | Dell 日本
HP-ProLiant-ML115 G5まとめwiki - トップページ
各メーカーの最安サーバを比較検討してみた - GIGAZINE
バックエンドアーキテクチャーのおかげで、2テラバイトの画像を、$1000のLinuxサーバー1台で賄うことができる。だから、年間わずか20万ドル程度の設備投資で、現在サーバー500台を保有している。
ドメイン登録 - VALUE DOMAIN:バリュードメイン
Domain Names, Web Hosting and SSL Certificates - Go Daddy
Amazon S3をWindowsにマウントできるJungle Disk Kawanet Tech Blog/ウェブリブログ
Online storage and backup | Secure file sharing | Unlimited online storage | Jungle Disk
Amazon.co.jp: 現場が教えるホスティングサービスの勘所―立ち上げから運用管理までのノウハウ (NEサポートシリーズ): 合阪 省: 本
Q1. 暇そうだけど、あなたはいくつなの?二十代?三十代?
A1. 30代ですが、なにか?
Q2. いくら稼いでいるの?500万も稼いでいないの?ふーん。
Q3. 不労所得って知っている?
Q4. 家をいくつ持っているの?
A4. 実家が一つ。
Q5. 世界を相手に努力したことあるの?
A5. 努力はしてないけど、世界を相手に仕事してますが何か?
A6. 自分のお金じゃなければ普通に。金型発注でそれぐらいは動くよ。
Q7. 子供はいるの?いないの?
A7. いませんがなにか?
Q8. こんなことしていて将来に不安はないの?
A8. 全然不安はありませんよ。不安を感じたら安定剤を飲めばいいんです。
Q9. 中高年期になって貧乏でいいの?
A9. 貧乏でもいいのでは?
Q10. ブログの文章を読みながら、自分の将来のヴィジョンを描けるの?
A10. 描けませんが、なにか?将来なんて風まかせです。
Q11. はっきりきっちり、ディティールを詳細に描くくらいに思い続けるつもりなら、はてなでくだらないブクマコメントなんて残しているようじゃダメだってことをわかってるの?
A11. おっしゃっている意味が分かりません。
Q12. いつまでもうだつが上がらなくていいの?
A12. うだつはあがらない方が幸せなときもあります。というか、地味でいいんじゃね?
A13. 3つぐらいありますが、サラリー以外は雀の涙です。
Q14. インカムソースはふたつより、みっつくらいあったほうがいいんじゃない?
A14. どーかなー。二つで十分ですよ。「ノー!フォー!」あ、怒られた。
Q16. まだ成功していないのね?
A16. なにをもって成功かが問題ですね。私の物差しでは私は成功者です。
Q17. ああ、小さな成功はしているわけね?
A17. なにをもって成功の大小を決めるか問題ですが、いろいろな成功はしていますね。小さな所では半年で10kgの減量。大きな所では去年出した特許で5万円の報奨金Get!
Q18. で、お風呂は家にふたつある?あら、お風呂のない家なのね?
A18. お風呂のない家にあこがれます。銭湯が近くにあるって事ですよね。銭湯いいなぁ。
Q19. キッチンはふたつある?
A19. ひとつです。ベッドから歩いて三歩の所に。
A20. いいえ?そもそもあまり他人としゃべらないもので…。雑談したいんだけど、みんな真面目に働いていてね…。
Q21. 普段100円ショップの食器で食事してジャージをはいている生活水準だけど、豊かな人生なのね?
A21. 鍋から直接食べるから、食器は茶碗ぐらいかなー。これも実家から持ってきたから100円ショップじゃないし。コップはビールの景品。ジャージはあまり好きじゃないから来てないよ。家では下着派。でも、豊かな人生だよ。光回線だし。
Q22. 現状維持で別に望むものもないわけね?
A22. いいえ。やっぱり僕にも望むモノはあります。穏やかな死が欲しいです。
私的にはこんな感じ
// 自分で決められる場合は、関数のはじめは小文字にすることが多い // size_getみたいに繋げる時にはアンダーバー // getとかは後ろに書くことが多い int hoge(int n) { // int i; int retVal = 0; // 初期値付き変数と無しの変数とは分離 // 変数は使うところ付近で宣言 特にforは可能なら括弧内で // 短ければ一行で書き切る for (int i = 1; i <= n; ++i) retVal += i; // 長ければ二行 /* for (int i = 1; i <= n; ++i) retVal += i; */ // 複数行 /* for (int i = 0; i <= n; ++i) { // 略 } */ return retVal; }
関数とかクラスとか名前空間みたいなスコープっぽいものは改行して、
forやらifやらみたいなのは改行しないよ
今日はなんかコードを書く気になれんので、開発環境でも整えよう。
自分の物理的な開発環境は、会社PCと自宅PC(デスクトップ)、自宅PC2(ノート)。
会社PCと自宅PCデスクトップはWindowsで自宅PC2(ノート)はUbuntu Linuxみたいな構成になっている。
基本的には、PHPのコードしかいまんとこ書いてないんだけど、まあいろいろ他のコードも書いたり。
いややっぱりPHPしか書いてないか。現在の構成は以下のようなかんじ。
会社開発環境:Eclipse + Aptana + PHPEclipse ほんで日本語入力がskk。あとは特になしデフォ。
自宅(デスクトップ)開発環境:萌ディタ + FFFTP。あんまこっちじゃ開発してない。
自宅(ノート)開発環境:gedit(なんか標準でついてるやつ)。これで書いて、ごにょごにょみたいな。(Apacheいれて)。こっちメイン。
ほんで、これを統括するリポジトリ、BTS。会社のリポジトリは、SourceSafeとSubversionがある。Subversionに移行中。
BTSはMantisとかいうのだったはず。導入したばっか。あと個人用にもSvnリポジトリがある。趣味の開発とかはこっちへ。
なんというか正直複雑するというか、結構面倒なんでいろいろ統一しようと思う。
まず自宅はノート遅すぎなので(このご時世にX20はねーわ)、デスクトップだけにしてノートはお蔵入り方向で。さようなら。
会社の開発環境もちょい変えよう。なんかEclipseはだめだ。僕みたいな初心者プログラマには便利すぎ。
なんかどんなコードを書いても動いてしまいそうな気がする。よくない(自分がだけど--)。
基本構成は、http://www.itmedia.co.jp/enterprise/articles/0703/07/news017.htmlを参考に。
会社と自宅のデスクトップにcoLinuxを入れて、上記3種の神器を入れる(ミーハーでごめん)。
次に全PCのIMEをSKKに。いい加減統一しないと指が変なかんじになってきている。
これでコードを書いたり、文書を書いたりできるようになった。次に開発動作環境。
Apacheとphpとrubyとgccとg++とnasmとjavaとhaskellとperlぶっこんどこう。jsはFirefoxで動くからすばらしいね。
次は、subversionとmakeとqemuいれとく。
社内環境はどうにも変えようもないけれど、BTSとかSVNに変更が発生したらIRCでメッセージ流すのはいいと思った。
http://www.itmedia.co.jp/bizid/articles/0703/01/news113.html
はやめにPG終わらせてやってみよう。
まあこんなかんじかなあ。だらだらと書いてしまった。まあよさげ。ちなみにこれ以外のごにょごにょは
Desperado, why don't you come to your senses
ならず者さん いい加減気付けよ
You've been out ridin' fences,
ずいぶん長い事、塀の見回りだね
for so long - now.
手強い奴だよ
I know that you've got your reasons.
色々わけは、あるんだろうけど
These things that are pleasin'you
お前が、好きでやっていることが、
自分の首しめることもあるんだよ
Don't you draw the queen of diamonds boy
ダイアのクイーンをひくのはやめな
She'll beat you if she's able.
You know the queen of hearts is always your best bet
Now it seems to me, some fine things
オレが見た限り、いいカードが
Have been laid upon your table.
君のテーブルにだって、のっかってたんだよ
But you only want the ones
なのに、いつだって君は
高望み
Desperado,
ならず者さん
Ohhhh you aint getting no younger.
人間、歳はとっていくしかないんだよ
Your pain and your hunger,
その痛みや、満たされない心を抱いて
They're driving you home.
たどり着くのが自分の居場所
そして、自由、そう自由って奴
Well that's just some people talking.
良く人は口にするけれど
Your prison is walking through this world all alone.
独りこの世界を生きて行くってことが、君の牢屋なのさ
Don't your feet get cold in the winter time?
冬になれば足だって冷たいだろ
The sky won't snow and the sun won't shine.
空から雪も降らないが、太陽も輝かない
It's hard to tell the night time from the day.
夜だか昼だかもよくわからない
And you're losing all your highs and lows
良い思いも、悪い思いもわからなくなる
aint it funny how the feeling goes
変な気分だろ 感情が消えて行くって
away...
Desperado,
ならず者さん
Why don't you come to your senses?
いい加減気付けよ
Come down from your fences, open the gate.
塀から下りて、心のゲートを開けな。
It may be rainin', but there's a rainbow above you.
雨が降っているかもしれないけど。上には、ちゃんと虹が出てるぜ
You better let somebody love you.
誰かに愛されようとしな
(愛されるように)
You better let somebody love you...ohhh..hooo
愛されるように,してみろよ
before it's too..oooo.. late.
手遅れになる前に
. . . [T]urning now to the Government of men. Witenagemote, old Parliament, was a great thing. The affairs of the nation were there deliberated and decided; what we were to do as a nation. But does not, though the name Parliament subsists, the parliamentary debate go on now, everywhere and at all times, in a far more comprehensive way, out of Parliament altogether? Burke said there were Three Estates in Parliament; but, in the Reporters' Gallery yonder, there sat a Fourth Estate more important far than they all. It is not a figure of speech, or a witty saying; it is a literal fact,--very momentous to us in these times. Literature is our Parliament too. Printing, which comes necessarily out of Writing, I say often, is equivalent to Democracy: invent Writing, Democracy is inevitable. Writing brings Printing; brings universal everyday extempore Printing, as we see at present. Whoever can speak, speaking now to the whole nation, becomes a power, a branch of government, with inalienable weight in law-making, in all acts of authority. It matters not what rank he has, what revenues or garnitures. the requisite thing is, that he have a tongue which others will listen to; this and nothing more is requisite. The nation is governed by all that has tongue in the nation: Democracy is virtually there. Add only, that whatsoever power exists will have itself, by and by, organized; working secretly under bandages, obscurations, obstructions, it will never rest till it get to work free, unencumbered, visible to all. Democracy virtually extant will insist on becoming palpably extant. . . .