「structure」を含む日記 RSS

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



Although what causes pedophilia is not yet known, researchers began reporting a series of findings linking pedophilia with brain structure and function, beginning in 2002. Testing individuals from a variety of referral sources inside and outside the criminal justice system as well as controls, these studies found associations between pedophilia and lower IQs,[48][49][50] poorer scores on memory tests,[49] greater rates of non-right-handedness,[48][49][51][52] greater rates of school grade failure over and above the IQ differences,[53] lesser physical height,[54][55] greater probability of having suffered childhood head injuries resulting in unconsciousness,[56][57] and several differences in MRI-detected brain structures.[58][59][60]

Such studies suggest that there are one or more neurological characteristics present at birth that cause or increase the likelihood of being pedophilic. Some studies have found that pedophiles are less cognitively impaired than non-pedophilic child molesters.[61] A 2011 study reported that pedophilic child molesters had deficits in response inhibition, but no deficits in memory or cognitive flexibility.[62] Evidence of familial transmittability "suggests, but does not prove that genetic factors are responsible" for the development of pedophilia.[63] A 2015 study indicated that pedophilic offenders have a normal IQ.[64]

Another study, using structural MRI, indicated that male pedophiles have a lower volume of white matter than a control group.[58] Functional magnetic resonance imaging (fMRI) has indicated that child molesters diagnosed with pedophilia have reduced activation of the hypothalamus as compared with non-pedophilic persons when viewing sexually arousing pictures of adults.[65] A 2008 functional neuroimaging study notes that central processing of sexual stimuli in heterosexual "paedophile forensic inpatients" may be altered by a disturbance in the prefrontal networks, which "may be associated with stimulus-controlled behaviours, such as sexual compulsive behaviours". The findings may also suggest "a dysfunction at the cognitive stage of sexual arousal processing".[66]

Blanchard, Cantor, and Robichaud (2006) reviewed the research that attempted to identify hormonal aspects of pedophiles.[67] They concluded that there is some evidence that pedophilic men have less testosterone than controls, but that the research is of poor quality and that it is difficult to draw any firm conclusion from it.

While not causes of pedophilia themselves, childhood abuse by adults or comorbid psychiatric illnesses—such as personality disorders and substance abuse—are risk factors for acting on pedophilic urges.[6] Blanchard, Cantor, and Robichaud addressed comorbid psychiatric illnesses that, "The theoretical implications are not so clear. Do particular genes or noxious factors in the prenatal environment predispose a male to develop both affective disorders and pedophilia, or do the frustration, danger, and isolation engendered by unacceptable sexual desires—or their occasional furtive satisfactionlead to anxiety and despair?"[67] They indicated that, because they previously found mothers of pedophiles to be more likely to have undergone psychiatric treatment,[56] the genetic possibility is more likely.

A study analyzing the sexual fantasies of 200 heterosexual men by using the Wilson Sex Fantasy Questionnaire exam determined that males with a pronounced degree of paraphilic interest (including pedophilia) had a greater number of older brothers, a high 2D:4D digit ratio (which would indicate low prenatal androgen exposure), and an elevated probability of being left-handed, suggesting that disturbed hemispheric brain lateralization may play a role in deviant attractions.[68]




インフラストラクチャー英語: infrastructure)とは「下支えするもの」「下部構造」を指す観念的な用語であり、以下の意味がある。国民福祉の向上と国民経済の発展に必要公共施設企業などの主幹となる設備日本ではしばしばインフラ (infra) と略称されるが、インフラストラクチャー (infrastructure) が「下の (infra) 構造 (structure)」を指す通り、本来インフラ (infra) は「下」「未満」を意味する接頭辞で、「下にある」「低い」を意味するラテン語 inferus に由来し、スーパー (super) の対義語である




5 reasons why Japanese Engineer are fu*king da*n

  • Because they likes "Technical document" much, though they usually study with books even it's Front-end latest technology, Many of them are just translated original EN contents or da*n not sexy sample code, it's worthless in the world which dynamically changing day by day in few months. Regardless of free latest contents which can be found everywhere, they just get Secondary Information given by some evangelists with passive mindset, it causes making this Evangelist? market stable due to this kind of information gap structure.

See also : https://anond.hatelabo.jp/20170728223725


Ubuntu Code of Conduct v2.0を適当日本語訳してみた


Ubuntu Code of Conduct(行動規範v2.0
















明白さ、透明性 (clarity) 、合意を重視する


プロジェクト参加者は、意見の不一致を建設的に解決することが期待されています。もしも合意に至らなければ、あらかじめ決められたリーダー仲裁を依頼し、透明性 (clarity) と指示を求めます








プロジェクトに関する責任は「慈悲深い独裁者」を頂点として、そこから特定範囲について責任権限委任されたコミュニティカウンシル、その下にいるチームや委員会 (councils) 、個人委任されていきますコミュニティカウンシルまたはその代表者が、争いごとの解決を行います



評議会 (boards) や委員会 (councils) への任命は、コミュニティカウンシルが決定権を持ちます。ただし、事前にコミュニティに対してインプットを求めるものします。





我々は、問題をより把握しているチームを信頼して決定を下してもらうことで、プロジェクトはよりよいものになると認識しています。もし決定に不満があれば、それを下したチームと調整します。調整が付かなければ、その決定についてレビューする統治機構 (governance structure) があります。つまるところ、責任を持つ人が決定を下し、それがプロジェクト統治 (project governance) に支持されていれば、その決定は有効であるします。我々はある決定について納得しないこともあるかもしれませんが、それでもプロジェクトを信用し、たとえ内心では違うほうがよいと思っていたとしても、プロジェクトとしてその決定が実施されることを支援します。













このUbuntu行動規範は、網羅的でも、完全なものでもありません。ルールブックでもありません。協調的で共用の環境 (a collaborative, shared environment) とゴールに関する、我々にとっての共通理解を引き出すためのものです。

このUbuntu行動規範は、クリエイティブ・コモンズ 表示 - 継承 3.0 非移植ライセンスのもと配布されますあなた自身プロジェクトにこれを再利用することができます。また、好きなように改変することもできますが、あなたの改変を他の人が利用することも許可し、Ubuntuプロジェクト著作権表示を付けるようにしてください。







Published: 13:43 BST, 7 March 2017

The Muslim Brotherhood is creating a 'parallel social structure' in Sweden, aided by 'political elites' making it impossible to criticise Islam, government report admits



Sweden's Civil Contingencies Agency は国防省の一機関なんだな。 https://www.msb.se/en/


MSB om förstudien Muslimska brödraskapet i Sverige

























EMBの将来の研究のための質問/ MB



Communicating underwater is challenging.

Light and odors don't travel well, so it's hard for animals to see or smell.

But sound moves about four times faster in water than in air, so in this dark environment, marine mammals often rely on vocalization to communicate.

That's why a chorus of sounds fills the ocean.

Clicks, pulses, whistles, groans, boings, cries, and trills, to name a few.

But the most famous parts of this underwater symphony are the evocative melodies, or songs, composed by the world's largest mammals, whales.

Whale songs are one of the most sophisticated communication systems in the animal kingdom.

Only a few species are known to sing.

Blue, fin, bowhead minke whales, and of course humpback whales.

These are all baleen whales which use hairy baleen plates instead of teeth to trap their prey.

Meanwhile, toothed whales do use echolocation, and they and other species of baleen whales make social sounds, such as cries and whistles, to communicate.

But those vocalizations lack the complexity of songs.

So how do they do it?

Land mammals like us generate sound by moving air over our vocal chords when we exhale, causing them to vibrate.

Baleen whales have a U-shaped fold of tissue between their lungs and their large inflatable organs called laryngeal sacs.

We don't know this for sure because it's essentially impossible to observe the internal organs of a living, singing whale, but we think that when a whale sings, muscular contractions in the throat and chest move air from the lungs across the U-fold and into the laryngeal sacs, causing the U-fold to vibrate.

The resulting sound resonates in the sacs like a choir singing in a cathedral making songs loud enough to propagate up to thousands of kilometers away.

Whales don't have to exhale to sing.

Instead, the air is recycled back into the lungs, creating sound once more.

One reason whale songs are so fascinating is their pattern.

Units, like moans, cries, and chirps are arranged in phrases.

Repeated phrases are assembled into themes.

Multiple themes repeated in a predictable pattern create a song.

This hierarchical structure is a kind of grammar.

Whale songs are extremely variable in duration, and whales can repeat them over and over.

In one recorded session, a humpback whale sang for 22 hours.

And why do they do it?

We don't yet know the exact purpose, but we can speculate.

Given that the singers are males and they mostly sing during the mating season, songs might be used to attract females.

Or perhaps they're territorial, used to deter other males.

Whales return to the same feeding and breeding grounds annually, and each discrete population has a different song.

Songs evolve over time as units or phrases are added, changed, or dropped.

And when males from different populations are feeding within earshot, phrases are often exchanged, maybe because new songs make them more attractive to breeding females.

This is one of the fastest examples of cultural transmission, where learned behaviors are passed between unrelated individuals of the same species.

We can eavesdrop on these songs using underwater microphones called hydrophones.

These help us track species when sightings or genetic samples are rare.

For example, scientists have been able to differentiate the elusive blue whale's populations worldwide based on their songs.

But the oceans are getting noisier as a result of human activity.

Boating, military sonar, underwater construction, and seismic surveys for oil are occurring more often which may interfere with whale's communication.

Some whales will avoid key feeding or breeding grounds if human noise is too loud.

And humpback whales have been observed to reduce their singing in response to noise 200 kilometers away.

Limiting human activity along migratory routes and in other critical habitats, and reducing noise pollution throughout the ocean would help ensure whales continued survival.

If the whales can keep singing and we can keep listening, maybe one day we'll truly understand what they're saying.















































ピーター・ウェイソン(Peter Wason)の有名な4枚カード問題は、


元々は4枚のカードそれぞれが、片方は「a letter」で、もう片方は「a number」が載っていて、

"If a card has a vowel on one side, then it has an even number on the other side."


って、ルールに従ってるか確認するのに、E, K, 4, 7を見せたらどうする?って問題

(P. C. Wason, P. N. Johnson(1972) Psychology of Reasoning: Structure and Content (Cambridge,Massachusetts:Harvard University Press))


有名な方のWason selection task

で、アメリカで有名な"Wason selection task"と呼ばれてる論理パズルは、こんなの

  • 片方に数字が、もう一方には色が塗られたカードが、4枚ある
  • 「3」「8」「赤」「茶」が見えている
  • 偶数の裏側が赤」が真だと確認するには、何をめくる?



  • 片方に年齢が、もう一方には飲んでいる飲み物が描かれたカードが、4枚ある
  • 「16」「25」「コークの絵」「ビールの絵」が見えている。
  • 飲酒して良いのは、18歳以上」が正しく運用されていると確認するには、何をめくる?

(Cosmides, L. & Tooby, J., (eds) (1992) The adapted mind: Evolutionary psychology and the generation of culture (New York: Oxford University Press))

からまあ、改変版も進化心理学者のLeda CosmidesさんとJohn Toobyさんの出題だったってのは、書き添えておくのがパズル作家義務になるかな。






日本語と混ぜれば行けるのか? → いけた

The best way to learn English is just to study. The most important factors which you get matured in English are how long and how deep you studied.

The way of studying is not so important. You must choose the way what you feel most comfortable to study, because you can keep studying much more with such things.

I think the grammar have huge importance for second language learners. Grammar is the key to correctly communicate each other.

And if you are Japanese, you have to practice pronunciation and intonation carefully. Sound structure of Japanese language is too poor. You never distinguish English's fertile sound representations without strict learning.




例えばストーリー構造分析と組み立てについては、McKee: "Story: Style, Structure, Substance, and the Principles of Screenwriting" あたりがカバーしてる内容は、脚本家だけじゃなく監督役者目指してる人もシーン分析クラス等で学ぶけど、そういうのは技法のうちに入らない? Voglerの"The Writer's Journey" は…技法というよりは基礎教養かもしれないけど、必読書っていう評は聞くし、実際役に立ってる(自分は書く方じゃないけど。脚本分析にね。)








Landin "A λ-Calculus Approach" (1966)

We represent the value of a λ-expression by a bundle of information called a "clusure", comprising the λ-expression and the environment relative towhich it was evaluated.


Moses "The Function of FUNCTION in LISP,or Why the FUNARG Problem Should be Called the Environment Problem" (1970)

A useful metaphor for the difference between FUNCTION and QUOTE in LISP is to think of QUOTE as a porpous or an open covering of the function since free variables escape to the current environment. FUNCTION acts as a closed or nonporous covering(hence the term "closure" used by Landin).


(訳はhttp://kreisel.fam.cx/webmaster/clog/img/www.ice.nuie.nagoya-u.ac.jp/~h003149b/lang/p/funarg/funarg.html から)

Sussman and Steele "SCHEME: An Interpreter for Extended Lambda Calculus" (1975)

In order to solve this problem we introduce the notion of a closure which is a data structure containing a lambda expression, and an environment to be used when that lambda expression is applied to arguments.


Steele and Sussman "The Art of the Interpreter" (1978)

We say that the procedure is closed in the current environment, and the &PROCEDURE-object is therefore called a closure of the procedure, or a closed procedure.








Macro Portrait digital photography In the region of Factors

We tend to possibly be caused along with entirely noticed together with the motive for hunting through physical objects by a additionally mind-set is intriguing. This is certainly because of this element aided by the motive in people generally uncover further factors primarily by searching by way of familiar target at a rare slant in any other case place emphasis. This will hit typically the senses master individuals bait through online digital macro picture taking.

Handheld macro photographs is undoubtedly an knack. There are thumbs decrease dilemma of this type aided by the purpose with. It's going to take a legend associated with professional to try an item consequently regular then one consequently dismissible in addition to shape it in to something while using the goal involving entirely encapsulates an aspect of everyday living. Pro player together with the goal connected with is actually is it possible you recurring which will? Knack is definitely. Thumbs downwards knack consistently advertised to help include many of the facts in everyday life. Knack is actually a manifestation of this earth via the view on the actor or actress. By browsing by using a structure from knack these sort of similarly a digital macro digital photography, everyone get to express all the viewpoint connected with various other public and with a goal of can land on an exceedingly potent link. sell keyboard

One other home business in this field electronic macro taking pictures make sure you recognize is the plan connected with it is not straightforward. You want to consider a ration for points in just request in order to provide striking photographs. Is it possible you repeat the fact that? Are actually these things?HP G62-a31SO Keyboard

1) Proficiency correct most people in fact come to be inflicted when using the ability de rigueur seasoned digital macro digital photography training? Correct you will turn out to be triggered with the attention master splendor when using the intention with could befall appreciated as a result of community that check more than any shots?COMPAQ Presario CQ40-118AU Keyboard That's not everything required. Everyone besides end up being triggered with a reliable provide. Whereas taking online macro footage, even less than noteworthy itinerary of this produce may spoil your current picture.

You must be triggered with the proficiency to guide the video camera through e-book. You want to befall able to adapt your camera in obtain to have the picture along with the motive regarding an individual dream to seem. Surefire, you will will be able to manage a digital macro shoot utilizing the laptop, however ,HP G71-349WM Keyboard as to why should you build bodily or emotionally additional bring about in comparison with de rigueur?

Approximately general population come to be triggered aided by the de rigueur proficiency truly. But, it happens to be also vital towards polish these types of ability by taking instructional classes otherwise visiting courses. Take into account with the idea from internet macro pictures is usually most in this field screening elements interior uncommon ways. Since of that, you want to agree to all the fine detail when using the intent involving other consumer could possibly think it throughout the contribute to in a different way from the way you believe the software about it. A fresh total eye never costs you anything.

2) Machines you will what is more will want adequate resources interior get to express your skills. The proper resources can assist you to some sort of ration for those who dream to comprehend the effects along with the intention with people aspire. Do not forget aided by the idea associated with while here are methods now when using the plan connected with aver to befall practical expert 1 version of photography, one should try to find appliances it is on its own created master digital camera macro photography.HP pavilion DV7-1020ew Keyboard This really ever since many of these appliances may beyond doubt carry built known a preeminent in the ability.

