Skip to content

Instantly share code, notes, and snippets.

View SeanRoberts's full-sized avatar

Sean Roberts SeanRoberts

View GitHub Profile
...skipped <pbin.v2/libs/graph/build/darwin-4.2.1/release/link-static/threading-multi>libboost_graph.a for lack of <pbin.v2/libs/graph/build/darwin-4.2.1/release/link-static/threading-multi>read_graphviz_new.o...
...skipped <pstage/lib>libboost_graph.a for lack of <pbin.v2/libs/graph/build/darwin-4.2.1/release/link-static/threading-multi>libboost_graph.a...
darwin.compile.c++.pch bin.v2/libs/math/build/darwin-4.2.1/release/link-static/threading-multi/../src/tr1/pch.hpp.gch
In file included from libs/math/build/../src/tr1/pch.hpp:9:
In file included from ./boost/math/special_functions.hpp:18:
In file included from ./boost/math/special_functions/bessel.hpp:17:
In file included from ./boost/math/special_functions/detail/bessel_jy.hpp:14:
In file included from ./boost/math/special_functions/gamma.hpp:1528:
In file included from ./boost/math/special_functions/detail/igamma_inverse.hpp:13:
./boost/math/tools/tuple.hpp:18:14: error: no member named 'tuple' in namespace 'std'
class APP.features.maps.base.InfoWindowPositionManager
constructor: (@infoWindow) ->
@markerPosition = @getMarkerPosition()
@quadrant = @getQuadrant()
@windowPosition = @getWindowPosition()
# Getting the pixel position of a marker involves generating an overlay
# across the whole map and then finding the marker's pixel position
# within that overlay. Hacky but that's how you do it for now.
getMarkerPosition: =>
div{bind-attr class=':info-window activeListings:active'} style=infoWindowStyle mouseEnter='preventInfoWindowHide' mouseLeave='allowInfoWindowHide'
class Product < ActiveRecord::Base
def brand_name=(name)
self.brand = Brand.find_by_name(name)
end
end
# Listing Images
exteriors = Dir.glob(Rails.root.join('extra/test-pics/exteriors/*'))
interiors = Dir.glob(Rails.root.join('extra/test-pics/interiors/*'))
Listing.all.each do |listing|
[exteriors, interiors, interiors, interiors, interiors, interiors].each do |pics|
path = pics.sample
File.open(path) do |f|
asset = Tenon::Asset.create(attachment: f)
if asset.valid?
listing.listing_images.create(image_id: asset.id)
App.ApplicationController = Ember.ArrayController.extend
tabs: [
Ember.Object.create({ icon: 'fa-map-marker', name: 'map', title: 'View on Map', active: true })
Ember.Object.create({ icon: 'fa-list', name: 'list', title: 'View in List' }),
]
activeTab: (->
@get('tabs').findBy('active', true).get('name')
).property('tabs.@each.active')
Ember.Application.initializer
name: 'itineraryInstantiator'
initialize: (container, application) ->
store = container.lookup('store:main')
if $.cookie('itinerary-id')
currentItinerary = store.find('itinerary', $.cookie('itinerary-id'))
else
currentItinerary = store.createRecord('itinerary', {}).save().then ->
$.cookie('itinerary-id', currentItinerary.get('uniqueKey'))
Ember.Application.initializer
name: 'itineraryInstantiator'
initialize: (container, application) ->
application.deferReadiness()
store = container.lookup('store:main')
if $.cookie('itinerary-id')
currentItinerary = store.find('itinerary', $.cookie('itinerary-id'))
else
# My model
OH.Itinerary = DS.Model.extend
listings: DS.hasMany('listing')
# Some code
itinerary = @get('currentItinerary')
itinerary.get('listings').pushObject(@get('listing'))
itinerary.save()