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 static java.util.Arrays.asList | |
import java.util.List | |
import java.util.Random | |
Random random = new Random() | |
int arrayCapacity = 10000 | |
def numbers = new java.lang.Integer[arrayCapacity + 1] |
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
@Grapes( | |
@Grab(group='com.google.guava', module='guava', version='32.1.3-jre') | |
) | |
import static com.google.common.collect.Lists.newArrayList | |
def numbers = [1, 2, 3, 4, 5] as int[] | |
def result = newArrayList (numbers) | |
println "numbers.class: ${numbers.class.name}, result.class: ${result.class.name}, result: $result" |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
import static java.util.Arrays.asList | |
import java.util.stream.Collectors; | |
import java.util.List; | |
import java.util.Arrays; | |
import java.util.Random |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
@Grab(group='com.google.guava', module='guava', version='32.1.3-jre') | |
import static com.google.common.collect.Lists.newArrayList | |
import java.util.stream.Collectors | |
import java.util.List | |
import java.util.Arrays |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
import static java.util.Arrays.asList | |
import java.util.stream.Collectors; | |
import java.util.List; | |
import java.util.Arrays; | |
import java.util.Random |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
import static java.util.Arrays.asList | |
import java.util.stream.Collectors | |
import java.util.List | |
import java.util.Arrays | |
import java.util.Random |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
import static java.util.Arrays.asList | |
import java.util.stream.Collectors | |
import java.util.List | |
import java.util.Arrays | |
import java.util.Random |
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
@Grab(group='com.jamonapi', module='jamon', version='2.82') | |
import com.jamonapi.Monitor | |
import com.jamonapi.MonitorFactory | |
import static java.util.Arrays.asList | |
import java.util.stream.Collectors; | |
import java.util.List; | |
import java.util.Arrays; | |
import java.util.Random |
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
package com.thospfuller | |
/** | |
* Tutorial regarding how to configure the H2 Database web server programmatically. | |
* | |
* Note that if we don't use the systemClassLoader we'll get the following exception: | |
* | |
* java.sql.SQLException: No suitable driver found for jdbc:h2:mem:example-db | |
*/ | |
@GrabConfig(systemClassLoader=true) |
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 java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
String[] values = { | |
"Apples", |
NewerOlder