All the aptly hardware is very important ever since electronic macro taking pictures needs a ration involving induce inside sequence to help befall exact. Any time you get triggered with the aptly devices executive electronic macro taking pictures,COMPAQ Presario V6105AU Keyboard you are looking for hit able to recognize ones ambitions and commerce indicate your pictures the manner in which along with the motive regarding a person aspire it to befall personally seen.

3) look everything is certainly tempting for the reason that read within odd approaches. But, HP Mini 210-2032tu Keyboard in the region of subjects happen to be other sorts of fascinating when compared to other people. In the region of objects, whenever you point out him or her each patients about electronic macro taking pictures, address towards gravel a person having the length of issues you correct never learn in this area them. Tremendous subject areas from internet macro pictures promote mobile phone industry's beyond could you repeat this? You can actually believe that the software finished with the unclothed attention. So show an individual's subject areas shrewdly.


A digital Generating Logos And Worth

Looking for an important logo design, that'll precisely and creatively represent what you are promoting? After that pick a digitally imprinted custom logo design. Within todays globe where products bets an essential job for Network marketing, Internet website marketing, in addition to The web conversation, digitally imprinted logos insert amazing valuation to make sure you organization with the versatility to a electronic company logo.

Digitally printed images is often an reliable method to increase all the brand and picture of your firm in numerous internet domain names. Different from logos in other styles, an electronic digital logo design will be easily common over the internet to become used for online, report, in addition to The web make use of (websites). Having a digitally designed logo design assures feel not to mention prime quality reproductions. Online digital publishing will also be done upon various fabrics prefer documents, textile, in addition to advertise products. Furnishings and also the style remain still in effect not to mention genuine even after constant employ and usage.

Digital logo design designing not to mention prints besides produces your home business or possibly firm name more appealing, however it is additionally easy on the wallet. Online digital publishing also provides value on your images from improving upon all the visual qualities as well as capabilities. You are able to select as well as combine a variety of styles not to mention structure alternate options to manufacture a specialized looking logo design. Commonly, digitally printed logos add the name belonging to the business enterprise, that picture or image on the JVC BN-VG138 Batterybusiness, besides other design components that you can desire to include.

Caused by prime quality coordinated with price effectiveness, digitally imprinted logos utilized in several Online marketing not to mention market plans. There're utilized for the next:

Paper prints



Small business business cards

Reproduced sorts of conversation.

By employing better technology, a lot of these logos insert further valuation with your advancement by simply which makes it eye getting along with truthfully comprising the business the business logo was initially created for. Good requirements belonging to the customer or the company, that creative designers create the actual logo with the help of a number of creating systems by simply mixing a variety of colours along with design. The actual font size and also the form derive from as well as the Panasonic HDC-SD90 Batterycreative logo that is appearing formulated. Electrical power software not to mention desktop computer courses that can be accustomed to earn the right design and style to appropriately stand for the company.

If you want to include some pictures or tokens ?nside your creative logo, it is possible to complete the work with the process of electronic printing. In truth, sound recording, and picture sharp graphics will also be contained within the symbol to be applied using the web to create the electronic company logo interactive. Different from other styles associated with printed systems, a digital generating enables the range to construct, resize or maybe enhance the actual image along with utmost care and attention not to mention preciseness. That Nikon EN-EL12 Battery causes the actual logo much more user-friendly and accommodating. The actual contrast as well as sharpness to a digital creative logo will also be regulated mainly because called for.

Upon having an important logo design, you will have a publishing company so as to utilize it concerning electronically printed out publicity goods or upon sales and marketing communications. Rex Three is usually a organization which can be located in Miami, Florida that could fulfill your home business printing not to mention special snail mail really needs for the organization.


How to make digital camera battery more durable

Digital camera battery is the key for the key, second in importance only lens I’m afraid, and in order to photograph in your heart, a powerful battery to provide power as a follow-up is essential. But even the best battery time, if not properly carry out maintenance and maintenance, will not take long to lose the strong power, so battery maintenance is very important.

Battery Maintenance

For a (section) digital camera battery for the duration of use, not just its quality, power on, in fact, the use of operations with the user also has great relevance. Most photographers are used after every use of the camera on the camera bag inside, or on the cupboard, took out the battery is not kept separately, this approach sounds fine, but not conducive to battery protection.

If more than 15 days do not usually use the camera, it is best to remove the battery from the camera inside the store alone, save the environment, it is best to dry and cool place, and do not store the battery together with metal objects.

According to our survey, you can buy in the market most digital cameras use lithium batteries, it is relatively easy to store. The only caveat is that if not used for long, preferably at intervals of 2 months to activate a battery, which is the charge and discharge time, this can effectively extend battery life.

As for the Ni-MH battery 5, the most annoying is the memory effect, this effect will reduce the overall battery capacity and the use of time, and as time goes on, less and less stored charge, the battery will consume the more you have to faster. Therefore, we should try to run out of power rechargeable, each charge must be sufficient to power the most full.

If you go out, the temporary use of alkaline batteries, we must remember that time out, or when unused for long periods, the battery is easy to Tangshui corrosion circuit, the digital camera battery could not escape the destiny scrapped.

For users of alkaline batteries, already mentioned above, remember the point is finished using the digital camera, remove the battery must remember to avoid the phenomenon of cell sap and damage the machine.

