3,815 Topics

Member Avatar for
Member Avatar for phr33k

Hi, I am new to the forum. I am stuck on this assignment I have to do. I think i have defined the array suitably enough, I just cant implement the sorting specified in the question. Any help would be greatly appreciated. Here is the question: Create a program in …

Member Avatar for dctb13
0
328
Member Avatar for i2u2me

Complete TRY THIS Exercise 1, and then modify the IPO chart information and C++ instructions so that the commission rate will always be 10%. How is commission rate set to 10% always? <writing instruction> IPO Chart Inforomation C++ Instructions Input sale1 double sale1 = 0.0; sale2 double sale2 = 0.0; …

-3
133
Member Avatar for cloris

Can i get the codes for Bresenham Line Algorithtm. I have searched for it on google and i get the codes but they do not attach the codes to call the class, and also the codes do not allow user input. Am now learning java so adding comments would help …

Member Avatar for JamesCherrill
0
98
Member Avatar for FinaL111

This may be a rather simple thing to answer, but I am no programming expert. Let me explain my problem in detail: for this homework assignment I need to open up a file with simple text in it, format it so that each line is reduced to a certain number …

Member Avatar for WaltP
0
114
Member Avatar for wonjun, choi

I want to draw like this [url]http://ompldr.org/vYjN1ZQ[/url] by using the example : [url]http://code.activestate.com/recipes/410158-fractal-tree/[/url] or anything the algorithm is [code] def Calculator(Total): numpyArray = numpy.zeros((Total, 2)) for i in range(1, Total+1): #if i == Total+1 or i == 1: numpyArray[i-1, 0] = ((2 * i) - 1) numpyArray[i-1, 1] = (Total …

0
49
Member Avatar for dcazacu

Hello everyone, I just made a .cpp file to modify a data file in .txt (not relevant actually) file. I basically want to apply what this program is doing to all the .txt files in a ./input folder , and I couldn't find anything relevant so far. The code is …

Member Avatar for WaltP
0
246
Member Avatar for keyboardxtreme

HI GUYS am new to this forum and please bear with me if my questions have been tackled before or seems silly. i need some help on the following i need to evenly distribute elements into ab-tree like tree but with many nodes say (n). there is one root node …

0
44
Member Avatar for Idestruction

I am doing this assignment for my C++ class, and we have to instantiate 4 objects of the Student class, set the data members and then sort them according to the GPA variable. Ive whittled down the errors to just one, and I am stumped. Here is the error: error …

Member Avatar for Idestruction
0
351
Member Avatar for thenuttybrownie

hi Could someone please help me urgently with my computer programming project. This is the assignment: Create a program in which a user is asked for how many values (s)he wants to enter (maximum 50), then: Asks for the values and stores them into an array of double. Sorts the …

Member Avatar for Stefano Mtangoo
-1
293
Member Avatar for challarao

