This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assertThat( | |
listOf(1, 2, 3, 4, 5).filter { it < 3 } | |
).isEqualTo( | |
listOf(1, 2) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.codehaus.groovy</groupId> | |
<artifactId>groovy-all</artifactId> | |
<version>1.8.0</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishing.publications.all { | |
pom.withXml { | |
asNode().dependencies.'*'.findAll() { | |
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep -> | |
dep.name == it.artifactId.text() | |
} | |
}.each { it.scope*.value = 'compile'} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.aragost.javahg:javahg:0.4' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.aragost.javahg:javahg:0.4' | |
} | |
} | |
task revision << { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To get Id of object | |
//In VisualVM right click on instance of byte[] and select 'Copy ID' | |
var bytes = heap.findObject(0xe21b95d8); | |
var filePath = "c:/tmp/result.txt" | |
var fos = new java.io.FileOutputStream(filePath); | |
var len = bytes.length | |
for (var i=0; i<len; i++) { | |
fos.write(bytes[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project ... > | |
... | |
<dependencies> | |
<dependency> | |
<groupId>org.codehaus.groovy</groupId> | |
<artifactId>groovy-all</artifactId> | |
<version>2.1.8</version> | |
</dependency> | |
</dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.0</version> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
<compilerId>groovy-eclipse-compiler</compilerId> | |
<verbose>true</verbose> | |
<extensions>true</extensions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marshaller marshaller = jc.createMarshaller(); | |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); | |
marshaller.marshal(new JAXBElement<MyClass>(new QName("NameSpaceUri","ElementName"), MyClass.class, myClassInstance), System.out); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.activation.DataSource; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
/** | |
* Vzniklo to, protoze servisa, ktera ma zapnute @SchemaValidation | |
* Udela to, ze pri validaci zavola getInputStream a cely ho precte | |
* Potom se pri vyplnovani responsu znova zavola getInputStream a chce ho napsat do response, jenomze |
NewerOlder