Archive for August, 2008
August 30, 2008
I have a Canon camcorder. I bought it several years ago (4 years ago?). Since the last year, we had a problem that its color was fading as I captured. I sent twice for fixing. Now, it is coming back. I wonder whether I should ask Canon to fix it again or not. This is because the last time, it cost about $150. They say as a courtesy, it’ll be free shipping. Suppose, I decide to buy a new one. What type of camcorder I should buy? Hard disk version is pretty good, but I’m afraid of loosing images so quickly. I like miniDV although it is tape, but to me, it’s safer and last long, too. Especially, it’s cheap now. What do you think? Any suggestion?
キャノンのカムコーダーを持っている。何年か前(4年前?)に買った。ところが、去年から、使っている時に、カラーが無くなるという問題が起きる。直すために2回も送る(キャノンに)。またこの問題が起こり始めている。キャノンにまた修理を頼むかどうか。前回は、150ドル程かかる。今回は郵送費は良いそうだ。もし新しいのを買うとすると、どれがいいか?ハードディスクのはいいけど、すぐにイメージを消してしまうと恐れがある。MiniDVが好きだ、テープだけど。安全だし長持ちするし。特に今安い。どうでしょうか?何か案はありませんか?
Posted in Thinking 思うこと | Tagged カムコーダー, Camcorder | 4 Comments »
August 29, 2008
I stuck on the simplest web service client example. It does not run due to stub service object is not instantiated that is defined by @WebServiceRef. I did not code anything, but I just followed the instruction. There is no compilation error, but it does not run from Netbean IDE as well as the command line. I wonder what’s wrong with this?
前回の続きで、さらに問題に出会う。クライアントのプログラムが動かない。理由は、Stub サービスのオブジェクトが作られていない。それは、@WebServiceRefで指定されている。このプログラムは自分が作ったのではなく、ただ、説明に従っただけ。コンパイラーのエラーもない。NetbeanのIDEからもそして、コマンドラインからも動かない。どうなっているのか?
Posted in web services | Tagged Web Service | Leave a Comment »
August 28, 2008
Preparing for the production development, I started studying web service tutorial. Usually, Java tutorial from Sun is pretty good, but J2EE was not so from my past experience. I wonder how this tutorial is. I started building hello web service and got an issue on building hello web service client code. It shows the code, and somehow, HelloService class is used. I did not know from which this class came. I was using NetBean IDE and happened to find there is a wizard called “web service client…” where I specifies the URL to the wsdl of the hello web service. When I finished this wizard, all of sudden, HelloService classes with other necessary classes were generated. Now, I got it and looked into the tutorial in detail. I found that it said “The sub is created at development time by the wsimport tool, which generates JAX-WS portable artifacts based on a WSDL file.” Now, I understood I ran the wsimport tool on the Netbean. To understand the meaning of this, I think it’s beyond the tutorial level.
次の本物の開発に備えて、ウェブサービスのチュートリアルを勉強し始める。SunからのJavaのチュートリアルは、いつもいいが、J2EEの方はあまり良い経験はない。今回はどうか?ハローサービスで、クライアントのコードで問題がある。HelloServiceと言うクラスが出てきたがどこからこれは来たのか?NetBean IDEに“Web Service Client”というビザ-ドを見つける。そのビザードで、WSDLのURLを与えると、HelloServiceのクラスが作られたのを発見。チュートリアルをよくよく見ると、“The sub is created at development time by the wsimport tool, which generates JAX-WS portable artifacts based on a WSDL file.”と書いてある。これで何をしたか分かった。でも、この説明でチュートリアルのレベルだろうか?
Posted in web services | Tagged Java EE Tutorial, Web Services | Leave a Comment »
August 26, 2008
I saw an article that Mitsubishi starts selling a new electric car the next year http://sankei.jp.msn.com/economy/business/080710/biz0807100052000-n1.htm . One charge allows you to drive 100 miles. The top speed is about 80 mph. They are building charge stations in a big city like Tokyo. They also start planning the same California soon. Of course, you can charge at home. It costs about 1 miles 2 cents (my guess based on 1km 1 to 3 yen); therefore, 100 miles $2. The price is about $2,5000. If it runs 200 miles at one charge, I think it’ll be a big hit in U.S.
三菱からの電気自動車http://sankei.jp.msn.com/economy/business/080710/biz0807100052000-n1.htm .。一回の充電で、100マイル。トップスピードは80マイル。充電のステーションは、東京のようなビッグシティで、構築されるそうだ。カリフォルニアでの計画もあるらしい。能率は、1マイルは2セントくらい?(この記事では、1Km 1から3円)。100マイルだと2ドル。車両価格は250万円。もし、一回の充電で200マイル走ったら、アメリカでは大ヒットだと思うけど。
Posted in Thinking 思うこと | Tagged Electric Car, 電気自動車, Mitsubishi, 三菱 | Leave a Comment »
August 23, 2008
Today is my son’s 11th birthday. I like 11th birthday because I liked that year on my life. Probably, it was the year I realized myself of what I can do and how life is good and bad. Just after waking up, my son came to me and told me I would like to go finishing. It was around 8:00AM. Our family does not celebrate crazy for our kids, and rather we try to do something instead of buying something. Well, I was in the middle of making his desk; it could be a good deal for him. I decided to take him to one of the lakes in Warrenton. We came to the lake. It was a bit hot, but it was not hot & hot day. I lent a boat and tried to stay a near the other side of shore where sunshine is milder. After several attempt, my son made the first fish as if he was celebrated. It’s about 10 inches. Good job! We ended up just one, but it was a pretty good finishing and a good birthday celebration for him.
今日は、息子の11歳の誕生日。11歳の誕生日は好きだ。というのも、自分の人生で、その年がよかったから。多分、その年に、人生はどんなものかとか、自分で何が出来るかとかわかったからだと思う。朝起きてすぐ、息子が来て、魚釣りに行きたいという。8時頃だった。うちの家族は子供の誕生日のために、ばかさわぎせず、何かをかってあげるのではなく何かをしてあげようとする。私は、彼の勉強机を作っている最中。魚釣りはきっと彼にとっていいことだ(まだ、机が出来てないから)。ワーレントン市の湖に連れて行くことにする。湖に来ると、少し暑かったけど、大変というわけではなかった。ボートを借りて、むこうの岸の太陽の光がやわらかいところへ行く。何回かの後、息子が誕生日を祝福されたように、最初の魚を釣る。約20センチくらい。やった!結局この1匹だけ。しかし、良い魚釣りだったし、彼にとって良い誕生日だった。
Posted in Happy うれしーい, Thinking 思うこと | Tagged birthday, 誕生日 | 2 Comments »
August 23, 2008
Finally, the Olympic is ending. Watching world best athletes are thrilling and I admire how they train themselves at that level. Although they are the representative of each country, we should not think of that way. Rather we should admire each individual as well as their coaches and supporters. I have been watching Olympic since 1964, which was Tokyo Olympic. They are still improving their records. It’s amazing. Also, it is not just new records, but seeing the skill of winning is impressive. Often times, a moment of winning is as beautiful as that of the new records.
ようやく、オリンピックが終わろうとしている。世界一の運動家を見ることは、とってもスリルがあるし、彼らがそこまで鍛えげる努力に驚嘆する。彼らはその国の代表だけど、そのように考えるべきではない。むしろ、個人、コーチ、サポーター達を、尊敬すべき。私は1964年の東京オリンピックから見ている。記録がまだ更新されている。すごい。新記録だけでなく、勝負を見ることもすごい。勝利の瞬間は、新記録の瞬間に劣らず、美しい。
Posted in Thinking 思うこと | Tagged オリンピック, olympic | Leave a Comment »
August 19, 2008
I just installed JavaFX and Netbean IDE. I was betting Flex, but since it seems that my program manager does not want to pay for the Flex development IDE, I need to re-think about my RIA development environment. Well, it’s simple answer—JavaFX. It has not been version 1.0, but as long as I see through Netbean IDE, it looks good. I just skimmed through the code. Rather Netbean IDE impressed me a lot than Java FX actually. Whenever I see Netbean IDE, it looks better than before. But things are always some very important functionality is missing Netbean IDE comparing to Eclipse. I forgot what it is, but that’s the reason I gave up using Netbean IDE before. Let’s see how much Netbean IDE has been improved since then.
JavaFXとNetbean IDEをインストール。Flexを使おうと思っていたけれど、プログラムマネジャーがFlexの開発環境を買うことを渋っているので、RIA(Rich Interface Application)の開発環境を考え直さないと。答えは簡単。JavaFX。まだバージョン1.0ではない。Netbean IDEからコードをみる限り良い。ちらっと見ただけだけど。むしろ、Netbean IDEのよさがもっと感じられる。このIDEみるたびに良くなる。でも、いつも、一番大事な機能がないことで、Eclipseを選ぶことになる。それがなんだったか忘れたけど。どれだけ良くなったかみて見よう。
Posted in Java, Thinking 思うこと | Tagged Eclipse, JAVA, JavaFX, Netbean | Leave a Comment »
August 17, 2008
As I was developing software, I came to a situation where I needed to build a factory class. Based on the request, it needs to create an appropriate object. I don’t like a long if-else and initialization code. I came up an idea to use listener and implements an Interface that contains onCreate method. With this way, each target object can instantiate itself with implementation of that interface. The factory class simply calls the onCreate method for every listener within for loop. If the object is returned, the factory class simply returns that object.
In summary, there are two good points: one is you don’t need to write if-else statements; second, you can write initialization code within each class itself.
ソフトウェアを書いているとき、ファクトリクラスを作らなくてはいけなくなった。リクエストによって、正しいオブジェクトを新たに作らなくてはいけない。長たらしい、If-elseと初期化コードは書きたくない。それよりも、リスナーとOnCreate メソッドを含むインターフェースを使う方法がうかぶ。これにより、ターゲットとなるオブジェクト自身が新たな自分自身を作ることが出来る。ファクトリクラスは、ただループの中で、順々にリスナーのOnCreateメソッドを呼べばよい。ファクトリクラスは新しいオブジェクトが返された時に、それをリクエストしたオブジェクトに返せばよい。
これにより2つの利点がある。ひとつはIf-elseをつかわなくてもよい。もうひとつは、初期化コードが、クラス自身の中で定義できる。
Posted in Java, Java Coding Methods Java コーディング作法 | Tagged Factory, JAVA, Listener | 2 Comments »