Goal:
one\n
two
Onboard JavaScript requires us to break the code formatting.
// based on https://github.com/Ocean-Moist/FizzBuzz/blob/master/src/Main.java | |
// from https://rohan.ga/blog/java/ | |
// run on JDK 23 with `java --enable-preview FizzBuzz.java` | |
void main() { | |
var testers = List.of( | |
new Tester(x -> x % 3 == 0, "Fizz"), | |
new Tester(x -> x % 5 == 0, "Buzz")); | |
IntStream | |
.rangeClosed(1, 100) |
[alias] | |
st = status --branch --short | |
look = log --graph --pretty='%C(red)%h%Creset %C(green)%ad%Creset %C(yellow)%<(15,trunc)%an%Creset %s %C(bold blue)%D%Creset' --date=format-local:'%d.%m.%Y %H%M' | |
look-close = log --graph --pretty='%C(red)%h%Creset %C(green)%cd%Creset %C(yellow)%<(15)%cn%Creset %C(bold blue)%D%Creset%n %C(dim green)%ad%Creset %C(dim yellow)%<(15)%an%Creset %s' --date=format-local:'%d.%m. %H%M' | |
hist = log --pretty='%C(red)%h%Creset %C(green)%cd%Creset %C(yellow)%<(12,trunc)%an%Creset %s %C(auto)%D%Creset' --date=format-local:'%Y-%m-%d %H:%M' | |
wat = !git look -15 | |
cd = checkout | |
patch = -c interactive.diffFilter='diff-highlight | less -FRX --tabs=4' add --patch | |
unstage = reset HEAD -- | |
unstage-patch = reset HEAD --patch |
// Two examples [1, 2] from EA Async written without async/await or | |
// (Completable)Futures as straight-forward blocking code. If the | |
// callers want to do something concurrently to `Store::buyItem`, | |
// they just put that call into a new virtual threads. | |
public class Store { | |
private final Bank bank = new Bank(); | |
private final Inventory inventory = new Inventory(); |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.stream.Stream; | |
// implementation of https://twitter.com/peterzllr/status/1413216826708877318 | |
public class Tree { | |
public static void main(String[] args) { | |
var tree = new Red( | |
new Black( |
package org.codefx.lab; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.Optional; | |
import java.util.function.Function; | |
import java.util.function.UnaryOperator; | |
import java.util.stream.Stream; | |
class Lab { |
<!-- executed during build --> | |
<plugin> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version><!-- currently 3.1.2 --></version> | |
<executions> | |
<execution> | |
<!-- with this ID, the command above picks up the config --> | |
<id>default-cli</id> | |
<!-- if `process-sources` doesn't match your needs --> | |
<phase>package</phase> |
Libraries, frameworks, and tools (IDEs, build tools) have widely varying support for the JPMS. I would like to create a model that makes it easy to judge a project for what it can and can't (yet) do - both for users and maintainers.
Conditions can usually be split into those for libraries/frameworks and those for tools, but that's not clear cut. Bytecode analysis tools, for example, may fall into both categories. So always look at both categories, and check which conditions apply to a given project.
This is work in progress - feedback welcome!
@SeleniumGridConfiguration(url = "http://0.0.0.0:4444") | |
class GridDemoTest { | |
@SeleniumGridTest | |
fun demo(driver: WebDriver) { | |
driver.get("https://blog.codefx.org") | |
val homeUrl = driver.findElement(By.className("img-hyperlink")).getAttribute("href") | |
assertThat(homeUrl).contains("blog.codefx.org") | |
} |
com.oracle.tools.packager.Bundler | |
com.oracle.tools.packager.Bundlers | |
com.sun.jdi.connect.Connector | |
com.sun.jdi.connect.spi.TransportService | |
com.sun.net.httpserver.spi.HttpServerProvider | |
com.sun.source.util.Plugin | |
com.sun.tools.attach.spi.AttachProvider | |
com.sun.tools.internal.ws.wscompile.Plugin | |
com.sun.tools.internal.xjc.Plugin | |
com.sun.tools.javac.platform.PlatformProvider |