sed -i -e "s/^#[[:space:]]//g" /etc/apt/sources.list
apt-get update
apt-get install -y build-essential mercurial zip unzip autoconf curl libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libfontconfig1-dev libasound2-dev
curl -s "https://get.sdkman.io" | bash
source "/root/.sdkman/bin/sdkman-init.sh"
mkdir /work
cd /work
hg clone http://hg.openjdk.java.net/loom/loom/
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.example | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.runApplication | |
import org.springframework.scheduling.annotation.EnableScheduling | |
@EnableScheduling | |
@SpringBootApplication | |
class Main |
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
plugins { | |
id 'java-library' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
api 'org.slf4j:slf4j-api:1.7.12' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example.bom</groupId> | |
<artifactId>generator</artifactId> | |
<version>1.0</version> | |
<packaging>pom</packaging> | |
<name>example bill of material</name> | |
<dependencyManagement> |
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
plugins { | |
id 'java-platform' | |
id 'maven-publish' | |
} | |
repositories { | |
mavenCentral() | |
} | |
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
plugins { | |
id 'maven-publish' | |
} | |
repositories { | |
mavenCentral() | |
} | |
configurations { | |
pom |
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
plugins { | |
id 'java' | |
id 'war' | |
} | |
repositories { | |
mavenLocal() | |
mavenCentral() | |
} |
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 main | |
import ( | |
"fmt" | |
"strings" | |
) | |
type Ord int | |
const ( |
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.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.InputStream; | |
import java.nio.charset.StandardCharsets; | |
class Scratch { | |
public static void main(final String[] args) { | |
final InputStream inputStream = new ByteArrayInputStream("foo,\nbar,\n,baz".getBytes(StandardCharsets.UTF_8)); | |
final String string = toString(inputStream); |
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
Benchmark Mode Cnt Score Error Units | |
c.e.list.ArrayList10000.listAdd thrpt 16 15.398 ± 0.118 ops/ms | |
c.e.list.ArrayList10000.listGet thrpt 16 52.297 ± 2.338 ops/ms | |
c.e.list.ArrayList10000.listInsert thrpt 16 6.930 ± 0.076 ops/ms | |
c.e.list.ArrayList10000.listIteration thrpt 16 75.450 ± 1.338 ops/ms | |
c.e.list.ArrayList10000.listRemove thrpt 16 15.037 ± 0.130 ops/ms | |
c.e.list.LinkedList10000.listAdd thrpt 16 13.765 ± 0.450 ops/ms | |
c.e.list.LinkedList10000.listGet thrpt 16 0.299 ± 0.003 ops/ms |