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
brew install librsvg | |
==> Installing dependencies for librsvg: fontconfig, pixman, cairo, libcroco, icu4c, harfbuzz, pango | |
==> Installing librsvg dependency: fontconfig | |
==> Downloading https://homebrew.bintray.com/bottles/fontconfig-2.11.1.yosemite.bottle.3.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/fontconfig-2.11.1.yosemite.bottle.3.tar.gz | |
==> Pouring fontconfig-2.11.1.yosemite.bottle.3.tar.gz | |
Error: Permission denied - /usr/local/var/cache | |
Warning: Bottle installation failed: building from source. | |
==> Downloading http://fontconfig.org/release/fontconfig-2.11.1.tar.bz2 | |
Already downloaded: /Library/Caches/Homebrew/fontconfig-2.11.1.tar.bz2 |
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
gem install squib | |
Building native extensions. This could take a while... | |
ERROR: Error installing squib: | |
ERROR: Failed to build gem native extension. | |
/Users/louiserains/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20150629-66096-vrc64y.rb extconf.rb | |
checking for --enable-debug-build option... no | |
checking for -Wall option to compiler... yes | |
checking for -Waggregate-return option to compiler... yes | |
checking for -Wcast-align option to compiler... yes |
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
rspec string_calculator.rb | |
.....F | |
Failures: | |
1) add negative number(s) | |
Failure/Error: raise "negatives not allowed - " + v.to_s if v | |
RuntimeError: | |
negatives not allowed - -3 | |
# ./string_calculator.rb:6:in `add' |
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
Test plan for the Orders page: | |
Use the following link for orders (replace the order_id): | |
https://testing.berkleemusic.com/store/admin/orders/one?order_id=13453427 | |
The expected name for BMB-125 is shown below. Make sure that it shows up on payments, items and vouchers. | |
12058228 Music Marketing: Press, Promotion, Distribution, and Retail (MM:PPDR) | |
9775405 MM:PPDR | |
3119453 Music Marketing 201 | |
14277150 Music Marketing 101 | |
13453427 Music Marketing 101 | |
13676052 Music Marketing 101 |
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
--Function parameters: cart_item_id (ec_items) | |
product_name (ec_products) | |
--returns the title of the course at that point in time. | |
create or replace function public.get_historical_name ( integer, varchar ) | |
returns varchar as ' | |
declare | |
v_cart_item_id alias for $1; | |
v_product_name alias for $2; |
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
>> require 'kdtree' | |
true | |
>> point_array = [ [3,5],[14,0],[0,3],[-5,6],[-2,-3],[-4,-7],[2,-5],[0,0] ] | |
[ | |
[0] [ | |
[0] 3, | |
[1] 5 | |
], | |
[1] [ | |
[0] 14, |
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 Point | |
attr_accessor :x, :y | |
end | |
class QuadtreeNode | |
attr_accessor :point, :name | |
def northwest(other) | |
self.point.x > other.point.x && self.point.y < other.point.y | |
end |
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 Graph | |
attr_accessor :points, :edges | |
def initialize(array_of_points) | |
points = Marshal.load(Marshal.dump(array_of_points)) | |
puts "in initialize where graph.points is #{points}" | |
edges=[] | |
construct_edges | |
end |
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
require 'spec_helper.rb' | |
require 'lib/sf_to_coll/convert.rb' | |
require 'rake' | |
describe SfToColl::Convert do | |
context "main file for single record should be 2186 chars long" do | |
Rake::Task["import_field_data"].invoke | |
let(:converter){ SfToColl::Convert.new("tmp/ctbrown.csv").process } | |
let(:out_file_name){ converter.out_file_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
module Euler | |
class Prob1 | |
def self.sum(upper_limit, num1, num2) | |
::Prob1.new(upper_limit, num1, num2).sum | |
end | |
def initialize(upper_limit, num1, num2) | |
puts "#{upper_limit} | #{num1} #{num2}" |
NewerOlder