String str = line.substring(0, "05.02.2021 01:53:26".length()); DateTimeFormatter pattern = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm:ss"); LocalDateTime date = LocalDateTime.parse(str, pattern);
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
https://medium.com/@hazraarka072/fluent-builder-and-powering-it-up-with-recursive-generics-in-java-483005a85fcd |
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 adapter from '@sveltejs/adapter-node'; | |
import { vitePreprocess } from '@sveltejs/kit/vite'; | |
/** @type {import('@sveltejs/kit').Config} */ | |
const config = { | |
// Consult https://kit.svelte.dev/docs/integrations#preprocessors | |
// for more information about preprocessors | |
preprocess: vitePreprocess(), | |
kit: { |
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
sourceCompatibility = JavaVersion.VERSION_17 | |
targetCompatibility = JavaVersion.VERSION_17 | |
compileJava.options.encoding = 'UTF-8' | |
compileTestJava.options.encoding = 'UTF-8' |
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
/** | |
* non case-sensitive replace() | |
* @param text to be changed text | |
* @param alt this text is to be replaced | |
* @param neu replace by this text | |
* @return text with replaced alt | |
*/ | |
public static String ireplace(final String text, final String alt, final String neu) { | |
return text.replaceAll("(?i)" + alt.replace("{", "\\{").replace("}", "\\}"), neu); | |
} |
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
/*Gradle: | |
implementation 'com.github.bbottema:simple-java-mail:5.0.1' | |
aktuellste Version ist mittlerweile: group: 'org.simplejavamail', name: 'simple-java-mail', version: '6.6.1' | |
Webseite: https://www.simplejavamail.org/features.html */ | |
import java.time.LocalDateTime; | |
import org.pmw.tinylog.Logger; | |
import org.simplejavamail.email.EmailBuilder; | |
import org.simplejavamail.mailer.Mailer; |
regex: ^(\s*\r?\n){2,}
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
- Strg+K (Einstellungen) > Dokumente > Aktuellen Status des Werkzeugfenster speichern | |
- Werkzeugkasten am rechten Rand einklappen, ganz unten rechts kann man den ganz einklappen | |
- Strg+K > Seitenanzeige: Seitenlayout=Einzelne Seite, fortlaufend. Zoom: Fenstergröße |
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
// Get subdir relative to given base dir | |
// Path base = ... | |
// Path file = ... | |
Path rel = base.relativize(file); | |
String subdir = rel.getParent() == null ? "" : rel.getParent().toString(); |
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
startScripts { | |
doLast { // Remove too-long-classpath and use wildcard (works for Java 6 and above only) | |
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*') | |
} | |
} |
NewerOlder