Skip to content

Instantly share code, notes, and snippets.

View AdrianAtHumboldt's full-sized avatar

Adrian Cox AdrianAtHumboldt

View GitHub Profile
@AdrianAtHumboldt
AdrianAtHumboldt / ScopeTest.kt
Created July 20, 2017 11:02
Be careful apply-ing to a nullable reference: name resolution within the block may not be what you expect.
package ScopeTest
class Inner() {
fun activate(x: String) {
println("Activate Inner ($x)")
}
}
class Outer(var inner: Inner?) {
@AdrianAtHumboldt
AdrianAtHumboldt / AccessProperty.kt
Created June 3, 2017 18:39
Difference between Bean::property::get and Bean::property.getter
fun <T> access(thing: T, getter: (T) -> String?) {
println("Got " + getter(thing))
}
@AdrianAtHumboldt
AdrianAtHumboldt / QuartzJob.java
Created May 31, 2016 20:33
Updated Example of Custom Annotations for Quartz Jobs
package uk.co.humboldt.Application.Services;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.lang.annotation.*;
/**
* Based on http://sivalabs.in/2011/10/spring-and-quartz-integration-using-custom-annotation/
*/