3,815 Topics

Member Avatar for
Member Avatar for FREEZX

I need to write a program that will count how many numbers within an interval have an even sum of digits. you are given two numbers, a and b. i wrote a little program that is a little slow.. it checks for the sum of the digits for every number …

Member Avatar for tux4life
0
1K
Member Avatar for usman2k4u

Write a Program to generate a random connected undirected graph on a n vertices by generating random pairs of integers between 1 and n. Compute how many edges are needed to produce a connected graph(as a function of n). Implement the union-find algorithm, with the Weighted Balancing and the splitting …

Member Avatar for usman2k4u
0
286
Member Avatar for #include_rose

Hey guys, I have implemented the Knuth Morris Pratt algorithm and wanted to share the C code with all of you. If you feel it can be optimized please let me know. Feel free to play with it or use it for your school work :icon_biggrin: *************************KMP****************************** [code=c] #include<stdio.h> #include<string.h> …

Member Avatar for jephthah
0
213
Member Avatar for anjaly grace

//This code works for turbo c++ //Solution for strongly connected components or Kosaraju's algorithm //for nitc students //I use this because there is no other way i know how to do post a //code. ///////code:- #include<iostream.h> //#include<math.h> #include<conio.h> //int time; //time=0; char color[10]; int s[10]; int f[10]; int nn; int …

-1
87
Member Avatar for Mearah

Hey, is there somebody who tried to use pyOpenGL with wxPython? I want to have a GUI, where I have a frame integrated, that shows a 3D image computed by an OpenGL algorithm build in the PyOpenGL environment. Mearah

Member Avatar for Mearah
0
683
Member Avatar for Lucrezia

