452 Posted Topics
Re: `cout << " \n";` doesn't include it because it's printing only an empty line on that statement? | |
Re: I am confused, do you have 2 variables called sum? One decleared globally and one that is a parameter of a method? Maybe show the entire code or give more explanation | |
Re: He is trying to say that your loop may not execute even once, in such case your print out will be printing out 0/0. Maybe print just count and see if it ever increases to begin with? | |
Re: What are you trying to do ..? I think what you want to do is place the if statement inside the for loop .. | |
Re: Pretty much what james said but if round is an integer and that's what keeps count of the rounds, increasing it should work | |
Re: You can disable that from within the application^, although its on be default .. | |
Re: I had a course on android couple of years ago, the project was to create a hangman. It starts with a nice splash screen few animations, then you are taken to the main menu where you can select Play, Settings, Help etc, if you click Play, well you play the … | |
Re: Try checking what's the `size` of your numArray and show stacktrace as stultuske alrdy asked for | |
Re: make a print method which is being called after each transaction and prints the updated contents | |
Re: [Look at this](https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html) It says ArrayList method set(int, element), the way you have it now is set(element, int) | |
Re: He pm'd that he thinks isValidText doesn't work, I tried this, works good for me public class Test{ public static void main(String[] args){ String s = "Ø"; byte[] b = s.getBytes(); System.out.println(isValidText(b)); } public static boolean isValidText (byte[] test) { if (test[0] > 0 && test[0] < 127) { System.out.println … | |
Re: I don't see anything wrong with the code, tried running it using terminal as well, works fine. Could be something with Netbins itself | |
Re: You can use packet analyzing tool, for example using Wireshark. It will display all the traffic in and out But doing DDOS is not really something that you have to do yourself anymore rea lly ... I've seen many online services offer to do it for you, at exact time … | |
Re: What I would do instead is something like this pseudo code input from user // such as(name name1 name2) split the input from user and your regex is space, into an array of Strings at this point you have 3 strings into an array, your initials are the first char … | |
Re: Move l2=new JLabel(); l2.setText(a); before line 39 | |
Re: Oh wow ;( Sorry mine's pretty bad as well, was leg day yesterday! Whats wrong with it, did you injure it? If I were you i'd implement a replace method ... =) get better sooner! ![]() | |
Re: and to add to both of them ^^ Using [Scanner](https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html) in java, you can read text files, and do it by reading an entire line from the file at a time Once you have a line available, you can check if it contains 0, if it doesn't you print yes, … | |
Re: your scanner object is supposed to read input from users, not an object of your class that has not even been decleared I'd suggest you start again from this point, and ask about any line you add in your code that you are not sure about import java.util.Scanner; public class … | |
Re: You can read through a text file and compare the words in the file to a word of your(or your user's) choice, if there is a match, then the word is in english unless it is not | |
Re: I will try it out tonight on my laptop and both screens at home, will get back with results | |
Re: Congratulations Geek, glad to see your passion about security | |
Well basically, I was coding earlier and I encountered this for(int i = 0; i<acl.size();i++){ //System.out.println(acl.get(i)); if(acl.get(i).contains(role)){ permissions = acl.get(i).split(":"); if(permissions[operation].equals("yes")) return true; } } and I was getting index out of boundary exception, but I knew that wasn't the case so I decided to use a for loop to … | |
Re: First of all, there is no need to write into an absolutely dead thread .. Second, if you can't even think of a loop that can do 1 to 5, you might really want to consider starting from the basics ... Third .. well here's a loop in 2 versions … | |
Re: The problem is that you want to have your if loop inside the for, because now you execute the for loop, you end up having a value of 15, then your if loop executes with only that value, therefore 1 number was entered and it was odd as well | |
Re: Perhaps take a look in [Here](https://www.daniweb.com/software-development/java/threads/199459/simple-java-applet-wont-run-on-eclipse#) | |
Re: What is the structure that you have now? | |
![]() | Re: I agree with both, @stultuske and @James, This isn't really something you should do while learning java, if you want to make GUI based projects you could implement basic ones to get an idea of how things works(which I assume you know by the way you talk about stuff) such … |
Re: Is xp proven to be really vulnerable after the support stopped or is it expected to be within 12 months? | |
Re: Nope, it lands on the moon first, for a quick beer on the way How long does it take before whales learn to fly after their birth? | |
Re: Hey mate, thanks for adding the post. I've actually had the same problem when I added Windows 8.1 to dual boot with my Linux. Everytime I switch between them , the clock completely went nuts and it was really annoying. I think my solution was to go to a registry … | |
Re: Create an arrayList that has input type your person object. When a new object has been created, simply add it in the arrayList ArrayList instead of array because, in an array you have to specify the size of the array upon declaration, of course you could copy and move it … | |
Re: Pretty much what rubberman said, its VPN's that are used to do so, but you have to be extremely careful on setting up things, such as firewall policies ... | |
![]() | Re: I bought 2002 Golf, 4 or 5 years ago then I moved abroad and never got the chance to use it properly ;( |
Re: Why, cannot find the driver or do you get an error when trying? If so which exactly .. | |
Re: Hey lena, There was a daniweb member trying to create voIP using java, as far as I know he didn't manage to finish that project, it seems to be difficult in a way, but if you start and show us some work I am pretty sure we'll figure out something … | |
Re: Instead of printing the array(element lookup) at that position, check if the element at that position is equal to the one that the user entered, if it is then increase a count, if not take element at next position and so on until you go through the entire array after … | |
Hey everyone, I;ve implemented SSL to my server using [this guide](https://blogs.oracle.com/lmalventosa/entry/using_the_ssl_tls_based) now when I connect the server it takes some time to initialize now, I assume its setting up stuff, and then when the client connects takes awhile as well (few seconds), I'd assume it works but I want to … | |
Re: Here is a hint ... the first one in a) , when a number has !, it defines the factorial of a number, for example lets look at 5! `5! = 1*2*3*4*5` so in order to get !1+!2 ..etc , you need to define a method that computes the factorial … | |
Re: Try reinstalling java jre, I think the latest version up to date is 8u25 | |
Re: What error do you get? | |
Hey guys, Just got a quick question ... I am implementing a client GUI, and part of the requirements are that the client is able to start, stop and restart the server. This got me a bit confused since the client connects after the server is running. What I am … | |
Re: from what I understand, when you click b2 for example, you want ur op1 to be 2? If so, in actionPerformed, the if statements .. for example if source was b2 if op1 is empty , op1 = 2; else op2 = 2; and so on until you fill it … | |
Re: First of all, you are missing class declearation in your file!!!! try using for loop to print out the values of the LinkedList? Also, why do u need the linkedlist if its just a number keep it only as `int n` then you could `System.out.println("The user entered number of employees: … | |
Re: What do you need help with exactly? Noone would just write the entire thing for you ... |
The End.