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
BufferedImage img = SwingFXUtils.fromFXImage(stage.getScene().snapshot(null), null); | |
ImageIO.write(img, "png", new File("snapshot.png")); |
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
// Just three variants of how to save animations to XML for animating FXML scenes | |
// Variant 1 | |
<timelines> | |
<timeline id="moveRight"> | |
<at time="0s"> | |
<property ofNode="meepButton" named="layoutX">0</property> | |
</at> | |
<at time="10s"> | |
<property ofNode="meepButton" named="layoutX" tween="linear">200</property> |
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 bugs; | |
import javafx.scene.control.ScrollPaneBuilder; | |
import javafx.scene.layout.AnchorPane; | |
import javafx.scene.layout.AnchorPaneBuilder; | |
import javafx.scene.layout.StackPaneBuilder; | |
public class LookupJava { | |
public static void main(String[] args) { | |
AnchorPane p = AnchorPaneBuilder.create() |
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 bugs; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.control.ScrollPaneBuilder; | |
import javafx.scene.layout.AnchorPane; | |
import javafx.scene.layout.AnchorPaneBuilder; | |
import javafx.scene.layout.StackPaneBuilder; | |
import javafx.stage.Stage; |
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
// This FXML: | |
<?xml version="1.0" encoding="UTF-8"?> | |
<?import java.lang.*?> | |
<?import java.util.*?> | |
<?import javafx.scene.control.*?> | |
<?import javafx.scene.layout.*?> | |
<?import javafx.scene.paint.*?> | |
<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml" fx:controller="org.fancy.Controller"> |
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
// Auto generated, changes will be overwritten | |
package org.fancy | |
import javafx.fxml.FXML | |
import javafx.scene.control.Button | |
object Controller { | |
@FXML | |
var meep: Button = ??? |
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
cheatsheet do | |
title 'Mercurial' # Will be displayed by Dash in the docset list | |
docset_file_name 'mercurial' # Used for the filename of the docset | |
keyword 'hg' # Used as the initial search keyword (listed in Preferences > Docsets) | |
introduction 'Mercurial Cheatsheet' # Optional, can contain Markdown or HTML | |
# A cheat sheet must consist of categories | |
category do | |
id '.hgignore' # Must be unique and is used as title of the category |
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
$ xiki | |
> Summary | |
The 'xiki' shell command is mostly meant to be called by programs | |
that want to interface with Xiki. But it is sometimes useful for | |
people to call it directly. Example usages: | |
$ xiki ip | |
$ xiki docs/faq | |
> Setting up your editor |
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 bash | |
IDEA='' | |
PROJECT_DIR='' | |
function main() { | |
openIdea "$@" | |
} | |
function openIdea() { |
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 ruby | |
ivy = File.join(Dir.home, '/.ivy2/local') | |
local = Dir[File.join(ivy, '*/*/*')] | |
if not local.empty? | |
puts "\e[1m\e[33mFiles in IVY local:" | |
local.each do |d| | |
puts "- " + d.sub(ivy + '/', '').split('/').map { |s| '"' + s + '"' }.join(' % ') | |
end |
OlderNewer