The Polaris Dawn crew is back on Earth after a historic mission
The Polaris Dawn crew is back on Earth after a historic mission
ãµã¤ãã®æ§ç¯ãä½åã®è²©å£²ãããã°ã®æ稿ããã®ä»ã«ããã¾ãã¾ãªæ©è½ãããã¾ãã ãã°ã¤ã³ ãµã¤ããã¯ãããã éå ¬éãµã¤ã ãã®ãµã¤ãã¯ç¾å¨ãã©ã¤ãã¼ãè¨å®ã«ãªã£ã¦ãã¾ãã
2013 å¹´ 8 æ 19 æ¥ æ¥æ¬ã±ã³ã¿ããã¼ã»ãã©ã¤ãã»ããã³æ ªå¼ä¼ç¤¾ å½ç¤¾ã¢ã«ãã¤ãå¾æ¥å¡ã«ããä¸é©åãªè¡çºã«ã¤ãã¦ã®ãè©«ã³ã¨ãç¥ãã ãã®ãã³ãããã¶ãããé«äºæ¸åºï¼æ±äº¬é½ï¼ãã®ã¢ã«ãã¤ãå¾æ¥å¡ãåºèå ã§ä¸é©åãªè¡çºãè¡ ããã¤ã³ã¿ã¼ãããä¸ã¸ã®åçæ²è¼ãããäºå®ãå¤æãããã¾ãããã客æ§ã«ã¯å¤§å¤ä¸å®ã»ä¸ å¿«ãªæããããã¦ãã¾ãã¾ãããã¨ãã¾ããå¤å¤§ãªããå¿é ãè¿·æãããããã¾ãããã¨ãæ·± ããè©«ã³ç³ãä¸ãã¾ãããã®æ§ãªè¡çºã¯é£åãæ±ãç«å ´ã¨ãã¦æãã¦ãã£ã¦ã¯ãªããªãè¡çºã§ ããã¨æ·±ãåçãã¦ããã¾ãã 社å 調æ»ã«ãããç»åãæ®å½±ãããã®ã¯å¹³æ 25 å¹´ 5 æ 9 æ¥ã®éåºå¾ã§ãããå»æ£é£æã使ã ãããã¨ãå¤æãã¦ããã¾ããé£æãã客æ§ã«ãæä¾ããããã¨ã¯ä¸åãããã¾ããã§ããã å°ãå½è©²ã®ã¢ã«ãã¤ãå¾æ¥å¡ã«ã¤ãã¾ãã¦ã¯ã社å 調æ»çµæãè¸ã¾ããå¼ç¤¾ã®ç¤¾å è¦å®ã«åºã¥ ãå³æ ¼ãªå¦
1. mockito ã®æºå mockito ã®ããã¸ã§ã¯ããã¼ã¸ï¼https://code.google.com/p/mockito/ï¼ã«è¡ã£ã¦ãææ°ã®ï¼ããã§ã¯ mockito-1.9.5.zipï¼ããã¦ã³ãã¼ããã¾ãã ãã¦ã³ãã¼ããã zip ãå±éãã¦ãä¸ã« jar ãã¡ã¤ã«ï¼ããã§ã¯ mockito-all-1.9.5.jarï¼ãå ¥ã£ã¦ãããã¨ã確èªãã¾ãã 2. dexmaker ã®æºå Android 㧠mockito ã使ãã«ã¯ dexmaker ãå¿ è¦ã§ãã dexmaker ã®ããã¸ã§ã¯ããã¼ã¸ï¼http://code.google.com/p/dexmaker/ï¼ã«è¡ã£ã¦ãdexmaker-1.0.jar 㨠dexmaker-mockito-1.0.jar ããã¦ã³ãã¼ããã¾ãã
å ã®è¨äºï¼ããããªãAndroid Mockï¼ã§æ¸ããéããJavaã«ãããã¢ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã¨ãã¦äººæ°ã® mockito 1.9.5 rc1以éã§ãDalvikä¸ã§ã®åä½ãæ£å¼ã«ãµãã¼ãããã¾ããã mockitoã®å°å ¥æ¹æ³ Android Mockã¨æ¯ã¹ã¦ãã¨ã¦ãç°¡åã§ãã Downloads - mockitoããã1.9.5 rc1以éã®jarãã¡ã¤ã«ï¼å·çæç¹ã®ææ°ã¯mockito-all-1.9.5.jarï¼ããã¦ã³ãã¼ãããããã¸ã§ã¯ãã«è¿½å ãã¾ãã ãã¹ãããã¸ã§ã¯ãã®properties -> "Java Build Path" -> "Libraries"ã¿ããéãã"Add JARs..."ãã¿ã³ãã¯ãªãã¯ãã¦ãã¦ã³ãã¼ãããjarãã¡ã¤ã«ãé¸æãã¾ãã Downloads - dexmakerãããdexmakerã¨dexmaker-mockitoã®2ãã¡ã¤ã«ãã
public class MyClassA { MyClassB mMyClassB; public MyClassA(MyClassB b) { mMyClassB = b; } public void hoge() { if (mMyClassB.getPriority() > 0) { handleHighPriority(); } else { handleLowPriority(); } } public void handleHighPriority() { ... } public void handleLowPriority() { ... } } public class MyClassB { private int mPriority; public int getPriority() { return mPriority; } // å é¨ã®å¦ç㧠mPriority
ä»å説æããã®ã¯3çªç®ã®Activityã®åä½ãã¹ãã§ãã 2çªç®ã®InstrumentationTestCaseã§ã¯ã©ã¹ã®åä½ãã¹ããè¡ãæ¹æ³ã¯ãã¡ããåèã«ãã¦ãã ããã æºå ä»åã¯åä½ãã¹ããéãããã®mockã¨ãã¦mockitoã使ãã¾ãã mockitoã¨ã¯ãJavaã®éçºã§ããå©ç¨ããããã·ã³ãã«ãã¤å¼·åãªmockã©ã¤ãã©ãªã§ãã Androidã®éçºã§mockitoã使ãããã«ã¯mockitoã®ã©ã¤ãã©ãªãåã«ã¯ã©ã¹ãã¹ã«è¿½å ããã ãã§ã¯åãã¦ãããªãã®ã§ãdexmakerã¨ããã©ã¤ãã©ãªã使ç¨ãã¾ãã dexmakerã¨ã¯ android junit testã§mockitoã使ãããã®ãµãã¼ãã¯ã©ã¹ãå ¥ã£ã¦ããã¨ãã¡ãã«æ¸ãã¦ããã¾ãã mockitoã ãã§ãã³ã³ãã¤ã«ã¯éãã®ã§ãããå®éã«mockitoã使ãã¨Exceptionãçºçãã¦ãã¾ãã®ã§ãdexmarker
βçãããã¯ã¼ã¢ãããã¦å ¨39ç« ãæ£å¼çã«ç¸å¿ããããªã¥ã¼ã ã«ãªãã¾ããã10/19åå¾ã«æ´æ°äºå®ã§ãï¼ç¾å¨ã¯Î²çã販売ä¸ã§ãï¼ã 10æ19æ¥ æ£å¼çÂ ï¼ Î²çã®å ¨21ç« ã«å ãã18ç« åã®æ°è¦æ¸ä¸ããã追å ãã¾ãã βçããæ£å¼çã¸ã®ãã¼ã¸ã§ã³ã¢ããã¯é人åºçä¼ãã¾ã®Webãµã¤ãããç¡åã§ãã¦ã³ãã¼ããã¦ããã ãã¾ãã ã¾ãåããã¦ç´ã®æ¸ç±è²©å£²ã決ã¾ãã¾ãããã¤ã³ãã¬ã¹ã¸ã£ãã³ãã¾ããå¹´å çºå£²äºå®ã§ãã ï¼ç´ã®æ¸ç±ã§ã®æ ¡æ£ãç·¨éçµæãé»åæ¸ç±çã«ãåãè¾¼ãã ã¢ãããã¼ããè¨ç»ãã¦ã¾ãããã®éãé»åæ¸ç±ã«ã¯ä¸é¨ã®ç´é¢æ§æï¼ç´ã®ã¿ã®ä»é²ãç´¢å¼ãªã©ï¼ãåãè¾¼ã¾ããªãå¯è½æ§ãããã¾ãï¼ Effective Android æ£å¼ç ç« æ§æ
ç§ã¯ã¤ãæè¿ã¾ã§åéããã¦ãã¾ããã ããã®ãã¼ã¸ã«æ¸ãã¦ãããããªæ¹æ³ã§ãä¸æ§åå¸ããæ´æ°ãå¾ãããã¨ã int random(int n) { return (int)(( rand() / (RAND_MAX + 1.0) ) * n); } ãã®æ¹æ³ãä¸è¦ããã¨å®ã«ä¸æ§åå¸ãå¾ããããã«è¦ãããã§ãããã ã©ãããæèåè·¯ãéã£ã¦ãããã¨ããã®ãèªå·±åæããã¨ã次ã®ãããªæãã§ãã 1. rand() ã§ã¯ 0ãRAND_MAX ã®ã©ã³ãã ãªæ´æ°ãå¾ãããã 2. ããã RAND_MAX + 1 ã§å²ãã¨ã[0, 1) ã«ä¸æ§åå¸ããå®æ°ãå¾ãããã 3. [0, 1) ã®ä¸æ§ãªå®æ°ã n åãã¦å°æ°ç¹ä»¥ä¸ãåãæ¨ã¦ããã0 ãã n-1 ã«ä¸æ§åå¸ããæ´æ°ãå¾ãããã ããã®ç½ ãªã¨ããã¯ã1 ã¨ï¼ç¹ã«ï¼3 ãæ£ããã¨ããã¨ããã ã¨æãã¾ãã ãã ã2 ããã¦ãã æãã£ãããã¦
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}