3,815 Topics

Member Avatar for
Member Avatar for MaYouSHka

hi all, i have been working for two months on a project and i have come up with an algorithm that is a mix of R. Mitkov's algorithm on anaphora resolution (robust, knowledge-poor algorithm) and several filters that are applied first to the xml file (a POS tagged text) to …

Member Avatar for TrustyTony
0
339
Member Avatar for surferxo3

[CODE] //Mohammad Sharaf Ali k092094 #include <iostream> #include <iomanip> #define INFINITY 999 //Max Length using namespace std; class Graph { private: int adjMatrix[15][15]; int predecessor[15],distance[15]; bool mark[15]; int source; int numOfVertices; public: void read(); void initialize(); int getClosestUnmarkedNode(); void dijkstra(); void output(); void printPath(int); }; void Graph::read() { cout<<"Enter the …

Member Avatar for template<>
0
210
Member Avatar for jimJohnson

Finishing this memory mapping palindrome and keep getting file not found. If anyone has the time please take a look at this I debugged to if (argc >1) and that is where I ran into problems. Also could someone also just verify my palindrome is set up correctly? [CODE] #include …

Member Avatar for raptr_dflo
0
217
Member Avatar for brentgabel

Hello Everyone! My problem is this. I have a VBscript encrypting passwords using capicom.dll RC2. I want to use C# to decrypt this password. Which I can't get to work for the life of me. Keeps coming back saying 'Specified key is not a valid size for this algorithm.' (but …

Member Avatar for skatamatic
0
581
Member Avatar for Buppy

Hello, I have a JS/jQuery based date picker - calendar. The algorithm itself is simple - a Calendar class that generates calendar, several methods for year/month change, etc, nothing that special. Since i have several independent date fields in the page, i am creating several independent calendars, for example, var …

Member Avatar for stbuchok
0
105
Member Avatar for watery87

Hello, would like to ask about this problem im facing. [code] #include <cstdlib> #include <iostream> #include <fstream> #include <ios> #include <string> #include <string.h> #include <vector> #include <sstream> #include <algorithm> #define MAX_MSG 30 using namespace std; vector<UserInit> ReadUsersInitial() { fstream file ("Users_initial.txt"); FILE *file1 = fopen("Users_initial.txt", "r"); string tempFile; if (file.good()) …

Member Avatar for drkybelk
0
126
Member Avatar for ravenous

There are occasionally posts asking how to remove white space from string of characters (either a C-style `char` array, or a C++ `std::string`). Using functions in standard C++ libraries, this is quite an easy thing to do: #include <string> #include <algorithm> #include <iostream> #include <cctype> int main() { /* Make …

Member Avatar for Narue
1
2K
Member Avatar for stephen84s

Hey guys, just noticed today that Clicking on *bbcode tags* link in the section below the forum title (in Software Development / Web Development forums)displays a blank page. > Our Software Development forum category encompasses topics related to application programming and software design. When posting programming code, encase it in …

Member Avatar for WaltP
0
233
Member Avatar for jimJohnson

Could someone please run this code in XP and let me know if it works. I am on Windows 7 and have looked at this code for 2 months now and not able to find a solution to save my life. If you see what is wrong with it though …

Member Avatar for jimJohnson
0
139
Member Avatar for nightbreed

Hey guys! I'm trying to write a program that calculates the area of the convex hull of a set of points in a plane. I can find which points construct the convex hull but calculating the area is a little bit difficult for me. I guess the problem is that …

Member Avatar for nightbreed
0
2K
Member Avatar for shylesh_kerala
Member Avatar for rEhSi_123

Hi Guys, I am trying to do design a coarse grain algorithm in MPI for carrying out multiple pattern searches. For which I have created a function that does the main pattern searches as shown in the algorithm below called hostMatch. The code below, reads in the data and sends …

Member Avatar for rEhSi_123
0
194
Member Avatar for neilio86

