View CallerProvider.java
public class CallerProvider extends SecurityManager { | |
public Class<?> getCallerClass() { | |
return getClassContext()[2]; | |
} | |
} |
View gist:8bd6d5b4569eaa923cbe
# Run complete. Total time: 00:00:20 | |
Benchmark (url) Mode Samples Score Error Units | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://foo.com/blah_blah ss 300 580,450 ± 100,057 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://142.42.1.1:8080/ ss 300 575,237 ± 99,833 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://例子.测试 ss 300 454,633 ± 50,617 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http//foo/ ss 300 181,290 ± 15,749 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp ///a ss 300 86,680 ± 17,834 us | |
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp :// should fail ss 300 80,807 ± 11,059 us | |
o.h.v.URLConstraintBenchmark.measureValid |
View gist:ba193caecb7d5cdbd0a4
javax.persistence.PersistenceException: org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException: Could not obtain JBoss Transactions transaction manager instance | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771) | |
at org.hibernate.jpa.internal.EntityManagerImpl.isOpen(EntityManagerImpl.java:170) | |
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(EntityManagerImpl.java:101) | |
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(EntityManagerImpl.java:96) | |
at org.hibernate.jpa.internal.EntityManagerImpl.getSession(EntityManagerImpl.java:111) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.setDefaultProperties(AbstractEntityManagerImpl.java:308) | |
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerIm |
View deps.java
File[] files = Maven.resolver() | |
.resolve( "org.apache.avro:avro:jar:1.7.6" ) | |
.withTransitivity() | |
.asFile(); | |
System.out.println( Arrays.toString( files ) ); |
View UC-1
// UC-1: As a user of OGM, upon an exception during flush(), I want to log all operations applied so far and abort the | |
// processing of the flush cycle |
View gradle.log
➜ hibernate-orm git:(HHH-9708) ✗ ./gradlew clean compileJava | |
:buildSrc:compileJava UP-TO-DATE | |
:buildSrc:compileGroovy UP-TO-DATE | |
:buildSrc:processResources UP-TO-DATE | |
:buildSrc:classes UP-TO-DATE | |
:buildSrc:jar UP-TO-DATE | |
:buildSrc:assemble UP-TO-DATE | |
:buildSrc:compileTestJava UP-TO-DATE | |
:buildSrc:compileTestGroovy UP-TO-DATE | |
:buildSrc:processTestResources UP-TO-DATE |
View github_pr_branch_links.user.js
// Copyright © 2015 Gunnar Morling | |
// This work is free. You can redistribute it and/or modify it under the | |
// terms of the Do What The Fuck You Want To Public License, Version 2, | |
// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
// ==UserScript== | |
// @name GitHub PR branch links | |
// @description Renders the source and target branches of GitHub pull requests as links | |
// @namespace http://gunnarmorling.de | |
// @include https://github.com/* |
View several_id_fields.java
@Id | |
@DocumentId | |
@NumericField(forField="id_forNumericSort") | |
@Field(name = "id_forNumericSort", store=Store.NO, index=Index.NO) | |
public Integer getId() { | |
return id; | |
} |
View 01_sorting_simple.java
@Field(analyzed=Analyze.NO) | |
@SortField | |
public String getLastname() { | |
return lastname; | |
} |
View NumericFieldTest.java
@Indexed | |
public class PointOfInterest { | |
@Id | |
@DocumentId | |
@Field(name = "myId") | |
@NumericField | |
private byte id; | |
... |