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 $? | |
// The GOAP functionality is not fully integrated in FXGL yet, so we need to grab it | |
// from the Snapshots Maven Central repository. | |
//REPOS mavencentralsnapshots,acme=https://oss.sonatype.org/content/repositories/snapshots | |
// This is the FXGL version we need for this demo. | |
// 21+dev-SNAPSHOT has a first implementation of the GOAP functionality. | |
//DEPS com.github.almasb:fxgl:21+dev-SNAPSHOT |
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
// Read the full explanation of this code on this blog post: | |
// https://webtechie.be/post/2024-09-26-java-bits-bytes-short-int-long-signed-unsigned/ | |
public class SignedUnsigned { | |
public static void main(String[] args) { | |
System.out.println("0 to 15 as bits:"); | |
System.out.println("Value\tBits\tHex"); | |
for (int i = 0; i <= 15; i++) { | |
System.out.println(i | |
+ "\t" + String.format("%4s", Integer.toBinaryString(i)).replace(' ', '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
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.openjfx:javafx-controls:22.0.2 | |
//DEPS org.openjfx:javafx-graphics:22.0.2:${os.detected.jfxname} | |
import javafx.animation.AnimationTimer; | |
import javafx.animation.KeyFrame; | |
import javafx.animation.Timeline; | |
import javafx.application.Application; | |
import javafx.geometry.Pos; |
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 $? | |
//DEPS org.openjfx:javafx-controls:22.0.2 | |
//DEPS org.openjfx:javafx-graphics:22.0.2:${os.detected.jfxname} | |
import javafx.animation.AnimationTimer; | |
import javafx.animation.KeyFrame; | |
import javafx.animation.Timeline; | |
import javafx.application.Application; | |
import javafx.geometry.Pos; |
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
git branch --merged origin/master | grep -v master | xargs git branch -d |