As for the use of rechargeable nickel-metal hydride batteries and lithium users. Battery charge is very particular about, bought back the batteries are generally very low or no power consumption, the first charge must be adequate. Lithium battery charging time is generally longer than 8 hours, while the Ni-MH battery charging time is generally more than 16 hours. To achieve best results, that is, the battery has reached its maximum capacity, generally more than 3 times repeated charge-discharge can. Battery with three times, the best opportunity to find a completely exhausted battery to charge again, try not to charge the battery when there are remnants of repeated charge, or will shorten battery life. After the battery charge is generally more heat, it is best to be cool and then into the camera battery.

But note that lithium batteries because there is no memory effect, so do not discharge, otherwise it will damage the digital camera battery structure, loss of battery life.

In addition, in order to avoid the loss of electricity, the use of nickel-metal hydride battery user, charging is completed, remove the battery, do not let the battery contact with the conductor while the positive and negative poles, for example, do not use your fingers touch both ends of the battery. The use of lithium users should try to keep the camera inside the battery positive and negative battery contacts clean, if necessary, wipe with a dry cloth and then gently wipe the battery.

Also note that, even if the user is to use lithium batteries, digital camera in a long time when not in use, should be completely discharged, remove the battery, stored in a dry, cool environment. The other thing to note is that both the nickel-hydrogen batteries or lithium batteries using the user, it is best not to have a charged battery on the purse, pocket, bag or container with metal objects, in order to prevent short-circuit .

Digital camera battery power Dafa:

1, to avoid frequent use of flash: If you are not professional photographers, then, except in the invisible fingers of the night, the light intensity of an ordinary day for the average digital camera, it is enough.

2, try to avoid unnecessary zoom operation: zoom the camera lens stretched it out a reduction, is power digital camera battery. You can move the pace of hyperactivity, with “artificial zoom” approach instead of “camera zoom” to save power.

3, Do not let the screen has been lit: If the case of small power, can turn off the LCD screen, use the viewfinder to adjust the picture composition, is for a digital camera, LCD should be considered the most power-hungry components, general digital camera, LCD screen after closing time can be used when the original length of about 3 times.

4, less shooting and video: minimize the use of multi-shot feature and video capture video, as the completion of these functions is to use the built-in buffer body to temporarily save the screen shot, the power consumption a lot.

5, should not frequently open, shut down: Many users know that the display stays lit is power, so in order to save electricity use to frequent opening and shutdown. In fact, frequently open, shut down the electricity wasted consumption than bright display even more, especially for larger diameter lenses, but also requires a substantial expansion of the camera, the switch is power. Most digital cameras have automatic shutdown option, this setting should not be set too short, otherwise easily lead to frequent opening and shut down. Of course, frequent artificial opening, shut down and should be avoided.

6, optical image stabilization not normally open: Optical image stabilization is by driving the lens or image sensor pack components, offset by the subject matter images and the relative motion between the sensor achieved. Either way the optical image stabilization, would result in no small power consumption, in particular some models can be anti-shake mode is set to “always on” so that power loss will be caused by the more powerful. To this end, we have a good scene in the light should turn off the optical image stabilization feature, you must use, should also be less “always on” mode.






MIT develops new fast-charging battery technology ideal for automobiles

February With the world going mobile and billions of new devices requiring electrical storage, battery technology is almost certainly due for a renaissance in the near future and recent developments suggest MIT will play a role in the next significant battery technology. Less than a week ago, we reported on work being done by MIT's Laboratory for Electromagnetic and Electronic Systems (LEES) that could become the first technologically significant and economically viable alternative to conventional batteries in 200 years. Now a second new and highly promising battery technology is emerging from MIT - a new type of lithium battery that could become a cheaper alternative to the batteries that now power hybrid electric cars.

Until now, lithium batteries have not had the rapid charging capability or safety level needed for use in cars. Hybrid cars now run on nickel metal hydride batteries, which power an electric motor and can rapidly recharge while the car is decelerating or standing still.

But lithium nickel manganese oxide, described in a paper to be published in Science on Feb. 17, could revolutionize the hybrid car industry -- a sector that has "enormous growth potential," says Gerbrand Ceder, MIT professor of materials science and engineering, who led the project.

"The writing is on the wall. It's clearly happening," said Ceder, who said that a couple of companies are already interested in licensing the new lithium battery technology.

The new material is more stable (and thus safer) than lithium cobalt oxide batteries, which are used to power small electronic devices like cell phones, laptop computers, rechargeable personal digital assistants (PDAs) and such medical devices as pacemakers.

The small safety risk posed by lithium cobalt oxide is manageable in small devices but makes the material not viable for the larger batteries needed to run hybrid cars, Ceder said. Cobalt is also fairly expensive, he said.

The MIT team's new lithium battery contains manganese and nickel, which are cheaper than cobalt.

Scientists already knew that lithium nickel manganese oxide could store a lot of energy, but the material took too long to charge to be commercially useful. The MIT researchers set out to modify the material's structure to make it capable of charging and discharging more quickly.

Lithium nickel manganese oxide consists of layers of metal (nickel and manganese) separated from lithium layers by oxygen. The major problem with the compound was that the crystalline structure was too "disordered," meaning that the nickel and lithium were drawn to each other, interfering with the flow of lithium ions and slowing down the charging rate.

Lithium ions carry the battery's charge, so to maximize the speed at which the battery can charge and discharge, the researchers designed and synthesized a material with a very ordered crystalline structure, allowing lithium ions to freely flow between the metal layers.

A battery made from the new material can charge or discharge in about 10 minutes -- about 10 times faster than the unmodified lithium nickel manganese oxide. That brings it much closer to the timeframe needed for hybrid car batteries, Ceder said.

Before the material can be used commercially, the manufacturing process needs to be made less expensive, and a few other modifications will likely be necessary, Ceder said.

Other potential applications for the new lithium battery include power tools, electric bikes, and power backup for renewable energy sources.

The lead author on the research paper is Kisuk Kang, a graduate student in Ceder's lab. Ying Shirley Meng, a postdoctoral associate in materials science and engineering at MIT, and Julien Breger and Clare P. Grey of the State University of New York at Stony Brook are also authors on the paper.

The research was funded by the National Science Foundation and the U.S. Department of Energy.





Portable electronic equipment battery technology

1, about the trickle charge, rapid charging and stable battery charging algorithm

According to the energy requirements of the final application, a battery may contain up to 4 lithium ion or lithium polymer battery core, its configuration will have a variety of change, at the same time with a mainstream power adapter: direct adapter, USB interface or car charger. Remove the core quantity, core configuration or power adapter type difference, the battery has the same charge characteristics. So they charge algorithm. Lithium ion and li-ion polymer battery best charging algorithm can divided into three phases: trickle charge, rapid charging and stable charge.

trickle charge. For depth discharge core to charge. When core voltage in less than about 2.8 V, use a constant 0.1 C of the current charging for it.

fast charging. Core voltage trickle charge more than the threshold, improve the charging current rapid charging. Fast charging current should be lower than 1.0 C.

stable voltage. In the fast charging process, once the core 4.2 V voltage, stable voltage phase began. This is through the minimum charge current or timer or of the two joint to interrupt charge. When the minimum current below about 0.07 C, can interrupt charge. The timer is to rely on a default to trigger the timer interrupt.

Advanced battery charger with additional security function normally. For example, if the core temperature exceeds the given window, usually 0 ℃-45 ℃, charge will be suspended.

Remove some very low-end equipment, now on the market/li-ion polymer lithium ion battery solutions are integrated with the outer components or, in accordance with the characteristics of the charging to charge, this is not just to get better effect charge, but also for safety.

lithium ion/polymer battery charge is an example of applications-double input 1.2 A lithium battery charger LTC4097

LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. Figure 1 for double input 1.2 A lithium battery charger LTC4097 schemes. It USES constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone. The performance characteristics: no external micro controller charging termination; The input power automatic detection and choice; Through the resistance from the exchange of charging adapter input can be as high as 1.2 A programming charge current; The resistance of programmable USB charging current is up to 1 A; 100% or 20% USB charging current set; The input power output and existing bias NTC (VNTC) pin as a 120 mA drive ability; NTC thermistors input (NTC) pin for temperature qualified charged; Pre-settings battery voltage with floating plus or minus 0.6% accuracy; Thermal regulation maximize charge rate and free hot air LTC4097 can be used to exchange adapter or USB power supply for single quarter/polymer lithium ion battery. The use of constant current/constant voltage algorithm charging, from exchange adapter power charge, programmable filling up to 1.2 electric current A, and with USB power can be as high as 1 A, at the same time, automatic detection in each input voltage whether there. This device also provide USB the current limit. Applications include PDA, MP3 players, digital camera, light portable medical and test equipment and big color cellular phone.

2, lithium ion/polymer battery scheme

Lithium ion/polymer battery charge scheme for different number of core, core configuration, and power types are different. At present mainly have three main charging scheme: linear, Buck (step-down) switch and SEPIC (booster and step-down) switch.

2.1 linear scheme

When the input voltage in big with the charger with sufficient clearance of core after opening voltage, it is linear scheme, especially 1.0 C fast charging current than 1 A big too much. For example, MP3 players usually only one core, capacity from 700 to 1500 mAh differ, full charge voltage is open 4.2 V. MP3 player power is usually the AC/DC adapter or USB interface, the output is the rule of 5 V; At this time, the linear scheme is the most simple, most charger of the efficiency of the scheme. Figure 2 shows for lithium ion/polymer battery solution linear scheme, basic structure and linear voltage neat device.

linear scheme charger application examples-double input Li + charger and intelligent power source selector MAX8677A

MAX8677A is double input USB/AC adapter linear charger, built-in Smart Power Selector, used for rechargeable single quarter by Li + batteries portable devices. The charger integration of the battery and the external power source and load switch charging all the power switch, so that no external MOSFET. MAX8677A ideal used in portable devices, such as smart phones, PDA, portable media players, GPS navigation equipment, digital camera, and digital cameras.

MAX8677A can work in independent USB and the power input AC adapter or two input either one of the input. When connecting external power supply, intelligent power source selector allows the system not connect battery or can and depth discharge battery connection. Intelligent power source selector will automatically switch to the battery system load, use the system did not use the input power supply parts for battery, make full use of limited USB and adapter power supply input. All the needed electric current detection circuit, including the integration of the power switch, all integration in the piece. DC input current highest limit can be adjusted to 2 A and DC and USB input all can support 100 mA, 500 mA, and USB hung mode. Charge current can be adjusted to as high as 1.5 A, thus support wide range of battery capacitive. Other features include MAX8677A thermal regulation, over-voltage protection, charging status and fault output, power supply good surveillance, battery thermistors surveillance, and charging timer. MAX8677A using save a space, hot enhanced, 4 mm x 4 mm, 24 of the pins TQFN encapsulation, regulations, work in exceptional temperature range (40 ~ + 85 ℃).

2.2 Buck (step-down) switch scheme

