小编Sha*_*mad的帖子

减少Twitter Bootstrap输入字段的高度?

在我的表单中,我想减少输入字段的高度.

我知道有输入小的输入媒体类来控制输入字段的宽度,但有没有类似控制高度的东西?

我找不到任何,如果没有,我怎么去覆盖默认值?

html css twitter-bootstrap

40
推荐指数
3
解决办法
6万
查看次数

Google日历v3会返回403不足的权限

我一直在尝试使用服务帐户访问Calendar v3 API.我已经从管理控制台添加了范围 https://www.googleapis.com/auth/calendar,并将该日历与该服务帐户的电子邮件地址共享.

我也使用相同的服务帐户访问https://www.googleapis.com/auth/coordinate范围,并且工作正常.

此外,尝试撤销访问权限如下所述:为什么Google Calendar API(oauth2)以"权限不足"进行响应?

所有这一切,我仍然得到;

{"error"=>
  {"errors"=>
    [{"domain"=>"global",
      "reason"=>"insufficientPermissions",
      "message"=>"Insufficient Permission"}],
   "code"=>403,
   "message"=>"Insufficient Permission"}}
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?

ruby-on-rails google-calendar-api google-api http-status-code-403 google-api-client

6
推荐指数
1
解决办法
2665
查看次数

performSegueWithIdentifier中的"无法识别的选择器发送到实例"

所以我在View Controller中有一个以编程方式添加的按钮.因此我直接从我的根View Controller创建了一个push segue到下一个.已经嵌入了导航控制器.

这是我设置按钮并添加目标;

registerButton = [UIButton buttonWithType:UIButtonTypeCustom];

[registerButton addTarget:self action:@selector(pushRegisterScreen) forControlEvents:UIControlEventTouchUpInside];
Run Code Online (Sandbox Code Playgroud)

这就是pushRegisterScreen;

- (void) pushRegisterScreen
{
    [self performSegueWithIdentifier:@"registerSegue" sender:self];
}
Run Code Online (Sandbox Code Playgroud)

但这引发了这个例外;

'NSInvalidArgumentException', reason: '-[RegisterScreen _setViewDelegate:]: unrecognized selector sent to instance 0x8d70d70'
Run Code Online (Sandbox Code Playgroud)

Xcode的第一天耶!

objective-c uiviewcontroller ios unrecognized-selector segue

3
推荐指数
1
解决办法
2999
查看次数

无法批量分配受保护的属性:title,description,cloth_type,pic Rails 3

当对/ cloth/create进行POST时,我得到一个警告:无法批量分配受保护的属性:title,description,cloth_type,pic

cloth.rb

class Cloth   
  include Mongoid::Document   
  include Mongoid::Timestamps 
  include Mongoid::MultiParameterAttributes   attr_accessible :pics

  field :title   
  field :description   
  field :cloth_type   
  belongs_to :seller   
  has_many :pics

  attr_accessible :pic_attributes   
  accepts_nested_attributes_for:pics
end
Run Code Online (Sandbox Code Playgroud)

pic.rb

class Pic   
  include Mongoid::Document
  include Mongoid::Paperclip  

  has_mongoid_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" },
  :storage => :cloud_files,
  :cloudfiles_credentials =>  "#{Rails.root}/config/rackspace.yml",
  :path => ":attachment/:id/:timestamp_:style.:extension"

  belongs_to :cloth
  attr_accessible :cloth_attributes

  def create        
    @cloth = Cloth.create!(params[:cloth])  
  end
end
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails mass-assignment mongoid ruby-on-rails-3

-4
推荐指数
1
解决办法
768
查看次数