App.Views.VideoView = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'render');
this.model = this.options.model;
this.render();
},
render: function() {
JST.video({
model: this.model
});
return this;
}
});
App.Views.PlayListView = Backbone.View.extend({
el: $("#playlistWrapper"),
initialize: function(videos) {
_.bindAll(this, 'render');
this.modelViews = $.map(videos.models, function(model, i) {
return new App.Views.VideoView({
model: model
});
})
this.render();
},
render: function() {
var that = this;
$(this.el).clear();
$.each(this.modelViews, function(i, modelView) {
$(that).el.append(modelView.render().el);
});
return this;
}
});
Run Code Online (Sandbox Code Playgroud)
我总是低于错误
$(this.el).clear is not a function
[Break On This Error] $(this.el).clear();
Run Code Online (Sandbox Code Playgroud)
看来我的PlayerListView是空的.
我有div与id …
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<title></title>
<meta property="og:title" content="Katha Screenplay Darsakatvam (KSD) Appalaraju "/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://reviewumpire.com/movies/54-katha-screenplay-darsakatvam-ksd-appalaraju-"/>
<meta property="og:image" content="http://reviewumpire.com/images/uploads/movie/vertical/54/vert.jpg"/>
<meta property="og:site_name" content="ReviewUmpire"/>
<meta property="fb:app_id" content="162180660488445" />
<meta property="fb:admins" content="57728908711" />
<meta property="og:description" content="23% scored on reveiwumpire."/>
<meta name="google-site-verification" content="RXjWilEYk0eC_6ulYSV_AaFVSQe8nHI6Zw4_W9dVR5I" />
<script src="/javascripts/vendor/jquery.min.js?1306239220" type="text/javascript"></script>
<script src="/javascripts/vendor/quote.rotator.js?1306239220" type="text/javascript"></script>
<script src="/javascripts/vendor/scroll.js?1306239220" type="text/javascript"></script>
<script src="/javascripts/vendor/rails.js?1306239220" type="text/javascript"></script>
<script src="/javascripts/application.js?1306239220" type="text/javascript"></script>
<link href="/stylesheets/compiled/grid.css?1306239220" media="screen" rel="stylesheet" …
Run Code Online (Sandbox Code Playgroud) 当我尝试从Sequel连接MySQL时.我收到这些错误:
require 'rubygems'
require 'sequel'
DB = Sequel.connect(:adapter => 'mysql', :user => 'root', :host => 'localhost', :database => 'scanty',:password=>'xx')
DB.tables
Sequel::DatabaseConnectionError: NameError uninitialized constant Mysql::CLIENT_MULTI_RESULTS
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/mysql.rb:98:in `connect'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/database.rb:92:in `initialize'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:166:in `call'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:166:in `make_new'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:153:in `available'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:144:in `acquire'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:143:in `synchronize'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:143:in `acquire'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/connection_pool.rb:105:in `hold'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/database.rb:471:in `synchronize'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/mysql.rb:128:in `execute'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/dataset.rb:314:in `execute'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/mysql.rb:342:in `execute'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/mysql.rb:298:in `fetch_rows'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/dataset.rb:185:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/dataset/convenience.rb:156:in `map'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/dataset/convenience.rb:156:in `map'
from /opt/local/lib/ruby/gems/1.8/gems/sequel-3.2.0/lib/sequel/adapters/shared/mysql.rb:60:in `tables'
from …
Run Code Online (Sandbox Code Playgroud) 我需要一些在ruby中实现curry函数的例子(1.8.6或1.8.7而不是1.9).
我正在使用NSURLSession进行https网络呼叫.但是在ios 8中没有调用回调,但ios 7/ios 7.1中的回调相同.与此相关的ios 8是否有任何变化.
public func URLSession(session: NSURLSession, task: NSURLSessionTask, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential!) -> Void) {
Run Code Online (Sandbox Code Playgroud) 我在ios 8上收到CFNetwork SSLHandshake失败(-9806)错误.相同的代码在ios 7上工作正常但在ios 8上随机失败.
Failed system call was shmget(key=5432001, size=16498688, 03600).
HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 16498688 bytes), reduce PostgreSQL's shared_buffers parameter (currently 1536) and/or its max_connections parameter (currently 104).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case …
Run Code Online (Sandbox Code Playgroud) 我更改了我的.autotest
文件以使用基于Ruby的项目.
之后,当我想将它用于Rails时,它使用.autotest
我用于Ruby项目的配置设置.
我卸载了自动测试并重新安装它没有运气.我还删除了.autotest
根目录中的文件,但它无法正常工作.
ruby ×5
autotest ×1
backbone.js ×1
currying ×1
facebook ×1
heroku ×1
ios ×1
ios8 ×1
javascript ×1
macos ×1
mysql ×1
nsurlsession ×1
opengraph ×1
osx-lion ×1
postgresql ×1
scoping ×1
sequel ×1
sinatra ×1