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
// Ensure you have jfxrt.jar added to the classpath | |
import javafx.application.Application | |
import javafx.scene.media.Media | |
import javafx.scene.media.MediaPlayer | |
import javafx.stage.Stage | |
class MP3Player extends Application { | |
def start(primaryStage: Stage) { | |
val resource = getClass().getResource((getParameters().getRaw()).get(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
import java.util.Arrays; | |
public class InsertionSorter { | |
public static void main(String[] args) { | |
String[] argsCopy = new String[args.length]; | |
System.arraycopy(args, 0, argsCopy, 0, args.length); | |
System.out.println("Original: " + Arrays.toString(args)); | |
Arrays.sort(args, null); | |
sort(argsCopy); | |
System.out.println("Arrays.sort: " + Arrays.toString(args)); |
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 java.util.Arrays; | |
public class MergeSorter { | |
public static void main(String[] args) { | |
String[] argsCopy = new String[args.length]; | |
System.arraycopy(args, 0, argsCopy, 0, args.length); | |
System.out.println("Original: " + Arrays.toString(args)); | |
Arrays.sort(args, null); | |
sort(argsCopy); | |
System.out.println("Arrays.sort: " + Arrays.toString(args)); |
NewerOlder