Hi.... I wrote a program for Quick Sort algorithm.... It is compiled fine....but it is giving a run time error i.e., Segmentation Fault.... I tried hard but couldn't find out what is that thing causing segmentation error in this program.... Please help.... I'm getting segmentation fault very frequently (i'm using …

Member Avatar for challarao
0
461
Member Avatar for joehms22

I've got an algorithm that at most does 1 operation for the first time a loop is run, 2 for the second, 3 for the third up to n for the nth. Essentially the sum of all numbers 1 to n is the worst case running time. or [TEX]\frac{n*(n+1)}{2}[/TEX] I …

Member Avatar for joehms22
0
454
Member Avatar for tucker001
Member Avatar for Dmiller071

Hi all, I'm working on a maze project with different types of robots. One of the robots is supposed to be a right-hand-rule robot which follows his right hand. The way I'm coding it so far, is I have an Enum Orientation. If the right hand is facing UP, DOWN, …

Member Avatar for Dmiller071
0
1K
Member Avatar for unikorndesigns

I am currently developing an intranet Search Engine. I have succesfully searched out the files from a collection of small files. I could blend in database information too. The issues is that while searching for a collection of files my algorithm slows down or else it crashes in between. Any …

Member Avatar for cwarn23
0
105
Member Avatar for maybnxtseasn

Working on an assignment for class. I was able to get the sorts created buy for some reason im having a problem with reducing redundant code within my int main() function [code] /* 1.) create 10, 100, 1000, and 10000 randomly generated elements 2.) Perform The Following Sorts on the …

Member Avatar for Adak
0
181
Member Avatar for carolinatech

Hey everyone, I'm need help with a problem I'm working on. I am trying to write a code that will tell how many coins are in the amount of change from 0 to 99. My algorithm is: Get total value of change Set value of quarters to q=.25 Set value …

Member Avatar for Stazloz
0
130
Member Avatar for carolinatech

Hello everyone, I'm new to C++ and I have two assignments that I to work on. The first how do I write an algorithm that will search for the smallest, largest, and average out five random numbers. This is what I have so far for my algorithm: 1. Get value …

Member Avatar for Moschops
0
123
Member Avatar for dhani09

I'm so confused on how to calculate the running time of an algorithm. i've searched online but i can't seem to understand any of the explanations hence my question: how do you calculate the running time of any algorithm? Please i'd love an explanation with any example or you can …

Member Avatar for JeffGrigg
0
128
Member Avatar for peglegmeg152

I have to make a Yahtzee game (in Delphi) for a project. I now have to write the pseudocode for the 'sixes' algorithm. I am using image lists and images for the dice faces, and am totally stuck on how to start the code. I am writing the proper code …

Member Avatar for AceStryker
0
85
Member Avatar for cgen

I need help understanding this algorithm Design a variation of algorithm TreeSearch for performing the operation findAl(k) in an ordered dictionary implemented with a binary search tree T, and show that it runs in time O(h + s), where h is the height of T and s is the size …

Member Avatar for cgen
0
423
Member Avatar for ronak127

hey guys I'm a newb to this C++ programming and I need help. I've made a non-recursive GCD C++ code, but i was having problems with the algorithm. Can someone help please? [ICODE]import java.util.Scanner; public class GCD { public static int GCD; public static int div; public static int remainder …

Member Avatar for mrnutty
0
180
Member Avatar for fox196

Hi, I'm getting segmentation fault errors when I use quicksort with ~350 000+ numbers. This is the quick sort algorithm I'm using: [CODE]void swap(int* v, int i, int j) { int tmp = v[i]; v[i] = v[j]; v[j] = tmp; } int partition(int *v, int s, int e) { int …

Member Avatar for raptr_dflo
0
1K
Member Avatar for New4lyfe

Consider the following selection statement where X is an integer test score between 0 and 100 Declare X as an integer Write “Please enter a number between 0 and 100.” Input X If (0 <= X and X < 49) Write "You fail" Else If (50 <= X and X …

Member Avatar for New4lyfe
0
188
Member Avatar for empyrean

I am trying to find the way to generate bezier curve using de casteljau algorithm for one of my assignment here. I am able to generate bezier curve using normal method but unable to start on generating using the above algorithm. It will be of great help if someone can …

Member Avatar for raptr_dflo
0
2K
Member Avatar for korobaton

SO YEH MY problem is its not reading the whole file and inputing it to the stucture.. i believe that the problem lies in the adt.( the last source code on the bottom) in the private adt search function, insert function, and traversal..... ive been wreking my brains out trying …

0
158
Member Avatar for ezekit

SO im trying to get this source code transformed to a double link list it has two nodes sentinel and header....the source code was used to be a singly linked list..... nyhow i cant seeem to get this whole thing right..... it works fine when it was on its orginal …

0
97
Member Avatar for blackrobe

Hey, [B][U]Problem:[/U][/B] Need to find an algorithm that given 2 sequences of [B]n[/B] numbers each, say [B]S1[/B] and [B]S2[/B], and 1 number, say [B]x[/B], it would tell if x is in the sum result of S1 and S2. The hashing function, say [B]h[/B], must be picked at random from a …

Member Avatar for Taywin
0
543
Member Avatar for Warhead88

Hi, Can anyone show me or point toward a link with a decent example of a hash table using linked list. Thank you ,

Member Avatar for Warhead88
0
337
Member Avatar for babyhuyx

[CODE]#include <iostream> #include <Windows.h> #include <time.h> #include <iomanip> #include <string> #include <cctype> #include <algorithm> using namespace std; /*********Wallet*****************/ void blingstack(double& wallet, double& winnings, double& payoff) { if(payoff > 0) cout<< "You won $ " << winnings * payoff <<endl; wallet = wallet + (winnings * payoff); cout<<"\nYour current balance is …

Member Avatar for WaltP
0
172
Member Avatar for Oscariuz

Hi guys im trying to make a program that will work as " Slot Machine " and im stuck in one part that i can not resolve. Im trying to verify predetermined char in random array so i can know if some of char appear three times or more. I …

Member Avatar for mzimmers
0
184
Member Avatar for xinwei

Hi, I have an undirected graph, I wish to find 3 shortest paths, my code below gives me all possible paths, can anyone give me some advice to find 3 shortest paths ? my idea of finding 3 shortest path is 1) since i have all possible path, i can …

Member Avatar for xinwei
0
628
Member Avatar for bkpally263

Hey all I need to convert audio file of wav format into text file in order to feed it as input to an encryption algorithm(IBE encrypt method of [URL="http://www.shamus.ie/"]Miracl[/URL] library takes only texts as input) and have to reconvert the decrypted text file to audio format. Could you please suggest …

Member Avatar for sujoy chatterje
0
1K
Member Avatar for asif49

For the website I'm working on, I've included a "search the site" section. Once the user searches a keyword or a phrase, the php processes all the content in the mysql database and prints out the title, content and a link to the page with the article containing that specific …

Member Avatar for asif49
0
115
Member Avatar for Zvjezdan23

This is code for the slope intercept formula y = mx + b I am supposed to find the slope (y2 - y1) / (x2 - x1) and have the user input the b for the y = mx + b in my program. Once the user does that I …

Member Avatar for Zvjezdan23
0
2K
Member Avatar for cgen

I need some idea how to correct this program. Though I think I understand the concept, my implementation is wrong. My program only prints the orignal string and does nothing with it. [CODE] public class ArrayStack<E> implements Stack<E> { protected int capacity; protected static final int CAPACITY = 1000; protected …

Member Avatar for JamesCherrill
0
1K
Member Avatar for toneranger

Hi everyone, When I try the code below with data in a txt file, I have no problems and the data prints properly and neatly on the screen. (Note, one slight modification when using a txt file, instead of getline (ist, ignored, ','), I do getline (ist, ignored, '/t') to …

Member Avatar for MonsieurPointer
0
245
Member Avatar for clide890

Hello, I've been having problem with this problem since yesterday and i just recently started C++, so please don't judge. I have very confused to what the question is asking and how the C++ program will look like. Effective January 1st of each year, Gabriela receives a 5% raise on …

Member Avatar for WaltP
0
217
Member Avatar for rafinrai

Is their any useful algorithm for drawing deterministic finite automata? I can prove that a dfa is accepted or not by my code but i do not have any knowledge about how to draw it in java.

Member Avatar for peter_budo
0
32
Member Avatar for KyleSmith10

I'm sorry as this coding language is not in C++, but it is very simlar to it. I basically trying to learn how it works if I have an example of this: [CODE]new NodeArray[] { {0,0,0,0}, {1,1,1,1}, {2,2,2,2}, {3,3,3,3} }[/CODE] I want an example of it working on how to …

Member Avatar for KyleSmith10
0
249
Member Avatar for poloblue

Good Afternoon, I'm new to assembly and I have to do a small MIPS program. The details of are: You can simulate the algorithm for 16 bits integers, not 32 bits integers. More specifically, we have two integers of 16 bits as input, add those two integers and get a …

Member Avatar for AceStryker
0
103
Member Avatar for rihanareeza

explanation of this algorithm [ICODE] function equivalence(m,n) //n variables,m equivalence relations //bit is a boolean array //seq is an array of pointers each one is pointing to the list of elements called equivalence elements for i = i to n do seq(i)<-bit(i)<-0; for k=1 to m do [read-next pair(i,j) getnode(x); …

Member Avatar for Taywin
-1
102
Member Avatar for Joe Shmoe

I am trying to alphabetize by generating a weight of a word, saving those numbers, and then comparing which numbers are greater. Don't ask me why I need to do this way. So I am trying to come up with a function that calculates the value of a certain word. …

Member Avatar for Taywin
0
220
Member Avatar for trinsleynewton

Google News, which has long relied on automation to deliver news content from countless providers, has announced a twist in its algorithm: It will now recognize "featured" content among the tens of thousands of stories it delivers every day. [url]http://www.huffingtonpost.com/2011/09/25/google-news-algorithm_n_980064.html[/url]

Member Avatar for joshtimber
0
124
Member Avatar for Dani

As many of you may be aware, DaniWeb was originally hit by the Google Panda algorithm back in February. We finally made a full recovery (and then some!) during the Panda update at the end of July. We were just hit by Panda yet again this past week, which was …

Member Avatar for claydcousta
0
308
Member Avatar for Zvjezdan23

Good evening all. I have a quick quick problem in my code. The build is successful but my debug shows up the errors: First-chance exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. Unhandled exception at 0x013c43e6 in week2_project1_gamephysics.exe: 0xC0000005: Access violation writing location 0xcccccccc. The program '[9888] …

Member Avatar for mrnutty
0
329
Member Avatar for Uni

I am supposed to read a text file containing "lyrics", then format it out based on special symbols like +,-,[] and spaces. Here's the lyrics syntax: [B]Spaces are significant:[/B] A single space between two words makes the two words go in two successive beats. Each additional space causes the lyric …

Member Avatar for Uni
0
127
Member Avatar for nathanhaigh

I'm new to this stuff, so bare with me! I'm trying to determine the time complexity of a recursive algorithm which reverses the branches of a tree. The algorithm in R goes as follows: [CODE]rev <- function (x) { if (is.leaf(x)) return(x) k <- length(x) if (k < 1) stop("dendrogram …

Member Avatar for Mavericks
0
422
Member Avatar for woojungkyu

What is the best algorithm for finding the number of integers divisible by X? I can easily do a: [code]for(num=1;num<maxRange;num++) { int result = 0; if(num%Y==0) { result++; } }[/code] but what if the maxRange is a really huge number (say a 9 or 10 digit number)? I need something …

Member Avatar for hfx642
0
167
Member Avatar for Zvjezdan23

In my math programming class I have an assignment to find the slope intercept formula (y2 - y1) / (x2 - x1) which is the m of the formula y = mx + b. I have to find 2 slope intercept equations and make an if-statement or multiple if-statements to …

Member Avatar for Fbody
0
319
Member Avatar for raviaaaa

HI while clicking calendar button calendar is displaying in IE6 and IE8 but in IE7 browser calendar is not displaying, java script error like obj null iam getting pls help me in this // written by Tan Ling Wee on 2 Dec 2001 // last updated 20 June 2003 // …

Member Avatar for MartinRinehart
0
436

The End.