PERLã«ã¦2次å é åã®åçãªä½ææ¹æ³ãæãã¦ãã ããã
PERLã«ã¦2次å é åã®åçãªä½ææ¹æ³ãæãã¦ãã ããã
â ãã®è¨äºã§åãä¸ãã¦ãããããã¯ãã¤ã©ã¤ãâ ãªããã¡ã¿ãªãã¸ã§ã¯ããèªåèªèº«ã§ä½¿ãããªããããã«ãªãã¨ãæ¥å¸¸ã®ããã°ã©ãã³ã°çç£æ§ã大ããåä¸ããã®ã? ãªããã¡ã¿ãªãã¸ã§ã¯ãæè¡ã使ãã¨ãåæ£ãªãã¸ã§ã¯ããRailsãDIãORãããã³ã°ãWebãµã¼ãã¹ãªã©ã®ã大ããçç£æ§ãåä¸ãããä»çµã¿èªä½ãèªåã§ã¤ãããã®ã? C#ã®ã©ã®ã¡ã¿ãªãã¸ã§ã¯ãæ©è½ãã©ã®ããã«ä½¿ãã°ãç°¡åã«ãC# on Railsããä½ããã®ã? ãªããRuby on Railsãã¯é³è åãã¦ãã¾ãéå½ã«ããã®ãï¼ ãRuby on Railsããé³è åãããã¢ã¼ããã¯ãã£ã¨ã¯ã©ã®ãããªãã®ãªã®ã? â æ§æâ ã¾ããRuby on Railsã¨åæ§ã®ãã¬ã¼ã ã¯ã¼ã¯ããC#ã§ä½ã£ãã¨ããããã©ã®ããã«ãªãã®ãã¨ããä¾é¡ãéãã¦ãã¡ã¿ãªãã¸ã§ã¯ãæ©è½ãã¤ã¾ãããªãã¬ã¯ã·ã§ã³ãã«ã¹ã¿ã å±æ§ãCodeDOMããã¼ãµã¸ã§ãã¬ã¼
John Hughes, Institutionen för Datavetenskap, Chalmers Tekniska Högskola, 41296 Göteborg, SWEDEN. [email protected] ãã®æ¥æ¬èªè¨³ã¯åèè ã®æ¿è«¾ãå¾ã¦å±±ä¸ãããã«å ¬éãããã®ã§ãã ãã®è¨³æã«ã¤ãã¦ã®ã御ææãªã©ã¯å±±ä¸ä¼¸å¤«(nobsun .at. sampou.org)ã¾ã§ãããã ãããã¾ãã 翻訳æçµæ´æ°æ¥ : 2011-09-17 åæ "Why Functional Programming Matters" æ¥æ¬èªè¨³PostScript ãã®è«æã¯1984年以æ¥ä½å¹´ãã®ããã Chalmers大å¦ã®ã¡ã¢ã¨ãã¦å覧ãããã 1989å¹´ã¨1990å¹´ã«å¹¾åãæ¹è¨ãããã®ã[Hug89]㨠[Hug90]ã§ããããã®çã¯ãã¨ã®Chalmer大å¦ã®ã¡ã¢ ã®nroffå稿ããã¨ã«
2009å¹´7æ21æ¥ ã¡ã¿ããã°ã©ãã³ã°ãã¿ã¼ã³ (1) ç¹ç°ã¡ã½ãã ãRubyã«ãããã¶ã¤ã³ãã¿ã¼ã³ãï¼ã©ã¹ã»ãªã«ã»ã³èããã¢ã½ã³ã»ã¨ãã¥ã±ã¼ã·ã§ã³åï¼ã®ä¾ãPythonã«å¤æãã¦æ¸ãã¦ãã¾ãã ç®æ¬¡ Rubyåããã¶ã¤ã³ãã¿ã¼ã³ãã®ï¼ã ã¡ã¿ããã°ã©ãã³ã°ã¯åçè¨èªã®å°å£²ç¹è¨±ã§ã¯ããã¾ããã éçãªC++ã§ã¯ããã³ãã¬ã¼ãããã¯ãã使ã£ã¦ã¡ã¿ããã°ã©ãã³ã°ããã¾ãã ããã¯ã¤ã¾ããã¡ã¿ããã°ã©ãã³ã°ç¨ã«å®è¡æã¨ã¯å¥ã®è¨èªãç¨æããã¨ãããã¨ã§ãã ï¼ã使ããè¨èªãã«C++(runtime)ã¨C++(compile time)ã®2種é¡ãæ¸ãã¨ããã¸ã§ã¼ã¯ï¼ãããã¾ããï¼ ããããåçè¨èªã®Pythonãªãã°ããèªç¶ã«æè»ãªè¨è¿°ãå¯è½ã§ãã ã³ã³ãã¤ã«æã¨å®è¡æã®åºå¥ãç¡ããã¯ã©ã¹ããªãã¸ã§ã¯ããããªã¹ããè¾æ¸ä¸¦ã¿ã«ãããªããªå¤æ´ã§ããã®ã§ãã¡ã¿ããã°ã©ãã³ã°ç¨ã«Pythonèªèº«ã使ã
ã¿ããªã®IoT/ã¿ããªã®Pythonã®èè ãäºåçè¿ã160平米ã®åºä»ãä¸æ¸å»ºã¦ã«å«/æ¯å/å¨/ãããã¨æ®ããã¦ã¾ããæé1000ä¸PV/150ä¸UUã®Webãµã¼ãã¹éå¶ä¸ã å 責äºé ãã©ã¤ãã·ã¼ããªã·ã¼ Pythonã®ã¡ã¿ããã°ã©ãã³ã°ææ³ã®ä¸ã¤ãã¡ã¿ã¯ã©ã¹ãã¯ï¼åå¿è ã«ã¨ã£ã¦ã¯ããªããå¼·ãã/çµé¨å¤ãããããããããããªã¢ã¤ãã ã®æå³ç¿¼ã ã¨æããåé¢ãã©ãããã°ããã/ãªã«ãã§ããããã¨ãããã¨ããªããªãç解ãã¥ããã è±èªã®ããã°ãè¦ã¦ãããï¼ã¡ã¿ã¯ã©ã¹ã®ç解ã«å½¹ç«ã¡ãããªã¡ããã©ãããµã³ãã«ãè¦ã¤ããã®ã§ï¼ç´¹ä»ãã¦ãç¬èªã®è§£èª¬ãä»ãå ãããã¨æãã¾ãã ã¡ã¿ã¯ã©ã¹ãç°¡åã«èª¬æããã¨ï¼ãæ¬æ¥ã³ã¼ããæ¸ããªããã°å®ç¾ã§ããªããããªå¦çãé»éè¡çãªå¦çã§ãªãã¨ããã¡ãããããã®ãã¯ããã¯ã§ããã³ã¼ãéã(æã«ã¯åçã«)æ¸ãããã¨ãã§ãããï¼ãã£ããããè¦éãã®è¯ãã¯ã©ã¹è¨è¨ãå®ç¾ã§ãã¾
ãã®åã®ç¶ããå é±ã®é±æ«ã«ããã¤ããã ã£ããã©ãæããªãã£ãã MeCabã§åºåã£ãåèªãåã³ã¤ãªãã - yasuhisa's blog ååã®æµãã¨ãã¦ã¯ å°éç¨èªãä¸ã¤ã®åèªã¨ãã¦åã£ã¦ããã®ã¯é£ãã MeCabã使ãã¨ç´°ãããªãããã å°éç¨èªã«ã¯åè©ã®sequenceãå¤ãã ããããåè©ã¤ãªãã¦ã¿ãã°ãããããã? ã¨ãããã¨ã§åè©ãç¹ãã¦ã¿ãã ãã¨ããã¨ãããããã¾ãã(ããã ãããã)ãid:niamãããã³ã¡ã³ããã¦ãã ãã£ãããã«"åºç¾é »åº¦ã¨é£æ¥é »åº¦ã«åºã¥ãå°éç¨èªæ½åº",èªç¶è¨èªå¦ç, 2003ã使ãã¨å°éç¨èªããã(?)ã®ãããªã¹ã³ã¢ä»ããã§ãããããªã®ã§ãããããã£ã¦ã¿ããã¨ã«ãã¾ãããã¨ããããp6ã®LR(CN)ã®ã¨ããã¾ã§ãå®è£ ããã¨ã¯ã¹ã³ã¢ä»ãã®é¢æ°ã2ã¤ãããç¨æãã¦ãè©ä¾¡ææ¨ã®é¢æ°ãç¨æããã°ãã¨ããæãã§ãã # -*- coding: utf-8 -
ãããã5æã§ãã Twitterã®æ稿å 容ãã鬱度ã測å®ããRubyã¹ã¯ãªãããæ¸ãã¦ã¿ã¾ããã ããã«ã¯æ±äº¬å·¥æ¥å¤§å¦ã®é«æãããå ¬éãã¦ããåèªææ 極æ§å¯¾å¿è¡¨ã¨ãããã®ã使ã£ã¦ãã¾ãã http://www.lr.pi.titech.ac.jp/~takamura/pndic_ja.html ããã¯ããåèªãã©ã®ç¨åº¦ã®ææ ã表ãããæ°å¤åãã表ã§ã-1 ~ +1 ã¾ã§ã®å¤ãç¹å®ã®åèªã«å²ãå½ã¦ããã¦ãã¾ãã ãã®åèªããã¬ãã£ããªææ 表ç¾ã ã¨ãã¤ãã¹ã®å¤ããã¸ãã£ããªææ 表ç¾ã ã¨ãã©ã¹ã®å¤ã«ãªã£ã¦ãã¾ãã ãªã®ã§ã鬱度ã測å®ã¨ãã£ã¦ããã¸ãã£ããªæ稿å 容ãå¤ãã¨ãã«ã¯ãã©ã¹ã®å¤ãè¿ãã¾ãã ã¾ãæ¥æ¬èªæã®å½¢æ ç´ è§£æã«ã¯Yahoo!ã®æ¥æ¬èªå½¢æ ç´ è§£æAPIã使ã£ã¦ãã¾ãã http://developer.yahoo.co.jp/webapi/jlp/ma/v1/parse.html ã¢
4æ³ã®é·å¥³ã¨ãªã»ãã§éã¶ããã«ãªãã¾ãããæãã§ã²ã£ããè¿ãã®ã¯ã§ããã®ã§ãããããã¡ã«æãã¨ããã®ãé£ããããã§ãããããããã¡ãã²ã£ããè¿ããããã¨æãã®ã§ãããé·å¥³ã¯æ°ã¥ãã¾ãããç§ãããã¦å£ã«åºããã常ã«å§åãã¦ãã¾ããç½é»ã¯ã£ããããªãã°ã¬ã¼ãªãªã»ãã楽ããã§ãã¾ãã ãã¦ãRubyã®ç¹å¾´ã®ã²ã¨ã¤ã«ãã¡ã¿ããã°ã©ãã³ã°ãããããããã¨ãæãããã¾ãããããªã»ãã®è©±ã¯ä¸åé¢ä¿ãªãã®ã§ãå¿ãã¦ãã ããã Rubyã®ãªãã¬ã¯ã·ã§ã³è§£èª¬ï¼evalæã®ã¯ãªãï¼ - ãã®ããã°ã¯è¨¼æã§ããªãã ã¡ã¿ããã°ã©ãã³ã°ãããã¨ãè©ããã便ç§ã®è§£æ¶ãªã©ãããããªå¹æãããã¾ãããä»åã¯ããã®ãã¡ã®ã²ã¨ã¤ãç´¹ä»ãããã¨æãã¾ããæãæµ®ãã¹ã¦ãã ãããæ¢åã®ã©ã¤ãã©ãªã®ããå¦çã ãå·®ãæ¿ããããä¸ã®ä¾ã§ã¯ãtargetã¡ã½ããã®ä¸ã§ä½¿ããã¦ããFixnum#to_sã¡ã½ãããå·®ãæ¿ãããã®ã§ãããããå·®
2007/08/15 æ¤ç´¢ãµã¼ãã¹ãæä¾ãããã³ãã£ã¼ä¼æ¥ã®ã ã¼ã¿ã¼ã¯8æ1æ¥ãè¾æ¸ãå¿ è¦ã¨ããªãå½¢æ ç´ è§£æã¨ã³ã¸ã³ãããªã¢ãã®æä¾ãéå§ãããå¾æ¥ãå½¢æ ç´ è§£æã§ã¯åè©æ å ±ãå«ãæ¥æ¬èªè¾æ¸ãç¨æããã®ã常èã ã£ãããããªã¢ã§ã¯ãããããè¾æ¸ãä¸è¦ã¨ãããæ°æè¡ã®ã¢ããã¼ãã¨ç¹æ§ã«ã¤ãã¦ãéçºå ã®ã ã¼ã¿ã¼ã«è©±ãèããã çµ±è¨å¦çã§åèªé¨åãæ¨å® å½¢æ ç´ è§£æã¨ã¯ãä¸ããããæããææ³ä¸æå³ã®ããæå°ã®åä½ï¼å½¢æ ç´ ï¼ã«åºåãå¦çããä»æ¥ã¯æ´ãã¦ãã¾ãããªãããä»æ¥ï¼åè©ï¼ï¼ã¯ï¼å©è©ï¼ï¼æ´ãï¼åè©ï¼ï¼ã¦ï¼å©è©ï¼ï¼ãï¼å©è©ï¼ï¼ã¾ãï¼å©åè©ï¼ãã¨åãããæ¤ç´¢ã¨ã³ã¸ã³ãã¯ããããã¾ãã¾ãªèªç¶è¨èªå¦çã®å ´é¢ã§å¿ è¦ã¨ãªãåºç¤æè¡ã ã å½¢æ ç´ è§£æãè¡ãã«ã¯ããããããåè©æ å ±ãä»å ãããæ°åä¸èªãããªãè¾æ¸ãç¨æããå¿ è¦ããããã¾ããæ°èªãé èªãå°éç¨èªã«å¯¾å¿ããã«ã¯ãåå¥ã«äººåã§åèªãç»é²ããå¿ è¦ãããã
JavaScriptãªã³ã¯è¦ç´ ã®ã¢ãã¬ã¹ãªã©ãã¦ã¼ã¶ã¼ã訪ãããã¨ããããå¦ããJavaScriptããç¥ãæ¹æ³ã以å調ã¹ããããããªãã£ããå¤åããã©ã¤ãã·ã¼ã®åé¡ã®çµ¡ã¿ã§åå¨ããªãã®ã ã¨åæã«åç¹ãããä»æ¥ãCSS(display:none) + æ¬ä¼¼ã»ã¬ã¯ã¿(:hover) + è¦ç´ ã®é«ã(offsetHeight) ã®çµã¿åãããæãã¤ãæ¸ããã function isVisited(link){ if(!isVisited.initialized){ isVisited.initialized = true; addRule("#check_visited:visited", "display:none"); } var a = document.createElement("a"); a.href = link; a.id = "check_visited"; documen
ã®ãéå½¢ã http://la.ma.la/misc/userjs/ldr_with_hatenaster.user.js (function(){ var w = typeof unsafeWindow != "undefined" ? unsafeWindow : window; var initialized = false; var s = document.createElement('script'); s.src = 'http://s.hatena.ne.jp/js/HatenaStar.js'; s.charset = 'utf-8'; document.body.appendChild(s); var t = setInterval(function(){ if(w.Hatena){ init(); initialized = true; clearInterval(t
é å¼µã£ã¦ä½ãããã¨æã£ããæ¢ã«ConfigLoaderã¨ããã®ãå®ç¾©ããã¦ããããã使ãã ãã§è¯ãã£ãã Add HatenaStar JSONãevalããªãã§ã¯ã©ã¤ã¢ã³ããµã¤ãã§ãã¼ã¹ããã»ããå®å ¨ãããªãï¼ã¨ãããããªè©±ã http://d.hatena.ne.jp/ku0522/20070927/1190868347 Greasemonkeyã¿ããã«å¤é¨ãã¡ã¤ã³ã®ãã¼ã¿å¼ã£å¼µã£ã¦ãããã¨ã¯éããªãã®ã§ãJSONPããããã¨èªä½ã¯è¯ããã¨ã ã¨æããJSONPãããã®ã¯è¨å®ä¸è¦ã§ç°¡åã«è²¼ãä»ããããããã«ããããã ã¨æããã©ãåçã«åå¾ããããã«ãªã£ã¦ãã¨Wikiã§æåãå¤ãããã¦ãã¾ãã®ã§å±éºã ã¨æããä¾ãã°JSONãåºåããå¦çã«ãã°ããã£ãå ´åã¨ããåãå¦çãéããªãã»ã¬ã¯ã¿ã¨ããæå®ãããã¨ããããã¾ã§ã³ã¼ãçæã®è£å©ã«ä½¿ãããããããããããªãããªããã¨ããæ°ãããã æ´å½¢æ¸
æè¿ã¯ãä¸é æ¼ç®åãå¤ç¨ãã¦ããã®ã ããã©ããã£ã±ã人ã使ã£ã¦ãã®ãè¦ãã¨æ°æã¡æªãã http://d.hatena.ne.jp/brazil/20050921/1127314004 Test.Builder.globalScope = typeof JSAN != 'undefined' ? JSAN.globalScope : typeof window != 'undefined' ? window : typeof _global != 'undefined' ? _global : null; ããã¯è§£èªããã®ã«ãããæéããããæ°ããããã³ãã³ã®å¾ãå¤ãªã®ãæ¡ä»¶ãªã®ãããããªãããã ã 俺ãªãããæ¸ãã Test.Builder.globalScope = (typeof JSAN != 'undefined') ? JSAN.globalScope : (typeof wi
çµç·¯ id:kazuhooku ãããä¸å¹´åã«ãã£ã¦ããã¨ã§ãã Kazuho@Cybozu Labs: JavaScript/1.7 ã§å調çãã«ãã¹ã¬ãã ä»æ¥ãã£ã¨æåãç解ã§ããã®ã¨ã Weave ã®ã½ã¼ã¹ãèªãã§ããããã®ãã¯ããã¯ãããªããªä½¿ã£ã¦ãã¦ãã¡ãwwãã¾wwwãã£ã¦ãªã£ãã®ã§ãèªåã§ãä½ã£ã¦ã¿ããã¨æãã¾ããã ã»ã¨ãã© id:kazuhooku ããã®ã¨åããã®ãªã®ã§ãæ¢åºã§ãï¼ï¼æ¬å½ã«ãããã¨ããããã¾ããï¼ï¼ ã¾ãã yield ã¨ã¯ä½ã yield ã¨ã¯ã JavaScript 1.7 ããå°å ¥ãããæ©è½ã§ãã 以ä¸ã« yield ã®ç´°ããæåã示ãã¦ããã¾ãã function f() { // ãªããã®å¦ç yield; // ... (1) // ãªããã®å¦ç yield; // ... (2) // ãªããã®å¦ç } var g = f(); // ã
ããã®ãã¨ã AJAXãµã¤ããã¹ãã¼ãåããMXHR - huixingã®æ¥è¨ Digg the Blog » Blog Archive » DUI.Stream and MXHR ã©ãã«ã解説ãç¡ãã£ãã®ã§ã詳ããèªãã ã ä¸ã®è¨äºããå¼ç¨ããã¨ãããµã¼ãã¼ã¨ã¯ã©ã¤ã¢ã³ãéã§ããã ã²ã¨ã¤ã ãã®HTTPã³ãã¯ã·ã§ã³ãéããããã«ãããµã¼ãã¼ããã¼ã¸ã®ã©ã®ãã¼ããå è¡ãã¦èªã¿è¾¼ãããã³ã³ããã¼ã«ãããã¨ãå¯è½ã«ãªããã¦ã¼ã¶ã¼ã«ã¨ã£ã¦ã¯ãã¼ã¸èªã¿è¾¼ã¿ãã»ã¼ä¸ç¬ã§æ¸ããã¨ãæå³ããããã¨ããæè¡ãXMLHttpRequest ã使ã£ã¦è¤æ°ã®ãã¼ã¿ãåä¿¡ããå ´åã«å¹æãããã ã¾ããã¢ãã ãã¢1ã¯10åã®ããã¹ãããã¦ã³ãã¼ããã¦è¡¨ç¤ºãããã®ã ãã¢2ã¯300åã®ç»åããã¦ã³ãã¼ããã¦è¡¨ç¤ºãããã®ã ã©ã¡ããå·¦å´ (MXHR æå¹) ãå®äºããå¾ã«å³å´ (MXHR ç¡å¹) ãéå§ããã®ã§é©ããªã
èªåãªããããªãã¸ã§ã¯ãæåã¨ã¯ãªããã¨èªããªãã¦ãããã¾ãããããªãã¸ã§ã¯ãã£ã½ã話ãã§ããããªã¼ã¨æã£ã¦ããã®ã§ãããããã¯ãã¼ã¯ããã¨ãã«ããªãã¸ã§ã¯ããã§ã¿ã°ä»ãã¦ã人ãããã®ã§ãããã¯ãããã¨æãããã£ããã¿ã¤ãã«ãç´ãã¾ããã 2åç®ã®ä»åã¯ãè¤æ°ã®ã¤ã³ã¹ã¿ã³ã¹ãã¾ã¨ãã¦æä½ããæ¹æ³ã«ã¤ãã¦æ¸ãã¾ãã ã¾ããã ãããã¼ã¸ã£ã¼ ååãã¯ã©ã¹ä½ã£ã¦ã¤ã³ã¹ã¿ã³ã¹ãä½ãã¨ä¾¿å©ã ã¨ããã¨ããã§çµããã¾ãããã便å©ãªç¹ã¨ãã¦ã¯ã¾ãããè¤æ°ã®ã¤ã³ã¹ã¿ã³ã¹ãã¾ã¨ãã¦æä½ããããä½ã£ããã§ãããã¨ãã§ãããã¨ããç¹ãããã¾ããã©ããããã¨ãã¨ããã¨ãã¨ããããã以ä¸ã®ãµã³ãã«ãè¦ã¦ã¿ã¦ãã ããã ã¾ããã ãããã¼ã¸ã£ã¼ãµã³ãã« ã¾ããã ããä¸æ°ã«ä½ã£ãããé ããããããã¨ãã§ãã¾ãã ããã§è³å³æéãåããããã¦ã大ä¸å¤«ãªã¯ãã§ãã ãã®æ©è½ãä½ãã¨è¨ãããããååã®ç¥èã ãã¯çµæ§å³ããã®ã§ã¯ãª
ãã®3ã§ã¯ãã¢ããªãå®æ©ã§åããããã®æç¶ãã説æãã¾ããããAppStoreãããã¯ãAdHocç¨ã«ããå°ãç»é²ããå¿ è¦ãããã¾ãããã®æé ã¯ä¸è¨ã®éãã§ãã 1. Certificates > Distributionã»ã¯ã·ã§ã³ï¼è¨¼ææ¸è¦æ±ï¼ (1) iPhone Developer Program Portalã¸ãã°ã¤ã³ (2) Certificatesï¼Distributionãé¸æããAdd Certificateããã¿ã³ãã¯ãªã㯠(3) ããã¡ã¤ã«ãé¸æããã¿ã³ãã¯ãªãã¯ãããã¼ã«ã«ã«ä¿åããCSRãé¸æãããSubmitããã¯ãªãã¯ã (4) èªè¨¼è¦æ±ãéç¥ããã¡ã¼ã«ãå±ã (5) å ã»ã©è¦ããCertificatesãã¿ãã®ãDistributionããå確èªãã¢ããããCSRã®ãActionãã§ãApproveããã¯ãªãã¯ã (6) ã¡ã¼ã«ã§æ¿èªãããæ¨ã®éç¥ãæ¥ã¾ãã
å¦é¨ï¼å¹´æ¥ã«iPhoneã¢ããªãä½ãã¾ããããã®æã«ç»é²ãå®æ©ãã¢ã¾ã§ã®æé ã示ããPDFãé å¸ãã¾ãããä»åã¯ãããæ¹è¨ããè¼ãã¦ãããã¨æãã¾ãããããããã¢ããªä½ã£ã¦ã¿ãããªããã¨ããæ¹ã¯ããã²åèã«ãã¦ãã ããã ã§ã¯ã以ä¸æé 説æã§ãã å®æ©ã§æä½ã¾ã§ã®è¡ç¨ Apple IDã®çºè¡ï¼iPhone Developer Centerã¸ã®ãã°ã¤ã³ iPhone Developer Programã¸ã®å å ¥ Current Development Certificatesã®ç»é² Current Registered Devicesã®ç»é² App IDã®çºè¡ Development Provisioning Profilesã®çºè¡ Provisioning Profilesãèªåã®iPhone / iPod touch / iPadã¸ç»é²ãã Xcodeã®ããã¸ã§ã¯ããã¡ã¤ã«ã®è¨å®ãå¤æ´ã
JSON¶ Ruby on Railsã®æ¡å¼µã§ãHashãActiveRecordã®ãã¼ã¿ãªã©ãJSONå½¢å¼ã®ãã¼ã¿ã«å¤æãã¦åºåã§ãã Railsã§JSONã®ãã¼ã¿ãéä¿¡ããã«ã¯Â¶ 以ä¸ã®ããã«format.json { render :json => @zips }ãè¨ç½® respond_to do |format| format.html { render :partial => 'zip_list' } format.xml { render :xml => @zips } format.json { render :json => @zips } end ãªã¯ã¨ã¹ãã²ããããå ´å¶ <% form_remote_for(@zip, :url => {:controller => 'top_page', :action => 'post', :format => 'json'}
æ¦è¦ ã¯ã©ã¤ã¢ã³ãå´ãããã¹ããããJSONå½¢å¼ã®ãã¼ã¿ãããµã¼ãå´ã§paramsããå©ç¨ããã ãããªæãã ã¯ã©ã¤ã¢ã³ãå´ $ telnet localhost 3000 POST /projects HTTP/1.1 Accept: application/json Content-Type: application/json Content-Length: * { project : { name : "Hello!", desc : "Hello World Project!" } } ãµã¼ãå´ def create project = Project.new project.name = params['project']['name'] project.desc = params['project']['desc'] project.save ... end é常ã®å ´å é常
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}