-
Posts
4888 -
Joined
-
Last visited
-
Days Won
9 -
Feedback
100%
Ericthecmh last won the day on October 11 2015
Ericthecmh had the most liked content!
About Ericthecmh
Profile Information
-
Gender
Male
-
Location:
Lumbridge
Recent Profile Visitors
9001 profile views
Ericthecmh's Achievements
-
What I thought tut island caps u at lvl 3?
-
galban left Positive feedback for Ericthecmh
-
I'll do 150$ if closed this weekend
-
EDIT: Sorry I'm blind and can't read
-
[10 Minute Scripts] Make an AIO Fighter Script in 10 Minutes??? (Part 1)
Ericthecmh replied to Eliot's topic in Tutorials
I love your voice @Eliot will listen to this instead of music -
Bruhhh, I remember scripting with you a few years ago.
We coded a Mage Areana script and an Abyss script :p -
Don't go under 200. 250 if you want to get rid of it quickly. also def agree with the PSU comment. often overlooked, yet critical component
-
RAM would be hard to sell in 4GB sticks tbh. Also DDR3-1600 is pretty cheap nowadays. I would say $300-350, depending on your case, hard drive, and PSU (which you didn't include). I wouldn't go lower than 300 though (if you had posted this 3 months ago I would have bought this off of you for 300. But now there's a new horyzen) Also if you haven't bought your CPU yet, I'd suggest waiting for the new RYZEN line from AMD and see it's community benchmarks.
-
It is possible. Here's my old code. Sorry there's a lot of unrelated junk. I cbf to clean it for you. Basically, like Villius said, you gotta wrap with JFXPanel. Also, I dev-ed this on Linux. It is supported, if you're using Oracle JDK at least... Most Linux distros have a package for it. If not, they're probably using a less user-friendly distro, and I'd assume that means they're experienced enough to install it manually. // Display the GUI JFXPanel panel = new JFXPanel(); JFrame frame = new JFrame(); try { panel.setScene(new SupremeFisherGUI().load(frame, this)); } catch (Exception e) { e.printStackTrace(); } frame.setUndecorated(true); frame.setSize(328, 240); frame.setContentPane(panel); frame.setVisible(true); frame.setBackground(new Color(0, 0, 0, 0)); and then I have this: public Scene load(JFrame stage, Main script) throws Exception { MainGUIController controller = new MainGUIController(); AnchorPane anchorPane = new AnchorPane(); anchorPane.setPrefSize(320.0, 174.0); anchorPane.setStyle("-fx-background-color: #000"); Label welcomeLabel = new Label("Welcome to SupremeFisher!"); welcomeLabel.setTextFill(Paint.valueOf("#55acee")); welcomeLabel.setFont(new Font("Cambria Bold", 18.0)); welcomeLabel.setLayoutX(16); welcomeLabel.setLayoutY(6); anchorPane.getChildren().add(welcomeLabel); Label optionsLabel = new Label("Please configure your options below:"); optionsLabel.setFont(new Font("Cambria", 14.0)); optionsLabel.setTextFill(Paint.valueOf("#FFFFFF")); optionsLabel.setLayoutX(18.0); optionsLabel.setLayoutY(29.0); anchorPane.getChildren().add(optionsLabel); Label locationLabel = new Label("Location:"); locationLabel.setTextFill(Paint.valueOf("#55acee")); locationLabel.setFont(new Font("Cambria", 14.0)); locationLabel.setLayoutX(18.0); locationLabel.setLayoutY(59.0); anchorPane.getChildren().add(locationLabel); controller.locationBox = new ComboBox<>(); controller.locationBox.setLayoutX(87); controller.locationBox.setLayoutY(56); controller.locationBox.setPrefHeight(27.0); controller.locationBox.setPrefWidth(215.0); controller.locationBox.setPromptText("Select a Location"); controller.locationBox.setStyle("-fx-border-color: #55acee; -fx-background-color: #000000; -fx-text-fill: #FFFFFF; -fx-border-radius: 10; -fx-padding: 0 0 0 4;"); anchorPane.getChildren().add(controller.locationBox); controller.fishLabel = new Label(); controller.fishLabel.setLayoutX(18.0); controller.fishLabel.setLayoutY(125); controller.fishLabel.setFont(new Font("Cambria", 14.0)); controller.fishLabel.setTextFill(Paint.valueOf("#55acee")); anchorPane.getChildren().add(controller.fishLabel); controller.fishView = new ListView<>(); controller.fishView.setLayoutX(18.0); controller.fishView.setLayoutY(152); controller.fishView.setMaxHeight(100.0); controller.fishView.setMinHeight(0.0); controller.fishView.setPrefHeight(0.0); controller.fishView.setPrefWidth(285); controller.fishView.setStyle("-fx-background-color: #000000; -fx-border-color: #55acee;"); anchorPane.getChildren().add(controller.fishView); controller.typeBox = new ComboBox<>(); controller.typeBox.setLayoutX(87); controller.typeBox.setLayoutY(89); controller.typeBox.setPrefHeight(27); controller.typeBox.setPrefWidth(215.0); controller.typeBox.setPromptText("Select a Type"); controller.typeBox.setStyle("-fx-border-color: #55acee; -fx-background-color: #000000; -fx-text-fill: #FFFFFF; -fx-border-radius: 10; -fx-padding: 0 0 0 4;"); anchorPane.getChildren().add(controller.typeBox); Label typeLabel = new Label("Type:"); typeLabel.setLayoutX(18.0); typeLabel.setLayoutY(94.0); typeLabel.setTextFill(Paint.valueOf("#55acee")); typeLabel.setFont(new Font("Cambria", 14.0)); anchorPane.getChildren().add(typeLabel); controller.imageView = new javafx.scene.image.ImageView(); controller.imageView.setFitWidth(285.0); controller.imageView.setLayoutX(18.0); controller.imageView.setLayoutY(158.0); controller.imageView.setPickOnBounds(true); controller.imageView.setPreserveRatio(true); anchorPane.getChildren().addAll(controller.imageView); controller.reducedAntiban = new CheckBox("Reduced antiban mode (not recommended)"); controller.reducedAntiban.setTextFill(Paint.valueOf("#55acee")); controller.reducedAntiban.setFont(new Font("Cambria", 14.0)); controller.reducedAntiban.setLayoutX(18.0); controller.reducedAntiban.setLayoutY(141); anchorPane.getChildren().addAll(controller.reducedAntiban); controller.startButton = new Button("START"); controller.startButton.setDisable(true); controller.startButton.setLayoutX(12.0); controller.startButton.setLayoutY(176); controller.startButton.setMnemonicParsing(false); controller.startButton.setPrefHeight(27.0); controller.startButton.setPrefWidth(297.0); controller.startButton.setStyle("-fx-background-color: #000000; -fx-border-color: #55acee; -fx-border-radius: 10;"); controller.startButton.setTextFill(Paint.valueOf("#FFFFFF")); anchorPane.getChildren().add(controller.startButton); controller.locationBox.setOnAction(new EventHandler<ActionEvent>() { @[member='Override'] public void handle(ActionEvent event) { controller.updateLocation(event); } }); controller.typeBox.setOnAction(new EventHandler<ActionEvent>() { @[member='Override'] public void handle(ActionEvent event) { controller.updateType(event); } }); controller.startButton.setOnAction(new EventHandler<ActionEvent>() { @[member='Override'] public void handle(ActionEvent event) { controller.start(event); } }); controller.fishView.setOnMousePressed(new EventHandler<MouseEvent>() { @[member='Override'] public void handle(MouseEvent event) { controller.updateFishView(event); } }); Scene scene = new Scene(anchorPane, Color.TRANSPARENT); controller.registerStage(stage, script); return scene; }
-
You're kidding rite. Obviously u want lifetime sponsor, so you look just everyone else
-
Overall, your code's pretty clean and efficient. The only suggestion I'd have is looking into using an iterative approach rather than a recursive one like you've done here. Reason being: Recursion is generally slower. This is because function calls require pushing the current execution point to the stack before executing the function, so that the system knows where to go when the function returns. If you do recursion, you're essentially pushing a lot of things onto the stack over and over, which can get very very slow. Iteration avoids the stack, and can get several times faster in practice. In addition, note how in the line: return [[9] + previous_digits for previous_digits in nines_first] \ + [[1, 9] + previous_digits for previous_digits in ones_first] You are creating new lists repeatedly, which is slow. An iterative approach can avoid this. In this case, using iteration probably won't save much, since you're caching results, which essentially linearizes your recursion tree. I will post my own solution tomorrow if you wanna compare
-
Go with the second solution first, then do the first one if necessary. Although Token is right, this is like trying to make a gun shot wound better by putting a bandage on it. It may save some runtime but the real improvement is the solution below. Optimizing from a recusive to an iterative approach will probably cut your runtime by several times, but using the below solution can cut your runtime by an entire order of magnitude or more (ie. from n^2 to n). You should be caching the results of previously computed answers and using it from cache (called Dynamic programming), which is what Solzhenitsyn is suggesting. Pretty sure it does. Tried it out before and I think the runtime's about the same