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
create table things(id int not null auto_increment, created_at date, user varchar(32), amount decimal(10,2), primary key(id)); | |
insert into things(created_at, user, amount) values (date'2021-10-02', 'michael', 5); | |
insert into things(created_at, user, amount) values (date'2021-10-02', 'markus', 10); | |
insert into things(created_at, user, amount) values (date'2021-10-03', 'markus', 15); | |
insert into things(created_at, user, amount) values (date'2021-10-04', 'markus', 5); | |
// Correct | |
select avg(amount) from things; | |
// Same value but really hard to understand |
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
${{ github.event.sender.login != 'dependabot[bot]' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }} |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//JAVA 17 | |
//DEPS com.tagtraum:obstmusic:0.9.2 | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.TimeUnit; | |
import com.tagtraum.macos.music.Application; | |
import com.tagtraum.macos.music.Epls; |
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.molecues; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.Objects; | |
import java.util.Set; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.function.Supplier; | |
import org.springframework.boot.CommandLineRunner; |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<executions> | |
<execution> | |
<goals> | |
<goal>compile</goal> | |
</goals> |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//JAVA 16 | |
//JAVAC_OPTIONS -source 16 | |
//DEPS info.picocli:picocli:4.6.1 | |
//DEPS io.javalin:javalin:3.13.9 | |
//DEPS org.neo4j.driver:neo4j-java-driver:4.3.3 | |
//DEPS org.neo4j:neo4j-graphql-java:1.3.0 | |
//DEPS com.fasterxml.jackson.core:jackson-databind:2.10.5 | |
//DEPS org.slf4j:slf4j-simple:1.7.31 | |
package com.example.graphqlplain; |
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
module neo4jonmodules { | |
requires spring.beans; | |
requires spring.boot; | |
requires spring.boot.autoconfigure; | |
requires spring.data.neo4j; | |
// Well, the object mapper uses reflection, little surprising | |
opens com.example.cypherdsljava11test to spring.core; | |
// And yep, if we want to create beans from that package, it must be exported |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
import static java.lang.System.*; | |
public class fizzbuzz { | |
public static void main(String... args) { | |
for (int i = 1; i <= 100; i++) { | |
if (i % 3 == 0) out.print("Fizz"); | |
if (i % 5 == 0) out.print("Buzz"); |
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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//JAVA 16 | |
//JAVAC_OPTIONS -source 16 | |
//DEPS info.picocli:picocli:4.2.0 | |
//DEPS org.asciidoctor:asciidoctorj:2.4.2 | |
//DEPS org.fusesource.jansi:jansi:2.1.1 | |
import picocli.CommandLine; | |
import picocli.CommandLine.ExitCode; | |
import picocli.CommandLine.Option; |
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.demo.movies; | |
import reactor.core.publisher.Flux; | |
import reactor.core.publisher.Mono; | |
import java.time.Duration; | |
import java.time.LocalDateTime; | |
import java.util.concurrent.atomic.AtomicReference; | |
import org.springframework.data.domain.Sort; |