「generic」を含む日記 RSS

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




Japan review

Japan review it's been a year since I

moved to Japan and I thought it made

sense to finally rate Japan I will talk

about things I like and the things I

don't like which seems to be the only

two options available if you have

opinions about this country

so sugoi or did you know Japan is

actually really bad it's got a lot of

survival issues okay I will list one

good thing and bad thing and I will not

hold back there's no trash bins

where I'm gonna put my trash

I have to put in my pocket


there's always these generic things that

you hear or yes when we you visit it's

kind of weird but then you realize it's

not a big deal anyway let's start off

with number one reason I like Japan

it feels like a giant playground no I

don't mean in the Logan Paul kind of

sense of doing whatever the hell you


but rather there's a infinite things all

right lazy feels like to explore and

experience and I've been here a year now

and I don't think I'm gonna get bored

anytime soon although I am having a

child so I don't know how much more I

have time to experience

but it really feels like a whole new

world and if you visited you can

probably relate to it and I'm glad that

even a year in it still feels incredibly

fresh and I even would say that you

realize that the best part of Japan

aren't the touristy places kind of

obviously but there are so many areas

that I found that I really enjoy

visiting and this is probably more

specific to me but you know Tokyo is

very busy and so many times I just catch

myself surrounded by what feels like

hundreds of people and they have no idea

who I am

everyone is just doing their own thing

and that feels so [ __ ] good

now once it was staring at me no one's

following me no one's being weird you

guys are weird and I'm just kidding I

just love the feeling of being able to

exist in public and uh not worrying

about what everyone else is doing like

I've said this before but I genuinely

enjoy talking to fans or when people

approach me it always makes me happy but

it can be kind of frustrating to always

wanting to just do your own thing and

always be

you know so yeah let's move on to the

bad things of Japan number one reason

Japan is bad it's kind of a heavy

subject and I haven't seen anyone else

really talk about it it's not brought up

very often at least and that is cones

there's too many cones in Japan once you

see it you cannot unsee it they're

everywhere they say oh Japan has so many

vending machines there's like five per

one person no the opposite

there's more cones than people why are

there so many cones I need to know we

got the tall ones we got the small ones

we got the funny ones the cute ones the

sexy ones I do like those I just don't

understand that whoever plays these

cones think I'm just gonna barge through

oh thank God there's cones here

otherwise I had no idea what I was gonna

and I realized the cone history of Japan

stretches centuries okay if you played

Animal Crossing sometimes it's a

Japanese game so sometimes you get these

items right you're like oh that's kind

of weird I don't know exactly what that

is but it's probably something Japanese

and then you get the bamboo thing and

you're like what the hell is that what

am I even gonna do with that and then

you see it in real life here in Japan

you're like holy [ __ ] it's a cone that's

a cone they're everywhere

I feel like they are following me

I'm glad I was able to talk about this

I'm for one and willing to call out

Japan knock it off man no more cones

there's enough cones let me tell you

something even better than cones you may

have noticed new merch finally it's been

forever my mom came over she had

unofficial merge because I literally

have no other merch I've hadn't hadn't

merch I'm sorry Mom so we spruced up the

logo got a cool back design the team

that worked on it really truly

understand how my brand and I think they

did such a good job these pieces look

amazing and I think you guys are gonna

really like them as well these are

available for limited time only so make

sure you order now so excited to finally

have this merch available thanks to

amaze for making this happen we are

gonna have one piece that will stay on

the store so my mom will not buy the

wrong merch but for a limited time that

piece will be available in this color

off-white kind of color it looks really

nice and then after that you can still

get it but not in this color that's

you want this one yeah I get it

so yeah check that out if you're

interested I'm so happy about these

designs and I hope you guys would like

them as well all right reason number two

I like Japan yay when we first announced

that we were gonna move to Japan there

was so many people just saying how bad

Japan is actually did you know Japan is

really bad did you know this I have to

list all these reasons now because

everyone is like thing and then thing

Japan ah so I have to tell them and I

it's actually but one thing in

particular that people said was that old

people really don't like foreigners they

hate them so when I was gonna stop by to

say hi to our neighbors who was a little

older at least some of them I was

terrifying I heard all these stories you

know like what are they gonna do to us

so I had my guard up ready for the worst

and I was met with nothing but kindness

and welcoming and I felt like a total

dick for having this preconceived ideas

thanks to other people

and just a side comment like yes there

are definitely probably people that

don't like foreigners and all that stuff

but I realized I should let my own

experience is dictate how I feel about

certain things maybe that's just

ignoring a problem I don't know it just

feels like it's a bad way to approach

life if you always have a negative

expectation you know it's smiling people

may Smile Back

smiled back

thank you sometimes they don't and

that's okay you know anyway my point

being Japanese people are very in my own


are very nice and friendly the majority

at least and yes even to foreigners I

feel like they are especially nice to

foreigners because they think we're like

a kid lost at Disneyland or something

I just asked for directions I didn't

need you to walk me for half an hour to

this specific place I was going but

thank you I appreciate it a lot of times

I go bouldering alone and there's always

other groups of people being supportive

and yelling like I'm about there like go

you can do it I love it I think it's

great you know or if you're small

talking with people people generally

want to communicate with you and I love

having those moments but of course

there's times where people are like oh

you're a foreigner I don't feel like

even trying

which again it's fine speaking of which

reason I don't like Japan number two

their language

I have lived here for a year and I'm not

fluent in Japanese

I am dumb I am very dumb I remember the

moment we moved here I had studied some

Japanese and I was like

Let's test out this knowledge that I

have acquired let's go I'm just gonna

come in it's gonna be dangerous and you

enter a store for the first time and

they're like


what oh

what the classic the most common

experiences that you have aren't

necessarily what you're taught in the

textbook yay I know I think that's the

same for anyone learning a language for

the first time but don't even get me

started on the kanji main what the [ __ ]

is this I feel like Japanese is such a

hard language obviously but I don't

think people realize how hard it is at

least me personally because the more you

learn the more you realize you don't

know [ __ ]

for English speakers Japanese is

considered one of the most difficult

languages and because it's just so

different I listed it as bad because

that was my first kind of experience

with it coming here but the more I

interact with people the more it feels

like I'm unlocking new skills you know

oh I made a phone call for the first

