Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
leason
@u1331878576
VIP
NO. 1457 / 2012-03-16

[email protected]
1 Topics / 22 Replies
1 Followers
3 Following
0 Favorites
沿路旅程,如歌褪变。
GitHub Public Repos
  • At.js 5280

    Add Github like mentions autocomplete to your application.

  • Caret.js 1054

    Get caret postion and offset from text field

  • jquery-atwho-rails 196

    At.js gem

  • sketch-divine-proportions 139

    Divine proportions toolkit for Sketch

  • angular-coffee-AMD-seed 58

    angular coffeescript requirejs

  • simditor-dropzone 53

    让 Simidtor 编辑器的『插入图片』支持拖拽的小插件

  • todc-bootstrap-sass 19

    google style for bootstrap.

  • sketch-practise 15

    my sketch practise collections

  • simple-hotkeys 3

    simple hotkeys.

  • RubyConf-China-2015-Lo... 3

    Logo and motion source files of Ruby Conf China 2015 at Shenzhen

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • [上海] 爱客 CRM 招聘高级 Ruby 工程师! at June 02, 2015

    帮顶

  • 大四创业坚守? at August 04, 2013

    #22 楼 @small_fish__ 额。。。那你们的产品怎么处理的呢,留给其他同学在做?

  • 大四创业坚守? at August 04, 2013

    #20 楼 @small_fish__ 做得不错,不过这东西主要靠运营,加油吧!我也是成都毕业创业的大学生,同是用 ruby 的,欢迎加我 QQ383744872 交流

  • 当个农村大学生真辛苦 at January 06, 2013

    看自己的心态了

  • RubyConfChina 2012 新浪 SAE Ruby 平台激活码和七牛云存储现金券 at November 23, 2012

    [email protected],谢了

  • 擦,姐生气了,要学 ruby!自己改网站 at October 26, 2012

    此帖必火,顶一个!

  • 多少人想创业,为什么想创业? at October 19, 2012

    确实很难,但是我们不应该轻易放弃这个梦想,不应该害怕失败

  • 动态地为菜单导航加上 active,大家是怎么处理的? at August 01, 2012

    <%= 'active' if params[:controller] == 'home' %>

  • 用了 Devise 以后,出现 Routing Error 如何知道错在哪里? at August 01, 2012

    #3 楼 @ericguo 昨天我也遇到这个问题了,加上 user_signed_in?果然就对了,但是我并不需要 user_signed_in,最后我的解决方法是把 current_page 换成了<%= 'active' if params[:controller] == 'home' %>,这样凡是在 home_controller 下的页面都会有 active,应该还可以加参数定位到某个 action 上面

  • 论坛里有多少读大二大三的学生? at July 25, 2012

    #38 楼 @Sunnyroger 交流可以,请教嘛,我还不够格,哈哈。我是电子科大的,这儿不能发私信,我的邮箱 [email protected]

  • 论坛里有多少读大二大三的学生? at July 25, 2012

    #35 楼 @Sunnyroger 目前都是按照教程来,只能算入门,是在和另一个同学一起做的,他比我厉害多了,哈哈,多练习多思考才能提高啊,计划大四能学会写 gem

  • 论坛里有多少读大二大三的学生? at July 24, 2012

    准大四,正在用 rails 开发两个项目,完全自学

  • 在 rails 3.2.3 中加入 ckediter 的详细步骤 at July 13, 2012

    #8 楼 @boardsky 恩,已经试了,谢谢

  • 在 rails 3.2.3 中加入 ckediter 的详细步骤 at July 13, 2012

    上传中文名称附件不显示名称,下载预览也不正常,修改成数字或英文正常,如图 这个怎么解决?

  • Ubuntu 难道不能用 QQ? at July 10, 2012

    #58 楼 @SekOwisk 我试了,虽然比起 windows 上面的效果差了些,不过在 ubuntu 下面能有这效果也很不错了,而且安装也很方便

  • Pines Notify,非常棒的 js notifications 扩展 at July 10, 2012

    正在寻找呢,正好拿来试试

  • Ubuntu 难道不能用 QQ? at July 06, 2012

    😄

  • 在 Linux 下的 Sublime text 2 中使用中文输入法 at June 28, 2012

    scim,scim-bridge,fcitx,各种办法都试了,还是不行,同学的跟我一样的配置,sublime 一样的版本,输入法设置也一样,可以输入中文,看来这个是看人品

  • [翻译] Emacs 改变了我的人生 (发生在 Emacs 和 Ruby 之间的故事) at April 01, 2012

    不知道现场怎么谈的,我只有演讲提纲,所以假定谈的都是 emacs 中的实现 (不知道 ruby 如何实现),我又去验证了一遍。至少在 emacs 中的 struct union Lisp_Object 的实现如我所说。

    这是 lisp.h 中的代码 (X86 都是 little-endian)

    #ifndef WORDS_BIG_ENDIAN
    
    /* Definition of Lisp_Object for little-endian machines.  */
    
    typedef
    union Lisp_Object
      {
        /* Used for comparing two Lisp_Objects;
           also, positive integers can be accessed fast this way.  */
        EMACS_UINT i;
    
        struct
          {
        EMACS_INT val  : VALBITS;
        enum Lisp_Type type : GCTYPEBITS;
          } s;
        struct
          {
        EMACS_UINT val : VALBITS;
        enum Lisp_Type type : GCTYPEBITS;
          } u;
      }
    Lisp_Object;
    
    #else /* If WORDS_BIG_ENDIAN */
    
    
    
    

    我的测试代码,使用 gdb 调试,首先 print &(o.s) 得到 memory address,然后参考http://www.delorie.com/gnu/docs/gdb/gdb_56.html一个个字节显示来验证。

    #include <stdio.h>
    
    #define EMACS_UINT unsigned int
    #define EMACS_INT int
    #define VALBITS 29
    #define GCTYPEBITS 3
    
    enum Lisp_Type {
        Lisp_Int = 0,
    
        /* Symbol.  XSYMBOL (object) points to a struct Lisp_Symbol.  */
        Lisp_Symbol = 2,
    
        /* Miscellaneous.  XMISC (object) points to a union Lisp_Misc,
           whose first member indicates the subtype.  */
        Lisp_Misc = 3,
    
        /* String.  XSTRING (object) points to a struct Lisp_String.
           The length of the string, and its contents, are stored therein.  */
        Lisp_String = 4,
    
        /* Vector of Lisp objects, or something resembling it.
           XVECTOR (object) points to a struct Lisp_Vector, which contains
           the size and contents.  The size field also contains the type
           information, if it's not a real vector object.  */
        Lisp_Vectorlike = 5,
    
        /* Cons.  XCONS (object) points to a struct Lisp_Cons.  */
        Lisp_Cons = 6,
    
        Lisp_Float = 7,
    };
    
    typedef union Lisp_Object
    {
        /* Used for comparing two Lisp_Objects;
           also, positive integers can be accessed fast this way.  */
        EMACS_UINT i;
    
        struct
        {
            EMACS_INT val  : VALBITS;
            enum Lisp_Type type : GCTYPEBITS;
        } s;
        struct
        {
            EMACS_UINT val : VALBITS;
            enum Lisp_Type type : GCTYPEBITS;
        } u;
    } Lisp_OLisp_Stringbject;
    
    struct S{
        int a;
        int b;
    };
    
    int main(int argc,char** argv)
    {
        struct S s;
        printf("addr of S::a=%x\naddr of S::b=%x\n",&(s.a),&(s.b));
        Lisp_OLisp_Stringbject o;
        o.s.val=1023;
        o.s.type=Lisp_Int;
        printf("o.s.val=%d\no.s.type=%d\n",o.s.val,o.s.type);
        return 0;
    }
    
    
    
    
  • [翻译] Emacs 改变了我的人生 (发生在 Emacs 和 Ruby 之间的故事) at March 31, 2012

    embedding integers in pointers 中的类型实际上是放在高地址,我查过 emacs 代码,见我的翻译,http://blog.csdn.net/redguardtoo/article/details/7400655.

关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English