This file contains hidden or 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.ArrayList; | |
| import java.util.Comparator; | |
| import java.util.Scanner; | |
| public class Tilastointia { | |
| public static void main(String... args) { | |
| ArrayList<Integer> luvut = keraaLuvut(); | |
| luvut.sort(Comparator.naturalOrder()); |
This file contains hidden or 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.Scanner; | |
| public class LainaLaskuri { | |
| public static void main(String[] args) { | |
| laskeLaina(); | |
| } | |
| private static void laskeLaina() { | |
| Scanner lukija = new Scanner(System.in); |
This file contains hidden or 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
| public class LaatikonPiirto { | |
| public static void main(String[] args) { | |
| piirraLaatikko(); | |
| } | |
| /** | |
| * ###### | |
| * # # | |
| * # # | |
| * ###### |
This file contains hidden or 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.Scanner; | |
| public class Uudestaan { | |
| public static void main(String[] args) { | |
| Scanner lukija = new Scanner(System.in); | |
| while (true) { | |
| System.out.println("Syötä luku"); | |
| int luku = Integer.parseInt(lukija.nextLine()); |
This file contains hidden or 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.Scanner; | |
| public class BMI { | |
| public static void main(String[] args) { | |
| Scanner lukija = new Scanner(System.in); | |
| System.out.print("Syötä paino (kg): "); | |
| Double paino = Double.parseDouble(lukija.nextLine()); | |
| System.out.print("Syötä pituus (cm): "); |
This file contains hidden or 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.Scanner; | |
| public class Test { | |
| public static void main(String[] args) { | |
| String input = "vittu\n30\n"; | |
| Scanner scanner = new Scanner(input); | |
| String nimi; | |
| int pituus = 0; |
This file contains hidden or 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
| FROM gradle:jdk8-alpine AS GRADLE_BUILD | |
| COPY build.gradle /tmp/ | |
| COPY src /tmp/src | |
| WORKDIR /tmp | |
| RUN gradle bootJar | |
| FROM java:openjdk-8-jre | |
| RUN mkdir /app | |
| COPY --from=GRADLE_BUILD /tmp/build/libs/opentracing-http-api-*.jar /app/opentracing-http-api.jar |
This file contains hidden or 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
| || visible in terminal || visible in file || existing | |
| Syntax || StdOut | StdErr || StdOut | StdErr || file | |
| ==========++==========+==========++==========+==========++=========== | |
| > || no | yes || yes | no || overwrite | |
| >> || no | yes || yes | no || append | |
| || | || | || | |
| 2> || yes | no || no | yes || overwrite | |
| 2>> || yes | no || no | yes || append | |
| || | || | || | |
| &> || no | no || yes | yes || overwrite |
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| source $DIR/settings.conf | |
| T="$(date +%s%N)" | |
| FILENAME="$(date +%s).zip" | |
| TMP_DIR=$DIR/tmp${T} |