time oh I could ask someone over the

phone I know big deal but it's like oh I

can actually do that or even just having

a small tiny yes shittiest conversation

with a stranger it's still something and

it feels good you start to all of a

sudden understand you know a movie if

you're watching oh I understand actually

what's going on here or I can play games

and kind of get what this they're saying

I have to look up words obviously but to

me all those new experiences that it

unlocks to me is very rewarding even

though it's such a challenge I would

actually now say it's a good thing I

played it on its head it was a good

thing all along but I obviously have a

long [ __ ] way to go

and it just I don't think it will damage

time reason number three I like Japan

this is nothing to do with Japan to say

it's more related to me taking a more

relaxed approach to YouTube for my

entire 20s I did nothing but YouTube

that was my life and that's okay but I

also think it was a little toxic

probably you know if I wasn't making

videos I sure as hell was thinking about

making videos I uploaded videos during

our honeymoon

and it feels really good to finally be

free from it you know and I can discover

other things in life there are other

things in life

a new hobbies and interest that I've

always wanted to do I can do and have so

much fun with it surfing I know I would

love for the longest time and I finally

get to do it and it's so [ __ ] amazing

I love learning new things anything that

isn't necessarily connected to all of

this on the internet and that is

something I'm very very grateful that I

discovered so yeah it's not really Japan

I could have done that anywhere but it's

largely why I enjoyed so much here

reason I don't like Japan number three

this is probably the most trickiest one

and it's the rules what are the rules

Japan has so many rules and it's a bit

conflicting for me to complain about

because a lot of the best stuff about

Japan not the best stuff but a lot of

the reasons why Japan works so well is

because of the rules you know the trains

are always on time things just work in

general it's hard to explain the streets

are clean people aren't loud in public

and so on and these are sort of societal

rules that make it happen more or less

but sometimes There are rules that just

don't make any sense and I have no

problem following rules as long as I

understand the reason for it you know

don't talk on the phone on the train

because it's generally annoying when

other people do that to you A lot of it

is just be thoughtful of other people

it's not just about you and that just

makes it more pleasant for everyone but

one rule is especially which I talked

about before is the fact that because of

kovid I'm not allowed to be in the

delivery room for our baby for more than

two hours that's because of covered

rules it just doesn't make sense to me

and I tell people about this like uh

family and friends and they're always

like well why don't you just ask them or

like why don't you talk to them I'm sure

you can there's got to be somewhere and

it's like no it's Japan okay there are

rules and people follow the rules for

better or worse you know so the more I

time I spend Permalink | 記事への反応(0) | 01:06


同じHDDseatoolsでLong Genericしつつ、Data Lifeguard Diagnosticsでeraseしたらどうなるのっと。


thinkpad x260を買った



BYTE UNIX Benchmarks (Version 5.1.3)

System: thinkpad-x260: GNU/Linux

OS: GNU/Linux -- 5.4.0-45-generic -- #49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020

Machine: x86_64 (x86_64)

Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")

CPU 0: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 1: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 2: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

CPU 3: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (4999.9 bogomips)

Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization

21:26:57 up 1:01, 2 users, load average: 0.00, 0.00, 0.15; runlevel 2020-09-04


Benchmark Run: Fri Sep 04 2020 21:26:57 - 21:55:00

4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 38124852.7 lps (10.0 s, 7 samples)

Double-Precision Whetstone 6422.0 MWIPS (9.9 s, 7 samples)

Execl Throughput 4264.8 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 515046.2 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 140474.5 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 1617517.8 KBps (30.0 s, 2 samples)

Pipe Throughput 697605.3 lps (10.0 s, 7 samples)

Pipe-based Context Switching 170352.7 lps (10.0 s, 7 samples)

Process Creation 10427.0 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 9734.6 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 2353.1 lpm (60.0 s, 2 samples)

System Call Overhead 398924.8 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 38124852.7 3266.9

Double-Precision Whetstone 55.0 6422.0 1167.6

Execl Throughput 43.0 4264.8 991.8

File Copy 1024 bufsize 2000 maxblocks 3960.0 515046.2 1300.6

File Copy 256 bufsize 500 maxblocks 1655.0 140474.5 848.8

File Copy 4096 bufsize 8000 maxblocks 5800.0 1617517.8 2788.8

Pipe Throughput 12440.0 697605.3 560.8

Pipe-based Context Switching 4000.0 170352.7 425.9

Process Creation 126.0 10427.0 827.5

Shell Scripts (1 concurrent) 42.4 9734.6 2295.9

Shell Scripts (8 concurrent) 6.0 2353.1 3921.8

System Call Overhead 15000.0 398924.8 265.9


System Benchmarks Index Score 1152.9


Benchmark Run: Fri Sep 04 2020 21:55:00 - 22:23:04

4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables 103355568.3 lps (10.0 s, 7 samples)

Double-Precision Whetstone 22425.8 MWIPS (9.9 s, 7 samples)

Execl Throughput 10514.5 lps (30.0 s, 2 samples)

File Copy 1024 bufsize 2000 maxblocks 878593.5 KBps (30.0 s, 2 samples)

File Copy 256 bufsize 500 maxblocks 237997.4 KBps (30.0 s, 2 samples)

File Copy 4096 bufsize 8000 maxblocks 2896282.9 KBps (30.0 s, 2 samples)

Pipe Throughput 1718493.4 lps (10.0 s, 7 samples)

Pipe-based Context Switching 381500.2 lps (10.0 s, 7 samples)

Process Creation 26280.8 lps (30.0 s, 2 samples)

Shell Scripts (1 concurrent) 18979.1 lpm (60.0 s, 2 samples)

Shell Scripts (8 concurrent) 2716.0 lpm (60.1 s, 2 samples)

System Call Overhead 951109.4 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 103355568.3 8856.5

Double-Precision Whetstone 55.0 22425.8 4077.4

Execl Throughput 43.0 10514.5 2445.2

File Copy 1024 bufsize 2000 maxblocks 3960.0 878593.5 2218.7

File Copy 256 bufsize 500 maxblocks 1655.0 237997.4 1438.1

File Copy 4096 bufsize 8000 maxblocks 5800.0 2896282.9 4993.6

Pipe Throughput 12440.0 1718493.4 1381.4

