ææãã§ã
è·¯ç·å³ã®å ¥ãçµãã§ããã¨ããã£ã¦ãåããã«ããã§ãããã ãããªåé¡ã解決ããCanvasã§å®è£ ããã¤ã³ã¿ã©ã¯ã·ã§ã³æºè¼ã®è·¯ç·å³ã®ã¹ã¯ãªãããç´¹ä»ãã¾ãã âãã£ã¤ãã¦ã¦åããã«ããç®æãããããªæãã«ç§»åã§ãã¾ãã ãã¢ãã¼ã¸ ä¸ã®ã¢ãã¡ã¼ã·ã§ã³gifã¿ããã«ç§»åããããã¨ã ãã§ãªãããã¤ã¼ã«æä½ã§ã®æ¡å¤§ç¸®å°ããã©ãã°æä½ãªã©ãã§ãã¾ãã è·¯ç·å³ã¯åè¦ç´ ï¼é§ ãã«ã¼ããªã©ï¼ã®ããã¹ããã¡ã¤ã«ãå ã«ãCanvasã§æç»ããã¦ãã¾ãã åè¦ç´ ã®ãã¼ã¿ï¼ãªã¬ã³ã¸ã®ã«ã¼ãï¼ã¯ãããªæãã§ãã "route": "ORANGE", "from": "12488", "to": "7588", "fromName": "COURTHOUSE METRO STATION", "toName": "METRO CENTER METRO STATION", "routeShortName": "Orange
JavaScript ã§ã¤ã³ã¯ãªã¡ã³ã¿ã« grep æ¤ç´¢ JavaScript㧠grep æ¤ç´¢ããããã¨æãã次ã®ãããªã³ã¼ããæ¸ããã function grep (pattern) { try { var regex = new RegExp(pattern, "i"); var spans = document.getElementsByTagName('span'); var length = spans.length; for (var i = 0; i < length; i++) { var e = spans[i]; if (e.className == "line") { if (e.innerHTML.match(regex)) { e.style.display = "inline"; } else { e.style.display = "none"; } } }
Fisher-Yatesæ³ã¯é åãã·ã£ããã«ããéã«ç¨ããä¸è¬çãªã¢ã«ã´ãªãºã ã®ããã§ãã Wikipediaï¼Fisher-Yatesæ³ï¼è±èªï¼ Javascriptã§æ¸ãã¨ï¼Wikipediaããæç²ï¼ var n = a.length; for(var i = n - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var tmp = a[i]; a[i] = a[j]; a[j] = tmp; } ActionScriptï¼jp.ferv.blogããããï¼ var i:int = array.length; var j:int,tmp:Object; while(i){ var j = Math.floor(Math.random()*i); var tmp = array[--i]; array[i]
2010-07-19 ã«ãã´ãª: Client Side ã¿ã°: JavaScript ãã©ãã¯ãã㯠JavaScriptã®newã£ã¦ä½ï¼ä¸ä½ä½ãªã®ï¼ã¨ãã話 - æã¨åæ°ã¨ç¼¶ãã¼ã« ã¯ã©ã¹ã£ã¦ãã®ã¯JavaScriptã«ã¯ãªãã¯ããªã®ã«ã new ClassName();ã¨æ¸ãã¨ããããClassNameã¯ã©ã¹ã®ãªãã¸ã§ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ãçæããããããè¿ã£ã¦ãããã®ãããªæåããã¦ããã ããã¯æ°æã¡æªããè¨èªä»æ§ã¨ãã¦ã¯ã¯ã©ã¹ã¯æ¬æ¥åå¨ããªãã®ã«ãã¯ã©ã¹ã®ãããªãã®ãå°å ¥ããã¦ãããã¾ã¨ããªç¥çµãæã£ã人éãªããä¸ä½ newæ¼ç®åã£ã¦ä½ãªã®ï¼ã¨ããçåãæã¤ã®ãå½ããåã§ããã ãããªæ±ããåãã¦ããnewããã¾ãã«ãä¸æ«ã§æ¶ããï¼ï¼ newã¯prototype-basedãªJavaScriptãæ¸ãããã®å¯ä¸ã®æ段[1]ã§ãçã«JavaScriptãããã³ã¼ããæ¸ãããã«ã¯æ¬ ã
HTML5ã®localStorageã§iPhoneç¨Webã¢ããªãé«éåï¼iPhoneã§åããæ¥åç¨Webã¢ããªéçºå ¥éï¼4ï¼ï¼2/2 ãã¼ã¸ï¼ function loadList() { var ul = document.getElementById('list'); // ã1ã ãªã¹ãã®å 容ãä¿æããJSONæååãã<li>ãä½æããé¢æ°ãªãã¸ã§ã¯ã var rebuild = function(json) { ul.innerHTML = ''; var list = JSON.parse(json); for (i = 0; i < list.length; i++) { li = document.createElement('li'); li.innerHTML = '<a href="#content" onclick="openContent('+ list[i].i
ã¨ããã®ãä½ã£ã¦ã¿ã¾ããã ãã®ãã¼ã¸ã§è©¦ãã¦ã¿ã(IEéå®) ãã¼ãåã®ã¾ã¾æ¤ç´¢ã§ããã®ã§ãä¾ãã°mohicanã§ã¢ãã«ã³ã«ããããã¾ãã ä¾ãã°ãããªå ·åã http://la.ma.la/misc/demo/isearch.htm ä¸è¨ããã¯ãã¼ã¯ã¬ããã§ä»ã®ãã¼ã¸ã§ãåããã¾ããããªãã¡ã©ãä»ãã¨ã¤ã¤ãªã®ã§ããã¦ãã ããããããªãã¯ããã¼çãã ãããã¹ã¯ãªããã«åããå¯è½æ§ãããã®ã§ããã¼ã«ã«ã«ä¿åãã¦åä½ããããã¨ãæ¨å¥¨ãã¾ãã ã§ããã¡ã¤ã«ä¿åãã¦JavaScriptæ¸ãæãã¦ãªã³ã¯ãã¼ã«ç»é²ã¨ãããä½æ¥ã¯é常ã«é¢åãããã¨æãã®ã§ãããã¯ãã¼ã¯ã¬ããã§ä½¿ãjsãã¡ã¤ã«ã®ä¸ã«WSHã使ã£ãã¤ã³ã¹ãã¼ã©ã¼ãæ¸ãã¦ã¿ãã ---- ã¤ã³ã¹ãã¼ã«æ¹æ³ http://la.ma.la/misc/bookmarklet/isearch.js ãã®ãã¡ã¤ã«ãé©å½ãªãã©ã«ãã«ä¿åãã¦ããã«ã¯
TinySegmenterã¯JavaScriptã§ä½ãããåãã¡æ¸ãã©ã¤ãã©ãªã§ãã æ¥æ¬èªããæ å ±ãå¾ãéã«ä½¿ãããæè¡ãåãã¡æ¸ãã§ãããããªåãã¡æ¸ãã§ã¯è¾æ¸ã使ã£ã¦è§£æãè¡ãã®ãä¸è¬çã§ãããJavaScriptã®ãããªè¨èªã§ã¯å¤§éã®è¾æ¸ãæ±ãã®ã«ã¯ä¸åãã§ããããã§èªåçã«å¤å®ããTinySegmenterã使ã£ã¦ã¿ã¾ãããã åãã¡æ¸ãã®ãµã³ãã«ã§ããæ©æ¢°çåé¡ã§ããã精度ã¯é«ãããã«è¦ãã¾ãã 2ã¨5ã9ã¨5ãªã©ã®é£ç¶ããæ°å¤ãåããã¦ãã¾ã£ã¦ããã®ãç¡å¿µããããåãã§ãã TinySegmenterã§ã¯è§£æã¯å ¨ã¦ã¯ã©ã¤ã¢ã³ããµã¤ãã§è¡ããã¾ããã©ã¤ãã©ãªã¯å ã25KBã§ããæ©æ¢°å¦ç¿åã§ãããn-gramãæå種ãçµã¿åããã¤ã¤åé¡ãè¡ã£ã¦ãã¾ãããã®ããæ°èã®ãããªæå種ãæ§ã ã«çµã¿åããã£ãããç¨åº¦ã®é·ããæã£ãæç« ã«å¯¾ãã¦å¼·ãåé¢ããã£ãããçãã¡ãã»ã¼ã¸ã平仮åã®ã¿ã¨
ãã¶ã¤ãåããåãã¦ã®jQueryã
jquery.basic.js(function($){ /* ãã©ã°ã¤ã³åï¼mypluginï¼ãæå® */ /* é¢æ°ã«ãªãã·ã§ã³å¤æ°ã渡ã */ $.fn.myplugin=function(config){ /* å¼æ°ã®åæå¤ãè¨å®ï¼ã«ã³ãåºåãï¼ */ var defaults={ defColor:"#ff6699", defPadding:5 } var options=$.extend(defaults, config); /* ä¸è´ããè¦ç´ ä¸ã§ç¹°ãè¿ã */ return this.each(function(i){ /* ãã©ã°ã¤ã³å ã§ã®ç¾å¨ã®è¦ç´ ã¯thisã§åç § */ $(this).text(this.tagName+"["+i+"]").css({"color":defaults.defColor,"padding":defaults.defPadding}); }
ããã«ã¡ããããã°ã©ãã®å·å£ã§ããä»åã¯Backbone.jsãCoffeeScriptã§è¨è¿°ããRuby on Railsã¨çµã¿åããã¦å©ç¨ããç°¡åãªãã¿ã¼ã³ã試ãã¦ã¿ã¾ãããCoffeeScriptã¯é常ã«ç°¡æ½ã«JavaScriptãè¨è¿°ã§ããä¸ã«å¦ç¿ã³ã¹ããä½ãã®ã§ããããã§ããæè¿ã¯JavaScriptãããã¸ã§ã¯ãå ¨ä½ã®ã³ã¼ãã«å ããå²åã大ãããªã£ã¦ãã¦ãã¾ãããããã«æ¯ä¾ãã¦ãã¯ãã¡ã³ããã³ã¹æ§ãå¯èªæ§ãä¸ãã£ã¦ãããã¨ãããäºåã«å¯¾å¿çãå¿ é ã§ãã Backbone.jsã¨ã¯ã»ã»ã»ã¨ãã¯å¥ã«ãããã¹ã¨ãï¼dwangoããã®Backbone.jsè¨äºãè¦ã¦ãã ãã(å®å ¨ã«ãã¿ãã¶ãã§ããæ¬å½ã«ãããã¨ããããã¾ãã)ã åæºå ãã¼ã¸ã§ã³ã¯ãããªæãã Ruby on Rails 3.1.1.rc1 CoffeeScript version 1.1.2 Backbone.js
jQueryããã¼ãªã¢ããªã±ã¼ã·ã§ã³ã®åé¡ç¹ã¨ãMVCã«ããæ§é åã®å¿ è¦æ§ jQueryã¯ããã©ã¦ã¶ä¸ã§åãJSã¢ããªã±ã¼ã·ã§ã³ã®éçºçç£æ§ãåçã«åä¸ããã¾ãããDOMæä½ã«ããåçãªãã¼ã¸æ¸ãæãå¦çãªã©ã¯ãã»ã¬ã¯ã¿ã使ã£ã¦ã¡ããã£ã¨ã³ã¼ããæ¸ãã ãã§ãã»ãã®æ°è¡ã§è¨è¿°ã§ãã¦ãã¾ãã¾ãã ãããããã®æ¹æ³ã®å»¶é·ã§ã大è¦æ¨¡ãªJSã¢ããªã±ã¼ã·ã§ã³ãæ§ç¯ãããã¨ã¯æããã¦ç¾å®çã§ãããããä¾ãã°ãGMailãããNew Twitterãç¨åº¦ã®è¦æ¨¡ã®JSã¢ããªã±ã¼ã·ã§ã³ãæ¸ããªããã°ãªããªãã¨ããããã©ãã§ãããï¼ å¤§è¦æ¨¡ãªJSã¢ããªã±ã¼ã·ã§ã³ãéçºããã«ã¯ããããã£ãææ³ã延é·ããã®ã§ã¯ãªããããæ´ç·´ããããã¶ã¤ã³ãã¿ã¼ã³ãå°å ¥ããå¿ è¦ãããã¾ãããã®ç®çã«ã´ã£ããã®ãã¶ã¤ã³ãã¿ã¼ã³ãããMVCããã¶ã¤ã³ãã¿ã¼ã³ã§ãã MVCãã¿ã¼ã³ã¯ãWebã®ä¸çã§ã¯ãµã¼ããµã¤ãããã°ã©ãã³ã°ã§åºãç¥ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}