3,815 Topics

Member Avatar for
Member Avatar for dragonstar4681

Hello everyone. This is my first post on here so please forgive if there are mistakes. I have been searching the forum and other sites to get some answer, but not luck yet. Below is a program that basically asks for names, ids, alias, etc of agents and then writes …

Member Avatar for daviddoria
0
102
Member Avatar for ashkash

I need to figure out the execution time of the following algorithm in terms of n. x=2 while (x < n) { x=2^x } I think it is O(log n) but just wanted to get some confirmation to make sure I am approaching this correctly. Thanks.

Member Avatar for invisal
0
95
Member Avatar for DanLB

Hi all - hope you can help me with this. I'm trying to search through a vector of struct's; I'm able to loop through the vector using a simple for() loop, but i'm unable to use the generic find(). Secondly i want to delete a element if there's a match. …

Member Avatar for kay25
0
2K
Member Avatar for euclid135

Hi all, i,m trying to use A* algorithm to do my task; this is the code [code] //////////////////////////////////////////////////////////////////////////////////////////////////////////////// // STL A* Search implementation // (C)2001 Justin Heyes-Jones // // Finding a path on a simple grid maze // This shows how to do shortest path finding using A* //////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include …

Member Avatar for euclid135
0
501
Member Avatar for stryker4526

So I have a problem... according to the specification given by my lab TA, we must [QUOTE]"write a Microsoft Visual Studio console application that will calculate the following four operations over the elements of a two dimensional array (matrix) of integers: 1. Sum 2. Average 3. Max 4. Min All …

Member Avatar for Wizardsr66
0
4K
Member Avatar for DaveTran

I would like to produce a number that increments in equal steps between between 0.0 and 1.0. The equal incremental step value will depend on the divisor. One index "i" is fed into the method and two numbers are produced based on i. At the moment, this is my working …

0
66
Member Avatar for new_divine

as a undergrad student i am thinking of making a mobile application online traffic system and informer using java specially for nokia mobile devices i have almost finished developing its algorithm and some design works are on progress but i am really stuck and confused about which ide should i …

Member Avatar for new_divine
0
73
Member Avatar for mommie

Trying to come up with a code that will give you your circumference value by taking the measurements of your waist and hips and subtracting the measurement of your neck but I'm getting several very weird errors. Most of them in regards to !=. Can someone please take a look …

Member Avatar for WaltP
0
95
Member Avatar for knight_268

My teacher want me to create a program called Bubblesort and I dont know how to do it. Plz help me. And these are description: 4.2.3 ASSIGNMENT: - Bubble Sort Program In this exercise you will create a bubble sorting algorithm that will sort an array of random numbers in …

Member Avatar for Fbody
0
98
Member Avatar for HoldmysunnyD

Hey Daniweb, I'm back again! This time around, my assignment is to implement a binary tree, a tree node, and a binary search tree using the class definitions given to us by our teacher. Implementing the TreeNode was no trouble at all, but when I started on the Tree itself, …

Member Avatar for em-kay
1
284
Member Avatar for jasrose

hi... Iam doin a research project in cluster based bit vector algorithm... i.e. a combination of clustering and bit vector concepts... will you help me to start the implementation...???

0
30
Member Avatar for scrappy57

Hi friends, can any one let me know what hash algorithm is used by linux system for its shadow passwords. I'm totally confused some say MD5 and some SHA-512 which one is true and can give the source for answer if got them. Thanks linux learner

Member Avatar for jephthah
0
81
Member Avatar for jeffdude87

4215/5431 Lab: Investigating the effect of wireless links on TCP In this assignment we will investigate the effect of wireless losses on TCP. For this purpose we will simulate a very simple network with 3 links. Let the links be AB, CB and DB. Of these DB is a wireless …

Member Avatar for Salem
0
102
Member Avatar for hsncvs

Hi guys, i need some help on my java homework. i need a text box which will have a piece of text. then i must show how many times every word has written in the text. in my way of thinking i should add every word to an array and …

Member Avatar for stultuske
0
103
Member Avatar for KMW12345

Hi. I am also having a standard deviation problem. When I try to calculate the sandard deviation of the numbers below with the suggested algorithm, I run into square root of a negative number. The algorithm does work for some data sets, but neither this one or 8 others. Does …

Member Avatar for jephthah
0
660
Member Avatar for mathpro

Hi, I am working on a C++ select algorithm using the qsort function. I am suppose to first sort the array and then return the i-th smallest value, which is given by the stat value. However, I have no idea how to return the value from a void array. I …

Member Avatar for some
0
199
Member Avatar for Siyabonga Gama

Dear help I am struggling to figure out why the following sorting algorithm doesn't work. Please help if you can. :) >> #myList is a list of arbitrary length for i in range (len(myList)): for j in range (i, len(myList) - 1): if myList[i] < myList[j]: myList[i], myList[j] = myList[j], …