When A 1.0 C of the charging current more than 1 A, or the input voltage of the core than with high voltage open many, Buck or step-down plan is A better choice. For example, based on the hard drive in the PMP, often use single core lithium ion battery, the full of open is 4.2 V voltage, capacity from 1200 to 2400 mAh range. And now PMP is usually use the car kit to charge, its output voltage in a 9 V to 16 between V. In the input voltage and battery voltage is the voltage difference between high (minimum 4.8 V) will make linear scheme lowers efficiency. This kind of low efficiency, plus more than 1.2 A 1 C fast charging electric current, have serious heat dissipation problems. To avoid this kind of situation, will the Buck scheme. Figure 3 for lithium ion/polymer battery charger scheme Buck diagram, basic structure with Buck (step-down) switching voltage regulators completely the same.

2.3 SEPIC (booster and step-down) switch scheme

In some use of three or four lithium ion/polymer core series equipments, charger of the input voltage is not always greater than the battery voltage. For example, laptop computers use 3 core lithium ion battery, full charge voltage is open 12.6 V (4.2 V x3), capacity is 1800 mAh to 3600 mAh from. Power supply input or output voltage is 1 6 V AC/DC adapter, or is car kit, the output voltage in a 9 V to 16 between V. Apparently, the linear and Buck solutions are not for this group of batteries. This is about to use SEPIC scheme, it can in the output voltage is higher than when the battery voltage, can be in the output voltage less than when the battery.

3, and power detection algorithm is proposed

Many portable products use voltage measurements to estimate the remaining battery power, but the battery voltage and surplus power relationship but will with the discharge rate, temperature and battery aging degree of change, make this kind of method can top 50% margin of error. The market for longer to use product demand unceasingly strengthens, so the system design personnel need more accurate solution. Use capacity check plan come to measure battery or consumption of electricity, will be in a wide range of application power to provide more accurate estimate of the battery power.

3.1 power detection algorithm is one of the examples of application, function complete list, double the battery portable battery application design

power detection principle. Good capacity check plan at least to have battery voltage, temperature and battery electric current, measuring method; A micro 9 a; And a set of and the verification of the punishment power detection algorithm is proposed. Bq2650x and bq27x00 is full capacity check program function, with a measuring voltage and temperature of the digital converter (ADC) and a measuring electric current and charging sensor the asp. These capacity check plan also has a microprocessor, is responsible for the implementation of the Texas instruments power detection algorithm is proposed. The algorithm can compensate the lithium ion battery life.low self-discharge, aging, the temperature and discharge rate, and other factors. Chip embedded microprocessor as host system processor save these calculation burden. Capacity check program can provide remaining power state information, bq27x00 series products also offer surplus can Run Time (Run Time to Empty) host may at any Time to capacity check plan these information query, then LED indicator light through or displays will inform the user battery. Capacity check meter is very easy to use, the system processor need only configuration 12 C or HDQ communication drive can.

The battery circuit description. Figure 4 (a) can be used for identification of IC functions with typical application circuit batteries. According to the use of IC testing program is different, the battery needs to have at least three to four outside the terminal.

VCC and BAT pins will even to the battery voltage, so that for, C power and the battery voltage measurement. The battery is connected a grounding resistance smaller detection resistors, let capacity check meter high impedance SRP and SRN input can monitor sensor resistance on both ends of the voltage. Through testing the current flows through a resistor can be used to judge the battery or release the amount of electricity. Designers choose detection resistance value must be considered when resistance on both ends of the voltage can't more than 100 mV, low resistance may be more hours in current errors. Circuit board layout must ensure that SRP and SRN to testing from as close as possible to the connection of the resistor sensor resistance end; In other words, they should be the Kelvin attachment.

HDQ pin need external and resistors, this resistance should be located the host or the main application, such capacity check plan to the battery and portable devices when sleep function enable connection broken. Advice and resistance choose 10 k Ω.

battery identification. A low cost WeiMao batteries are getting more and more serious, these cells may not contain OEM requirements of security protection circuit. So, genuine battery may contain figure 4 (a) shows the appraisal circuit. When to identify the battery, the host to contain IC (bq26150, the function is cyclic redundancy check (CRC)) issued the battery packs a ask value (challenge), the CRC will contain battery according to this inquiry value and, in the building of the IC in CRC polynomial calculation the CRC value. CRC is based on the host of command and IC secret in the query of the definition of the CRC polynomial completed, the host in CRC values calculated with the calculation result of well battery comparison to identify the appraisal success.

Once the battery through the appraisal, bq26150 will issue commands to ensure that the host and quantity test plan of material lines between normal communication. When the battery connection interruption or to connect, the whole the identification process will be repeated again.

double the battery application. Figure 4 (b) for use bq26500 support double the typical application of lithium ion battery circuit. In order to support more battery, and this circuit is adding a adjustable regulators. Capacity check millions of BAT pin and the bottom of a battery anode linked to complete the variable voltage measurement of the battery.

Host to be able to read capacity check plan of variable voltage measurement battery, to make sure the end of discharging threshold and charging terminate threshold. As for the remaining state power (RemainingStateofCapacity), do not need to read can use directly.

The above bq2650x and bq27x00 etc capacity check plan provides the battery manufacturer a simple to use options, this scheme L [just measuring battery voltage to be precise, so these capacity check plan can be applied to various battery framework, and can support the battery identification and double the battery application '

3.2 power detection algorithm is an example of applications another, can apply to all kinds of general voltmeter new IC.

Today's many manufacturers can provide a variety of voltmeter IC,, the user can choose the suitable function device, to optimize the product price. Use voltmeter measurement of storage battery parameters, the separate architecture allows users in the host custom power measurement algorithm within. Eliminating embedded processor battery cost. On this to Dallase semicconductor company called cases of DS2762 chip for typical analysis. A new separate voltmeter IC, its structure see chart 5 (a) below.

DS2762 application characteristics

DS2762 is a single quarter of lithium battery voltmeter and protection circuit, integrated into a tiny 2.46 mm x 2.74 mm inversion of packaging. Due to internal integration for power detection of high precise resistance, this device is very save a space. It is the small size and incomparable high level of integration, for mobile phone battery and other similar handheld products, such as PDA, etc, are all very ideal. Integrated protection circuit continuously monitoring the battery voltage, over voltage and flow fault (charging or discharge period). Different from the independent protection IC, DS2762 allow main processor surveillance/control protection FET conduction state, such, can DS2762 through the protection of the power system and the control circuit implementation. DS2762 can also charge a battery consumption has depth, when the battery voltage within three V, provide a limit of the charging current recovery path.

DS2762 accurate monitoring battery current, voltage and temperature, the dynamic range and resolution of common satisfy any mobile communication product testing standards. The measurement of current for internally generated when the integral, realize the power measurement. Through the real-time, continuous automatic disorders correct, the precision of power measurement can be increased. The built-in measuring resistance due to eliminate manufacturing process and temperature and cause resistance change, further improve the precision of the voltmeter. Important data stored in 32 bytes, can add the lock EEPROM; 16 bytes of SRAM are used to keep dynamic data. And DS2762 all communication all through the 1-Wire, more communication interface node, minimize the battery and the connection to the host. Its main features for; Single quarter of lithium battery protector; High precision current (power measurement), voltage and temperature measurement; Optional integrated 25 m Ω measuring resistance, each DS2762 after fine-tuning alone; 0 V battery restore charge; 32 bytes can lock EEPROM, 16 bytes SRAM, 64 a ROM;

1-Wire, node, digital communication interface; Support more battery power management, and through the protection system control FET power; Dormancy mode power supply current only 2 µ A (most); Work mode power supply current for 90 µ A (most); 2.46 mm x 2.74 mm inversion of packaging or 16 feet SSOP package led, and both are can choose with or without detection resistance; After has with e




とりあえず、学部高学年向け又は大学院初級向けのテキストなら、必ず時間的不整合性についての解説があるはずなので、とりあえずはその辺から読み始めると良いと思う。RomerのAdvanced Macroeconomicsとか、斉藤誠の新しいマクロ経済学とか。ただ、これだけでは自分で議論をするには致命的に情報量が少ないので、Monetary Theory and Policy (Walsh)の当該章を熟読することを勧める。

コミットメントについてはゲーム論の入門書(ギボンズとか)を読んだ方が早い。サブゲーム完全性などを学ぶと、時間的不整合性のコンセプトもかなり容易に理解できるようになるだろう。ついでにIncomplete contract (verifiability)まで学ぶと、中銀を法制度で縛ってリフレ政策にコミットさせることの難しさが分かるようになる。これはHartのFirms, Contracts and Financial Structure辺りが入門書としてはお約束(ただ、最初からそこまで読もうとしない方がいいと思うが)。










Should policymakers therefore aim for a higher target inflation rate in normal times, in order to increase the room for monetary policy to react to such shocks? To be concrete, are the net costs of inflation much higher at, say, 4 percent than at 2 percent, the current target range?


Perhaps more important is the risk that higher inflation rates may induce changes in the structure of the economy (such as the widespread use of wage indexation) that magnify inflation shocks and reduce the effectiveness of policy action.But the question remains whether these costs are outweighed by the potential benefits in terms of avoiding the zero interest rate bound.






主要国のインフレ目標「平時から4%に」 IMF提言






  1. What we thought we knew (以前はコンセンサスとして認められていたが、今回の危機で否定されたか、疑問符が付いたアイデアを列挙している)
  2. What we have learned from the crisis (文字通り、今回の危機の教訓)
  3. Implications for the design of policy (今後の経済政策へのインプリケーション)



B. Low Inflation

インフレーションはただ安定しているだけでなく、非常に低く抑えられているべきだ(多くの中央銀行は2%前後ターゲットに選んでいる)」という広いコンセンサス(increasing consensus)があった。これはインフレによって流動性の罠へ陥ってしまうのではないかという議論へと繋がった。低い平均インフレは低い平均名目金利を招き、そして名目金利ゼロ以下には下げられないので、低インフレの下では不景気の際に利下げ(金融緩和)の余地が小さいと言うことになる。しかしながら、この低インフレ危険性は低いと見なされた。なぜなら、中央銀行が将来の高い名目マネーサプライ成長率とひいては将来の高いインフレーションコミット訳注約束)できるなら、中銀は期待インフレ率の上昇によって将来の予想実質金利を低下させ、それによって現在の景気を刺激することが出来るからだ脚注)。そして、それほど景気へのショックが大きくない世界では、2%のインフレがあればゼロ金利制約を回避するのには十分だと思われたのである。こうして、議論の焦点は、コミットメント重要性と中央銀行インフレ期待への影響力へと絞られたのである。


脚注ではEggertsson and Woodford (2003)が参照されている)

ブランチャードらがなぜゼロ金利流動性の罠)に陥るリスクを重視するのか、このB節から明らかであると言えると思います。 特に太字で強調した部分を参照してください。どこかで見たことがある主張ではありませんか。少し分かり易く言い換えれば、リフレ政策が役に立ちそうにないから、「低インフレによって流動性の罠へ陥ってしまうのではないか」という懸念が復活しており、だからこそリフレ政策が必要になるような状況に陥らないように政策を運営すべきだと彼らは主張しているのです。4%のインフレ率というのはそのための政策案です(ただし、ブランチャードらもイマイチ自信がないのか、6つ挙げられた政策オプションのうち、この4%インフレの案だけは表題にクエスションマークが付いています)。




