3,815 Topics

Member Avatar for
Member Avatar for Aprentchacker

Basically I'm trying to adapt the quicksort algo for array based lists for linked list as shown on a text book. This is only for learning the principles than practically effective sorting. I have struggled to get this code to work, but stil seems to break on a few test …

Member Avatar for Aprentchacker
0
930
Member Avatar for low1988

[CODE] import java.net.*; import java.io.*; import java.security.*; import javax.crypto.*; public class messagedigestsend { public static void main( String [ ] args) throws Exception{ byte ttl= (byte) 0; try { MulticastSocket mSocket = new MulticastSocket(); MulticastSocket mSocket2 = new MulticastSocket(); InetAddress mAddr = InetAddress.getByName("224.0.0.1"); String sendString = "M"; byte[] plainText = …

Member Avatar for thekashyap
0
116
Member Avatar for ronghel

hello .... i just want to ask.. what is the algorithm for searching a data in database.,. example : txtbox is equal to 060100 .. i want to search all the information about 060100.. thanks.. :D

Member Avatar for BestJewSinceJC
0
68
Member Avatar for ELBUF

Greetings everyone, So I posted earlier a similar problem which I wrote in python, but now after accomplishing that, I think ill try to write it up in C++. The link to the original question is [URL="http://www.daniweb.com/forums/thread254474.html"]here[/URL]. If there are any other questions or if you need any more information …

Member Avatar for fadrior
0
658
Member Avatar for Skeen

So I've been working on two small programs to calculate prime numbers, fast and memory efficiently. Both my algorithms are based upon the 'Sieve of Eratosthenes', and I know that the 'Sieve of Atkin' would be the way to go since its faster, however I'm just trying to optimize the …

0
88
Member Avatar for shiv0013

what data structure is best for a star algorithm? at a time i may have 100 items in open list........

Member Avatar for Salem
0
47
Member Avatar for notsogood

Hi everyone, I am writing an[URL="http://www.8puzzle.com/8_puzzle_problem.html"] 8-puzzle Problem[/URL] Solving Program that utilizes the [URL="http://en.wikipedia.org/wiki/A*_search_algorithm"]A* (A Star) search algorithm[/URL]. I've come this far in completing the desired program, and somehow summed up to this: (entire source code posted below). But I can't compile it just yet due to this builder error: …

Member Avatar for thomas_naveen
0
131
Member Avatar for calccrypto

despite its simplicity, for some reason, my code refuses to work, even though the encryption works [CODE] # add() is just (a+b)%2**32. for some reason, without the function, it doesnt work delta = 0x9e3779b9 sum = 0xc6ef3720 for x in range(cycles): # 32 data[1] = add(-add(data[0]<<4, key[2]) ^ add(data[0], sum) …

Member Avatar for calccrypto
0
108
Member Avatar for cwarn23

Note to mods: This is in the php section as the question is mainly directed to the php gurus. I have been reading on some rather old news and discovered that the Secure Hash Algorithm (SHA1) has been cracked. Does anybody know where I can download a copy of this …

Member Avatar for ShawnCplus
0
88
Member Avatar for agurrea

Please help...I am having a problem with comparing double values in C++. I have stumble across this issue when my sorting algorithm tries to compare double values to check whether a < b / a > b. Based on the comparison result my sorting algorithm does sorting by ascending or …

Member Avatar for agurrea
-1
194
Member Avatar for matrix360

hey i just need some help understanding how to do this question, i need to find the running time, and show it in algebra like "2i+2" and also in Big O notation such as O(n^2), the question also asks to state the number of additions and subtractions in the algorithm …

-1
53
Member Avatar for jigglywiggly

Ok... so i am making a rather simple calculator, that solves for either derivatives or a polynomial. Though I have to make my own linkedlist is the challenge. Ok, I will just copy and paste the LinkedList.cpp file: [code]#include <stdlib.h> #include <cstdlib> #include <string> #include <cstdlib> #include <iostream> #include <algorithm> …

Member Avatar for jigglywiggly
0
222
Member Avatar for torokun

[URL="http://img686.imageshack.us/img686/3380/hw1.jpg"]http://img686.imageshack.us/img686/3380/hw1.jpg[/URL] Okay so I got homework from my IT programming. I am completely oblivious in programming so I need a bit of help getting me into the right direction. Here is the question to understand my flowchart: Above is the link to my flowchart. Consider N students receiving the marks …

Member Avatar for tedroger
0
86
Member Avatar for gamerchick

Hi, i have to create a algorithm called find2D, to find an element x in an n × n array A. The find2D function iterates over the rows of A, and it calls the algorithm findArray shown below, on each one, until x is found or it has searched all …

Member Avatar for abdelhakeem
0
129
Member Avatar for job2617

hello every one. this is my last year in cs,i'll soon make a thesis but I have'nt decided a proposal yet. here's some topics that our thesis advisor suggested.(i'm not decided yet which one would be the best proposals) *Implementation of the Traveling Salesman Algorithm on Networking Systems. *Graph Traversal …

Member Avatar for Nick Evan
0
980
Member Avatar for cwarn23

Hi and I thought I would write an algorithm where the computer can learn from text being input into its database and the computer will be able to have a normal conversation with somebody. I already have my database of paragraphs but will need converting into something more complex for …

Member Avatar for cwarn23
0
160
Member Avatar for Lukezzz

I have created a completely new new Windows Form application and are trying to add this namespace: [code] #include "stdafx.h" #include <ctime> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <limits> #include <ios> #include <cstdio> #include <numeric> #include <cstdlib> #include <ctype.h> …

Member Avatar for Lukezzz
0
207
Member Avatar for Nikhar

Hi guys, can you please describe the knapsack algorithm in English. I googled this, the first page was wikipedia. The algorithm there is too mathematical which doesn't help me to understand the solution. Can you please describe its algorithm?

Member Avatar for hag++
-2
63
Member Avatar for bufospro

Hi, I have to implement in C an distibuted algorithm, which counts the number of processes in a full-connected network when happens f byzantine faults. Could you help me with the algorithm ? Only a basic idea! I don't want the implementation. I am looking in web and I found …

Member Avatar for bufospro
0
68
Member Avatar for tillaart36

Hello, im trying to implement a template matching algorithm with the use of Python + PIL and I'm trying to follow the code that wikipedia gives for template matching -> [URL="http://en.wikipedia.org/wiki/Template_matching"]http://en.wikipedia.org/wiki/Template_matching[/URL] Basically it loops through all pixels of a search image, and all pixels of a template. The sum of …

Member Avatar for vegaseat
2
3K
Member Avatar for yakovm

Hello I have many different processors (they not the same) for example first has a 3 stage pipe: EXE->MEM->EXE and the second has a 3 stage pipe: MEM->EXE->EXE.I want to decide for the operations in which CPU it has to be computed for example *(R1+R2)+R3 has to be computed in …

Member Avatar for Salem
0
78
Member Avatar for C++ Beginner

Problem: Write a program that has an array of at least 20 integers. It should call a function that uses the linear search algoritm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program …

Member Avatar for hag++
0
2K
Member Avatar for shethia.tejas

hie, i want to operate a usb webcam using c or c++ language that is i want it to take pictures using c/c++ commands can any1 suggest me how can this be done. Also i want to find out two laser spots from an image using processing and track them …

Member Avatar for daviddoria
0
159
Member Avatar for bhushnxx

In this assignment a scheduler algorithm needs to be designed and implemented. The scheduler designed will be used for scheduling different tasks/process to be executed in a system. There are different kinds of processes in a system. When the process enters the system it will be directly stored in the …

Member Avatar for Ancient Dragon
-5
133
Member Avatar for cwarn23

I have been asking for some time to move [URL="http://www.daniweb.com/forums/forum28.html"]forum28[/URL] to it's own main forum in web development instead of being a subforum of web design but it seems everybody has been confused about what I am talking about. So I've now started my own thread... Anyways, it seems that …

Member Avatar for jbennet
3
216
Member Avatar for kenoch

I have a problem with this topic ..Solution to algorithm using static and dynamic data structure

Member Avatar for Rajesh R Subram
-2
97
Member Avatar for ttnfrm

Hello everybody, I'm looking for a ready code in Java for JADE implementation of Bellman-Ford algorithm. I really need in developing Agent for the research. I am not an expert in programming. For anyone who has been developed or seen the Bellman-Ford algorithm source code in Java, I would be …

Member Avatar for Nick Evan
0
159
Member Avatar for rwill357

This is what I have so far. This program should contain a recursive function that will compute the binomial coefficient according to the definition if k=0 or k=n [CODE]#include <iostream> #include <algorithm> using namespace std ; int C(int n,int k) { if (k < 0 || k > n ) …

Member Avatar for rwill357
0
193
Member Avatar for D137Pi

Given a certain size, n, I would like to implement an array (of size n) which has an init, add object [in a location given by user] and remove object functions which work in O(1) time. In other words, I'm trying to create an array which knows where "Junk values" …

Member Avatar for Rashakil Fol
0
151
Member Avatar for thanatos2

hey guys i have a noob question. i'm trying to program this little text based RPG, i've made several but you're always controlling only 1 character and fighting 1 enemy, i want to change that and make you take control of 4 characters and fight 1-4 enemies at once (turn …

Member Avatar for Geekitygeek
0
137
Member Avatar for Web_Sailor

Hi, I have a data I want to make fix length records Like suppose:- [CODE]one two three four one two three one[/CODE] In this case the fixed length should be of the maximum string length which is of the first line. My code below is giving creating faulty fix lengths. …

Member Avatar for jonsca
0
234
Member Avatar for mostafanageeb

I am now making the huffman algorithm. I have generated the tree but I cannot generate the codes.. please if anyone can help tell me how? [B]This is the class Node[/B] [CODE] public class Node { private Node left=null; private Node right = null; private Node parent = null; boolean …

Member Avatar for hasanabada
0
110
Member Avatar for group256

Hi, I'm supposed to write a code of my TSP assignment using brute force algorithm. Although there are still some darkness about how to do it. I know what is TSP but I don't know how to start it. Let's say that we have 4 cities(A, B, C, D). Using …

Member Avatar for pecet
0
1K
Member Avatar for Creator00

Hello, I need to write the recursive algorithm of type divide and conquer. The input is integer array S. The output is true if the array is sorted or false if not. Algorithm should divide the array in two halves, then to check the sorting of both halves with the …

Member Avatar for xavier666
0
58
Member Avatar for sist

Hey, I have done a little project in the past involving Genetic Algorithms (GAs), written in VB6 (really poorly). Now, after I understand the whole concept of programming much better, I decided to give it another try. This time I've decided to try tackling the Traveling Salesman Problem. For those …

Member Avatar for QVeen72
0
573
Member Avatar for 54uydf

Hey everybody :) I'm looking for a ready code in [B]Java or C[/B] for[U] Ford - Fulkerson algorithm[/U]. I need to program something very similar and I thought it'd be great if I wouldn't have to start from scratch since I'm not that good programer anyways.:-/ I couldn't find any …

Member Avatar for 54uydf
0
84
Member Avatar for xavier666

Suppose the user wants to input a string. The length of the string is unknown. I also don't want a character array of size 1000 or what so ever. I want the size of the character array increasing by 1 byte for every character entered. Here is a sample output …

Member Avatar for Narue
0
426
Member Avatar for sarah_laz

I have been asked to program a spellchecker in C for an assignment. I am quite new to C and programming in general, so I have decided to start by writing a program that does the following: [LIST] [*]Reads words into an array from a dictionary text file. [*]Reads words …

Member Avatar for sarah_laz
3
1K
Member Avatar for shiv0013

i need algorithms similar to A *. in A * we know the starting point and ending point. suggest an algorithm when starting point is not known.

0
54
Member Avatar for coolcool

can anyone suggest how to write a notepad app using c??algorithm for programming is needed..gui is not so important..graphics in c enough..i just need the idea of what to do..pls help me...

Member Avatar for Ancient Dragon
0
91
Member Avatar for JackintheMox

Hello there, I am trying to self-learn some Assembly and just picked up The Shellcoder's Handbook. There is a short C program regarding a triangle in Ch. 1: [code=C] int triangle (int width, int height){ int array[5] = {0,1,2,3,4}; int area; area = width * height/2; return (area); } [/code] …

Member Avatar for JackintheMox
0
159
Member Avatar for arcticM

Hey guys! I need I quick help I heard about a sorting algorithm that I want to use but I can't find any info about it..so if any of you know the name of this sort or a place where I can read about it, it would be great:icon_mrgreen: what …

Member Avatar for SasseMan
0
234
Member Avatar for tfitz666

Hi, Im new here and to java programming in general. I've been given an assignment to write a sorting algorithm and then test it using JUnit tests. The problem is when I try to compile the tester class i get a ".class expected" errors followed by three "; expected" errors …

Member Avatar for tfitz666
0
219
Member Avatar for johndoe444

Hi, I am trying to implement some distributed algorithm (minimum spanning tree) where each node is represented by a process running in a different machine. Each edge represented by a client server communication channel. Suppose host0 is connected to host1, host2 and host5. I create 1 server sockets in each …

Member Avatar for nezachem
0
180
Member Avatar for cwarn23

Hi and I am making a maths library which will accept infinit digits but what is the best formula a computer can understand for devision. The only one I have come across so far is long devision but is there anything better? The following is the kinda formula I am …

Member Avatar for cwarn23
0
101
Member Avatar for Earendil

Today is my second day with *<Accerlerated C++>,* and so far I've read until chapter three. Below is the code written in the book and as a part of solving the chapter's exercise problem 3-0, I typed and compiled the code. (using vc++ 6.0) I assumed there would be no …

Member Avatar for Yiannis_Sp
0
280
Member Avatar for eduard77

How can I define this algorithm to calculate the matrix that has uneven nr of rows and columns? //============================================================================== // // Linear System Solution by Gauss method // // // //============================================================================== #include <iostream> #include <stdio.h> #include <windows.h> #include <cmath> //============================================================================== void VectorPrint(int nDim, double* pfVect) { int i; printf("------------------------------------------------------------------\n"); for(i=0; …

0
73
Member Avatar for colmcy1

Hey all, I am having trouble with the ""std_lib_facilities.h" header. I am getting the complier message: error C2614: 'String' : illegal member initialization: 'string' is not a base or member I am going through Bjarne Stroustrup's - Programming Principles and Practice Using C++ and he suggests that if you cant …

Member Avatar for xqq524148626
0
312
Member Avatar for saintrenz

Can you guys check my work i want to perfect my studies at school.. this will be passed on sunday also there some that dont have answer which you know please do tell.. [QUOTE]False 1. When you go through a list of names, from beginning to end, until you reach …

Member Avatar for ryoumah03
0
204
Member Avatar for saintrenz

I need Help! Consider this following modified version of the binary search algorithm. (Modifications are indicated by a comment highlighted asterisks.) With this new version of the binary search algorithmn work correctly for all data? If not, specify a situiation in which this version will fail. [code]template<class element, class Keytype> …

Member Avatar for saintrenz
0
105

The End.