You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
On Coffeescript.org: bawbag = (x, y) -> z = (x * y) bawbag(5, 10) would compile to: var bawbag; bawbag = function(x, y) { var z; return (z = (x * y)); }; bawbag(5, 10); compiling via coffee-script under node.js wraps that so: (function() { var bawbag; bawbag = function(x, y) { var z; return (z = (x * y)); }; bawbag(5, 10); }).call(this); Docs say: If you'd like to create top-level variables for ot
stockNum.App Something new is just around the corner ðð
ããã«ã¡ã¯ãæ¯å¹´è±ç²çã«ãªãããã¦ãã飯å¡ã§ãã æè¿ã®Node.jsã®æ®åãªã©ã«ãã£ã¦ãµã¼ããµã¤ãJavaScriptçéãçãä¸ãã£ã¦ãã¾ãã ãããªããããªJavaScriptãã©ã¯ã«ãã¤ã¨ã¬ã¬ã³ãã«æ¸ãããã®CoffeeScriptã¨ããè¨èªããã¥ã¼ããªã¢ã«é¢¨ã«ç´¹ä»ãã¾ãã ä½ãããã®ã©ã¤ãã©ãªãèªåã§æ¸ãç¨åº¦ã«JavaScriptã§éçºãã¦ãã人ã¯çµ¶å¯¾ã«ä½¿ã£ãã»ããããã¨æãã¾ãã JavaScriptãç¥ã£ã¦ããã°1-2æéç¨åº¦ã§ååé§ä½¿ã§ããããã«ãªãã¾ãã ï¼2011/6/28ï¼@m_satyræ§ã«ãææé ããç®æãä¿®æ£ãã¾ãããï¼ ç®æ¬¡ CoffeeScriptã¨ã¯ï¼ ã¤ã³ã¹ãã¼ã« Hello World æ§æ é¢æ° å¤æ°å±é Objectã®çæ ã«ã¼ã åå¨ãã§ã㯠ãã¢ããã¥ã¡ã³ã thisã®ãã¤ã³ã ã¯ã©ã¹ ç¡åé¢æ° {var} Tips ?ã®ä½¿ãåã åå¨ãã§ãã¯
ãã以éãCoffeeScriptã§JSãæ¸ãç¶ãã¦ãã¦ããã£ã±CoffeeScriptãããªã¼ã¨çµæ§æã£ã¦ããèªåã«ã¨ã£ã¦ã®CoffeeScriptãããã¨æãä¸çªã®çç±ã¯ãããªãã¸ã§ã¯ãæåçãªã³ã¼ãããã¹ãã¬ã¹ç¡ãæ¸ãããããã£ã¦ããç¹ã ã¨æãã¦ããä¾ãã°ã以ä¸ã®ãããªåä½ãããUIãããã
é¢æ°ã«å¼æ°ã渡ãæ¬å¼§ (...) ã¯ä¸è¦ã print "coffee" ã®ããã«é¢æ°ãå¼ã¹ãããã ãå¼æ°ãç¡ãå ´åã¯ç©ºã®æ¬å¼§ ( ) ãå¿ è¦ã é¢æ°ãifæãswitchæãtry/catchæãªã©ã§ãããã¯ãä¸æ¬å¼§ {...} ã§å²ã代ããã«ãPythonã®ããã«ã¤ã³ãã³ããæãããã¨ã§ãããã¯ã表ç¾ããããªã®ã§ã¤ã³ãã³ãã¯è¶ éè¦ã ä»£å ¥
Rubyã¯æé«ã®è¨èªã ããããã£ã¨æ®åãã¦ããã¨æãããã©ãããã®é害ã¨ãªã£ã¦ããã®ã¯ãã¶ããRubyããã¸ã¥ã¢ã«ã«è¨´ããªãè¨èªãã¨ãªã£ã¦ããããã ãããããã«Rubyã«ã¯Ruby/Tkã¨ãShoesã¨ãããããã©ãç¾ä»£ã®ããã°ã©ãã³ã°ã§ããã¸ã¥ã¢ã«ãã¨è¨ã£ãããæé»çã«ãWebä¸ã®ãã¨ãã修飾ãä»ãããã ä¸æ¹ã§JavaScriptã¯ãjQueryãCoffeeScriptã®äººæ°ãè¦ãéããæé«ã¨ã¯è¨ããªãè¨èªã ããã©ãããã¸ã¥ã¢ã«ã«è¨´ããè¨èªãã¨ãªã£ã¦ããç¹ãæ®åã®å¤§ããªè¦å ã«ãªã£ã¦ããã¨æãããã¤ã¾ããã©ã¦ã¶ä¸ã§å®è¡ã§ããå¯ä¸ã®è¨èªããå°ä½ããJavaScriptã®å¤§ããªã¢ããã³ãã¼ã¸ãªãã ãã ã ããä»ã®ã¨ãããæé«ã®è¨èªã§ãã¸ã¥ã¢ã«ãªããã°ã©ãã³ã°ãããããã¨ã¯ã§ããªãããã©ããåãã«ã¯CoffeeScriptãããããCoffeeScriptã¯Rubyã®å½±é¿ã大ããåãã¦ããã
CodeZineç·¨éé¨ã§ã¯ãç¾å ´ã§æ´»èºãããããããã¼ãã¹ã¿ã¼ã«ããããã®ã«ã³ãã¡ã¬ã³ã¹ãDevelopers Summitãããã¨ã³ã¸ãã¢ã®çããã¾ããã¼ã¹ãããããã®ã¤ãã³ããDevelopers Boostããªã©ããã¾ãã¾ãªã«ã³ãã¡ã¬ã³ã¹ãä¼ç»ã»éå¶ãã¦ãã¾ãã
CoffeeScriptåºç¤ææ³æéãã¹ã¿ã¼ ã¯ããã¾ãã¦ãæ°äººã®tek_kocã§ãã ä»åã¯å··ã§è©±é¡ã®CoffeeScriptã®ææ³ãã¾ã¨ãã¦ã¿ã¾ããã 1å¹´è¿ãåã«æµè¡ã£ãåºç¤ææ³ãã¹ã¿ã¼ã·ãªã¼ãºã«CoffeeScriptããªãã£ãã®ã§ãåå¼·ãå ¼ãã¦åå½¢å¼ã§æ¸ãã¦ã¾ã ã JavaScriptã使ã£ã¦ããæ¹ã¯ããããã£ããçºãã¦CoffeeScriptã¸ã®ç§»è¡ãæ¤è¨ãã¦ãããã°ãªã¨æãã¾ãã ã¾ã ç¶²ç¾ ãããã¦ããªãã§ããããããèªãã°CoffeeScriptã«ä¹ãæãããã¨ãã§ããã¯ãã§ãã ééããã足ããªãç®æãªã©ãããã°ãæ¯éã³ã¡ã³ãçã§ææãã¦ãã ããï¼ ãã¼ã¸ã§ã³ ç¾æç¹ã§ææ°ã®1.0.1ã対象ã«ãã¾ãã ï¼ï¼æ¦è¦ CoffeeScriptã¨ã¯JavaSciprtã«ã³ã³ãã¤ã«å¯è½ãªè¨èªã§ãã RubyãPythonãªã©ã«è¿ãè¨è¿°ãå¯è½ã§ãJavaScriptã®éçºãããå¹çç
The Little Book on CoffeeScript
CoffeeScriptã§Classãä½ã£ãå ´åããã®ã¯ã©ã¹ãã°ãã¼ãã«ããåç §åºæ¥ãªãããããæã£ãã ä¾ãã°ã class Hoge constructor: (@param) -> @name = @param.name setName: (name) -> @name = name getName: -> @nameãã®CoffeeScriptãã³ã³ãã¤ã«ããã¨ä»¥ä¸ã®ãããªJSãã¡ã¤ã«ãåºåãããã (function() { var Hoge; Hoge = (function() { function Hoge(param) { this.param = param; this.name = this.param.name; } Hoge.prototype.setName = function(name) { return this.name = name; }; Hoge.
So in app/assets/javascript/faye.js.coffee.erb I have the following: $('#room_tag').bind('blur', () -> alert('Hey!') ) All the other code in it such as: sendmessage('room', 'message') work just fine. And I can copy and paste the code generated from the block above and paste it into Chrome it works fine. I assume this is because, is it rails or coffeescript?, either way one of them, wraps the entir
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}