Member Avatar for woooee
0
79
Member Avatar for tarheelfan_08

Hey guys I am trying to do some work with exception handling and I had to create and array with 100 elements in the main to hold cars in inventory, and create and int numCars to hold number of created cars. Then I had to create a for loop that …

Member Avatar for tarheelfan_08
0
257
Member Avatar for tristan17

Hi, I am looking for the algorthim for converting rgb to hsv values. Does anyone know of any program or algorithm in php?? thanks in advance, tris

Member Avatar for almostbob
0
414
Member Avatar for Lolalola

Hi, which is fastest coding algorithm? I need to cycle to encode a lot of data. Now, using RC4. Maybe a faster version. I do not need high security.

0
46
Member Avatar for misterjay3

Can someone help me with this???? [CODE]/****************************************************/ /* File: name of your file with the source code */ /* */ /* Created by: give your name */ /* Date: give the date */ /* */ /* Program to find the maximum of three */ /* floating point numbers */ /* …

Member Avatar for Sumyungi
0
116
Member Avatar for dusktreader

The essential problem is to determine the index i of the first Fibonacci number Fn to have at least d digits. The specific challenge is to determine the index of the first Fibonacci number to have 1000 digits. Obviously, this problem could be brute forced by stepping through all the …

Member Avatar for dusktreader
0
151
Member Avatar for OzY360

Hi I had a quick question about the libraries in C. Is there anything available like the java api library (java.sun.com) but for C? The closest thing I can think of is the MSDN Library but I'm not sure. A comprehensive guide that describes what the various libraries do would …

Member Avatar for OzY360
0
135
Member Avatar for smeghead007

Ok what I need to do is utilize a binary search algorithm and determine the index location of a set of keys. The keys are in the file the user enters along with the numbers that have to be searched through. But im lost on how to do this. Do …

Member Avatar for WaltP
0
104
Member Avatar for rkp728

I am writing a adler32 code to compute the adler32 checksum of a string. On the net I came across various sample codes: I did not understand some code entirely as <b>it has additional code</b> marked in bold below apart from the basic implementation of the adler32 logic. I did …

Member Avatar for rkp728
0
232
Member Avatar for guest7

Hi, I am trying to use the "partition" from STL algorithms. I get the following error: [CODE]error: no matching function for call to ‘partition(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, <unresolved overloaded function type>)’ /usr/include/c++/4.2.1/bits/stl_algo.h:2098: note: candidates are: _ForwardIterator std::partition(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int, …

Member Avatar for Banfa
0
400
Member Avatar for Sheltac

Hi everyone! I'm trying to write up a linux shell script to automatize the playing of video file collections. Basically, I want to be able to make a script so that, while it's sitting on a specific folder, when I run it, it plays the first unwatched file in the …

0
56
Member Avatar for tarheelfan_08

Hey guys, I have been trying to do some stuff outside of my class to learn a bit more and I have come across something called a vector. And I read online that its similar to an array! But I am not sure how to do this. I have been …

Member Avatar for mitrmkar
0
383
Member Avatar for karanjaswal

Suppose I had a network of switches, or more generally, Nodes. Each Node has a method getNeighbors(), which returns a set of adjacent Nodes in the network. Write a function findNeighborhood(Node, n) which given a Node and int n returns all nodes no more than n hops away... I want …

Member Avatar for WaltP
-2
53
Member Avatar for woodsrr

An application I developed has its session variables reset within 5 minutes. My session variables were timing out when I was connected to a asp state server so I switch session state mode to SQL with the hope that it would fix my problem. Now I'm getting a different error. …

0
55
Member Avatar for em-kay

hello guys, i need ur help in converting NFA to DFA DFA Algorithm : s <- s0 { start from the initial state } c <- nextchar { get the next character from the input string } while (c != eos) do { do until the end of the string …

Member Avatar for em-kay
0
289
Member Avatar for sam_dev

hi every body....... here i want to ask something about base64 algorithm which is used for the encryption of passwords.........i just want to know that how it works ?????what are the functions used in this algorithm?????any type help.....any link...????

Member Avatar for jephthah
0
123
Member Avatar for anugrah.agrawal

i want to develop a c++ program that may take a visual input like a graph and then manipulate it to find whether its a planar graph or not....i am well versed with the algorithm to do this...just want to know that how can I read the input from a …

Member Avatar for anugrah.agrawal
0
166
Member Avatar for blackmagic01021

Hello, I have received a piece of code which compress the image direct from a camera to a encoded file using Rice algorithm. [CODE]void code_riceI(unsigned short int *pic, const int X, const int Y, const int n, char *fn) - *pic: pointer to a field of 16bit image (bayer encoded …

0
67
Member Avatar for princecal

write a pseudocode to read a sequence of numbers terminated by 777. the pseudocode should count and print the number of negative values and zero values. the algorithm should also print the product of the positive number.

Member Avatar for shaiq
0
502
Member Avatar for turrence27

I am trying to merge two vectors, alternating elements from both vectors. And if one vector is longer than the other, alternate as long as possible then append the remaining elements from the longer vector. This is what I have so far: [CODE]#include <iostream> #include <algorithm> #include <vector> #include <iterator> …

Member Avatar for jonsca
0
2K
Member Avatar for Stevoni

Let me preface this by saying that I've only taken 1 formal programming class and everything else I've learned is from trial and error or Google (forums, blogs). I have never taken an algorithm class or an advanced math class. In the process of making my current application, I need …

Member Avatar for Stevoni
0
174
Member Avatar for tarheelfan_08

Ok guys, for my next assignment I have to read from a binary file and then print out my information. I will post the assignment and what I have so far. But my question is, do I create the binary file first in the program or by hand or what?? …

Member Avatar for tarheelfan_08
0
3K
Member Avatar for theonlywalks

Hi everyone, I have searched high and low across google, even throughout my textbook... I have this project where you have to design the different types of CPU schedulers. If there are three processes (arriving in this order), P1, P2, P3, and each process has a CPU Burst, then an …

Member Avatar for Salem
0
134
Member Avatar for The 1

Help people hows it going? I need some help with a bubble sort algorithm, i basically have to use a bubble sort to look through a number of car registration numbers and put them into ascending order... Im just not quite sure how to get it done... I asked a …

Member Avatar for maye13
0
117
Member Avatar for wckddudeman

Okay so Im having an issue,and am not able to find the actual problem with the code. I have a runtime error at : First-chance exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000. Unhandled exception at 0x008b182b in OpSys.exe: 0xC0000005: Access violation reading location 0x00000000. I do …

Member Avatar for WaltP
0
208
Member Avatar for ja_lee_00

I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudo codes and create flowcharts and don't have a clue. I need help. Create flowcharts and pseudo-code for the following problems: Question 1 The following schedule is …

Member Avatar for ja_lee_00
-1
113
Member Avatar for kesh1000

hi all i need a bubble sort algorithm in Java and make a class bubble_sort to sort any given array of any user defined type. can any of u give me a basic algoruthm i need to work with????

Member Avatar for chaospie
0
237
Member Avatar for designsecrets

Thanks for all useful tips in your useful forum, I am wondering if I can get help to make some changes on this C++ code for finding the least cost path for dijksta algorithm in specific case. I would like to change the output to 2 lists, as follow 1-show …

Member Avatar for Nick Evan
0
159
Member Avatar for firebugg

Hi, I am getting an [COLOR="Red"]Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol[/COLOR] error message when I try to run this merge/sort program. I can't figure out how to fix the program to get rid of the error. Please help. [CODE] import java.util.Random; public class ArrayUtil …

Member Avatar for firebugg
0
2K
Member Avatar for pearle

Another recursive problem. I'm trying to write a function that reverses an int value recursively. I think I've got the algorithm right, but I can't get the base case right. So my program ends up printing 5 infinitely... Here's the code: [CODE]#include <iostream> #include <cmath> using namespace std; void reverseDisplay(int …

Member Avatar for WaltP
0
158
Member Avatar for lotrsimp12345

I am trying to create a double pointer. never done it before. Problem is currently in intializepopulation(); Error C2106 left of operand must be l-value. EA.h [CODE] #ifndef EA_H_INCLUDED #define EA_H_INCLUDED #include <string> #include "phrase.h" #include <iostream> class EA:public phrase { public: EA(); ~EA(); void setgenerationnumber(int generationnumber); int getgenerationnumber(); void …

Member Avatar for lotrsimp12345
0
110
Member Avatar for .11

Okay I am working on a quick Shortest Job first algorithm and ran into a problem. I can't figure a way to implement, each way I try I get the wrong next process. [CODE]private static int lowTIme(ArrayList<Process> testProcesss, int currTime) { int i; int temp = testProcesss.get(0).getcpuTime(); for(i = 1; …

Member Avatar for .11
0
156
Member Avatar for techie929

Hi, I have to create a maze in C++. // Below is the problem Statement Let's use a simple case of a w=4 (columns) by h=3 (rows) maze to illustrate the maze-generation algorithm. We will start with 4 × 3 = 12 closed rooms, arranged in a 4 by 3 …

Member Avatar for Lerner
0
104
Member Avatar for Swiftle

Hello, I'm writing a simple version of the message digest algorithm. In our version we get a string, translated to its decimal value. We need to tackle 8 characters per loop. I'm having problems with the implementation of the loop. I have a DD which stores the size of the …

Member Avatar for Swiftle
0
81

The End.