I hereby claim:
- I am jtigger on github.
- I am johnstuartryan (https://keybase.io/johnstuartryan) on keybase.
- I have a public key ASDd0aODh-TVueZB8lGlYdxnEoxu_BSRkMgn4l0eg_CoWAo
To claim this, I am signing this object:
Manually cleared again. |
I hereby claim:
To claim this, I am signing this object:
sed 's/@Test/@Test\'$'\n @Category(NotReady.class)/' ./accumulate/src/test/java/AccumulateTest.java | sed '0,/Category/s/Category/x/' |
package com.example; | |
class BaseClass { | |
public BaseClass() { | |
System.out.println("BaseClass constructor."); | |
someNonFinalMethod(); | |
} | |
public void someNonFinalMethod() { | |
System.out.println("BaseClass::someNonFinalMethod"); |
#! /usr/bin/env/ruby | |
require 'json' | |
RESPONSIVENESS_GOAL = 0.5 # "You have a 50/50 chance of getting a meaningful review." | |
def fetch_stats_for(track) | |
canvas_element = `curl --silent http://exercism.io/stats/#{track} | grep canvas` | |
stats_attr = /data-stats='(.*)'/.match canvas_element | |
stats_json = stats_attr[1] |
13:30:50.538 [DEBUG] [org.gradle.internal.resource.transport.http.JavaSystemPropertiesProxySettings] Found java system property 'http.nonProxyHosts': local|*.local|169.254/16|*.169.254/16. Will ignore proxy settings for these hosts. | |
13:30:50.634 [INFO] [org.gradle.BuildLogger] Starting Build | |
13:30:50.637 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /Users/jtigger/.gradle | |
13:30:50.638 [DEBUG] [org.gradle.BuildLogger] Current dir: /Users/jtigger/workspace/exercism/exercises/java/hello-world | |
13:30:50.638 [DEBUG] [org.gradle.BuildLogger] Settings file: null | |
13:30:50.638 [DEBUG] [org.gradle.BuildLogger] Build file: null | |
13:30:50.645 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources. | |
13:30:50.646 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave. | |
13:30:50.649 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: [] | |
13:30:50.649 [DEBUG] [org.gradle.initialization. |
class Person | |
attr_accessor :name | |
attr_reader :birthdate | |
def initialize | |
@birthdate = nil | |
@name = "Who?!" | |
@phonenumber = "800-123-4567" | |
end |
module AttributeLogger | |
def self.included(target_class) | |
target_class.extend(ClassMethods) | |
end | |
module ClassMethods | |
def log_attr(attribute) | |
AttributeLogger.raise_cannot_install_error_on attribute if !method_defined? "#{attribute}" | |
old_attr_reader = instance_method("#{attribute}") | |
define_method("#{attribute}") do |
# Idiom: Clean method overwriting | |
# Source: Jörg W Mittag -- http://stackoverflow.com/questions/4470108/when-monkey-patching-a-method-can-you-call-the-overridden-method-from-the-new-i/4471202#4471202 | |
# Problem: you want to overwrite an existing method and be able to invoke the old method in the new one, | |
# but you don't want to pollute the namespace with a method alias. | |
# Solution: capture the existing method in a local variable, define the new method using the define_method() method, capturing | |
# the local variable in the closure. | |
# Consequences: | |
# - be aware of what local variables are defined. Because they are captured in the closure, they are not candidates for | |
# garbage collection. |