3,815 Topics
![]() | |
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 … | |
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 … | |
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> … | |
//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 … | |
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 | |
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 … | |
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 … | |
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... | |
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 … | |
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 … | |
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 … | |
Hello everyone, Please help me in getting source code or algorithm for audio compression from .wav to mpeg format in C language? Thnaku | |
[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 … | |
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 … | |
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 … ![]() | |
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 … ![]() | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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.. … | |
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, … | |
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 … | |
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. … | |
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: … | |
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? | |
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 … | |
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 … | |
| |
Hi, would anyone please tell me the latest encryption algorithm for the media file such as audio,video etc. Thanks in advance. | |
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 … | |
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 … | |
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 … | |
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. … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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( … | |
How are SEMANTIC WEB and CITATION ANALYSIS common eg; common algorithm, common interface etc)?explain | |
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 … | |
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 |
The End.