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 static String getGermanMonthName( final String monthName ) { | |
return getLocalizedMonthName(monthName, Locale.GERMAN); | |
} | |
public static String getLocalizedMonthName( final String monthName, final Locale locale ) { | |
if ( monthName == null || monthName.isBlank() ) { | |
return null; | |
} | |
try { | |
final Month month = Month.valueOf(monthName.toUpperCase()); |
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
Map<String, Integer> map = new HashMap<>(); | |
map.put("Key1", 12); | |
map.compute("Key1", ( key, val ) -> (val == null) ? 1 : val + 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
package com.example; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.IntStream; | |
import org.assertj.core.api.SoftAssertions; | |
import org.junit.jupiter.api.Test; |
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.swing.*; | |
public class CredentialsDialog { | |
private String _email; | |
private String _password; | |
public String getEmail() { | |
return _email; |
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
[{"id":0,"name":"Gulasch","ingredients":[{"name":"Karoffeln","amount":200,"unit":"gram"},{"name":"Zwiebeln","amount":1,"unit":"pieces"},{"name":"Pilze","amount":100,"unit":"gram"},{"name":"Rindfleisch","amount":400,"unit":"gram"}]},{"id":1,"name":"Linsengemüse","ingredients":[{"name":"Linsen","amount":500,"unit":"gram"},{"name":"Zwiebeln","amount":1,"unit":"pieces"},{"name":"Lauch","amount":100,"unit":"gram"}]},{"id":2,"name":"Gemüseauflauf","ingredients":[{"name":"Karoffeln","amount":200,"unit":"gram"},{"name":"Lauch","amount":100,"unit":"gram"}]},{"id":3,"name":"Curry","ingredients":[{"name":"Karoffeln","amount":100,"unit":"gram"},{"name":"Lauch","amount":100,"unit":"gram"},{"name":"Kokosmilch","amount":1,"unit":"pieces"},{"name":"Hähnchen","amount":250,"unit":"gram"},{"name":"Paprika","amount":2,"unit":"pieces"}]}] |
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
Open Powershell as Administrator | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
Restart PC | |
Install a linux distribution from https://docs.microsoft.com/de-de/windows/wsl/install-win10 | |
Update regularly sudo apt update && sudo apt upgrade |
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
ls -v | cat -n | while read n f; do mv "$f" "$n.ext"; done |
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
Eier | |
Milch | |
Käse |