Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
chita
@chita
会员
第 6147 位会员 / 2013-03-15

[email protected]
1 篇帖子 / 22 条回帖
0 关注者
0 正在关注
1 收藏
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [上海] 上海移动 App 公司招聘优秀 rails 工程师 at 2014年02月24日

    #3 楼 @bydmm 美女如浮云的意思吧

  • 记忆力减退怎么办~~~ at 2014年02月19日

    你们经验都好丰富啊

  • 传说 Rails 社区的朋友 JavaScript 都比较强 at 2014年02月13日

    #11 楼 @mikasayee 哦

    如果只是拷贝 数组的话

    var mp = [];
       for ( var i = 0; i < this.move_step; i ++ ) {
           mp.push(this.move_paths[i])
       }
       this.all_paths.push(mp);
    

    这一段可以直接改为

    this.all_paths.push(this.move_paths.concat())
    

    问题 解决了 就好

  • 传说 Rails 社区的朋友 JavaScript 都比较强 at 2014年02月13日

    #9 楼 @mikasayee 你这当然 undefine 了 二维数组需要初始化的

    类似于 move_paths[num_path]=[]

    然后 move_paths[num_path][distance] = pls 才能不报错

    只用一个 move_paths 逻辑上肯定还有问题

    我的思路 是 递归路径的时候 需要把前面路径传入函数 distance 没什么必要了

    大概就是

    get_move_ranges: function(movepath, player_position) {
    
     this.check_move_ranges(movepath.concat(), player_position, 'up');
            this.check_move_ranges(movepath.concat(), player_position, 'down');
            this.check_move_ranges(movepath.concat(), player_position, 'left');
            this.check_move_ranges(movepath.concat(), player_position, 'right');
    
    
    
    }
    
     check_move_ranges: function(movepath, position, direction) {
    var distance =movepath.length
    if ( distance > this.move_step ){
                return
            }
    }
    
  • 传说 Rails 社区的朋友 JavaScript 都比较强 at 2014年02月13日

    #7 楼 @mikasayee 好吧

    你的 move_paths 在哪初始化的 all_paths 里 push 的都是同一个引用吧 你打印 all_paths 试试

    里面应该都是一个数组

  • 传说 Rails 社区的朋友 JavaScript 都比较强 at 2014年02月12日

    #5 楼 @mikasayee 那 distance 又是什么

    什么距离?这两个做比较干嘛

  • 传说 Rails 社区的朋友 JavaScript 都比较强 at 2014年02月12日

    move_step 是干嘛的

  • 有哪种程序语言同时拥有原型继承和类继承的特性的么? at 2013年07月15日

    有 actionscript 3

  • 以我自身的经历,跟大家谈谈关于一些小公司到底要不要去。 at 2013年07月13日

    @smallbug 好的 .. 到时候 私信你 ..

  • 以我自身的经历,跟大家谈谈关于一些小公司到底要不要去。 at 2013年07月12日

    我现在就在一个小公司..

    做着非常不爽

    的确得慎重考虑换工作问题

  • 大家都买房了么 at 2013年06月28日

    穷逼买不起

  • 请教大家如何转型成为 Ruby 的开发人员? at 2013年06月06日

    我自己这种两年前端的 想转 ruby 都犹豫得不行.. 薪水落差 一直都是最大的问题.. 目前我只是打算多自学点 rails 毕竟资料什么的都好找 但只要没有这方面的项目 都还不算真的转型了

    我也比较好奇 成功转型的都是怎么转的 或者 都是一开始就做 ruby 这方面的?

  • 《Ruby on Rails Tutorial》中文版限免 at 2013年05月31日

    thx

  • 社区新规则 - 新注册的用户 1 周内禁止发帖 at 2013年03月22日

    注册的真及时

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    gem update bundler

    终结此贴 = =

    感谢 @smallbug @Jijin

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    然后就提示装下一个

    D:\ruby or rails\blog>bundle exec bundle install [31mCould not find gem 'sass-rails (~> 3.2.3) x86-mingw32' e on this machine.[0m [33mRun bundle install to install missing gems.[0m

    #13 楼 @smallbug

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    #11 楼 @smallbug

    一个一个的装都可以

    D:\ruby or rails\blog>gem install sqlite3 Fetching: sqlite3-1.3.7-x86-mingw32.gem (100%) Successfully installed sqlite3-1.3.7-x86-mingw32 unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF 12 for CHANGELOG.rdoc, skipping Installing ri documentation for sqlite3-1.3.7-x86-mingw32 1 gem installed

    不懂为啥 bundle install 的时候 rake 会错误

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    #8 楼 @smallbug

    所以只能一个一个的 install 了?

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    #7 楼 @Jijin

    装过了 见一楼

    D:\ruby or rails\blog>gem install rake -v '10.0.3' Successfully installed rake-10.0.3 Installing ri documentation for rake-10.0.3 1 gem installed

    bundle install 还是一样的错误

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    没改过

    source 'https://rubygems.org'

    gem 'rails', '3.2.12'

    Bundle edge Rails instead:

    gem 'rails', :git => 'git://github.com/rails/rails.git'

    gem 'sqlite3'

    Gems used only for assets and not required

    in production environments by default.

    group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'

    # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby

    gem 'uglifier', '>= 1.0.3' end

    gem 'jquery-rails'

    To use ActiveModel has_secure_password

    gem 'bcrypt-ruby', '~> 3.0.0'

    To use Jbuilder templates for JSON

    gem 'jbuilder'

    Use unicorn as the app server

    gem 'unicorn'

    Deploy with Capistrano

    gem 'capistrano'

    To use debugger

    gem 'debugger'

    #5 楼 @smallbug

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    #3 楼 @smallbug

    Gemfile.lock?没这个文件

  • bundle install (An error occurred while installing rake (10.0.3),) at 2013年03月15日

    #1 楼 @smallbug

    [31mCould not find gem 'jquery-rails (>= 0) x86-mingw32' in the gems available on this machine.[0m [33mRun bundle install to install missing gems.[0m

    不会要一个个的 install 吧

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