- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 52
- Posts with Upvotes
- 37
- Upvoting Members
- 41
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Computer lovin' geek.
- PC Specs
- AMD Phenom II X6 1055T Scythe Ninja II Asus Crosshair IV Formula 4x2GB DDR3 X-25M G2 160GB SSD 2xHD5670…
201 Posted Topics
Re: It won't shows in rows and numbers because you are using System.out.println all the time: [CODE=java]for (String str : values) { double str_double = Double.parseDouble(str); matrix[x][y]=str_double; System.out.print(matrix[x][y] + " "); }[/CODE] You need to print the columns without a new line, and each time you finish a line (exit the … | |
Re: Mrs. Golda Meir was the second elected female leader in modern times (She was the Prime Minister of Israel in 1969). Who was the first? | |
Re: [iCODE]FileInputStream fstream[][/iCODE] is not initialized and therefore is null. Before you can write the code in lines 14 and beyond, you have to initialize the array itself: [CODE=java]fstream = new FileInputStream[array size][/CODE] If the array size is dynamic, you might want to consider a list instead. | |
I see that there are many questions here regarding complexity analysis, specifically regarding the Big-O notation of algorithms. I will attempt to shed some light on the subject. I will start with an introduction, after which I will go over some common complexities and last we will solve a few … | |
Hello, I am designing for work a testing environment which uses run-time randomly generated data to test our company's product. The problem is as follows: I have an inequality of the sort of x(1+y(1+z(1+p+q))) <= MAX, when x,y,z,p,q,MAX are integers, MAX is given as a method parameter and the method … | |
Re: They mean that you need to declare a new variable to put the username into it, and then when prompting the user for the username, just put it inside the variable, and then you will be able to use it later. [CODE=java] private void printWelcome() { System.out.println("Welcome to the 5th … | |
Re: Let's analyze the code step by step. At the beginning you have 1 loop: [CODE=java] for (i=n; i>0;i=i-1) { y=y+1; } [/CODE] The loop is going from 1 to n, meaning O(n) complexity. Next you have a nested loop [CODE=java] for (i=1;i<=n;i=i*3) { for (j=1;j<=3n;++j) { for(k=0;k<n; k=k+5) { x=x+5; … | |
Re: I recommend that you'll start [URL="http://en.wikipedia.org/wiki/Regular_grammar"]here[/URL], read about regular grammar to give you a direction. | |
Re: Mass Effect, Mass Effect 2 - can't wait for Mass Effect 3 :) | |
Re: You see, the forum has such a good effect on you, that you just needed to post the code in order to see how to solve it :) ![]() | |
Re: Do you even know what field in computer science you are interested in? | |
Re: [QUOTE=rajarajan07;1375887]Edit the image with photoshop especially with patch tool. But the clearance is depends upon the logo color, if it a plain color then easily we can remove the text and add new one. if it is a well defined pattern, tough to do. everything is based on your logo.[/QUOTE] … | |
Re: You have companies that there entire business comes from inventory management systems, so you will have to be more specific about what are you trying to achieve and where do you encounter problems :) | |
Re: What is "the same problem", what folder? tell the whole story... | |
Re: Idea: Read the data from the files into a variable and insert it into the tree. After you try that, see if you can eliminate this variable and insert the data directly into the tree :) | |
Re: Are you allowed to use if statements? < > signs? If so, min and max should not be a problem - start there :) What exactly have you learned so far in Java, so I will know what you are allowed to use. | |
Re: Please use [CODE] tags for code. Where are you stuck? what have you tried so far? | |
Re: Show.Some.Effort. Show us what you have written so far - no one is going to code for you. | |
Re: Have you read [URL="http://www.daniweb.com/forums/thread324685.html"]this[/URL] by any chance? :) | |
Re: Please post the code you have written so far, and explain what is the problem exactly. | |
Re: You need to fix the build path the include the other project as well, it's not enough that they are in the same workspace. If you are using eclipse, you need to go to the build path (right click on the project, build path -> configure build path) and add … | |
Re: I'm sure that you can use Google to search for existing code. You can write it by yourself, all the information you need is in the [URL="http://download.oracle.com/javase/6/docs/api/java/io/File.html"]File[/URL] class. | |
Re: Does it work if you change the name of your method to something else besides indexOf ? | |
Re: Take a look [URL="http://kipirvine.com/asm/workbook/floating_tut.htm"]here[/URL]. Think about it - if you have floating points on your computer, then there is a binary representation of it :) | |
![]() | Re: Just posting your code is not enough - do you get an exception thrown? compiler errors? unexpected output? Help us to help you. |
Re: In short, show some effort. Problems with code? we'll be happy to help - post the code [I]that you have wrote so far[/I], and tell us exactly what is the problem. | |
Re: Please describe the problem, what is your approach, and what are the results so far. | |
![]() | Re: Hmmm, you want a key logger with the option to mess around with someone's computer... |
Re: Forcing a class to implement abstract methods is not the same as forcing a variable - you can force the class to have the variable via inheritance, but as far as I know you can't force it to initialize it. | |
Re: You have 4 threads in your program - the three that you have created and the main thread. The main thread (the main method) is finished after creating the three other threads. There is no guarantee regarding the order in which the threads will run and for how long, which … | |
Re: Well, try for yourself, show us what you have done so far code-wise, and we will correct and guide you. | |
![]() | Re: On the other hand Java is a good language to start from as well, to learn algorithms, design patterns, and then go to pointers and such. Different methods I guess. ![]() |
![]() | Re: First, [TEX]12+14+16+18+20\neq 60[/TEX], it's 80 :). Second, every time you finish the inner loop you need to init sum to zero again, otherwise it will sum up the entire matrix and not just the rows. |
Re: What exactly is the problem? Are you getting any errors? and unexpected output? Provide some details... | |
![]() | Re: Please use the code-tags when posting code and define where exactly do you get stuck? what does not work? |
Re: If I am not mistaken you have to surround the code inside the method with a try/catch clause, to catch a possible IOException - Do you know how to handle exceptions? | |
Re: If I am not mistaken the output will be exactly what you will see on the screen once you will try to compile and run it yourself :) | |
Re: If you want to know who's turn it is, simply ask the users at the beginning (before the loop and the game actually starts) who wants to go first. You can save a boolean variable [ICODE]firstPlayerTurn[/ICODE] - when it's true it's player 1's turn, if false it's player 2's turn. … | |
Re: I agree with coil's approach - just notice that you need to increment counter at the beginning or you'll end up in an infinite loop. Better make it a for loop since you need to count. [CODE=java] java.util.Random rnd = java.util.Random(); for(int i = 0; i < 20; ++i) { … | |
Re: Perhaps a little late, but since it is not marked as solved I will give it a go. In order to swap two variables, denoted 'a' and 'b', using a third variable, denoted 'temp', you need to do the following: 1. place one of the numbers, say the one inside … | |
Re: [ICODE]package carpkg;[/ICODE] declares a package, perhaps you want [ICODE]import packageName[/ICODE]? | |
Re: Ok, please post the code that you have so far. | |
Re: Yep, this forum is for giving you all the guidance and assistance you need, but we will not solve your assignments for you. | |
Re: [LIST=1] [*]Line 13 - you are initializing the totals[] array to 0, so far so good. [*]Line 16 - you want to fill all the cell in the totals[] array again, only now you choose from 1 to 5, missing the first element. [*]Line 27 - still want to go … | |
Re: Please post the new code after the changes. |
The End.