Re: 搾取を語るなら論文を読め










Professor Eto remarks that Japan's vices were no different than those of European colonists. This may be true, but its virtues were quite different. There was no legitimizing myth that the Japanese could make stick. They were not good tutors to teach their subjects how to achieve the goal of independence, as at least some Filipinos thought was true of American colonialism. They were not good exemplars of liberal democracy, as at least some thought that the British were in India. The virtues that the Japanese shared were hard to justify philosophically, but easy to adopt practically: military success, the uses of a strong state, rapid economic development, modern industrial structure. Thus Koreans greeted liberation in 1945 with a profound rejection of Japanese colonialism, yet have never been able to rid themselves of its Janus-faced influence.



1) ここでCumingsが書いているのは、「日本のviceはヨーロッパ帝国主義国家と似ている(かもしれない)けど、virtueは全然似ていないよ」程度のことであって、「日本植民地主義ヨーロッパのそれよりも有益であった」なんてことは言っていないように思われます。

2) で、virtue=美徳ですが、一般的には「あのひとは勤勉だ/勇敢だ」のように、人間が持つ性質や姿勢のことを指すと思います。

"The virtues that the Japanese shared"を元増田さんは「軍事的な成功、急速な経済発展などの、日本がもたらした美徳の数々」と訳して、日本朝鮮半島にいいことをした!と主張されていると思うのですが、実際はこれ「軍事的な成功、急速な経済発展といった、日本人が持っていた優れた点」ぐらいの意味じゃないでしょうか。




3) 論文冒頭(479ページ)でCumingsは、





Table of Contents: ||||||