Pipe-based Context Switching 4000.0 381500.2 953.8

Process Creation 126.0 26280.8 2085.8

Shell Scripts (1 concurrent) 42.4 18979.1 4476.2

Shell Scripts (8 concurrent) 6.0 2716.0 4526.6

System Call Overhead 15000.0 951109.4 634.1


System Benchmarks Index Score 2462.3


治験に協力したい人だけどうぞ anond:20200303130612





ジェネリック医薬品局』(The Office of Generic Drugs)があってちゃんとチェックしてるやで









[] ジェネリック









- 記述冗長

- nullがたまにうざい

- なんか重厚な感じがする

- 重厚アーキテクチャ流行りすぎた?

- ORMとかが重厚なのが多かった

- ビルドツールが洗練されていない時代があった

- 故に環境構築が大変だった

- tomcat + jar みたいなのがだるかった?

- strutsがしんどかった

- 未だにstruts脆弱性が見つかったりするところ

- xml地獄からアノテーション化したりいろいろと模索していた

- なんかJava案件地雷が多かったとか?

- ちょっと昔には「俺たちイケてるプログラマ」はみんなRailsに移っていった流れがあった?

- Effective Javaよいが、そもそもそういうtips意識せずにそう書けるような言語仕様になってほしかった気もする

- 非同期処理やスレッド処理がやや難しかたか、あるいは言語側でのサポートが薄かったか(?)


関数型言語の関心はScalaClojureに全フリしてもらって、Javaシンプル機能を持つGo方向性なModan Javaになっていってくれれば良さそうな気も。










最悪別にGeneric入らなくてもいいかもな。別にそんなに困ってない。はいってくれるなら、はいってくれたほうがいいが。sliceに対してmap, each, filter, existsなどのメソッドが生えることになるイメージかな。まあそれは欲しくなるけどな・・・








2 (商標名ではなく)一般名。総称






















先に苦手意識を持っていたと書いたが、このソシャゲカードひとつがYくんのイラストをゆるパクしたのでは? という書き込みを見かけたことがあり、実際私はそうだと感じてすごく悲しかった。

このソシャゲと同じ会社の別ソシャゲコラボしたこともあり、全く知らない! とは言えないんじゃないか? というのも私の悲しみを助長させた。

ていうか同業他社だし同じ声優なんだからもっと……もっとこう被せないこと出来なかったの? 何で?





Ichinose must have been very disappointed.

You're the first like-minded friend he's ever had.

Your performance yesterday was inspiring. I'm impressed though not surprised.

I was hoping your praise in particular wouldn't be so generic.


Can I ever hope to move people with my playing the way Kai did? Can I someday..?

I want the honest truth, so please don't hold back.

Fair enough. Since you're aiming to be a professional, I'll give you the unfettered, honest truth. Amamiya, you need to learn to appreciate your own piano playing more. Do that, and you'll understand. You need compare yourself against others. you gave a good performance. Your future excites me.

From the line of "Piano Forest"














  • Use args.resourcePath instead of args.devResourcePath
  • Use arrays instead of while loops
  • Use auto instead of repeating explicit class names
  • Use weak pointer instead of manual bookkeeping
  • Change all uses of 'CInt' to 'Int32' in the SDK overlay
  • Change Integer#year to return a Fixnum instead of a Float to improve consistency
  • Don't bail reading a metadata instance if swift_isaMask isn't available
  • Don't exit until the parent asks for an instance
  • Don't include Parent pointer in Nominal/BoundGeneric TypeRef uniquing
  • Don't use MatchesExtension for matching filters
  • Don't use ES6 class for AutoUpdater windows class
  • Don't use MatchesExtension for matching filters
  • Avoid `distinct` if a subquery has already materialized
  • Avoid infinite recursion when bad values are passed to tz aware fields
さなバグタイポ修正した, 警告を潰した




コミットログの基本形はもちろん動詞 + 名詞である名詞固有名詞複数形、不可算名詞が多いが、単数形場合冠詞は a が使われるか、あるいは省略される。the はまず使われない。

何かを追加した、という表現では非常に広く Add が使われる。メソッドからテストドキュメントに至るまで大概これでまかなえる。

一方、何かを修正した、という表現では広く Fix が使われる。「何か」は typocrash といった単語からメソッド名まで幅広い名詞を取るが、動名詞はあまり取らないのと、that節は取らないのでその点は注意が必要である

Fix は「何かが正しく動くようにした」ことを示し、正しい動作内容が何かを説明しない。そこで正しい動作内容に言及したい場合Make sure が使われる(こちらはthat節が取れる)。ただし Fix よりもニュアンス的に重い表現と思われ、Fix を使わず Make sure ばかり使うのはちょっとキモいのではないかと思う(Ensure はさらに重い表現っぽい)。

また、Fixtypo 以外でのドキュメント修正に対して使われることは稀である。対して Update はドキュメントコメントテストに使われ、本体コード修正に対しては使われない。本体コード修正にあわせてテスト更新したなら Update が使われる。ただ、テスト機構それ自体バグ修正したなら Fix である

無駄な何かを単純に除去したなら Remove を使う。これまでのもの(A)からのもの(B)に切り替えたのであれば Use B instead of A か Change A to B が使われる。新たに何かを利用するようにしたのであれば Use を、利用を取りやめた場合Don't use を使うことが多い。

何かをしないようにしたなら Don't を、内部実装効率化なら Make A + 比較級/形容詞Improve が使われる。

中身の変更を伴わない単なる名前の変更なら Rename A to B、コード機能論理上の場所を移動させたなら Move A to B である

この辺はリファクタリングと呼ばれる行為と思うが、Refactor というぼんやりした動詞はあまり使われず、このように変更内容の種類に応じて動詞が使い分けられている。


コミットログにはWhyを書くべきだ、というのを何かで見かけたので because とか since を使ったログがどの程度あるかを調べたが、8540件のうち22件だった。基本的に短く、シンプルに、一目で意味が取れるログが好まれる傾向がある。例えば get rid of とか2件しか使われておらず、圧倒的に remove である

