I hereby claim:
- I am danlucraft on github.
- I am danlucraft (https://keybase.io/danlucraft) on keybase.
- I have a public key whose fingerprint is 7395 C2F4 B97D 3FB8 2CD2 B439 D8D7 ECC8 B94E 2764
To claim this, I am signing this object:
inlines: { | |
link: { | |
// No link should be present but empty (default normalize should remove | |
// it if this returns false). | |
text: function(string) { | |
return string.length !== 0 | |
}, | |
// If the text node after a link inline is empty... |
var PIXEL_WIDTH = 160 | |
var PIXEL_HEIGHT = 120 | |
var WIN_WIDTH = window.innerWidth | |
var WIN_HEIGHT = window.innerHeight | |
var ratio_width = WIN_WIDTH / PIXEL_WIDTH | |
var ratio_height = WIN_HEIGHT / PIXEL_HEIGHT | |
var pixel_size = Math.floor(Math.min(ratio_width, ratio_height)) |
use std::os; | |
fn choose_k<'r, T>(arr: &[&'r T], k: uint) -> Vec<Vec<&'r T>> { | |
if k > arr.len() { | |
vec![] | |
} else if k == 0 { | |
vec![vec![]] | |
} else { | |
let mut result: Vec<Vec<&T>> = choose_k(arr.slice(1, arr.len()), k - 1).into_iter().map(|v| { | |
let mut x = vec![arr[0]]; |
012.rs:82:29: 82:47 error: type mismatch: the type `collections::vec::Vec<collections::vec::Vec<uint>>` | |
implements the trait `core::iter::FromIterator<collections::vec::Vec<uint>>`, but the trait | |
`core::iter::FromIterator<&collections::vec::Vec<uint>>` is required (expected &-ptr, found struct | |
collections::vec::Vec) | |
012.rs:82 let b: Vec<Vec<uint>> = a.iter().collect(); | |
^~~~~~~~~~~~~~~~~~ | |
error: aborting due to previous error |
I hereby claim:
To claim this, I am signing this object:
// Enable or reset Disqus for this page as required, with optional SSO. | |
// There must be a div with id "disqus_thread" when called. | |
// | |
// config is required and should have the format: | |
// | |
// { | |
// shortname: "..", | |
// title: "..", | |
// identifier: "..", | |
// url: ".." |
App.DesignsRoute = Ember.Route.extend({ | |
setupController: function(controller) { | |
controller.set("model", App.Design.findAll()); | |
} | |
}); | |
App.DesignsController = Ember.ArrayController.extend({ | |
sortProperties: ["name"], | |
sortAscending: true | |
}); |
VCR.configure do |v| | |
v.register_request_matcher :json_aware_body do |r1, r2| | |
r1.body == r2.body || ( | |
r1.headers["Content-Type"].inspect =~ /json/ and JSON.parse(r1.body) == JSON.parse(r2.body)) | |
end | |
end | |
VCR.use_cassette('example', :match_requests_on => [:json_aware_body]) do | |
#... |
cd workspaces/geoip-service | |
rm -rf tmp | |
rm -rf src/geoip-service | |
rm -f geoip-service | |
mkdir tmp | |
mv src/* tmp/ | |
mkdir src/geoip-service | |
mv tmp/* src/geoip-service/ | |
echo $PWD | |
export GOPATH=$PWD |
require 'minitest/autorun' | |
# Show what return in a block does to return values and code after the block is run | |
class TestReturn < Minitest::Unit::TestCase | |
def setup | |
@post_code_run = false | |
end | |
# Method under test |