Skip to content

Instantly share code, notes, and snippets.

View sumitngupta's full-sized avatar

Sumit Gupta sumitngupta

View GitHub Profile
class WrongNumberOfPlayersError < StandardError ; end
class NoSuchStrategyError < StandardError ; end
def throw_result(m1, m2)
m1.upcase!
m2.upcase!
raise NoSuchStrategyError unless (m1 == "R" or m1 == "P" or m1 == "S") and (m2 == "R" or m2 == "P" or m2 == "S")
if m1 == "R" and m2 == "R"
return 1
sumit:~/tout>$ (feature|stashed:5) $ ./script/awsconsole staging
Warning: Permanently added 'awsdev.tout.com,23.21.128.57' (RSA) to the list of known hosts.
Warning: Permanently added 'ec2-23-22-171-28.compute-1.amazonaws.com,10.32.109.123' (ECDSA) to the list of known hosts.
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/tout/staging/vendor/gems/tout-text-rb_d848424d7/tout-text.gemspec:21:in ``': Cannot allocate memory - git ls-files (Errno::ENOMEM)
from /home/tout/staging/vendor/gems/tout-text-rb_d848424d7/tout-text.gemspec:21:in `block in <main>'
from /opt/ruby/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:in `initialize'
from /home/tout/staging/vendor/gems/tout-text-rb_d848424d7/tout-text.gemspec:1:in `new'
from /home/tout/staging/vendor/gems/tout-text-rb_d848424d7/tout-text.gemspec:1:in `<main>'
module ToutApp
module Foo
class Bar
end
end
end
// Patch Model and Collection.
_.each(["Model", "Collection"], function(name) {
// Cache Backbone constructor.
var ctor = Backbone[name];
// Cache original fetch.
var fetch = ctor.prototype.fetch;
// Override the fetch method to emit a fetch event.
ctor.prototype.fetch = function() {
// Trigger the fetch event on the instance.
initialize : function () {
products = new Pipeline.Collections.CampaignProducts();
products.reset(this.get('products'));
this.setProducts(products);
},
setProducts: function (products) {
this.products = products;
},
var Projects = Backbone.Collection.extend({
model : Project,
url : '/projects'
});
var Project = Backbone.Model.extend({
urlRoot : '/projects/:id'
});
# these routes are going to enable:
ThresholdBackbone.Routers.Projects = Backbone.Router.extend({
routes: {
'' : 'index',
':id' : 'show'
},
index: function() {
console.log("Index View!");
},
collection = new MyCollection();
collection.reset(this.get('attributesOfCollection'));
this.setCollection(collection);
setCollection: function (collection) {
this.collection = collection;
},
Pipeline.Views.Watchlists = Backbone.View.extend({
el: '#watchlists-container',
initialize: function () {
_.bindAll(this, 'render');
this.collection.bind('add', this.addToList);
},
Sep 10, 2011 2:17:51 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/admin/file/ params={file=schema.xml} status=0 QTime=0
Sep 10, 2011 8:23:03 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.NoSuchFieldError: rsp
at nl.jteam.search.spatial.GeoDistanceComponent.process(GeoDistanceComponent.java:62)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)