一方で、シンプル単語だけど開始単語としては使われないものもある。例えば次のような単語である。Expand(9)、Extend(8)、Print(5)、Optimize(5)、Publish(4)、Append(4)、Modify(3)、Manage(2)、Revise(2)、Dump(2)、Insert(2)、Migrate(2)、Enhance(1)、Edit(1) 。いずれもカッコ内は8540件に対する冒頭での登場回数である。結局、より一般的平易な単語で表せたり、Refactor同様に抽象度が高すぎると使われないのだろう。














富士通に入社して10年が経った - blog







自分が配属されたのは某製品部署API部分チーム。その製品C言語Java言語からも使えるように出入り口を用意する部分。中でやってる事は指定されたIPポートプロトコルに沿ってデータ投げるだけなんだけどね。ちなみに配属希望の際は「そこそこの忙しさの所がイイ」と言っていました。「バリバリに働きたい」と言ってた同期は多忙ヤバい所に配属されてました。他にもチームがいくつかあったけど、それらのうちの一つは例の「山奥の工場」でしたね。自分が配属された当時はC言語APIリニューアルするって開発してたのだけど、設計担当Javaしかやったことない人で色々とC言語流儀に反してて後々のメンテが大変でした。まあそれでもリニューアル前よりは遙かに良くて、以前はユーザに見せてる関数名が ○○search1 ○○search2 ○○search3 とかでしたね(ちなみに機能はそれサーチか?思うのもあった)。もっと酷かったのが初期製品Javaの公開メソッドで、マニュアルには「このメソッド引数○○を□□を指定した場合戻り値Objectを△△にキャストしてください。××を指定場合は…」という「これ製品にして売ってたんだ…」と思うレベル。もちろんコレがダメだったってのは開発側も認識していて当時は既にリニューアル済みだったけど。リニューアル済みでも少し微妙だったけどね。


それでそのバージョンの開発が終わったあたりで、.NET Frameworkが出始めてきたので次バージョンでは.NET FrameworkAPIを作る事になりまして、自分が少し勉強していたのでそれの設計から担当する事に。当時は.NET Framework 1.1で今思えば少し時期が早かったと思う。2.0Genericが出てからやった方が良かったと思うんだけど、そういうの政治的判断だし結果論だしなー。それまでにRubyとかオブジェクト指向言語に触れてその辺の勉強もしていたので、.NET用のAPIに関しては設計実装結構良い感じに出来たと思う。ああ、そういえばRuby用のAPI効率化の開発ツールとかの名目仕事中に勝手に作ってたなあ。他にもC言語APIも内部実装がクソすぎ!とキレてユーザ公開関数インターフェースだけ同じで中身をフルスクラッチした事も。もちろん絶対LDしてるんで完全に趣味なんだけどな。これでAPIC言語Java.NETになった訳だけど、現場案件で使われたのってほぼ全てJavaだったと思う。(開発中のサーバテストアプリC言語だけど)。要するに自分が数年関わったコードが世の中ではほぼ使われてない訳でして、取りそろえとして必要だったとはいえ世の中の役に立ってないってのは嬉しくは無かったですね。まあ、大企業仕事なんてそういうもんです。.NETに関してはそのバージョンが出る頃はその製品があまり売れてなかったんだか使われたって話は聞かなかったですね。ほほほ。大企業に勤めるのならこういう覚悟必要かもね。



振り返ってみて残業時間は月40~60時間が多かったかな。100時間超えた時は上司に怒られた。あと退職前の1年ぐらいはうちの事業本部(だったかな?)単位残業禁止になってホント残業0時間になった時期があった。他の部署の人の話で、どう考えても狂ってる上司の話とかを聞いてると上司とかの運は良かったと思う。あと、やっぱり仕事でみっちりプログラミングが出来たのは運が良かったと思う。富士通ソフト開発で C C++ C# Java シェルスクリプト InstallShieldとか(そんなに深くはないけど)色々やれた人間はそうそう居ないんじゃないかな。同期とかの仕事は年上の人の派遣の人に指示出したり取り仕切ったりする仕事とか、保守サポートみたいな開発じゃない仕事の話も良く聞いていたので、ソフト開発のキモ体験出来たのは良かったです(こなみ)。








Generic is also a noun.

The program saved $11 million in 1988 by substituting generics for brand-name drugs.








