はてなキーワード: Processingとは
If users want to prolong battery the efficient use of the time, in addition to the quality of the charger to have the guarantee, the right skills and charging is essential, because of low quality charger or wrong charging methods would affect battery time and life cycle, the following is about to charge skills:
1. The battery before they leave the factory, manufacturers were activated processing, and the charge, so the battery are more electricity, my friends say battery charging adjustment period in accordance with the time, standby still seriously insufficient, assuming that the battery is really quality goods battery of words, this kind of circumstance should extend the setting and then 3 ~ 5 times fully charge and discharge.
2. If new phone is lithium ion battery, so before 3 ~ 5 times charging commonly known as adjustment period, should be charged more than 14 hours, in order to ensure that the fully activate lithium ion activity. The lithium ion battery no memory effects, but have very strong sui sex, should give full activated PANASONIC CGR-D220 Battery, to guarantee the use of after can reach the right performance.
3. Some automation intelligent quick charger when instructions lights change, said only full of 90%. The charger will automatically change with slow charge will batteries. Best will use after batteries, otherwise, it will shorten use time.
4. Before charging and discharging lithium battery does not need special, but will not discharge damage to the battery. As far as possible when charging at the slow ChongChongDian, reduce the way quick charge; Time don't more than 24 hours. The battery after three to five times fully recharge cycles of internal after chemical will be all "activate" to achieve the best use effect.
5. Please use the original or the reputation of the good brand charger, li-ion battery to lithium battery charger with special, and follow the instructions, otherwise, it will damage to the battery, and even dangerous.
6. Have many users often in charge still leave her cell phone, actually such will be very easy to PANASONIC CGA-S101E/1B Battery damage the service life of the mobile phone, because in charge of the process, the circuit boards of mobile phone can calorific, if this time more exotic phone, may produce instant backflow current, internal parts to mobile phone damage.
7. The battery life depends on the number repeatedly charging and discharging, so should try to avoid more battery electric charge when, this will shorten battery life. Cell phone time more than 7 days, supposed to completely discharge the cell phone battery, enough electricity before use.
8. The cell phone battery have self-discharge, need not when the nimh batteries will press the residual capacity every day, about 1% of the discharge, lithium battery every day to 0.2% ~ 0.3% discharge. In for the battery, try to use the special socket, don't will the home appliance such as the Shared and the TV charger socket.
9. Though the phones in the network coverage area, but in the cell phone charge, cell phones have been unable to accept and call. At this time, can use of the mobile phone is not transfer function, will be transferred to the mobile phone side of fixed telephone in order to prevent calls lost, this kind of method for mobile phone is not in the network coverage of the area or weak signal and temporarily unable to the applicable also.
10. Don't will be exposed to high temperature or cold PANASONIC DMW-BCG10E Battery , as the dog, should not put the phone on the car, and the sun blazed through the; Or get air conditioning room, in air conditioning to be blown continuously place. When charging, the battery is a little heat is normal, but can't let it what the high temperature "suffer". In order to avoid the happening of this kind of circumstance, had better be in charge at room temperature, and don't cover anything on the mobile phone.
11. Nickel cadmium (N iCd) before the battery must ensure that the batteries are no electricity, recharging the battery must ensure that sufficient electricity after.
12. If the cell phone battery placed too long and not use, the best maintenance department to cell phones to the application for a live processing, also can use a constant dc voltage is the voltage adjustment for 5 ~ 6 V, current 500 ~ 600 mA reverse connect battery. Note that a touch namely release, the most repeated three times can, through such treatment after another, with the original adapter to "adaptation" charge.
13. Charge is not as long as possible, to no protection circuit batteries that should stop after charging, or the battery will with fever or overheating impact performance.
14. Lithium ion battery must choose special charger, otherwise may not reach the saturated state, affect their performance. Charging completes, should avoid to place in charger on more than 12 hours or more, long-term need not when should make a battery and cell phone separation.
Digital cameras are made in a wide range of sizes, prices and capabilities. The majority are camera phones, operated as a mobile application through the cellphone menu. Professional photographers and many amateurs use larger, more expensive digital single-lens reflex cameras (DSLR) for their greater versatility. Between these extremes lie digital compact cameras and bridge digital cameras that "bridge" the gap between amateur and professional cameras. Specialized cameras including multispectral imaging equipment and astrographs continue to serve the scientific, military, medical and other special purposes for which digital photography was invented.
Subcompact with lens assembly retracted
Compact cameras are designed to be tiny and portable and are particularly suitable for casual and "snapshot" uses. Hence, they are also called point-and-shoot cameras. The smallest, generally less than 20 mm thick, are described as subcompacts or "ultra-compacts" and some are nearly credit card size.[2]
Most, apart from ruggedized or water-resistant models, incorporate a retractable lens assembly allowing a thin camera to have a moderately long focal length and thus fully exploit an image sensor larger than that on a camera phone, and a mechanized lens cap to cover the lens when retracted. The retracted and capped lens is protected from keys, coins and other hard objects, thus making it a thin, pocketable package. Subcompacts commonly have one lug and a short wrist strap which aids extraction from a pocket, while thicker compacts may have two lugs for attaching a neck strap.
Compact cameras are usually designed to be easy to use, sacrificing advanced features and picture quality for compactness and simplicity; images can usually only be stored using lossy compression (JPEG). Most have a built-in flash usually of low power, sufficient for nearby subjects. Live preview is almost always used to frame the photo. Most have limited motion picture capability. Compacts often have macro capability and zoom lenses but the zoom range is usually less than for bridge and DSLR cameras. Generally a contrast-detect autofocus system, using the image data from the live preview feed of the main imager, focuses the lens.
Typically, these cameras incorporate a nearly silent leaf shutter into their lenses.
For lower cost and smaller size, these cameras typically use image sensors with a diagonal of approximately 6 mm, corresponding to a crop factor around 6. This gives them weaker low-light performance, greater depth of field, generally closer focusing ability, and smaller components than cameras using larger sensors.
Starting in 2011, some compact digital cameras can take 3D still photos. These 3D compact stereo cameras can capture 3D panoramic photos for play back on a 3D TV.[3] Some of these are rugged and waterproof, and some have GPS, compass, barometer and altimeter. [4]
Main article: Bridge camera
Bridge are higher-end digital cameras that physically and ergonomically resemble DSLRs and share with them some advanced features, but share with compacts the use of a fixed lens and a small sensor. Like compacts, most use live preview to frame the image. Their autofocus uses the same contrast-detect mechanism, but many bridge cameras have a manual focus mode, in some cases using a separate focus ring, for greater control. They originally "bridged" the gap between affordable point-and-shoot cameras and the then unaffordable earlier digital SLRs.
Due to the combination of big physical size but a small sensor, many of these cameras have very highly specified lenses with large zoom range and fast aperture, partially compensating for the inability to change lenses. On some, the lens qualifies as superzoom. To compensate for the lesser sensitivity of their small sensors, these cameras almost always include an image stabilization system to enable longer handheld exposures.
These cameras are sometimes marketed as and confused with digital SLR cameras since the appearance is similar. Bridge cameras lack the reflex viewing system of DSLRs, are usually fitted with fixed (non-interchangeable) lenses (although some have a lens thread to attach accessory wide-angle or telephoto converters), and can usually take movies with sound. The scene is composed by viewing either the liquid crystal display or the electronic viewfinder (EVF). Most have a longer shutter lag than a true dSLR, but they are capable of good image quality (with sufficient light) while being more compact and lighter than DSLRs. High-end models of this type have comparable resolutions to low and mid-range DSLRs. Many of these cameras can store images in a Raw image format, or processed and JPEG compressed, or both. The majority have a built-in flash similar to those found in DSLRs.
In bright sun, the quality difference between a good compact camera and a digital SLR is minimal but bridgecams are more portable, cost less and have a similar zoom ability to dSLR. Thus a Bridge camera may better suit outdoor daytime activities, except when seeking professional-quality photos.[5]
In low light conditions and/or at ISO equivalents above 800, most bridge cameras (or megazooms) lack in image quality when compared to even entry level DSLRs. However, they do have one major advantage: their much larger depth of field due to the small sensor as compared to a DSLR, allowing larger apertures with shorter exposure times.
A 3D Photo Mode was introduced in 2011, whereby the camera automatically takes a second image from a slightly different perspective and provides a standard .MPO file for stereo display. [6]
[edit]Mirrorless interchangeable-lens camera
Main article: Mirrorless interchangeable-lens camera
In late 2008, a new type of camera emerged, combining the larger sensors and interchangeable lenses of DSLRs with the live-preview viewing system of compact cameras, either through an electronic viewfinder or on the rear LCD. These are simpler and more compact than DSLRs due to the removal of the mirror box, and typically emulate the handling and ergonomics of either DSLRs or compacts. The system is used by Micro Four Thirds, borrowing components from the Four Thirds DSLR system.
[edit]Digital single lens reflex cameras
Cutaway of an Olympus E-30 DSLR
Main article: Digital single-lens reflex camera
Digital single-lens reflex cameras (DSLRs) are digital cameras based on film single-lens reflex cameras (SLRs). They take their name from their unique viewing system, in which a mirror reflects light from the lens through a separate optical viewfinder. At the moment of exposure the mirror flips out of the way, making a distinctive "clack" sound and allowing light to fall on the imager.
Since no light reaches the imager during framing, autofocus is accomplished using specialized sensors in the mirror box itself. Most 21st century DSLRs also have a "live view" mode that emulates the live preview system of compact cameras, when selected.
These cameras have much larger sensors than the other types, typically 18 mm to 36 mm on the diagonal (crop factor 2, 1.6, or 1). This gives them superior low-light performance, less depth of field at a given aperture, and a larger size.
They make use of interchangeable lenses; each major DSLR manufacturer also sells a line of lenses specifically intended to be used on their cameras. This allows the user to select a lens designed for the application at hand: wide-angle, telephoto, low-light, etc. So each lens does not require its own shutter, DSLRs use a focal-plane shutter in front of the imager, behind the mirror.
Main article: Rangefinder camera#Digital rangefinder
A rangefinder is a user-operated optical mechanism to measure subject distance once widely used on film cameras. Most digital cameras measure subject distance automatically using electro-optical techniques, but it is not customary to say that they have a rangefinder.
[edit]Line-scan camera systems
A line-scan camera is a camera device containing a line-scan image sensor chip, and a focusing mechanism. These cameras are almost solely used in industrial settings to capture an image of a constant stream of moving material. Unlike video cameras, line-scan cameras use a single row of pixel sensors, instead of a matrix of them. Data coming from the line-scan camera has a frequency, where the camera scans a line, waits, and repeats. The data coming from the line-scan camera is commonly processed by a computer, to collect the one-dimensional line data and to create a two-dimensional image. The collected two-dimensional image data is then processed by image-processing methods for industrial purposes.
Further information: Rotating line camera
Many devices include digital cameras built into or integrated into them. For example, mobile phones often include digital cameras; those that do are known as camera phones. Other small electronic devices (especially those used for communication) such as PDAs, laptops and BlackBerry devices often contain an integral digital camera, and most 21st century camcorders can also make still pictures.
Due to the limited storage capacity and general emphasis on convenience rather than image quality, almost all these integrated or converged devices store images in the lossy but compact JPEG file format.
Mobile phones incorporating digital cameras were introduced in Japan in 2001 by J-Phone. In 2003 camera phones outsold stand-alone digital cameras, and in 2006 they outsold all film-based cameras and digital cameras combined. These camera phones reached a billion devices sold in only five years, and by 2007 more than half of the installed base of all mobile phones were camera phones. Sales of separate cameras peaked in 2008. [7]
Integrated cameras tend to be at the very lowest end of the scale of digital cameras in technical specifications, such as resolution, optical quality, and ability to use accessories. With rapid development, however, the gap between mainstream compact digital cameras and camera phones is closing, and high-end camera phones are competitive with low-end stand-alone digital cameras of the same generation.
A Canon WP-1 waterproof 35 mm film camera
Waterproof digital cameras are digital cameras that can make pictures underwater. Waterproof housings have long been made but they cost almost as the cameras. Many waterproof digital cameras are shockproof and resistant to low temperatures; one of them is Canon PowerShot D10, one of the first underwater digital cameras.
These cameras become very popular during the holiday season, because many people want to save the best moments from their holidays at the seaside. Waterproof watches and mobile phones were produced earlier. Most makers of digital cameras also produce waterproof ones and every year they launch at least one new model, for example Sony, Olympus, Canon, Fuji.
Healthways Mako Shark, an early waterproof camera,[8] was launched in 1958 and cost around 25 dollars. It was a huge camera and pictures were black and white.
___________________________
http://www.gobatteryonline.com/canon-nb-9l-digital-camera-battery-gose.html
http://www.gobatteryonline.com/canon-lp-e5-digital-camera-battery-gose.html
http://www.gobatteryonline.com/canon-powershot-sd500-battery-charger-gose.html
やー。面倒でした。
古い情報だと 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
そういう向きにはprocessingとかでいいんじゃないかな…。
CPU(central processing unit)パソコンのいちばんだいじなところ
Intel(会社)のX86(win)と IBM(会社)のPowerPC(Mac)は動かすための命令がぜんぜんちがう
でもいろいろあってつかえるようになった。
AppleがPowerPCをすてた。←マカーにとっては大事(MacOSのあたらしいver.はPowerPCはもうでなくて、Intel版しかでなくなるから。)(いまいちばんあたらしいのが10.6(スノウレパードってやつ=Intel版しかない)も iBookはPowerPCで、最近のやつはIntelだから入らない。)
一因としてIntelは性能やコスパがいいCPU。PowerPCは
そうでもなくなってきた。そしてIntelはノートPC向きでもあった。
でもどこの会社もIntel X86をすてるかもしれない(微妙なとこ)。
それでARMに移行するかもしれない。
(ARMはもともと省電力がうりで性能がうりのCPUではない。)
演算装置(processing unit)がいろいろ計算している
パソコンだけではなく業務用の大きなコンピュータとかつくっている。
(業務用の大きいコンピュータと、パソコンの基本的なしくみは一緒。)
こわれてもだいじょうぶ、こわれにくい、そういうのをつくっているんですよ
省電力というテーマでつくったCPUという枠組みでARMというのがある
ARMという規格に適合したものをいろんなところがつくっている
Intelがつくる可能性もある(まだきいたことはない とだは)
次期windowsもARM版が出る方向にあって 世界的なながれ
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/
海外に電話をかける必要があり、スカイプから海外の固定電話や携帯電話と通話できるサービスを使おうと思って、スカイプのクレジットを購入したつもりだった。
つもりだったというのは、決済したのにいまだにクレジットが加算されていないからだ。
いつものようにやたらと重いマイアカウントのページを開き、クレジットカード情報を入力して、
煩雑な本人確認サービスをかいくぐってやっとのことでクレジット購入手続きを済ませたつもりだった。
決済完了の画面が出て、「通常、クレジットカードで直接申し込んだ注文の処理は15分以内に完了します」と書かれている。
文句の一つでも言いたいと思い、問い合わせ窓口を探したが、日本語のページには問い合わせ窓口へのリンクが一切ない。
英語のページでヘルプデスクを探すも、いっこうに直接問い合わせる窓口へたどり着かない。
クレジットカードでカネを客に払わせ、フォローがないまま完全放置である。
30分ほどして、メールが届いた。
決済完了か? と思ったら、英文で
we're processing your order
(注文を処理中)
という件名だった。
本文には
Credit card transactions usually clear within one hour, but can take up to 24 hours.
(クレジットカード決済には通常一時間以内に完了しますが、24時間かかることもあるよ)
と書いてある。
15分で終わると書いていたのは、どこの誰なのか。口あたりのよい嘘か。
メールには続きがある。
Few things to try out while you wait
(待っている間に試すべきいくらかのことがら)
http://www.skype.com/share/stories/
(他のユーザーがどうスカイプを使っているか、スカイプストーリーズで読もう)
これは客を怒らせたくてやっていることなのだろうか。
それともP2Pネットワークの背後にはじつは誰もいなかったりするのだろうか。
有料サービスはあまりにも胡散臭くて後悔した。
http://b.hatena.ne.jp/entry/http://www.lifehacker.jp/2009/03/keyholetv.html
苫米地氏が関係。
http://ja.wikipedia.org/wiki/KeyHoleTV
「ノート」内にある「SCOPE第1回成果発表会プログラム」へのリンク。
http://www.soumu.go.jp/joho_tsusin/scope/event/bessi.html
ページの最後に「次世代P2P型コンテンツ流通高度化技術に関する研究開発 コグニティブリサーチラボ株式会社 苫米地 英人」という発表。
http://www.soumu.go.jp/joho_tsusin/scope/event/yokousyu/session10/kokusai3.pdf
pdfから抜粋。
[1] Yasuaki Takebe,Hideki Mima,Hideto Tomabechi, “Conference on Natural Language Processing, An Efficient Information Retrieval Technique for P2P Content Sharing Systems”,The first International Joint(2004/3)
[2] Yasuaki Takebe,Hideki Mima,Hideto Tomabechi,“A Novel Method for Content Consistency and Efficient Full-Text Search for P2P Content Sharing Systems”,ACM SIGCOMM2004
[3] Yasuaki Takebe,Hideki Mima,Hideto Tomabechi,” Conference of Parallel and Distributed Systems, A New Method of Content Consistency Maintenance and Full-Text Search towards Secure and High-Performance P2P Content Sharing”,IEEE The 10th International
他2編
SIGCOMMに通ってるとはすごい、と思って調べてみた。
[1] http://www.rcl.cityu.edu.hk/ijcnlp04/prelimprogram.htm には見つからない。
[2] http://conferences.sigcomm.org/sigcomm/2004/conf_program.html には見つからない。
[3] http://www.informatik.uni-trier.de/~ley/db/conf/icpads/icpads2004.html には見つからない。
ひょっとして「出しました」ということか?
(For Beginners)
(For Windows)
(For Mac)
(In case you are using shared computer)
YourFileHostのCAPTCHA画像をなんとかするの続き。
その後、適当にいじったら、手元環境で1枚あたり25秒くらい→だいたい2.5秒くらいで判別できるようになった。このくらいなら使えるかな。
速度向上に一番効いたのは、Token#importで画像を比較しているところの修正。他は細かい手直し。
使い方は前のやつと変わってません。
あと、テストに100枚くらいCAPTCHA画像食わせてみたけど、とりあえず全部正しく判定できた。
カレントディレクトリ以下にある*.gifなCAPTCHA画像ファイルを適当に判別するスクリプト。動作確認用にどうぞ。
後述のdecaptcha.rbと同じディレクトリに適当に置いてchmod +xしてね。
#!/usr/local/bin/ruby $LOAD_PATH << File::dirname(File::expand_path($0)) require 'decaptcha' STDOUT.sync = true Dir.glob('*.gif').sort.each do |file| correct = File::basename(file, '.*') puts "Processing file: #{file}" start_time = Time.now ret = DeCAPTCHA.decode(file) elapsed = Time.now - start_time puts " Result: #{ret} (=> #{(correct == ret) ? "Ok" : "Fail"})" puts " Elapsed time: #{elapsed}" puts end
#!/usr/local/bin/ruby require 'rubygems' require 'gd2' require 'pp' # #= CAPTCHA画像解析モジュール # CAPTCHA画像ファイルを食わすとあら不思議、Stringが出てくるよ。 # YourFileHostのやつに対応。 # #== Usage # decoded_str = DeCAPTCHA.decode("some_captcha_image.gif") #=> String # 失敗したらnilが返る。 # module DeCAPTCHA DEBUG = false #=== CAPTCHA画像デコード # file:: 画像ファイル名のパス # method:: 未指定でよい。男は細かい事を気にするな。 # returns:: CAPTCHA画像解析結果(String) or nil (デコード失敗時) def self.decode(file, method = DeCAPTCHA::Site::YourFileHost) return method.new(file).decode end #= CAPTCHA画像デコード用クラス # このクラスのサブクラスはimport, tokenize, stream_parseメソッドの # 実装を含む必要がある。 class Site def initialize(file = nil) @pix = nil self.import(file) unless file.nil? end def decode return stream_parse(tokenize()) end end #= YourFileHostのCAPTCHA画像を解析するクラス class Site::YourFileHost < Site def import(file) @pix = PixelMatrix.new.import(file) return self end # importしたイメージ(PixelMatrix)から、文字と思わしきパターンを # 抽出して上下マージンを切り取ってArrayにして返す。 # returns:: Array of PixelMatrix def tokenize ret = [] state = :initial for x in 0...@pix.width case state when :initial if !@pix.vline_blank?(x) then state = :tokenize pixel = PixelMatrix.new(0, 0, true) ret << pixel redo end when :tokenize if @pix.vline_blank?(x) then state = :initial next end x0 = pixel.width for y in 0...@pix.height pixel[x0, y] = @pix[x, y] end else raise 'NOTREACHED' end end ret.map! {|token| Token.new.import(token.cutoff_vmargin!) } end # PixelMatrixのArrayを受け取り、数字を判別。 # tokens:: Array of PixelMatrix # returns:: String (判別結果) def stream_parse(tokens) rs = tokens.map {|x| x.guess.to_s }.join('') if rs.length != 4 then rs = nil if DEBUG then puts '- guess failed. dumping guess result of each token:' tokens.each_index do |i| print "##{i}:#{tokens[i].guess} " pp tokens[i].candidate end puts end end return rs end class Token @@digits = nil attr_accessor :candidate def initialize if @@digits.nil? then # 文字画像サンプルを作っておく @@digits = DIGITS_ASSOC.map {|digit| PixelMatrix.new(0, 0, true).import_array(digit) } end @candidate = Hash.new end # PixelMatrixを受け取り、文字画像サンプルと比較して # 一致率を計算しておく。 # pixel:: PixelMatrix # returns:: self def import(pixel) @@digits.each_index do |i| digit = @@digits[i] if (digit.width - pixel.width).abs > 4 or (digit.height - pixel.height).abs > 4 then @candidate[i] = -1 # サイズが違いすぎな場合、一致させない next end correct_bits = 0 enlarged_width = [digit.width, pixel.width ].max enlarged_height = [digit.height, pixel.height].max for y in 0...enlarged_height dy = (y.to_f / digit.height * enlarged_height).to_i py = (y.to_f / pixel.height * enlarged_height).to_i for x in 0...enlarged_width dx = (x.to_f / digit.width * enlarged_width).to_i px = (x.to_f / pixel.width * enlarged_width).to_i correct_bits += 1 if digit[dx, dy] == pixel[px, py] end end @candidate[i] = correct_bits * 100 / (enlarged_width * enlarged_height) end return self end # importのときの比較結果をもとに文字を推測 # returns:: Fixnum or nil(失敗時) def guess digit, ratio = @candidate.sort {|a, b| a.last <=> b.last}.last digit = nil if ratio < 0 or ratio < 65 return digit end end end #= 画素マトリックスクラス # 画像ファイルを食わせると、各ピクセル(画素)を2値(black(1) or white(0))に # 変換して、内部で保持する。 # 以後、Matrixクラスのような感じで個々の画素にアクセスできる。 class PixelMatrix BLACK = 1 WHITE = 0 attr_accessor :width attr_accessor :height # width:: 幅 # height:: 高さ # is_flexible:: 自動的に伸張するか def initialize(width = 0, height = 0, is_flexible = false) @matrix = Hash.new {|hash, key| hash[key] = Hash.new(WHITE)} @width, @height, @flexible = width, height, is_flexible end # file:: 画像ファイル名のパス # brightness_threshold:: 画素を黒とみなす閾値 (0 - 255, default: 0x40) # returns:: self (DeCAPTCHA::PixelMatrix) def import(file, brightness_threshold = 0x40) gd = GD2::Image.import(file) @width, @height = gd.width, gd.height self.each_with_axis do |x, y| color = gd[x, y] greyscale = (color.red + color.green + color.blue) / 3 self[x, y] = (greyscale > brightness_threshold) ? WHITE : BLACK end return self end def import_array(array) array.each_with_index do |str, y| str.split('').each_with_index do |c, x| self[x, y] = c.to_i end end return self end # PixelMatrixを画像ファイルとしてexport # file:: 新たに作る画像ファイル名のパス def export(file) gd = GD2::Image::IndexedColor.new(@width, @height) gd.palette << GD2::Color::WHITE gd.palette << GD2::Color::BLACK self.each_with_axis do |x, y| gd[x, y] = { WHITE => GD2::Color::WHITE, BLACK => GD2::Color::BLACK, }[self[x, y]] end gd.export(file) return self end # 指定された位置の画素を返す。 # returns:: PixelMatrix::BLACK(1) or WHITE(0) def [](x, y) if !@flexible and !in_range?(x, y) then raise RangeError end return WHITE if !@matrix.has_key?(y) # XXX: for optimize return @matrix[y][x] end # 画素に値を設定。 # returns:: PixelMatrix::BLACK(1) or WHITE(0) def []=(x, y, val) unless in_range?(x, y) then raise RangeError unless @flexible @width = (x >= @width) ? x + 1 : @width @height = (y >= @height) ? y + 1 : @height end @matrix[y][x] = val end def in_range?(x, y) ((0...@width) === x and (0...@height) === y) end # 指定された軸をもとに画素を走査し、Arrayに変換。 # 例えば、to_a(:vertical, 10) とすると、x == 10 な列を取り出して # Arrayにして返す。 # # axis:: 軸を指定 (:vertical または :horizontal) # pos:: 位置を指定。_axis_で指定した軸と直交する軸における位置を指定。 def to_a(axis, pos) {:vertical => lambda { (0...@height).map {|y| self[pos, y]} }, :horizontal => lambda { (0...@width).map {|x| self[x, pos]} }, }[axis].call end # returns:: Array def hline(y) self.to_a(:horizontal, y) end # returns:: Array def vline(x) self.to_a(:vertical, x) end # X軸方向に画素を走査。 # y:: どの位置で走査するか # returns:: 指定された軸の上にドットが存在: false, 無い: true def hline_blank?(y) return true if @matrix.has_key?(y) == false # XXX: for optimize for x in 0...@width return false if self[x, y] == BLACK end return true end # Y軸方向に画素を走査。 # x:: どの位置で走査するか # returns:: 指定された軸の上にドットが存在: false, 無い: true def vline_blank?(x) for y in 0...@height return false if self[x, y] == BLACK end return true end # 上下のマージンを削除した新しいPixelMatrixを返す。 # returns:: PixelMatrix def cutoff_vmargin pixel = PixelMatrix.new(0, 0, true) head = 0 tail = self.height - 1 head.upto(tail) do |y| if !self.hline_blank?(y) then head = y break end end tail.downto(head) do |y| if !self.hline_blank?(y) then tail = y break end end head.upto(tail) do |y| 0.upto(self.width - 1) do |x| pixel[x, y - head] = self[x, y] end end return pixel end # 自身の上下のマージンを削除する。cutoff_vmarginの破壊版。 # 速度稼ぎのために直接@matrixを触ったり、すこしずるをしている。 # 効率は、ほんの少しだけ速くなったような誤差の範囲のような感じ。 # returns:: self (PixelMatrix) def cutoff_vmargin! head = 0 tail = self.height - 1 head.upto(tail) do |y| if !self.hline_blank?(y) then head = y break end end tail.downto(head) do |y| if !self.hline_blank?(y) then tail = y break end @matrix.delete(y) if @matrix.has_key?(y) # XXX end if head > 0 then head.upto(tail) do |y| next if !@matrix.has_key?(y) # XXX @matrix[y - head] = @matrix.delete(y) # XXX end end self.height = tail - head + 1 return self end def each_with_axis for x in 0...@width for y in 0...@height yield(x, y) end end end end end class DeCAPTCHA::Site::YourFileHost::Token DIGITS_ASSOC = [ # 0 ["00000000011111110000000000", "00000001111111111110000000", "00000011111000001111000000", "00001111111100010011110000", "00011111100000110000111000", "00111111000000100001111000", "00111111110001000001111100", "01111111000010000011111110", "01111100000110000111111110", "01111111000100000111111110", "11111100001000001111111111", "11100000001000011111111111", "11111000010000011111111111", "11111000110000111111111111", "10000000100001111111111111", "01100001000001111111111110", "01100010000011111111111110", "01100010000111111111111110", "00111100000111111111111100", "00011100001111111111111000", "00001100011111111111111000", "00001111111111111111100000", "00000011111111111111000000", "00000000111111111100000000"], # 1 ["00001", "00111", "11111", "11111", "10001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001", "00001"], # 2 ["0000011111111110000000", "0001111111111111000000", "0011110000000010000000", "0110000000000100000000", "1100000000001100011110", "1000000000001000001111", "1000000000010000000111", "1000000000110001111111", "1000000000100001111111", "1000000001000000011111", "0100000011000001111111", "0011000010000111111110", "0011000110000001111110", "0000001100000111111100", "0000001000011111110000", "0000011000000111100000", "0000110000000000000000", "0000111111111111111111", "0001111111111111111110", "0011111111111111111100", "0011111111111111111100", "0111111111111111111000", "0111111111111111110000"], # 3 ["000000011111111110000000", "000001111111111111100000", "000011100000011111111000", "000111000000111111111000", "000110000001111111111100", "000100000001111111111100", "000100000011111111111100", "000110000111111111111000", "000010000111111111111000", "000000001111111111100000", "000000011111111111000000", "000000011111111110000000", "000000000000001100000000", "000000000000011100011100", "000000000000111000111110", "000000000000110000001110", "000000000001110001111111", "110000000011100011111111", "111000000111000000111110", "011100000110001111111100", "001111001110000111111000", "000011111100000011100000", "000000011000111000000000"], # 4 ["0000000000011", "0000000000011", "0000000000111", "0000000001111", "0000000001111", "0000000011111", "0000000111111", "0000000110111", "0000001100111", "0000011100111", "0000011000111", "0000110000111", "0001110000111", "0001100000111", "0011000000111", "0111000000111", "0111111111111", "1111111111111", "0000000000111", "0000000000111", "0000000000111", "0000000000111", "0000000000111"], # 5 ["000000001111111111111110", "000000011111111111111100", "000000111111111111111100", "000000111111111111111000", "000001111111111111110000", "000011100000000000000000", "000011011111111110000000", "000111111111111111000000", "001111100000000111000000", "001110000000000110001100", "000000000000000100011110", "000000000000001100000110", "000000000000011000011111", "000000000000011001111111", "000000000000110000011111", "000000000001100000111111", "110000000001100111111110", "011000000011000001111110", "011100000110000011111100", "001111000110011111111000", "000111111100001111110000", "000001111100000011000000", "000000001000011000000000"], # 6 ["000000000000000110000000", "000000010001111111111000", "000001110000011100111100", "000011100000011000001000", "000111000011111000000000", "001111000001110000000000", "001110000000111100000000", "011110001111111111100000", "011100000111000011110000", "011000000010000001111000", "011000011110000011111100", "010000111100000111111110", "100000001000000111111110", "100001111000001111111111", "000011110000011111111111", "000000100000011111111111", "000011100000111111111111", "001111000001111111111110", "000010000001111111111110", "001110000011111111111100", "000111000111111111111000", "000011111111111111110000", "000000111111111111000000", "000000000111111000000000"], # 7 ["0011111111111110001111", "0011111111111100000011", "0111111111111000000110", "1111111111111000111100", "1111111111110000001100", "0000000000000000011000", "0000000000000011111000", "0000000011000000110000", "0000001110000011100000", "0000011110001111100000", "0000111100000011000000", "0001111000000110000000", "0001111000111110000000", "0011110000001100000000", "0011110000001000000000", "0011100011111000000000", "0011000001110000000000", "0001000000110000000000", "0000000111100000000000", "0000000111000000000000", "0000000011000000000000", "0000001110000000000000", "0000001100000000000000"], # 8 ["0000000111111111110000000", "0000011111111111111100000", "0000001111100000011110000", "0000000001110000000111000", "0011000011111000000011100", "0011100001111100000011100", "0011110000001110000011100", "0001111000011111000111000", "0000111100000111101110000", "0000011110000001111100000", "0000001111000011111110000", "0000111111110000011111000", "0011110011111000001111100", "0111100001111100011111100", "0111000000111110000111110", "1111000000011111000000111", "1111000000001111100011111", "1111000000000011111000010", "0111100000000001111100000", "0011110000000000111110000", "0001111110000001111110000", "0000011111111111111000000", "0000000011111110000000000"], # 9 ["000000111111111110000000", "000001111111111111100000", "000111111111111001111000", "001111111111110000010000", "011111111111110000010000", "011111111111100000100000", "011111111111000001100000", "111111111110000001000111", "111111111110000010000001", "111111111100000110000111", "011111111000000100011111", "011111111000001000001111", "001111110000011000011111", "001111100000010001111110", "000111110000100000011110", "000001111111100000111110", "000000011111000111111100", "000000000010000001111100", "000000000110000001111000", "000100001100011111110000", "000111001100001111100000", "000011111000001111000000", "000000010000110000000000"], ] end __END__
Table of Contents: ||||||
| オープンソースソフトウェアとGIS | Open Source software and GIS | Open Source software and GIS | 1 (6) |
| オープンソース概念 | Open Source concept | 1 (2) | |
| オープンソースGISとしてのGRASS | GRASS as an Open Source GIS | 3 (2) | |
| ノースカロライナサンプルデータセット | The North Carolina sample data set | 5 (1) | |
| この本の読み方 | How to read this book | 5 (2) | |
| GISの概念 | GIS concepts | GIS concepts | 7 (14) |
| 一般的なGISの原理 | General GIS principles | 7 (6) | |
| 地理空間データモデル | Geospatial data models | 7 (4) | |
| GISデータとシステムの構成 | Organization of GIS data and system | 11 (2) | |
| 機能 | functionality | ||
| 地図投影法と座標系 | Map projections and coordinate systems | 13 (8) | |
| 地図投影原理 | Map projection principles | 13 (3) | |
| 一般的な座標系とdatums | Common coordinate systems and datums | 16 (5) | |
| GRASSをはじめよう | Getting started with GRASS | Getting started with GRASS | 21 (32) |
| 第一歩 | First steps | 21 (16) | |
| GRASSのダウンロードとインストール | Download and install GRASS | 21 (2) | |
| データベースとコマンドの構造 | Database and command structure | 23 (3) | |
| GRASS6のためのグラフィカルユーザインタフェイス: | Graphical User Interfaces for GRASS 6: | 26 (1) | |
| QGISとgis.m | QGIS and gis.m | ||
| ノースカロライナを用いてGRASSを開始 | Starting GRASS with the North Carolina | 27 (3) | |
| データセット | data set | ||
| GRASSデータ・ディスプレイと3D可視化 | GRASS data display and 3D visualization | 30 (4) | |
| プロジェクトデータ管理 | Project data management | 34 (3) | |
| 新しいプロジェクトでGRASSを開始 | Starting GRASS with a new project | 37 (7) | |
| aのための座標系の定義 | Defining the coordinate system for a | 40 (4) | |
| 新しいプロジェクト | new project | ||
| 空間投影されていないxy座標系 | Non-georeferenced xy coordinate system | 44 (1) | |
| 座標系の変換 | Coordinate system transformations | 44 (9) | |
| 座標系のリスト | Coordinate lists | 45 (2) | |
| ラスタとベクトル地図の投影 | Projection of raster and vector maps | 47 (1) | |
| GDAL/OGRツールで、再投影 | Reprojecting with GDAL/OGR tools | 48 (5) | |
| GRASSデータモデルとデータの交換 | GRASS data models and data exchange | 53 (30) | |
| ラスターデータ | Raster data | 54 (16) | |
| GRASSの2Dの、3Dのラスターデータモデル | GRASS 2D and 3D raster data models | 54 (2) | |
| 領域の統合と境界 | Managing regions and boundaries | raster map resolution | |
| ジオコードされたラスターデータのインポート | Import of georeferenced raster data | 58 (8) | |
| スキャンされた歴史的地図のインポートとジオコーディング | Import and geocoding of a scanned | 66 (3) | |
| ラスターデータエクスポート | Raster data export | 69 (1) | |
| ベクトルデータ | Vector data | 70 (13) | |
| GRASSベクトルデータモデル | GRASS vector data model | 70 (3) | |
| ベクトルデータのインポート | Import of vector data | 73 (5) | |
| xy CAD描画のための座標変換 | Coordinate transformation for xy CAD drawings | 78 (2) | |
| ベクトルデータのエクスポート | Export of vector data | 80 (3) | |
| ラスターデータを使う | Working with raster data | 83 (86) | |
| ラスター地図を表示、管理 | Viewing and managing raster maps | 83 (22) | |
| ラスターデータの表示と、カラーテーブルの割り当て | Displaying raster data and assigning a color table | 83 (3) | |
| ラスター地図に関するメタデータを管理 | Managing metadata of raster maps | 86 (2) | |
| ラスター地図のクエリとプロファイル | Raster map queries and profiles | 88 (2) | |
| ラスター地図の統計 | Raster map statistics | 90 (1) | |
| ラスター地図のズームと、部分集合の生成 | Zooming and generating subsets from | 91 (1) | |
| 簡単なラスター地図の生成 | Generating simple raster maps | 92 (2) | |
| 再分類と再スケーリング | Reclassification and rescaling of | 94 (3) | |
| ラスター地図 | raster maps | ||
| ラスター地図タイプの記録と値の置換 | Recoding of raster map types and value replacements | 97 (2) | |
| カテゴリラベルの割り当て | Assigning category labels | 99 (4) | |
| マスキングとノーデータ値の取り扱い | Masking and handling of no-data values | 103(2) | |
| ラスター地図の計算 | Raster map algebra | 105(10) | |
| 整数と浮動小数点データ | Integer and floating point data | 107(1) | |
| 基本的な計算 | Basic calculations | 108(1) | |
| “if"状態を使う | Working with ``if'' conditions | 109(1) | |
| r.mapcalcのNULL値の取り扱い | Handling of NULL values in r.mapcalc | 110(1) | |
| r.mapcalcでMASKを作成 | Creating a MASK with r.mapcalc | 111(1) | |
| 特別なグラフ演算子 | Special graph operators | 112(1) | |
| 相対的座標での近傍演算 | Neighborhood operations with relative coordinates | 113(2) | |
| ラスタデータの変換と内挿 | Raster data transformation and interpolation | 115(11) | |
| 離散的ラスターデータの自動的ベクトル化 | Automated vectorization of discrete raster data | 115(3) | |
| 連続フィールドの等値線の描画を生成 | Generating isolines representing continuous fields | 118(1) | |
| ラスタデータのリサンプリングと内挿 | Resampling and interpolation of raster data | 119(5) | |
| ラスター地図のオーバーレイとマージ | Overlaying and merging raster maps | 124(2) | |
| ラスターデータの空間分析 | Spatial analysis with raster data | 126(29) | |
| 近傍分析とクロスカテゴリー統計 | Neighborhood analysis and cross-category statistics | 126(7) | |
| ラスタフィーチャのバッファリング | Buffering of raster features | 133(2) | |
| コストサーフェイス | Cost surfaces | 135(5) | |
| 地勢と分水界分析 | Terrain and watershed analysis | 140(13) | |
| ランドスケープ構造解析 | Landscape structure analysis | 153(2) | |
| ランドスケーププロセスモデリング | Landscape process modeling | 155(11) | |
| 水文学的、地下水のモデル | Hydrologic and groundwater modeling | 155(3) | |
| 浸食と宣誓証言モデル | Erosion and deposition modeling | 158(8) | |
| ラスタベースのモデルと解析に関するまとめ | Final note on raster-based modeling and analysis | 166(1) | |
| ボクセルデータを使う | Working with voxel data | 166(3) | |
| ベクトルデータを使う | Working with vector data | 169(94) | |
| 地図の表示とメタデータ管理 | Map viewing and metadata management | 169(4) | |
| ベクトル地図を表示 | Displaying vector maps | 169(3) | |
| ベクトル地図メタデータ維持 | Vector map metadata maintenance | 172(1) | |
| ベクトル地図属性管理とSQLのサポート | Vector map attribute management and SQL support | 173(14) | |
| GRASS6でのSQLサポート | SQL support in GRASS 6 | 174(7) | |
| サンプルSQLクエリと属性変更 | Sample SQL queries and attribute modifications | 181(4) | |
| 地図再分類 | Map reclassification | 185(1) | |
| 複数の属性があるベクトル地図 | Vector map with multiple attribute tables: layers | 186(1) | |
| ベクトルデータをデジタル化 | Digitizing vector data | 187(5) | |
| 位相的データのデジタル化の一般原理 | General principles for digitizing topological data | 187(2) | |
| GRASSでの対話的なデジタイジング | Interactive digitizing in GRASS | 189(3) | |
| ベクトル地図クエリと統計 | Vector map queries and statistics | 192(4) | |
| 地図のクエリ | Map queries | 192(2) | |
| ベクトルオブジェクトに基づくラスター地図統計 | Raster map statistics based on vector objects | 194(2) | |
| ポイントベクトル地図統計 | Point vector map statistics | 196(1) | |
| 幾何学操作 | Geometry operations | 196(20) | |
| 位相的な操作 | Topological operations | 197(6) | |
| バッファリング | Buffering | 203(1) | |
| フィーチャの抽出と境界のディゾルブ | Feature extraction and boundary dissolving | 204(1) | |
| ベクトル地図を修理 | Patching vector maps | 205(1) | |
| ベクトル地図のインターセクディングとクリッピング | Intersecting and clipping vector maps | 206(3) | |
| ベクトルの幾何の変換と3Dベクトルの作成 | Transforming vector geometry and creating 3D vectors | 209(2) | |
| 点からのコンベックスハルとトライアンギュレーション | Convex hull and triangulation from points | 211(1) | |
| 同じ位置の掘り出し物の複数のポイント | Find multiple points in same location | 212(2) | |
| 一般的な多角形境界の長さ | Length of common polygon boundaries | 214(2) | |
| ベクトルネットワーク分析 | Vector network analysis | 216(11) | |
| ネットワーク分析 | Network analysis | 216(5) | |
| 直線的な参照システム(LRS) | Linear reference system (LRS) | 221(6) | |
| ラスタへのベクトルデータ変化 | Vector data transformations to raster | 227(3) | |
| 空間的な内挿と近似 | Spatial interpolation and approximation | 230(19) | |
| 内挿方法を選択 | Selecting an interpolation method | 230(5) | |
| RSTによる内挿と近似 | Interpolation and approximation with RST | 235(2) | |
| RSTパラメタの調整: テンションとスムージング | Tuning the RST parameters: tension and smoothing | 237(4) | |
| RSTの精度を評価 | Estimating RST accuracy | 241(3) | |
| セグメント化処理 | Segmented processing | 244(3) | |
| RSTとのトポグラフィー分析 | Topographic analysis with RST | 247(2) | |
| ライダーポイントのクラウドデータを使う | Working with lidar point cloud data | 249(8) | |
| ボリュームに基づくは内挿 | Volume based interpolation | 257(6) | |
| 3番目の変数の追加: 高度のある降水量 | Adding third variable: precipitation with elevation | 258(3) | |
| ボリュームとボリューム-時間内挿 | Volume and volume-temporal interpolation | 261(1) | |
| 地球統計学とスプライン | Geostatistics and splines | 262(1) |
そんなわけで、みんな大好きなYourFileHostだけども、最近みてみたら、なんかCAPTCHA認証がついているわけじゃないですか。
でもこれってさーCAPTCHAといっても見るからに危ういというか、見れば見るほど簡単に破れてしまいそうな気がして、どうにもむずがゆいアンニュイな気分になってしまうわけです。
そんで、このたび適当にいじってみたところ、それなりに推測できるコードが書けたので、ここに張ってみますね。
やってることは単純で、こんな感じ
使い方は、こんな感じで
require 'decaptcha.rb' captcha_string = DeCAPTCHA.decode(filename) if !captcha_string.nil? then # 判別成功時の処理 else # 判別失敗時の処理。失敗することもあるのでよしなに。 end
あ、Ruby/GD2入れといてね。sudo gem install gd2とかで入ります。多分。
判別率はそこそこ良い感じになったんだけども、富豪プログラミングがたたってか、いかんせん遅いです。
手元だと1枚判別するのに20秒くらいかかることもある。
そんなわけで誰かチューニングしてくれるとうれしい。
実行速度を上げた改良版はこっちにうpしました。以下のコードは参考程度に。
#!/usr/local/bin/ruby require 'rubygems' require 'gd2' require 'pp' # #= CAPTCHA画像解析モジュール # CAPTCHA画像ファイルを食わすとあら不思議、Stringが出てくるよ。 # YourFileHostのやつに対応。 # #== Usage # decoded_str = DeCAPTCHA.decode("some_captcha_image.gif") #=> String # 失敗したらnilが返る。 # module DeCAPTCHA DEBUG = false #=== CAPTCHA画像デコード # file:: 画像ファイル名のパス # method:: 未指定でよい。男は細かい事を気にするな。 # returns:: CAPTCHA画像解析結果(String) or nil (デコード失敗時) def self.decode(file, method = DeCAPTCHA::Site::YourFileHost) return method.new(file).decode end #= CAPTCHA画像デコード用クラス # このクラスのサブクラスはimport, tokenize, stream_parseメソッドの # 実装を含む必要がある。 class Site def initialize(file = nil) @pix = nil self.import(file) unless file.nil? end def decode return stream_parse(tokenize()) end end #= YourFileHostのCAPTCHA画像を解析するクラス class Site::YourFileHost < Site def import(file) @pix = PixelMatrix.new.import(file) return self end # importしたイメージ(PixelMatrix)から、文字と思わしきパターンを # 抽出して上下マージンを切り取ってArrayにして返す。 # returns:: Array of PixelMatrix def tokenize getter, tokenizer = lambda {|queue| [ lambda { return queue }, lambda {|x, pixel| if pixel.nil? then x, pixel = tokenizer.call(x, PixelMatrix.new(0, 0, true)) queue << pixel return x end if !@pix.in_range?(x, 0) or @pix.vline_blank?(x) then return [x, pixel] end x0 = pixel.width @pix.vline(x).inject(0) do |y, color| pixel[x0, y] = color y + 1 end return tokenizer.call(x + 1, pixel) } ] }.call([]) x = 0 while (x < @pix.width) x = @pix.vline_blank?(x) ? x + 1 : tokenizer.call(x, nil) end getter.call.map do |token| # Token.new.import(token.cutoff_vmargin.shrink) Token.new.import(token.cutoff_vmargin) end end # PixelMatrixのArrayを受け取り、数字を判別。 # tokens:: Array of PixelMatrix # returns:: String (判別結果) def stream_parse(tokens) r = [] tokens.inject(nil) do |prev, cur| r << cur.guess end rs = r.map {|x| x.to_s}.join('') if rs.length != 4 then if DEBUG then puts '- guess failed. dumping guess result of each token:' tokens.each_index do |i| print "##{i}: " pp tokens[i].candidate end puts end return nil end return rs end class Token @@digits = nil attr_accessor :candidate def initialize if @@digits.nil? then # 文字画像サンプルを作っておく @@digits = DIGITS_ASSOC.map {|assoc| PixelMatrix.new(0, 0, true).import_assoc(assoc) } end @candidate = Hash.new end # PixelMatrixを受け取り、文字画像サンプルと比較して # 一致率を計算しておく。 # pixel:: PixelMatrix # returns:: self def import(pixel) gcd = lambda {|a, b| a, b = [b, a] if a < b return a if b == 0 r = a % b return gcd.call(b, r) } lcm = lambda {|a, b| a * b / gcd.call(a, b) } mul_to_lcm = lambda {|a, b| g = gcd.call(a, b) [b / g, a / g] } 0.upto(@@digits.size - 1) do |i| if (@@digits[i].width - pixel.width).abs > 4 or (@@digits[i].height - pixel.height).abs > 4 then @candidate[i] = -1 # 比較対象とサイズが違いすぎ next end mul_ax, mul_bx = mul_to_lcm.call(@@digits[i].width, pixel.width) mul_ay, mul_by = mul_to_lcm.call(@@digits[i].height, pixel.height) enlarged_width = @@digits[i].width * mul_ax enlarged_height = @@digits[i].height * mul_ay # 文字画像サンプルと比較対象画像のサイズをあわせる # 幅・高さをそれぞれ適当に整数倍して、最小公倍数に合わせて比較 # (めんどうだから) correct_bits = 0 (0...enlarged_width).each do |x| (0...enlarged_height).each do |y| if @@digits[i][x/mul_ax, y/mul_ay] == pixel[x/mul_bx, y/mul_by] then correct_bits += 1 end end end @candidate[i] = correct_bits * 100 / (enlarged_width * enlarged_height) end return self end # importのときの比較結果をもとに文字を推測 # returns:: Fixnum or nil(失敗時) def guess digit, ratio = @candidate.sort {|a, b| a.last <=> b.last}.last digit = nil if ratio < 0 or ratio < 80 return digit end end end #= 画素マトリックスクラス # 画像ファイルを食わせると、各ピクセル(画素)を2値(black(1) or white(0))に # 変換して、内部で保持する。 # 以後、Matrixクラスのような感じで個々の画素にアクセスできる。 class PixelMatrix BLACK = 1 WHITE = 0 attr_accessor :width attr_accessor :height # width:: 幅 # height:: 高さ # is_flexible:: 自動的に伸張するか def initialize(width = 0, height = 0, is_flexible = false) @matrix = Hash.new {|hash, key| hash[key] = Hash.new(WHITE)} @width, @height, @flexible = width, height, is_flexible end # file:: 画像ファイル名のパス # brightness_threshold:: 画素を黒とみなす閾値 (0 - 255, default: 0x40) # returns:: self (DeCAPTCHA::PixelMatrix) def import(file, brightness_threshold = 0x40) gd = GD2::Image.import(file) @width, @height = gd.width, gd.height self.each_with_axis do |x, y| color = gd[x, y] greyscale = (color.red + color.green + color.blue) / 3 self[x, y] = (greyscale > brightness_threshold) ? WHITE : BLACK end return self end # reverse function of to_assoc def import_assoc(assoc) assoc.inject(0) do |y, columns| columns.inject(0) do |x, color| self[x, y] = color x + 1 end y + 1 end return self end # PixelMatrixを画像ファイルとしてexport # file:: 新たに作る画像ファイル名のパス def export(file) gd = GD2::Image::IndexedColor.new(@width, @height) gd.palette << GD2::Color::WHITE gd.palette << GD2::Color::BLACK self.each_with_axis do |x, y| gd[x, y] = { WHITE => GD2::Color::WHITE, BLACK => GD2::Color::BLACK, }[self[x, y]] end gd.export(file) return self end def to_assoc (0...@height).map do |y| (0...@width).map do |x| self[x, y] end end end # 指定された位置の画素を返す。 # returns:: PixelMatrix::BLACK(1) or WHITE(0) def [](x, y) if !@flexible and !in_range?(x, y) then raise RangeError end return @matrix[y][x] end # 画素に値を設定。 # returns:: PixelMatrix::BLACK(1) or WHITE(0) def []=(x, y, val) unless in_range?(x, y) then raise RangeError unless @flexible @width = (x >= @width) ? x + 1 : @width @height = (y >= @height) ? y + 1 : @height end @matrix[y][x] = val end def in_range?(x, y) ((0...@width) === x and (0...@height) === y) end # 指定された軸をもとに画素を走査し、Arrayに変換。 # 例えば、to_a(:vertical, 10) とすると、x == 10 な列を取り出して # Arrayにして返す。 # # axis:: 軸を指定 (:vertical または :horizontal) # pos:: 位置を指定。_axis_で指定した軸と直交する軸における位置を指定。 def to_a(axis, pos) {:vertical => lambda { (0...@height).map {|y| self[pos, y]} }, :horizontal => lambda { (0...@width).map {|x| self[x, pos]} }, }[axis].call end # returns:: Array def hline(y) self.to_a(:horizontal, y) end # returns:: Array def vline(x) self.to_a(:vertical, x) end # X軸方向に画素を走査。 # y:: どの位置で走査するか # returns:: 指定された軸の上にドットが存在: false, 無い: true def hline_blank?(y) hline(y).find {|color| color == BLACK }.nil? ? true : false end # Y軸方向に画素を走査。 # x:: どの位置で走査するか # returns:: 指定された軸の上にドットが存在: false, 無い: true def vline_blank?(x) vline(x).find {|color| color == BLACK }.nil? ? true : false end # 上下のマージンを削除した新しいPixelMatrixを返す。 # returns:: PixelMatrix def cutoff_vmargin pixel = PixelMatrix.new(0, 0, true) head = 0.upto(self.height - 1) do |y| break(y) if !self.hline_blank?(y) end tail = (self.height - 1).downto(0) do |y| break(y) if !self.hline_blank?(y) end head.upto(tail) do |y| y0 = pixel.height self.hline(y).inject(0) do |x, color| pixel[x, y0] = color x + 1 end end return pixel end def each_with_axis (0...@width).each {|x| (0...@height).each {|y| yield(x, y)}} end end end class DeCAPTCHA::Site::YourFileHost::Token DIGITS_ASSOC = [ # 0 [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 1, 1, 1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, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], ] end __END__ Dir.glob('*.gif').each do |file| puts "Processing file: #{file}" p DeCAPTCHA.decode(file) end __END__
プログラミングなんて、人に教わろうなんて思っちゃ駄目だぜ。師匠はいてもいい。人には、わからないところを聞くもんだぜ。プログラミングなんて習うより慣れろ、だぜ。
とりあえず、目に見える形が出るものをやってみるのが一番だぜ。昔なら、Basicマガジンのゲームのソースを打ち込んで、改造したけど、これって、目に見えて、変化するから、覚えられるんだぜ。
つまりだな、以下のプログラミング環境を触ってみるのがいいんだぜ。
とにかく、わからなくても、サンプルとかネットのコードを弄ってみて、改造して、覚えるもんだぜ。
とりあえず、プログラミングに詳しいリアル友達がいなかったら、2chの初心者スレで聞きまくるんだぜ。聞くコツは、「初心者ですが、よろしくお願いします」なんてわかりきったこと言わないことだぜ。あとは、エラー内容とかは、詳細まで貼り付けることだぜ。