tech
Kotlin Advent Calendar 2013 22æ¥ç®ã®ã¨ã³ããªã§ãã Javaã®ã©ã¤ãã©ãªä½¿ããã Kotlin使ã£ã¦ã¦æ®éã«ãµã¼ããã¼ãã£è£½ã®ã©ã¤ãã©ãªä½¿ãã¾ããããä¾ãã°Joda-Time使ã£ã¦ãããªæãã§ã fun main(args: Array<String>) { val today = LocalDate.now() val first = t</string>â¦
2013/11/11 ããããæ¸ãå¿ãã¦ããã¹ã©ã¤ãå ¬éããããããã®ã§è¿½è¨ãã¾ããã åºèª¿è¬æ¼-2 2013 ã¨ã³ã¿ã¼ãã©ã¤ãº Java æåç· æ¥æ¬ãªã©ã¯ã«ã®å¯ºç°ä½³å¤®ããã®åºèª¿è¬æ¼ã GlassFish, JavaEE 7, Project Avatarã®è©±ãã¡ã¤ã³ã ã£ãã GlassFish GlassFish4ãâ¦
è¨æ¶ã®æ´çã®ããã«ã¾ã¨ãã ã¯ããã¯ãæ®æ®µããèªãã§ããããã°ã«Java8ãGroovyãGradleãScalaãPlayFrameworkã¨ãããã®è¾ºãã®åèªãããè¦ãããã«ãªã£ã¦ãããããèå³ã湧ããã®ã ã¨æãã¾ããæåã¯ã¨ã£ã¤ããããããªGroovyãé¸ã³ã¾ããã Groovy â¦
é©å½ã«ããã®ããããªãå¦çãçç£ãã¦ããããããããªããã¨ã«ãªã£ã¦ããã£ãã®ã§ã¡ã¢ã£ã¦ããã ä¸è¨ã®å®è¡çµæã¯ä»¥ä¸ã®ããã«ãªãã parent null ChildInitAtMemberDeclãéã³ã³ãã¤ã«ããã¨ä»¥ä¸ã®ããã«ãªãã class ChildInitAtMemberDecl extends Parâ¦
ã³ã³ãã¤ã«çµæã®éãã½ã¼ã¹ ä¸è¨ã®ã½ã¼ã¹ãJDK6ã®javacãJDK7ã®Javacã§ããããã³ã³ãã¤ã«ããã¨ãçµæãéããã¨ããããã JDK6 D:\dev\Java>javac.exe CompileResultDiffTest.java D:\dev\Java> JDK7 D:\dev\Java>javac.exe CompileResultDiffTest.java â¦
ã¨ããããã¤ã³ã¹ãã¼ã«ãããã® JRE Java7 : http://java.com/ja/download/ Java6 : http://java.com/ja/download/manual_v6.jsp JDK Java7 : http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html Java6 : http://www.â¦
è·å ´ã®ãµã¼ããSunOSãªãã ãã©ã«ã©ã¼åã§ããlsãå ¥ã£ã¦ãªãã®ã§å°ã£ãã ã¨ããããã§ã"-F" ãªãã·ã§ã³ã§ãã¡ã¤ã«åã®ãã¨ã«ä»å ãããè¨å·ããããã£ã¬ã¯ããªï¼å®è¡ãã¡ã¤ã«ï¼ã·ã³ããªãã¯ãªã³ã¯ï¼ãã以å¤ãå¤å¥ã§ããã®ã§ãããperl -peã§ç½®æãã¦ç¡çâ¦
ã¡ãã£ã¨ã¤ã¾ã¥ããã®ã§ã¡ã¢ã java1.6è¨å®ã§ä½ã£ãåçWebããã¸ã§ã¯ããã1.5ã使ãããã«å¤æ´ãããã¨ããããããã¸ã§ã¯ãã»ãã¡ã»ããè¨å®ç»é¢ã§å¤æ´ã§ããªãã£ãã ãåçWebããã¸ã§ã¯ããã¢ã³ã¤ã³ã¹ãã¼ã«ã§ãã¾ãããã¨ããªãã¨ãã ããããã¨ãã¯â¦
ä»æ¥ç¥ã£ããã¨ã CREATE TABLE emp ( id INT AUTO_INCREMENT PRIMARY KEY , name VARCHAR(40) NOT NULL ); ã¨ããããã¼ãã«ã®æã«ãä¸ã®SELECTæã®LIKEå¥ã¯ã±ã¼ã¹ä¾åã«ãªãã SELECT id, name, CONCAT(emp, id) FROM emp WHERE CONCAT(emp, id) LIKE '%a%â¦
ãããã°ã¨ãã®ã¨ãã¨ããDB使ããããªãã¨ãç¨ã«ã ArrayAdapterãç¶æ¿ãã¦æ°ããã¯ã©ã¹ä½ã£ã¦getViewãªã¼ãã¼ã©ã¤ããã¦å¤è¿½å ãã¦â¦ã£ã¦ããã®ã¯ããã©ãããã ããã§ãSimpleCursorAdapterã®å¼æ°ã«ä½¿ããDBã®ã¯ã¨ãªçµæãæ ¼ç´ããCursorãæ¬ä¼¼çã«ä½æãâ¦
ååã¯SimpleCursorAdapterãç¶æ¿ãã¦æ°ããã¯ã©ã¹ãä½ã£ã¦ããã©ãlistenerãããªããªãããã¾ã§ããªãã¦ã大ä¸å¤«ã main.xml <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" /> list_row.xâ¦</listview>
SimpleCursorAdapterãç¶æ¿ããã¯ã©ã¹ãä½æãã newViewã¡ã½ããããªã¼ãã¼ã©ã¤ããã å¼æ°ã®Viewå¤æ°ï¼ãã¶ããªã¹ãè¡ã®ã¬ã¤ã¢ã¦ããå ¥ã£ã¦ãï¼ããwidgetãçæãã widgetã«Listenerãã»ãããã public class MyCursorAdapter extends SimpleCursorAdapâ¦
ãã¨ãã°ã <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="<color>" /> </solid></shape>