using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
    class Program
        static void Main(string[] args)
            StringBuilder[] blocks = {
                new StringBuilder("**GYRR"),
                new StringBuilder("RYYGYG"),
                new StringBuilder("GYGYRR"),
                new StringBuilder("RYGYRG"),
                new StringBuilder("YGYRYG"),
                new StringBuilder("GYRYRG"),
                new StringBuilder("YGYRYR"),
                new StringBuilder("YGYRYR"),
                new StringBuilder("YRRGRG"),
                new StringBuilder("RYGYGG"),
                new StringBuilder("GRYGYR"),
                new StringBuilder("GRYGYR"),
                new StringBuilder("GRYGYR")

            bool updated = true;
            while (updated)
                for (int i = 0; i < blocks.Length; i++)
                    for (int j = 0; j < blocks[i].Length; j++)
                        char c = blocks[i][j];
                        if (c == '*')
                        updated = false;
                        if (KillBlocks(blocks, i, j))
                            updated = true;
                            goto breaked;
        struct Point
            public int x, y;
            public Point(int x, int y)
                this.x = x;
                this.y = y;
        static bool KillBlocks(StringBuilder[] blocks, int x, int y)
            bool[,] visted = new bool[blocks.Length,blocks[0].Length];

            MarkBlock(visted, blocks, x, y);

            Queue<Point> queque = new Queue<Point>();
            for (int i = x; i < blocks.Length; i++)
                for (int j = y; j < blocks[i].Length; j++)
                    if(visted[i,j] == true)
                        queque.Enqueue(new Point(j,i));

            if (queque.Count < 4)
                return false;

            while (queque.Count > 0)
                Point p = queque.Dequeue();
                RemoveBlock(blocks, p.x, p.y);
            return true;
        static void MarkBlock(bool[,] visted, StringBuilder[] blocks, int x, int y)
            if (x < 0 || y < 0 || x >= blocks.Length || y >= blocks[0].Length || visted[x, y] == true)
            char c = blocks[x][y];
            visted[x, y] = true;
            if (x + 1 < blocks.Length && blocks[x + 1][y] == c) MarkBlock(visted, blocks, x + 1, y);
            if (y + 1 < blocks[0].Length && blocks[x][y + 1] == c) MarkBlock(visted, blocks, x, y + 1);
            if (x > 0 && blocks[x - 1][y] == c) MarkBlock(visted, blocks, x - 1, y);
            if (y > 0 && blocks[x][y - 1] == c) MarkBlock(visted, blocks, x, y - 1);
        static void DumpBlock(StringBuilder[] blocks)
            foreach (StringBuilder s in blocks)
        static void RemoveBlock(StringBuilder[] blocks,int x,int y)
            int i;
            if (y == 0)
                blocks[y][x] = '*';
            for (i = y; i > 0; i--)
                blocks[i][x] = blocks[i - 1][x];
            blocks[i][x] = '*';


人材獲得作戦・4 試験問題ほか




using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace MazeFind
    class Point
        public int x;
        public int y;
        public Point before;
        public Point(int x, int y,Point before)
            this.x = x;
            this.y = y;
            this.before = before;
    class Program
        static void Main(string[] args)
            const char BreakChar = 'B';
            const char GoalChar = 'G';
            const char WallChar = '*';
            const char BeforeChar = '.';

            StringBuilder[] maze = new StringBuilder[]{
                new StringBuilder("**************************"),
                new StringBuilder("*S* *                    *"),
                new StringBuilder("* * *  *  *************  *"),
                new StringBuilder("* *   *    ************  *"),
                new StringBuilder("*    *                   *"),
                new StringBuilder("************** ***********"),
                new StringBuilder("*                        *"),
                new StringBuilder("** ***********************"),
                new StringBuilder("*      *              G  *"),
                new StringBuilder("*  *      *********** *  *"),
                new StringBuilder("*    *        ******* *  *"),
                new StringBuilder("*       *                *"),
                new StringBuilder("**************************"),
            Point start = new Point(1, 1,null);

            Queue<Point> queque = new Queue<Point>();

            while (queque.Count > 0)
                Point now = queque.Dequeue();
                if (maze[now.y][now.x] == BreakChar)
                if (maze[now.y][now.x] == WallChar || maze[now.y][now.x] == BeforeChar)
                else if (maze[now.y][now.x] == GoalChar)
                    Point p = now.before;
                    while (p != null)
                        maze[p.y][p.x] = '@';
                        p = p.before;

                if (maze[now.y - 1][now.x] != '#')
                    queque.Enqueue(new Point(now.x, now.y - 1, now));
                    maze[now.y][now.x] = '.';
                if (maze[now.y][now.x + 1] != '#')
                    queque.Enqueue(new Point(now.x + 1, now.y, now));
                    maze[now.y][now.x] = '.';
                if (maze[now.y + 1][now.x] != '#')
                    queque.Enqueue(new Point(now.x, now.y + 1, now));
                    maze[now.y][now.x] = '.';
                if (maze[now.y][now.x - 1] != '#')
                    queque.Enqueue(new Point(now.x - 1, now.y, now));
                    maze[now.y][now.x] = '.';

            foreach (StringBuilder s in maze)
                Console.WriteLine(s.ToString().Replace(BeforeChar,' '));








using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Maze
    class Program
        // 探索用地図
        static int[,] maze;

        // 始点終点
        static Position Start = new Position(0, 0), Goal = new Position(0, 0);

        static void Main(string[] args)
            //////////////////////////// まずは各行のリストとして読み込み
            string[] inMaze;

            using (var fp = new FileStream(args[0], FileMode.Open, FileAccess.Read))
            using (var iStream = new StreamReader(fp))
                inMaze = iStream.ReadToEnd().Split('\n');

            // 迷路幅
            int height = inMaze.Length;

            // 迷路高さ
            int width = inMaze[0].Length;

            /////////////////////////// 読み込んだ迷路を作業用地図に展開
            maze = new int[width, height];
            for (int y = 0; y < height; ++y)
                string line = inMaze[y];
                for (int x = 0; x < line.Length; ++x)
                    maze[x, y] = line[x] == '*'
                        ? -1
                        : 0;
                    if (line[x] == 'S') Start = new Position(x, y);
                    if (line[x] == 'G') Goal = new Position(x, y);

            // 探索実行
            int dist = Search(maze, Start);

            // 探索結果から最短経路を再現
            Position backTracer = Goal;
            while (dist&gt;1){
                backTracer = backTracer.Nearbys.First(pos =&gt; maze[pos.X,pos.Y] == dist);
                maze[backTracer.X, backTracer.Y] = -2;

            //////////////////// 最短経路こみのアスキー地図に変換
            char[,] outMaze = new char[width, height];

            for (int y = 0; y < height; ++y)
                for (int x = 0; x < width; ++x)
                    outMaze[x, y] = maze[x, y] == -2
                        ? '$'
                        : maze[x, y] == -1
                            ? '*'
                            : ' ';
            outMaze[Start.X, Start.Y] = 'S';
            outMaze[Goal.X, Goal.Y] = 'G';

            ////////////////////// 結果は標準出力に。
            for (int y = 0; y < height; ++y)
                for (int x = 0; x < width; ++x)
                    Console.Write(outMaze[x, y]);

        /// <summary&gt;
        /// 探索する。SG間の道のりを返す(道のり=SGが隣接しているなら1)
        /// </summary&gt;
        private static int Search(int[,] maze, Position Start)
            List<Position&gt; FrontLine = new List<Position&gt;();
            int dist = 1;
            for (; ; )
                List<Position&gt; NextFrontLine = new List<Position&gt;();
                foreach (var pos in FrontLine)
                    foreach (var nextPos in pos.Nearbys)
                        if (nextPos == Goal) return dist;
                        if (maze[nextPos.X, nextPos.Y] == 0)
                            maze[nextPos.X, nextPos.Y] = dist;
                FrontLine = NextFrontLine;

    struct Position
        public readonly int X, Y;
        public Position(int x, int y) { X = x; Y = y; }

        public IEnumerable<Position&gt; Nearbys
                return new[]{
                    new Position(X-1,Y),
                    new Position(X,Y-1),
                    new Position(X+1,Y),
                    new Position(X,Y+1),

        public static bool operator==(Position p1, Position p2){
            return p1.X == p2.X &amp;&amp; p1.Y == p2.Y;

        public static bool operator!=(Position p1, Position p2){
            return p1.X != p2.X || p1.Y != p2.Y;



fmccabeで、 今日(7時間前)報告

I have been working on a programming language, also called Go, for the last 10 years.私は、プログラミング言語にも、移動と呼ばれ、過去10年間のために働いている。 There haveが存在して

been papers published on this and I have a book.された論文は、この上で公開され、私の本がある。

I would appreciate it if google changed the name of this language; as I do not want to have toもしGoogleがこの言語名前を変更私はそれをお願い申し上げます。私にはしたくない

change my language!私の言語を変更!

Comment 1 by dsymonds , Today (7 hours ago) コメント1 dsymondsで 、 今日(7時間前)


Comment 2 by fmccabe , Today (7 hours ago) コメント2 fmccabeで 、 今日(7時間前)

If you google (sic) francis mccabe go you will find some references.場合は()を原文のままGoogleフランシス、いくつかの参照を見つける行くマッケイブ

I published the book on lulu.com私lulu.com上の本を出版

Comment 3 by reidellis , Today (4 hours ago) コメント3 reidellisで 、 今日(4時間前)

I think Mr McCabe's language is called "Go!".私は氏マッケイブ言語"と呼ばれてみろ!"。 Here's the Lulu link:ここでは、ルルのリンクです:

http://www.lulu.com/content/paperback-book/lets-go/641689 http://www.lulu.com/content/paperback-book/lets-go/641689

Comment 4 by niral.n95 , Today (3 hours ago) コメント4 niral.n95で 、 今日(3時間前)

reidellis: is right! reidellis:ですね! its "Lets Go!"その"はLets Go!" or "Go!".や"ゴー!"。 This is google "go", "The Goこれは、"行くに"google、"移動されます

Programming Language" Bigg Difference.. :)プログラミング言語"Biggの違い..:)

Ps Anyone hearing the release of Google "go" would have picked up their book that psの誰""行っても本を手にしてはGoogleリリース公聴会では

never sold and started finding the work "GO" and as they would find their 1st "GO"販売されなかったとの仕事"Go"を見つけることを始め、などに気づくような、その第一の"Go"

they wil go , Eureka!彼らはエウレカ行くウィル! :) :)

Comment 5 by fmccabe , Today (3 hours ago) コメント5 fmccabeで 、 今日(3時間前)

My language is called Go!.自分言語へと呼ばれます!。 The book is called Let's Go!.本の行こうと呼ばれます!。

The issue is not whether or not Google's go will be well known.問題かどうかは、Googleの移動も呼ばれることもありません。 It is one of fairness.これは1つの公平性の一つです。

Comment 6 by zhenshe41 , Today (3 hours ago) コメント6 zhenshe41で 、 今日(3時間前)

In Go!行くで! , can the IDE know the differences between Go!は、IDEへの違いを知ることができます! and go ?行く?

Comment 9 by shirish4you , Today (2 hours ago) コメント9 shirish4youで 、 今日(2時間前)

ah...ああ... Google should change the name... Googleは、名前を変更する必要があります...

Comment 11 by spronkey , Today (2 hours ago) コメント11 spronkeyで 、 今日(2時間前)

Indeed they should.確かにそうあるべきだ。 Full support for you, Mr. McCabe.あなたのためのフルサポートミスターマッケイブ。 It's not that hard to findそれを見つけるために、ハードではない

references to your language online either - it was on the first page of Bing, secondあなたの言語オンラインへの参照のいずれか-それはビンビンの最初のページに2番目だった

of Google for 'go programming language'. Googleの'のために行くのプログラミング言語'。

In fact, the title of the Google go tutorial page is even "Let's Go".実際には、Googleタイトルチュートリアルページに行っても"行こう"です。

It would be pretty poor for you folks Google to keep this name given your "do noそれはかなりあなたのための人々 、Googleはこの名が指定さを維持する貧困層になるお客様の"ありませんか

evil" slogan!悪"のスローガン

Comment 12 by nofakesallowed , Today (2 hours ago) コメント12 nofakesallowed、 今日(2時間前 に )

Google should totally change the name, fmccabe you should find a (cheap) lawyer just Googleの完全に、あなたは(安い)弁護士を見つける必要がありますだけfmccabeの名前を変更する必要があります

in case...場合には...

Google has deep pockets. Googleの深いポケットにしています。

Comment 13 by nofakesallowed , Today (2 hours ago) コメント13 nofakesallowed、 今日(2時間前 に )

btw, what's up redditところで、どうしたのreddit

Comment 14 by alex.salkever , Today (2 hours ago) コメント14 alex.salkeverで 、 今日(2時間前)

fmcabe -- could you contact me at alex @ dailyfinance.com? fmcabe -あなたalex@dailyfinance.comで、私に連絡だろうか? Might want to write a可能性のある記述する

little article about this.このことについて少し記事 Thanks.ありがとう。

Comment 16 by matthew.m.mckenzie , Today (2 hours ago) コメント16 matthew.m.mckenzieで 、 今日(2時間前)

google should change!グーグル変更してください!

Comment 17 by senthil.nayagam , Today (2 hours ago) コメント17 senthil.nayagamで 、 今日(2時間前)

maybe name it Goo or Foo多分グーかはFooという名前を付けます

Comment 18 by mail2ankitgupta , Today (119 minutes ago) コメント18 mail2ankitguptaで 、 今日(119分前)

A company claiming to capture world's info, missed it!!!同社は、世界情報キャプチャすると主張し、それを逃した!

Comment 19 by terence.stuart , Today (117 minutes ago) コメント19 terence.stuartで 、 今日(117分前)

Let the language with the most users keep its name.ほとんどのユーザーは、その名前のままにして言語をしましょう。

Er... Erを... That's not yours, is it?それは、あなたではないって?

Comment 20 by blair.briggs , Today (113 minutes ago) コメント20 blair.briggsで 、 今日(113分前)

Go, find a new name.移動し、新しい名前を探します。 ;) ;)

Comment 21 by josecamporro , Today (111 minutes ago) コメント21 josecamporroで 、 今日(111分前)

I agree with majority on this.私はこの上の部分に同意する。 Google should change the name of this language... Googleはこの言語名前を変更する必要があります...

Francis McCab is right, Go!フランシスMcCabが正しいでGO! and Go are not that different.と移動の違いはありませんです。 And he went first, public.彼は、公共の最初に行った。

Comment 22 by sebastian.krause , Today (104 minutes ago) コメント22 sebastian.krauseで 、 今日(104分前)

Google should consider a different name simply for the reason that "Go" is just a too Googleはその理由は、"移動"されに別の名前を検討する必要がありますだけでも

common word and it might eventually become difficult to google for references and一般的な単語と、最終的に参照するためにGoogleが困難になる可能性があります

examples about this language.この言語についての例です。 A somewhat more unique name can have its benefits.もう少しユニーク名前は、その利点を持つことができます。

Comment 23 by Afro.Systems , Today (95 minutes ago) コメント23 Afro.Systemsで 、 今日(95分前)

I think lango would be a great name and I am hereby to give away to google any私はランゴすばらしい名前だと思うと私は、ここから何かグーグルに与えるために午前

copyrights for the name.名の著作権

Comment 24 by ismetdere , Today (94 minutes ago) コメント24 ismetdereで 、 今日(94分前)

Goo, whould be just fine.グー、されるだけで罰金whould。

Comment 25 by QrczakMK , Today (68 minutes ago) コメント25 QrczakMKで 、 今日(68分前)

Goo is already taken too, although it has been dead for a few years I think.ただし、それが思う数年前に死んだがグー、すでにも、撮影されます。

Comment 26 by zak.wilson , Today (68 minutes ago) コメント26 zak.wilsonで 、 今日(68分前)

Goo is the name of a Lisp dialect.具は、Lisp方言名前です。

Comment 27 by daniel.kolman , Today (67 minutes ago) コメント27 daniel.kolmanで 、 今日(67分前)

Both Google and fmccabe should find a new name, "Go" is silly name for a programming Googleとfmccabe、"Go"をテコな名前プログラミングされている新しい名前を見つける必要があります


Comment 28 by br...@silcon.com , Today (67 minutes ago) コメント28 brで... silcon.com @、 今日(67分前)

how about GOOP = Google Object Oriented Programming?方法については無神経な人= Googleオブジェクト指向プログラミング

mccabe- personally, I agree with you, but while you may be first, and you may beマッケイブ、個人的に、私はあなたと、しかし、中に最初にすることに同意し、することがあります

published, your issue title begs not to take you seriously regardless of your actual公開され、あなたの問題のタイトル真剣にかかわらず、お客様の実際の場合を取らないように頼む


I do hope this is resolved in your favor though.私はあなたのおかげでも解決されてほしいですか。

Comment 29 by jwb.public , Today (66 minutes ago) コメント29 jwb.publicで 、 今日(66分前)

how about ogle?方法については色目を使う?

Comment 30 by srikumarks , Today (60 minutes ago) コメント30 srikumarksで 、 今日(60分前)

Given that is derives from Limbo, "Bo" would be short and sweet as well.つまり、辺獄から、"ボー"不足しているだろうと甘いだけでなく派生を考える。 They can alsoこれらのこともできます。

use "boroutines" :P "boroutines":pを使用

Comment 31 by ismetdere , Today (57 minutes ago) コメント31 ismetdereで 、 今日(57分前)

Goo is gone too?具も行ったですか? damn..気.. what about Goat?何ヤギは?

Comment 32 by killercore , Today (52 minutes ago) コメント32 killercoreで 、 今日(52分前)

I'd go for JAgo: Just Another go私JAgoのために行くだろう:ちょうど別のものへ

Comment 33 by jason.lee.quinn , Today (51 minutes ago) コメント33 jason.lee.quinnで 、 今日(51分前)

Goat Special Editionヤギスペシャルエディション

Comment 34 by nikola.tepper , Today (50 minutes ago) コメント34 nikola.tepperで 、 今日(50分前)

It is completely absurd to use name of an already existing language.それは完全に既存の言語名前を使用するのはばかげている。 Hey Google,ちょっとGoogleは、

couldn't you, i don't know... 、私を知らない場合が...。 google it?とGoogleの? Oh right, the name is so generic, that isそう、名ので、つまり、汎用的なもの

almost impossible to get relevant matches.ほとんどの関連性と一致を得ることは不可能。 If this language catches on, it'll be aこの言語キャッチし、それになります

nightmare to search for problems and solutions.問題と解決策を検索する悪夢のような。

Comment 36 by jsykari , Today (40 minutes ago) コメント36 jsykariで 、 今日(40分前)

May I humbly suggest "go2"? 5私は謙虚に""go2いかがでしょう?

Even C++ got away with naming the language after an esoteric feature of C -- perhapsも、C + +の距離Cの難解な機能の後に、言語名前付け規則だ-おそらく

naming a language after "goto" isn't that bad. "の後に、後藤は"悪くはない言語のネーミングになります。

Comment 37 by Linnsey , Today (38 minutes ago) コメント37 Linnseyで 、 今日(38分前)

There are so many hobby and specialist programming languages it'd be hard to find aあるので趣味や専門のプログラミング言語でそれを見つけることは難しいですね、多くの

name that's not taken.名は、撮影ではない。

Comment 39 by david.kitchen , Today (32 minutes ago) コメント39 david.kitchenで 、 今日(32分前)

@33 Disturbing but funny... @ 33不穏がおかしい... I can imagine the logo now: 3OE私は今のロゴ想像することができます:3OE

@34 Look at the dates of these things, it would appear that go started around the @これらのものの日程を34歳で見て、その周りを開始へ表示されます

same time that the book was being written (but Go! already existed).同じ時間には、図書(ただし、移動書かれていた!既に存在していた)。 I wouldn't be私ではない

surprised to learn that due diligence was done at the time but simply that since thenは、デューデリジェンス時間でも行われていた知って驚く人は、単にそれ以来、

it just hadn't been revisited.それだけで再訪されていませんでした。

@36 http://xkcd.com/292/ @ 36 http://xkcd.com/292/

Comment 40 by patla073 , Today (31 minutes ago) コメント40 patla073で 、 今日(31分前)

Why not just name it Golang?理由だけではなく、それGolang名前は?

Erlang - "Ericsson Language"アーラン- "エリクソン言語"

Golang - "Google Language" Golang - "Google言語"

Comment 41 by drc.uvic , Today (31 minutes ago) コメント41 drc.uvic、 今日(31分前 に )

Does anyone use 'Go!'?誰'移動を使用しますか!'? If yours is better, or has a decent user base then a name change might be the right thingもしあなたの優れているか、またはその名前の変更は正しいかもしれませんが、まともなユーザーベースを持って

to do.を行う。 If you're bringing it up for academic pride then I don't see why they should have to change anything.もし私はなぜ何も変更する必要がありますが表示されない学問の誇りをのために育てている。

Comment 42 by abouthors , Today (29 minutes ago) コメント42 abouthorsで 、 今日(29分前)

Jago is already taken by a program to play the game of go. Jago既に行くのゲームプレイするためのプログラムによって行われる。

Comment 44 by charles.majola , Today (18 minutes ago) コメント44 charles.majolaで 、 今日(18分前)

This is issue 9 ......この問題は9 ...... Plan 9..... Plan 9の.....


Comment 45 by tuxthelinuxdood , Today (14 minutes ago) コメント45 tuxthelinuxdoodで 、 今日(14分前)

It is obvious that Google employees did not research the name in terms of existingこれは、Google従業員の面では、名前研究していない明らかにされ、既存の

languages before release.リリース前の言語。 In such a situation I believe Google is at fault and the nameこのような状況では私はGoogle断層の名前ではと考えています

should be changed.変更する必要があります。 I doubt it will happen but it to change it would be in line with "do私はそれが起こるとは思えませんが、それを行となる"を変更するか

no evil".邪悪な"。

Comment 46 by GeoffreyJ.Lee , Today (14 minutes ago) コメント46 GeoffreyJ.Leeで 、 今日(14分前)

How about "Google Go"?方法については"Googleの移動"?

Go2 is pretty clever though, so my vote is on that. Go2かなりかかわらず、僕の投票をするには利口だ。

Comment 47 by roblesjm , Today (9 minutes ago) コメント47 roblesjmで 、 今日(9分前)

Google always releases new products with the prefix "Google". Googleでは常に接頭辞"Googleとの"新製品リリースします。 In this case, I don'tこの場合、私はしないでください

know if Google want release a new product or make an Alliance like Android.知っている場合、Googleは新製品リリースしたい、またはするアライアンスAndroidのような。

In the first case, I would use "GoogleC".最初のケースで、私は"を使用します。GoogleC"。 For the second, something like "GCP" fromについては、2番目の、何か"GCPの"からのような

(Google C Python). (GoogleのĈパイソン)。

Comment 48 by ismetdere , Today (4 minutes ago) コメント48 ismetdereで 、 今日(4分前)

Goat it is...ヤギって... there, settled.そこに定住した。

Comment 49 by Peter.Schweizer , Today (4 minutes ago) コメント49 Peter.Schweizerで 、 今日(4分前)

i'd suggest "giggity giggity goo" as new name since quagmire is a very funny guy私は""新しい名前として泥沼非常に面白いやつなんだからgiggity giggityグーをお勧めしたい

btw.ところで。 hi reddit :)ハイテクしかし:)