I need to figure out how to get the min/max in this array. I heard that it can be done using the algorithm library. we have yet to learn that. any help would be appreciated. [CODE]#ifndef Lab4_h #define Lab4_h void GetTemperatures (int Temperatures[], int NumTemperatures); double ComputeAverageTemp (int Temperatures[], int …

Member Avatar for pseudorandom21
0
258
Member Avatar for matadori

I'm trying to program the traditional minesweeper game. I have problems with Swing as I'm not sure how to proceed. I tried adding one JPanel to a JFrame and then using JButtons to imitate the tile buttons. Then I encountered a problem when I tried to program the functionality of …

Member Avatar for JamesCherrill
0
135
Member Avatar for Jsplinter

I'm just starting a search for a library or code sample for grouping numbers together based on their distance from one another. For instance, in the set{1,2,4,25,28,29}, is there an algorithm that would identify two groups of numbers subsetA{1,2,4} and subsetB{25,28,29}? Nothing really came up in my google search, but …

Member Avatar for Jsplinter
0
258
Member Avatar for sadsdw

Hi everyone, I'm trying sort a C++ struct and print the result as output file. I don't know how to sort the structure. Did anyone develop this before? Thanks a lot, [CODE] #include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <string> #include <vector> #include <sstream> #include <algorithm> #include <cstdlib> …

Member Avatar for sadsdw
0
121
Member Avatar for whocares21

Hello I want to implement a pr. queue with structs. My struct is: [CODE] struct Call { int CallNum; long CallTime; int CallLength; };[/CODE] This is a call center simulation application (of course if i can). According to algorithm, the agents should choose the call whose CallLength is shorter. I …

Member Avatar for rubberman
0
87
Member Avatar for rEhSi_123

Guys need some advice. I am working on a algorithm for multiple string searching using OpenMp. So within my program I am trying to [U]initialise[/U] each elements of an array to a value of a variable. What I mean by is say if I have array intialised as shown below: …

Member Avatar for Narue
0
104
Member Avatar for wildplace

so..i found this on wikipedia but i dont really get what dist, previous, alt mean in here.. [CODE] 1 function Dijkstra(Graph, source): 2 for each vertex v in Graph: // Initializations 3 dist[v] := infinity ; // Unknown distance function from source to v 4 previous[v] := undefined ; // …

Member Avatar for mike_2000_17
0
222
Member Avatar for Jaymz

So I have a task to write the algorithm for eratosthenes' sieve. The code works fine apart from the fact that it just won't print the newline when i need it. It just ignores the syscall for printing. I tried googling but couldn't find anything similar to my problem. The …

Member Avatar for Jaymz
0
2K
Member Avatar for munitjsr2