Most applications, to show the top rated items (regardless of the nature of the items) sort the items by rating average and then dismiss the ones where the voters are not enough (or the other way around, it doesn't really matter). I was wondering, is there a better algorithm for …

Member Avatar for thoughtcoder
0
93
Member Avatar for Sarlacc

I have been trying to learn about FFT programs and have been using one of the codeprojects example as a base [url]http://www.codeproject.com/KB/audio-video/waveInFFT.aspx?fid=39693&df=90&mpp=50&noise=3&sort=Position&view=Quick&fr=1#xx0xx[/url] What i would like to know is how to go about taking the data from the fft algorithm that is used here and display that information in an …

0
75
Member Avatar for sautap4u

I want to rank sentences in a text based on weights.. for example i want to extract certain important sentences from a text based on its weights(importance).. please help if possible with an executable algorithm...

Member Avatar for nucleon
0
112
Member Avatar for cam875

Is this the best datatype to use for doing calculations for extremely large numbers such as computing pi . Or am I going to need to create my own algorithm for handling extremely large numbers? how does software like superpi handle such a large number, im assuming its all split …

Member Avatar for cam875
0
99
Member Avatar for shasha821110

Hi, all its me again! Still stuck with the STL function usage. but this time face the sort function problems! here is my class: [CODE=C++] class A { public: A( const string& filename ) { ifstream file(filename.c_str()) ; string word; while( file >> word) { _word_list.push_back(word); } } StringIntVector topNWords(size_t …

Member Avatar for Narue
0
147
Member Avatar for noodlecode

For newer programmers, myself included, modulus is probably the most obscure operator. ie easy to understand, not always easy to find a use for. But when you see an algorithm that uses modulus, it immediately makes sense. How about a few samples where modulus works well. For example, is a …

Member Avatar for thoughtcoder
0
126
Member Avatar for krutthika

Hello everyone, Please help me in getting source code or algorithm for audio compression from .wav to mpeg format in C language? Thnaku

Member Avatar for MosaicFuneral
0
41
Member Avatar for peter_budo

[B]This is not a question just small challenge[/B] if you interest in improving provided solution and feedback for me. I just went back to some assignment I did at university and one of these been design phone book for mobile device with use of Java Microedition (JME). At the time …

Member Avatar for peter_budo
0
335
Member Avatar for gretty

Hi I have a algorithm I am trying to create but I cant seem to make it work? This is what i have to do: [QUOTE]Describe an algorithm that takes integer n and digit d as the parameters, and computes the number of occurrences of d in the decimal expansion …

Member Avatar for gretty
0
78
Member Avatar for vsha041

Hi, I am trying to write a program, in which it will ask the user to enter a string of length exactly 9. I have got a dictionary file with me which contains over two hundred thousand words. My job is to output all the possible words between lengths 4 …

Member Avatar for iamthwee
0
115
Member Avatar for ARYT

Hi everyone This should be one of our last assignments. Well, not sure, but most probably. As the title implies, we're supposed to write a program using multi-dimensional arrays for a 6x6 matrix multiplication. Here's what I've done. It's almost OK; except the most important part which is the final …

Member Avatar for GreenDay2001
0
525
Member Avatar for tharsrini

how to implement the secure file encryption and decryption using jsp for web application? can i use RSA or DES encryption algorithm? plz somebody post me? it's urgent

Member Avatar for amarender1201
0
139
Member Avatar for Insomniac119

Everything work except for the fact that it cannot solve the whole puzzle, only a few rows. If somebody could just look over the recursive backtracking part of the algorithm, that would be greatly appreciated. Here's the snippet of code that I think is causing me grief: [code] /* @member …

Member Avatar for tux4life
0
1K
Member Avatar for seao111

Hi, i am trying to make a general compression algorithm in c++ but i haven't really gotten the i/o part of this right yet. What i want to do somewhere along the line is to have my program parse say 10 or so characters at a time from a binary …

Member Avatar for seao111
0
163
Member Avatar for rafkay

Hi Guys, this is searching coding. I needs to ;- - read data from file - DONE - bubble sort - DONE - to find the data (searching) - [B]undone.[/B] can anyone help me to find the error in my coding.. coz when i run my program, my algorithm [B]void …

Member Avatar for tux4life
0
96
Member Avatar for talajiam

hi guys, i m new to vc++ and i have a task assigned to use the lzo algorithm in my project so i downloaded its full source code of version 1.08 from the [url]http://www.oberhumer.com/opensource/lzo[/url] now when i m opening its sample.c file (which is a example file in the example …

Member Avatar for talajiam
0
109
Member Avatar for dep.new

hello, could u pls tell me if there's any function which can allow java to decide what operator should use in order to return a min/max number? if yes.. i'd be happy to see it. i once saw something like this: [I]use "+,-,/" [/I].. followed by i don't know what.. …

Member Avatar for javaAddict
0
299
Member Avatar for c++noobie

I recently learned a little bit about sorting algorithm efficiency. I looked at the merge sort and saw how it could be implemented using a scratch array to store the result until it was finished. It then talked about in place algorithms but didn't offer one for a merge sort, …

Member Avatar for c++noobie
0
110
Member Avatar for pridathabah

Hi..... I am Prida Thabah doing my MS in Medical Software of Manipal, presently i am in Final year doing my project. My project is about (ROI-region of interest based Lossless Medical Image Compression Algorithm with JPEG 2000), hereby i have attached my mini Report. According to the flow of …

Member Avatar for Ancient Dragon
0
81
Member Avatar for lauren316

Please help me with this code! Here is the assignment. Project Specifications: Each part of this assignment is a piece of the next part--it builds upon itself. You should submit each part as a separate program. But, the final program is a complete program built upon all the other parts. …

Member Avatar for daviddoria
0
183
Member Avatar for daviddoria

I am trying to write a pretty straight forward algorithm (agglomerative clustering), but the details are getting pretty hairy. (A cluster is simply a group of points. The idea is to take a list of points and decide which are "grouped" or "clustered" close together.) Here is the outline: Input: …

Member Avatar for daviddoria
0
118
Member Avatar for philmetz

Im a little confused how this search works. Good someone help explain it to me. I tried on this picture ([url]http://en.wikipedia.org/wiki/File:AB_pruning.svg[/url]) but it doesnt make sense. Where am I starting on the tree? is it bottom left? How does alpha beta pruning work then?

Member Avatar for philmetz
0
100
Member Avatar for Ineedhelpplz

Hello, I have been given an assignment in which I am to write an assembly language version of the following binary search function & use a suitable main program written in C to test my function. The function in C in which I had to translate to assembly is: [CODE]int …

Member Avatar for csurfer
0
188
Member Avatar for longmatt

Hi guys, I am going mad. I am trying to code an algorithm in C++ and already at a very early stage there appears an error that I just don't understand... These are the error messages sent by the VC++ compiler: [code] \surface_watershed_matlab\surf_watershed.cpp(138) : error C2653: 'CMesh' : is not …

Member Avatar for longmatt
0
113
Member Avatar for coolbuddy059
Member Avatar for ejosiah
-1
93
Member Avatar for shailendranath

Hi, would anyone please tell me the latest encryption algorithm for the media file such as audio,video etc. Thanks in advance.

Member Avatar for ithelp
-1
45
Member Avatar for rouba

hi i really need help i am really lost in this program if any one can help me with it plz contact me on my email [I] <<mail id snipped>>[/I] (using c++ program) 1. Write a computer program that implements the recursive merge sort. The input to the program must …

Member Avatar for ithelp
0
190
Member Avatar for manjuannthomas

Hi everybody, i am doing my project on Implementation and Development of a Beat Classification Algorithm for Different Arrhythmias in Automated ECG Analysis..As i was searching for the MATLAB code for beat detetcion and classification which i could'nt found it from the net..Inorder to start up with my project i …

Member Avatar for ArkM
0
148
Member Avatar for trixymix31

Hi, I have a homework problem in where I have to count the vowels from a readin file from a flashdrive/harddrive. Then the amounts of each vowel has to be displayed & which occurred the most amount of times & which occurred the least amount of times. Extra credit (which …

Member Avatar for trixymix31
0
99
Member Avatar for Aristophanes

Hello, I just joined, so if I infringe upon any of the forum rules, then I apologize. Anyway, I have a code for approximating integrals via the Simpson's Method. The problem with the code is that somewhere within the mere 52 lines, I have divided my entire sum by 2. …

Member Avatar for Aristophanes
0
334
Member Avatar for daviddoria

I'm just trying to figure out how this stuff works. I wrote this function: [code] #include <algorithm> #include <vector> double VectorMax(const vector<double> &a) { vector<double>::iterator pos; pos = max_element (a.begin(), a.end()); return *pos; } [/code] and call it with: [code] vector<double> Numbers; Numbers.push_back(3.4); Numbers.push_back(4.5); Numbers.push_back(1.2); cout << VectorMax(Numbers) << endl; …

Member Avatar for nucleon
0
193
Member Avatar for daviddoria

I am trying to use the for_each from stl algorithm. [url]http://www.cplusplus.com/reference/algorithm/for_each.html[/url] [code] #include <algorithm> #include <vector> #include <iostream> template <typename T> void OutputObject(const T &obj) { cout << obj << endl; } template <typename T> void OutputVector(const vector<T> &V) { for_each (V.begin(), V.end(), OutputObject); cout << endl; } [/code] I …

Member Avatar for daviddoria
0
576
Member Avatar for neodregan

Hello everyone! I have a Huffman algorithm that is going along really smoothly and I've gotten to the part where I have store the paths to nodes in an array from a tree. This is what I have so far: [code] /*************************************************************** * huffTraverse * **************************************************************** * huffTraverse() reads in …

Member Avatar for monkey_king
0
220
Member Avatar for Zcool31

I don't want to make a new thread, but I have a relevant question. I am not using directX or opengl, but I do have 2D sprites in 2D space. However the sprites might have arbitrary shapes (circle, square, random blob, wheel with hollow center, etc). I do have masks …

Member Avatar for MattEvans
0
133
Member Avatar for Suhani123

Please can anyone tell me how to calculate time complexity of following algorithm in terms of big theta l=0 for i=1 to n do for j=1 to (n*n) do for k=1 to (n*n*n) do l=l+1 thanks in advance

Member Avatar for kaleesh.warrior
0
91
Member Avatar for IwillHelp

I am getting this error in my aspx page, can anyone plz provide me solution for this.. [QUOTE] Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in …

Member Avatar for Ramtamil
0
107
Member Avatar for lehe

Hi, I am using copy_n from GNU C++ Library under Ubuntu 8.10. My code is like this: [code] #include <ext/algorithm> using namespace std; void myfun(char * flags ) { char * flags_new = new char[3]; copy_n(flags, 3, flags_new);// both copy_n and copy would give not in this scope error. delete …

Member Avatar for John A
0
237
Member Avatar for erik09

Hi! I'm a third year BS Computer Science student and we're now on the process of proposing a topic for our thesis next semester. I'm thinking of proposing an Improved Image stitching algorithm, but i don't know where to start. I only have basic programming knowledge, and I'm not that …

Member Avatar for erik09
0
102
Member Avatar for lcandrade

I have a task witch need to be done by Dijkstra’s algorithm, but I didn’t have opportunity to learn it. Anybody knows any a good online tutorial in this subject

Member Avatar for skatamatic
-1
75
Member Avatar for sweetApple

Hi, I am trying to implement a non_recursive version (bottom-up) of mergeSort. When I compile my code, however, my x-code brings up numerous errors that have to do with some files that I did not think I was messing with (stl_algo.h, and stl_algobase.h, and stl_iterator_base_types.h) -I will attach a picture …

Member Avatar for Lerner
0
114
Member Avatar for scream2ice

HI all Can anyone help me with this algorithm (I ned to write the code in java)......The java code would also be helpful [B]Describe a recursive algorithm for enumerating all permutations of the numbers {1,2,...,n}. [/B] I'd appriciate it if somebody could explain this problem to me and give me …

Member Avatar for verruckt24
0
534
Member Avatar for Dewey1040

I'm trying to complete a radix sort program, and i cant remember the algorithm to get the specific digit out of a number between 1 and 10000 heres the for loop which calls getdigit: [code=C] for( i = 0; i <= 4; i++ ){ printf("Pass %d: ", i ); for( …

Member Avatar for monkey_king
0
111
Member Avatar for priyag123

How are SEMANTIC WEB and CITATION ANALYSIS common eg; common algorithm, common interface etc)?explain

Member Avatar for Rashakil Fol
0
41
Member Avatar for delifion

Hi, I know this kind of stuff been wandering around. I did have a look through the search function but I haven't got the answer. This is the program to check whether the number inputted is a prime number or not. [code=c++] #include <iostream> #include <math.h> #define TRUE 1; #define …

Member Avatar for delifion
0
88
Member Avatar for digital_dizasta

I need help in writing a simulated annealing algorithm that is able to maximize f(x)=sin(0.15*x)+cos(x) defined on the interval 0<= x <= 40 using the cooling schedule. Please help me as i'm supposed to generate random numbers between 0 and 40 and substitute in f(x)=sin(0.15*x)+cos(x)...... thanks

Member Avatar for verruckt24
0
115

The End.