3,815 Topics
![]() | |
This is code for the algebraic slope formula (y2 - y1) / (x2 - x1). I need help. My error is: Uninitialized variable formula2 is being used without being initialized. Can anyone help me??? [CODE]#include <iostream> #include <string> #include <cmath> #include <algorithm> using namespace std; int main() { int formula1[2]; … | |
hey i got this 3d cube that rotates and does other cool nonsense HOWEVER i cant figure out how to color it. Need to do it with out using java 3d and i DO know about the painters algorithm, i just dont know exactly how to go about implementing it … ![]() | |
Hello, I am working on an algorithm that checks to see if a value is in an array, however, it doesn't seem to want to work .. It will display that the first number is there but nothing else.. Any ideas? Heres the code: [code] #include <iostream> using namespace std; … | |
I got a matrix adjency that i want to transform in an adjency list and i got this error that i cant figure out... main.cpp|65|error: cannot convert 'int (*)[25]' to 'int**' for argument '1' to 'Ville** conversion(int**, Ville**, int) main.cpp|70|error: cannot convert 'int (*)[25]' to 'int**' for argument '1' to … | |
Can you explain to me what's the meaning of the algorithm of SHA-1? ========================================================================== [CODE]package Finals; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class SHA { private static String convertToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { int halfbyte = … | |
Hello, I am trying to make an application that will run a simulation on a headless server. In short, it does the following: 1. load an image from the database 2. display a text as an overlay on top of the image 3. capture the 'screen' and save the image … | |
Please help me with my problem in algorithm coding.. the error says no matching function call .. i attach the picture in this thread hoping u help me :) | |
Early versions of Python used a hybrid of samplesort (a variant of quicksort with large sample size) and binary insertion sort as the built-in sorting algorithm. This proved to be somewhat unstable, and was replaced in version 2.3 with an adaptive mergesort algorithm. I am comparing several rudimentary sorting routines, … | |
1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers in ascending order. Write down in a table the time (according to your system clock) that it takes for the program … | |
this program calculates all the prime numbers between two input numbers num1 and num2. first an array is created and num1,num1+1,......num2 are stored in that array and then all elenemts of array are scanned and if they are divisible by any odd number except itself or by 2 then 0 … | |
I am trying to use functions in the following program. The program is supposed to use a vector of structures to store a students first name, last name, and grades. Also, to get a average for each student and a class average. I do not think I am calling the … | |
I am trying to display the sNames vector. I am not sure if I am storing the information correctly. Any help would be greatly appreciated. Also I am trying to get an average for each students exam grades and a class average, and I am not sure how to go … | |
Hey guys Im trying to create a code where: input A: number Input B: Base Print: Decimal form I am going to use algorithm where u do following: NUMBER % BASE but it would do it the number of times that the base is.. so if its 6 (base 2) … | |
hey alll..I posted earlier on needing help for a code on input #..base..print decimal form..I actually didnt learn this in high school so thats why I was having so much trouble :@ Now that I read up and understand the logic in bases..I was thinking that for my code I … | |
First off, I am a Java Noob coding in latest version of NetBeans. I am trying to create a program the will allow the user to enter two decimal values: time and earnings in a swing GUI. [B]Basic Flow[/B] [LIST=1] [*]The user will enter the values in two different text … | |
Hello all, This is my first post here. I've exhausted every resource I can think of in hopes of figuring out what I'm doing wrong, but I can't seem to get it right. I'm doing a homework assignment where I have to solve the 8puzzle problem using BFS, DFS, Iterative … | |
Let G = (V, E) be a directed graph, with source s belonging to V, sink t belonging to V, and nonnegative edge capacities. Give a exist a polynomial time algorithm to decide whether G has a unique minimum cut (basically an s-t capacity strictly less than that of all … | |
hi, I am currently taking a pyton programming class and having some extreme difficulties. I am in quite the pickle with these 3 prompts. I do not know where to start for any of these prompts; if anyone has any code or solutions to any of these three promps I … | |
Okay, first off, I know my code is atrocious. I am not a c++ programmer, but my OpenGL course requires it. My lack of c++ knowledge is most probably my biggest problem here. I am simply looking for quick fixes to my ignorant mistakes. I just need the algorithm to … | |
Now, I know the first thing I am going to be told is that I should add a balance function to my binary tree, well I have asked the group member who created our tree to do it, but he hasn't got back to me yet. So rather than wait … | |
We are trying to build a simple basic search engine at [snipped] and we need help with page rank. Now the results are being shown in the order of relevance. Can someone plz help us with some algorithm, link or code snippet. Also is it possible to call a c++ … | |
Hey Guys, I'm working on a C++ program for school. Basically the Program inputs a file of points and outputs an svg file that contains the Graph with the least number of edges. We need to implement this with the Kruskal and Prim algorithm, and the algorithm needs to be … | |
[I]Negotiating a consumer loan is not always straightforward. One form of loan is the discount installment loan, which works as follows. Suppose a loan has a face value of $1,000, the interest rate is 15%, and the duration is 18 months. The interest is computed by multiplying the face value … | |
Hello, We stduying the 8086 and 386 using boarland linker. while stduing for a test I have I came across a queation about menaging and printing 64bit numbers. the numbers are represented as an array of chars (8) and I need to implement a rutine that puts the number in … | |
I have a problem to determine Easter Sunday based on the algorithm invented by Carl Friedrick Gauss in 1800. I have written my code and double checked the Math several times but not matter what year I type in it tells me that Easter is on April 9th so I … | |
ok so far i got this!!! but what i realized is that when i run the ouput 1 2 3 4 5 it gives me the correct output but if i put the value as 3 6 7 8 4 !!! it arranges the number as 3 4 6 7 … | |
I'm going to openly admit that this is homework but I cant find the answer in the book or on the web, but I worked it out and heres what I got I just need someone to check if its right Is the function (log n)! polynomially bounded? In other … | |
please, i am new to java and have this project on generating a university timetable using genetic algorithm. this software is to be a GUI based software... please can any one give me ideas about how i can go about it... thanks | |
This is my attempt at the Euclid Algorithm. I would like it if someone could give me some pointers on how to fix this so that it would work. It compiles fine. [CODE]import java.util.Scanner; public class Euclid{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); System.out.print("Enter the first … | |
Ok guys I'm almost done with my GPA program but I hit a snag. everything works fine but when I insert a letter grade the program doesn't read what number it corresponds to and sets double number to zero. Can some please let me know what I'm doing wrong. [CODE]import … | |
So guys, I'm very new to Java and I have just developed my algorithm of opening forms. However, I've also recently read about singleton pattern. I don't know how Java works internally but I want to ask an expert's advice. Is this implementation efficient? Compare it with singleton. How good … | |
Currently on my stage of learning about MS Windows security and authentication procedures.And have one question that I can't find answer to. There are Local Security Authority (LSA) and Security Account Manager(SAM) responsible for authentication process. Lsa is responsible for validating user for logon and SAM holds users password in … | |
Hello Everyone, I am working on a package delivery simulation. I believe I have a bug. Lines 47-53 give the user the option to choose a particular moment of time where they can see a snapshot of the system's status. The program seems to break down if I choose to … | |
Hello All, I am trying to return three integers from the load function below. Right now, the program only returns the throughput variable. How do I use this function so it returns all three? (I am trying to implement this in a larger project where I cannot call the load … | |
Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten … | |
Hello friends..! I tried to implement HeapSort algorithm in Java. but I've got some problems. First I should say that I have tried to implement the algorithm mentioned in the book "Introduction to Algorithm". the first question is how we can maintain the heap size? The book doesn't help with … | |
hi all..... When is Google going to update page rank algorithm? Is there any specific time duration for updation of its algorithm....what are the factors on which there are chances of increase in page rank.....My site's page rank is 2 right now.... | |
Hi, I'd like to develop an algorithm that would only accept positive real numbers and would loop the input until the input is a real positive number. | |
import java.util.Scanner; public class fibonacci{ public static void main(String[] args){ int n=0; int fib = n+1; Scanner X=new Scanner(System.in); System.out.print("Enter # of the term: "); n = X.nextInt(); for (int i=3; i<=n; i++) { i = i-1 + i-2; } System.out.print("Term is: "+n); } } I know the algorithm is … | |
I am having trouble figuring out how to convert base 10 to base 3, I have tried several different attempts and this is my latest effort, anyone have any ideas. I was giving this algorithm but am having trouble creating a function for it: [B] 1. Set k to the … | |
[B]No, This is not an assignment [/B] Okay, so I got an exam about algorithm... it has 5 questions on it. Here's one of the questions "write an algorithm of the first set of Fibonacci sequence" I wrote [CODE] Int x = 0, y = 1, temp = 0; for(int … | |
hello Everyone! I want to implement fast transpose of a sparse matrix. It's really hard for me to understand the algorithm explained in book. Can anyone please explain in simple manner? Thank you ! :) | |
I am trying to determine the time complexity (and space complexity if anyone would like to have a go at it) of a sort function i implemented with a custom comparator. it is the sort function from the STL <algorithm>. First off, I am using Visual C++, so I am … | |
Dear experts, I am trying to practice inheritance coding on my own but i have met some difficulties. I ma supposed to come up with a Square Game with M representing the number of squares. For the start, i will be in the square 0 value and playing by throwing … | |
1. Write a program that calculates gross wages for employees. The program should ask the user to enter an employee’s ID, hours worked and hourly pay rate. It should then calculate the gross wage for that employee and store it with this employee’s information into another file. The program should … | |
Hi all I need to calculate CRC for my file..The algorithm is CRC-16.. I have a binary file with me.. I have also calculated checksum for the whole file . Now my doubt is for calculating checksum for any file do we need to calculate CRC for each and every … | |
I am trying to implement the algorithm of a CRC check, which basically created a value, based on an input message. So, consider I have a hex message 3F214365876616AB15387D5D59, and I want to obtain the CRC24Q value of the message. The algorithm that I found to do this is the … | |
Can anyone please explain me, step by step, each line of the following sorting algorithm which sorts the input lines numerically, if -n is given at the command line. (Program taken from the book "The C programming language, by brian kernighan and Dennis Ritchie" - Chapter 5. Section 5.11, page … | |
Running into an issue trying to fill a vector of structs. I am completely stuck. Here the assignment question Using the data file provided on the next page, write the C++ program to implement a vector of structs containing wines, vintage and scores. Create a file names wines.dat using the … |
The End.