[code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class A { public : void getData(); void putData(); bool operator==(const A &) const; private : int x; char name[90]; }; vector< A > v; void A :: getData() { cout << "id = "; cin >> x; cout << …

Member Avatar for mike_2000_17
0
2K
Member Avatar for jimmymack

[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will …

Member Avatar for jimmymack
0
119
Member Avatar for jimmymack

[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will …

Member Avatar for jimmymack
0
155
Member Avatar for sciprog1

Hello Members, Given an undirected Graph, G, is there any standard algorithm to find the value of k, where (k-1) represents the number of vertices whose removal results in a graph that is still connected and the removal of the kth vertex makes the graph disconnected? Thank you! sciprog1

Member Avatar for sciprog1
0
73
Member Avatar for bfprii

I want to merge 2 or more hashtables together..It doesn't matter what the final form is, as long as I can iterate through it. Here the final form is an array. So I have an unsigned long long as the key, the value is a string,int pair. Each key maps …

Member Avatar for bfprii
0
209
Member Avatar for kris0r

Hi all, I recently made a web crawler as part of a Uni team project building a small search engine. I've managed to incorporate it into our GUI, there is a button which starts the crawling process by creating the crawler in a thread. (I did this because otherwise the …

Member Avatar for JamesCherrill
0
160
Member Avatar for TrustyTony

This code determines if datetime object represent first workday of month, but it does not consider the special days like New Year (this year weekend but last year Friday). Reaction to Basic efforts in: [url]http://www.daniweb.com/software-development/legacy-and-other-languages/threads/362098[/url] There algorithm idea given by [URL="http://www.daniweb.com/members/jonkiparsky/775324"]jon.kiparsky[/URL] based docstring says 'workday' when it should be 'weekday': …

Member Avatar for TrustyTony
1
4K
Member Avatar for daveyb91

Hello people, A couple days ago I asked something for my assignment, which can be found here: [url]http://www.daniweb.com/software-development/csharp/threads/362561[/url] Only.. I have to ask another question considering this.. I think I do understand the A* algorithm.. only I don't really know how to build the grid up for the cars.. I …

0
57
Member Avatar for virendra_sharma

Hi , i need code , which is used for sorting in c# i.e. .sort method code., somewhere i read that they use quick sort algorithm , can anyone plz help me by giving the code. Thanks in Advance

Member Avatar for virendra_sharma
0
176
Member Avatar for cretaros

Here; is my scenario; A prisoner is admitted in a prison at this date:: [B]2011-05-05[/B], he was sentenced for [B]5 years[/B] so how do i calculate date additions so the results give me [B]2016-05-05[/B], as this is the exact date he is to be released from prison. the addition should …

Member Avatar for mKorbel
0
291
Member Avatar for mphst

3) Write a program that reads a 21 by 21 array of characters from a text file. It represents a maze. • Each position can contain either an X or a blank. The borders of the maze are covered by ‘X’ except start and exit points. • Read text file …

Member Avatar for TrustyTony
0
958
Member Avatar for Xcelled194

Hi guys, I'm making an Etch A Sketch program in C#. I have two buttons for the "knobs". Right now, I'm handling the mousemove event of the button to evaluate if the user is dragging the mouse up or down, and then updating the etch a sketch appropriatly. This works …

Member Avatar for Rashakil Fol
0
536
Member Avatar for Poopster01

This is my first time writing an array of objects and I’m having an issue putting it all together. I have written two classes and the third program that is supposed to test the classes. ***PROBLEM*** My primary issue at the moment is that my program to test the classes …

Member Avatar for javaAddict
0
324
Member Avatar for Dani

Hi everyone, I just found out (a few hours ago) that DaniWeb was *seriously* hurt by the new Google algorithm update that took place yesterday. The algorithm change was only rolled out to US visitors, and it reduced the amount of US-based traffic to DaniWeb by over 50%! Google plans …

Member Avatar for Reverend Jim
3
1K
Member Avatar for cousinoer5

This program keeps track of a hardware store inventory. It's very barebones, all it needs to do is put the information into a vector of pointers to a struct, allow the user to sell items, and print the report. I have printing down no problem, but selling is where I …

Member Avatar for Chilton
0
179
Member Avatar for thekashyap

Hi, I was implementing the Exampler / Prototype pattern just to brush up on C++. Couldn't figure out how to do the cleanup at the end. Problem is deleting all the prototypes from the map in base class at the end. I.e. deleting all stored pointers in [ICODE]Animal::examplesPtr[/ICODE], which is …

Member Avatar for thekashyap
0
104
Member Avatar for kungfu71186

I am now completely lost. I thought i had the correct algorithm to solve this problem, but i can't seem to get it. Anyone have any ideas. I need to balance the parentheses and print each level. Ex: (this + (is) + an + example) It will go through it …

Member Avatar for bglasser
0
183
Member Avatar for dataholics

Hello, My web-page is not loading correctly in some of older version of browsers. Here is my website [URL="http://128.196.27.167:8080/"]mis510proj[/URL]. Any help would be appreciated :) I attached my naive code below :) [CODE] <!-- Page (2 columns) --> <div id="page" class="box"> <div id="page-in" class="box"> <!-- Content --> <div id="content"> <div …

Member Avatar for masijade
0
96
Member Avatar for fifouta

Hello, I want to sort array by using" the quicksort algorithm" so here is the code: [CODE] #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> void *triHoare (void * arg); int PivotSelection (int indexStart, int indexEnd); int Split (int tab[], int pivot, int indexStart, int indexEnd); int MAXTAB; …

Member Avatar for abhimanipal
0
174
Member Avatar for jimJohnson

I am finishing up this program and need to find the GCD using euclids formula. I am attaching my code and was seeing if anyone could show me what is wrong. I am also sending the instructions just in case you need it... [code] //Programmed by: Bryan Kruep //Date: 2/22/2010 …

Member Avatar for jimJohnson
0
355
Member Avatar for andimiami

I need to take an input file that contains name listed like: John Henry Mary Baker and create an output that looks like: Baker, Mary. Henry, John. Right now my output is just ,. ,. ,. ,. ,. ,. I can't use any global accesses, or a character processing alogorithm. …

Member Avatar for Moschops
0
133
Member Avatar for munitjsr2

[CODE] #include <iostream> #include <vector> #include <algorithm> using namespace std; class A { public : void getData(vector< A > &); void putData(vector< A > &); private : int x; char name[90]; }; vector< A > v; void A :: getData(vector< A > &Aref) { cout << "id = "; cin …

Member Avatar for munitjsr2
0
243
Member Avatar for narunaru

Hi, I'm a beginner programmer and I have an assignement of making the radix sort! My plan is to make a helper function that will return the place value of a number. (for example, if the number is 127, then the function will return either a 1, 2 or 7) …

0
59
Member Avatar for geekme

In oreder to implement a routing algorithm , I need to maintain a router table that is to be updated .What data structur is to be used for this? Please help.

Member Avatar for vijayan121
0
45
Member Avatar for coderN

Hi guys.. I was going through an exam paper. I am stuck here.The explanations has to be in java terms. Please help. !!! Draw a detailed sketch to illustrate how a left-justified array might be used to represent a map (ADT Map). Describe (in words) how operation get might be …

Member Avatar for TrustyTony
0
42
Member Avatar for Behseini

Hi every body, Can you please let me know how can I modify following SQL algorithm to Disable/Enable all constraints existing in an specific table? [CODE] alter table (table name) disable constraint (constraint name) [/CODE] For example if I have a table called "GIS_Data" how I can disable all constraints …

Member Avatar for debasisdas
0
88
Member Avatar for mbouster

Hi guys, I need to implement a program for simulating the flooting algorithm. Can someone suggest from where to start. I will use structs or classes? How the flow of the program will be?

Member Avatar for mbouster
0
2K
Member Avatar for gaurav_13191

Hi, the following is the code for returning the position of a substring within a string(Brute force algorithm) [CODE] //Brute Force Algorithm #include<stdio.h> #include<string.h> int main(void) { char s1[20],s2[10]; int x1,x2,j,k,i; printf("Enter string 1:"); gets(s1); printf("Enter string 2:"); gets(s2); x1=strlen(s1); x2=strlen(s2); if(x1<x2) return 0; for(i=0;i<=x1-x2;i++) { j=i; k=0; while((s1[j]==s2[k])&&k<x2) { …

Member Avatar for koberoc
0
152
Member Avatar for c0ld sn1ff3r

Hi, I need to develop a C# console application which implements stack as a circular queue. I've written the code to use stack as a simple queue. [CODE]using System; public class Stack { private int[] theArray; private int topOfStack; public Stack() { theArray = new int[10]; topOfStack = -1; } …

Member Avatar for ddanbe
0
759
Member Avatar for luislupe

Hi, I'm building a clustering algorithm and need to visualize how data is distributed and relationed. For this, I'm thinking in histograms (numerical and categorical data) and scatter plots. If possible, a 3D like plot like [url]http://www.opendx.org/inaction/datamining/images/original/mci3.jpg[/url] would be nice, but is not required. I'd like to be able to …

Member Avatar for L7Sqr
0
332

The End.