- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 18
- Posts with Upvotes
- 15
- Upvoting Members
- 10
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Programming level: Intermediate. I am improving. Keen on learning new languages. Am quite good with C++ and Java. Learning android app development at the moment.
- Interests
- Soccer, Games, Programming, Physics, Chemistry, Business, Cooking, Music
112 Posted Topics
Re: I just ate fried Dalo(Fijian root crop) :) Oh! also some chocolates. | |
![]() | Re: Life of Pi and Wreck-It-Ralph on TV. Both amazing movies. |
I am using CPU Sim to change wombat1 to wombat2 by adding stack. I have done adding a Stack RAM and a Stack pointer SPR. I have implemented a push instruction as such: acc->mdr mdr->Stack[SPR] End The implementation is able to push the acc value to Stack but not able … | |
| |
Re: We don't give codes. You initially wanted help anyway. So make an attempt, post a specific problem with the code(that you have done), and we will help you for sure :) | |
Re: In this case you can `sizeof`. `sizeof` returns the amount of Bytes the element is using. So the idea is to find the `sizeof(array)` (in your case which will be 20) and the `sizeof(int)`. The size of an int is 4 Bytes. So now you can use the Math and … | |
Re: It would be great if you could have compared all the loops in one paragraph at the end. Anyways it is still great :) | |
Re: Granted - they were dead in your bed after doing the hanky panky hahaha :P I wish I was good as C.Ronaldo at playing soccer/football. | |
Re: In Fiji sunny as always. Extremely hot. Very humid. Loving it though. | |
Re: You need to add a JFrame. public class Volume { public static void main (String[] args) { JFrame frame = new JFrame(); /** * * rest of the code * */ //Display their averages in the Dialog Box //add dialog box to frame JOptionPane.showMessageDialog(frame, "The volume of the sphere is: … | |
try { /* Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); String loc = "jdbc:odbc:Library"; String filename = "C:\\Users\\Krishal Lad\\Desktop\\Library.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="; database+= filename.trim() + ";DriverID=22;}"; // add on to the end con = DriverManager.getConnection (database);*/ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=Library.mdb;"; System.out.println("connecting to database..."); Connection conn = … | |
Re: Thanks Deceptikon for this amazing tutorial. There were some things about arrays that I still did not know about and your post opened my half-opened eyes :) Will you be posting more tutorials on other topics? Very keen on learning more. | |
Creating a text editor. Thread 1 creates a file and listens for user input. Thread 2 checks for spelling mistakes. How do I show spelling mistakes on the console? Should I highlight the text that has the spelling mistake? I tried that but it just highlights the following text in … | |
The aim is to create a gdb function that changes current path to the upper level i.e `C:\Windows` to `C:\` I tried to strip away characters while the buffer array != '' Here is what I tried: void gdbCommand(){ char buffer[MAXCHAR]; strncpy(buffer,path,sizeof(buffer)); char result[MAXCHAR]; for(int i = 0; i < … | |
How to save the created txt file to a specified path? For example to C:\\ Drive. When the code creates a file it saves to the workspace folder of the project. Do I have to set the directory to C:\\? I tried using `SetCurrentDirectoryA` function but does not change to … | |
Is it possible to change the value of a const variable? My aim is to change the directory of the Shell. I have set `const char* path = "C:\\"` as current directory. So if the user inputs "gd" then it will ask a directory to be set as the new … | |
Re: Can you explain more about line 6 algorithm? Why are you incrementing and decrementing b? In order to get the answer as 6 remove increment and decrement operators and use brackets. Hope that helps. | |
Re: The calculation of your standard deviation is correct, however, the return statement is wrong hence giving the wrong value. Sample Standard Deviation = square root of(sum of(squared(x - mean))/N-1) What you have done is sum of(squared(x-mean)/ square root of(N-1) Do not decimal format in the `var` method. Since `format` returns … | |
Re: Your aim is to count the integers right? So why are you outputting `num`, the integer entered by the user? You need to declare a counting variable. Let's say `count`. Now increment `count` if `num!=0` in the `while` after the user has entered an integer. This is because we do … | |
Re: > and now it doesn't collect inputs Yes it does - from lines 16-19. I tested your code. It worked fine. | |
Re: Drink but just don't drive! Get someone who will not drink and they can drive you home. Simple! Please don't ban alcohol hehe ;) ![]() | |
Re: so what's the problem? | |
Re: F = Ø // Initialize set of edges // to empty. Y = {v1} // Initialize set of vertices to // contain only the first one. while (the instance is not solved){ select a vertex in V - Y that is // selection procedure and nearest to Y // feasibility … ![]() | |
Re: Go through the array using a for loop and then if name[i] == nameP then make name[i] = NULL; ^That will just make the value empty at that position of the array. After this you need to shift the values towards right from that position to the left. Hope that … | |
Re: Actually the problem in your code is that you have reversed `input` twice! At line 9 you have called the method `reverse(input);` and at this point the return value of the method is the reversed value of the input. Let's say input is equal to 1234 so the `reverse(input)` would … | |
Re: The calculation from Celsius to Fahrenheit is incorrect. First multiply the temperature (C) by 1.8 and then add 32. The correct calcuation would be `(1.8*c)+32` `(9.0/5.0)` would be 1.8 | |
Re: For my assignments this year we were required to implement GUI. At that time I only knew C++. Things got a little too difficult for me creating GUI in C++. I tried downloading Qt but my internet connection is so bad that it was taking forever to download. So I … | |
Re: No you have not stored the data into the array. You declared an array `salaries` at line 9 but you have not used this anywhere until you are trying to access the data (which there are none in the array) in the second for loop. Hint: Carefully look at the … | |
Are there any game designers and/or programmers here in DaniWeb? What does it feel like working as a game developer? What are the qualifications needed to be accepted into game developing studio? Are there specific courses needed to become a game developer? General question: What are other job opportunities as … | |
![]() | |
Re: It works for me. Make sure you check the results.txt in the folder where your project is saved. EDIT: What IDE are you using? | |
Re: Here is an article for adding colour: [Click Here](http://www.cplusplus.com/articles/Eyhv0pDG/) | |
| |
Re: Ask the user for the amount of dice they want to use ( let's say n number of dice). So now you will need to change your `for loop`. You will require `nested for loops` (a for loop within a for loop). The outer loop will be the iterations until … | |
Re: Try to utilise `comps` in your BinarySearch function. You're really not doing anything with that. Comparisons in Binary Search is as such - Once a list is divided into half then the function has made a comparison and stops comparing once the `value` is `found`. So now think about that^ … | |
Re: The idea is that the loop should end when the file reaches the end. So what will be the condition of the while loop now? | |
Re: The program doesn't know what the end of the maze is. You did not specify what is the end. I would assume em and en are end m and end n but they are initialized to nothing. The end is MAXROW-1 and MAXCOL-1, right? So define em and en to … | |
Re: Recursion does not work that way. At line 79 you are returning fixed values `one` and `two`. Recursion is returning the method with new parameters, basically. Not assigning the method to a variable then returning that variable. So uncomment lines 77 and 78 and change your `return` statement with methods. … | |
Re: Can you post the output you're getting using this code and the expected output? | |
Re: Why does this code look similar to me? Hmmmm. Are you and Beastie805 doing the same assignment or something? :-P | |
Re: It seems to me that you have not even started implementing the functions. The function comments (given by your tutor) give you a good hint of what you're suppose to do in each function. First do this homework on paper, then implement the functions in this code. That way will … | |
Re: You missed the opening brace for class InStack in your header file. | |
Re: In your PrintMaze function you need to print out the 2-D array of the maze. You are just printing out the rows. | |
Re: use `bool` for solving the maze recursively. Here is a good tutorial for backtracking algorithm : [Click Here](http://www.cs.bu.edu/teaching/alg/maze/) Hope that helps :) | |
Re: Use arrays. Pick one item then put in array. Pick another item then put in array. And so on. Well that is one of the ways. There are better ways to solve that problem. Hope that helps :) | |
Re: This is a good tutorial on recursion: [Click Here](http://www.youtube.com/watch?v=4agL-MQq05E) |
The End.