3,815 Topics

Member Avatar for
Member Avatar for kishore84

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.

Member Avatar for Adak
0
368
Member Avatar for bCubed

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 …

Member Avatar for bCubed
0
208
Member Avatar for nacedo

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 …

Member Avatar for stultuske
0
123
Member Avatar for eclipsethemoon

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 …

Member Avatar for tinstaafl
0
142
Member Avatar for desmak

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.

Member Avatar for Ramkarthick123
0
110
Member Avatar for np complete

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 …

Member Avatar for JorgeM
2
166
Member Avatar for csss

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

Member Avatar for JOSheaIV
0
2K
Member Avatar for nitin1

#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 …

Member Avatar for Moschops
0
163
Member Avatar for ashish2expert

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 …

Member Avatar for ashish2expert
0
925
Member Avatar for somjit{}

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 …

Member Avatar for somjit{}
0
190
Member Avatar for chonobob

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 …

Member Avatar for JamesCherrill
0
607
Member Avatar for csss

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 …

Member Avatar for TnTinMN
0
255
Member Avatar for nostalgia

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[] …

Member Avatar for M4trixSh4d0w
0
3K
Member Avatar for meetjatin88

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 …

Member Avatar for meetjatin88
0
244
Member Avatar for sumitrapaul123

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 …

Member Avatar for xerohomicide
0
158
Member Avatar for sobias

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 …

Member Avatar for sobias
0
602
Member Avatar for Octet

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 …

Member Avatar for Octet
0
953
Member Avatar for dendenny01

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 …

Member Avatar for tux4life
0
4K
Member Avatar for TheBrick

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 …

Member Avatar for TheBrick
0
204
Member Avatar for tunisia

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 …

Member Avatar for tunisia
0
460
Member Avatar for ZeeeeeV

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 …

0
169
Member Avatar for ray.chappel

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 …

Member Avatar for ray.chappel
0
379
Member Avatar for aVar++

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 ..........., …

Member Avatar for Lucaci Andrew
0
234
Member Avatar for sheena.sabado.5

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: …

Member Avatar for sheena.sabado.5
0
294
Member Avatar for TheNotoriousWMB

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. …

Member Avatar for Lucaci Andrew
0
180
Member Avatar for programmer007

Is it possible to convert a postfix expression to prefix expression using only recursion? If possible what's the algorithm?

Member Avatar for Taywin
0
119
Member Avatar for dendenny01

**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() { …

Member Avatar for dendenny01
0
459
Member Avatar for A Haunted Army

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 …

Member Avatar for A Haunted Army
0
1K
Member Avatar for fedaa91

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 …

0
99
Member Avatar for pinkesh25gar

#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 …

Member Avatar for Ancient Dragon
0
275
Member Avatar for ziadkassam
Member Avatar for ziadkassam
0
723
Member Avatar for ziadkassam

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 …

Member Avatar for ziadkassam
0
495
Member Avatar for sbharathind

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 …

Member Avatar for rubberman
0
243
Member Avatar for dwivid

# 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 …

Member Avatar for thomas1004
0
170
Member Avatar for memo0o

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" …

Member Avatar for ravenous
0
205
Member Avatar for techyworld

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 …

Member Avatar for techyworld
0
122
Member Avatar for GraficRegret

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 …

Member Avatar for GraficRegret
0
152
Member Avatar for sciwizeh

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 …

Member Avatar for sciwizeh
0
6K
Member Avatar for nitin1

#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]; } } } …

Member Avatar for deceptikon
0
618
Member Avatar for Landoro

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 …

Member Avatar for Adak
0
200
Member Avatar for utkarshsahu

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 …

Member Avatar for JamesCherrill
0
377
Member Avatar for triumphost

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 …

Member Avatar for triumphost
0
1K
Member Avatar for subramanya.vl

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 …

Member Avatar for peter_budo
0
131
Member Avatar for angel.heaven.58367

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 …

Member Avatar for mike_2000_17
0
143
Member Avatar for dp121307

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 …

Member Avatar for vegaseat
0
20K
Member Avatar for ssh9411

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 …

Member Avatar for Lucaci Andrew
0
160
Member Avatar for Moein313

what is top down in writing an algorithm ? and what are differences of it and stepwise ?

Member Avatar for deceptikon
0
44
Member Avatar for zindgi66

#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 …

Member Avatar for zindgi66
0
189
Member Avatar for laian.alsabbagh

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 ( …

Member Avatar for laian.alsabbagh
0
421
Member Avatar for pestallozi

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 …

Member Avatar for pestallozi
0
121

The End.