RSS
热门关键字:  java  Ajax  JSP  JSF  Struts
当前位置 : 首页>Ruby>列表

Ruby on Rails + AJAX + Mongrel + JMS/MQ/MOM = 即时通讯

来源: 作者: 时间:2007-09-19 点击:
  •    if (first)   
  •    {   
  •      amq.addListener('stocks','/topic/STOCKS.*',priceHandler._price);   
  •    }   
  • }   
  •   
  • amq.addPollHandler(portfolioPoll);   
  •   
  • /// -----------------   
  • // Original code by Joe Walnes   
  • // -----------------   
  •   
  • /*** Convenience methods, added as mixins to standard classes (object prototypes) ***/  
  •   
  • /**  
  •  * Return number as fixed number of digits.   
  •  */  
  • function fixedDigits(t, digits) {   
  •     return (t.toFixed) ? t.toFixed(digits) : this  
  • }   
  •   
  • /**   
  •  * Find direct child of an element, by id.   
  •  */  
  • function find(t, id) {   
  •     for (i = 0; i < t.childNodes.length; i++) {   
  •         var child = t.childNodes[i]   
  •         if (child.id == id) {   
  •             return child   
  •         }   
  •     }   
  •     return null  
  • }   
  •   
  • /**  
  •  * Return the text contents of an element as a floating point number.   
  • 最新评论共有 0 位网友发表了评论
    发表评论
    评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
    用户名: 密码:
    匿名?
    注册
    Google Adsense
    相关文章