Comment 50 by ruivaldo , Today (4 minutes ago) コメント50 ruivaldoで 、 今日(4分前)

"Do" ? ""ですか? Makes sense, check the purpose of the lang.理にかなっては、langの目的をご確認ください。




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;

namespace RPG
    class MapFile
        struct FMFHeader
            public string dwIdentifier;	// ファイル識別子 'FMF_'
            public int dwSize;			// ヘッダを除いたデータサイズ
            public int dwWidth;		// マップの横幅
            public int dwHeight;		// マップの高さ
            public byte byChipWidth;	// マップチップ1つの幅(pixel)
            public byte byChipHeight;	// マップチップ1つの高さ(pixel)
            public byte byLayerCount;	// レイヤーの数
            public byte byBitCount;		// レイヤデータビットカウント

        private FileStream fs;
        private BinaryReader br;
        private FMFHeader _head;
        private byte[] _data8 = null;
        private short[] _data16 = null;

        public int width
            get { return _head.dwWidth; }

        public int height
            get { return _head.dwHeight; }

        public int chip_width
            get { return _head.byChipWidth; } 

        public int chip_height
            get { return _head.byChipHeight; }

        public void Load(String fname)
                fs = new FileStream(fname, FileMode.Open);
                br = new BinaryReader(fs);

                _head.dwIdentifier = new String(br.ReadChars(4));
                if (_head.dwIdentifier != "FMF_")
                    throw new Exception("ファイルが壊れています");

                _head.dwSize = br.ReadInt32();
                _head.dwWidth = br.ReadInt32();
                _head.dwHeight = br.ReadInt32();
                _head.byChipWidth = br.ReadByte();
                _head.byChipHeight = br.ReadByte();
                _head.byLayerCount = br.ReadByte();
                _head.byBitCount = br.ReadByte();
                switch (_head.byBitCount)
                    case 8:     //8bit layer
                        _data8 = br.ReadBytes(_head.dwSize);
                    case 16:    //16it layer
                        int count = _head.dwSize / 2;
                        _data16 = new short[count];
                        for(int i = 0; i < count; i++)
                            _data16[i] = br.ReadInt16();
            catch(Exception ex)
                throw ex;
        public void close()
            _data8 = null;
            _data16 = null;
        public int getValue(int layer_index, int x, int y)
            if (_data8 == null &amp;amp;&amp;amp; _data16 == null)
                return -1;
            if (layer_index &gt;= _head.byLayerCount ||
                x &gt;= _head.dwWidth ||
                y &gt;= _head.dwHeight)
                    return -1;

            int index = 0;
            int layer_offset = getLayerAddr(layer_index);
            switch (_head.byBitCount)
                case 8:     //8bit layer
                    index = _data8[layer_offset + x + y * _head.dwWidth];
                case 16:    //16it layer
                    index = _data16[layer_offset + x + y * _head.dwWidth];
            return index;
        private int getLayerAddr(int layer_index)
            if (layer_index &gt;= _head.byLayerCount || (_data8 == null &amp;amp;&amp;amp; _data16 == null))
                return -1;
            return _head.dwWidth * _head.dwHeight * layer_index;



ログイン ユーザー登録
ようこそ ゲスト さん