3,815 Topics
![]() | |
Hello friends did anybody have implemented the ant based clustering algorithm in C.If so can u pls pass me on the coding.It would of great help to me. | |
This program is supposed to shuffle a Deck of cards and display them so I know it is working correctly. But one of the values displayed is -858993460 which is not possible when it should only be between 1 and 52. Obviously there is some sort of data loss going … | |
Hello world ! I have two arrays (max 100 characters) that I want to align, and add an "-" when there is disparity I found the Needleman–Wunsch algorithm, which is based on dynamic programming, and the Smith–Waterman algorithm is a general local alignment method also based on dynamic programming but … | |
1. Search Benchmarks Create a New Project called YourLastnameSearch. int array[20] = {78, 45, 33, 1, 6, 41, 99, 54, 73, 28, 101, 60, 21, 82, 11, 15, 654, 36, 52, 70}; Write a program that has an array of 20 integers. (You must use the above array.) It should … | |
Is there any google algorithm update named Dinosaurs going to take place. after watching a video of Matt Cutts speech i have this question in my mind. | |
Hello Daniweb, after such a long time. I had my semester exams ( I'm math major ). Was busy studying. Recently I participated in a coding competiton, with 2 of my friends as team. The problems were good. One had DFS implementation. But there was a problem that required me … | |
I want to encrypt the data based on user time. Is there any algorithm based on timestamp value for encryption and decryption? Pls give some suggestion | |
#include<iostream> #include<string> #include<vector> #include<algorithm> #include <cstdlib> using namespace std; int main() { char s[5]; string g; int p=345; sprintf(s,"%d",345); g=s; g+=".mp3"; cout<<g<<endl; getchar(); return 0; } I have a very small doubt about strings. this is code snippet i have shown. when i have called sprintf(), then it has changed … | |
Hello, Though I have done this question without string functions but can anybody give me short algorithm for this. Here is the question: Write a program that reverse the words in a sentence: Enter a sentence: *you can cage a swallow can't you?* Reversal of sentence: *you can't cage a … | |
im learning some algorithms , and trying to come up with a version for Quick find using union find. the algorithm works like : 1. get user input for size of the array (the array holds the data on which quickfind will work) 2. create and initialize the array based … | |
Hey everyone, I have been assigned to create a recursive maze program and I am having trouble to figure out how to start it. I am pretty much lost and confused and don't know what to do. I do not want anyone to complete it for me but giving me … | |
private void decrypt_Click(object sender, EventArgs e) { v = Convert.ToDouble (txtencrypt.Text); t = Math.Pow(v, d); msg = Convert.ToInt16(Math.Pow(v,d) % Convert.ToDouble(n)); txtdecrypt.Text = Convert.ToString(msg); } This is the code im doing for decryption in rsa algorithm but i got a problem in power operation. For a small power value,the power operation … | |
Hello, I'm trying to code a genetic algorithm in java but my code doesn't seem to be working as it should. I think the problem lies within my roulette wheel selection method. Can anyone spot it/point me in the right direction on how to solve it? private static Individual[] rouletteWheelSelection2(Individual[] … | |
Hello Everyone i am trying to write a program for printing all the combinations of a string.I do not want any help regarding the algorithm but i need help figuring out why this program is giving the error message "First-chance exception at 0x761bc41f in word.exe: Microsoft C++ exception: std::out_of_range at … | |
hi, I have to write an algorithm for getting a matching string from list of saves string after comparing it with the given string. say example: Saved string: ` ` Book ABC Book ABC XYZ Note Copy Note Book YYYe` If user gives Book, then the algorithm can return Book … | |
Hi all! (if this is not the correct forum to post my question please move it to the appropriate one) I have an assignment which requires writing a pseducode from a statement writting in English. Man! this psuedocode thing is really difficult to write . Easy to follow if you … | |
Hello Daniweb, I'm attempting to build an online service, aimed at mobile devices that have GPS or GPS like capabilities. The service would take a users location, and show them locations nearby of interest along with some information, such as a historic landmark and some facts or a restaurant with … | |
As for my assignment I had to write a program to swap 2 digit number Example:- If user input 12 the swaped number Would be 21. Along with ALgorithm, and a short description on this program(As how will you solve this program or what measure you'll take to get desired … | |
Hi, I'm just settign up boost on my desktop (ubuntu) after a reinstall and am having some problems. I set it up last w/e on my laptop (knoppix) and did exactly the same thing and it works fine. I'm sure its something increadably simple I'm missing. I'm following http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html I'm … | |
I'm trying to expedite the process of manually opening up an XML file and searching for some info in it. I want to store some of the data, etc. Nothing elaborate. But I'm not clear on some of the file structure. For the seasoned XML data wrangler, can you instantly … | |
![]() | I have been working on a Python coded priority email inbox, with the ultimate aim of using a machine learning algorithm to label (or classify) a selection of emails as either important or un-important. I will begin with some background information and then move into my question. I have so … |
I have been working on this assignment for a while now and I can't figure this one issue out. I was given four files, Name.java, SortableArrayList.java, NameListDriver.java, and SortableArrayListWithBubbleSort.java. The program is meant to take a text file with a list of names and sort them alphabetically. Part one of … | |
Hi guys, I got this from my teacher and im really confused. could anyone point me in the right direction? Thanks > What does it do? > > This time I'm looking for an overall summary, in one sentence, with the word "by" in the middle: > "This function ..........., … | |
Hello daniweb folks. I am here to ask some guidance, tips, suggestions and advices regarding the round robin scheduling algorithm. We are tasked to solve for the waiting time and turn around time of each process. They all have the same arrival time which is zero. here is my codes: … | |
I'm trying to write an algorithm for a larger project that will take two strings which are both large integers (only using 10 digit numbers for the sake of this demo) and add them together to produce a final string that accurately represents the sum of the two original strings. … | |
Is it possible to convert a postfix expression to prefix expression using only recursion? If possible what's the algorithm? | |
**Algorithm** step1: display 3 choices step2: user inputs one choice step3: Choice is store in one variable step4: selected choice is transfered to switch function step5: choice is compare to cases step6: a text document is created stating you choice. **This is layout of the code:** #include<stdio.h> void main() { … | |
i've been working on a game project, its a slider platformer and i've been having problem with getting the movement working, the movement is time based instead of being fixed to the frames per secound so the movement is consistent. the movement was working when i was testing out the … | |
Hello i am trying to solve this issue about making Rabin digital signature in parallel on a WSN ,i found application using NTRU digital signature on WSN , NTRU is a parallel processing algorithm but i need to know if we can make Rabin algorithm parallel like it on a … | |
#include<iostream> #include<vector> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<algorithm> #define READY 1 using namespace std; typedef struct task_node { int task_id; int period; int wcet; int arrival_time; int deadline; int state; int ceu; int slacktime; }task; void read_input(vector<task> &); void print_task_vec(vector<task> &); bool comparebyperiod(const task&,const task&); bool comparebydeadline(const task&,const task&); bool comparebyslacktime(const task&,const … | |
I need help... I want to parallelize the MD5 algorithm using OpenMP in C++. | |
Hello all... My project is to parallelize the MD5 program using OpenMP (omp). so please help... This is test.cpp: #include <stdio.h> #include <omp.h> #include <iostream> using namespace std; #include "md5.h" int main(void) { int n; double time1, time2; time1=omp_get_wtime(); cout << "\n The MD5 of 'zzzzzz' is : "; cout … | |
Hi, I am not able to understand DSW ALgirthm Its process of creating backbone or vine and creating balanced Tree. By rotation of Vine(BackBone) what is being said I couldnt Understand. Read few articles but Couldnt Understand Much. Can some one explain me about DSW Algorithm. And Also I tried … | |
# Hello everyone... # I love to tell you something about article posting. Here so many seo expert try to build number of links from a single article. Means a single article has posted on number of sites. Now according to the **Google recent updates** in algorithm this is cause … | |
I am beginner in c++ programming however I have tried to run my code but I got error and Idonot understanding can you help me thanks:) this is my code #include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include <conio.h> #include <iomanip> #include <map> #include <algorithm> #include "Student.h" … | |
Hi, I'm coding a game, i have a form to create player. I use html5 storage to create this. But the problem is if you go to tools>local storage, the password is visible. I want to implement some sort of security to hide this password in javascript. Can someone tell … | |
Is there a way to remove files from the filemanager through php? What I mean is, you can upload files to the server and specify the folder you want it in using an upload algorithm, however I have not seen any way to reverse the proccess, can I delete those … | |
My project compiles fine, but when running a push_back on a vector, I'm getting an access violation when the vector attempts to resize itself. I have lots of code, but hopefully I can boil it down to just relevant classes. I am sorry about the HUGE amount of code, but … | |
#include<iostream> #include<algorithm> using namespace std; #define MAX 10000000 #include<stdlib.h> #include<string.h> char s[MAX]; int p[MAX]; int bucket[MAX],nbucket[MAX]; struct suffix { int idx; }pos[MAX]; int H=0; bool cmp(struct suffix i,struct suffix j) { if(H==0) { return s[i.idx]<s[j.idx]; } else { if(bucket[i.idx]==bucket[j.idx]) { return bucket[i.idx+H]<bucket[j.idx+H]; } else { return bucket[i.idx]<bucket[j.idx]; } } } … | |
Hey guys,I'm new,but I study C programming language and I have this awfull problem. I have make a matrix A[n][n],in which n is an odd positive number(of course),and the matrix must "unwrap" itself with the number 1 in the middle then 2 to the top,then clockwise 3,4,5,..etc,until it wraps the … | |
My aim is to fill a 3x3 grid of Jtextfield in java swing with values and position of entry in that grid sourced from a text file.I made a file named aa.txt. Its contents are:- a1-3 b3-9 c2-4 a1,b3,c2,... are names of textfields in grid and numbers separated by hyphen … | |
I'm diving into various Image reading and writing methods and writing my own. I decided to tackle TGA/Targa. I got reading working flawlessly. It reads both compressed and decompressed .TGA files. I got writing decompressed .TGA files working. However, I cannot figure out how to write Compressed .TGA files. I … | |
I need the algorithm not the code . I am on a project where I should not use any third party libraries other than java sdk. I am supposed to convert a text file to an xml file. I know that there are SAX parsers and DOM parsers available and … | |
I am trying to do a problem of solid waste collection vehicle routing using Genetic algorithm in C++. So here raises the question why should I use GA. How do I defense this question? My main logic is solid waste collection problem is a non linear problem and for solving … | |
I tried to use a different forum but I was completely out of my league with the responses. I am extrememly new to python. As a project, I'm supposed to ask the user to input a file name, check that the file exists, output the numbers in the file, and … | |
I have an anagram program that if you type in a word's characters in any order, the dictionary file will be able to export it. However, my assignment is to build words that are shorter than the inputted search area in a one-to-one letter correspondance. An example of this would … | |
what is top down in writing an algorithm ? and what are differences of it and stepwise ? | |
#include <cstdlib> #include <iostream> #include <graphics.h> int main() { initwindow(1366, 768, "Prim's Algorithm"); int midx,midy; // /**************Node 0 creation***************/ midx = (getmaxx()/12); midy = (getmaxy()/12); rectangle(midx + 30,midy-10,midx - 30,midy+10); midx = (getmaxx()/12)-1; midy = (getmaxy()/12)-8 ; // setcolor(10); outtextxy(midx, midy,"0"); /*******************Right Vertex******************/ setcolor(15); midx = (getmaxx()/12) + 30; midy … | |
Hello, I have this java code which draws to me 100 nodes(with the sink node)(like the figure) that are connected by links, at the end I will get a tree , now I need to redraw the tree in(shortest path tree using prim algorithm )I have the nods in ( … | |
a) Write an algorithm to add and multiply two large integers, which cannot be represented by built-in types. b) Write a “c” function to find recursively the maximum and minimum element of an array A of size “n” elements. Find also the number of comparisons required for this. a) Write … |
The End.