I hereby claim:
- I am corneil on github.
- I am corneil (https://keybase.io/corneil) on keybase.
- I have a public key ASDB40W4Wve9epF06pwJoXAKLcK4H5ivgHUjJsOct3FAlAo
To claim this, I am signing this object:
Verifying that +corneil is my blockchain ID. https://onename.com/corneil |
198.245.55.60 - - [15/Mar/2016:15:22:02 +0000] "GET / HTTP/1.1" 302 499 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:04 +0000] "GET / HTTP/1.1" 401 3970 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:04 +0000] "GET /script HTTP/1.1" 302 511 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:05 +0000] "GET /script HTTP/1.1" 401 3970 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:07 +0000] "GET /jenkins/script HTTP/1.1" 302 527 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:08 +0000] "GET /jenkins/script HTTP/1.1" 401 3970 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:08 +0000] "GET /login HTTP/1.1" 302 509 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:09 +0000] "GET /login HTTP/1.1" 401 3970 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:10 +0000] "GET /jmx-console HTTP/1.1" 302 521 "-" "Python-urllib/2.7" | |
198.245.55.60 - - [15/Mar/2016:15:22:11 +0000] "GET /jmx-console HTTP/1.1" 401 3970 "-" "Python |
import groovy.io.FileType | |
def showOnly = true | |
def repoHome = new File(System.getProperty('user.home'), '.m2/repository') | |
def searchFolders = [] | |
args.each { arg -> | |
if(arg == '-s') { | |
showOnly = true | |
} else if(arg == '-d') { | |
showOnly = false | |
} else { |
java.lang.NullPointerException | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:498) | |
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) | |
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) | |
at com.sun.proxy.$Proxy148.getLockModeType(Unknown Source) | |
at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.createQuery(QueryDslJpaRepository.java:180) | |
at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:101) |
public Object getTarget() throws Exception { | |
MethodInvocation invocation = ExposeInvocationInterceptor.currentInvocation(); | |
return TransactionSynchronizationManager.getResource(invocation.getMethod()); // this call has different parameter. | |
} |
I hereby claim:
To claim this, I am signing this object:
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.neo4j.examples</groupId> | |
<artifactId>sdn5-movies</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> |
inline fun <T> T.ifZero(exp: Int, block: T.() -> Int): Int = if (exp == 0) block() else exp | |
// using | |
data class User( | |
val firstName: String, | |
val lastName: String, | |
val dateOfBirth: Date | |
) : Comparable<User> { | |
// classic comparator. |
inline fun <K, V> Map<K, V>.getRequired(key: K): V = this.get(key) ?: throw IllegalArgumentException("$key not found in $keys") | |
fun main() { | |
val aMap = mapOf("a" to 1, "b" to 2, "c" to 3) | |
val anA = aMap.get("a") ?: error("a not found in ${aMap.keys}") | |
// while line reads easier | |
val guaranteedB = aMap.getRequired("b") | |
inline fun <T> T.ifApply(expression: Boolean, block: T.() -> Unit, otherwise: T.() -> Unit) : T { | |
return if(expression) { | |
this.apply(block) | |
} else { | |
this.apply(otherwise) | |
} | |
} | |
inline fun <T> T.ifApply(expression: Boolean, block: T.() -> Unit) : T { | |
if(expression) { |