This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.$watch( | |
'feed', | |
function( | |
newVal, | |
oldVal | |
) { | |
$scope.form.changed = ( newVal != oldVal ) ? | |
true : | |
$scope.form.changed; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/workspace/test$ webdriver-manager start | |
seleniumProcess.pid: 33575 | |
14:06:52.321 INFO - Launching a standalone Selenium Server | |
Setting system property webdriver.chrome.driver to /usr/local/lib/node_modules/protractor/selenium/chromedriver_2.21 | |
14:06:52.359 INFO - Java: Oracle Corporation 25.92-b14 | |
14:06:52.359 INFO - OS: Mac OS X 10.11.4 x86_64 | |
14:06:52.377 INFO - v2.52.0, with Core v2.52.0. Built from revision 4c2593c | |
14:06:52.443 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: | |
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC | |
14:06:52.443 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is where im using the unique function | |
var result = boxxspring.arrayUnique( results[1].concat( artifacts ), function( a, b ) { | |
return a.id == b.id ? 0 : 1; | |
}); | |
// this is the definition of the unique array function | |
boxxspring.arrayUnique = function( array, comparator ) { | |
var comparator = comparator || function( a, b ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/participant/actions?access_token=6331a62ff1b1dba5b56f0db2ad39fd17&actionable_id=1&property_code=networka&types=like" for 127.0.0.1 at 2013-11-13 16:51:45 -0500 | |
Processing by Participant::ActionsController#index as JSON | |
Parameters: {"access_token"=>"6331a62ff1b1dba5b56f0db2ad39fd17", "actionable_id"=>"1", "property_code"=>"networka", "types"=>"like"} | |
Property Load (0.5ms) SELECT "properties".* FROM "properties" WHERE "properties"."code_name" = 'networka' LIMIT 1 | |
Participation Load (0.3ms) SELECT "participations".* FROM "participations" WHERE "participations"."property_id" = $1 AND "participations"."id" = $2 LIMIT 1 [["property_id", 2], ["id", 10]] | |
Action::Base Load (0.3ms) SELECT "actions".* FROM "actions" WHERE "actions"."participation_id" = $1 AND "actions"."type" IN ('Action::Like') AND "actions"."actionable_id" = 1 ORDER BY created_at DESC LIMIT 10 OFFSET 0 [["participation_id", 10]] | |
Participation Load (0.2ms) SELECT "participations".* FROM "participations" WHERE "participati |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bedrocket-Greenie:bedrocket-api (develop) ng$ rake app:reset | |
PG::InvalidParameterValue: ERROR: invalid value for parameter "TimeZone": "UTC" | |
: SET time zone 'UTC' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@bedrocket-api/gems/activerecord-4.0.1.rc3/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `exec' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@bedrocket-api/gems/activerecord-4.0.1.rc3/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@bedrocket-api/gems/activerecord-4.0.1.rc3/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@bedrocket-api/gems/activesupport-4.0.1.rc3/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@bedrocket-api/gems/activerecord-4.0.1.rc3/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log' | |
/Users/pivotal/.rvm/gems/ruby-2.0.0-p247@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is the view: | |
<div ng-repeat="action in actions | filter:presentableAction" ng-include="templateForAction( action )"></div> | |
This is the filter: | |
$scope.presentableAction = function( action ) { | |
var presentable = false; | |
switch( action.action_type ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Post < ActiveRecord::Base | |
attr_accessor :tag_names | |
has_many :post_tags, :dependent => :destroy | |
has_many :tags, :through => :post_tags | |
after_save :assign_tags | |
def assign_tags | |
if @tag_names | |
self.tags = @tag_names.split(/\s+/).map do |name| | |
Tag.find_or_create_by_name(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
People = [ | |
"John", | |
"Joe", | |
"Sue", | |
"Bob", | |
"Nick", | |
"Adam", | |
"Kevin"] | |
Games = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<listing> | |
<created-at type="datetime">2011-03-09T17:28:40Z</created-at> | |
<description>Awesome thinger for sale</description> | |
<id type="integer">2</id> | |
<lat type="float">35.0</lat> | |
<lng type="float">40.0</lng> | |
<phone-number>+15558675309</phone-number> | |
<photo-url>http://example.com/photo.jpg</photo-url> | |
<price type="integer">10</price> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<listing> | |
<description>Blah blah blah</description> | |
<lat type="float">99.0</lat> | |
<lng type="float">3.14</lng> | |
<management-url>b309554196ab5e431</management-url> | |
<phone-number>+15558675310</phone-number> | |
<photo-url>http://example.com/photo2.jpg</photo-url> | |
<price type="integer">20</price> | |
<status>deleted</status> |
NewerOlder