http://apartmentsbytroy.com/Apartments_by_Troy/Apartments.html
http://www.apartmentfinder.com/Oregon/Portland-Apartments#map
| #################################################### | |
| # Rspec matchers/expectations | |
| #################################################### | |
| ##USE EXPECT(foo) NOT (foo).SHOULD | |
| ```ruby | |
| expect(foo).to eq(bar) |
I hereby claim:
To claim this, I am signing this object:
| (defn prob3 [target] | |
| (let [factorials [] biggest target] | |
| (dotimes [num target] | |
| (if-not (or (contains? [0, 1] num) (> num biggest)) | |
| (if (= (rem target num) 0) | |
| (recur [(/ biggest num) | |
| (if-not (contains? factorials num) | |
| (def factorials (conj factorials num))) |
| [6] website » data = ['foo','bar'] | |
| [7] website » require 'yaml' | |
| => false | |
| [8] website » File.open('foobar_dump.yml','w') do |f| | |
| » YAML.dump(data, f) | |
| » end | |
| => nil | |
| [9] website » |
| $ for i in `seq 20`; do bundle exec rescue rspec spec/services/seed_service_spec.rb; done |
| { | |
| "auto_match_enabled": false, | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", |
| extern crate hla_rs; | |
| extern crate image; | |
| use hla_rs::extensions; | |
| use image::GenericImage; | |
| use image::ImageBuffer; | |
| fn main() { | |
| let path = &Path::new("/Users/theoretick/code/rust/hla_rs/Test.png"); | |
| let img = image::open(path).unwrap(); |
| { | |
| "hobbies": [ | |
| { | |
| "name": "piano", | |
| "tags": [ "#music" ] | |
| }, | |
| { | |
| "name": "kickboxing", | |
| "tags": [ "#sports" ] | |
| }, |
| #!/usr/bin/env ruby | |
| # generate a growing value for each letter (in this case its place in the alphabet, e.g. j == 9) | |
| # for each character in the string take the index position of the character (where it is in the | |
| # string) and save that value + 1 with the character. Indexes always start w/ zero, that's why | |
| # we need to add 1. `map` means for each value we produce, save them all and return them together. | |
| letters_with_numeric_values = 'abcdefghijklmnopqrstuvwxyz'.chars.each_with_index.map do |letter, i| | |
| [letter, i+1] | |
| end | |