オープンソースソフトウェアGISOpen Source software and GISOpen Source software and GIS 1 (6)
オープンソース概念Open Source concept1 (2)
オープンソースGISとしてのGRASSGRASS as an Open Source GIS3 (2)
ノースカロライナサンプルデータセットThe North Carolina sample data set 5 (1)
この本の読み方How to read this book5 (2)
GIS概念GIS conceptsGIS concepts 7 (14)
一般的なGIS原理General GIS principles 7 (6)
地理空間データモデルGeospatial data models 7 (4)
GISデータシステムの構成Organization of GIS data and system11 (2)
地図投影法と座標系Map projections and coordinate systems 13 (8)
地図投影原理Map projection principles13 (3)
一般的な座標系とdatumsCommon coordinate systems and datums 16 (5)
GRASSをはじめようGetting started with GRASSGetting started with GRASS 21 (32)
第一歩First steps21 (16)
GRASSダウンロードインストールDownload and install GRASS 21 (2)
データベースコマンド構造Database and command structure 23 (3)
GRASS6のためのグラフィカルユーザインタフェイス: Graphical User Interfaces for GRASS 6: 26 (1)
QGISgis.mQGIS and gis.m
ノースカロライナを用いてGRASSを開始Starting GRASS with the North Carolina 27 (3)
データセットdata set
GRASSデータディスプレイ3D可視化GRASS data display and 3D visualization30 (4)
プロジェクトデータ管理Project data management34 (3)
新しいプロジェクトGRASSを開始Starting GRASS with a new project37 (7)
aのための座標系の定義Defining the coordinate system for a 40 (4)
新しいプロジェクトnew project
空間投影されていないxy座標系Non-georeferenced xy coordinate system 44 (1)
座標系の変換Coordinate system transformations44 (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 exchange53 (30)
ラスタデータRaster data54 (16)
GRASS2Dの、3DラスタデータモデルGRASS 2D and 3D raster data models 54 (2)
領域の統合と境界Managing regions and boundaries raster map resolution
ジオコードされたラスタデータインポートImport of georeferenced raster data58 (8)
スキャンされた歴史地図インポートとジオコーディングImport and geocoding of a scanned66 (3)
ラスタデータエクスポートRaster data export 69 (1)
ベクトルデータVector data70 (13)
GRASSベクトルデータモデルGRASS vector data model70 (3)
ベクトルデータインポートImport of vector data73 (5)
xy CAD描画のための座標変換Coordinate transformation for xy CAD drawings 78 (2)
ベクトルデータエクスポートExport of vector data80 (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 profiles88 (2)
ラスタ地図統計Raster map statistics90 (1)
ラスタ地図ズームと、部分集合の生成Zooming and generating subsets from91 (1)
簡単なラスタ地図の生成Generating simple raster maps92 (2)
再分類と再スケーリングReclassification and rescaling of94 (3)
ラスタ地図raster maps
ラスタ地図タイプの記録と値の置換Recoding of raster map types and value replacements 97 (2)
カテゴリベルの割り当てAssigning category labels99 (4)
マスキングとノーデータ値の取り扱いMasking and handling of no-data values 103(2)
ラスタ地図の計算Raster map algebra 105(10)
整数と浮動小数点データInteger and floating point data107(1)
基本的な計算Basic calculations 108(1)
“if"状態を使うWorking with ``if'' conditions109(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 operators112(1)
相対的座標での近傍演算Neighborhood operations with relative coordinates113(2)
ラスタデータの変換と内挿Raster data transformation and interpolation 115(11)
離散的ラスタデータ自動ベクトルAutomated vectorization of discrete raster data115(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 data126(29)
近傍分析とクロスカテゴリー統計Neighborhood analysis and cross-category statistics126(7)
ラスタフィーチャのバッファリングBuffering of raster features 133(2)
コストサーフェイスCost surfaces135(5)
地勢と分水界分析Terrain and watershed analysis 140(13)
ランドスケープ構造解析Landscape structure analysis 153(2)
ランドスケーププロセスモデリングLandscape process modeling 155(11)
文学的、地下水モデルHydrologic and groundwater modeling155(3)
浸食と宣誓証言モデルErosion and deposition modeling158(8)
ラスタベースモデルと解析に関するまとめFinal note on raster-based modeling and analysis166(1)
ボクセルデータを使うWorking with voxel data166(3)
ベクトルデータを使うWorking with vector data 169(94)
地図の表示とメタデータ管理Map viewing and metadata management169(4)
ベクトル地図を表示Displaying vector maps 169(3)
ベクトル地図メタデータ維持Vector map metadata maintenance172(1)
ベクトル地図属性管理とSQLサポートVector map attribute management and SQL support173(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 data187(2)
GRASSでの対話的なデジタイジンInteractive digitizing in GRASS189(3)
ベクトル地図クエリ統計Vector map queries and statistics192(4)
地図クエリMap queries192(2)
ベクトルオブジェクトに基づくラスタ地図統計Raster map statistics based on vector objects194(2)
ポイントベクトル地図統計Point vector map statistics196(1)
幾何学操作Geometry operations196(20)
位相的な操作Topological operations 197(6)
フィーチャの抽出と境界のディゾルブFeature extraction and boundary dissolving204(1)
ベクトル地図を修理Patching vector maps 205(1)
ベクトル地図インターセクディングとクリッピングIntersecting and clipping vector maps206(3)
ベクトル幾何の変換と3Dベクトルの作成Transforming vector geometry and creating 3D vectors 209(2)
点からのコンベックスハルとトライアンギュレーションConvex hull and triangulation from points 211(1)
同じ位置の掘り出し物の複数のポイントFind multiple points in same location212(2)
一般的な多角形境界の長さLength of common polygon boundaries214(2)
ベクトルネットワーク分析Vector network analysis216(11)
ネットワーク分析Network analysis 216(5)
直線的な参照システム(LRS)Linear reference system (LRS)221(6)
ラスタへのベクトルデータ変化Vector data transformations to raster227(3)
空間的な内挿と近似Spatial interpolation and approximation230(19)
内挿方法を選択Selecting an interpolation method230(5)
RSTによる内挿と近似Interpolation and approximation with RST 235(2)
RSTパラメタの調整: テンションスムージングTuning the RST parameters: tension and smoothing 237(4)
RSTの精度を評価Estimating RST accuracy241(3)
セグメント化処理Segmented processing 244(3)
RSTとのトポグラフィー分析Topographic analysis with RST247(2)
ライダーポイントクラウドデータを使うWorking with lidar point cloud data249(8)
ボリュームに基づくは内挿Volume based interpolation 257(6)
3番目の変数の追加: 高度のある降水量Adding third variable: precipitation with elevation 258(3)
ボリュームとボリューム-時間内挿Volume and volume-temporal interpolation 261(1)
地球統計学とスプライGeostatistics and splines262(1)


Classic Texts in Computer Science








    Classical Computer Science Texts










    昨日親に話してみたら、Structure and Interpretation of Computer Programsっていう本を勧められて、

    今度はHow to Design Programsっていうもっと入門編の本を教えてくれて













    昨日親に話してみたら、Structure and Interpretation of Computer Programsっていう本を勧められて、MITっていう大学(?)のサイトで見てみたけど難し過ぎた。

    ってそのままお父さんに言ってみたら今度はHow to Design Programsっていうもっと入門編の本を教えてくれて、これ以上簡単な解説書はないからもうこれでわからなかったら諦めろと。





    • ()内が僕が考えたこと。それ以外は本に書いてあったことです。





    (創造的統合って何だろう?creative synthesisっていわれるとイメージはできる気もするけどうまく言葉にできない。













    1. 問題のデータのかたまり(problem dataってなんだ?)を記述する

    2. 簡単にプログラムの挙動の仕様をつくる

    3. 挙動を図にしてみる(例をつくる)

    4. プログラムの型(program templateってなんだ?)やレイアウトをきっちりつくる

    5. テンプレートを変形して、完全な定義をつくる

    6. テストしてエラー発見する


    inputデータの記述からどうやってprogram templateが得られるんだろう?1→2がよくわからない)


    1. ある数とある数を関係づけること

    2. 名前の代わりに値を用いることで、関係を評価する








    function difinition、application、conditional expressions、structure definition、local definition、assignmentsだ。






    /* Ten */
    if (typeof(Ten) == 'undefined') {
        Ten = {};
    Ten.NAME = 'Ten';
    Ten.VERSION = 0.06;
    /* Ten.Class */
    Ten.Class = function(klass, prototype) {
        if (klass && klass.initialize) {
    	var c = klass.initialize;
        } else if(klass && klass.base) {
            var c = function() { return klass.base[0].apply(this, arguments) };
        } else {
    	var c = function() {};
        c.prototype = prototype || {};
        c.prototype.constructor = c;
        Ten.Class.inherit(c, klass);
        if (klass && klass.base) {
            for (var i = 0;  i < klass.base.length; i++) {
    	    var parent = klass.base[i];
                if (i == 0) {
                    c.SUPER = parent;
                    c.prototype.SUPER = parent.prototype;
                Ten.Class.inherit(c, parent);
                Ten.Class.inherit(c.prototype, parent.prototype);
        return c;
    Ten.Class.inherit = function(child,parent) {
        for (var prop in parent) {
            if (typeof(child[prop]) != 'undefined' || prop == 'initialize') continue;
            child[prop] = parent[prop];
    // Basic Ten Classes
    /* Ten.JSONP */
    Ten.JSONP = new Ten.Class({
        initialize: function(uri,obj,method) {
            if (Ten.JSONP.Callbacks.length) {
                setTimeout(function() {new Ten.JSONP(uri,obj,method)}, 500);
            var del = uri.match(/\?/) ? '&' : '?';
            uri += del + 'callback=Ten.JSONP.callback';
            if (!uri.match(/timestamp=/)) {
                uri += '&' + encodeURI(new Date());
            if (obj && method) Ten.JSONP.addCallback(obj,method);
            this.script = document.createElement('script');
            this.script.src = uri;
            this.script.type = 'text/javascript';
        addCallback: function(obj,method) {
            Ten.JSONP.Callbacks.push({object: obj, method: method});
        callback: function(args) {
            // alert('callback called');
            var cbs = Ten.JSONP.Callbacks;
            for (var i = 0; i < cbs.length; i++) {
                var cb = cbs[i];
                cb.object[cb.method].call(cb.object, args);
            Ten.JSONP.Callbacks = [];
        MaxBytes: 8000,
        Callbacks: []
    /* Ten.XHR */
    Ten.XHR = new Ten.Class({
        initialize: function(uri,opts,obj,method) {
            if (!uri) return;
            this.request = Ten.XHR.getXMLHttpRequest();
            this.callback = {object: obj, method: method};
            var xhr = this;
            var prc = this.processReqChange;
            this.request.onreadystatechange = function() {
                prc.apply(xhr, arguments);
            var method = opts.method || 'GET';
            this.request.open(method, uri, true);
            if (method == 'POST') {
            var data = opts.data ? Ten.XHR.makePostData(opts.data) : null;
        getXMLHttpRequest: function() {
            var xhr;
            var tryThese = [
                function () { return new XMLHttpRequest(); },
                function () { return new ActiveXObject('Msxml2.XMLHTTP'); },
                function () { return new ActiveXObject('Microsoft.XMLHTTP'); },
                function () { return new ActiveXObject('Msxml2.XMLHTTP.4.0'); },
            for (var i = 0; i < tryThese.length; i++) {
                var func = tryThese[i];
                try {
                    xhr = func;
                    return func();
                } catch (e) {
            return xhr;
        makePostData: function(data) {
            var pairs = [];
            var regexp = /%20/g;
            for (var k in data) {
                var v = data[k].toString();
                var pair = encodeURIComponent(k).replace(regexp,'+') + '=' +
            return pairs.join('&');
        processReqChange: function() {
            var req = this.request;
            if (req.readyState == 4) {
                if (req.status == 200) {
                    var cb = this.callback;
                    cb.object[cb.method].call(cb.object, req);
                } else {
                    alert("There was a problem retrieving the XML data:\n" +
    /* Ten.Observer */
    Ten.Observer = new Ten.Class({
        initialize: function(element,event,obj,method) {
            var func = obj;
            if (typeof(method) == 'string') {
                func = obj[method];
            this.element = element;
            this.event = event;
            this.listener = function(event) {
                return func.call(obj, new Ten.Event(event || window.event));
            if (this.element.addEventListener) {
                if (this.event.match(/^on(.+)$/)) {
                    this.event = RegExp.$1;
                this.element.addEventListener(this.event, this.listener, false);
            } else if (this.element.attachEvent) {
                this.element.attachEvent(this.event, this.listener);
        stop: function() {
            if (this.element.removeEventListener) {
            } else if (this.element.detachEvent) {
    /* Ten.Event */
    Ten.Event = new Ten.Class({
        initialize: function(event) {
            this.event = event;
        keyMap: {
            8:"backspace", 9:"tab", 13:"enter", 19:"pause", 27:"escape", 32:"space",
            33:"pageup", 34:"pagedown", 35:"end", 36:"home", 37:"left", 38:"up",
            39:"right", 40:"down", 44:"printscreen", 45:"insert", 46:"delete",
            112:"f1", 113:"f2", 114:"f3", 115:"f4", 116:"f5", 117:"f6", 118:"f7",
            119:"f8", 120:"f9", 121:"f10", 122:"f11", 123:"f12",
            144:"numlock", 145:"scrolllock"
        mousePosition: function() {
            if (!this.event.clientX) return;
            return Ten.Geometry.getMousePosition(this.event);
        isKey: function(name) {
            var ecode = this.event.keyCode;
            if (!ecode) return;
            var ename = Ten.Event.keyMap[ecode];
            if (!ename) return;
            return (ename == name);
        targetIsFormElements: function() {
            var target = this.event.target;
            if (!target) return;
            var T = (target.tagName || '').toUpperCase();
            return (T == 'INPUT' || T == 'SELECT' || T == 'OPTION' ||
                    T == 'BUTTON' || T == 'TEXTAREA');
        stop: function() {
            var e = this.event;
            if (e.stopPropagation) {
            } else {
                e.cancelBubble = true;
                e.returnValue = false;
    /* Ten.DOM */
    Ten.DOM = new Ten.Class({
        getElementsByTagAndClassName: function(tagName, className, parent) {
            if (typeof(parent) == 'undefined') {
                parent = document;
            var children = parent.getElementsByTagName(tagName);
            if (className) { 
                var elements = [];
                for (var i = 0; i < children.length; i++) {
                    var child = children[i];
                    var cls = child.className;
                    if (!cls) {
                    var classNames = cls.split(' ');
                    for (var j = 0; j < classNames.length; j++) {
                        if (classNames[j] == className) {
                return elements;
            } else {
                return children;
        removeEmptyTextNodes: function(element) {
            var nodes = element.childNodes;
            for (var i = 0; i < nodes.length; i++) {
                var node = nodes[i];
                if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
        nextElement: function(elem) {
            do {
                elem = elem.nextSibling;
            } while (elem && elem.nodeType != 1);
            return elem;
        prevElement: function(elem) {
            do {
                elem = elem.previousSibling;
            } while (elem && elem.nodeType != 1);
            return elem;
        scrapeText: function(node) {
            var rval = [];
            (function (node) {
                var cn = node.childNodes;
                if (cn) {
                    for (var i = 0; i < cn.length; i++) {
                        arguments.callee.call(this, cn[i]);
                var nodeValue = node.nodeValue;
                if (typeof(nodeValue) == 'string') {
            return rval.join('');
        onLoadFunctions: [],
        loaded: false,
        timer: null,
        addEventListener: function(event,func) {
            if (event != 'load') return;
        checkLoaded: function() {
            var c = Ten.DOM;
            if (c.loaded) return true;
            if (document && document.getElementsByTagName &&
                document.getElementById && document.body) {
                if (c.timer) {
                    c.timer = null;
                for (var i = 0; i < c.onLoadFunctions.length; i++) {
                c.onLoadFunctions = [];
                c.loaded = true;
            } else {
                c.timer = setInterval(c.checkLoaded, 13);
    /* Ten.Style */
    Ten.Style = new Ten.Class({
        applyStyle: function(elem, style) {
            for (prop in style) {
                elem.style[prop] = style[prop];
    /* Ten.Geometry */
    Ten.Geometry = new Ten.Class({
        initialize: function() {
            if (Ten.Geometry._initialized) return;
            var func = Ten.Geometry._functions;
            var de = document.documentElement;
            if (window.innerWidth) {
                func.getWindowWidth = function() { return window.innerWidth; }
                func.getWindowHeight = function() { return window.innerHeight; }
                func.getXScroll = function() { return window.pageXOffset; }
                func.getYScroll = function() { return window.pageYOffset; }
            } else if (de && de.clientWidth) {
                func.getWindowWidth = function() { return de.clientWidth; }
                func.getWindowHeight = function() { return de.clientHeight; }
                func.getXScroll = function() { return de.scrollLeft; }
                func.getYScroll = function() { return de.scrollTop; }
            } else if (document.body.clientWidth) {
                func.getWindowWidth = function() { return document.body.clientWidth; }
                func.getWindowHeight = function() { return document.body.clientHeight; }
                func.getXScroll = function() { return document.body.scrollLeft; }
                func.getYScroll = function() { return document.body.scrollTop; }
            Ten.Geometry._initialized = true;
        _initialized: false,
        _functions: {},
        getScroll: function() {
            if (!Ten.Geometry._initialized) new Ten.Geometry;
            return {
                x: Ten.Geometry._functions.getXScroll(),
                y: Ten.Geometry._functions.getYScroll()
        getMousePosition: function(pos) {
            // pos should have clientX, clientY same as mouse event
            if ((navigator.userAgent.indexOf('Safari') > -1) &&
                (navigator.userAgent.indexOf('Version/') < 0)) {
                return {
                    x: pos.clientX,
                    y: pos.clientY
            } else {
                var scroll = Ten.Geometry.getScroll();
                return {
                    x: pos.clientX + scroll.x,
                    y: pos.clientY + scroll.y
        getElementPosition: function(e) {
            return {
                x: e.offsetLeft,
                y: e.offsetTop
        getWindowSize: function() {
            if (!Ten.Geometry._initialized) new Ten.Geometry;
            return {
                w: Ten.Geometry._functions.getWindowWidth(),
                h: Ten.Geometry._functions.getWindowHeight()
    /* Ten.Position */
    Ten.Position = new Ten.Class({
        initialize: function(x,y) {
            this.x = x;
            this.y = y;
        subtract: function(a,b) {
            return new Ten.Position(a.x - b.x, a.y - b.y);
    // require Ten.js
    /* Ten.SubWindow */
    Ten.SubWindow = new Ten.Class({
        initialize: function() {
            var c = this.constructor;
            if (c.singleton && c._cache) {
                return c._cache;
            var div = document.createElement('div');
            Ten.Style.applyStyle(div, Ten.SubWindow._baseStyle);
            Ten.Style.applyStyle(div, c.style);
            this.window = div;
            if (c.draggable) {
                this._draggable = new Ten.Draggable(div, this.handle);
            if (c.singleton) c._cache = this;
            return this;
        _baseStyle: {
            color: '#000',
            position: 'absolute',
            display: 'none',
            zIndex: 2,
            left: 0,
            top: 0,
            backgroundColor: '#fff',
            border: '1px solid #bbb'
        style: {
            padding: '2px',
            textAlign: 'center',
            borderRadius: '6px',
            MozBorderRadius: '6px',
            width: '100px',
            height: '100px'
        handleStyle: {
            position: 'absolute',
            top: '0px',
            left: '0px',
            backgroundColor: '#f3f3f3',
            borderBottom: '1px solid #bbb',
            width: '100%',
            height: '30px'
        containerStyle: {
            margin: '32px 0 0 0',
            padding: '0 10px'
        // closeButton: 'close.gif',
        closeButton: 'http://s.hatena.com/images/close.gif',
        closeButtonStyle: {
            position: 'absolute',
            top: '8px',
            right: '10px',
            cursor: 'pointer'
        _baseScreenStyle: {
            position: 'absolute',
            top: '0px',
            left: '0px',
            display: 'none',
            zIndex: 1,
            overflow: 'hidden',
            width: '100%',
            height: '100%'
        screenStyle: {},
        showScreen: true,
        singleton: true,
        draggable: true,
        _cache: null
        screen: null,
        windowObserver: null,
        visible: false,
        addContainerAndCloseButton: function() {
            var win = this.window;
            var c = this.constructor;
            var div = document.createElement('div');
            Ten.Style.applyStyle(div, c.containerStyle);
            this.container = div;
            if (c.handleStyle) {
                var handle = document.createElement('div');
                Ten.Style.applyStyle(handle, c.handleStyle);
                this.handle = handle;
            if (c.closeButton) {
    	    var btn = document.createElement('img');
                btn.src = c.closeButton;
                btn.alt = 'close';
                Ten.Style.applyStyle(btn, c.closeButtonStyle);
                new Ten.Observer(btn, 'onclick', this, 'hide');
                this.closeButton = btn;
            if (c.showScreen) {
                var screen = document.createElement('div');
                Ten.Style.applyStyle(screen, Ten.SubWindow._baseScreenStyle);
                Ten.Style.applyStyle(screen, c.screenStyle);
                this.screen = screen;
                new Ten.Observer(screen, 'onclick', this, 'hide');
        show: function(pos) {
            pos = (pos.x && pos.y) ? pos : {x:0, y:0};
            with (this.window.style) {
                display = 'block';
                left = pos.x + 'px';
                top = pos.y + 'px';
            if (this.screen) {
                with (this.screen.style) {
                    display = 'block';
                    left = Ten.Geometry.getScroll().x + 'px';
                    top = Ten.Geometry.getScroll().y + 'px';
            this.windowObserver = new Ten.Observer(document.body, 'onkeypress', this, 'handleEscape');
            this.visible = true;
        handleEscape: function(e) {
            if (!e.isKey('escape')) return;
        hide: function() {
            if (this._draggable) this._draggable.endDrag();
            this.window.style.display = 'none';
            if (this.screen) this.screen.style.display = 'none';
            if (this.windowObserver) this.windowObserver.stop();
            this.visible = false;
    /* Ten.Draggable */
    Ten.Draggable = new Ten.Class({
        initialize: function(element,handle) {
            this.element = element;
            this.handle = handle || element;
            this.startObserver = new Ten.Observer(this.handle, 'onmousedown', this, 'startDrag');
            this.handlers = [];
        startDrag: function(e) {
            if (e.targetIsFormElements()) return;
            this.delta = Ten.Position.subtract(
            this.handlers = [
                new Ten.Observer(document, 'onmousemove', this, 'drag'),
                new Ten.Observer(document, 'onmouseup', this, 'endDrag'),
                new Ten.Observer(this.element, 'onlosecapture', this, 'endDrag')
        drag: function(e) {
            var pos = Ten.Position.subtract(e.mousePosition(), this.delta);
            Ten.Style.applyStyle(this.element, {
                left: pos.x + 'px',
                top: pos.y + 'px'
        endDrag: function(e) {
            for (var i = 0; i < this.handlers.length; i++) {
            if(e) e.stop();
    /* Hatena */
    if (typeof(Hatena) == 'undefined') {
        Hatena = {};
    /* Hatena.User */
    Hatena.User = new Ten.Class({
        initialize: function(name) {
            this.name = name;
        getProfileIcon: function(name) {
            if (!name) name = 'user';
            var pre = name.match(/^[\w-]{2}/)[0];
            var img = document.createElement('img');
            img.src = 'http://www.hatena.ne.jp/users/' + pre + '/' + name + '/profile_s.gif';
            img.alt = name;
            img.setAttribute('class', 'profile-icon');
            with (img.style) {
                margin = '0 3px';
                border = 'none';
                verticalAlign = 'middle';
            return img;
    }, {
        profileIcon: function() {
            return Hatena.User.getProfileIcon(this.name);
    /* Hatena.Star */
    if (typeof(Hatena.Star) == 'undefined') {
        Hatena.Star = {};
    // Hatena.Star.* classes //
    if (window.location && window.location.host.match(/hatena\.com/)) {
        Hatena.Star.BaseURL = 'http://s.hatena.com/';
    } else {
        Hatena.Star.BaseURL = 'http://s.hatena.ne.jp/';
    Hatena.Star.Token = null;
    /* Hatena.Star.User */
    Hatena.Star.User = new Ten.Class({
        base: [Hatena.User],
        initialize: function(name) {
            if (Hatena.Star.User._cache[name]) {
                return Hatena.Star.User._cache[name];
            } else {
                this.name = name;
                Hatena.Star.User._cache[name] = this;
                return this;
        _cache: {}
        userPage: function() {
            return Hatena.Star.BaseURL + this.name + '/';
    /* Hatena.Star.Entry */
    Hatena.Star.Entry = new Ten.Class({
        initialize: function(e) {
            this.entry = e;
            this.uri = e.uri;
            this.title = e.title;
            this.star_container = e.star_container;
            this.comment_container = e.comment_container;
            this.stars = [];
            this.comments = [];
        maxStarCount: 11
        flushStars: function() {
            this.stars = [];
            this.star_container.innerHTML = '';
        bindStarEntry: function(se) {
            this.starEntry = se;
            for (var i = 0; i < se.stars.length; i++) {
                if (typeof(se.stars[i]) == 'number') {
                    this.stars.push(new Hatena.Star.InnerCount(se.stars[i],this));
                } else {
                    this.stars.push(new Hatena.Star.Star(se.stars[i]));
            if (se.comments && !this.comments.length) {
                for (var i = 0; i < se.comments.length; i++) {
                    this.comments.push(new Hatena.Star.Comment(se.comments[i]));
            this.can_comment = se.can_comment;
        setCanComment: function(v) {
            this.can_comment = v;
        showButtons: function() {
        addAddButton: function() {
            if (this.star_container) {
                this.addButton = new Hatena.Star.AddButton(this);
        addCommentButton: function() {
            if (this.comment_container) {
                this.commentButton = new Hatena.Star.CommentButton(this);
        showStars: function() {
            var klass = this.constructor;
            // if (this.stars.length > klass.maxStarCount) {
            //     var ic = new Hatena.Star.InnerCount(this.stars.slice(1,this.stars.length));
            //     this.star_container.appendChild(this.stars[0]);
            //     this.star_container.appendChild(ic);
            //     this.star_container.appendChild(this.stars[this.stars.length - 1]);
            // } else {
            for (var i = 0; i < this.stars.length; i++) {
        showCommentButton: function() {
            if (this.can_comment) {
                if (this.comments.length) this.commentButton.activate();
            } else {
                // this.commentButton.hide();
        addStar: function(star) {
        addComment: function(com) {
            if (!this.comments) this.comments = [];
            if (this.comments.length == 0) {
        showCommentCount: function() {
            this.comment_container.innerHTML += this.comments.length;
    /* Hatena.Star.Button */
    Hatena.Star.Button = new Ten.Class({
        createButton: function(args) {
            var img = document.createElement('img');
            img.src = args.src;
            img.alt = img.title = args.alt;
            with (img.style) {
    	    cursor = 'pointer';
    	    margin = '0 3px';
                padding = '0';
                border = 'none';
                verticalAlign = 'middle';
            return img;
    /* Hatena.Star.AddButton */
    Hatena.Star.AddButton = new Ten.Class({
        base: ['Hatena.Star.Button'],
        initialize: function(entry) {
            this.entry = entry;
            this.lastPosition = null;
            var img = Hatena.Star.Button.createButton({
                src: Hatena.Star.AddButton.ImgSrc,
                alt: 'Add Star'
            this.observer = new Ten.Observer(img,'onclick',this,'addStar');
            this.img = img;
            return img;
        ImgSrc: Hatena.Star.BaseURL + 'images/add.gif'
        addStar: function(e) {
            this.lastPosition = e.mousePosition();
            var uri = Hatena.Star.BaseURL + 'star.add.json?uri=' + encodeURIComponent(this.entry.uri) +
                '&title=' + encodeURIComponent(this.entry.title);
            if (Hatena.Star.Token) {
                uri += '&token=' + Hatena.Star.Token;
            new Ten.JSONP(uri, this, 'receiveResult');
        receiveResult: function(args) {
            var name = args ? args.name : null;
            if (name) {
                this.entry.addStar(new Hatena.Star.Star({name: name}));
                //alert('Succeeded in Adding Star ' + args);
            } else if (args.errors) {
                var pos = this.lastPosition;
                pos.x -= 10;
                pos.y += 25;
                var scroll = Ten.Geometry.getScroll();
                var scr = new Hatena.Star.AlertScreen();
                var alert = args.errors[0];
                scr.showAlert(alert, pos);
    /* Hatena.Star.CommentButton */
    Hatena.Star.CommentButton = new Ten.Class({
        base: ['Hatena.Star.Button'],
        initialize: function(entry) {
            this.entry = entry;
            this.lastPosition = null;
            var img = Hatena.Star.Button.createButton({
                src: Hatena.Star.CommentButton.ImgSrc,
                alt: 'Comments'
            img.style.display = 'none';
            this.observer = new Ten.Observer(img,'onclick',this,'showComments');
            this.img = img;
        ImgSrc: Hatena.Star.BaseURL + 'images/comment.gif',
        ImgSrcActive: Hatena.Star.BaseURL + 'images/comment_active.gif'
        showComments: function(e) {
            if (!this.screen) this.screen = new Hatena.Star.CommentScreen();
            var pos = e.mousePosition();
            pos.y += 25;
            this.screen.showComments(this.entry, pos);
        hide: function() {
            this.img.style.display = 'none';
        show: function() {
            this.img.style.display = 'inline';
        activate: function() {
            this.img.src = Hatena.Star.CommentButton.ImgSrcActive;
    /* Hatena.Star.Star */
    Hatena.Star.Star = new Ten.Class({
        initialize: function(args) {
            if (args.img) {
                this.img = args.img;
                this.name = this.img.getAttribute('alt');
            } else {
                this.name = args.name;
                var img = document.createElement('img');
                img.src = Hatena.Star.Star.ImgSrc;
                img.alt = this.name;
                with (img.style) {
                    padding = '0';
                    border = 'none';
                this.img = img;
    	new Ten.Observer(this.img,'onmouseover',this,'showName');
    	new Ten.Observer(this.img,'onmouseout',this,'hideName');
    	if (this.name) {
                this.user = new Hatena.Star.User(this.name);
                this.img.style.cursor = 'pointer';
                new Ten.Observer(this.img,'onclick',this,'goToUserPage');
            if (args.count && args.count > 1) {
                var c = document.createElement('span');
                c.setAttribute('class', 'hatena-star-inner-count');
                Ten.Style.applyStyle(c, Hatena.Star.InnerCount.style);
                c.innerHTML = args.count;
                var s = document.createElement('span');
                return s;
            } else {
                return this.img;
        ImgSrc: Hatena.Star.BaseURL + 'images/star.gif'
        showName: function(e) {
            if (!this.screen) this.screen = new Hatena.Star.NameScreen();
            var pos = e.mousePosition();
            pos.x += 10;
            pos.y += 25;
            this.screen.showName(this.name, pos);
        hideName: function() {
            if (!this.screen) return;
        goToUserPage: function() {
            window.location = this.user.userPage();
    /* Hatena.Star.InnerCount */
    Hatena.Star.InnerCount = new Ten.Class({
        initialize: function(count, e) {
            this.count = count;
            this.entry = e;
            var c = document.createElement('span');
            c.setAttribute('class', 'hatena-star-inner-count');
            Ten.Style.applyStyle(c, Hatena.Star.InnerCount.style);
            c.style.cursor = 'pointer';
            c.innerHTML = count;
            new Ten.Observer(c,'onclick',this,'showInnerStars');
            this.container = c;
            return c;
        style: {
            color: '#f4b128',
            fontWeight: 'bold',
            fontSize: '80%',
            fontFamily: '"arial", sans-serif',
            margin: '0 2px'
        showInnerStars: function() {
            var url = Hatena.Star.BaseURL + 'entry.json?uri=' +
            new Ten.JSONP(url, this, 'receiveStarEntry');
        receiveStarEntry: function(res) {
            var se = res.entries[0];
            var e = this.entry;
            if (encodeURIComponent(se.uri) != encodeURIComponent(e.uri)) return;
    /* Hatena.Star.Comment */
    Hatena.Star.Comment = new Ten.Class({
        initialize: function(args) {
            this.name = args.name;
            this.body = args.body;
        asElement: function() {
            var div = document.createElement('div');
            with (div.style) {
                margin = '0px 0';
                padding = '5px 0';
                borderBottom = '1px solid #ddd';
            var ico = Hatena.User.getProfileIcon(this.name);
            var span = document.createElement('span');
            with(span.style) {
                fontSize = '90%';
            span.innerHTML = this.body;
            return div;
    /* Hatena.Star.NameScreen */
    Hatena.Star.NameScreen = new Ten.Class({
        base: [Ten.SubWindow],
        style: {
            padding: '2px',
            textAlign: 'center'
        containerStyle: {
            margin: 0,
            padding: 0
        handleStyle: null,
        showScreen: false,
        closeButton: null,
        draggable: false
        showName: function(name, pos) {
            this.container.innerHTML = '';
    /* Hatena.Star.AlertScreen */
    Hatena.Star.AlertScreen = new Ten.Class({
        base: [Ten.SubWindow],
        style: {
            padding: '2px',
            textAlign: 'center',
            borderRadius: '6px',
            MozBorderRadius: '6px',
            width: '240px',
            height: '120px'
        handleStyle: {
            position: 'absolute',
            top: '0px',
            left: '0px',
            backgroundColor: '#f3f3f3',
            borderBottom: '1px solid #bbb',
            width: '100%',
            height: '30px',
            borderRadius: '6px 6px 0 0',
            MozBorderRadius: '6px 6px 0 0'
        showAlert: function(msg, pos) {
            this.container.innerHTML = msg;
            var win = Ten.Geometry.getWindowSize();
            var scr = Ten.Geometry.getScroll();
            var w = parseInt(this.constructor.style.width) + 20;
            if (pos.x + w > scr.x + win.w) pos.x = win.w + scr.x - w;
    /* Hatena.Star.CommentScreen */
    Hatena.Star.CommentScreen = new Ten.Class({
        base: [Ten.SubWindow],
        initialize: function() {
            var self = this.constructor.SUPER.call(this);
            if (!self.commentsContainer) self.addCommentsContainer();
            return self;
        style: {
            width: '280px',
            height: '280px',
            overflowY: 'auto',
            padding: '2px',
            textAlign: 'center',
            borderRadius: '6px',
            MozBorderRadius: '6px'
        handleStyle: {
            position: 'absolute',
            top: '0px',
            left: '0px',
            backgroundColor: '#f3f3f3',
            borderBottom: '1px solid #bbb',
            width: '100%',
            height: '30px',
            borderRadius: '6px 6px 0 0',
            MozBorderRadius: '6px 6px 0 0'
        containerStyle: {
            margin: '32px 0 0 0',
            textAlign: 'left',
            padding: '0 10px'
        getLoadImage: function() {
            var img = document.createElement('img');
            img.src = Hatena.Star.BaseURL + 'images/load.gif';
            img.setAttribute('alt', 'Loading');
            with (img.style) {
                verticalAlign = 'middle';
                margin = '0 2px';
            return img;
        addCommentsContainer: function() {
            var div = document.createElement('div');
            with (div.style) {
                marginTop = '-3px';
            this.commentsContainer = div;
        showComments: function(e, pos) {
            var comments = e.comments;
            if (!comments) comments = [];
            this.commentsContainer.innerHTML = '';
            for (var i=0; i<comments.length; i++) {
            if (e.starEntry && !e.can_comment) {
            } else {
            var win = Ten.Geometry.getWindowSize();
            var scr = Ten.Geometry.getScroll();
            var w = parseInt(this.constructor.style.width) + 20;
            if (pos.x + w > scr.x + win.w) pos.x = win.w + scr.x - w;
        bindEntry: function(e) {
            this.entry = e;
        sendComment: function(e) {
            if (!e.isKey('enter')) return;
            var body = this.commentInput.value;
            if (!body) return;
            this.commentInput.disabled = 'true';
            var url = Hatena.Star.BaseURL + 'comment.add.json?body=' + encodeURIComponent(body) +
                '&uri=' + encodeURIComponent(this.entry.uri) +
                '&title=' + encodeURIComponent(this.entry.title);
            new Ten.JSONP(url, this, 'receiveResult');
        receiveResult: function(args) {
            if (!args.name || !args.body) return;
            this.commentInput.value = ''; 
            this.commentInput.disabled = '';
            var com = new Hatena.Star.Comment(args);
        showLoadImage: function() {
            if (!this.loadImage) return; 
            this.loadImage.style.display = 'inline';
        hideLoadImage: function() {
            if (!this.loadImage) return; 
            this.loadImage.style.display = 'none';
        hideCommentForm: function() {
            if (!this.commentForm) return;
            this.commentForm.style.display = 'none';
        addCommentForm: function() {
            if (this.commentForm) {
                this.commentForm.style.display = 'block';
            var form = document.createElement('div');
            this.commentForm = form;
            with (form.style) {
                margin = '0px 0';
                padding = '5px 0';
                // borderTop = '1px solid #ddd';
            //if (Hatena.Visitor) {
            //    form.appendChild(Hatena.Visitor.profileIcon());
            //} else {
            //    form.appendChild(Hatena.User.getProfileIcon());
            var input = document.createElement('input');
            input.type = 'text';
            with (input.style) {
                width = '215px';
    	    border = '1px solid #bbb';
                padding = '3px';
            this.commentInput = input;
            var img = this.constructor.getLoadImage();
            this.loadImage = img;
            new Ten.Observer(input,'onkeypress',this,'sendComment');
    /* Hatena.Star.EntryLoader */
    Hatena.Star.EntryLoader = new Ten.Class({
        initialize: function() {
            var entries = Hatena.Star.EntryLoader.loadEntries();
            this.entries = [];
            for (var i = 0; i < entries.length; i++) {
                var e = new Hatena.Star.Entry(entries[i]);
        createStarContainer: function() {
            var sc = document.createElement('span');
            sc.setAttribute('class', 'hatena-star-star-container');
            sc.style.marginLeft = '1px';
            return sc;
        createCommentContainer: function() {
            var cc = document.createElement('span');
            cc.setAttribute('class', 'hatena-star-comment-container');
            cc.style.marginLeft = '1px';
            return cc;
        scrapeTitle: function(node) {
            var rval = [];
            (function (node) {
                if (node.tagName == 'SPAN' &&
                    (node.className == 'sanchor' ||
                     node.className == 'timestamp')) {
                } else if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) {
                var cn = node.childNodes;
                if (cn) {
                    for (var i = 0; i < cn.length; i++) {
                        arguments.callee.call(this, cn[i]);
                var nodeValue = node.nodeValue;
                if (typeof(nodeValue) == 'string') {
            return rval.join('');
        headerTagAndClassName: ['h3',null],
        getHeaders: function() {
            var t = Hatena.Star.EntryLoader.headerTagAndClassName;
            return Ten.DOM.getElementsByTagAndClassName(t[0],t[1],document);
        loadEntries: function() {
            var entries = [];
            //var headers = document.getElementsByTagName('h3');
            var c = Hatena.Star.EntryLoader;
            var headers = c.getHeaders();
            for (var i = 0; i < headers.length; i++) {
                var header = headers[i];
                var a = header.getElementsByTagName('a')[0];
                if (!a) continue;
                var uri = a.href;
                var title = '';
                // Ten.DOM.removeEmptyTextNodes(header);
                var cns = header.childNodes;
                title = c.scrapeTitle(header);
                var cc = c.createCommentContainer();
                var sc = c.createStarContainer();
                    uri: uri,
                    title: title,
                    star_container: sc,
                    comment_container: cc
            return entries;
        getStarEntries: function() {
            var url = Hatena.Star.BaseURL + 'entries.json?';
            for (var i = 0; i < this.entries.length; i++) {
                if (url.length > Ten.JSONP.MaxBytes) {
                    new Ten.JSONP(url, this, 'receiveStarEntries');
                    url = Hatena.Star.BaseURL + 'entries.json?';
                url += 'uri=' + encodeURIComponent(this.entries[i].uri) + '&';
            new Ten.JSONP(url, this, 'receiveStarEntries');
        receiveStarEntries: function(res) {
            var entries = res.entries;
            if (!entries) entries = [];
            for (var i = 0; i < this.entries.length; i++) {
                var e = this.entries[i];
                for (var j = 0; j < entries.length; j++) {
                    var se = entries[j];
                    if (!se.uri) continue;
                    if (encodeURIComponent(se.uri) == encodeURIComponent(e.uri)) {
                if (typeof(e.can_comment) == 'undefined') {
    /* Hatena.Star.WindowObserver */
    Hatena.Star.WindowObserver = new Ten.Class({
        initialize: funct
    アーカイブ ヘルプ
    ログイン ユーザー登録
    ようこそ ゲスト さん