Jump to content

Merkey

Member
  • Posts

    241
  • Joined

  • Last visited

Everything posted by Merkey

  1. Hi, I am looking for a new laptop for a university. I am going to be doing mainly programming and running some algebra systems on it (Maple, Matlab). The budget is 800 - 850 euros and one of the laptops that caught my attention was the Thinkpad E14 Gen 2. It seems to have a very good performance, build quality and keyboard, but I am not sure about the battery life (45 Wh with an 8 core CPU). I haven't found many reviews on this laptop. Would you recommend it, or are there any better options for a college laptop in this price range?
  2. The price of your gadgets doesn't have to represent your wealth or your country's economy. The PC you've shown is very good, even above average in my opinion. Just because there are lot of people on this forum who are willing to spend thousands of dollars for their PCs and have to play on the highest details doesn't mean that everybody else is from a "third world country".
  3. By default, Whatsapp uploads all chats to google drive once per month. Obviously I don't know the last time it did, so before you change your phone, you should upload it manually settings -> chats -> back up. After you start Whatsapp on the new phone, just select the backup file to restore all your chats.
  4. Unless I need to run any Windows only applications, I prefer Linux. Here is why: Privacy, freedom App load times and responsiveness is generally much better on Linux, the whole system feels faster, more stable The ability to customize almost everything I wouldn't recommend Linux to everybody of course, but for those of us who like tech and more challenging things to play with, Linux is in my opinion not only a great platform to learn new things on, but a good daily driver OS as well
  5. If the strings had newlines, the output would look like this, wouldn't it? Existing word:car Existing word:lamp Existing word:window
  6. I haven't, but I have checked the values inside the loop multiple times simply with println() methods. Each time the values were exactly the same, but the contains() method always returned false. I think I have to declare my own method for comparing strings
  7. Hi, so I have got a method in my java web application that is supposed to compare two ArrayLists(one from a database and the other one from a web page) and remove the same elements, so the second ArrayList should contain only new values: public void updateWords(ArrayList<String> newArray, int idGroup){ //get existing words in group ArrayList<String> oldArray = getWords(idGroup); //print words for (String s:newArray){ System.out.println("New word:"+s); } for(String s:oldArray){ System.out.println("Existing word:"+s); } //remove the same elements for (int i=(newArray.size()-1);i>=0;i--){ String word=newArray.get(i).replace("\n",""); if (oldArray.contains(word)){ System.out.println("oldArray already contains:"+word); newArray.remove(i); } } for (String s:newArray){ System.out.println("New word:"+s); } } But this is the output: New word:car New word:lamp New word:window New word:cat Existing word:car Existing word:lamp Existing word:window New word:car New word:lamp New word:window New word:cat I tried to run this code in a standalone Java application with the same values and it worked. Would anybody know why it doesn't work here?
  8. Is JSP outdated? I've heard that learning JSP or servlets is essential to understand the MVC architecture(which I am trying to learn)...
  9. The CPU doesn't have integrated graphics and there are no video outputs on the motherboard either. Anyways, I cleaned the whole PC, reseated CPU and ram, replugged everything and it works. Don't know what I did wrong before
  10. Ok, I will reseat the cpu, but if there was any problem with it, the GPU would post in my main PC, wouldn't it?
  11. Thought of that too, but the cpu doesn't have iGPU and the PSU wouldn't be able to handle GPU from my system
  12. Hi, so a few months ago, I got a 10 year old, pre-built system (Core 2 duo E4500, 8500 gt, 2 GB ddr2) for free in pretty good condition. I thought I would change some components, so I disassembled it. But when I put it together in the exact same configuration, fans start to spin and it doen't post or do anything else. I tried reseating RAM, checked all cables and cleaned everything as well. I put the GPU in my main build to see if it posts - it didn't. Is it possible that the GPU is dead?
  13. So I've been learning JSP for a few weeks and haven't had any problems at all, I am using InteliJ Idea Ultimate. I tried to use JSTL tags in a simple project: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <head> <title>JSTL Test</title> </head> <body> <p><c:forEach var="i" begin="1" end="5"> Item<br> </c:forEach></p> </body> </html> But when I run the file on Tomcat server, I get HTTP Status 500 - Internal Server error, org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp. I included the whole taglib folder I downloaded from official Apache website in External libraries and specified it in module dependencies, but I'm still getting the error. Is there any solution or would it be better to use java scriplets instead?
  14. It doesn't matter, drag drop animation will be the only animation in the whole program. I am not short in time, just wanted to know which tool or library(JavaFX, WPF, WFA etc.) would be the most suitable for this project
  15. The only animation I plan to do is object drag drop style. All other parts of the app would be just GUI(buttons, labels, texboxes etc.) and calculations. STDDraw looks like a library to just draw a shape in a window, I need a lot more functionality.
  16. I don't want to make a game, I just don't know how difficult or inefficient would it be to make more advanced GUI in WPF. I was making some simple games in WFA couple years ago, and every simple animation(like moving a rectangle in the window) was very resource hungry, I was at around 75% CPU usage when I made space attack like game...
  17. Thanks for the list, WPF or JavaFX would be probably the best options. I've also heard about OpenGL API, would it be a good option as well?
  18. Hi, so I am planning to make a desktop GUI Windows app as a part of my physics seminar work. The app would let the user easily make and arrange a few magnets, and then it would calculate and draw their magnetic field. The problem is that I don't know which IDE or language should I use to create it. I have got quite decent experience in C# or Java, so I was thinking of a Windows Form Application or a JavaFX app. Would it be a good solution or are there any better ones?
  19. If you want a solid introduction and want to learn most about your language, I recommend buying a book. I had the same teacher in my Java class and learned almost nothing. Sure, there are free websites, but in my experience, they cover all key concepts of every language very briefly, with no in depth analysis of different scenarios or applications. So my advice is to buy a book
  20. The scene builder is built into the IDE (InteliJ Idea), which then generates the code. I didn't write the fxml code by myself, I just added "fx:controller="sample.Controller"". But it seems like the more I try to fix it, the more problems I have with it...
  21. Hi, so I'm trying to make one of my first JavaFX apps - a simple calculator taking 2 numbers and adding, subtracting them etc. But when I try to run it, it says "Exception in Application start method, no controller specified". Some people on Stack overflow suggested specifying the controller in fxml file, which didn't help either. Any other suggestions? Main.java package sample; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception{ Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); primaryStage.setTitle("TestStage"); primaryStage.setScene(new Scene(root)); primaryStage.show(); } public static void main(String[] args) { launch(args); } } Controller.java package sample; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.ComboBox; import java.awt.*; import java.net.URL; import java.util.ResourceBundle; public class Controller implements Initializable{ @FXML private TextField num1TextField; @FXML private TextField num2TextField; @FXML private Label resultLabel; @FXML private Button calculateButton; @FXML private ComboBox operationCombobox; @FXML private void calculateButtonClick(){ double number1=Double.parseDouble(num1TextField.getText()); double number2=Double.parseDouble(num2TextField.getText()); double result=0; boolean exc=false; String operation=(String) operationCombobox.getSelectionModel().getSelectedItem(); switch (operation){ case "+": result=number1+number2; break; case "-": result=number1-number2; break; case "*": result=number1*number2; break; case "/": if (number2!=0){ result=number1/number2; }else { exc=true; } break; } if (!exc){ resultLabel.setText(String.valueOf(result)); }else { resultLabel.setText("Nelze delit nulou"); } } @Override public void initialize(URL url, ResourceBundle rb){ ObservableList<String> operace= FXCollections.observableArrayList("+","-","*","/"); operationCombobox.setItems(operace); operationCombobox.getSelectionModel().selectFirst(); } } sample.fxml <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.ComboBox?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.AnchorPane?> <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="167.0" prefWidth="508.0" xmlns="http://javafx.com/javafx/8.0.121" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Controller"> <children> <TextField fx:id="cislo1TextField" layoutX="21.0" layoutY="71.0" prefHeight="25.0" prefWidth="120.0" /> <TextField fx:id="cislo2TextField" layoutX="209.0" layoutY="71.0" prefHeight="25.0" prefWidth="120.0" /> <ComboBox fx:id="operaceCombobox" layoutX="151.0" layoutY="71.0" prefHeight="25.0" prefWidth="47.0" /> <Label layoutX="337.0" layoutY="75.0" text="=" /> <Label fx:id="vysledekLabel" layoutX="373.0" layoutY="75.0" text="Label" /> <Button fx:id="calculateButton" layoutX="222.0" layoutY="109.0" mnemonicParsing="false" onMouseClicked="#calculateButtonClick" text="Calculate" /> </children> </AnchorPane>
  22. 1. I'm building a new one, so I started with cpu 2. 200 euros is just for the CPU, for the whole build I have a budget of 850 to 900 euros
  23. The price difference is around 10 euros and if I overclocked the Ryzen, it'd be better, wouldn't it?
×