3,815 Topics

Member Avatar for
Member Avatar for Zvjezdan23

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]; …

Member Avatar for Fbody
0
111
Member Avatar for rezial

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 …

Member Avatar for hfx642
0
358
Member Avatar for phorce

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; …

Member Avatar for gerard4143
0
334
Member Avatar for inspek

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 …

Member Avatar for inspek
0
173
Member Avatar for mhamy

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 = …

Member Avatar for JeffGrigg
0
176
Member Avatar for FloreaStefan

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 …

0
96
Member Avatar for Srcee

I want to create menu structure from a database. For example, the database is the following: id name parent 1 x null 2 y 1 3 z null 4 a 3 5 b 2 The result should be: -x --y ---b -z --a Now, the algorithm I have on mind …

Member Avatar for buddylee17
0
232
Member Avatar for FRGT/10

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 :)

Member Avatar for homeryansta
0
312
Member Avatar for vegaseat

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, …

Member Avatar for Skrell
1
4K
Member Avatar for syaminismail

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 …

Member Avatar for Narue
0
224
Member Avatar for suraj_p

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 …

Member Avatar for vijayan121
0
172
Member Avatar for jmay1327

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 …

Member Avatar for jmay1327
0
140
Member Avatar for jmay1327

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 …

Member Avatar for jmay1327
0
214
Member Avatar for meli123

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) …

Member Avatar for doug65536
0
116
Member Avatar for meli123

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 …

Member Avatar for VernonDozier
0
154
Member Avatar for kweigand

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 …

Member Avatar for kweigand
0
175
Member Avatar for neomatrix248

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 …

Member Avatar for neomatrix248
0
955
Member Avatar for katisss

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 …

Member Avatar for katisss
0
455
Member Avatar for Tyler212

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 …

Member Avatar for TrustyTony
-1
442
Member Avatar for leftovas17

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 …

Member Avatar for leftovas17
0
268
Member Avatar for falconmick

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 …

Member Avatar for mike_2000_17
0
439
Member Avatar for adcgv

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++ …

1
124
Member Avatar for MattJones

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 …

Member Avatar for Fbody
0
205
Member Avatar for mrrko

[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 …

Member Avatar for Bummpy 1
0
1K
Member Avatar for roisterguy

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 …

Member Avatar for roisterguy
0
228
Member Avatar for lbgladson

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 …

Member Avatar for Taywin
0
289
Member Avatar for mimah1

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 …

Member Avatar for mimah1
0
176
Member Avatar for custurd122000

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 …

Member Avatar for Taywin
0
88
Member Avatar for diew

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

Member Avatar for Taywin
-1
275
Member Avatar for NexG

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 …

Member Avatar for NexG
0
118
Member Avatar for Prisms

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 …

Member Avatar for Prisms
0
5K
Member Avatar for Whilliam

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 …

Member Avatar for Whilliam
0
114
Member Avatar for dzen

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 …

Member Avatar for lolafuertes
1
126
Member Avatar for coolbeanbob

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 …

Member Avatar for coolbeanbob
0
184
Member Avatar for coolbeanbob

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 …

0
77
Member Avatar for Prisms

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 …

Member Avatar for Prisms
0
3K
Member Avatar for baby_c

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 …

Member Avatar for baby_c
0
143
Member Avatar for jiten702

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....

Member Avatar for android45
0
83
Member Avatar for Wob

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.

Member Avatar for Wob
0
72
Member Avatar for NexG

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 …

Member Avatar for NexG
0
157
Member Avatar for monkeybut

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 …

Member Avatar for monkeybut
0
4K
Member Avatar for MooGeek

[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 …

Member Avatar for reactivated
0
383
Member Avatar for thejokerguy

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 ! :)

Member Avatar for avnish.singh5
0
7K
Member Avatar for Coffee_Table

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 …

Member Avatar for Narue
0
615
Member Avatar for janice91

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 …

Member Avatar for JamesCherrill
0
125
Member Avatar for fsamu2001

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 …

Member Avatar for rina6491
-1
977
Member Avatar for vaishnu

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 …

Member Avatar for nick.crane
0
112
Member Avatar for CD1

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 …

Member Avatar for Schol-R-LEA
0
1K
Member Avatar for Rupindersingh

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 …

Member Avatar for L7Sqr
0
134
Member Avatar for HelpStudents

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 …

Member Avatar for raptr_dflo
0
206

The End.