約 5,108,755 件
https://w.atwiki.jp/azounoman/pages/38.html
2031 Building a Space Station 問題 http //acm.pku.edu.cn/JudgeOnline/problem?id=2031 解答方針 最小全域木.今回はKruskalのアルゴリズムで解いた. 解答例 import java.io.*; import java.util.*; import java.text.*; public class Main{ public static void main(String[] args)throws IOException{ Scanner sc = new Scanner(System.in); DecimalFormat formatter = new DecimalFormat("#0.000"); int n = sc.nextInt(); while(n!=0){ double data[][] = new double[n][4]; for(int i=0;i n;i++){ data[i][0] = sc.nextDouble(); data[i][1] = sc.nextDouble(); data[i][2] = sc.nextDouble(); data[i][3] = sc.nextDouble(); } Solver s = new Solver(n,data); double ans = s.solve(); System.out.println(formatter.format(ans)); n = sc.nextInt(); } } } class Solver{ int size; int connected[];//expression of MF-SET PriorityQueue Edge q; Solver(int n,double data[][]){ size = n; connected = new int[size]; q = new PriorityQueue Edge (); for(int i=0;i n;i++){ for(int j=i+1;j n;j++){ double elen = edgeLength(data[i],data[j]); Edge e = new Edge(i,j,elen); q.offer(e); } } for(int i=0;i n;i++) connected[i] = i; } public double solve(){ double corlen; corlen = 0; //Kruskal s algorithm while(!q.isEmpty()){ Edge e = q.poll(); int i = e.p1; int j = e.p2; if(connected[i]!=connected[j]){ merge(i,j); corlen += e.length; } } return corlen; } //MERGE OF MF-SET private void merge(int i,int j){ int m1 = connected[i]; int m2 = connected[j]; for(int k=0;k size;k++){ if(connected[k]==m2) connected[k] = m1; } } private double edgeLength(double d1[],double d2[]){ double dx = d1[0]-d2[0]; double dy = d1[1]-d2[1]; double dz = d1[2]-d2[2]; double dist = Math.sqrt(dx*dx+dy*dy+dz*dz); double prelen = dist - (d1[3]+d2[3]); if(prelen =0.0) return prelen; else return 0.0; } } class Edge implements Comparable Edge { int p1; int p2; double length; Edge(int i,int j,double l){ p1 = i; p2 = j; length = l; } public int compareTo(Edge e){ if(length e.length) return 1; else if(length==e.length) return 0; else return -1; } }
https://w.atwiki.jp/asterisk99/pages/620.html
# SOME DESCRIPTIVE TITLE. # Copyright (C) 2021, PB'99 # This file is distributed under the same license as the NetworkX [Un # official Machine Translate] Japanese Doc package. # FIRST AUTHOR EMAIL@ADDRESS , 2021. # #, fuzzy msgid "" msgstr "" "Project-Id-Version NetworkX [Un official Machine Translate] Japanese Doc \n" "Report-Msgid-Bugs-To \n" "POT-Creation-Date 2021-06-25 23 18+0900\n" "PO-Revision-Date YEAR-MO-DA HO MI+ZONE\n" "Last-Translator FULL NAME EMAIL@ADDRESS \n" "Language-Team LANGUAGE LL@li.org \n" "MIME-Version 1.0\n" "Content-Type text/plain; charset=utf8\n" "Content-Transfer-Encoding 8bit\n" "Generated-By Babel 2.9.1\n" # ../../doc/reference/exceptions.rst 3 msgid "Exceptions" msgstr "例外" カウンタ: - 名前 コメント
https://w.atwiki.jp/pubgpro/pages/140.html
別名義はDinghisKhan。 所属チーム チーム 期間 4entro 2017-8 - 2017-11 G9 2017-11 - 2017-12-27 Cloud9 PUBG.KR 2017-12-27 - 配信・SNS Twitch Twitter 大会結果 日付 順位 大会 2017-8-23 13位 Gamescom PUBG Invitational Solo 2017-8-24 7位 Gamescom PUBG Invitational Duo 2017-8-26 12位 Gamescom PUBG Invitational Squad 2017-12-20 5位 AfreecaTV PUBG League Pilot Season Split1
https://w.atwiki.jp/rcdd/pages/15.html
Generation X10とは 10-1-600.jpg 以下メーカーホームページの説明文より引用 Calandra Racing Concepts changed the face 12th Scale racing with the release of the beautiful Gen-X racer. Tenth scale racers can now also have the same professional quality race car as TeamCRC releases its new 10th scale racer the GenX10. The GenX10 is the result of continuous refinement and product development at Calandra Racing Concepts. The GenX10 has it roots from CRC s previous 10th scale on-road racer the Pantoura, but this latest kit has undergone a revolutionary ground up redesign to produce a well-balanced, lightweight and highly adjustable tenth scale racer, the GenX10. Move over Touring Cars and make room for CRC s Pro10 2WD Sports Car Racer. The the GenX10 also features CRC s new Pro-Strut molded front end, best in the business New X-pod rear end, super low CG with "open pod" design that accepts brushed and bulky brushless motors with ease Bottom loading quick-change battery tray that fits any battery style, LiPo or NiMH Designed to fit 200 mm Sport Car bodies (such as the many HPI offerings) as well as traditional GTP bodies Adjustable track width 200-235 mm Adjustable wheel-base (allows for tuning and setup for NASCAR bodies) 235 mm width optional kit will be available soon Flush mount transponder mounting system Ultra low CG and centralized mass engineering for exceptional handling and precise steering 簡単な翻訳(超意訳、自信なし) Calandra Racing Conceptsは1/12のGen-Xと共にクールな車を出しました。1/10サイズのその車はGenX10と言い、GenXと同じく高品質なレーサーです。 GenX10はCalandra Racing Conceptsの継続的な研究開発の成果です。GenX10ののルーツはロードレーサーのPantouraですが、GenX10はバランスや軽量化、調整可能な項目等を突き詰めた結果、設計を新たにしています。ツーリングカーとは違うGenX10という 2WD Sports Car Racer はいかがでしょうか? GenX10の特徴: フロントはGenXで採用されたCRC プロストラットを採用しています、 リアエンドは低重心でX-Podと、OpenPodデザインが採用され、ブラシレスモーターの搭載も容易です。 シャシー下面からトレイを使用してバッテリーを搭載するスタイルはNiMHからLiPoまで様々なバッテリーをサポートします。 200mm幅の1/10スケールボディが使用可能です。 トレッドは235mmまで延長可能です。 ホイールベースの調整の可能で、NASCARボディの搭載や調整も可能です。 235mm拡張キットは近日発売予定です。(訳注:現在は販売されています。) トランスポンダーの搭載も可能です。 ハンドリングと操作性向上の為に徹底的な低重心化とマスの中心化が図られています。
https://w.atwiki.jp/kobapan/pages/191.html
ruby-2.0.0-p247 をソースからインストールしたら、gem がエラーを出して動かなくなった まずは、openssl がないと言われる。apt-get で入れてあるけど。。 $ sudo gem install nesta ERROR Loading command install (LoadError) cannot load such file -- openssl ERROR While executing gem ... (NoMethodError) undefined method `invoke_with_build_args for nil NilClass まず「openssl-dev」をインストールして(ってこれのことか? $ sudo apt-get install libcurl4-openssl-dev 「openssl」を、Rubyソースコードから別途インストールする $ cd ~/Downloads/ruby-2.0.0-p247/ext/openssl $ ruby extconf.rb $ make make install 今度はzlib。zlibc は入ってるけど。。。 $ sudo gem install nesta ERROR Loading command install (LoadError) cannot load such file -- zlib ERROR While executing gem ... (NoMethodError) undefined method `invoke_with_build_args for nil NilClass 「zlib」とやらをRubyソースコードから別途インストール $ sudo apt-get install libcurl4-openssl-dev $ cd ~/Downloads/ruby-2.0.0-p247/ext/zlib $ ruby extconf.rb $ make make install これで動くようになった ついでに、Makeのときにエラーが出てたものをインストールしておく readline $ sudo apt-get install libreadline6 libreadline6-dev readline-common $ cd ~/Downloads/ruby-2.0.0-p247/ext/readline $ ruby extconf.rb $ make make install この調子で、-test-/win32/dln -test-/win32/fd_setsize curses dbm dl/win32 fiddle fiddle/win32 gdbm tk tk/tkutil win32ole
https://w.atwiki.jp/masshoi/pages/442.html
「Now Loading!!!!」は、『NEW GAME!』の関連楽曲。歌唱はfourfoliumメンバー1。 基本情報 配信初出日 2016年7月27日 CD初出日 2016年7月27日 アーティスト fourfoliumメンバー1 発売元 KADOKAWA 作詞 烏屋茶房 作曲 和田たけあき 編曲 やしきん guitar 和田たけあき bass 工藤嶺 (F.M.F) drums 山内"masshoi"優 all other instruments やしきん (F.M.F) programming produced by 若林豪 (KADOKAWA) recording directed by 中山雅生 recorded by 上條直之 (F.M.F)山田和範 (Sound Inn Studios) mixed by 上條直之 (F.M.F) recorded at Sound Inn Studios mixed at mastered by 滝口博達 mastered at parasight mastering ※初出CD準拠 収録CD 発売日 商品名 DiscNo. TrackNo. 楽曲名 歌唱 2016年7月27日 『Now Loading!!!!』通常盤:ZMCZ-10786 - 1 「Now Loading!!!!」 fourfoliumメンバー1 3 「Now Loading!!!! (instrumental)」 - タイアップ テレビアニメ『NEW GAME!』ED主題歌 脚注 メンバー メンバー1:涼風青葉(高田憂希)、滝本ひふみ(山口愛)、篠田はじめ(戸田めぐみ)、飯島ゆん(竹尾歩美)
https://w.atwiki.jp/rcdd/pages/18.html
10-1-600.jpg 以下メーカーホームページの説明文より引用 Calandra Racing Concepts changed the face 12th Scale racing with the release of the beautiful Gen-X racer. Tenth scale racers can now also have the same professional quality race car as TeamCRC releases its new 10th scale racer the GenX10. The GenX10 is the result of continuous refinement and product development at Calandra Racing Concepts. The GenX10 has it roots from CRC s previous 10th scale on-road racer the Pantoura, but this latest kit has undergone a revolutionary ground up redesign to produce a well-balanced, lightweight and highly adjustable tenth scale racer, the GenX10. Move over Touring Cars and make room for CRC s Pro10 2WD Sports Car Racer. The the GenX10 also features CRC s new Pro-Strut molded front end, best in the business New X-pod rear end, super low CG with "open pod" design that accepts brushed and bulky brushless motors with ease Bottom loading quick-change battery tray that fits any battery style, LiPo or NiMH Designed to fit 200 mm Sport Car bodies (such as the many HPI offerings) as well as traditional GTP bodies Adjustable track width 200-235 mm Adjustable wheel-base (allows for tuning and setup for NASCAR bodies) 235 mm width optional kit will be available soon Flush mount transponder mounting system Ultra low CG and centralized mass engineering for exceptional handling and precise steering 簡単な翻訳(超意訳、自信なし) Calandra Racing Conceptsは美しいGenXをリリースすることにより1/12レースシーンを一変させました。TeamCRCは1/10サイズのGenX10をリリースすることにより1/10レースシーンも1/12と同様の変化を起こします。 GenX10はCalandra Racing Conceptsの継続的な研究開発の成果です。GenX10ののルーツはロードレーサーのPantouraですが、GenX10はバランスや軽量化、調整可能な項目等を突き詰めた結果、設計を新たにしています。ツーリングカーとは違うGenX10という 2WD Sports Car Racer はいかがでしょうか? GenX10の特徴: フロントはGenXで採用されたCRC プロストラットを採用しています、 リアエンドは低重心でX-Podと、OpenPodデザインが採用され、ブラシレスモーターの搭載も容易です。 シャシー下面からトレイを使用してバッテリーを搭載するスタイルはNiMHからLiPoまで様々なバッテリーをサポートします。 200mm幅の1/10スケールボディが使用可能です。 トレッドは235mmまで延長可能です。 ホイールベースの調整の可能で、NASCARボディの搭載や調整も可能です。 235mm拡張キットは近日発売予定です。(訳注:現在は販売されています。) トランスポンダーの搭載も可能です。 ハンドリングと操作性向上の為に徹底的な低重心化とマスの中心化が図られています。 ※ちなみに写真は多少古い(?)のか、市場に出回っている現行品とは見た目が若干異なります。
https://w.atwiki.jp/fffkindle1212134/pages/32.html
Code Geass 17. Knight The young Britannian Lelouch is faced with a choice between two divergent paths One leads to the past, in a quest to find his mother s enemies. The other way takes him to the future, where he will create a world in which his little sister Nunnally can live happily. Only Lelouch can choose which direction he will go. Will he follow the path that ends in destruction of the world, or will he travel the road to building a bright new one? STAGE 17 KNIGHT Suzaku... I finally understand. You... Suzaku, what Mao said... Did you do it? Did you kill your own father? I see. It s not just your secret, is it? Lelouch, I... Kirihara -- I think that was the old man s name. He claimed that Prime Minister Genbu Kururugi killed himself in order to stop all of those in his cabinet who called for do-or-die resistance. The story was a necessary one, for Japan and Britannia. Thank you for that. Frankly, he s at odds with himself because he used to be different. He never placed any importance on another person. It was tough enough for me to kill my half-brother. If Suzaku killed his father when he was only ten years old, he s been carrying that burden around all these years? C mon, Lelouch, quit moving around, will ya?! O--oh, sorry guys. No, your sight line was lower. Like this? No. Too far, a little higher! Good? Now your expression s totally different from when we started! This was like this, that went kinda like that, and this was here! There! That s not how he was! I liked the frowny face more! C mon, everyone! I prefer him looking clueless! Shirley, don t we have math for first period? Don t you remember, it s Art Week. Prince Clovis had declared that. We will open Art Week with the dedication of the Clovis Memorial Museum of Art. You, Princess Euphemia, will select the first place winner from among these submitted works. Oh, this one s nice! I particularly like this painting. It s regrettable that our investigation revealed that the artist happens to be one-quarter Eleven. Perhaps it shouldn t have been displayed here in the first place then. Well, it s a delicate balance with our public. Anyway, take a look at that painting right there. It was painted by the son of Marquess Nicolai. Octopus hot dogs... Hmm, that girl... Excuse me. Hmm?! No, these aren t what you think! We have visitors. They also have an introduction from Kyoto. You re the... Four Holy Swords. I ll get straight to the point here we ve come to you today to ask for your help. How do you mean? Lt. Col. Tohdoh has been apprehended. He sacrificed himself so that we could escape. I see. We ll help them. You sure? The Black Knights fight for the cause of justice. There s nothing odd about that. We ll use assembly method B-13. Take the section Knightmares via course 18. You can have Diethard handle it. Also alert those who are to rendezvous with us. Sorry I didn t meet with the Chinese Federation. Don t worry about it. I ve revised all our plans with them. Making any chances in your usefulness to me will only hinder the plan. Besides, two chess pieces I ve been wanting will be mine today. And with any luck, a third... Today, Kyoshiro Tohdoh will be executed. I won t be present for that now that the Japan Liberation Front is defunct. Right. No, wait. Let him handle the execution. Viceroy! Sorry to summon you like this. How s everything at the museum? The dedication is later on. Of greater importance though, the N.A.C. reported there was unrest in Ishikawa. Probably backed by the E.U. or the Chinese Federation. And there have also been sightings of Gun-Rus. (ガン・ルゥ 鋼髏 Gang Lou) Still, it s our chance to bring Hokuriku under control. I ll leave Darlton here while I m gone. If anything happens, consult him. Also, concerning what we spoke of earlier... You may choose any of them to be your knight. They re all excellent soldiers from respected families. Yes, the pond does freeze solid in the winter. Although Big Brother scolded me once when he caught me skating on it. We had a pond too at the Kururugi Shrine. It was small, but I used to catch zarigani... I--I mean, crawdads, all the time. You would catch crawdads? How? It s simple -- you just tie a string to a frog s back leg. Huh? Frog? As in those things that sit on lily pads and go croak? Yeah, but in Japanese they go "kero-kero, kero-kero." Huh? Kero? Yup. Kero-kero! If things continue at this pace and keep proceeding according to plan, I won t be able to stay with Nunnally any longer. That affair with Mao also drove home the fact that I need someone to protect my little sister. Whoever that person will be, if Nunnally is the one who gives him a reason to live, then... L--Lelouch? I need to... tell you-- Suzaku! Lloyd says it s urgent! Who s that? She s a soldier. Friends of yours? Yes. I m sorry, but I need to pull Suzaku away from you for a while. Uh, but I m... Don t worry. I told you it s all right. That guy isn t going to come back here. Right. See you then. Please come again, Suzaku. I will. Suzaku! Huh? When you return, there s something that I want to discuss. It s an important matter. Uh-oh. I m nervous. I ll talk to you when I get back. Well, it seems that Suzaku s really important to them. I m glad. Nunnally... you seem fond of Suzaku. Am I right? I adore him. But of course, I love you more than anyone, Lelouch. I see. Shirley, I m gonna go on ahead. Oh, just wait up, will you? Oh, great... Hm? Sub-Viceroy, Is it true that no Eleven companies were used in the construction of this museum? W--well, with regard to that question, I-- We re looking into it right now, so we have no answer at this time. Idiot! Why bother asking Princess Euphemia about politics?! Keriman from Interstate. Your Highness, there have been rumors lately that you re close to choosing your knight. Uh, um, a knight. Yes, well, you see, I m-- Ladies and gentlemen, we ask that you please limit your questions to those concerning the museum only. I told you not to bunch up all the hydro lines in one place! That s why I said it was different from a Burai! Are you sure it s a good idea to throw in with the Black Knights? Can you think of any other way to rescue Col. Tohdoh? There s also what Kyoto said, that they d lend us the new models. Still, their principles seem to be somewhat off. We re not ethnocentric, but after all, you already know that. We can worry about the details after we ve rescued the colonel. I understand. But no matter where Tohdoh may be, it s the place I belong. Look, just stuff em in and close the lid for crying out loud! It s almost time to move out! Take your time and treat it with the utmost care! It was far more fragile than any of you when I gave birth to it! Huh?! Who the hell are you?! I am its mother! You arrived on time. Are you Zero? It s a pleasure. I ve heard a lot of things about you. The pleasure is all mine, Rakshata. I ve been reading about you on the net for some time now. You have? The articles relating to medical cybernetics. I do hate talking about the past. Anyway, here. Hm? A souvenir from Kyoto. Excuse me, is this really going to improve the interfacing system? No, of course not. Huh?! It s going to improve your life expectancy. I just heard they changed your executioner. It s going to be Warrant Officer Suzaku Kururugi. You ought to be glad it s someone you know. What? You mean my signature again? Even though Princess Cornelia ordered this, there are still some formalities to be followed. A change of executioner is the most exceptional circumstances. What was that?! What happened?! Good. Now we re free of hellish paperwork. Colonel, we re coming to save you! These Gekkas are awesome! Way superior to the Burais! Yeah, you got that right! Hmm... You think the sub-weaponry s linkage isn t tight enough? No, however I suspect it might be the line. I m reading a 0.7 variance to specs. Obviously those old codgers in Kyoto need to supply us with better parts. Hmm? My superiors have just ordered that you be unofficially executed before you re busted out of here. Any last words? It s a life I gave up once before. It s worth nothing. In that case, I ll claim your life for myself! What the?! Zero. Kyoshiro Tohdoh, the only Japanese who, seven years ago, brought the mighty Britannian forces to their knees in defeat. You mean Itsukushima? You want me to perform a miracle for you as well? That was no miracle. It ended in victory because it was based on excellent intelligence work! That s why I want you. I pledged my loyalty to Gen. Katase. Now that he s dead, I wish to die too. Don t be a coward! What?! You must take responsibility! Responsibility for the miracle that you made! The Area 11 s resistance movement is more intense than that of any other Area because Japan surrendered before exhausting all of its military strength. You failed to continue the great hope known as the Miracle of Itsukushima! You re saying it s my fault? Yes. People grasp at illusions because they re desperate for miracles. Why else has there been such rampant use of Refrain? You must endeavor! To the bitter end beyond all that s decent, and then you can die! Till the name of Tohdoh the Miracle has grown ragged and tattered! You re telling me that the Japanese people can t accept their defeat until then? Till now they had to accept it. However, now that I m here there s hope because I can likely turn their dreams into reality. Heh... And now for the highlight of today s events, Princess Euphemia will select the grand prize winner. The work upon which you place this flower will be deemed the winner, Your Highness. Colonel! Welcome back, Col. Tohdoh! Thank you. You ve all worked so hard for this. No effort at all, sir. Cooperate with Zero! Eliminate the remaining forces here! Roger! Now all the tasks at hand have been cleared, and Nunnally s knight has already been chosen. That leaves only-- Damn! What s he doing here?! Well, how convenient -- the one problem left to contend with has come here on his own. Please, Your Highness. It s time for you to decide. We can t wait any longer. I know, but I... But I... Hello? Escaped? They re skilled fighters. Oh, my... Aren t those new enemy models amazing? However, Ms. Cécile... Yes? In hindsight, it s certainly quite fortunate that the Lancelot s trailer is our primary means of transport. No, it s because you spent our entire budget on the Lancelot itself. That s hindsight. That s it? The white Knightmare that s given such trouble to Zero? Huh? Yeah. Hmm... That s crazy! One against seven? But that Lancelot Knightmare is holding its own! Whoa, it dodged it! Wow, and again! You show em, White Knight! Listen, send in everything we ve got. Then support Kururugi, and make him report that we re wiping out the terrorists. Zero, do you have any data available on this unit? Possibly. However, I want you to do exactly as I say. Ah, very well. I ll defer to you in this. All units, give him distance! Its speed and maneuverability are truly astonishing. Nevertheless... Its movements follow a predictable pattern! Its initial attack is always straight on! It never feints that first move! Once you dodge that attack, he immediately moves to avoid your offensive! Check the data I m sending you! S-5-7! Hey. He s really doing it. Right! So now the next move he makes will be... falling back to the rear! Coordinates X-2-3! And with that... check! I know this! Who dares to anticipate my moves? No matter. Damn it! He doesn t have an ejection block on it! What? You mean we didn t install one?! No way... Is that really you... Suzaku?! Wha--?! Huh?! Zero, what now?! Give us our next instructions! Zero! All this time it was him...? Suzaku...! Hey, isn t that?! That s Suzaku Kururugi! The one accused of killing Prince Clovis?! That s enough! Turn off the monitor, now! Wait, please! What?! I d like to watch it to the end! Good, I can still pilot! Do not do this, Suzaku! Col. Tohdoh! So then... you wanna live more than you wanna follow your own principles?! Do I disappoint you? Very well, then keep to your schedule and execute me! But why...? Why are you there... You can t be because you... have to be by Nunnally s side! What s wrong?! That s the reason you re here, isn t it?! You have become a cowardly boy who s afraid of altering the status quo! Denying everything in our society is pointless! Once I make them trust me, I ll have the power to change it! You re serious?! I m dead serious! Then you must continue down that path! Regardless whether you win or lose, you will achieve nothing unless you re prepared to sacrifice everything! And that goes for countries as well as individuals! Right! Zero, do we do?! Capture him, or--? Zero! We re destroying the white Knightmare! Got that? Wait for Zero s orders! We re not waiting! Capt. Senba, take Spinning Life or Death Formation! Roger! Don t do it! No, wait! Stand down! Don t worry! It s a synchronized four-way attack! He ll never dodge it! Mmm, Kururugi, release the harken booster quickly! The password s my favorite food! It can t--! No way! Huh?! Are you okay? Interesting fighting style he uses! This time, Asahina, circle around to the left! Stop it! Zero?! We ve done enough fighting for now. We ve achieved our objective here. Use escape route 3! Withdraw immediately! An unwinnable battle s not the same as a lost battle. You seem to be very aware of that, Zero. Wait! Now releasing chaff smoke! Look, they re running! He fought them off?! The Black Knights?! Suzaku... well done. Damned traitor! Why won t he follow them?! Cuz they re Elevens, like him. Of course! I thought one against seven was a bit much to swallow. Princess Euphemia? All of you! I ll now answer the question you asked me earlier! You had inquired as to whom I would select to serve as my knight, correct? The knight I had chosen will be the young man you see before you Warrant Officer Suzaku Kururugi! Tohdoh, I--I m your... I am your foe! Hey, isn t Zero coming out? No. I called him, but he won t answer. What s wrong? Suzaku Kururugi... is he my enemy? The man who I intended to be Nunnally s protector is now Euphemia s knight. The Black Knights stand ready for battle, but am I ready for this? Must I carry on regardless? So that I can reshape the world into what I want it to be.
https://w.atwiki.jp/shinobu2/pages/52.html
for文やwhile文ではまず条件式を評価してから1回目の繰り返しを行います。その為、場合によっては一度も繰り返し処理を行わないことがあります。それに対してまず繰り返しを一度行ってから条件式を評価したい場合に利用されるのがdo..while文です。書式は次の通りです。 do{ 実行する文1; 実行する文2; ... }while (条件式); do..while文ではまず「{」から「}」のブロック内に記述された文を実行します。そして条件式を評価しtrueだった場合には再度ブロック内の処理を行いますがfalseだった場合にはdo..while文を終了して次の文へ処理が移ります。 注意すべき点は最後にセミコロン(;)を付ける必要がある点です。これはfor文やwhile文と異なるため注意して下さい。 繰り返しで実行される文が一つだった場合には「{」と「}」を省略して次のように記述することもできます。 do 実行する文; while (条件式); ただ分かりにくくなるので省略はしないほうがいいかもしれません。 while文とdo..while文は必ず1回はブロック内の処理を実行するかどうかだけの違いです。次の例を見てください。 int i = 7; do{ System.out.println("i = " + i); i -= 4; }while(i 0); この場合は次のような処理の流れとなります。 1)i = 7; 2)「i = 7」を画面に出力 3)i -= 4; 4)条件式を評価。iは0よりも大きいので繰り返しを実行 5)「i = 3」を画面に出力 6)i -= 4; 7)条件式を評価。iは0より大きくないので繰り返しを終了 今回は対象となる数値をまず表示し、そこから順に4を減算していき0よりも小さくなったら終了するというものです。もしもwhile文で次のように記述してしまうと間違いです。 int i = 7; while(i 0){ System.out.println("i = " + i); i -= 4; } これは対象が正の数だけの場合であれば同じ結果となりますが、負の値を対象にした場合は対象となった値が一度も表示されることなく終了してしまいます。よってwhile文で同じ動作をさせるには次のように記述しなければなりません。 int i = 7; System.out.println("i = " + i); while(i 0){ i -= 4; System.out.println("i = " + i); } do..while文で記述できることは基本的にwhile文でも記述することができますが、do..while文を使った方が簡潔に記述できる場合があります。そのような時にdo..while文を使って下さい。 わからないところがあったら以下に書き込んでください。 test -- (test) 2010-12-10 22 01 03 テスト -- (test) 2010-12-10 23 00 34 hosei -- (HOSEI) 2011-01-31 14 10 34 test -- (名無しさん) 2011-01-31 14 10 53 名前 コメント すべてのコメントを見る
https://w.atwiki.jp/sami1127/pages/20.html
mavenでテスト走らせると何だかよくわからないExceptionが出た… [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An Ant BuildException has occured The following error occurred while executing this line C \private\workspace\rental\pom-support-ant.xml 77 java.lang.IllegalAccessError tried to access method org.apache.tools.ant.launch.Locator.decodeUri(Ljava/lang/String;)Ljava/lang/String; from class org.apache.tools.ant.AntClassLoader 他の人のトコでは見れるのに、何で・・・orz 調べてみたらこんなの発見。 As you can see in my first message, I ve got these 2 librairies |-- ant-launcher.jar |-- ant-nodeps-1.6.5.jar In fact in ant-nodeps-1.6.5.jar, there s already the .class of the ant-launcher (which was in fact ant-launcher-1.7.0) So I downloaded the ant-nodeps-1.7.0.jar (better to have the same version), and removed the ant-launcher-1.7.0 Then I discover that ant-launcher-1.7.0 classes were nt in nodeps 1.7, so I readded it, and after some runtime problems due to my jvm versions, all is right, and I can use Groovy as I want よくわかんないけど、とりあえず言われたとおりant-launcher-1.7.0消してant-nodeps-1.7.0.jar入れみたりしたけど、直らず。。何で。。 ということで諦めて詳しい方に伺ってみたら、mavenのversionが他の人と私と違うから出てたらしい。 私が2.0.10。正常に動く環境だと2.1.0。 ぬぉ…linuxでやってみたらちゃんと動いた。ぉー。 でもwindows+Eclipseでは同じエラーが出続ける…なぜ… まぁlinuxで出来たからいいか。