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("gg.jte.gradle") version "2.2.2" | |
} | |
jte { | |
precompile() | |
} | |
tasks.withType<ProcessResources> { | |
dependsOn(tasks.withType<CompileSass>()) |
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
void putint(int zahl) { | |
char result[12]; | |
result[11] = '\0'; | |
bool negative = zahl < 0; | |
zahl = abs(zahl); | |
int i = 10; | |
for(; i > 0 && zahl != 0; i--) { | |
result[i] = (zahl % 10) + '0'; |
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 co.selim.filetransfer.receiver; | |
import java.io.DataInputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
public class Receiver { | |
public static void main(String[] args) throws Exception { |
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
#include <iostream> | |
#include <vector> | |
#include <fstream> | |
#include <algorithm> | |
#include "tinydir.h" | |
inline std::string trim(const std::string &s) { | |
auto wsfront = std::find_if_not(s.begin(), s.end(), [](int c) { return std::isspace(c); }); | |
auto wsback = std::find_if_not(s.rbegin(), s.rend(), [](int c) { return std::isspace(c); }).base(); |
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.Scanner; | |
public class Rechner { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.print("Zahl 1: "); | |
int a = Integer.parseInt(sc.nextLine()); | |
System.out.print("Zahl 2: "); | |
int b = Integer.parseInt(sc.nextLine()); | |
System.out.print("Operation: "); |
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; | |
public class WeirdBubbleSort { | |
public static void main(String[] args) { | |
int[] array = new int[] { 5, -13, 7, 3, 4, 2 }; | |
sort(array); | |
System.out.println(Arrays.toString(array)); | |
} | |
public static void sort(int[] array) { |
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" | |
) | |
func main() { | |
var foo [1000]int | |
var value = 400 |
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" | |
) | |
func main() { | |
foo := [...]int{ 5, 2, 623, 73, 3424, 6, 1, 672 } | |
// make slice out of foo |
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
public class ScrabbleWordTester { | |
public static void main(String[] args) { | |
char[] chars = { 'a', 'u', 'b', 'm' }; | |
System.out.println(charsCanBuildString(chars, "baum")); | |
System.out.println(charsCanBuildString(chars, "muab")); | |
System.out.println(charsCanBuildString(chars, "ab")); | |
System.out.println(charsCanBuildString(chars, "babo")); | |
System.out.println(charsCanBuildString(chars, "")); | |
} |
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.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class TextSplitter { | |
public static void main(String[] args) { | |
// These are just two lines that you have read from a file: | |
String firstLine = "hello? bartender. can I have a drink!whiskey please."; | |
String secondLine = "another. line."; |
NewerOlder